I've been teaching programming to my 13-year old son for over a year now. I'm not satisfied with his progress. I think that one of the reasons is his attitude: He wants to learn programming (he said several times that he wants to do something related to programming, technology, and/or game development), he makes some progress (he decomposes the task into smaller ones, he tries things out), but he regards it as work.

One of the secrets to productivity in IT is that many programmers enjoy the process. It's not work and it's not a chore. Sometimes, I turn on good music, take a bottle of liquid happiness, then program for several hours for the fun of it. I'm not accomplishing a task, I'm enjoying the process. Under the right circumstances, you can get into flow from such "work".

What can I do in order for another person to experience the feeling that programming is an activity you can do for fun and recreation?

  • 4
    Please avoid answering the question in the comments. Comments are for suggesting improvments or changes to the question, not for discussion (which can be had in chat) or answers. Answers or discussion in the comments will be reguarly cleaned. – thesecretmaster May 17 at 22:22
  • 5
    This is... wrong. You can't teach someone to enjoy. – RonJohn May 23 at 3:26
  • 1
    @RonJohn: You can't force someone to enjoy. But you can teach them how to find the joy in doing something. As a simple example to prove the principle, young children can often be motivated to do something by claiming that they're not able to do it. While that is very basic reverse psychology, it proves that you can change someone's experience with the same "chore" by reframing it for them. – Flater Aug 22 at 13:42
  • @Flater you can teach me how some people will enjoy salesmanship, and you can teach me the usefulness of selling, but you'll never teach me to enjoy selling. – RonJohn Aug 22 at 14:08
  • @RonJohn: OP was not explicitly asking for a surefire way to teach literally anyone to enjoy programming. That is warping the question to suit your answer. – Flater Aug 22 at 14:25

26 Answers 26

up vote 84 down vote accepted

Meet him where he lives. Take something he's already interested in and use programming to accomplish some goal within that interest. The act of coding is not the end goal, the final "product" is the end goal. Make it about that.

For example, you've said your son is interested in game development. Encourage him to create a simple game using a language like Processing or a tool like Game Maker. The keyword here is simplicity- your son will probably want to make Call of Duty or Minecraft. Encourage him to start with Pong instead, and work his way forward from there.

Maybe participate in a "game jam" like Ludum Dare together. The idea is to spend a weekend creating a game around a theme that's announced on Friday, and you can participate from your own home. The next official event isn't for a couple months but they run "mini jams" every other weekend.

It doesn't have to be game development though. The idea is to use programming within his existing interests so he sees the fun and utility of code naturally. If he's into sports then maybe write a sports simulator. If you travel then maybe have him create a travel log from Google Maps API. If he's into music, create a music visualization. If he's into movies, point him to video processing libraries.

But again, the projects you give him should be simple, so he can make visible progress on them in a short amount of time. You might also consider being an example: what cool projects are you working on that you can show him? Can you give him a simplified version of something and have him "remix" it by changing variables and logic instead of needing to come up with everything himself?

Related questions:

  • 33
    I resonate quite a lot with this answer. Programming itself doesn't interest me, and it's my day job. What does interest me is creating interesting things using programming. – Chris Cirefice May 17 at 20:24
  • 5
    This is an awesome answer. So many people don't seem to get that programming is a skill, just like woodworking, blacksmithing, or writing. What matters is not the process, but the end result. Once someone realizes this, it changes how they approach learning to program, and usually makes it far easier. – Austin Hemmelgarn May 18 at 0:35
  • 8
    My favorite part of programming is the "aha" moment when my code finally works. And that moment is so much more satisfying if the thing that works is something I'm really excited about – alexdriedger May 18 at 5:05
  • 7
    What I do when I get 15 year old school short-term interns at work is perk their interest. Often it's games like World of Warcraft or FIFA or something. Writing a web scraper or an API client with them to do statistics on something they have intimate knowledge of is great. When EA had an online platform for FIFA I built a little league calculator to use with all his friends' account names, and it would compute funny stats like how often someone dominated a game but lost anyway because sometimes a game is just like that. Those things are very well received. – simbabque May 18 at 9:14
  • 9
    @AustinHemmelgarn That's far from generic. I really enjoy programming for the sake of programming, I rarely care much about the end result. The shape and flow of the code matters. Just as a woodworker would enjoy physically working with the tools and material, shaping the wood with their hands. – pipe May 18 at 9:32

When you point at someone, there are three fingers pointing back at you, so I have some questions for you:

  1. How many people do you know who are also interested in programming, outside of work, obviously?
  2. When you were 13, how many people did you know who were interested in the same things as you (even if it was not programming at that time)?
  3. Even among people you know who are also interested in programming, how many are interested in the same aspects of it that you are?

It is quite possible that your answers are: zero, zero, zero. That has been the case for me throughout my life, about basically every area which interests me. That bad news is that you cannot get anyone else to like the same things you do. I look in vain for anyone else who has even heard of 16 Bit Lolitas, let alone likes their music. (You could start.) I don't know anyone else who eats bags of Ghirardelli dark chocolate chips. When I was a child I had no friends who also scavenged parts from discarded TVs, or was even interested in electronics.

