Can you teach me to program?
February 19, 2010 4:56 PM   Subscribe

Can anyone teach me to be a programmer? or at least set me in the right direction?

Ok, I know that learning to program is no lite task, but i desperately want to learn, specifically in objective-c and then cocoa (i want to get into iphone/ipad development). So, can any of you point me in the right direction? If possible, it would be great if one of you could guide me step-by-step through finding, downloading and installing all of the correct software. I'm running windows by the way, but if need be, i have another pc i can refashion for linux. (i know i need a mac to for the iphone/ipad SDK, but they're simply out of my price range as of now)
Thanks so much!
posted by oviedo to Computers & Internet (17 answers total) 35 users marked this as a favorite
 
I have a friend who's using iphone dev tutorials at lynda.com to do this.
posted by circular at 5:03 PM on February 19, 2010


Why don't you start with Scratch? Just to get a feel for how programming goes.

Then you dive into the deep end and try learning Objective C? You gotta walk before you can run. (You gotta float before you can swim.)
posted by Chocolate Pickle at 5:04 PM on February 19, 2010


If you're not using a Mac, you will not be doing much iPhone/iPad development, period, because the tools used for development and code signing require OS X.

That said, if you can get your hands on an Intel-based Mac mini ($300 or so, used) you can start developing for this platform. Used Macs are as cheap as any other machine, these days, and you don't need much horsepower to do Mac development.

Once you have a Mac, a good place to start is the Stanford CS193 iPhone Development course lectures, which are accessible for free from their website. Start with the lectures at the bottom of the page to learn some Objective-C basics, and then work your way up to larger projects.

As you do problem sets, you might find the Stack Overflow site is a good place for more specific iPhone development questions. Try to do the work beforehand, though. You'll get better answers if you ask smarter questions.

There's no substitution for diving in and getting your hands dirty. It's a fun platform to develop for. Good luck!
posted by Blazecock Pileon at 5:26 PM on February 19, 2010 [9 favorites]


You can learn 99% of it on your own, but taking a couple beginner classes at a local community college can get you pointed in the right direction and with enough momentum to learn the rest on your own. And yes, install linux.
posted by whiskeyspider at 5:45 PM on February 19, 2010


For your absolute first dip in to programming I recommend Processing, possibly with the aid of this book. After that, python.
posted by phrontist at 5:49 PM on February 19, 2010 [1 favorite]


(I did read your question, just so you know. I think jumping in to Objective-C would be more frustrating than trying some other languages first.)
posted by phrontist at 5:53 PM on February 19, 2010


Yeah, I would go with trying to learn Python first. It's a language that a lot of beginners learn on.

That said, I first learned to program in C. So Objective-C probably won't kill you.
posted by delmoi at 6:17 PM on February 19, 2010


Best answer: Ok, I know that learning to program is no lite task

Oh, nonsense! Jump right in and go for it. It was just a fun hobby for me when I was a kid, and I learned more and more because I liked it, and eventually I went to college. There are plenty of young amateur programmers out there who do it just as creative fun.

I learned on BASIC, myself... I guess the modern-day equivalent would be Visual Basic. But Python is a much better choice. C is probably the best thing to learn if you're not afraid of it. It may be a little more frustrating for a beginner, but you'll be learning more fundamental concepts that will help you with other languages. Another good one is Java, which runs on anything, is syntactically similar to C, and is a little nicer and safer.

Oops, gotta go.... but my recommendation would be to just Google the name of a language and find some web forums and stuff. add the word "tutorial" to your search and you'll get some nice walkthroughs to help you out.

Oh, and never be afraid to ask people on the net for help when you're stuck.
posted by Xezlec at 7:08 PM on February 19, 2010


