Text 2 Mar 216 notes you - yes, you! - can teach yourself how to program.

in the beginning was the question

do you think it’s possible to teach yourself programming?

a friend of mine asked me that a couple of nights ago, to my delight. my answer, of course, was

hell yes!

as a matter of fact, any self-respecting programmer you’ve ever met is mostly self-taught. that’s because as soon as a neophyte starts coding, they find out that it’s really fun, so they want to learn how to do more of it and get better at it, and they find out pretty quick that there are plenty of ways to do that on their own, teachers be damned. as another friend of mine put it after spending a week learning how to program for the first time:

yeah, now i get why you guys code all the time. it’s like playing a bunch of little games!

programming’s all about solving problems and making things. hell, it’s about making things that solve problems! how cool is that?

the problem

the only catch was, i didn’t have a handy “learn to program!” link to direct her to. there are a lot of great resources out there, but i’ve never found that one single link that i felt really gave the right amount of information to someone starting completely from scratch.

the “completely from scratch” part is really important. most of the intro-to-programming guides i’ve seen are written for an audience of born techies who don’t mind spending a couple hours learning about the lambda calculus. most of the people who’ve asked me how to teach themselves to program are not in that demographic.

the solution

so, i sent her an email, which i hope she’ll find useful. she’s not the first person to ask me the question that spawned all this, so i figured that i might know some other folks who might find it useful too, which brings us to this post. so, without further ado:

the email

programming is the best.

once there was a man known to the world only as _why the lucky stiff. his main goal in life was to teach as many people as possible how much fun coding is. he was a hero of mine, and i can tell you all about him sometime, but for now all you need to know is that he produced a bunch of projects related to learning about programming.

i’d recommend you start your career with _why’s poignant guide to ruby. he was a pretty insane person, so it starts off a little weird, but just trust me on this, it is worth reading and is one of the best intros to coding i’ve seen. if you have any questions about anything you read that you don’t quite get, ask me! i love to talk about this shit.

if you’d like a slightly more interactive learning-thing, you should check out try ruby , another of _why’s projects. just go there and type “help” like it says in the info-box-thing, and it’ll start a nice little walkthrough which lets you try out some actual ruby code.

you’re gonna be learning how to write ruby code through those resources. ruby is a programming language, and is one of many; it’s great for learning on because it closely resembles english most of the time, but it’s powerful enough that a bunch of really big web sites and other projects are written in it.

if you’d like to try writing some ruby code on your own after making it through the first five or ten minutes of either of those links, you can!

you’re a college student, so i know you’ve got a laptop running mac os x - bring up spotlight (the magnifying glass in the top-right corner of your screen) and type “terminal”. open the terminal program that shows up in the search results. now, just type “irb” without the quotes, and hit enter.

irb means “interactive ruby,” and when you run it, you’re all of a sudden in ruby-land! at this point, you can write ruby code to tell your computer to do anything you want, and it’ll do it! for example: >> 5.times { puts "reba is learning to code!" }
reba is learning to code!
reba is learning to code!
reba is learning to code!
reba is learning to code!
reba is learning to code!
=> 5

>> "reba!".upcase
=> "REBA!"
mess around, try out the concepts you learn in those links. try assigning stuff to variables, try writing functions. for example:>> def hello(name)
>>      puts "hello " + name + "!"
>> end
=> nil

>> hello('reba')
hello reba!
=> nil
coding is all about taking small building blocks like these and making really cool things out of them, which you’ll see if you read the poignant guide. matter of fact, i’d be willing to bet that we could take the concepts you learn in the first three or four chapters of the poignant guide and immediately apply them to make little ruby scripts that’ll improve your life by doing chores for you: calculating reimbursement checks, figuring out the perfect classes to take so you maximize the amount of fun you have while minimizing the amount of work you do, that sort of thing.

so: check out those places, mess around in irb, let me know when you run out of things to do or if those links aren’t making sense to you or if there’s anything else you’re curious about!

programming is the best.

the moral

that all applies to you, too, dear reader. check out those links, try playing around with irb, and for god’s sake contact me if you have any trouble. if you’d like to move past the examples in the poignant guide and start writing handy little programs of your very own, i might even write a follow-up to this post with some more advice. stranger things have happened.

  1. jrheard posted this

Design crafted by Prashanth Kamalakanthan. Powered by Tumblr.