Fog Creek Software
Discussion Board

Recommendations for learning programming

Well, I’ve been designing software and managing software development for a number of years now, but have only tinkered around the edges of actual coding.  I know HTML and am a fair Perl hack.  I know just enough Python and Java to read some code and have a rough idea of what it’s doing.  I understand software architecture, UI design, and can often figure out how to solve a problem on a “psuedo-code” level. “First do this, then that, and test for that, etc.”

But I want to start writing code, on a serious basis, and need some advice on where to start.  I’ve received a lot of conflicting advice.  “Learn Python because it’s easy to learn … Java is the future… You can make money now if you learn VB … Real geeks learn C++ …”

I’m looking for a good language to really dive into and get to know.  Ideally, it would have some marketability in the real world.  And ideally, it would share a lot of concepts with other languages.  The problem I had with learning Perl was that it’s so freeform, that when I tried to generalize that knowledge to another language, it was like starting over.

I’m very good at teaching myself how to do things, and I have to be able to learn this just from books and on-line resources.  Taking a class is out of the question right now.  In addition to any freely available tools, I have access to Visual Studio, so tools aren’t my limiting factor right now.

So I’d appreciate any suggestions on languages for learning programming.  Any books or on-line resources would be great too.  Also, if there are any “must-read” theory books, please share that with me as well.

Thanks for your help.


Bob Crosley
Wednesday, November 28, 2001

Just do it. Ok, Nike may not like me for that one, but it's true.

I think many would agree with me when I say that you learn best by doing. That's why there's i.e. lab courses, CS courses with computers, etc.

If you have a fair grasp of java, at least the structure, then you have the basic concepts of programming already down. From recent personal experiances I can tell you that most people have many more problems with the conceptual end and design far more than implementation and syntax.

Keep in mind that you already know the basic syntax for a good many programming languages: If you can read Java, you'll see the immediate similarity to C++, for example.

So, you know a lot already. Now start coding.

Borrow a book from one of your programmers, and write some code.

You also have a great resource: your programmers. From your post I'm assuming you already have people under you writing code in a language you are familiar with. There is no more valuable resource than people.

You made a comment regarding perl concepts not carrying over: That may be the case, but you know what an 'if' or a 'while' does, etc. which gives you the important knowledge. The rest is just details.

As for language choice, don't ask us, ask yourself. Learn anything, once you have learned your first one, with enough dedication you can pick up another one in a week, and learn it very well inside a month.  I'd suggest you learn whatever is easiest: What your friends know, etc. For most beginners I'd not suggest as complex a language as C++, but on the other hand, if that's all your friends are familiar with, it might be more difficult than learning a langage for which you'd be all on your own.

Mike Swieton
Wednesday, November 28, 2001

My advice is ... learn them all .. if you can.  But at the risk of starting a religious war, I'd recommend starting with Java.

Java is simple, nice, clean, popular, reasonably fast, mature, portable, garbage collected, well supported, has a well-thought out class library and you can do a lot with it.  Java is not, however, perfect for all jobs.  It's not as popular or as fast as C++, but it's nowhere near the kludge C++ is either.  Perl has far better string and file handling.  Delphi lets you design better GUIs.  CLOS has features like lexical closures which are very sexy to CS grads and no one else.  C# has better bindings to Microsoft technologies.  VB can bang out deployable apps faster and so simple that even trained monkies could use it.  All of these have INDIVIDUAL features which surpass Java's deficiencies.  But as an all-around general purpose language, and a first real OO language, Java really excels. 

Wednesday, November 28, 2001

You are in a unique position.  You know enough about programming to know it's just about turning concepts into syntax. 

Well, I will second Java.  Not really because of the hype.  Mainly because the quality of the documentation is high.  A secondary but also valuable facet is that Sun tries very hard to make Java into the be-all end-all of computing.  Therefore there are a lot of things you can learn without leaving the language. 

Here is what I think will get you started well.

- The Java Class Libraries, Second Edition, Volume 1
- The Java Class Libraries, Second Edition, Volume 2
These will be the best explanation of concepts you will face in Java.  Well worth the price, but keep in mind they are quite dated.  Everything you code will still work fine, but Java has gone on to more 'pure' things.  Still, this is where you can learn the fundamentals which everything builds upon.

The Java Tutorial.  This is where you can get started.  It's quite good, and free.

These are the Javadocs.  Everyone needs this.  It will eventually be the simplest way to get the info you need.  It can be downloaded here:

- You've probably read Code Complete by McConnell, as was mentioned on the recent Books topic.  If you haven't, maybe your bookstore tote bag isn't heavy enough...

---- (Some while later in your education)