It's always good to start with some classic programming texts. Here are some that helped me:

  • Teach Yourself Programming in Ten Years,” by Peter Norvig. This is a great place to start because it'll help you envision exactly what your whole project will be like. It points out snidely that all these Teach Yourself Difficult Programming Language in Five Minutes! books are quite silly; but it also gives you a good picture of what learning a programming language is like. And it gives you some great instructions for how you can get started - realistically - toward learning programming.
  • The C Programming Language [1.1MB PDF], by Brian Kernighan and Dennis Ritchie. This is one of the most important books on programming ever written. From the moment it was published in 1978, it has been widely acclaimed for being clear, concise, and direct; in 288 pages, the entire C language is described. It's well-written in a way that I think is of great help to the student; so, even though you'll need a 'softer' book to get you started on a lot of basics that The C Programming Language assumes you already know, it's worth looking over this book just to get some insight into what it will mean to learn the language, since it's so important. Ritchie and Kernighan helped build the C language six years before they wrote this, so it makes sense that the book is so ground-breaking. Oh, and you notice how every programming book starts with a 'hello world' program? This was the first book that did that.
  • Epigrams on Programming,” by Alan J. Perlis. Just a lot of fun, I think. And keeping it fun is the whole idea.

  • posted by koeselitz at 8:32 PM on February 19, 2010


    Objective-C isn't a hard languae to learn, as long as you don't try to treat it like C++ or Java. Still, I'd recommend starting with Python, which is both fairly easy to learn and not a toy language, until you're comfortable with th basic ideas.
    posted by hattifattener at 8:33 PM on February 19, 2010


    Oh, and if we're wondering if Objective-C is a good place to start: I don't know any Objective-C, but it seems like it's not a bad beginning. It would be a little insane to start with C++, but Objective-C, from what I've heard, makes a whole lot more sense.
    posted by koeselitz at 8:38 PM on February 19, 2010


    Although... I ♥ Python. So if you're on the fence at all, consider this a vote: you should start with Python.
    posted by koeselitz at 8:44 PM on February 19, 2010


    Well, from my own experience, I think its much more important to learn the concepts of programming than any specific language - many of the ideas of structured programming hold true whether you're coding in C, python, java, or what have you.

    Before I even got into C-family languages, I took a year each of BASIC and Pascal, and though I bitched and moaned about it at the time, I feel like I produce much better code having learned the ideas behind programming independently of the syntax of the language itself.

    However, from my limited experience with python and ruby, a lot of the modern languages are a lot more lax with data types and good form - they make things easier, but at the expense of efficiency and control and they can allow bad habits to develop; I'd consider it analogous to learning how to drive on an automatic transmission and then trying to learn a stick shift.
    posted by modernserf at 9:46 PM on February 19, 2010


    modernserf: "Well, from my own experience, I think its much more important to learn the concepts of programming than any specific language[...]"

    This!
    "Learning to program" is basically learning to structure your thinking.

    You need to be able approach a large problem and reduce it to smaller problems, if necessary repeating the process. A specific programming language ought to come in only at the very last steps, when the very small problems can be solved by translating them into the code of the programming language; but 99% of the work is done above this level, and that's where the fun is.
    posted by PontifexPrimus at 3:05 AM on February 20, 2010 [2 favorites]


    Nthing what others have said about starting with Python, and about learning concepts. The thing about Python is that it makes it easy to pick up those concepts... After that, moving on to other languages is mostly about memorizing new syntax & built-in functions.
    posted by usonian at 4:10 AM on February 20, 2010


    These guys did a thing where they gave away the source code to one iPhone app a day. Check it out...they're pretty simple apps, but fun, and hopefully helpful.
    posted by signalvsnoise at 12:15 PM on February 20, 2010 [1 favorite]


    Oh, and by the way:

    If you're even remotely feeling sort of Pythony about this, there are ways to do what you're wanting to do with iPhone apps and go the Python route. Python is one of the most mathematical and sensible languages out there, so us beginners often find it most intuitive, and it is (I think) therefore the best way to learn the fundamentals of programming in general, which is (as others have said) the whole idea.

    I think maybe Python would be a good route to try - and then you can just install the PyObjC package right away. The PyObjC module will allow you to write Objective-C / Cocoa applications in pure Python. Awesome, huh? See, here's how you would transfer this to the iPhone if you wanted.
    posted by koeselitz at 1:29 PM on February 20, 2010


    « Older Most interesting annual events in the US.   |   Canon 7-D & RAW files Newer »
    This thread is closed to new comments.