Programming languages -- where to start?

So, I used to love computers, and I tinkered around a lot back in the day. I self-taught myself some scripting languages and some basic programming languages in grade school, and studied C++ and HTML for a couple semesters in high school. I more-or-less stopped there when my interests shifted. I haven’t really touched anything code-y in about a decade.

I’ve decided I should relearn. Obviously this Internet thing ain’t going away, and my hacker pals all say there’s lot of use for even a basic knowledge of web-friendly languages. I’m planning to go back to school in the next year or two, and I’ve been clued in that knowing some coding basics can make for better-than-average part-time employment.

I’m a little lost as to where to start. The big two recommendations I hear are Ruby and Python, but I can’t really tell what the difference is in terms of application. And I have a sneaking suspicion that, before tackling an actual language, I’m supposed to learn HTML, CSS, and possibly PHP in greater detail.

Does anybody have any recommendations for ways to build up skills from step one?

Read the section “Basic Hacking Skills” in this document. :slight_smile: Also check the “Other Resources” section.

What is it you want to be able to do?

If you want to build websites, learn PHP+SQL, HTML+CSS, and a CMS platform like WordPress, Drupal, Joomla or whatever strikes your fancy.

If you want to learn disciplined application programming, teach yourself Python or Ruby, and agile/test-driven development.

Either way you’ll want to know something about database design and administration.

Java is fun and easy.

I wouldn’t. HTML and CSS are respectively markup and declarative document style description languages respectively, and will teach you virtually nothing about programming. Just pick one of Ruby or Python, pick up a book from the library, and start programming. Both languages are easy to use and widely used for web applications.

Microsoft offers free versions of its Visual Studio development environment (Visual Studio Express). C# is a good way to go.

I love ruby as a scripting language but I wouldn’t recommend it as a starting language; IMO it’s a messy language that will teach bad habits. I don’t know Python all that well but people love it.

Go with Python. I am a developer professionally but I wanted to pick up something unrelated to what I do know on my own and it is what I picked. It is a very real language but also a good teaching one and incredibly powerful. The most important think is to actually DO something with it, make it work, and then build on it. Pick a very small project that you have a personal interest in rather than just skimming the tutorials. That is the only way to learn a programming language. Python resources are free to download and read so you start tonight if you have an idea. It won’t be easy at first depending on your experience but that is what it takes to learn and it can pay good money if you become proficient at it.

Ok…a question for you Python and PHP folks…

I recently read a summary of recent languages, and they didn’t even give a section to Perl, my tool of choice for slinging around text and general glue. They simply mentioned that it is the great grandaddy of modern languages such as Python and PHP.

I have no clue about either Python or PHP.

So, how true is their assessment? (it was in an OS X programming book, in the “Scripting Languages” section)
Are these tools better at being all around glue languages?
Are they easier to learn?

Should I forget about Perl skillz and start learning up on these new(er) languages?

It’s hard to tell from your question what you want to do, and the answer depends on that. There’s half a dozen “paths” you could be on – choose one, and our answer will be different for each one.

  • I want to create web pages semi-professionally.
    If so, start with HTML and CSS, then add in Javascript. Heavy emphasis on javascript – that will give you experience coding and it’s fun cause it’s easy to quickly see results. As time permits, add at least one of C#/ASP.NET, Java/JSP, and either Perl/PHP or Ruby.

  • I want to create traditional applications (ie, work for a company like Microsoft or Apple).
    Doesn’t sound like this is your situation, but if it is, start with something like Java or C#.

  • I just want to explore programming for personal enrichment. I’m not seeking a job, I just want a fast introduction to programming.
    If so, then any beginner language is fine. I’ll probably get flamed for saying this, but the easiest “full featured” language to pick up is Visual Basic, because you probably already have it (it’s built in to Excel and Word), and those include excellent beginner level tools and lots of help documents. That way, you won’t have to worry about downloading and configuring tools for other langugages. You’ll be able to learn to make a simple Tic-Tac-Toe game or something like that in Visual Basic very quickly. It’s VERY easy to do quick GUIs in this language, so you can hack up something pretty on the screen to look at quickly. A lot of people here will scoff because Visual Basic is not “professional” (by which they mean it’s easy for non-professionals to learn, and so those non-professionals create code that is not professional-quality while they’re learning), but that’s kindof exactly the whole point of your question.
    If you have a technical friend to set it up for you, then python might be fun; but finding and configuring the tools may be sufficient enough deterrent to scare you off.

  • I want to make games that run on my IPhone
    You have no choice, you must use Objective-C. You may find this to have a very steep learning curve, though. In this case, I’d recommend something like Python or Java first.

  • I have a specific projects in mind (automate some task I do, like manage my baseball card collection, or write a script to automatically tag all my pictures with my name, or something like that).
    Depends on the project, tell us what you want. Chances are, you just need some sort of basic database tool.