Structure and Interpretation of Computer Programs.  The dead-tree edition is good to carry around, but it's also free.  You only really need to read first chapter, though by all means read more.  You can also download Dr. Scheme:
which is the best IDE I've seen for good interactive programming.

SICP uses Scheme instead of Java.  But you will come to understand programming.

- The bookstore has a lot of programming books.  Leaf your dirty fingers through anything that strikes your fancy; put it down if it bores you.

Tanenbaum's Modern Operating Systems.  It rules.

- The Art of Computer Programming, Knuth
- Algorithms in (XXX), Sedgewick
- Programming Pearls, Bentley
Pick one.  Probably want to buy Programming Pearls.  TAOCP may hurt or enlighten you.  Sedgewick's Algorithms books are very readable, but his code has bugs.

After all, algorithms and data structures are pretty darn important.

- Websurfing
I've learned a disturbing amount by wasting my time at Slashdot, developerWorks, Joel on....  Go into some language flames despite your inexperience.  It doesn't matter, because no one really intelligent and experienced goes into them!  But they're hugely educational.

- Gödel Escher Bach, by Hofstadter
Your main problem seems to be one of passion.  This may help you seek out passion.

Well, that last part after Code Complete has been a brain dump.  But the rest is vital.  A nice code editor is Jext.  Don't fall for the fancy IDEs, until you can do what they do.  A good compiler is IBM Jikes (notice the ++ option for fast incremental compiles), but might as well use Sun's Javac first.  Big builds require Apache's Ant for build scripts.  And good night.

Winter Wanderer
Wednesday, November 28, 2001

I really don't get those folks that tell people to use a text editor for coding.  Modern IDEs have features that will automatically display a list of methods when you type a period, automatically load javadoc help for the method you are typing, automatically bring up souce code for the methods you are calling on an object.

You couldn't pay me enough to develop without these features.  There is plenty to do in java without remembering hundreds of method names and their capitalizations.

Matthew Cromer
Wednesday, November 28, 2001

Since I learned to code using coding sheets and making corrections using a hand punch in EBCDIC I of course think thats the best way.

It did have one major advantage it taught me how to desk check and grind out syntactical errors without depending on the compiler (you only got one run a night then).  Note, it did very little to help you fix logical errors and debugging depended on print statements or poring through gnomic core dumps.

Because you are coming from a design point of view you should have far less difficulty expressing designs in code.  If nothing else it will make you a better designer as you can then pick up on why developers cringe at some constructs they are given.

Simon Lucy
Thursday, November 29, 2001

I would recommend Java.  Even if the language itself doesn't represent the future, the principles behind it do. 

A great resource is Bruce Eckel's "thinking in Java," you can download it free from

Ged Byrne
Thursday, November 29, 2001

And if you'd ask Bruce Eckel, I'm pretty sure he'd recommend Python ;-)

(or perhaps Jython, to get the best from two worlds)

Fredrik Lundh
Thursday, November 29, 2001


Ged Byrne
Thursday, November 29, 2001

Re: "I really don't get those folks that tell people to use a text editor for coding."

I didn't say that.  I wrote, "Don't fall for the fancy IDEs, until you can do what they do."  That is a big difference. 

Any sysadmin worth her salt will tell you, "Learn Vi."  Yes, there's far less hostile editors out there, and you should use them when you can.  But when you are stuck in a less-than-optimal environment and tool X just doesn't play nice with your TogetherJ Enterprise IDE o' Doom...

IDEs are meant to help you build large projects.  For small ones, learning the IDE takes a great deal of overhead and chains you.  But be my guest.  JBuilder, TogetherJ, Eclipse, NetBeans, WebSphere.  These will guarantee 100% extra programmer productivity in 30 days, and turn your small consulting firm into the next MSFT.

Winter Wanderer
Thursday, November 29, 2001

First, a little background on programming from my experience, then more specific advice...

In general programming, you have two paths to choose from:  Theory, and Practice.  Practice has a shorter time to productivity; it's more fun; it's more hands-on.  Theory results in ultimately better programming habits; it permits programming in the large; it brings you to the most advanced concepts.  Practice is exemplified by Perl and BASIC, and somewhat by C; Theory is exemplified by Lisp and Prolog, and somewhat by Java.  Theory is what you get from books and in college; Practice is what you get from sitting at an actual computer and hacking.  Practice's learning curve is steep at the end; Theory's learning curve is steep at the beginning.

You need both Theory and Practice.  While Theory may teach you better habits, Practice illustrates why they are necessary.  Practice has a glass ceiling.  Theory has a glass floor.

Of the programmers I know, the best ones started off with Practice as kids, and it got them liking programming enough to get some Theory in school.  Then the two just went hand-in-hand.

