Computer Programming for Dummies
December 14, 2005 8:18 AM   Subscribe

I'm interested in learning how to program, I'm really interested in some of the cool new Web 2.0 apps that I have seen popping up recently and I would like to get under the hood and start trying some things out, mostly as just a hobby.

What do I need to know? What are some resources for getting started? I consider myself rather tech savy but I don't have the first clue about anything related to computer programming. Advice, and resources for how to get started would be much appreciated. Doesn't specifically have to relate to programming for the web.
posted by mhaw to Computers & Internet (14 answers total)
 
Well, just so you know, it's usually a personal choice as to which language you end up feeling comfortable using. I find PHP, Perl, and C to be comfortable, but others will of course disagree. If you've never created a webpage before, you should go down to a bookstore and get a book on creating simple webpages with HTML and CSS. This is the very basic stuff you'll have to know no matter what scripting language or "web 2.0" stuff you get into.

If you have a laptop, you can save yourself some money by taking it with you and working through the examples in some of the books without buying them.
posted by odinsdream at 8:36 AM on December 14, 2005


Just my humble opinion:

1: Start with a "scripting" language like perl, python or ruby. Many web apps are built using these three on the server end. Also, they are generally useful enough for you to start fiddling with scripts for managing your mp3 files.

2: Think not just about the syntax involved, but also about the fundamental concepts: iteration, logic, data structures, input, output. Almost all programming languages will have a way to loop over a list of items, a way to make decisions about items, a way to store and process different types of data, a way to get data from the environment, and a way to give data back to the environment. Once you learn the concept of a loop, it's easy to pick up new languages as needed.
posted by KirkJobSluder at 8:36 AM on December 14, 2005


Good initiative, but web programming might be getting a little ahead of yourself if you've never written a line before.

To program for the web (or desktop), you will have to learn a third party "library" "package" or "framework" in addition to the language proper. I would advise you start with the language (and programming) basics, and in a month you can pick up an AJAX framework.

On that note, I highly recommend Mark Pilgrim's Dive Into Python.
posted by Popular Ethics at 8:39 AM on December 14, 2005


More beginners guides to Python.
posted by Popular Ethics at 8:41 AM on December 14, 2005


you will have to learn a third party "library" "package" or "framework"

Remember, he wants to learn this as a hobby. So it doesn't need to get that complicated.

That's exactly how I started -- just making fun web toys for myself. Now I get freelance work as a programmer.

I started by learning front-end technology. I learned HTML, CSS, and Javascript. Optionally, you could spend some time learning Flash and Photoshop.

Then I learned PHP. I started with projects like Hangman games. HTML/CSS/Javascript for browser display and game interactivity; PHP for looking up words in a dictionary on the server.

Next, I learned about databases, the SQL database language, and how to hook up scripts to the databases.

Eventually, I leaned XML, which is a good language to use for organizing data and sending data back and forth between different programs.

