Live data from Hacker News

Poor, Poor Child. You have no idea.

writing.bryanwoods4e.com

31–40 of 75 posts

Re: Poor, Poor Child. You have no idea.

#31
What is math? There are many answers, so the one I pick for this post is that math consists of starting with some basic axioms, chosen to be as simple as possible, then rigorously exploring what else you can extract from your simple axioms by concrete proofs. It is staggering what you can get from simple axioms. It is staggering the subtly with which they can interact.

What is programming? It is the art of starting with very simple primitives, then rigorously building up slightly more complicated primitives, then building another layer on top of that, until eventually you get to a level where you can do actual work. It is staggering how far we get on how few primitives; it is incredibly educational to read what opcodes a processor actually implements. (Even better, make sure you read just the modern subset.) I mean, it pretty much just has "move this here", "add this", "multiply this", "divide this", and "if this thingy is 0 jump there". Yes, I know there's a few more, but the point is that it definitely doesn't have an opcode that downloads a webpage. It is staggering the subtle ways in which these things can interact.

It is absolutely possible in both the mathematical and programming cases to do "real work" without having the understanding of things that I refer to in my previous paragraphs. A web programmer does not constantly sit and do logic proofs, an accountant does not constantly refer to number theory throughout their day. Of course this is fine for the accountant, who is not expected to do original work in the field of accounting. (It is rather discouraged, in fact.) So of course it's OK for an accountant to have a very tool-like understanding of numbers. Are you, the programmer, expected to do no original work in the field of computing, such that you don't need to understand computing deeply? It may be so. Such jobs exist. But watch out, that means you're one library acquisition away from not having a job anymore! (And if you can't be replaced by a library, you're doing original work of some kind. Most programmers are.)

Look back at my first two paragraphs, where I have obviously drawn parallels. The real value of mathematics for a programmer is not that the programmer is likely to be sitting there doing matrices all day long, or even worrying much about logic problems, and they certainly aren't going to be sitting around all day doing sums. What mathematics provides is a clean place to learn the relationships I talk about, how we build the large concepts from the small concepts, and provides a playground where you can have that famous all-but-100% certainty that mathematicians like to go on about (justifiably so).

This is great practice for programming anything beyond a trivial project, where, if you have a clue, you will probably be starting with building up some reliable primitives, and then trying to build bigger things out of them. Bad programmers just start slopping concepts together with glue and just pour on more glue when they get in trouble, and produce what can only be described as, well, big piles of glue with no underlying order. A programmer who has become skilled in mathematics has at least a chance of producing something that is not merely a big pile of glue, and can have characteristics in their program that are characteristics that a big pile of glue can't have.

It is possible to come to this understanding without passing through formal mathematics, but it is much harder, because the world of programming is ultimately the world of engineering, and it is much harder to see these patterns. They are there, but they are obscured by the dirtyness of the real world.

That the mathematics may have an independent use is gravy; even if they were somehow otherwise worthless but programming was somehow unchanged (not really possible, but go with me here for the sake of argument) it would still be a worthwhile study. There are few better ways a programmer can spend their time than to become familiar with mathematics. Without the understanding of programming I outline above, regardless of which path you take to get there, your skillset will plateau, the maximum size or complexity of a system you can build without it coming apart will top out noticeably sooner than those who do have this understanding, and there will be things that remain forever a mystery to you. (Like how those large programs really work.)

Re: Poor, Poor Child. You have no idea.

#32
Look, I'm sorry to be the one to break this to you, but if you have difficulty with any programming concept, you must not be a supergenius. You're just an ordinary genius at best. I'm sorry. Life isn't always fair.

Of course, I say this as someone who hasn't yet tried to learn Haskell. On the other hand, I know someone who competes at the national level and I never saw him have trouble with anything including Haskell, so...

The sad truth is that there are some people for whom programming comes as naturally as thinking, with code formed as easily as thoughts; and if it takes an effort to understand any aspect of programming, you have just learned that you are not one of those people. Alas.

Re: Poor, Poor Child. You have no idea.

#33

What about game programming? Nobody mentioned it. It's the ultimate test. Try to hack together a simple pool game. You'll be amazed of how much maths and physics go into a simple game that millions use and enjoy.

Let me quote a co-author of Quake:

'At this point in the book, I was originally going to present a BSP-based renderer, to complement the BSP compiler I presented in the previous chapter. What changed my plans was the considerable amount of mail about 3-D math that I’ve gotten in recent months. In every case, the writer has bemoaned his/her lack of expertise with 3-D math, and has asked what books about 3-D math I’d recommend, and how else he/she could learn more.

That’s a commendable attitude, but the truth is, there’s not all that much to 3-D math, at least not when it comes to the sort of polygon-based, realtime 3-D that’s done on PCs. You really need only two basic math tools beyond simple arithmetic: dot products and cross products, and really mostly just the former. My friend Chris Hecker points out that this is an oversimplification; he notes that lots more math-related stuff, like BSP trees, graphs, discrete math for edge stepping, and affine and perspective texture mappings, goes into a production-quality game. While that’s surely true, dot and cross products, together with matrix math and perspective projection, constitute the bulk of what most people are asking about when they inquire about “3-D math,” and, as we’ll see, are key tools for a lot of useful 3-D operations.'

