top | item 3610902

Programming

15 points| shainvs | 14 years ago | reply

Hey I'm a 12 year old who is trying to learn programming. I heard about this hacker news at ycombinator and I wanted to blog here. I heard that developers read this and I wanted some feed back. I am learning ios developement as well as website making in HTML. I wanted to ask you guys, "How can I learn programming the best and easiest way?"

Thanks for reading this article

12 comments

order
[+] code_pockets|14 years ago|reply
I started tinkering with computers at age 8, so I can relate to you very well.

At your age, I would start by installing a Linux distro of your choice (if you haven't done that first). Ubuntu is pretty easy to setup if you are a complete beginner.

Why use Linux?

You should start tinkering with Linux, because it is the most common development environment used.

Using Linux will allow you to learn basic troubleshooting and debugging. Those two skills are necessary if you desire to build any kind of application.

Linux will also allow you to try out different languages with a simple command (such as sudo apt-get install clojure1.2 (which I did two hours before writing this post)).

Then you can pick a language to learn the basics. By basics I mean how to write variables, functions, etc. A nice language to learn this is python, because it has a very simple syntax (syntax is how a language is written (like the difference between written English and written French)).

After learning how to write the basics, you should decide on a simple project to work on. One project that I reccomend beginners is to do a simple Rock/Paper/Scissors game. Focus on making it work, then focus on making it play against itself. This exercise will allow you to see your code work, and will keep you busy for a couple of days.

After that, you should head out and build a web app. Anything is fine, but a good project to start with a simple blog. You can use Python, but PHP is simpler to run, and is super simple to setup on your computer, thanks to a program called XAMPP (look it up, and install it). With PHP you can do all sorts of things. From calculators, to message forums, to whatever you desire. You can also pick an existing app and try to copy it. One fun project would be to copy hacker news, and adapt it to whatever topic you'd like. Or even build your own basic facebook, or a simple search engine. Try and build existing stuff.

One great thing about web apps, is that you can also learn to code various languages that interact with each other. You can mix PHP (or any other server side language) with javascript ( client side language (client means that it runs on your web browser and not on the server)).

At this moment, you should be pretty good at the basics, and may be ready to explore other more complex stuff. Maybe pick up a LISP-type of language. Or maybe you could try an polish your javascript skills. Who knows?

Here are some other pointers:

You should not limit yourself to one platform, one language.

Learning how to program takes years, not because writing the code is hard, but because designing real applications that work is quite difficult. This is the engineering side of it (and where most people fail, and/or quit).

Don't be afraid to try new (to you) things. You broke Linux/Windows? Who cares! Re-install and try again.

I started to tinker with computers at age 8. Took me years before I could even write coherent code (though I still wonder if my code is coherent). Yet, I'm here, enjoying it.

One final note: Don't quit. Quitting will make the biggest diference in your life. Keep going, even if slowly. You will get it.

Good luck!

My best,

code pockets

[+] shainvs|14 years ago|reply
Thank you so much for giving me such a detailed reply; and as you said, you started tinkering with computers at an early age. I am already learning python using a free open couseware from MIT using iTunes U. I have also learned the basics of javascript(using codecademy) and am applying it to HTML. I have a frind whose dad told me to start with HTML making web apps. He told me that app developement was to comlex for a beginner like me. I came to hacker news to learn more about what I should start with and what I should use to make simple but usefu applications

THANKS AGAIN!!!

[+] canadaduane|14 years ago|reply
You need to do two things to get good at programming: go deep, and go broad. The problem is, you can't do them both at the same time, so, you have to alternate between the two.

Pick a project that is awesome, and that you think you might know how to do (or even a little bit). Work at it and try your best. This is how you go deep. Basically, you pick one narrow thing and do it as best as you can.

Next, find someone (or a book, or a web guide, or a website like codecademy.com) that can teach you about the principles of programming. This is more of the "computer science" side of things: how CPUs work, how data is structured, what kinds of algorithms have been discovered and created before, how to succeed at putting complex parts together. Learn all you can about the general rules of programming and the lessons learned from many decades of people trying to get computers to do what they want. This is how you go broad. Basically, you give yourself over to someone who has some structured lessons to teach you.

Then go back to deep. Then broad. Repeat, until you are happy with where you're at (which, if you're an evergreen learner like many of us, will be never! :)

[+] shainvs|14 years ago|reply
Thanks I did finish alot of things at codecademy and all I have learned so far was either through w3schools, codecademy, or iTunes-U. Thank you for your feedback I will try and work how you said
[+] theiostream|14 years ago|reply
First of all, don't trick yourself: HTML is not a programming language, it's a markup language parsed by your web browser which then turns that markup into cool websites.

Then, wanting to code "the fastest way" is a wrong concept. Learn everything you can, doesn't matter how long it takes, learn right.

There are basic tutorials on programming languages online which are good for starting up, and then there are thousands of books and documentation which might help you around. Specifically, for iPhone development you need to know the Objective-C programming language, so here's a tip: Don't head into coding a huge app hoping you'll just learn by making it, while you just end up copying code from StackOverflow entries. Learn, and then use what you learned inside an app.

IRC is a great way to talk to experienced developers, and browsing source code is also great for learning new coding techniques. If you need any more help, I'm always reachable.

(Also, as a wise man said, "Age is just a number". Just because you're very young, it doesn't mean you can't do stuff better than a 30 year old might. All it takes is effort.)

[+] shainvs|14 years ago|reply
Thank you very much. Ya, my concept of speed does not matter as long as I do it right. I have looked at alot of iTunes U tutorials and have also finished alot of codecademy couses. Thanks for your effort!!!
[+] tait|14 years ago|reply
Heh.

The better question is "How can I learn programming the best way?"

HTML is good. iOS is also good.

Learning programming quickly: For playing around, Processing is fun. For "real" programming, I would suggest getting a copy of Learning Python and working through it.

Learning programming well: Get a copy of Kernighan and Ritchie (The C Programming Language). Learn it. Then do the same with The Structure and Interpretation of Computer Programs (Abelman and Sussman). Once done with those, you will be WAY ahead of most teen programmers.

[+] shainvs|14 years ago|reply
Thank you,

I have had some "experience" in python programming but I dont just want to learn scripting; I also want to learn visual programs, but yeah I'll try out the books that you recomended. So far I have been learning through itunes-u and some free stanford classes.