On 5/12/2012 9:36 PM, Tesseract wrote:
> "Prof. Godel Fishbreath" <
seanearly...@hotmail.com>
> was almost talking to himself on google groups because it is not getting
> out to the wide world (AGAIN!) (try eternal-september)
>
>> Well, I was a programmer for a few decades.
>> Fortran, assembly, C, Enough C++ to recognize the thought pattern
>> when
>> I found it in assembly.
>> It has been a decade without a programming job, and without
>> substantial programming.
>> I want to reboot, restart, re-learn.
>> Starting with the basic fun of programming, create a game whose
>> overall plan was abandoned like a blocked novel the time I tried to
>> use it to learn Modula-2, when that was fresh and new.
>> And I will learn Python. Some of the books on that language say that
>> they will teach good programming. Well, they at least give hints.
YOu need to learn two things *in parallel*.
The first is a language. Take your pick of Java, Ruby, or Python. If I
were starting now, I'd probably choose Ruby (and learn Rails as soon as
I had the basics of Ruby down).
The second is object-oriented programming. Start with the Wikipedia
article, then follow the link "What is OOP"
Also read the OOP COncepts link, even though it talks about Java. Java
is what C++ should have been -- a pure, OO language, where C++ still has
pointers and leaves you thinking about memory allocation. In Java, you
don't think about that at all. Objects come into being when you "new"
them, and stick around until they are no longer needed. Then they get
garbage collected.
One reason I prefer Java to (e.g.) Python is that it uses dynamic typing
(figures out what type something is at the moment it is used). For
serious programming I prefer a strongly typed language like C, C++, or Java.
But languages with run-time types (like PHP, Ruby, Python) are easier to
learn, so there's something to be said for those. And having to start a
Java Virtual Machine every time you want to run a Java program
introduces a noticeable delay. Compare the time to run a Java applet in
your browser with the same algorithm written in ECMA-script (aka JScript
aka JavaScript).
Btw, most of the jobs I see advertised want LAMP: Linux/Apache/MySQL/PHP.
Now, while you're learning to use your chosen language effectively, you
also need to learn the _real_ parts of OO. Not just what an object is
and how to create and use one, but additional stuff that makes up the
heart of OOD & OOP. SO read the Wikipedia article on Software Design
Patterns and also the one on anti-patterns. And again, try following
some of the links from the "External Links" section.
If you want to be an effective OO programmer, you need to be fluent in
at least the following patterns:
Creational:
Factory
Abstract Factory
Factory Method
Singleton/Multiton
Structural:
Adapter
Bridge
Decorator
Facade
Flyweight
Proxy
Behavorial:
Command
Iterator
Strategy
If you are going to do operating system type work or anything else that
requires parallelism, you also need the concurrency patterns Balking,
Lock, Monitor Object, Scheduler. For web programming (the vast majority
of what I do), none of that matters, and the biggest thing is the
creational patterns and DAO (Data Access Object).
You can probably learn PHP from the online manual. To learn Java, I
would strongly recommend a book. I favor Dietel and Dietel, Java: How to
Program. Or the "tiger book" (has a tiger on the cover) titled simply
Java, from Oreilly.com
Since about 1990, whenever I've wanted to learn a language, i've found
the O'Reilly book with the name of the language as its title the best
thing around. I keep their PHP and Cascading Style Sheets books on a
shelf within arms reach of my keyboard. If I were still doing serious
Java work, I'd keep my Java books there too.
Also, when working with Java, keep a bookmark to the Sun Java references
in your browser:
http://docs.oracle.com/javase/6/docs/api/overview-summary.html
and
http://docs.oracle.com/javaee/1.4/api/overview-summary.html
I have the online PHP manual directly right on my bookmarks bar:
http://www.php.net/manual/en/index.php
But I don't recommend PHP if you are just learning OOP, because as I
said it's too easy to fall into old habits.
But note: nowadays I do most of my programming in PHP. PHP is easy to
learn. The disadvantage is that it doesn't enforce OO on you... it's
very easy to fall into bad habits -- using functions instead of objects,
passing function names as parameters instead of passing an object that
has the desired function as a method, etc. So even if you choose PHP,
you should learn OO in parallel.