Apedia

Make String Making Anki Cards Programming Future Solution

Front When making anki cards for programming:

If there is more than one way to do something, how would you make your future self come up with more than one solution so you can keep both alternatives in mind? 
Back
Make a question card that gives a challenge and asks for two programming solutions:

Q:
s = 'string like this'
# Show two ways to turn it into 'String Like This'

A:
s.split.map(&:capitalize).join(' ')
s.gsub(/\b\S/) {|x| x.upcase}

Tags: anki

Learn with these flashcards. Click next, previous, or up to navigate to more flashcards for this subject.

Next card: Succinct making anki cards programming turn broad concepts

Previous card: Array var trick cards future creates empty length

Up to card list: Obscure but useful english vocab, logical fallacies and CBT