Re: Programming languages for the very young
From: Darin Johnson (darin__at__usa_._net)
Date: 01/28/04
- Next message: John Doty: "Re: Programming languages for the very young"
- Previous message: Ray Dillinger: "Re: Programming languages for the very young"
- In reply to: Ray Dillinger: "Re: Programming languages for the very young"
- Next in thread: Michael D. Ober: "Re: Programming languages for the very young"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Jan 2004 21:30:13 GMT
Ray Dillinger <bear@sonic.net> writes:
> Would you say that using machine code directly teaches poor programming
> practices? It has most of the same problems as BASIC: it does not force
> anyone to use any structure, has no enforcement of any particular style,
> and lends itself even more easily than BASIC to egregiously hacky things
> like punning on the bit patterns of constants and/or instructions.
Most people learn a higher level programming first, then start with
assembler later. So it's usually not a problem.
However, I did have a boss once who had learned IBM mainframe
assembler as his first and only language for ages. Then he learned
from a "learn C in X days" book. His code was by far the most
atrocious I'd ever seen (such as using strncmp to compare two
characters).
> It
> has goto, and conditional goto, but no such thing as, say, subroutine
> abstraction.
Once you learn about high level programming languages, the subroutine
abstraction is easy to create in assembler. It's not built in, but
knowing to create a proper frame and use the stack for arguments and
temporaries results in much cleaner and more maintainable code than
the person who uses globals or registers for everything.
Which brings up the facet of programming that should be emphasized the
most: maintenance. Almost all programmers spend almost all of their
programming time in maintenance. Ie, fixing up and modifying old
programs. Very often (most of the time?) this includes programs
written by other people. Even throw away use-once programs often get
recycled and develop a life of their own. Thus, being able to write
maintainable programs is an invaluable skill, while writing
unmaintainable messes is an anti-social trait.
> I would say that the unstructuredness of machine code teaches people the
> value of consciously imposing plan, structure, and design on a program
> rather than relying on the language to do it for them, and thus makes
> them *better* programmers.
But do such people learn to program in machine code _first_ and
magically develop higher level plans and structures, or do they borrow
those ideas from languages they learned elsewhere? With a good
teacher, perhaps I could see this skill forming in a person who knew
nothing but assembler, but on their own I doubt any good programming
skills will develop in a vacuum.
> And while I agree that BASIC is sort of an annoying and pathetically limited
> language, I don't see a qualitative difference in what it teaches.
Perhaps what makes the qualitative difference is that most people
learn on their own, with minimal helps perhaps from a harried teacher
or poorly written textbook. Thus the language that encourages good
style while writing small beginner programs will tend to naturally
create better programmers in the long run.
--
Darin Johnson
Laziness is the father of invention
- Next message: John Doty: "Re: Programming languages for the very young"
- Previous message: Ray Dillinger: "Re: Programming languages for the very young"
- In reply to: Ray Dillinger: "Re: Programming languages for the very young"
- Next in thread: Michael D. Ober: "Re: Programming languages for the very young"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|