Skip to content

Commit

Permalink
Curriculum change: track sequence (round 1) (#590)
Browse files Browse the repository at this point in the history
* Reorder exercises according to Round 1

As part of the ongoing curriculum update, this re-orders the core exercises according to perceived difficulty. Most notably, this moves simple-cipher down -- re-orders the list loosly according to this:

hello-world, gigasecond, leap, rna-transcription, bob, pangram, space-age, matrix, linked-list, grade-school, robot-name, pascals-triangle, simple-cipher, wordy, secret-handshake, list-ops

Since it's a bit weird to introduce Date thát early, it's placed after leap --- for now.

Furthermore this moves all the core exercises to the top and all the side exercises unlocked by these below that, in order. The bonus exercises (always unlocked) are at the bottom.

* Demote prime-factors from core to side exercise

Prime factors is a mathy exercise and as part of round one, mathy exercises should be demoted to side exercise.

* Update simple-cipher difficulty

This is an extensive exercise with four parts. Even though it's not a particularly difficult one to understand, it's actually difficult for beginners (< 4) to implement. Making this number higher makes sure it's no longer listed as easy.

* Add helper binaries for printing the tree of exercises

* Fix the script to include core exercises that don't unlock anything

* nit: junction for the last item in the list

* Re-assign prime-factors unlocks

Assigning them one up, and give two exercises to "secret-handshake" which had none.

* Reorder based on mentor-notes, examples and conversation

- Moving bob down
- Moving list-ops up
- Moving space-age up (because of new exercise implementation)

* Remove .gitattributes

* Tweak difficulties

* Update config.json orderering to match track:

Core (matches config.json) of this track:
- hello-world (1)
- leap (1)
- gigasecond (1)
- rna-transcription (2)
- space-age (2)
- pangram (2)
- matrix (3)
- bob (4)
- pascals-triangle (4)
- linked-list (5)
- grade-school (5)
- list-ops (6)
- robot-name (6)
- simple-cipher (6)
- wordy (7)
- secret-handshake (6)


core
----
├─ hello-world
│  └─ two-fer (1)
│
├─ leap
│  ├─ reverse-string (2)
│  ├─ triangle (3)
│  └─ collatz-conjecture (3)
│
├─ gigasecond
│  ├─ clock (5)
│  └─ meetup (7)
│
├─ rna-transcription
│  ├─ hamming (2)
│  ├─ etl (2)
│  ├─ scrabble-score (5)
│  ├─ raindrops (2)
│  ├─ allergies (6)
│  └─ nucleotide-count (4)
│
├─ space-age
│  ├─ word-count (1)
│  ├─ grains (5)
│  ├─ perfect-numbers (3)
│  ├─ luhn (4)
│  ├─ pythagorean-triplet (5)
│  ├─ difference-of-squares (3)
│  ├─ complex-numbers (4)
│  ├─ prime-factors (4)
│  └─ palindrome-products (7)
│
├─ pangram
│  ├─ isogram (2)
│  ├─ phone-number (3)
│  ├─ anagram (1)
│  ├─ acronym (2)
│  ├─ series (3)
│  ├─ largest-series-product (7)
│  ├─ bracket-push (3)
│  └─ high-scores (2)
│
├─ matrix
│  ├─ forth (8)
│  ├─ saddle-points (6)
│  ├─ ocr-numbers (5)
│  ├─ transpose (1)
│  ├─ spiral-matrix (4)
│  └─ rectangles (4)
│
├─ bob
│  ├─ beer-song (5)
│  ├─ food-chain (4)
│  ├─ pig-latin (4)
│  ├─ proverb (4)
│  ├─ house (4)
│  ├─ twelve-days (4)
│  ├─ say (6)
│  └─ isbn-verifier (4)
│
├─ pascals-triangle
│  ├─ diamond (5)
│  └─ rational-numbers (5)
│
├─ linked-list
│  ├─ sublist (4)
│  ├─ word-search (8)
│  ├─ circular-buffer (8)
│  ├─ binary-search (7)
│  ├─ binary-search-tree (6)
│  ├─ custom-set (6)
│  └─ simple-linked-list (8)
│
├─ grade-school
│  ├─ two-bucket (6)
│  ├─ bowling (8)
│  ├─ alphametics (7)
│  ├─ connect (7)
│  └─ variable-length-quantity (5)
│
├─ list-ops
│  ├─ strain (4)
│  ├─ accumulate (5)
│  └─ flatten-array (5)
│
├─ robot-name
│  ├─ sieve (5)
│  └─ nth-prime (5)
│
├─ simple-cipher
│  ├─ atbash-cipher (7)
│  ├─ crypto-square (9)
│  ├─ diffie-hellman (3)
│  └─ rotational-cipher (2)
│
├─ wordy
│  ├─ kindergarten-garden (7)
│  └─ robot-simulator (5)
│
├─ secret-handshake
│  ├─ sum-of-multiples (5)
│  └─ change (8)

bonus
----
- zipper (8)
- darts (3)
- run-length-encoding (2)
- roman-numerals (3)
- react (8)
- queen-attack (8)
- all-your-base (5)
- minesweeper (7)
- protein-translation (1)
- armstrong-numbers (2)
- trinary (4)
- octal (4)
- hexadecimal (4)
- point-mutations (0)
- binary (4)
  • Loading branch information
SleeplessByte authored Jan 25, 2019
1 parent 6fe1a0a commit a220fb4
Show file tree
Hide file tree
Showing 3 changed files with 733 additions and 661 deletions.
35 changes: 35 additions & 0 deletions bin/generate-config-tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env node

const { exercises } = require('../config.json')
const TAG_CORE = '__core'
const TAG_BONUS = '__bonus'

// node inter-opt exports
exports.TAG_CORE = TAG_CORE
exports.TAG_BONUS = TAG_BONUS

exports.tree = exercises.reduce((result, exercise) => {
const tag = exercise.slug
const item = {
slug: tag,
difficulty: exercise.difficulty,
}

if (exercise.core) {
const current = result[TAG_CORE] || []

if (result[tag]) {
console.warn(`${tag} is not ordered correctly in config.json`)
}

return {
...result,
__core: current.concat([item]),
[tag]: result[tag] || []
}
}

const parent = exercise.unlocked_by || TAG_BONUS
const current = result[parent] || []
return { ...result, [parent]: current.concat([item]) }
}, {})
34 changes: 34 additions & 0 deletions bin/print-config-tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env node

const actions = require('./generate-config-tree')

const { tree, TAG_BONUS, TAG_CORE } = actions
const { [TAG_BONUS]: __bonus, [TAG_CORE]: __core, ...track } = tree

function printLn(line) {
process.stdout.write(`${line}\n`)
}

function printList(items) {
items.forEach(item => {
printLn(`- ${item.slug} (${item.difficulty})`)
})
}

printLn('Core (matches config.json) of this track:')
printList(__core)
printLn('\n')
printLn('core')
printLn('----')
Object.keys(track).forEach(slug => {
printLn(`├─ ${slug}`)
track[slug].forEach((side, index, self) => {
junction = index === self.length - 1 ? '└─' : '├─'
printLn(`│ ${junction} ${side.slug} (${side.difficulty})`)
})
printLn('│')
})

printLn('bonus')
printLn('----')
printList(__bonus)
Loading

0 comments on commit a220fb4

Please sign in to comment.