Skip to content

Commit

Permalink
Add authors and contributors to Practice Exercises (#120)
Browse files Browse the repository at this point in the history
For each Practice Exercise, we've looked at the commit history of its files to see which commits touched that Practice Exercise.

Each commit that we could associate with a Practice Exercise was used to determine authorship/contributorship.

### Authors

1. Find the Git commit author of the oldest commit linked to that Practice Exercise
2. Find the GitHub username for the Git commit author of that commit
3. Add the GitHub username of the Git commit author to the `authors` key in the `.meta/config.json` file

### Contributors

1. Find the Git commit authors and any co-authors of all but the oldest commit linked to that Practice Exercise. If there is only one commit, there won't be any contributors.
1. Exclude the Git commit author and any co-authors of the oldest commit from the list of Git commit authors (an author is _not_ also a contributor)
2. Find the GitHub usernames for the Git commit authors and any co-authors of those commits
3. Add the GitHub usernames of the Git commit authors and any co-authors to the `contributor` key in the `.meta/config.json` file

We used the GitHub GraphQL API to find the username of a commit author or any co-authors. In some cases though, a username cannot be found for a commit (e.g. due to the user account no longer existing), in which case the commit was skipped.

## Renames

There are a small number of Practice Exercises that might have been renamed at some point. You can ask Git to "follow" a file over its renames using `git log --follow <file>`, which will also return commits made before renames. Unfortunately, Git does not store renames, it just stores the contents of the renamed files and tries to guess if a file was renamed by looking at its contents. This _can_ (and will) lead to false positives, where Git will think a file has been renamed whereas it hasn't. As we don't want to have incorrect authors/contributors for exercises, we're ignoring renames. The only exception to this are known exercise renames:

- `bracket-push` was renamed to `matching-brackets`
- `retree` was renamed to `satellite`
- `resistor-colors` was renamed to `resistor-color-duo`
- `kindergarden-garden` was renamed to `kindergarten-garden`

## Exclusions

There are some commits that we skipped over, and which thus didn't influence the authors/contributors list:

- Commits authored by `dependabot[bot]`, `dependabot-preview[bot]` or `github-actions[bot]`
- Bulk update PRs made by `ErikSchierboom` or `kytrinx` to update the track
  • Loading branch information
ErikSchierboom authored Jul 2, 2021
1 parent 3be93e7 commit 78fd8c8
Show file tree
Hide file tree
Showing 28 changed files with 172 additions and 28 deletions.
7 changes: 6 additions & 1 deletion exercises/practice/acronym/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Convert a long phrase to its acronym",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Acronym.cfc"
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/anagram/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"blurb": "Given a word and a list of possible anagrams, select the correct sublist.",
"authors": [],
"authors": [
"jsteinshouer"
],
"contributors": [
"bdw429s",
"kytrinyx"
],
"files": {
"solution": [
"Anagram.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/atbash-cipher/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"AtbashCipher.cfc"
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/bob/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx",
"sjwarner-bp"
],
"files": {
"solution": [
"Bob.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/diamond/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Diamond.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/difference-of-squares/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"DifferenceOfSquares.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/flatten-array/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Take a nested list and return a single list with all values except nil/null",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"FlattenArray.cfc"
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/gigasecond/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"blurb": "Given a moment, determine the moment that would be after a gigasecond has passed.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx",
"sjwarner-bp"
],
"files": {
"solution": [
"Gigasecond.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/grains/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Grains.cfc"
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/hamming/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"blurb": "Calculate the Hamming difference between two DNA strands.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx",
"sjwarner-bp"
],
"files": {
"solution": [
"Hamming.cfc"
Expand Down
4 changes: 3 additions & 1 deletion exercises/practice/hello-world/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"blurb": "The classical introductory exercise. Just say \"Hello, World!\"",
"authors": [],
"authors": [
"bdw429s"
],
"files": {
"solution": [
"HelloWorld.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/isogram/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Determine if a word or phrase is an isogram.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Isogram.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/largest-series-product/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"LargestSeriesProduct.cfc"
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/leap/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"blurb": "Given a year, report if it is a leap year.",
"authors": [],
"authors": [
"nelsnich"
],
"contributors": [
"bdw429s",
"kytrinyx"
],
"files": {
"solution": [
"Leap.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/luhn/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a number determine whether or not it is valid per the Luhn formula.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Luhn.cfc"
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/markdown/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"blurb": "Refactor a Markdown parser",
"authors": [],
"authors": [
"jsteinshouer"
],
"contributors": [
"bdw429s",
"kytrinyx"
],
"files": {
"solution": [
"Markdown.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/nth-prime/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a number n, determine what the nth prime is.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"NthPrime.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/pangram/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Determine if a sentence is a pangram.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Pangram.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/pig-latin/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Implement a program that translates from English to Pig Latin",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"PigLatin.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/raindrops/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Convert a number to a string, the content of which depends on the number's factors.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Raindrops.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/rna-transcription/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a DNA strand, return its RNA Complement Transcription.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"RnaTranscription.cfc"
Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/saddle-points/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"blurb": "Detect saddle points in a matrix.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx",
"sjwarner-bp"
],
"files": {
"solution": [
"SaddlePoints.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/scrabble-score/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a word, compute the Scrabble score for that word.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"ScrabbleScore.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/secret-handshake/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"SecretHandshake.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/space-age/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"SpaceAge.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/sum-of-multiples/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a number, find the sum of all the multiples of particular numbers up to but not including that number.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"SumOfMultiples.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/triangle/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Determine if a triangle is equilateral, isosceles, or scalene.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"Triangle.cfc"
Expand Down
7 changes: 6 additions & 1 deletion exercises/practice/word-count/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"blurb": "Given a phrase, count the occurrences of each word in that phrase.",
"authors": [],
"authors": [
"bdw429s"
],
"contributors": [
"kytrinyx"
],
"files": {
"solution": [
"WordCount.cfc"
Expand Down

0 comments on commit 78fd8c8

Please sign in to comment.