Company & Culture

Making Technology Accessible for Teenagers: Sample Coding Projects

By Jean-Philippe Boudreault / February 22, 2021

Making technology accessible for teenagers with sample coding projects

Foreword: Let’s get something out the way - I’m not a perfect parent. I don’t always stick to the food guide, my kids watch YouTube videos and video games are ubiquitous in our house. And I must confess that sometimes – not often – I give my kids permission to skip homework and watch TV when their heart’s just not in it.

“Say, Xavier, how would you feel about trying to code an artificial intelligence that can beat me at tic-tac-toe?”

This question thrown at my teenage son last year left my wife a little perplexed. She knew I would probably go MIA for several evenings and that we were most likely looking at a collective tic-tac-toe overdose in the coming weeks. What she did not suspect, however, was that our son would end up turning to his grandparents and his sisters to test his so-called invincible AI. She also did not foresee the pride he would feel as he shared the results of his hard work with his friends at school.

I realized early on in my parenting journey that it was important to expose children to programming. It’s a great thing to learn, with its combination of play, creativity, communication, and iterative problem-solving. With the omnipresence of computers in our world, the majority of today’s children are going to need at least some programming skills once they hit the job market. Programming itself unlocks great career opportunities. It is estimated that 67% of future jobs in science and technology will be related to programming. And what about all the studies indicating women would be better represented in the technology sector if young girls were exposed to new technologies at an earlier age? Another argument for exposing our children to coding outside of the school curriculum.

There are amazing resources out there to teach programming to children. My oldest son, Xavier (13 years old), used code.org to learn the basics of block-based programming with Scratch and create a few simple, fun games.

This bright, baseball-crazy teenager is not one to back down from a challenge. He liked the idea of a concrete project, and it seemed pretty straightforward to him. I have to admit I didn’t give him much choice – I wanted him to diversify his activities and limit the time he spent watching videos and playing video games during time off from school.

Here are two ideas of projects you can do to expose a teenager to coding and the wonderful world of technology, both tested and proven with my oldest son.

Project # 1: An artificial intelligence for Tic-Tac-Toe

Using this code as a starting point, you can create a website to pit your tic-tac-toe skills against artificial intelligence. The example project was made with Python (a new one for me), using the Django framework. The idea is to allow the young would-be adult to limit their program to a single file. One particularly interesting aspect is the use of unit testing to validate the program’s choice of play in a given situation. For a small fee, the project can easily be deployed on cloud platforms like Heroku or PythonAnywhere to share with friends and family.

Project # 2: A program that plays Battleship!

This idea, taken from a Hackathon we did at work, involves developing a program to find enemy ships in a game of Battleship. Initially designed as a technical challenge for potential employees, the task is to interact with a Web server to play a variation on the classic game.

The difficulty level can be adjusted by supplying a client code tailored to your teenager’s skill level. The easy version of the project, like the example that I gave my son, starts with a complete code framework that takes care of communicating with the game server. The hard version involves letting your teenager handle complex REST interactions with the game server in order to start and complete the game.

Feel free to use AppDirect’s server to manage and visualize your Battleship game.

I hope you find these ideas inspiring and that you can put them to good use during the upcoming spring break!

Acknowledgments

I would like to thank Wilson Ching and Dmitrijs Surzenko for agreeing to share their Hackathon project with the public at large. I also wish to thank AppDirect’s software development department for revising the Django code, and Joey Tedeschi for his precious help in making the Tic-Tac-Toe game interface responsive.

Jean-Philippe Boudreault is the Director Of Engineering, Distribution Automation at AppDirect. He is a father of 4 kids with a programming background in Java and Ruby.