How to get a 15-year-old started with coding?
I was thinking about inviting him to spend a few weeks at my dev shop where he can work largely in isolation but I'll be around and a couple of my guys can give him some guidance and help him learn.
Basically, my question is if you were trying to introduce a 15-year-old to coding, how would you go about it?
I was thinking about sticking a few books in front of him and challenging him to build a basic twitter or flickr clone just to give him a target. Maybe 2 days on HTML/CSS, 2 days on JQuery, 3-5 days in PHP or Ruby but I want to keep him away from frameworks, maybe another week with MySQL or SQL and trying to put it all together. I can build him the DB if needed.
It's been 16 years since I started so it's hard to put myself in his shoes. For some of you younger coders:
1) When you started coding, what did you start with? HTML/CSS, then basic scripting or JQuery, then DB stuff? What language would you start with today if you were just starting?
2) What resources did you use? Web sites/tutorials? Books? Any good entry level books you'd recommend I put in front of him?
3) Did you have specific things you were trying to build?
4) Did anyone help you or provide guidance? If so how/what?
5) What kind of guidance would have helped you?
14 comments
[ 5.1 ms ] story [ 56.5 ms ] thread2. Built-in documentation, college classes and web documentation. Generally I find documentation far more useful than tutorials. I would highly recommend checking out Zed Shaw's new book: Learn Python the Hard Way (http://learnpythonthehardway.org/index).
3. I don't think I've ever learned anything when I didn't have something specific to build. Just playing around trying to learn stuff never works for me. I need to have a reason to learn, a project that needs the technology I'm trying to learn.
4. I've had very little direct guidance in learning to program. I had my professors, which helped me mostly by introducing me to the technologies and giving me things to build. I've had various people on StackOverflow help me with particular. Mostly, I am guided by inspiration, not direction interaction. People like Zed Shaw inspire me. People like why. Sometimes libraries inspire me. LINQ is incredibly inspiring. As is pyparsing. These people and libraries give me an idea of what I want my contributions to the programming world to look like.
5. Best guidance in my mind is giving you a tool and then giving you something to build with it. I never would have found Ruby without one of my professors (or I would have found it a lot later). I may never have cared without Ruby Quiz and Rails inspiring me to build things. This is why I think you should check out Zed's python book. He teaches the language by giving you the tools and then asking you to do things with them.
Edit: O.K., I don't have any current ideas, sorry :)
If you have a modern enough browser you might be able to keep it to html/css/javascript and use web storage for a database. That'd be good for some little single user system or browser based game or something.
Depending on the type of person he is and what you work on at your dev shop you could get him to fix real-but-small problems -- language in error messages, pixel level interface visual problems, etc.
I'd avoid HTML/CSS/PHP like the plague for a newbie. Have him write an ELIZA-style chatbot in Python or do some Project Euler questions in Python/C++/C#/Java
To answer your questions directly...
1. I'd start with JavaScript because it's fun and useful (despite its warts) and either python or ruby.
2. Stackoverflow.com, The Pragmatic Programmer
3. I had a client/server computer science course that was making me build very small apps but it wasn't until I had an idea for something I really wanted to build that I started staying up all night learning. Before I had either my own "itch to scratch" or a professor requiring me to building something I floundered and got bored quickly. I needed a clearly defined goal to accomplish.
4. Sadly, no. My professor wasn't really interested in his students. Google was my only friend.
5. For someone to sit down and clearly explain fundamental concepts to me like OOP, MVC, etc. It's one thing to read about it but someone over my shoulder pointing at things and explaining why a block of code sucks or not would have really helped.
Best of luck. If you nephew sticks with coding, he will really thank you later!
2) Random tutorials online and an O'Reilly PHP/MySQL book.
3) Yes, and that was critical. I basically learned what I needed to get the next thing done
4) A friend helped get me pointed in the right direction, and I took it from there.
5) General best-practices. I started with just notepad and had horrible coding style. I think just having someone to answer questions and occasionally review code would have been a tremendous help.
Although PHP pretty much sucks as a language, it was extremely gratifying to see my work progress quickly ("Look, I made that dynamic list out of values in a database!").
About helping your nephew, try to make him see it as a game and have some fun. Explain that the computer does whatever he wants, he only has to program it himself. If the application, in whatever language it is written, doesn't run, you have a 99.9% change it's your own fault.
2) Started with a teach-yourself HTML 3.2 book. For learning JS today, I think eloquentjavascript.net is good if a bit dry and I like Manning's jQuery in Action if going the jQuery route.
3) I started out with the intent of making a WYSIWYG web editor that didn't suck...and I'm still planning on doing it at "some point".
4) No guidance for me, unfortunately. Aside from having a professor in my first Java class say "well don't worry about that, you don't need to understand it for a while", which annoyed me enough that I went and learned Java myself through Thinking in Java. Otherwise I'm entirely self taught.
5) Guidance on what to look at/what to understand would have been helpful. I'm very grateful to the mozilla project, since that's where I learned software engineering. Having someone point out version control earlier on would have been helpful.