You can learn this stuff bit-by-bit, over several years. At each point (before you've learned everything) you'll already be able to create useful/fun toys.

(It's also worth going to Apache.org, downloading the Apache web server, and figuring out how to make your home computer into a server. That way you can test your backend programs without having to upload them to the web. You'll also need to download and install the interpreter for whatever language you're using -- i.e. the PHP interpreter from PHP.org.)
posted by grumblebee at 8:51 AM on December 14, 2005


Following grumblebee suggestions, which are very sound : rather than installing Apache, PHP & MySQL, make your life easier by using a single-click install package, like WAMP5 or EasyPHP.

I'd say PHP is easier for starters, but Python might teach you programming in a better way. To me, Perl would be too tricky to prove a hobby, and Ruby too "different" (although it has its merits - and being different is not a bad thing per se).

Oh, yes, but first : JavaScript, with XHTML, CSS and the DOM. You wouldn't believe how many thing you can do with good JavaScript/DOM mastery. And you don't have anything to install to learn JavaScript : you already have the Notepad, and a browser ! :)
posted by XiBe at 8:58 AM on December 14, 2005


Please don't start right away with web 2.0 apps. Start with basic HTML, Javascript, and chose a server side scripting language (PHP, Perl, Java/JSP, Ruby, etc...), then when you've mastered the basics such as validating forms, maintaining state, CRUD (create retrieve update delete) then you'll have the background necessary for taking advantage of things like XmlHttpRequest and the likes of popular web 2.0 stuff.

If you don't have the basic skills your webapp will have all the functionality of an aborted fetus. Yes, I went there.
posted by furtive at 9:34 AM on December 14, 2005


Python: I think any scripting language is a good choice, but Python is an ideal learning language because of its interactive interpreter. Simply type "python" at a command prompt and then start typing in statements to see what happens. (Ruby has an interactive interpreter, but I'm not familiar with the language.) However, I actually wouldn't recommend beginning with Dive into Python, because it assumes some prior familiarity with programming.

PHP: Programming with PHP can also be very encouraging for a beginner because it's ubiquitous and you can build a working web app with it very quickly. Later on, you may learn to hate PHP, though.

Javascript: I think that Javascript is best learned after learning a server-side scripting language -- not because Ruby, Python, et al are necessarily superior, but because it's needlessly frustrating for a beginner to deal with hassles like browser compatibility, the DOM, etc.

At any rate, find a short programming tutorial that you're comfortable with, read it, and work on the examples. Then try to come up with an idea for a simple application and figure out how to write it using what you've just learned. This is where what you've been learning will really sink in. Good luck!
posted by cobra libre at 9:42 AM on December 14, 2005


Hasn't this question already been answered 29 times on here already?
posted by matildaben at 10:08 AM on December 14, 2005


matildaben, I think variants have been, but they're more "person with experience looking for another language".

As for the question...if your emphasis is on the web, the first thing to do (as people have pointed out) is learn (X)HTML and CSS, with a sprinkling of Javascript. (X)HTML is your data, CSS your presentation, Javascript your behaviour. Good books on these would probably be "HTML For The World Wide Web" by Elizabeth Castro, "Designing With Web Standards" by Jeffrey Zeldman and "DOM Scripting" by Jeremy Keith. There's also a multitude of stuff on the web, but you may be more a book person.

Once you've got those, you'd probably be looking at server side languages and databases, and a very popular combo is PHP and MySQL (although there are others out there). For that, you'll need some kind of testing environment - personally, I use Xampp. Good luck!
posted by djgh at 10:30 AM on December 14, 2005


About programming books in general:

I usually try to avoid any programming book over 500 pages long. Usually, I find them to be filled with way too much fluff, overly wordy, and repeating the same information. A good example of this is Sams Teach Yourself C for Linux Programming in 21 Days. At 768 pages, it seems like you are getting a lot for your money. However, you can learn everything almost everything that the Sams book covers in only 274 pages (and probably less than 21 days) by reading The C Programming Language by Kernighan and Ritchie. Of course, one should probably not try to learn C as a first language.

Finally, I'd give O'Reilly's safari service a shot. There is a 14 day trial and it's only $10 a month after that for a basic account.
posted by darkness at 10:30 AM on December 14, 2005


There seem to be a lot of folks here wanting to turn you into a "real" programmer. While that's a noble enterprise, if you just want to goof around with web pages, try MS Visual Web Developer. It free. It will not teach you how to program. What it will do is give you an easy to use IDE where you can mess around with ASP.NET pages. If you decide that you like it, then take the time to learn how program "properly". Promise me that you will not come to me a year from now asking for a job because you "know ASP.NET" as a result of using Visual Web Developer. It's a first step. Try it, then take the time to learn more.
posted by JeffK at 10:55 AM on December 14, 2005


Learn to walk before you try to run. Like others have said, for web stuff that probably means (X)HTML, Javascript, CSS and how they interact with each other. Experienced programmers on all platforms tend to agree that as a language, javascript is pretty grim, but if you want to do this for no more than a fun hobby, javascript or Flash will give you the ability to do interesting stuff the most quickly.

Once you've done some client-side scripting, you might want to tackle something on the server. There's lots of choices there. See plenty of pervious threads on AskMefi for plenty of discussions.

Worrying about things like 'AJAX' and 'Web 2.0', as a beginner will get you confused. All you need to know as a beginner is that once you get to grips with Javascript/CSS/XHTML, you already know a lot of what you need for AJAX. Only worry about 'Web 2.0' if you want a job working for a company that uses the term unironically.
posted by normy at 11:05 AM on December 14, 2005


Thanks for all the great responses, I guess I should have pointed out earlier that I am already pretty comfortable with HTML at least, and I have been trying to get a better grasp of CSS. But your suggestions have definitely given me a better idea of where to direct myself.
posted by mhaw at 11:27 AM on December 14, 2005


« Older Your favorite Palm apps and tricks?   |   community building resources Newer »
This thread is closed to new comments.