www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: reddit.com: first Chapter of TDPL available for free

language_fan Wrote:

 One way to teach languages with both high and low level concepts is to 
 start bottom-up. Surely the high level concepts are usually built from 
 atomic low level artifacts.

I agree. I am writing an online D tutorial that targets the novice programmer, where the concepts are built from the bottom up. I didn't think that starting with 0s and 1s was too technical for anybody: there is electricity or not... Anyone can grasp that concept, especially when 0s and 1s are at least heard by everybody. I think giving an explanation of 0s and 1s at the lowest level and exposing them to the novice breaks the barriers and welcomes them to the programmers' land; as opposed to "we will tell you that later." That would grasp the reader... (Disclaimer too: Not tested on anyone.) Then I explain that such an entity (bit) could only represent concepts with two states like "heads or tails"; so the CPU provides types that can represent more; which are still not sufficient to represent higher level concepts like "a playing card" or "a laser gun in a computer game". Enter the programming language... It took me a few paragraphs to build this bottom up picture. I occasionally still refer to the CPU when teaching a seemingly unrelated topic. I am following the method of introducing concepts one by one with examples, problems, and solutions. It looks great in the sandbox... ;) Ali
Aug 16 2009