Thursday, November 19, 2009

Becoming a programmer - thinking algorithmically

[duped from a post i made on an industry only forum]

last time I taught someone how to think algorithmically I asked them... what is a seemingly simply task ... that you do ALL the time.

they chose - make a cup of tea.

I asked them to write down, in absolutely the order they would do it, everything they need in order to do it, everything they do to go from no cup of a fresh cup in hand.

each time they finished I asked them to follow their own instructions using only the inputs they specified, only the instructions they had written down....

took about 20 iterations to get it right but each time they got better.

I then asked them to repeat that process on their own with other simple tasks....

I did this before introducing any language or limits... simple english....

2 weeks later I sat in on them going through the same process for "checking & replying to email"... 100% correct.

after that... developing small programs in C became a syntactic problem only... write down the english as comments... flesh it out with the C.

Visitor IP Address City