Coding is Two Things
Coding is hard because it’s two things:
- Expressing ideas in the rigid syntax & grammar of a formal language.
- Problem solving.
While learning to code we often focus too much on the first. This is also true while teaching others to code.
This fall I’m going to highlight problem solving while teaching my intro programming courses. Below you will find some of the problem solving strategies I may adapt for my students.
Solving Problems in Five Acts
- Define the Problem
- Let it Simmer
- Plan a Solution
- Carry out the Plan
via: University of Waterloo Centre for Teaching Excellence
FOWL Problem Solving
Figure out What You’re Being Asked
Organize the Presented Data
Work out the Problem
Look Over Your Answer
George Pólya’s Problem Solving Techniques
- Understand the Problem
- Devise a Plan
- Carry out the Plan
- Look Back
via: George Melvin - Berkeley University
Also: Pólya’s book on the subject, How to Solve it - A New Aspect of Mathematical Method: Full PDF, AbeBooks, Amazon
How do you solve problems?
On reviewing this post Sam suggested emphasising hypothesis and testing when teaching these strategies. I agree that formulating a hypothesis during planning makes room for false starts, while testing adds rigure to the self-assesment of the “Look Back”/Reflect phases. The wonderful part about making these two steps explicit is that we now have something akin to the scientific method:
- Statement of the problem.
- Hypotheses as to the cause of the problem.
- Experiments designed to test each hypothesis.
- Predicted results of the experiments.
- Observed results of the experiments
- Conclusions from the results of the experiments.
Language geek note: The word solve comes from the Latin solvo, to loose an object bound, to release, set free, disengage, dissolve, take apart.
Related Posts on StungEye:
- A Scientific Approach to Debugging - March 2013
- Self-Assessment While Learning to Code - February 2013
- Coding Challenges in the Classroom - May 2011
Reading and Listening in 2014
I read twenty-five books this past year. Six more than 2013, seven more than in 2012, and nine more than in 2011. Only one of the books was read on my Kobo, the rest were deadtree. Nine of them were non-fiction and sixteen of them were fiction.
Fiction Read in 2014
- Heart of Darkness - Joseph Conrad
- Good Omens - Terry Pratchett and Neil Gaiman
- An Instance of the Fingerpost - Iain Pears
- System of the World - Neal Stephenson
- Saturday - Ian McEwan
- The Tesseract - Alex Garland
- Harry Potter and the Philosophers Stone - J. K. Rowling
- The Remains of the Day - Kazuo Ishiguro
- Name of the Wind - Patrick Rothfuss
- Colour of Magic - Terry Pratchett
- The Samurai’s Garden - Gail Tsukiyama
- The Circle - Dave Eggers
- Steppenwolf - Hermann Hesse
- Harry Potter and the Chamber of Secrets - J. K. Rowling
- A Prayer for Owen Meany - John Irving
- Story of Your Life and Others - Ted Chiang - Incredible “sci-fi” short stories. I’ve put sci-fi in quotes, ‘cause they are so much more than that.
Read in that order. No duds this year, although I’ve got two incompletes:
- The Difference Engine by Sterling & Gibson
- Friend, Follow, Text - Short stories about online culture.
I can normally savour a slow journey but Sterling & Gibson’s creation story for the Steampunk genre lost my interest. The stories in Friend, Follow, Text were harshing my mellow, so I’ve taken a break.
Top Three Fiction Reads
We are a story we tell ourselves, parts of which we try to forget. A gentleman butler of World Ward Two-era Britain remembers so much but admits so little.
This book was full of comments penciled in by a previous reader that shaped the way I interpreted the story.
Ishiguro wrote the first draft of this novel in four weeks.
A murder at Oxford in the 1660s told four times by four unreliable narrators. Each telling reveals more details and yet introduces more bias.
Shares many historical characters with Stephenson’s The System of the World (up next). It also shares this theme:
Early science is messy and pious. Early medical science more so.
I feel like I know Isaac Newton, Gottfried Leibniz, Caroline of Ansbach and the rest of them. I feel like I’ve witnessed the Great Plague, London’s Great Fire, the end of Britain’s Stuart Dynasty, and the birth of modern thinking in science, religion, politics, and business.
I know I shouldn’t trust these feeling but I do.
Some 300 years ago Newton discovered a new System of the World. The predictive power of his three laws of motion made credible the scientific method. The twin calculus methods of Newton and Leibniz gave the scientific revolution it’s analytic strength.
This book is the third and final tome in Neal Stephenson's historical sci-fi trilogy the Baroque Cycle. It is also a tale about swashbuckling pirates, currency, coinage, courage and computation.
Non-Fiction Read in 2014
I fulfilled my goal of reading more non-fiction books. Many of these were inspired by a series of audio lectures on the Eastern intellectual tradition, others were inspired by parenthood as well as our work at Open Democracy Manitoba. They were read in this order:
- Existentialism and Human Emotions - Sartre
- No Death, No Fear - Thích Nhất Hạnh
- Practical Object-Oriented Design in Ruby - Sandi Metz - Oh, now I get it. Thanks Sandi for helping me understand OO after 15+ years.
- Feminism is for Everybody - Bell Hooks
- Yoga: Discipline of Freedom - Patanjali - Translated by Barbara Stoler Miller
- The Lost Painting - Jonathan Harr
- Electing Better Politicians: A Citizen’s Guide - Charles K. Bens - A must-read for accountable citizens!
- Good Citizens - Thích Nhất Hạnh
- Raising a Self-Reliant Child - Dr. Alanna Levine
Audio Lectures in 2014
Great Minds of the Eastern Intellectual Tradition - TGC - Grant Hardy - 17hrs - The best series of lectures I’ve listened to, ever. The content was mind expanding. The lecturing was enthralling.
Consciousness and It’s implications - TGC - Daniel N. Robinson - 6hrs - Difficult and at times even disturbing.
Headspace - Take 5 - A Guided Introduction to Meditation - I’ve been meditating on and off since 2000 (when I took a meditation course in the rain forest near Cape Tribulation, Australia). I’m 25 days into the program and I cannot recommend it enough. Try Take 10 on the Headspace app for free. It’s 10 days of 10 minute meditation sessions. You’ll thank me.
Currently Reading and Listening
- Howards End - E.M. Foster (After just finishing Zadie Smith’s homage.)
- Practicing Mindfulness: An Introduction to Meditation - TGC - Mark W. Muesse
- Great Minds of the Western Intellectual Tradition - TGC
Simon Swain — Emergence as a game mechanic.
Simon demos a game programmed to play itself. The game involves flocking, resource management, colonization, economics, war and the exploration of deep space. Really.