You say that your son is interested in something "related to programming, technology, and/or game development", but that is a massive area which includes many non-programming things. I used to own an acoustic and electric guitar, but try as i might, I had trouble making myself practice. What really interested me was the equipment: guitars, amplifiers, microphones, PA systems... But I couldn't "form a band" that did event staging. (I was involved in theater in High School though.)

Some things are just not available. When I was a child, no one ever sought out and took me to the large, active Amateur Radio club right there in town. Parents and other adults didn't know or care about it, so I was not helped with that. Maybe you could find out what your son is really interested in and get him there? Taylor Swift's parents relocated the family to Nashville when it was obvious that she could sing and write music.

When I was a member of a large and active Amateur Radio club recently, I did not know one other person whose interests really were similar to mine. The field is simply too large. I was an expert in magnetic loop antennas. We had an expert in contesting, one in Morse code, another in microwave equipment, and so on. All of us were essentially alone in our interests, and no matter how many times we introduced our fav topic, it fell flat, even in a group of like-minded people!

My advice is to "get used to disappointment", but be as helpful as you can, with whatever your son wants to do. Many people get to college (as another question here recently stated) with no idea what they want to learn about or do with their lives. This is incomprehensible to me (I was asking about computers when I was 7, long before the IMSAI hit the streets) and so I have no advice on how to generate interest, convey it, inculcate it, support it, or any other thing to do with it. It just is whatever it is, or it aint.

  • 8
    Ad How many people do you know who are also interested in programming, outside of work, obviously?: The majority of people who publish their code on GitHub, SourceForge etc., who attend Hackathons or developer conferences, spend their leisure time in hackspaces, record IT-related podcasts. Off the top of my head I came up with 6 people, three of whom I know personally. 99 % of the time they are not paid for it. – DP_ May 17 at 15:07
  • 1
    Yes, there are a lot of people who do programming in their leisure time and put things on github and so on. But many do it only because it is a valuable, sometimes the only counting thing which matters during an application, or as part of learn something new. Personally, most of my stuff I have on Github is not their because I enjoyed the work on it, but because I liked the Reward and Acknowledgement from the Community around it. – Flyingmana May 18 at 10:35
  • 1
    "Personally, most of my stuff I have on Github is not their because I enjoyed the work on it, but because I liked the Reward and Acknowledgement from the Community around it." I program for enjoyment and don't care about recognition. When I publish a Github library, creating something that helps other people is a side effect of doing something I enjoy or writing something for my own use. I've also genuinely never met a programmer who has stated their reason for programming is for reward or recognition until now. – Pharap May 18 at 22:10
  • 3
    @Pharap Indeed, that's clearly seen by the gigantic amounts of code on GitHub that clearly isn't targeted at the general (programming) public - it's just some code somebody wrote to either play around with something or to solve their very specific problem. As silly as it might sound, people have different motivations - some are in it for the coding fun, some for the end results, some just to try something new (and get feedback if they're lucky), some for recognition... You can't really generalise much. Different people often do the same thing for different reasons :) – Luaan May 19 at 7:32
  • 1
    To highlight DP's point one only needs to visit codegolf.SE – Darren H May 20 at 0:28

Let's take a look at the condition's for Csikszentmihályi's1 flow theory:

Flow theory postulates three conditions that have to be met to achieve a flow state:

  • One must be involved in an activity with a clear set of goals and progress. This adds direction and structure to the task.
  • The task at hand must have clear and immediate feedback. This helps the person negotiate any changing demands and allows them to adjust their performance to maintain the flow state.
  • One must have a good balance between the perceived challenges of the task at hand and their own perceived skills. One must have confidence in one's ability to complete the task at hand.

Source: Wikipedia

You're right that your son is more likely to get into a flow state when he feels like he has some mastery. It can be difficult to stay motivated when you are stuck doing really hard things, particularly if you're just not sure how to proceed. So, gains in fluency will help enormously. This is what you pinpointed, so there's a good chance that this is the biggest missing factor.

The task of programming itself takes care of the feedback process, which is natural and nearly instantaneous.

And for the goals, one of the keys to setting up an intrinsically motivating project is autonomy. Help him to create projects that suit his interests. He might have fun trying to create the stupidest, most unfair (but still technically winnable) game that he can devise. Or, being a 13-year-old boy, he might enjoy creating a game that makes a giant, ripping fart sound when you win.

Or maybe he'd be more motivated to help solve a world problem, or coding something as a school project to impress his teacher. (PowerPoint and Visual Basic are a particularly good combination for this.)

The point is that autonomy, fluency, and fun are the keys here. That means that, to some extent, his sense of fun and motivation has to be the guide to what to do next, because they hold the keys to motivation. And from your end, try to keep things from getting so hard that he becomes demotivated.

Fluency + immediacy + autonomy + a little bit of challenge = fun.

1 - Try saying that five times fast.

  • And the main purpose of you as a teacher is to prevent them from going too deep too soon. Too many people want to learn programming while making a game "kind of like GTA, but bigger and better!" Unless you already know that particular person loves challenges bigger than them, this is a very quick way to lose all interest. You might find that finding relatively simple goals is surprisingly difficult - people aren't quite used to that anymore. They expect to go through 20 years of education and then do something great and amazing, rather than going over obstacles one at a time. – Luaan May 19 at 7:35

