Re: Structured Coding
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Mon, 13 Feb 2006 13:03:05 -0700
Pete Dashwood<dashwood@xxxxxxxxxxxxxx> 02/10/06 6:37 PM >>>
It is amazing the diversity of ways in which people learn. (I did an adult
teaching course last year - that's a course for teaching adults - and was
very fascinated by the perceptual and psychological interactions that occur
when we learn something. There is no "one size fits all". Some people are
more visual, some are more conceptual, some are more language oriented. All
of us are different, and a good teacher will include material in his course
that appeals to all types.programming
Unlike you, Frank, I AM convinced that OO is a good way to learn
as a first language. (That doesn't mean I think you are "wrong" - your
statement is certainly true for many people.)
I had major problems struggling with OO COBOL when it was first released. I
spent three months trying to get my head around the new concepts and
suffered from exactly what you outlined above - a lifetime of procedural
COBOL.
In the end, in despair, I thought: "Fuck it. Maybe I'll just learn Java..."
So I invested in a couple of Java books (the best was "Java 2 in 24 Hours"
by Rogers Cadenhead - possibly one of the best books on learning a
programming language ever written; light hearted, witty, amusing,
entertaining, and VERY useful), and tried to clear my mind of everything I
knew and approach it as something not seen before, without makingjudgements
based on other experience. Within 3 days I was hooked. It was so obvious.
Simple, elegant, and fun. By the time I had my first Java programs and
applets running, my mind was racing ahead exploring the implications of
this new freedom. I went back to OO COBOL and saw it in a new light. The
concepts I had previously struggled with were now an open book and
everything fell into place. I started writing components...
Later I had to run some courses in Java Web programming (servlets) and
JavaScript (for client). I found the "computer programmers (COBOL)" had the
hardest time and were the last to pick it up. The people who had never
programmed in their life took to it like ducks to water.
I think that once we become competent in COBOL (for instance) it is very
easy to believe that is THE way to do things. To succeed with OO you should
clear your mind, or at least agree with yourself to suspend criticism or
evaluation until you have written some samples and got them working. And
learn OO by means of a language that was OO from its inception, designed to
be OO, not having had a bolt on of Object handling to make it "socially
acceptable", even if (as in the case of COBOL) that bolt on is superbly and
cleverly engineered.
I recommend Java because it meets those criteria.
Actually, I only said that because I don't know anyone who learned OO first,
so I had no data that would allow me to state that OO programming languages
are good first languages to learn. But you appear to have experience with
other people, if not yourself, learning an OO language first, and finding it
"simple" (well, as simple as any programming paradigm might be), so you can
state that, and I can as well if I use you as a reference <g>.
Anyway, don't take my message as saying that I am not a fan of OO. I am
definitely a fan. I am constantly going crazy using procedural COBOL
because I know that so many of the things I have to do could be done so much
simpler with an OO language. All I was getting at, and you apparently
agree, is that in order to learn OO you have to leave a lot of your
procedural thinking behind. It's often hard.
I have a general question... With COBOL, if you add a new field to a group
that is passed between programs (program to sub-program, etc) you pretty
much have to recompile any programs that use that group in order for things
to not break. You don't have to do that with Java because the "group" is a
class, essentially, and when you instantiate the class it creates the new
object based on the current version of the class -- basically the class
itself has control over it's own instantiation. As long as the
instantiating class does not attempt to access class variables directly then
it doesn't matter if the changed class is larger, smaller, has variables
moved around in memory, etc.
So the question, is, can this type of behavior be somehow simulated in a
procedural (non-OO) language? Seems to me not very easily. Perhaps you
could get your procedural code to "act" as if it's OO, but I'm sure that
wouldn't be worth it.
Sorry if that question didn't really make sense. I'm having a hard time
phrasing it. Anyway...
Frank
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
.
- Follow-Ups:
- Re: Structured Coding
- From: Michael Wojcik
- Re: Structured Coding
- From: Pete Dashwood
- Re: Structured Coding
- References:
- Structured Coding
- From: apple.time@xxxxxxxxx
- Re: Structured Coding
- From: Frank Swarbrick
- Re: Structured Coding
- From: Michael Wojcik
- Re: Structured Coding
- From: Frank Swarbrick
- Re: Structured Coding
- From: Pete Dashwood
- Structured Coding
- Prev by Date: Urgent Requirement of CoolGen Programmer for Louisville, KY
- Next by Date: Re: Structured Coding
- Previous by thread: Re: Structured Coding
- Next by thread: Re: Structured Coding
- Index(es):
Relevant Pages
|