

Ask HN: Advice for 14-year-old who wants to learn to code? - robdoherty2

My younger brother who is a high school freshman wants to get started learning how to code.<p>He has no experience with writing code and little general computer knowledge about stuff like OS&#x27;s file systems, etc. Basically he would be starting from scratch.<p>What would be a good place for him to get started?  I&#x27;d like to give him some resources so he can learn at his own pace, but I also don&#x27;t want him to get overwhelmed and decide coding is too hard.<p>Thanks
======
trcollinson
My son, who is a little younger than your brother, wanted to learn to code and
I tried a number of things but they didn't really stick. He kept "wanting to"
but never really learned past regurgitating the tutorial. Finally, he picked
up my TI NSpire CX CAS and started playing with it. For us really old guys
it's like the next, next, next gem TI 82 graphing calculator.

The TI has always included a programming language and interpreter in their
calculators. It used to be "TI Basic" but now it is full Lua. They have
hundreds of example programs to look and and learn from and tutorials galore.

The thing that finally made it click for him was, he could take this little
handheld machine anywhere and whenever a programming thought struck him he
could try it. Soon he was building reusable functions and libraries of
reusable functions and everything clicked.

Now he's transferring a lot of that knowledge to other languages, most
recently Python, without any trouble at all. I would recommend it to anyone
with a kid who is interested in learning.

~~~
canadev
That sounds pretty cool.

I found C for Dummies at my uncle's house and got lucky. I loved it.

I've always wondered what alternatives there are. Most of the college
textbooks I had were too dense to get into, but I think I remember the Deitel
and Deitel ones were descriptive enough, but kind of dry.

Maybe I'll keep this TI NSpire CX CAS in mind next time the question comes up.