You're making a very fundamental mistake, I'm afraid.

You're not supposed to enjoy programming.

Let me explain. Programming is a tool, not an end goal in itself. Suppose your son was interested in being a mechanic. You haven't come here saying "my son isn't enjoying fixing cars", you've come here saying "I've spent all this time teaching him how to use a screwdriver, but he doesn't see the fun in using a screwdriver".

A screwdriver is one of the tools you'd use as a mechanic. Coding is one of the tools you'll use in software engineering. But coding is not engineering. Engineering is making something. I'm sure your epic coding sprees are not just "hey, I'm writing C++"; they'll result in you saying "I've made this, isn't it cool?" for an end product you think really is cool.

That's where your son has to think about what he enjoys. Does he want to write games? Does he have ideas for some app? Does he want to try playing with AI? Does he like making up automated Word and Excel documents? Is he keen on music technology, perhaps?

Or if he's like me, perhaps he might want to try something that involves making something do things in the real world. I always liked messing around with my old Commodore, but what I really liked was building stuff. The two came together when I went to uni and specialised in real-time control. It totally rocks to work on some software, and then jump in the car where the engine controller is driving with that software. These days it's easier than ever to do this, with Arduino and Raspberry Pi.

And conversely, if I'm slogging through some configuration scripts to do testing, that's pure work for me. No fun at all. It needs to happen, and it's still programming, but it's the bit where I just have to push through the boredom.

So don't focus on the tools, focus on what comes out of it.

  • 5
    Wait, I'm not supposed to enjoy programming? Guess I must be doing something wrong then... Otherwise, you're correct that when it comes to programming, sometimes the goal is more important than how you get there (the specific language or tool used). – Llewellyn May 18 at 18:06
  • @Llewellyn A whole bunch of previous comments got deleted. Anyway, point is that the fun bit is working out how to do something with programming. Just writing for-loops on a napkin is not so much fun. :) – Graham May 18 at 20:39
  • 4
    Don't take people's fun away :P After all, plenty of people enjoy études, practising over and over until they're second nature. Just because you don't like it doesn't mean nobody does - though just as certainly, just because you do doesn't mean you should expect everyone to have the same fun with your learning approach. Teachers cannot teach the same way they learned themselves - that will only help the few pupils who enjoy the same approach. And I certainly know lots of programmers who don't care about results at all (usually for the worse, mind you), just building crazy object hierarchies... – Luaan May 19 at 7:40
  • 1
    @Luaan Sure - if it really does float your boat then cool. But the OP is wondering why his son can't get into it, and sees it just as "work". For me, that says the kid needs a target which will make it fun. – Graham May 20 at 19:40
  • 2
    I'd argue that you are fundamentally wrong. The concept of intrinsic motivation is basically about doing things 'for the sake of themselves'. Studies have shown intrincally motivated people delivering way better results than extrinsically motivated people. Therefor neglecting the fun of it ist most probably the wrong way. – Paul Kertscher May 22 at 9:30


I'm seeing a bit too many answers with "programming is not supposed to be fun", and I disagree strongly.

OP wrote:

Sometimes, I turn on good music, take a bottle of liquid happiness, then program for several hours for the fun of it. I'm not accomplishing a task, I'm enjoying the process.

This is very understandable and "normal" to me. I have started programming when I was roughly 13, in the early 8-bit home-computer area (Atari etc.). These days, I am a senior manager in a large IT company, and when I need stress relief, I grab some project and program for a bit; also I frequently am able to help youngsters out when they are at their wits end with some programming task. Last holidays, I played the games TIS-100 and Shenzhen I/O for a week straight while sitting at the beach, which consist of programming some more-than-weird assembler dialect.

That said, during my studies of CS and subsequent work in the field, first as programmer, then team-lead etc., the number of people that align with this view were indeed minimal. Unfortunately, many, many people really are in this job for "solving problems", not because they enjoy programming.

It is not about being a recluse, sitting in the corner of a room all day, and writing lines of code until your finger bleed. But enjoying something is, at least in my opinion and experience, the only source of real learning and improvement. I see it everyday, people who do not actually enjoy programming a) regularly fail to grasp more complex topics, b) are stressed out a lot, c) do their best to get out of programming ASAP. It is a meme in my rather large company, that young people do programming, and older (sometimes even starting 30+) get out of it as quick as possible for some managerial position. I am one of the few in a "post-programming" position who grasp what we are even doing today on a less-than-abstract level, and it is very saddening to me. (And do note that I am not lessening the importance of having experienced "architects" or other roles, which make up a significant portion of my work as well, obviously.)

For me, this is like working as a cabinet maker, and only wishing to sell the finished result while not being interested in the look, feel and smell of the raw wood or the beauty of the work itself.

That said...

I view it as the most important and beneficial job of a CS educator to instill fun about the field, not the least about programming, in the students, no matter what age or experience level. Do not be dissuaded from that by the difficulties you face.

That said, I have not really found a way myself to instill real, deep joy and interest towards programming in people who do not already have it. I have met many people who program all the day for many years, and don't enjoy it a bit. They enjoy "solving problems". Which usually means taking as many shortcuts as humanly possible and trying to get done with it ASAP, scorning the type of the work they must do.

Do all you can to make it fun for your son. With my (younger) daughter, I'm very slowly and partly successfully introducing her by the means of Minecraft (=> with its minuscule amounts of "programming" optionally available there); we tried Scratch (didn't interest her); she will probably get a Nintendo Labo set for her next birthday; I even showed her some BASIC (in an actual Atari 800 XL emulator :-) ), but that was more like "look what your old dad did 100 years ago" and obviously not really applicable in todays world. She saw a "hello world" (or rather "hello YOURNAME") and at least has a small inkling about what it's all about. Aside from that, she's obviously also at the level of "dad, can you show me how I can program a game like Minecraft, pretty please"...

She is still a bit too young for more, but my strategy is to get her hooked at some point, when she will be able to research stuff herself (just as I did back then with paper books). And obviously she will need to find something that actually interests her. If we don't find that, then I will be very happy about her not becoming a programmer / CS girl in the future.

  • 3
    The path of your daughter is very similar to that of my son. His first "programming" attempts were in Minecraft (code blocks). Now he is learning on FreeCodeCamp. We tried to learn Unity several times. First we did the ball game tutorial. Then he told me he wants to build a small platformer. I wrote the code for it so that he will can tinker with it. It didn't happen, unfortunately (I feel that Unity is intimidating him by its complexity). Next Sunday, I'm going to explain to him, how every part of this simple platformer works. I also showed him LÖVE framework, Qubicle, and Scratch. – DP_ May 18 at 12:36
  • @DP_ I've had the same experience with Unity. It's a great tool/framework, but... maybe a bit too powerful for just having fun programming and learning. At the same time, the downloadable content doesn't fit together well enough to be a good learning experience on its own. I've been experimenting with writing a simpler "gamedev" experience for newcomers to programming that allows them to follow from simpler approaches to more complex approaches, but I'm not sure it'd actually help anyone who doesn't learn the same way I do :P And sometimes it's really hard to notice a big jump in complexity :) – Luaan May 19 at 7:45

You seem to have much, at least, of the answer already. He should enjoy it, he should try things he is interested in, etc. You recognize from your own past that it isn't easy to be motivated initially. It can be boring.

Probably you have already asked him what it is that he makes it "feel like work" rather than fun. If not, do so.

One of the aspects that may be missing for him is a social component. Does he generally like to work alone or is he more comfortable in a social situation interacting with friends?

You might try to have him learn with one of his "pals" who shares some interest. The two (or three...) can swap ideas, try out pair programming, perhaps even be a bit competitive, if they enjoy that.

Or are you pushing him too early into too structured a way of programming, giving him a "process" like decomposition, etc? Maybe better in this case, and perhaps with other youngsters, to just let them explore and thrash about. The learning may not be as "efficient", but it may be sufficiently motivating that they get in the door. They certainly don't need developer discipline at that age. If they thrash for a while, they can learn that there is a more efficient path to the goal, but, but efficiency isn't the main goal now.

Think about the gaming world and the endless variety games come in. Think about games you like that other people don't. Think about games other people like that you don't.

Just as there is a variety of game types there is a variety of gamer types. Some people like BLAM BLAM BLAM shooters. Some people like relaxing slow-paced games. Some people like exploration games. And some people like intellectually stimulating puzzle games.

I think programming appeals to the puzzle solvers in us. I have a friend who is taking some computer classes in college and she says she loves solving problems when she programs. There is a certain payoff when we figure out how to make things work. This payoff may not trigger the same happy reaction in everyone's brains.

Not everyone is a puzzle solver, so not everyone will enjoy programming. If you're determined to help him enjoy programming then you might try to find out why he doesn't like it so much. Perhaps the challenges are so difficult that he's never quite able to come up with solutions on his own and so he never experiences the payoff. If that's the case, you could try to craft specific challenges that you know he'll be able to solve with his skill set.

There are actual programming games that might help as well. Sierra's The Lost Mind of Dr. Brain from 1995 had a segment called Motor Programming that was an introduction to programming for a lot of kids. A more recent example is a successful series from my friend Danny Yaroslavski called LightBot. Even Google did an interactive doodle about code games.

  • Interestingly, I've been programming since about 6 years old, and still loving it 24 years later, but... I've always hated puzzles. The brilliant thing about programming is that the challenge doesn't have a pre-planned solution that you're trying to find - and for me, programming assignments that work like classical puzzles are just awful. Puzzle games that give you a bit more freedom are still fun, though (e.g. anything by Zachtronic :P). I think this freedom is essential for learning programming - the fact that 10 people can solve the problem 10 different ways and they're correct. – Luaan May 19 at 7:49
  • @Luaan I suppose that makes sense. How do you feel about math, though? – Kyle Delaney May 19 at 22:44
  • For the most part, I see it as an essential tool. I did have lots of fun with some disciplines, though, and I usually tend to go the way of understanding the ideas rather than trying to remember formulas/algorithms. But I learn everything that way, I avoid memorising whenever I can :D So e.g. when I need to do division on paper, I don't remember the process they taught us - but it takes me just a minute or two to reconstruct it based on what I know about numbers. I can't even remember the volume of a sphere off the top of my head, but I can do integrals so it takes about 5s to get there :D – Luaan May 20 at 6:57
  • 1
    @Luaan Sometimes I say programming is like math but you have the freedom and the power to make variables equal whatever you want. – Kyle Delaney May 21 at 2:13

What I found with my experience of programming was that I didn't enjoy the process for its own sake for years. I've always needed validation from seeing things working and showing off to others.

I suggest your son needs more rapid payoffs. He's young, his attention span is short. At his age I would have wanted to make very short changes and see immediate results. Zen Programming isn't something I'd expect a child to be interested in, it's a much more mature behaviour that we get into once we're so confident that we hardly need to think about the process.

I would suggest that you pick up something like Game Maker or Unity3D, or see if you can make something like a small website together. It's very much the same skillset you're trying to teach, but the turnaround is particularly quick and visual feedback will reinforce his sense of accomplishment more than any console output is likely to.

Along with all these other answers I would say try not to force it on him. Let him move at his own pace. Let him decide when he wants to do it. Say to him "hey do you want to make a game tomorrow?" If he says no thats ok.

Show him cool stuff you've made. If he really is interested in it he'll ask questions and be intrigued by it. If he doesn't, maybe hes just saying he likes programming because he knows thats what you want to hear.

Try to make it less frustrating. You can do the typing and ask him questions on what should be done next.

Use a easy language. In high school we learned how to program using VB6 even though it was already obsolete. We made mimesweeper, snake, paint, and a bunch of other programs. Every kid in the class was able to do it and they all had a lot of fun. The next year we learned Java.

I have found myself programming for fun, it is infact my go to past time. I've had a few friends ask me for advice or assistance with learning to program and there are a few things I'd advise.

First off there's the friends that want it to be fun, but it isn't for them. They usually see me programming and the excitement and joy I get out of running some code and automating a task (usually it takes me longer to automate the task than doing the task 1000 times over, but I do it for the fun). They come to programming and want to make something complex and unrealistic and it's both too hard to start with and going to take them forever (because they're a novice and because it's a complicated problem). These people like the idea of being a programmer, not the actual task.

What about the friends that want to persist but find it a grind. The absolute best way to get around this is to do the breakdown for them of a complex program and let them do the small peices. This also works extremely well if you're doing something they're actually interested in. For example, your kid wants to be a game developer, so make a bot or a hack. Help him to understand that if used online these things would result on a ban or some punishment but offline the game can represent a fun eveniroment to program for. Here's a few examples:

Number 1.

Let's say he's an FPS junkie - csgo, Arma, BF1, CoD etc. Ok kiddo let's make an ESP hack we want to highlight enemies for us to see. Let's break this down:

  • enemies move (is the background static)
  • enemies always wear [red/black/grey/etc.]
  • headshots are worth more points

Well ok then, let's turn this into some logic:

  1. Take an image of the screen
  2. If the background is static check for moving pixels
  3. If the background changes look for certain colours
  4. If we find a possible enemy get the coordinate of it
  5. Draw a box on the screen

Right kiddo you go away and try and work out how to do each bit of that task. (A few hours/days/weeks later) Great we have our ESP but it's picking up a lot of civilians/cars/dust particles - let's build on what we have and make it better.

Number 2

Lets say he's into MOBAs (dota2, LoL, etc.). Ok kiddo were going to try and predict which pro team will win a game. We need to:

  • get data for the teams performance

  • work out a good way to use this data to predict outcomes

  • find a nice way to display predictions

Logic time:

  1. Find an API or webserver with data we can access
  2. Download/update our offline data
  3. Apply one or more method of model optimisation (multivariate linear regression, neural networks, classification, take your pick)
  4. Produce plots of results of the models
  5. Give a final prediction with confidence

Now I'd advise you to break #3 into more steps and if the kid isn't confident with maths then help him walk through it; if nothing else he may enjoy maths more as well.

Use your knowledge of what the kid enjoys and what he struggles with to fine tune what you teach him. Don't worry too much about teaching him specifics and focus more on the general goal oriented side of programming: I'm writing this program so I get this benefit.

Finally, everything is more fun if you're either not supposed to do it or if you've been told it's too hard. Making hacks for games is good for this. Having someone's other than you (partner/family friend etc.) scoff at the idea that the kid can program something that sound complex but that you've already helped him understand might give him the drive to prove them wrong - handle it well, make it a good natured bet (if you can program that I'll help you with your chores for a week, if not you have to help me with mine!).

There is an old adage: "You can lead a horse to water, but you can't make it drink".

My own experience with programming (life-long career) began with a fascination about computers and a curiosity about how they work. I found reward in the "aha!" moments of new understanding and in being able to make a computer do what I wanted it to do, even if it was something trivial or inconsequential. That came from inside me - nobody tried to encourage it in me or teach it to me. Everything I learned about how computers work (from electronic circuits and simple logic gates all the way up), and how to program came from my own desire to learn, understand, and master. My father encouraged me to seek an education and career path in computers because he saw me spending more time on my programming assignments (required course for the not-computer-related engineering degree I was pursuing at the time) than I was spending on anything else. Yes, I later took a number of computer-related courses that felt more like work, but it was always the motivation that came from within and came first that made the work "worth it".

For what it's worth: after high school and before settling into a career path in computing, I spent a couple of summers in a well-paying but horrible summer job. This job involved dull, dirty, dangerous physical work. It taught me a valuable lesson in work ethic and what work can really be. Programming "work" is, by comparison, not work at all to me.

You can't teach a person to enjoy a thing. You can at best lay out a path of discovery and give that person the opportunity to find (or not find) enjoyment. "Flow" isn't something you can be taught - it just happens because of how our minds work; I play pool in an amateur league and find that to play my best, I have to get "into the zone"... same phenomenon, neither taught nor learned, just happens when you immerse yourself in an activity demanding of mental focus.

Also, at 13, it may be a bit early to decide on a career path. Programming is a valuable skill, likely even more so in the world of work your son will enter, but he may choose to do something entirely different. His current interest may only be coming from superficial things - seeing a few of his peers doing it, hearing about how much money game developers make and wanting similar financial success for himself. While those are good motivators to work at it, it won't lead to enjoyment. If it feels like too much work for him, he's not going to want to do it and could lose interest. All you can do is give him the time and space to find his own path and support him on whatever that path turns out to be.

Enjoying the process is a double-edged sword.

You think my job is to write code? My job is to solve problems. Code is often the worst way to solve problems. I enjoy the process, and I constantly have to remind myself that the means are not the end.

In my experience, most techno-religious "debates" are perpetrated by people who enjoy the process. Most "bikeshedding" arguments too.

Now, maybe your son just isn't that in to it. Maybe this isn't for him. But maybe he's juuust into it enough to be a good engineer, without being too into it.

  • Many techno-religious "debates" are perpetrated by people who just like to argue. Or people who picked a side and now are looking for any opportunity for a political fight (destroy the enemy, bring up your own side). You might see them as people who enjoy the process too much - I see them as people who don't enjoy the process. Otherwise they'd love to play around with the different approaches, rather than arguing about them (especially in the unproductive "my team is better than your team" way). But definitely, you must love the result at least as much as the process :) – Luaan May 19 at 8:04

Computers and technology are nowadays much more complex to grasp. We also are more demanding on the programs quality, so the sensation we had in the past of an huge feat with small things and instant gratification is not as easy to achieve as in the past.

Instead of using a notebook computer, I would get a Raspberry-Pi and some sensors, for dealing with something more tangible.

It can be somewhat gratifying building web pages with the temperature and humidity graphs, and evolving for more complex projects.

In fact, they have in the university I used to work, a summer kid boot camp just for iOT, sensors and robots, which has been a tremendous success with kids (and parents). I also am aware of a weekly club for Scratch, for kids plus a parent. I would try to find something similar in your city.

I also agree with others, each has it's own passion. Mine was finding out how things work, debugging and hacking (reverse engineering).

I'd like to address one misconception that is being argued on both sides; which is whether "the process" or "the result" is what is fun.

The real answer is that it depends on the person and sometimes on the situation. It can be either.

There are at least several places in personality theory dealing directly with the topic of how different types of people most easily get into flow. Some [people] are most creative with the freedom to explore whatever comes to mind, while others can be most creative when they have a set of rules and expectations to achieve.

I'm guessing your son is one who is inspired quickly and easily. One who wants to explore. He maps out how he would achieve his inspiration, and then when he understands how he'd go about accomplishing his task he is no longer interested. This is because he is driven by curiosity and has a good imagination. Once there is nothing new to discover and he can imagine the result in his head, why should he go through the trouble of actually creating it?

