Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Learning C has practical benefits, but gaining an understanding of how computers work is not one of them.

Learning an assembler would be more helpful in this regard, but in my opinion one might want to start with a very well-written article by Mark Smotherman: https://people.cs.clemson.edu/~mark/uprog.html

If you want to see how a CPU works, I highly recommend visiting http://www.visual6502.org/



While I wouldn't suggest anyone learn C for the explicit purpose of learning how computers work, being familiar with pointers and memory allocation can go a long way.

Novice unity programmers struggle to understand why using classes (reference type in c#) in a game loop causes performance issues, but structs (value type in c#) are not as costly. For someone who has called malloc before, this isn't too hard to grasp, but before someone who sticks to garbage collected languages, it seems bizarre and arbitrary.

Of course memory allocation is an OS function, so this isn't "understanding the hardware," but it is a much deeper understanding of computers than not knowing what happens when you create an object.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: