Live data from Hacker News

Should you learn C to “learn how the computer works”?

words.steveklabnik.com

21–30 of 381 posts

Re: Should you learn C to “learn how the computer works”?

#21
post #8

Do you need to learn C to have a successful career in CS or any other field? No. Should you learn it? Yes. Do you need to bake bread to eat it? No. Should you learn to bake it? Yes. There are lots of things you should learn to do because they're useful and teach you about how the world works. The miracle of society is that you don't have to learn most of them to enjoy using them.

That bread analogy is on point. The old quote comes to mind,

>A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyse a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. -- Robert Heinlein

Re: Should you learn C to “learn how the computer works”?

#23
post #15

Coming from an operating system background, I find the article's use of "virtual machine" very bizarre. The article confuses very different things by stating that "'runtime', 'virtual machine' and 'abstract machine' are different words for the same fundamental thing".

What does "virtual machine" mean to you? I have some guesses, but I don't want to spoil it by suggesting some.

I think that these terms are some of the most confusing our discipline has.

Re: Should you learn C to “learn how the computer works”?

#24
post #15

Coming from an operating system background, I find the article's use of "virtual machine" very bizarre. The article confuses very different things by stating that "'runtime', 'virtual machine' and 'abstract machine' are different words for the same fundamental thing".

How do you feel about the "Java Virtual Machine" then?

Re: Should you learn C to “learn how the computer works”?

#25

I learned assembly language before c which I suspect helped understand pointers. There are plenty of fun ways to learn assembly language. The game Shenzhen IO is one.

I started with MASM because C cost money. By that I mean "Visual C++", and of course 12 year old me had no idea about GNU. I think I got through the MASM tutorials to the point of interacting with the Win32 api before finally figuring out I was doing it wrong.

Re: Should you learn C to “learn how the computer works”?

#26
One of my favorite classes in college was Computer Architecture 1 and 2, which encompassed logic gates, Boolean logic, and progressed to assembly language usage. C was covered in other classes and was a natural next step from Architecture. I credit those classes a ton for my lower level knowledge.

Re: Should you learn C to “learn how the computer works”?

#27
post #22

If you really want to know "How the computer works" read Computer Organization And Design by Patterson and Hennessy. It is a great example of how to use the C language as a teaching tool.

This book is fantastic, for sure.

Learning assembly and/or microarchitecture is another great way to get "knowing how the computer works," and is part of what I was hinting at at the end of the post when I said that C isn't fundamental here.

Re: Should you learn C to “learn how the computer works”?

#28

I learned assembly language before c which I suspect helped understand pointers. There are plenty of fun ways to learn assembly language. The game Shenzhen IO is one.

I definitely found that C made more sense to me on my second attempt at it, after I'd done some assembly language programming. (But then I also had the advantage of another year or so of experience and a much better suited computer for C the second time around.)

Re: Should you learn C to “learn how the computer works”?

#29
post #24
post #15

Coming from an operating system background, I find the article's use of "virtual machine" very bizarre. The article confuses very different things by stating that "'runtime', 'virtual machine' and 'abstract machine' are different words for the same fundamental thing".

How do you feel about the "Java Virtual Machine" then?

Or LLVM, the Low Level Virtual Machine?

Re: Should you learn C to “learn how the computer works”?

#30
post #15

Coming from an operating system background, I find the article's use of "virtual machine" very bizarre. The article confuses very different things by stating that "'runtime', 'virtual machine' and 'abstract machine' are different words for the same fundamental thing".

What does "virtual machine" mean to you? I have some guesses, but I don't want to spoil it by suggesting some. I think that these terms are some of the most confusing our discipline has.

"global" and "static" are pretty overloaded terms. In LLVM, for example, Global Value Numbering has nothing to do with global values. "const[ant]" is also pretty bad, but that's more because there's several slightly different notions where the distinctions between them are pretty important.
Post reply on HN