(The answer to this, I've learned, is one of three things: To get recognition and/or career success, to help people or give them good experiences, or to use it as an expression of oneself to provide meaning) It's extremely difficult for one of his age to be motivated by any of these three just yet.

As he gets older he will learn to be more disciplined (especially with help). Experiencing flexible routines will help him on that front. Otherwise, I think the current top-voted answer supplies some extremely supportive ways of furthering his skills in a fun way. https://cseducators.stackexchange.com/a/4785/5274

Besides making a simple game from scratch, like Kevin Workman suggested, you can also look for an open source game and try to modify it together. It'll allow him to see the reward much quicker. You can make incrementally more complex modifications. Let him watch you and imitate you. Explain everything you do, including the thought process as you're doing it.

For example, you can take a game that has shooting dynamics like an FPS or a scroll shooter (could be 2D to make things easier), and try to modify the shooting dynamics. Maybe have the shots fire 3 bullets at a time at different angles. Let him see you browse through the code, grepping around to find the relevant code. For a more complicated modification make the bullets travel slower, light up like lasers, and curve toward the enemies.

Because you're probably teaching him in the wrong way. Most people do. I learnt how to program when I was nine. The best way to learn how to program is building something you love.

All you need is pure C++ compiler

You say he loves Games? Build small games like Tic-Tac-Toe, Hangman, and stuff like that. Teach him game theory and ask him to use it in his next MCQ type test. Teach him game loops, and recursion.

Then, move to something that requires more thought. Like a chess engine, tell him how RPG's work, build a graphic-less RPG. Make an AI that plays against you. Build a treasure hunt game.

Build a maze, and design an AI to complete it using game theory only. Then teach him how to use Machine Learning to make the AI better.

I still love building 2D games. You need to bother with physics or a need a PC that actually supports 3D-animation softwares.

Give it a try. He'll love it

  • 1
    All you need is pure C++ compiler - C++ is the reason why I struggled hard in the beginning. Too far from anything tangible, too many unimportant things (to the final result) to think about. If someone suggested me Python then, the history could be drastically different. You want children to give minimal effort for maximal results, not have them walk a minefield. – Ctrl-C May 18 at 13:56
  • 1
    C++ is quality food for the brain.Or, maybe I am just that sadistic. – Aniket Chowdhury May 19 at 2:40
  • 1
    I've made a list of games of progressively increasing complexity that I wanted to make when I was a kid, and it was great fun to follow that. There's so many ways to get from simple to complex, and so many things you can tinker with in even the very simple games... Today, for projects like this, there's essentially no CPU/RAM limit - you can just keep tinkering, and learning more experiences about the things that don't quite scale well etc. You can reuse loads of the work you've already done, experiment with so many ways to make things more awesome... – Luaan May 19 at 7:54
  • @Luaan Hmm. I am nineteen, so never really had the troubles of low memory. I am using computer literally from the time I could walk, but I honestly don't remember what I did on a computer then, but it surely wasn't coding. My first Laptop had 2GB of RAM and a 512MB graphic card. But, I agree, it is fun tinkering with old projects. Though most of my code prior to 2015 is redundant. I had never heard of complexity or clean code then, so I essentially most of my games used direct methods instead of optimal ones. – Aniket Chowdhury May 19 at 19:30
  • 1
    I've learned not to tell people their code is "suboptimal" while they're still having fun - that just tends to make them annoyed (and bored). The best place to explain about deduplication, abstraction etc. is when they already have a codebase that suffers from not having those things - at that point, it's a solution to their (growing) problem rather than an annoyance. Lately I've been having problems with doing too much abstraction and planning in my home projects, and they suffer immensely - returning to a more straight approach helped me focus on having fun making games :) – Luaan May 20 at 6:52

I did a computer science degree but after that in order to learn industry specific skills in web application development I taught myself by creating simple games. What I did was actually trace art I loved (by sci-fi and fantasy artists) to simplify the digital component. This resource development is separate to programming but it made that part very easy and captured my imagination. Then I broke the graphics apart to make "puppets" I could animate and interact with then coded the collisions, movements etc. and a game loop using Flash ActionScript. Then I built a website locally so learned HTML etc. The total scope of the project was clearly defined, simple, and and felt and looked good when I showed people. It was fast to develop (outside of the learning component), rewarding and built my self-esteem. Many years later I'm a senior software engineering consultant. However motivation comes from within. I think its best to find a passion he might have and run with it. Computer programming is a broad area these days after all.

Interesting that there is a clear divide in the answers between the Engineer types who program to achieve a goal - where coding is just a tool - and the Craftsperson type who enjoys working the material. The OP clearly described himself as enjoying the act of coding. That is what he wants his son to have.

Well sorry, it does not work that way! Some are born to coding, some achieve coding and some have coding thrust upon them. You will never convince someone that your approach is better than theirs. I thought that being a parent was helping your children achieve their objectives, not indoctrinating them with yours?

  • 1
    Getting very good at something (esp. in comparison to others) that you can see is helpful to people can spark the passion. Especially when you integrate your unique strengths into it. As a parent, I'd rather try to detect my kid's talents and help them realize their potential in a way to make them independent and happy going to work each day. – Ctrl-C May 18 at 14:05

As someone who has been through this from my youth, I might be able to offer an insight.

I find there's two causes for programming not being fun: not be able to do a particular thing in a particular way, and a very 'manual' (low-level) programming language.

When trying to initially build things, the reality didn't match expectations (my expectations were: 2D game that's super-cool awesome, the reality was a console text 'game' where you input a number and got a generic response back).

Of course, this was frustrating and made the amount of effort seem not worth it. I was trying to program in C++. In reality, I probably should have been using a higher level language (JavaScript, Python, even Java). C++ does feel like work in comparison, and without knowing what language he's programming in, it might be worth introducing a language that does more of the legwork, if not already.

The other solution I found was to readjust expectations. Rather than imagining 'super cool awesome game that rakes in loads of money', I aimed more for what the programming language could do, within the resources I had. Text-based Rock/Paper/Scissors with a learning AI, for example.

These days I get a sense of enjoyment (maybe not 'fun' per se) from solving key issues and automation of particular tasks, which on a small scale seem trivial, but on a larger scale combined with other automation tasks are really awesome.


  1. Maybe change to a higher-level programming language that allows
    quick achievement of good looking results.
  2. Modify expectations or set 'easier to achieve' goals that are still fun, such as text-based games.

I can only offer my own experience (as a former child who made slow progress but is a current engineer who is happy with his career choice)!

