r/programming • • Feb 23 '12

Don't Distract New Programmers with OOP

http://prog21.dadgum.com/93.html
207 Upvotes

288 comments sorted by

View all comments

Show parent comments

1

u/glutuk Feb 28 '12

when i was taught java, our instructor said main is the function that starts your program, and we only worked in the main function

after a week or 2 we learned functions, but only knew how to put in static ones that could call from main

after about a month or two of learning basics + doing projects he assigned, he taught us OO but many of us had already caught on to what all the "template" code was

so just because youre in java doesn't mean youre student needs to know how every part works. That's like saying you can't have highschool physics without knowing calculus.

1

u/[deleted] Feb 28 '12

It's true that you can learn it with Java, clearly, otherwise most universities would be failing to produce any programmers, which is obviously not the case. What I'm saying is you shouldn't introduce that stuff immediately, when you can defer it. Also, although I said that universities are producing programmers, it seems that most programmers do think about things the wrong way... there's an awful lot of magical thinking and cargo cultism in our field. I can't say it's caused by this style of teaching, but I hypothesise that it doesn't help.

And I don't think your analogy applies. The reason I suggest a simple language like Python is because it's a nice, simple, fairly well contained abstraction over everything else that's going on in your computer. I'm not suggesting that you start by learning how electrons work. When you learn basic high school physics such as Newton's laws of motion, they are presented as simple formulas that allow you to solve real life problems just by plugging numbers in or rearranging. In my school, calculus was actually then taught by using it to derive the simplified laws of motion that we had been taught earlier. Basically, new tools were introduced at the same time as being taught how to use them and why you'd want to use them, which is what I'm suggesting.

It's worth noting that a lot of university education doesn't have a great deal of oversight, and consequently teaching methods used at uni are often worse than those used in school. I think the fact that students are older and able to self teach to an extent is meant to make up for that, but I don't think that's a reason not to consider how to make teaching better (even if no-one will ultimately listen...)