Jay McGavren's Journal

2017-01-28

Motivating Examples for Beginning Coders

One thing I learned from the authors in the Head First series who came before me is the importance of good “motivating examples” - a task that the reader can easily understand but requires learning a whole suite of skills to actually implement (coinciding as closely as possible with the skills you want to teach). Motivating examples are valuable because they give a reader a sense of progress as they work toward a goal.

Rosetta Code is basically a wiki-based collection of motivating examples for beginning developers. There are tons and tons of tasks on there, each showing solutions in a wide variety of programming languages. But a large portion of them aren’t ideal for beginners:

But there are a lot of great beginner-friendly examples too. I’ve collected promising-looking ones here, for people to mine for inspiration.

Align columns
Anagrams
Averages/Median
Averages/Mode
Character codes
Chat server
Check that file exists
Comma quibbling
Command-line arguments
Compare a list of strings
Count occurrences of a substring
Create an HTML table
CSV data manipulation
Echo server
Even or odd
File input/output
File size
Greatest element of a list
Guess the number/With feedback
Hash from two arrays
I before E except after C
Input loop
Leap year
Letter frequency
Longest string challenge
Mad Libs
Menu
Morse code
N'th
Named parameters
Number names
Object serialization
One-dimensional cellular automata
Palindrome detection
Pangram checker
Password generator
Percentage difference between images
Phrase reversals
Pick random element
Pig the dice game
Playing cards
Plot coordinate pairs
Rate counter
Read a configuration file
Read a file line by line
Read a specific line from a file
Read entire file
Remove duplicate elements
Remove lines from a file
Roman numerals/Encode
Rot-13
Search a list
Secure temporary file
Take notes on the command line
Temperature conversion
Text processing/2
Text processing/Max licenses in use
Textonyms
The Twelve Days of Christmas
Tokenize a string
Top rank per group
Unix/ls
Update a configuration file
URL parser
Web scraping
Word wrap
XML/Input

comments powered by Disqus