I was put in front of a lot of programming books from a young age. I could copy stuff and make minor adjustments out of curiosity but that's as far as it went for years. Sometime around 19 it clicked, and I could do a little better. Then after school when I saw what the non-coding options were for making a living I got good at it fast. Then I experienced the flow state, but almost never before that. You have to see the big picture first, and have a job to do. Before that, you're wading in a mysterious swamp, no flow possible.

To learn the difficult skill of programming at a young age requires a lot of guidance, with you making choices about libraries and algorithms, standing over his shoulder explaining and debugging, and probably pitching in to set up the class structure or do the hard parts, yet at that age he's looking to develop independence. The two virtues are conflicting.

Be patient, you're laying good groundwork for future flow, some stuff is sticking even if it doesn't show, and you're setting him up to get ahead if he ever does develop interest (and he probably will).

It's easier to get into the flow state with tighter feedback loops. Squeak Etoys is great for this. It starts out like a toybox, with interactive scriptable entities using a kind of tile-based visual programming language. You can introduce it as a kind of sandbox video game he could have fun with.

But Etoys is built on a Squeak Smalltalk image. If you dig a little deeper, and you can also use the text-based Smalltalk language and use all the development tools integrated into the image. Smalltalk's grammar is easy to pick up even for children, and the visual inspector and debugger make it easy to crack open a program to really see what's going on.

Let him play with it for a while and see if he comes up with anything interesting. Then show him how to do it better, not with attitude of "you're doing it wrong", but more like "look at what else we can make the computer do".

Etoys has some instructional materials for its scripting language and tools on its website already, including lesson plans, if that helps. Then, when you're ready, you can move on to Squeak Smalltalk, which has its own textbooks and other materials.

Smalltalk is a full-fledged programming language in its own right, with commercial applications, but once he's got the hang of that, it wouldn't be too hard to introduce him to Python.

He’s still young let him do his thing maybe in the future he will find joy in programming maybe he will change his mind , I think you cant make someone find something fun and enjoyable if they think it’s not. You can make it all fun but if he doesn’t find it fun you cant do anything about , you said he’s good at programming maybe because he is young he find it boring, just wait till he is in his 20’s or erailer his attitude will change, You can try to compete with him it would be fun if he is a competitive person.

If making a computer do things following his own design isn't inherently fun, then programming won't be fun for him. I think a simple CLI type thing is the best way to do that. I'd avoid big frameworks like Unity like the plague because they hide all the interesting things from the programmer. Your program doesn't need to do anything useful to be interesting to write or to read.

To me, witnessing my program being run is like watching the gears turn in a well-made clock, it's passionating. That is part of my personality, and other people find processes like that boring. It's something that you can't instill in people (or rather you shouldn't unless you want to make them unhappy).

  • 1
    Just because you find something interesting or not doesn't mean other people do. It's a subjective thing. For most people I know, seeing a little person move on the screen according to their input is far more interesting than dealing with the proper pattern of allocating memory. The latter might come later, as they master the high level concepts, or it might not. I love digging both ways - all the way from understanding the electronics (and building my own CPU from TTL chips) to playing around with lambda calculus. Each of these interests came at its own time, they weren't "pre-existent". – Luaan May 19 at 8:10

I'll include my point of view since I haven't seen an article I response that I can relate with yet.

From the gist of it, sounds like you program for mental stimulation and your son enjoys it because you enjoy it.

Find something that your child enjoys doing and figure out a programming solution that you can implement to understand that hobby or task or to even make part of it more efficient.

IE, making a mobile or web app to keep baseball score and to generate stats. Just manipulating data and strings is boring and a waste of a childhood.

  • I see that you are new to the SE network. I'm glad that you've joined, and you are still welcome to contribute to our community, but please be aware of the be nice policy. We keep a high standard on civil discourse here. Offensive language and name calling are not tolerated, even if the message is otherwise useful. – Ben I. May 23 at 13:42

Children like quizzes. That means they like solving problems that get them appreciation.

So my suggestion based on my experience:

  • Set up an IDE for them so that they can simply type and run.
  • Start with simple, short, string processing programs that show immediate result.
  • For instance, teach such a simple string processing program first. Let them code a simple variation that they can run and show you.
  • Show appreciation. This is the most important part.
  • After simple string processing, go to the next level, for example, loops to give count, capitalize, read text files, etc. If the language is already advanced like Java, lists are even more interesting then strings.
  • The main point is, stay away from Factorial and Math Series type "dry" examples that text books often start with.

IMHO, string processing examples are the most interesting that one can connect to quickly. Math problems like finding maximum, minimum, factorial, etc can be boring for a beginner. If you have to introduce integers, better let them count interesting characters in strings like vowels, spaces. More complex examples can be counting words. The idea is to get them interested enough to ask for more problems. Once that happens, search for and give them a good book or course that starts with practical examples straight away. Then there is no stopping them.

Ok you may not like this answer, (because it could be too late).

Anyways: Give him a computer to play with when he's a kid. Maybe even better give his bigger brother/uncle/sister/whatever one and let them play with it together. Anything to catch a kids interest with should be exciting, like fun and games. That is how you get kids to like maths or computers or other seemingly very boring/dull subjects.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.