Learning programming almost always starts with the person learning one language and playing around with it before moving on to other languages.  Some say it's crucial to learn the right language first, and avoid early bad habits.  I say it's much more important to enjoy programming, and be thirsty for more.  I started with BASIC, learned some bad habits, and unlearned them quickly enough when I took on Pascal (and assembly, and Lisp, and so on).

So you know some Perl - that's a good language.  Not only is it unparalleled at string-parsing tasks, it contains many concepts which are extremely useful elsewhere (such as regexps and some pidgin commands used in other programs like sed, csh, vi, etc.).  I'm at the point where I avoid it for very large tasks, because I haven't yet learned its packaging and OO features.  For large-scale programming, I like Java best.  It's structured like OO-Pascal, Modula-2, and C++, and is also widely used.  Despite what Joel Spolsky says.  ;-)

If you learn Java, I highly, highly recommend getting and reading Effective Java by Joshua Bloch.  Bloch designed and wrote a great deal of the Java Collection hierarchy, one of the most solid, well-documented libraries in the entire development kit.

As for tools, the best ones are those which allow you to edit code as fast as you think of it.  For this reason, I greatly prefer a text editor such as Vim or XEmacs over popular IDEs.  IDEs -do- do some labor-saving things, particularly when designing UIs, but when you're editing code, they require a lot of mouse usage, which for me is unforgivable.  Notice I said Vim and XEmacs rather than vi or emacs; these are souped-up versions of the originals, which aid rapid development and still allow you to be proficient in the original editors when the need arises.

Paul Brinkley
Thursday, November 29, 2001

I may soon find myself in a somewhat related situation as the original poster of this topic, although I would be more teaching others as opposed to learning myself.

I first learned with C, and part of me thinks this is the way to go.  Memory allocation, pointers, data types, all kinds of great lowish level things that help me better appreciate the highish level things brought about by the newer languages.  However, after using Perl for text and files, I don't know if I could force myself to use C for such tasks.

I am curious though as to why nobody has mentioned C# as opposed to Java.  I am not an expert on either, but my first thought is that by learning C# you also learn an object library that can be used with other languages like VB, and supposedly even Java.

Are Java and C# close enough to each other that it wouldn't really matter which one is selected, but be more of a taste thing?  Are there any particular distinctive advantages that would put one over the other?

Scot Martin
Thursday, November 29, 2001

Ged, Jython is Python for Java.

(formerly known as JPython, but they had to rename it due to a trademark conflict)

It's an on-the-fly compiler that translates Python code into Java bytecodes, and gives you access to all Java libraries from the Python level (and vice-versa).  It's quite popular among heavy Java users, who use it for application scripting, rapid development/prototyping, and testing.

Check out for more information.

Fredrik Lundh
Thursday, November 29, 2001

One reason that thrashes like this generate so little insight (although this forum does much better than most in that regard!) is that the initial question is ill-formed. To make good recommendations, people need to know not just that you want to learn programming, but WHY you want to learn programming. What do you want to do with it? The uses of the tool will strongly guide which tool is the appropriate one.

Mike Gunderloy
Friday, November 30, 2001

Java's advantage over C# is that you are much, much less likely to get trapped into platform lock-in with Java.

Yeah, so I'm political here.  I'll go great lengths to avoid rewarding Microsoft for this sort of behavior ("embrace and extend").

Paul Brinkley
Friday, November 30, 2001

Java has lock-in, too.  But comparing them is difficult, because the two types of lock-in are asymmetrical.

Java's lock-in:
- No standard, unlike parts of .NET.  (I believe C# is standardized.)
- One world, one language.  (The .NET platform supports many different languages, including academic ones.)  Sun has been nearly hostile to letting other languages in.
- Sun does not support UNIXy competitors like FreeBSD.  Linux was supported only grudgingly.  One of the greatest requests for years on the Bug Parade page has been for a BSD port.  (Microsoft is explicitly targetting FreeBSD to run C#.)

Richard Jenkins
Sunday, December 2, 2001

C# and .NET is, in many ways, Java with the warts filed off. C# the language is, in my opinion, marginally superior to Java AT THIS TIME. There is a simple explanation for this: C# has had the example of Java to follow and improve on. I particularly like the explicit property get/set syntax and the event system (much nicer than inner classes).

Note that I am talking strictly about the languages here, not the politics. :-)

As far as learning one over the other - hmm... if you live in a Microsoft world already, .NET is definately the way to go. If you're more platform agnostic, go with Java. It'll give you a great base to move to .NET later on if you want to.

Chris Tavares
Sunday, December 2, 2001

*  Recent Topics

*  Fog Creek Home