I don't want to work, I want to bang out the code all day.
June 2, 2009 10:26 AM   Subscribe

Time to stop fooling around and learn to program in earnest. Sources?

I've toyed with programming since my early teens. In college, I wrote TI applications to help me with Trig. Since then I've gained a passing understanding of php---that is, I can follow it but not write it from scratch.

I find myself unemployed now, and having lots of time on my hands while I wait for the Next Big Opportunity to come around. I might as well...you know...apply myself.

There are a couple options. I've got ~$4,000 in americorps educational money left, so I *could* go to a real class, which is probably a good idea because I get distracted easily. Such a class would need to probably be in the Pittsburgh area.

In the past I've snagged O'Reilly ebooks, but in flipping back and forth between screens I inevitably get bored or frustrated and drop it.

So then, give me your inputs. PHP, ASP, C# (or any of the .net suite), java, ruby? My end goal is to be able to freelance some (fairly simple) code, but also to give me a really good foothold to expand my abilities. Websites? Interactive tutorials? Communities?

I'm at a point I can dedicate at least a couple hours a day, although a week-or-two long class I can go to wouldn't be bad either.

Lemme have it MeFi!

Also, sidebar: any Americorps Alumni out there who have successfully gotten your grant money to pay for things like computer hardware to further your education?
posted by TomMelee to Computers & Internet (20 answers total) 30 users marked this as a favorite
 
SICP

Also, the OReilly (and other) programming ebooks don't do much for me. I learn much more effectively from their real books.
posted by rhizome at 10:33 AM on June 2, 2009 [1 favorite]


I've found the best way to learn something is to have an actual goal in mind and then try and accomplish it, you quickly figure out what you do and don't know, and the stuff you don't know you can research.
posted by zeoslap at 10:37 AM on June 2, 2009 [1 favorite]


If you want to get a good understanding of the internals, I would suggest diving into something like C++. cplusplus.com is excellent. The language isn't flashy, but you will learn a lot more about how the computer works and will be able to optimize higher level scripting code like PHP, Perl, or Ruby once you understand what they let you do in the hurried way that they do it.

If, on the other hand, you want to start taking contracts on the side (which I haven't done in a while-- maybe check sites like elance.com to see what it's demand these days), I would suggest gaining experience in the basic freelancing domains of javascript (client-side) or PHP (server-side). There's a wealth of material on the web, and you can start with some very small projects and eventually work your way up.

IRC channels can be a good source of help too; usually a ton of people hang out there all day and are available for help, although they can be a tad elitist at times.

(I studied computer engineering at Carnegie Mellon-- go Pittsburgh!)
posted by gushn at 10:43 AM on June 2, 2009


Much of the answer to this question will depend on what you want to do with this knowledge.

For someone not looking for a CS degree, Java is pretty all purpose, and is typed and heavily Object Oriented which will give you a strong base for learning other languages. It would be a bit harder to break into a Java shop though without experience and a pretty deep level of knowledge. Its used heavily in the web but also crosses over much more into desktop apps and server apps then some of your other languages. I'm not an MS guy but my understanding is that C# is very similar. So Java = heavier learning curve, but you'll get a bit more in the end. C and C++ will give you a very good foundation since you'll have to deal with a much lower level language dealing with memory allocation etc, but its again a much, much steeper learning curve.

PHP and Ruby are mostly used commercially for web development these days. PHP is all web based, Ruby with the Rails framework is kind of the same. Both are easier to learn and program then Java or a C variation, though ruby is (arguably) better structured. PHP is probably a slightly easier learning curve since with Ruby on Rails you need to learn both how to program and a web framework to really get going. Ruby also has more meta programming "magic" which can make it a bit more complex. Python also falls in this group somewhere between the two for webapps but also has more exposure it seems in other areas outside the web. I'm not really proficient in it but its will pop up in the conversation.

As stated earlier the best way to learn is to pick a project and build it. Usually the project itself will give you a direction towards language.
posted by bitdamaged at 10:45 AM on June 2, 2009


Do you have an iPhone/Mac?

If you can follow PHP, you understand basic constructs; loops, conditionals, functions and the rest of the building blocks of the language. Depending on what kind of learning you do, this might be for you: standford's iphone course. This might be a difficult class for you to follow but you'll end up with a solid set of skills on an exciting platform. Take a look.
posted by aeighty at 10:45 AM on June 2, 2009 [1 favorite]


Oh yeah, PHP, Python and Ruby On Rails can be learned fairly easily on the web. Java or any C should likely be learned in a classroom.
posted by bitdamaged at 10:46 AM on June 2, 2009


In the past I've snagged O'Reilly ebooks, but in flipping back and forth between screens I inevitably get bored or frustrated and drop it.

I suppose it varies for most people, but I've had the same experience with trying to follow step-by-step language tutorials or books. I took programming courses as part of getting my CS degree, but most of those were more about learning about how linked list works and then implementing it in C++ rather than about learning how C++ itself works.

In my opinion the only way you can really learn a given programming language, or how to program in general, is to work on projects. It can be on your own, as part of a small group, as part of an open source project, etc. but the point is you need to be working on a real project rather than canned examples. An easy way to get started is to just pick a programming language that you're interested in and a project that would work well with that language, and go for it. Learn the basics through a quick tutorial or by reading part of a book, but focus on getting some code written right away rather than trying to become a master before you start.

There are enough resources and forums online that you can get help if/when you get stuck, so just try to get something working and deal with problems when they come up. If you want to become a professional programmer you're going to have to learn new things as you go along to solve the problems you'll be confronted with, so you might as well adopt that learning style from the beginning.
posted by burnmp3s at 10:50 AM on June 2, 2009


I think Rhizome has the right idea: learn about what the general techniques are for writing programs (that is, algorithms and data structures) and you will be very well equipped to program in whatever the language du jour is, regardless of specifics of syntax. However, as bitdamaged and zeoslap and burnmp3s note, having an actual project goal to work towards is often the best motivation. Perhaps a class would do this for you as well.

Certainly you can find any number of PHP tutorials online if you want to go that route (the "bottom up" approach, shall we say?). In my opinion, though, you should NOT start with PHP: (beware, trollish comment ahead, but this is just my sincere strongly felt opinion:) I personally think it is a trainwreck of a language and after programming in it for six years I can't wait for it to go away forever, which unfortunately it doesn't seem like it is going to do anytime soon (*sigh*). I would argue for Ruby, Python, Java, or even C(++). Perl was my first language, but I don't think I'd recommend that at this point, although I remain fond of it.

In any case, as I said, PHP isn't going anywhere, and it's really easy to get going right away with it, and most hosts supply it out of the box. So that'd be your best bet if you wanted to start consulting as a programmer quickly.
posted by dubitable at 10:51 AM on June 2, 2009


Ignoring the 2.5B Asians who can conceivably code for peanuts for the moment, the world is your oyster right now, compared to when I was starting out 25 years ago at least.

What with Apple's AppStore, along with the Microsoft, Palm, and Nokia copycat app stores, it looks like there will be a growing future for indie micropayment application sales.

There's also hobby development for the xbox 360 with XNA.

If you're looking for career stuff then PHP, CMS, and that stuff is important.

What kind of programming job do you want?

Identify that and start creating progressively more impressive attempts at implementing these kinds of projects.

For the time involved, formal classes are largely a waste IMO. While I gained a lot of useful backstory over my undergrad career, you can pick this stuff up by aggressively reading the tech literature (ie websites) of your given speciality.
posted by @troy at 10:57 AM on June 2, 2009


I worked my way all the way through a C book back in 1995. I won't say I remember it, but it provided enough of a framework that catching onto fundamentals hasn't been too hard (read: php). I have no problem going back there, though.

I know there's a wealth of info on the web. I also know that what pops in google isn't necessarily the best. If any of you has encountered a great resource (ala rhizome, gushn, or aeighty), please please share a link! Alas, no iPhone or Mac, but that is a good suggestion.

Thanks so far, keep them coming!

I should say that I've done some db creation in access, and I'm a little smitten with the php/sql relationship, but I don't have a project in mind, per-se.

I mean, I have ideas. Like I have this one that's pretty much a photobucket but it's a photobucket for your insurance company. You take pictures of your serial numbers and photos of your valuable materials, and then upload it securely, and then if your house burns down or it gets stolen or w/e, you've got documentable proof for the insurance company or police of what you had, and a timestamp on the server to document it. Or like an employee scheduler, where you enter available times for each employee and ranges of shifts and it spits out schedules that fit the best. A little much to bite off though, methinks.
posted by TomMelee at 11:00 AM on June 2, 2009


Oh I should say that I'm talking super-micro freelance projects. Volunteer tracking databases, custom Joomla extensions, etc. Not so much a career as a hobby with benefits. I've got like 5 joomla websites I supervise and a couple wordpress ones too, I've got server space and access to zend and sendmail and all that fun stuff, so I can play to my hearts content. I really love the input thus far, thanks!
posted by TomMelee at 11:02 AM on June 2, 2009


zeoslap's method is my suggestion.

Find yourself a (software) project you want to complete. Something you want to build; something that interests you. Then, pick a language based on its beginner-friendliness, and application. If you're doing web stuff, I'd go with either PHP or ruby. For desktop-based applications, I'd go with either python or Java (Java only because it has a very large standard library, and will introduce you to C-style syntax which is fairly prevalent).

The point is that you pick the project, and then you learn what you need to as you go along. This is how I taught myself to program, and it's why I was top of my class while everybody else was asking me to help with their homework. The primary thing you need to learn is how to think like a programmer (abstraction, elegance, consistency, decomposition), not how to code. After you learn to program and design programs, learning any other language is a matter of a couple days' work.

I'd really suggest that you learn a syntactically small, well-designed imperative language, such as C, Python, Ruby or Java. Do not choose a syntactically huge language like C++, or one that evolved organically through a million iterations like PHP or perl. The huge languages will flabbergast you with a zillion trivia, while the organically-evolved languages generally lack a clear design metaphor and are so full of warts and exceptions that you can easily learn some very bad programming practices.

Let me specifically discourage you from making the same mistake as so many beginning programmers: do not choose C++ as your first language for serious study. C is okay; Objective-C is okay; C++ is not okay. It's tempting, since it's so prevalent in the industry and seemingly "professional". And, indeed, it's a very useful language that you'll need at least literacy in at some point (if you program professionally). But, it is the worst choice I can think of for a beginning programmer. The language is huge, with weird (and confusing) syntax for many of its constructs--often using the same keyword in different contexts to mean substantially different things. I cry a little bit, on the inside, every time I tutor a newbie coder who's taking a C++ course. Learning to program by using C++ is like learning to drive by operating a semi truck.
posted by Netzapper at 11:09 AM on June 2, 2009


I've recently taken this post to task and am about a third of the way through O'Reilly's Web Database Applications with PHP & MySQL. The first third of it is a really solid but quick foundation for database programming, security, SQL, PHP, and dynamic HTML. Even if you don't finish the whole thing, knowing those fundamentals of user/server/backend communication may come in really handy.
posted by cowbellemoo at 11:43 AM on June 2, 2009


I'd suggest Python because the interactive interpreter is awesome. Also you can learn programming without the language getting in the way.
posted by i_am_a_Jedi at 3:02 PM on June 2, 2009


While I agree with the idea that you should learn through doing an interesting project, I think picking some large application you want to build and diving right in might be a recipe for frustration.

My advice would be to go to the course websites for a few introductory or mid-level programming courses at major universities and try to work through the projects they've assigned to their students. You'll pick up the language(s) you've chosen as you go. By the time you've finished a few semi-large such assignments, you'll be ready to tackle a more involved project of your own design without just repeatedly hitting your head against the wall.

E.g., at Rice University, the intro-ish (second semester freshman) programming/data structures course was Comp 212, which apparently has all sorts of things from this and prior semesters online. (Alas, it looks like that class is now done in Java, and has been for some time. But presumably some of the problems are general enough that the language doesn't matter.) A more advanced class there was Comp 314, the current incarnation of which lists the current semester's assignments on the web. The latter collection seems like it might be especially fun to look at -- the three projects listed are basically "make a text-based interactive adventure game," "implement a gzip-compliant compressor and decompressor," and "do something really cool involving pictures and genetic algorithms." The advantage of starting with this kind of thing is that these are well-defined projects, each solvable by a few undergrads in a few weeks; your own potential projects might be substantially more open-ended.

Good luck!
posted by chalkbored at 3:56 PM on June 2, 2009


I recommend Python, specifically Mark Pilgrim's free online book Dive Into Python instead of O'Reilly.
posted by cj_ at 4:41 PM on June 2, 2009


Given that you're already doing Joomla and Wordpress stuff, PHP sounds like the best bet for you. Can't recommend any sites, as I've hated most of the online PHP tutorial sites. Currently I am teaching myself PHP because of a project I have to work on. The book I'm using is Webbots, spiders, and screen scrapers - I know it's not a PHP book specifically, but it's got what I need. I should note I have a CS background and I've picked up programming languages as I needed them, with Python being my favorite these past several years.

Do definitely learn SQL. It's up to you whether you decide to use it with Oracle, MySQL, or PostgreSQL.

(As an aside, Python is one language for which I don't recommend O'Reilly. For dead tree books, I recommend The Quick Python Book and Python Essential Reference, a new edition of which is coming out soon. For introductory material online, I recommend How to think like a computer scientist: Learning with Python.)
posted by needled at 5:21 PM on June 2, 2009


The fastest way to get into it is to do a little CRUD programming, probably in PHP. Install phpMyAdmin (or use the one your webhost gives you) and you can create the databases, and use something like PHP Scaffold to get you started with the basic queries. Use Google for the rest.

At least, that's how I'm doing it. I'm in more or less the same situation as you & facing the same question you are.
posted by MesoFilter at 8:32 PM on June 2, 2009


I'll second Dive Into Python as well. The entire book is available online, too!
posted by cowbellemoo at 6:10 AM on June 3, 2009


Thanks for all the responses! I'm relegated to a cellphone for the rest of the day, but I'm going to look at everything everyone suggested and go from there. Really helpful info, and if anyone wants to post more I'll be happy to peruse that too! Thanks again!
posted by TomMelee at 6:38 AM on June 3, 2009


« Older Where to donate a new black dress?   |   Don't leave the theatre yet... Newer »
This thread is closed to new comments.