• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Opinions wanted: better to start with structured constructs, or object concepts?

 
author
Posts: 24
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey everyone,

I am really enjoying participating in this forum and I appreciate all of the questions.

One topic that I would be really interested in getting some feedback on is this: when teaching Java programming to new students, is it better to start with the structured constructs like loops, conditions, etc, or the object concepts like classes, objects, methods, etc.

This has been of great interested to me since I transitioned from 20 years of professional programming in C, C++, Java , etc to teaching at the college level.

Thanks,

Matt
 
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matt,

I feel the first more than a handful sessions should be on object concepts and on what constitutes a state and what constitutes a behavior. I started leaning java in September last year and I wish our instructor had included some more sessions on how to identify what should be a class and what should be a method. Because there weren't enough sessions on that and I didn't study and practice on the subject more, I take so much time in deciding what should be a class and what should be a method while working on my assignments. Once I've figured what should be a class, I have issues in figuring what data types should be used.. and the list doesn't end there.

I strongly feel that if it is going to be java, we'd better learn to also think in the object oriented way. Sooner the better. So I'd say object concepts.

Regards,
Chan.

 
Matt Weisfeld
author
Posts: 24
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chan,

I agree. Introducing OO concepts early on is essential - specifically what classes and objects are, etc.

As I do Java training I realize that many people are under the impression that structured and object-oriented programming were mutually exclusive. I don't agree with that. I contend that structured programming techniques are actually encapsulated with object-oriented design. Thus, they work together. I tend to introduce both structured and OO concepts early.

Thanks,

Matt
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Matt Weisfeld wrote:I contend that structured programming techniques are actually encapsulated with object-oriented design. Thus, they work together.



Heh. As someone who "grew up" with structured programming, I agree with you. But these kids these days...
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matt,

As Chan echoed, I also feel that it's important to students to learn the concepts behind OO. That understanding is more important than learning structured constructs such as loops, conditionals etc.
OO concepts, are relatively difficult to Sink in and they could be dealt with first. Once students understand classes, objects etc. they may be well on their way to write pseudo code in place of real "loops" etc.
The pseudo code can be easily filled out with the required syntax. To me, creating well defined classes and coming up with an OO Algorithm to solve a problem is important than raw syntax.

Along those lines, in one of the Javascript talks in google, the speaker first covered the fundamental concepts in Javascript -- functions, dynamic typing etc -- before going deep in to
other aspects like loops, conditionals etc. It was a nice.

Thanks
G Sunderam
 
Matt Weisfeld
author
Posts: 24
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The really interesting thing for me when I started training/teaching Java and OO concepts in the late '90s was that I realized that many people were under the impression that structured and object-oriented programming were mutually exclusive. As I have discussed, I don't agree with that. I contend that structured programming techniques are actually encapsulated with object-oriented design. Thus, they work together. When I am teaching college students, some like to get right into writing code and then honing the concepts later. Others like learning the concepts first. It is obvious to me that there is really no absolutely correct answer - but I keep looking!
 
Chan Ag
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matt,

Yes, both the paradigms must have common stuff. I feel our thought process is mostly a mix of both the approaches and that solutions and implementations are merely thought process converted into source language instructions.

When I analyze my way of looking at things/arriving at a solution, it seems that I consciously try to think in terms of classes and objects initially but as complexity grows, my mind starts to think in terms of method steps. I forget that there is an abstraction technique that can simplify things for me. For me 'more' structured thinking is implicit while 'more' object oriented thinking requires a conscious effort. But may be it varies from person to person depending on how their thought process has evolved over time. As for me, we had C programming in our curriculum few years back. Thus may be more structured thinking is implicit for me.

I understand why you'd say no one approach is the best approach. But with either approach if I was the student, I'd request my instructor to give me enough sessions on how to break a problem statement into smaller pieces and how to design components before working on method implementations.

Regards,
Chan.

 
Matt Weisfeld
author
Posts: 24
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I strongly believe that there is no single, right way to approach most anything - things are always evolving fast in this business. So I like to take what I consider the 'best practices' of many approaches and try to come up with a process that makes sense. I know that this is really difficult and everyone's 'best practices' may be different but when things change so fast, I don't see an alternative.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm one of those guys who came from structured into Object Oriented, and that way just seems right to me. I used to program in Basic as a kid, then started programming as a profession in Visual C++ until I moved to Java around 2000. IMO, even when I was doing BASIC, I realized that being able to break a problem into steps is a skill that needs to be learnt. It takes some time to realize that the computer is really a lot lot dumber than you think it is, and you really need to go step... by....step. Going over to OO world, you have to start thinking about abstracting out concepts. However, the meta-skill that you develop in breaking down the problem while you do structured programming, is very useful skill to have when you start designing objects.

IMO, going straight to abstracting out concepts is too big of a jump for young developers. You need to learn how to walk before you run. I mean, think of how we teach maths to kids. We teach them basic arithmetic before we go to algebra, and algebra before we go to calculus. The reason this is done is because the higher you go into math, the more abstract the concepts become. It's difficult for the brain to wrap itself around the abstract if the corresponding concrete concept has not taken root in the mind. If you go straight to the abstract, your brain will basically fly loop-de-loops around the concept.

IMO, thinking in a structured manner is a lot like doing arithmetic, and OO is a lot like algebra. Being able to do arithmetic is a prerequisite for learning algebra, "Arithmetic techniques are encapsulated inside algebraic" in a very similar fashion (as you said) to "tructured programming techniques are actually encapsulated with object-oriented design"
 
Matt Weisfeld
author
Posts: 24
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I came from structured programming as well - even started in Cobol and Assembler, then C.

I took a Smalltalk class in the mid-90's (I think) and the instructor said that about 20% of structured programmers (even the really good ones) would never really get (or perhaps, embrace) object-oriented development. I always wondered if this was actually true over the long haul.
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also started with structured programming (FORTRAN, of all things). I took a Java class to get me started with Java and the instructor focused very heavily on structured constructs. It could have been a FORTRAN class. I would have preferred that he had begun at the conceptual level and worked toward the specifics of the language. Taking a page from your book, I'd have liked to have first gotten into an object-oriented state of mind (thought process), then learned Java. Which wasn't exactly your question. I am thinking you need the object concepts to think O-O more than you need the structured constructs. On the other hand, programming needs to be something you do. So if students couldn't implement the concepts, I don't think the concepts would stick.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Matt Weisfeld wrote:I contend that structured programming techniques are actually encapsulated with object-oriented design. Thus, they work together. I tend to introduce both structured and OO concepts early.



I agree. My learning path was from structured programming to OO programming and now a little bit of functional programming. I think it's important to help students understand that these are all just different ways of solving a problem and organizing a solution. I'm currently learning Python and the ability to mix OO and functional programming seemed a little "icky" to me at first but I'm slowly getting over that feeling because after all, if the program works and it's still easy to follow, then there really is no big problem. So what if it's not purely OO or purely functional? That being said, it seems like many people find it difficult to switch from one paradigm to another and mixing paradigms can create some confusion and possibly bad habits with novice programmers.
 
reply
    Bookmark Topic Watch Topic
  • New Topic