Live data from Hacker News

Two Approaches to Learning Programming: Top-Down and Bottom-Up

programmingforbeginnersbook.com

11–20 of 29 posts

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#11
Then the teacher tells you that most professionals don’t code this way anymore. So you start learning about classes, and instances, and instance variables, and methods, and inheritance, and a whole bunch of other object-oriented programming concepts. Then you try to unlearn the way you originally learned to write code, and learn to write code in the new object-oriented way.

Missing next line: "Then you get a job and your colleague tells you that most professionals don’t code this way anymore.

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#12
post #10

I have thought quite a bit about how useful a course with theoretical and practical elements from silicon atom to HTTP request would be. You start building an AND gate from MOSFETs, an adder from 4000 series ICs, a simple processor on a FPGA, you write Tetris for your simple processor, and then you switch over to a real computer, operating system fundamentals, data structures, algorithms, protocols, ... That is certa…

My intro to EE choose in college was like this. We started with just gates, then built one register, then duplicated that register and eventually had a simple CPU. We could do some math but that's about it. No Tetris.

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#13
I find it mostly depends on your personal motivation. If you somehow are magically motivated to slog through a huge amount of crap that seems meaningless and pointless to everyone else, bottom up is preferable. You'll end up in a better place in the end. But... it only works because you see the meaning and point of investing a large effort before the tangible payoff. Bonus points if you find the slog to be fun in and of itself.

Naturally, a lot of professors and highly talented experts tout this as the only way to go. It worked great for them and they don't see the point of any other path.

But, in my observation, "talent" is usually a false explanation of someone who is highly motivated by something I'm not aware of. Most "talented" people I've known were actually putting in a huge amount of work in the area.

On the other end... if the return on investment isn't clear. If the path to the payoff is branchy, windy and foggy. If you are motivated by results, not process. Top down is a good way to determine if it really is worth the effort. In the meantime, investing some extra effort in finding the payoff and the joy in the process would be wise when taking this approach.

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#14
post #10

I have thought quite a bit about how useful a course with theoretical and practical elements from silicon atom to HTTP request would be. You start building an AND gate from MOSFETs, an adder from 4000 series ICs, a simple processor on a FPGA, you write Tetris for your simple processor, and then you switch over to a real computer, operating system fundamentals, data structures, algorithms, protocols, ... That is certa…

Talk about full-stack development...

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#15

I find it mostly depends on your personal motivation. If you somehow are magically motivated to slog through a huge amount of crap that seems meaningless and pointless to everyone else, bottom up is preferable. You'll end up in a better place in the end. But... it only works because you see the meaning and point of investing a large effort before the tangible payoff. Bonus points if you find the slog to be fun in and…

Bottom up may require a different learning ability. You read something, and you don't have a mental hook to hang it on yet, because you don't have any idea of the overall framework. So you have to be able to leave it hanging in midair for a while, until you learn enough of the higher-level structure to understand how it fits.

I used to be better at that when I was younger...

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#16

What about the approach of Middle Out: where you neither build anything beyond copy and pasting code nor learn why doing comparisons on floats is a deal with the devil? Joking aside, it does seem that a mix of the two is nice. Bottom Up is boring when you just want to get things done and Top Down is magic until you try to leave the playground. The problem arises that each student will have different tolerances of eac…

I'd say a middle out is probably more common. Instead of going for Rails or some other framework, or figuring out what's happening in memory and what the compiler is doing, start with writing code with a high level language. You move on to learning frameworks and CS fundamentals. So you're much closer to the top than the bottom, but you're still starting with some pretty basic stuff.

Anyway, learning without building stuff is very un-fun. I can't imagine trying to learn programming by just reading books for months and months without access to a computer.

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#17

Then the teacher tells you that most professionals don’t code this way anymore. So you start learning about classes, and instances, and instance variables, and methods, and inheritance, and a whole bunch of other object-oriented programming concepts. Then you try to unlearn the way you originally learned to write code, and learn to write code in the new object-oriented way. Missing next line: "Then you get a job and…

Missing next phrase: ", we are still using Java".

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#18
That's an excellent advice and it works because people are motivated and have a tight feedback loop ("is this what I wanted?"). Arguably this is the best way to learn if you follow it with some deeper reading on the subject once you have a working solution to close gaps in your understanding.

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#19
post #2

Most of the engineers I know learned to program via "top-down", as did I (though I'm a designer). Whenever anyone asks me how to get started in programming, I tell them to forget about buying any of those "Dummies Guide" books and instead just pick a problem they're really passionate about and Google anything they need to learn to make the idea happen. Such an approach certainly doesn't teach you a lot of the most im…

I started with a weird mix, but mostly top-down: jumping through a QBasic programming book, picking up basic concepts as necessary to build things that sounded cool (a music player, an Asteroids clone, etc). Programming ended up feeling like a cool toy.

My serious education took a fairly strict bottom-up approach, and it explained roadblocks I'd been running into before, improved my mental model of the machine (and variations between machines), and provided a solid foundation to build on.

My opinion is that top-down is good for passion, bottom-up is good for correctness, and a mix of both is useful. You need passion to put in the necessary practice time. You need a solid foundation to let you build non-trivial software.

Re: Two Approaches to Learning Programming: Top-Down and Bottom-Up

#20
post #10

I have thought quite a bit about how useful a course with theoretical and practical elements from silicon atom to HTTP request would be. You start building an AND gate from MOSFETs, an adder from 4000 series ICs, a simple processor on a FPGA, you write Tetris for your simple processor, and then you switch over to a real computer, operating system fundamentals, data structures, algorithms, protocols, ... That is certa…

This doesn't go quite that far, but takes a generally-similar approach: http://www.nand2tetris.org/
Post reply on HN