2 ms·
It's all in the approach. I've noticed most universities these days either get students started on Python or C. I believe the idea behind starting with Python i
by jorvi 9y ago
It's all in the approach. I've noticed most universities these days either get students started on Python or C. I believe the idea behind starting with Python is that most beginning students will hit the ground running, whereas the idea for C is that you get thrown in the deep end but will have a deeper understanding (and perhaps foundation) going forward. Which approach is better I dare not say..
- msla 9y agoC is good for teaching a simplified machine model, one with a distinction between stack and heap, pointers, and a purely sequential execution model. This is enhanced if you use it to program an Arduino or similar trivial hardware, collapsing the division between hardware and software to one piece of hardware (the single-board computer) and one piece of software (the code the student wrote) and nothing else. C, in short, gives a good way to control actual hardware without having to introduce students to the complexities of actual hardware. Python is good for teaching algorithms and OO design, precisely because it allows students to focus on the algorithm while not having to slow down the course with memory management. In both cases, the idea is clear: Only teach one hard thing at a time, and then build.
- CJefferson 9y agoI teach C as a second language. It is useful to learn from a historical perspective and because so much software is written in it, but I find it doesn't give that good understanding of machines compared to say java, and many of the problems are C specific. By "C specific" I mean reading from freed variables, or going out of bounds in arrays. These bugs are horrible to find, but also don't map cleanly to the underlying machine, because often the compiler will optimise away invalid accesses, or move them somewhere weird, meaning you can't use your understanding of the real machine to understand the C bug.