3 ms·
Exactly this. The image of the lone hacker sitting down and pouring out a bunch of code straight from his brain is a romantic one, but if you haven't spent a li
by jff 16y ago
Exactly this. The image of the lone hacker sitting down and pouring out a bunch of code straight from his brain is a romantic one, but if you haven't spent a little time deciding what your data structures are going to look like and how you're going to pass stuff around, etc., your code will be crap. "Just coding it" leads to both frustration as you sit wondering what you should be writing and why programming is so hard, and poor code. The poor code comes in when you start throwing in stuff like one-use elements in your structs to keep track of something you hadn't forseen, when a little bit of planning could have alleviated that.
I'm certainly not saying you should go write up a design document complete with UML and everything. That would be ridiculous, damn it I'm an engineer not a bureaucrat! Just sit down and think (on paper) about how some of the important stuff needs to look. It'll help a lot.
As for the second point, C++ does seem like a weird place to start. Go learn assembly or C. Learning to write assembly is a process of continually solving tiny programming puzzles, as you figure out how to hand-roll a loop and such.