(Michael Abrash, "Graphics Programming Black Book Special Edition")

Re: Poor, Poor Child. You have no idea.

#34
post #32

Look, I'm sorry to be the one to break this to you, but if you have difficulty with any programming concept, you must not be a supergenius. You're just an ordinary genius at best. I'm sorry. Life isn't always fair. Of course, I say this as someone who hasn't yet tried to learn Haskell. On the other hand, I know someone who competes at the national level and I never saw him have trouble with anything including Haskell…

[deleted]

Re: Poor, Poor Child. You have no idea.

#35
post #18

Earlier quoted context omitted.

Not much math. Some simple physics like velocity and momentum transfer that you can learn in a tutorial (in a day). I think it is important to make the distinction between game development (lots of simple math and complex "pluggable" formulas) and game engine development (yes, you need to understand linear algebra,trig, and perhaps calculus).

No, game development includes 'game engine development' - the majority of companies write their own engine or have heavily modified a licensed engine. And you often need to understand quite a bit of math to use even off the shelf engines - to debug issues and to tweak stuff. Perhaps you're referring to what industry folk call gameplay programming? There's a lot less hardcore math there - but you still typically need…

Most of the time working with a game engine does not involve inventing any new mathematics, so there is an upper bound on just how hardcore it can really get :)

Re: Poor, Poor Child. You have no idea.

#36
post #10
post #2

Well, I'm sorry to say I strongly disagree with the mathematics part. Basis in linera algebra are a definitive plus and helped me approach programming in a sensible way.

I think it really depends on what you want to make. How does math help you make a CRUD application, for example?

Increased fluid intelligence and short-term memory when working with a deterministic problem. (I think I got the buzz-words right).

Re: Poor, Poor Child. You have no idea.

#37

While there are clearly differences between languages, I think it is rather deterministic to put that much weight on the first language? My first language was GW Basic. By your logic, there wouldn't be much hope for me I guess..

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - Edsger Wybe Dijkstra

Re: Poor, Poor Child. You have no idea.

#38
post #11
post #8

Earlier quoted context omitted.

Hard and fun are not mutually exclusive.

Absolutely, but there is fun-hard and there is hard-work-discouraging-hard and this article seemed to me to be talking more about the latter. In fact I'd say that non-hard programming usually gets not-so-fun (although it still has it's charms)

No, really, sometimes it's "hard-work-discouraging-hard". I don't know anyone who thinks it's fun to pour through strace or tcpdump output trying to figure out obscure bugs at the OS or network layers. I've known a couple people who liked looking at generated assembly to debug compiler issues, but they are a rare breed. Race conditions or 1 in a million bugs really suck. Trying to debug any of these things while your company hemorrhages money or the phones are ringing off the hook with pissed-off customers; any "fun" you're having is just the adrenalin trying to keep you from being eaten by a tiger.

Working on hard problems, of your choosing, on your own schedule, can be fun and rewarding. But the reality is, you're not always going to get that.

Re: Poor, Poor Child. You have no idea.

#39
post #37

While there are clearly differences between languages, I think it is rather deterministic to put that much weight on the first language? My first language was GW Basic. By your logic, there wouldn't be much hope for me I guess..

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - Edsger Wybe Dijkstra

It is always amazing to me how much of a mix Dijkstra was. Many of the hand-written articles of his I read are filled with valuable insights, and are absolutely worth the read. And then there's those other sets of comments (like this one) that make me want to pay no attention to anything he had to say.

Of course, this is the guy who said "Computer Science is no more about computers than astronomy is about telescopes." And while I believe I understand his point he was trying to make, I have much higher respect for a person who still likes to get their hands dirty (still actually spends significant time programming computers) rather than just dealing with abstract theory, algorithms, analysis, etc. Yes, I know that Dijkstra knew how to program (and did so, extensively, especially earlier in his career). But this is the guy who never owned his own computer -- even after personal computers became commonplace. That, coupled with the above comment about BASIC (and other comments I've read from him like it) make him come across as kind of an elitist -- like programming is beneath him or something.

Perhaps my take is wrong, and it very well could be. But I will say this. If Dijkstra was still alive and well, and you put him, Guy Steele, and Don Knuth in a room and asked me to pick two of the three to spend the day with, Dijkstra would be the one left out in the cold.

Re: Poor, Poor Child. You have no idea.

#40

My first experiences with programming must have been very different than his, with respect to the first section in particular. I always knew that programming was supposed to be hard - I grew up knowing no programmers, teaching myself the esoteric art of C++ from a copy of "Sams Teach Yourself Visual C++ 6 in 21 Days". So when I understood it reasonably well, I felt I must be above average. Indeed, I've never felt the…

Seriously dude....
Post reply on HN