Hacker News new | ask | show | jobs
Teach me to code
3 points by davepm 5275 days ago
I ant to learn to code. I don't know where to start! I did some Basic, PASCAL, C/C++ at school/college, but never kept going with it. I've read some books on Ruby, Python, Haskell, Javascript but don't know where to start to learn "properly". I know the answer to the question "which language?" is "whichever solves the current problem best!", but where does one start? Do I just pick which one I like the look of best? IS there even a best place to start? Any help and guidance would be greatly appreciated!

Dave

5 comments

You will need to know HTML and CSS. They are basically easy, but you want to create some static pages first. Next, you will want to try using Ruby on Rails or PHP. PHP is probably easier to learn but its functions are less intuitive. You can find a plethora of information at http://www.php.net and the documentation of the language is phenomenal. If you have a shell account with your web site, that would be good, but it is not required with PHP as any file ending in .php will likely run on servers that support it. Start with <? echo "Hello, world!"; ?> and go from there! You will need to know how to use an FTP program to upload your files and a web site where you can play, and you are good to go. Getting started is the easy part. Breaking bad habits is the hard part, but you must get your feet wet before jumping in the ocean.
Oh, and to add more... JavaScript, HTML, and CSS are primarily client side languages. You can learn these by simply creating content in an HTML file on your own computer if you do not even have a web site.

If you want to do anything with databases, you will want to use MySQL with something like phpMyAdmin to help you create your databases. Learning MySQL is important, but if you just want to get started, you can use phpMyAdmin at first. When you are ready to be a real web developer, though, you will want to learn the following:

• HTML, CSS, Javascript • Basic Linux commands with a SSH login • Use something like WinSCP instead of FTP programs • MySQL • Object oriented programming in the language of your choice and how to make your code modular • (PHP with a framework like Yii or CakePHP) or (Ruby on Rails)

I recommend simply playing at first. Always remember to abstract and encapsulate whenever you can. This is a good habit and can make learning easier because you basically start to form your own meta-language in this way and things are easier to learn if you are the one that created them.

Thanks, gives me some things to think about.
http://learnpythonthehardway.org/

I'm starting to feel like a shill for pushing this one on people, but it really is one of the best "learn to program" books I've seen.

I do believe i may have a copy of that book somewhere in my "to read someday" pile :)
I just launched http://peanutty.org - it's still very raw, but the point is to help people learn how to code. There might not be enough there, but I'd be happy to help you figure out how to code your own levels.
One answer to that: http://codeyear.com/ :-)
Already signed up to that! Also saw the link on that page to codecademy.com, so might take a look at that too.