About 1.5 years ago someone posted this discussion of a related article on HN:
[https://news.ycombinator.com/item?id=6303654](https://news.ycombinator.com/item?id=6303654)

------
lgas
I'm sure there will be a ton of good advice here, but one thing that I've
always found helps a lot, regardless of what other resources or approaches you
are using is to come up with a project that you want to complete and then use
that to focus the rest of your learnings. It helps guide the learning and
exploration.

It's probably better to pick something smaller and more achievable at first so
you can make some early progress and experience some successes but picking a
huge goal is fine too, you just have to break that huge goal down into smaller
and smaller ones until you have a reasonably sized sub-goal to break off and
work on.

------
Jeremy1026
I like Codecademy[1]. They have courses in a few different languages ranging
from HTML to Python. I went through the PHP course once to pass time and to
evaluate their product as I had friends ask me a similar question. (I am very
comfortable with PHP, which is why I choose that course.)

[1][http://www.codecademy.com/learn](http://www.codecademy.com/learn).

------
zachlatta
If he's interested in games, buy him a book about game programming in a
language that you know and would recommend for beginners. I got started
programming because I wanted to build games and made the mistake of starting
with web development.

Chances are that moment he makes a shape move on his computer, he'll be
hooked. At least that's what happened to me.

If there's a CodeDay ([https://codeday.org/](https://codeday.org/)) near you,
bring him to it. It's a nonprofit 24 hour hackathon for high schoolers. He'll
meet a bunch of other people his age who are also into programming and will
build and present a project by the end of the weekend. In the past we've had
participants build everything from a breakout clone to a bootable OS in pure
x86 assembly, so there'll be a wide range of skill levels and he'll see his
peers building incredible things. Disclaimer: I'm one of the organizers of
CodeDay LA.

There's also a Facebook group filled with other high schoolers who are into
programming
([https://www.facebook.com/groups/PennAppsHS/](https://www.facebook.com/groups/PennAppsHS/)).
If he has a Facebook, send me a link to his profile to my email (in my
profile), and I'll add him to the group.

I'm also high school-aged and, if appropriate, would be more than happy to
talk with him. Feel free to reach out to me through my email (again, in my
profile).

Also see
[http://www.paulgraham.com/pfaq.html](http://www.paulgraham.com/pfaq.html).

------
johnfc2014
I would say something like Swift, which would empower him to make apps that
could make money too.

[http://www.learnswift.tips/](http://www.learnswift.tips/)

Also a Virtual Machine, such as VirtualBox would help him learn how other
operating systems work without breaking his own computer.

~~~
ranty
I do kinda like swift. Also, Kotlin was a revelation - particularly since the
tools are so damn good.

------
davidf18
When I was 17 at my junior/senior high school, I taught about 20 entering 7th
grade class programming and it worked out very well.

Downey's Think Python might be a good place to start (free download, but I'd
recommend getting the hard copy)
[http://www.greenteapress.com/thinkpython/](http://www.greenteapress.com/thinkpython/)

For reviews: [http://www.amazon.com/Think-Python-Allen-B-
Downey/dp/1449330...](http://www.amazon.com/Think-Python-Allen-B-
Downey/dp/144933072X/)

You might consider this book or related ones listed on Amazon:
[http://www.amazon.com/Python-Kids-Playful-Introduction-
Progr...](http://www.amazon.com/Python-Kids-Playful-Introduction-
Programming/dp/1593274076)

There is this Intro iOS/Swift programming book that claims to teach non-
programmers..... [http://www.amazon.com/Introducing-iOS-8-Steve-
Derico/dp/1491...](http://www.amazon.com/Introducing-iOS-8-Steve-
Derico/dp/1491908610/)

This book also seems very interesting and doesn't seem to require much/any
programming experience:

Analyzing Baseball Data with R [http://www.amazon.com/Analyzing-Baseball-Data-
Chapman-Hall/d...](http://www.amazon.com/Analyzing-Baseball-Data-Chapman-
Hall/dp/1466570229/)

I _do_ think it is very important that somebody be readily available to
teach/help with some of the concepts....

------
kwhitefoot
Coding is not an end in itself. Your brother will need a reason to code, a
problem to solve. That should come first and should be quite a small problem.
Then choose the easiest tool with which to solve it. Operating systems, file
systems, etc. are pretty much irrelevant.

You can do a lot with ancient tools like QBasic, simple graphics and so on.
For more sophisticated things Python is a good tool because it has a simple
syntax that is very readable and uncluttered.

Once he has made a few simple things like that run then if he has an Android
device it might be worth installing Android Studio and trying to build some
simple apps. There are plenty of tutorials with complete source code that can
be examined.

And finally make sure that he understands that he can ask for help. The Net is
full of information and people who can and are willing to help. I forget who
said it: "There is no such thing as a stupid question, only stupid answers" so
impress on him that when he gets genuinely stuck that he only has to ask on
something like StackOverflow or many other forums.

------
gaelow
Tell him to join a local open source community and learn to work in group
projects and to code in a team close to other people (Like the GDG, for
example. It's free and in my town every week or two they organize meetings,
hackatons, workshops and many interesting talks which they post on youtube in
case you cannot attend that day). He can be useful even if he knows nothing,
by being assigned the most trivial tasks or watch and help. Tell him to find a
mentor and to get used to version control, code reviews, test writing, quality
assessment, applying design patterns. Those are every bit as important as just
learning how to code algorithms. I believe coding by yourself tends to make
you a "bad" coder, in the sense that unless you are amazingly self disciplined
you can take on a lot of bad habits that are very difficult to get rid off
later on.

------
hardwaresofton
A lot of college introductory classes use python as a learning language, and I
think that's a good thing.

I would suggest heading to the library (whether public or high school's) and
taking out a book on Python. There are a lot of online books, but I find that
having a physical book you're learning from is a worthwhile experience.
There's less distraction, and watching that bookmark move from the beginning
to the end of the book is very satisfying. Also, I thnk it's extremely
important that you be there to guide him, and foster inquisitiveness, as
that's a very key property of some of the greatest computer scientists and
hackers.

I will echo Igas's suggestion also -- it would be great if he had something he
wanted to build to channel this urge into. Even dinky little programs like
text-based calculators feel impressive when you're starting out, and get you a
feel for programming quickly.

When he wants to cut his teeth on stuff that is "real world useful" you can
show him a framework like Flask (which is wonderfully minimal), and have him
make a web server on localhost. That would be a perfect segue into web tech
(HTML/JS/CSS). That might also be a good time to introduce a second language,
like Ruby (which is similar enough to python) to show how similar languages
can be to each other. I would say this sets you up to introduce the most
important parts of CS: the data structure & algorithmic underpinnings. This is
the stuff that sticks with you for a very long time and is always useful, no
matter the language.

This might be wishful/meaningless thinking, but you could also introduce him
to SICP classes by abelson and sussman. I say this for a few reasons:

1\. Lisp is simple, yet powerful (they show this)

2\. The realization that very little about computer science is actually "new"
thought

3\. Introduction to the plethora of college-level courses available for free,
and getting used to being in charge of your own education (but using a more
traditional medium)

------
SixSigma
Blimey, what a complex set of things to learn nowadays - writing apps and
javascript !

When I was a lad I started with the most powerful computer I could afford - a
pencil and paper.

Show him this

[https://www.cs.drexel.edu/~bls96/museum/cardiac.html](https://www.cs.drexel.edu/~bls96/museum/cardiac.html)

See if it interesting.

Then I moved on to the next most powerful computer I could afford - a ZX81
with 1k of RAM connected to a television set!

I would type programs in from books and magazines and see if I could get them
to work - so I learned to fix programs before I learned to write them.

So I still advocate this route. Not writing apps for iPhones or trying to
write Xbox games and build websites.

Buy the simplest thing I can find - something like an Arduino that does things
on a small scale. Learn how computers work, not how to program them.

------
mtmail
I did [http://tryruby.org/](http://tryruby.org/) with a friend. She
understands better now what I do and what I mean by 'variables' but never
touched code again.

------
saluki
I would introduce him to coding by starting with the basics of HTML and
progress through the following:

(install MAMP or WAMP for him to get him started, then get him a domain name
and hosting for his own simple website)

HTML CSS javascript jQuery PHP MySQL

I recommend Head First HTML and CSS to get started. The other books in the
series are good as well all the way up to Head First PHP and MySQL.

TeamTreehouse.com is a good place to start as well or pick up with once you
make it through a few of these books.

Once he gets through those I would point him to learning Rails and/or Laravel
frameworks creating a few web applications.

Apps are fun too if he has an iPad and/or iPhone go through the iOS App
tutorials on TeamTreehouse.

Good luck in 2015.

------
palavrov
IMHO the most important thing is to keep his interest continuously for several
years. I would suggest these steps: 1: Finding what is interesting for him -
games, web, automation, hardware, etc. Open source project or good step-by-
step tutorial is good starting point. 2: Preparing a build environment 3:
Building and running 4: Doing small change in the sources - renaming
something, etc. 5: Building and running again ... N: messing deeper with the
source, changing complex things N+1: Building and running

In that way he will learn the fundamental process of building something in
small steps and endless iterations, messing with other peoples code and
navigating easy in it - that one is important too.

------
fillskills
I just taught my sister to code. Started out by talking to her about different
kinds of projects/things that can be accomplished using programming. Once she
had a grasp of what all can be done, she told me about what she wanted to do.
She wanted to build a website to track food. Sent her to
[https://dash.generalassemb.ly/](https://dash.generalassemb.ly/) to get
started. After finishing that, she has now started googling specific tutorials
and building the site on her own.

------
dfansteel
I'd send him to [http://codecombat.com](http://codecombat.com) . It's not real
productive coding, but it's a decent enough entry point for someone who may
not have found their passion yet.

For me, coding is a passion. A labor of love. I haven't worked a day since
starting. As an iOS developer, I'd say learn Swift. Apple pushed the great
reset button and we're all starting from the same place.

------
nRike
Have you tried Codecombat.com? I think this is a great way to get started,
have fun and at the same time learn the basic concepts of computer
programming.

Once he understands this, you should encourage to hack into Minecraft hacks.

Later you can ask him about start their own projects and help him when he got
stuck.

Programming should be fun and using a language only a tool for their mind, so
help him become passionate about build things for himself.

------
ConnorRoberts
I taught myself to code at a similar age (around 13, am 17 now) so this is
based off personal experience.

Python's recommended a lot but personally I'd avoid it, it's a nice language
but there isn't much to use it for without starting using frameworks.

What I'd recommend is starting with web development (that's where I begun).
HTML can be taught easily and provides quick gratification, you can easily
teach enough to produce results in a few hours, alongside HTML I'd teach the
basics of CSS. I can personally recommend W3Schools[1] (though I believe
codeacademy[2] is good as well), this can easily be personalised to make it
appeal to your brother.

When he's got a decent grasp on this, Javascript or PHP links in perfectly (it
could even be an extension of the HTML lesson - a larger project) so would
work well to move onwards.

Another thing that I wish I'd have known about when I was learning is the
amount of support available. I've since been involved in a local CoderDojo[3],
if there's one where you are, I'd highly recommend going along to one with
him! Even without any coding experience, I'd recommend it.

If you have any questions, feel free to ask :)

[1][http://w3schools.com](http://w3schools.com)

[2][http://codecademy.com](http://codecademy.com)

[3][http://coderdojo.com](http://coderdojo.com)

------
dibillilia
I am a highschool freshmen. I would say to learn HTML and CSS from W3 schools.
Then learn Python from
[http://www.learnpython.org/](http://www.learnpython.org/), until he can use
dictionaries. Then move to javascript and web development from MDN. Use
node.js for server side so you only need to learn one language and can make a
working app faster. Unless he wants to make games, then just learn Processing,
then maybe C. Or brag to colleges, then just learn Python.

Python makes the transition from HTML to Turing Complete languages much easier
since you don't need to worry about syntax. I am speaking from experience, I
couldn't learn JavaScript until I learned the basics of Python.

Also, a large project is important. Working on my large TSA project has taught
me a lot more than I would have learned by fiddling with smaller things.

Avoid web app tutorials that make you pass a test before continuing. Code
Academy, Khan Academy, and similar things are nearly always horrible for
actually learning. For example, Code Academy starts its CSS turorial with a
CSS3 animation, and has 5 screens for a Python tip calculator, with cryptic
instructions that make coding seem a lot harder than it actually is.

~~~
yzzxy
I couldn't agree less.

W3 schools is considered harmful by many and has at least in the past taught
incorrect interpretations of standards. Please do not suggest them as a
resource for new learners. It's better than it used to be, but is still
unaffiliated with the W3C. MDN is a better resource.

For games, C# or Javascript are far better choices than Processing[0]. And C++
is a better choice than C, regardless of personal preference toward one or the
other. Almost every game is written in C++, and libraries are designed
accordingly.

Also, I would not recommend learning both server-side Python and Node. Node is
not objectively better so there is no real reason to switch over just because
it's "hot." Python has much more mature libraries and modules.

Large projects are not good for beginners, they cause sunk cost fallacy and
probably repel a lot of people from new disciplines. Better to adopt a series
of smaller, exploratory projects rather than reaching towards a momentous goal
from the start. Beginners will only find themselves refactoring the same code
over and over and over as they learn how to be idiomatic and efficient.

I _would_ second the no CodeAcademy-style tutorials advice, and recommend
picking up a good book in whatever language you wish to learn. Not a "For
Dummies" style book, but one that is respected in the language community.
O'Rielly books are often good, but usually a community will have one or more
"bibles" that are the best track to follow. _why's poignant guide is a
standout example.

Finally, I would urge any beginner to look beyond web development. It isn't
really a good way to learn programming: 90% HTML/CSS work that doesn't involve
control flow and 10% string munging. Games are better, but application
development is best, and is likely to involve learning skills that will
actually continue to be relevant and interesting in 5 years.

Source: I'm an autodidactic programmer who worked professionally as a software
engineer while still in high school. I help teach a high school CS class.

[0] I love Processing but web and XNA framework games are way better for new
learners especially.

------
ericssmith
Why is he interested in programming? It must seem cool to him for some reason.
I'd try to tap into that in order to find a direction to go in. And for a 14
year old, it would be helpful to find some heroes. Without the cool and the
heroes, it may be hard to devote the time for it to be impactful.

------
0942v8653
One great framework is [http://pygame.org](http://pygame.org) which is a
flexible game and graphics Python module. It's great for learning Python and
it's very easy to use (while still giving you a lot of control).

------
iqonik
In the UK, school goers do a 2 week work placement. Don't do what I did and
let them choose for you, suggest an online company and push to shadow a PM,
dev...it will at least be interesting and you might just learn a thing or two.

------
sopooneo
What does it mean that he wants to code? Are you a programmer and he looks up
to you, and wants to be able to accomplish as much as you? Or does he want to
be able to produce some particular type of end product like games?

------
nailer
I started in OSes and filesystems, but I recommend hitting Cmd+Alt+i on this
page and typing:

    
    
        var comments = document.querySelectorAll('.comment');
    
        [].forEach.call(comments, function(comment){comment.style.backgroundColor = "#ffaa44"})
    

Instead.

~~~
_RPM
Array.prototype.forEach.call(..) is more efficient because it doesn't create a
new array.

~~~
nailer
Fixing NodeList.prototype.forEach() is best because it doesn't read awfully
but this is someone learning to program, not to fix the DOM API.

------
phpguru
Great way to introduce programming logic at an early age (or all ages) ...
[http://scratch.mit.edu/](http://scratch.mit.edu/)

------
linksbro
What is his favorite video game? Chances are there will be opportunities to
mod the game / gameserver, which will really get his motivation up.

------
_RPM
Give him a browser, and teach him to manipulate the DOM using JavaScript. It
is very rewarding when just starting.

