In Stanford’s intro CS classes they use a real stripped-down little world and language called Karel to teach the basics of programming. Karel is a robot who only knows how to do a couple of things, and you control her/him/it in a little world, and teach it how to do new things by learning about and writing basic functions.
A friend of mine, Jeremy, has adapted this curriculum and made it widely available at CodeHS.com. Instead of a robot, Karel here is a dog who picks up and puts down balls. You get to help her navigate around her little world and solve puzzles by writing code. It’s designed to be kid and teenager-friendly, but it’s also literally the first 2 weeks of the Stanford CS program–a versatile curriculum that establishes a good foundation no matter your age.
So if you are starting at the basics, learning the fundamentals of coding with Karel could really help you get off on the right foot, whereas diving in with other tutorials may overwhelm. Code.org is another site aimed at teaching programming from the ground up, and they actually use Jeremy’s Karel software as well.
Once you have the basics of programming, you can really branch that out to learn any language relatively quickly–it’s mostly syntax from there.
Like Meg, I love Code School as well and have been a member for the last couple years. You can hop on their HTML/CSS path regardless of your programming experience. But for their other paths, knowing the basics of programming from Karel or another resource is pretty necessary.
There’s a lot of support for online sources here, I don’t know why places like Codecademy get the reputation they do. To me, it’s like MOOC’s, you’re not actually going to learn anything from them, because they’re meant for passive learners. Codecademy is a one project type of site (as all the rest are) and it won’t teach you fundamental concepts. It basically just teaches you what to type in to make certain things happen. (This is not learning, nor will you ever become a programmer like this.)
As someone who has been through all of these online sources. Please, take great caution with these things. Most of them are a waste of time. (Esp. Codecademy and The New Boston).
If you want to really learn and take it seriously. Look for Pearson and McGraw Hill textbooks. Such things are truly meant for the professional level and unfortunately, at the moment, there is no online equivalent.
I’ve learned a lot from MOOCs especially the ones on Coursera and edX. They are taught by some of the best professors and teachers at Universities across the world and they are free! I find that I learn the same material faster by taking a free online course when compared with my University courses in computer science.
Harvard’s famous introduction to computer science course is on edX for free.
The very best way to learn to code is to code. Find an itch that you need to scratch, and figure out how to scratch it with PHP (or whatever other language you want to learn). There are tons of resources online to use for language references. If you know some PHP coders, ask them to look over your code for structure and give you advice on how to improve it.
Matthew is right. Code Academy will get you started. Next you need to build something. Try looking for an open source project doing something that interests you. See if there are any bugs you might be able to take care of. Look at the code, try it out, try to get it running in your own dev environment. Step through it and see how it works. See if you can fix a bug or help with a new feature. Look in your community for a startup. You might be able to intern with some new small startup or they might need someone for testing or working on new features.
Hacking Secret Ciphers with Python is a great book, it teaches both python and cryptography, you’ll get your own RSA public key algorithm at the end of the book. It is free and he accepts bitcoin donations.
I’ve used Codeacademy to learn how to build a website. As Ethan says, I think it is for passive learners. It just says you what to write and you have to wirte it. You don’t have to think, just copy the code.
Maybe the problem is me, maybe I’ve not used Codeacademy with the right mindset or maybe I gave up too early, but I think there are better ways to learn to code. Now, as Johnathan has done, I’m looking for some courses at Edx, I hope they will be more useful.
And can anyone suggest me a better way to learn to build a website? Sorry, I’ve just started to gain informatic skills.