I can’t wait to see how much I get flammed for saying these, but chances are Visual Basic for Excel/Word is probably the easiest for you to get started with (and contrary to what people will tell you, it will not “teach you bad habits” or “ruin you”, at least, not anymore than any other language that you’re self-taught in). It’s very easy for beginners to pick up.

To everyone recommending Python – remember, the OP needs to find and install an IDE, the runtime, the libraries, etc. That’s a pretty significant burden before he’s even started writing a first line of code. Compare that to Visual Basic where it’s already installed on his computer (in Excel and Word) and already had pretty good (for a beginner) debugger, editor, etc. Nothing to configure, he can start writing “Hello World” five minutes after he sits down.

No solid advice for the OP.

Java is my game, but as others have pointed out, it is probably not the best learning language out there. Like so many other languages, the depth of libraries and frameworks obfuscate what was once an elegant learning language.

It sure beats C/C++ for a first language, though.

I would start with one “compiled” language and one “glue” language. The first being the tools of fancy applications, and the latter being the glue that holds everything together.

With this combo you should have a pretty good start.

By the way, if anyone really wants to get into iPhone programming, go into iTunes and download the Stanford iOS programming course from iTunes Library.

It’s free, and it’s a full semester programming course, filmed on site at Stanford, complete with homework assignments.

Not quite beginner’s material, but an awesome bit of free stuff. (I’m still chugging through lecture five or so).

I’ve spent several years working with each of those. In my opinion:

Python is a better language than either Perl or PHP. It’s more consistent than the others, and carefully designed to encourage good practices. I rarely use it these days, but it would be my first choice for non-web applications, particularly anything network related.

PHP is a better platform for distributing web applications that can be easily installed and run on a typical web server. It’s easy to integrate with almost any web server, and it comes with a good range of useful libraries and APIs by default. As a language, it’s messy; skill and discipline is required to produce good quality code.

Perl is fine for code that is to be used once then thrown away.

There is only a weak correlation between the quality of a language and its usefulness for a particular purpose.

Did the OP say he or she had Microsoft Office? :slight_smile:

I’m currently contemplating a little spreadsheet programming, but I’m using NeoOffice on the Mac, which is a port of OpenOffice. Does the BASIC that comes with this bear any resemblance to Visual Basic for Applications? Alternatively, does Microsoft Office for the Mac include a VBA IDE?

Traditionally GW Basic or BasicA is how nearly every programmer I know got started. It came with computers in the 1980’s. Very easy to use and you could learn the fundamentals of programming. How to correct syntax errors etc. My first college computer class did several projects in BasicA. From there I took classes in COBOL, Adv COBOL, Fortran 77, C etc. Each class was a semester.

In the early 90’s there was a version of C that used the identical programming environment as BasicA. You could write a few lines of C and then execute it interactively. I’m not sure if that version of C is still around. It was a great learning too. I would hope it is still sold. Unfortunately I can’t recall what it was called.

Today, I feel sorry for any newbie that jumps into Visual Basic or Visual C. That’s really not a beginners environment at all.

Above all. You need something simple. Where you can start with a “Hello World” program, and then gradually experiment with the various elements of the language.

Well I’m going to recommend Python too. The OP didn’t mention his platform, but I guess we assume one of the MS versions. If it were Linux Python would either already be there, or a single command line away. But even installing on a MS OS is pretty trivial nowadays. Installer bundles that are a few clicks exist.

Python has a huge number of advantages for both leaning with, and for doing neat things. One of the things I really like about it is that it makes the way thins work explicit. It has an object veneer that doesn’t mess about hiding the paradigm, it is clear exactly what is going on, and there are no stupid surprises (unlike C++ for instance.) There are a huge number of add on libraries, and it extends naturally into many scientific areas. This is good for home hobby programming, since most are not interesting in crafting web portals, but in crafting stand alone programs that do useful things.

I taught programming at university level for some years, and if I was to pick the teaching languages I would want to go back and teach with, they would be Python and C. The worst language I could imagine teaching in would be C++.

Part of my problem is that I’m not entirely sure. I know enough about C and Java to understand how they operate as standalone programs. I know a bit about web standards and get how HTML, CSS, and Javascript work to generate and render pages. I literally have no idea what Python and Ruby actually DO.

I’m not entirely sure WHAT I want to be programming, but I think “web apps” might be the right long-term plan. Social widgets or simplistic “casual” games. I’d like the skills I’m developing to be SOMEWHAT marketable, although it’s mostly personal curiosity at this point.

I already have all my systems setup to dual-boot Ubuntu and Win7, and I’m told there’s web-based environments for working in Python and Ruby that work well.

I would start right here
A lot of choices for a web-programmer

Javascript is a fast, easy way to get back in the habit of programming. You don’t need anything more than a browser and text editor to start. You can also learn some things about object oriented programming (although it operates differently than most OO languges). Following that, it’s best to have a platform and application in mind before picking a language to work with. Java is highly portable across platforms (Java and Javascript are no more related than any two typical languages). Once you are programming, picking up other languages is not difficult, at least at the command and syntax level. Most language differences that would concern the programmer are the function libraries and low level details about things like memory usage.