In another thread, Paul West wrote:... They have just been introduced to objects--they still get classes and objects confused!
One reason I like JavaFX is that it does have some web-dev features in it (FXML), but the main issue is the support may be dwindling. On the other hand, Swing has so many resources and legacy applications.
Paul West wrote:At my University, the base classes go Procedural Programming (C)-> OOP (JAVA) -> Data Structures(C++), which is (probably) common.
Paul West wrote:One reason I like JavaFX is that it does have some web-dev features in it (FXML)
Paul West wrote:I do not think Java is a good first programming language. OOP is not intuitive until foundational programming syntax/semantics are established (control flow, data types, algebra, function, etc...)
...
In other words, I think Procedural should be taught before OOP as it lays down the groundwork before proceeding to code organization, design, etc...
I think the real problem is that OOP is not intuitive full stop. We see lots of people here writing pure procedural code, and they have completely failed to add objects to that. If it is so easy to add objects after teaching selection and iteration (which are intuitive), why don't we see people writing good OO code here?Paul West wrote:. . . OOP is not intuitive until foundational programming syntax/semantics are established . . .
There are three kinds of actuaries: those who can count, and those who can't.
Campbell Ritchie wrote:If it is so easy to add objects after teaching selection and iteration (which are intuitive), why don't we see people writing good OO code here?
Junilu Lacar wrote:I'm a big fan of refactoring to patterns instead of starting off with a pattern in mind. I'm also a big fan of simplicity, hence, I often make references to the 4 Rules of Simple Design. Patterns evolved out of instances. Someone had a problem, they solved it a certain way. Someone else had a similar problem, and they came up with a similar solution. After a third time, somebody said, "Hey, there's a common theme here..." and then the pattern was given a name, defined, and publicized. It seems logical to me to have students go through that same process of discovery and recognition, rather than telling them, here's what you want to do, and this is the pattern that you want to use to do it. That gives them only the end goal and the solution, leaving out the most important thing, IMO, about patterns: the context in which a problem can be solved by applying a pattern. And I don't buy an argument that says, "Well, the problem is 'How do we achieve this goal?'" It's not, and if you think it is, then I don't think you understand enough about patterns.
Piet Souris wrote:What I'm missing sofar: what kind of students are we talking about?
Is this that book? I have an earlier edition and I wasn't particularly taken by it, though other people liked the newer edition more. See our books pages. I agree that books about refactoring are a long way beyond the reach of the students we are discussing here.Paul West wrote:. . . "The Object-Oriented Thought Process" (TOOTP) . . .
Junilu Lacar wrote:Another thing that bothers me is that there seems to be a general perception that refactoring is too advanced a concept for beginners. I just don't see how hard it can be for a beginner to understand the benefit of doing something like this:
[code]
// Initial code
if (Math.random() < 0.5) {
return "R"
} else {
return "L"
}
// First refactoring: use java.util.Random instead
There are three kinds of actuaries: those who can count, and those who can't.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |