Join 3,497 readers in helping fund MetaFilter (Hide)


How do I learn programming from home? what's the best approach?
April 6, 2010 11:41 PM   Subscribe

How do I learn programming from home? what's the best approach?

I wish to learn programming from home so I would be able to pretty much make things link Firefox and Wordpress Plugins as well as build my own PHP and MySQL database driven websites websites.

What's the easiest, best and fastest approach.

I know the basics but always gave up when I hit functions and classes.
posted by Bacillus to Computers & Internet (11 answers total) 21 users marked this as a favorite
 
A few tips:

(1) Have a purpose. I've always found it very difficult to learn a new programming language academically, that is, without a purpose. But if I have a specific task I need to do, if I have a criteria of success, then it becomes much easier.
(2) Copy other people's code, then try and understand how it works. With the PHP and MySQL example - the web is full of examples of how to get PHP to connect to a MySQL database, send it queries, then format the results. Start from here, and learn how to customize it for your own purposes.
(3) Maybe pick one language to start with - in your case, the way you develop Firefox plugins (Javascript + XML) is entirely different from the way you develop PHP websites.
posted by Jimbob at 11:50 PM on April 6, 2010 [1 favorite]


So here's the thing. I know you say you want to learn PHP, and that you want to work on web plugins. But, you want to learn how to program in a more forgiving, consistent, and easily-debuggable language than either PHP or javascript. The beauty of programming is that it is basically independent of the language used. Once you're a structured, competent programmer, the language you use makes very little difference. It's a week's work to learn a new language after you learn to program.

To that end, I suggest that you learn to program in either Python or Ruby. Both of them are highly consistent interpreted languages, with interactive interpreters. Their consistency is important, because it will teach you to be consistent yourself. Furthermore, because things act pretty much how you would expect them to, with few wrinkles, it's much easier to learn quickly.

The interactive interpreter is a very useful feature while learning to program. It's essentially a program that lets you program in the language "live", if you will. You type some code, hit enter, and that line of code is immediately executed. This allows you to learn how the language works and how to solve problems without having all of the mental overhead of either the compiler or the web browser.

Go buy a book. I'm a Python guy, so I suggest Learning Python. It's how I learned to program.

The other thing is that you must experiment. You have to play with the computer for hours. Just make it do stuff. It's the number one thing that's made me a good programmer. While all my classmates were out at parties, I was tinkering.
posted by Netzapper at 11:56 PM on April 6, 2010 [8 favorites]


What's the easiest, best and fastest approach.

Patience.
posted by Mikey-San at 12:39 AM on April 7, 2010


Build a couple of cheap boxes and run them as separate: web server and DB server. Then work on your programming on a 3rd box. A lot of learning programming, in addition to what Netzapper prescribes, is getting machines to talk to each other, and putting all that on one machine will only teach you so much.
posted by Lukenlogs at 12:49 AM on April 7, 2010


Netzapper makes an excellent point in regards to programming languages with interactive interfaces.
posted by Jimbob at 12:50 AM on April 7, 2010


My software engineer boyfriend read your question over my shoulder, and he advises that you should get involved in an open source project that is of interest of you, that's how he learned everything he knows: "Find something that upsets you about computers (which is not hard to do), then find a way to fix it and just keep doing that."
posted by halogen at 1:32 AM on April 7, 2010


I know the basics but always gave up when I hit functions and classes.

Unfortunately there is no getting around this. You just have to keep plugging away at it until it clicks. I know it took me a long long time to get my head around object-oriented programming (OOP). But once it clicks, you will wonder how you ever did without it!

Different books approach OOP from different ways. I really really like the Apress series of computer manuals. They are pitched just a little bit lower technically than the O'Reilly books, but are still very comprehensive. Python: From Novice to Professional is outstanding. It does a very good explanation of OOP and abstraction for the newbie.

Their manual for Ruby, even though it is a beginner's book, discusses OOP at the very beginning! Even before diving into syntax. This is an excellent way to see how it all works together. Don't be frightened. Have some chai tea, clean your mind and begin reading it.

These are the books I wished I read years ago.
posted by TheOtherGuy at 1:56 AM on April 7, 2010


The hard truth is that learning programming is neither easy or fast. It takes a lot of mental discipline and hard work, and a tremendous amount of patience.

That said, I'm Nthing the other suggestions here - try learning python or ruby before tackling PHP. Once you understand the basics it will be easy to translate your knowledge to PHP and many other languages.

Also, if you want to build database driven web sites, you'll have to learn SQL, the language of relational databases (yes, another programming language).
posted by kenliu at 5:19 AM on April 7, 2010


I was in your shoes about one year ago and happened upon this awesome thread on Ask. The book recommended there, Web Database Applications with PHP & MySQL, is aging but excellent. This book looks to be it's successor. XMLicious' comment in the thread is particularly awesome, and I heartily recommend picking up skills in Javascript and a Javascript framework (JQuery/Dojo/Moo/Google Closures/etc) because that's what gives a solid app the usability polish that makes it fun to use.

Now that I've developed many of these skills, I find that the tools available to me outstrip my creativity and imagination...so I'm in the comfy position of trying to settle on what to actually apply myself to. I'm not thinking "boy I wish I could make a site like that" but rather "these sites aren't so special, what can I make that's new and exciting?"
posted by cowbellemoo at 6:54 AM on April 7, 2010


Python (Django)
-- grok object oriented programming --
Javascript (jQuery)
build what you need/want (eat your own dogfood)

move right past PHP. I made a lot of abortive haphazard attempts at learning programming with PHP. Python just feels right.
posted by i_am_a_Jedi at 4:05 PM on April 7, 2010


As someone who knows PHP, Ruby on Rails was completely, utterly unfathomable to me, and I hate it with a passion.

But for you, as someone who doesn't know PHP, and is pure, white and viriginal as a result, Ruby / ROR may well be just what you're looking for in regards to your database-driven website.
posted by Jimbob at 5:14 PM on April 7, 2010


« Older Where could I publish an eclec...   |  Where to find a pinball machin... Newer »
This thread is closed to new comments.