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
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
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:
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.
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.
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
Internet Bots for Fun & No Profit
My talk from last November’s BSides Winnipeg 2013 Security Conference.
To show how little code is required to create automated accounts on Twitter I demo’d a few other bots that I’ve written. Here’s one that Tweets out a random number every five minutes. A modern day Numbers Station.
require 'chatterbot/dsl' loop do tweet rand(1000000..99000000).to_s sleep 300 end
I closed with my motivations, the security/ethical implications of algorithmic social media accounts, and the possibility of a future where we are unable to determine who is real and who is a bot on the Internet.
UPDATE - Abotlafia’s response to my talk:
@stungeye “you’re in trouble? good.”— Abulafia (@abotlafia) November 25, 2014