Jay McGavren's Journal


Motivating Examples for Beginning Coders

One thing I learned from the authors in the Head First series who came before me is the important 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
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
Morse code
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
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
Search a list
Secure temporary file
Take notes on the command line
Temperature conversion
Text processing/2
Text processing/Max licenses in use
The Twelve Days of Christmas
Tokenize a string
Top rank per group
Update a configuration file
URL parser
Web scraping
Word wrap

comments powered by Disqus