It’s official. In the words of glam rock legend Alice Cooper, school’s out for summer.
There’s no more class. No more school run. No more homework. Just long, endless summer days that seemingly drag on forever. But how do you keep your child occupied during those long, summer months? Perhaps more importantly, how do you keep your child occupied and entertained whilst teaching them an important career skill, like computing?
If you’re looking for inspiration, don’t worry. I’ve got you covered. Check out these six projects that’ll teach your child the basics of computing, with Linux at the center of them all.
Build A Game or Phone App With Kivy
The Python programming language is a favored introductory programming language taught in computer science classes in the US and the UK, thanks to its uncomplicated syntax and the ease in which it can be learned. One of the advantages of Python above other languages – like MIT’s Scratch (we’ll get to that later) – is its broad supply of plugins and libraries.
Libraries are used to extend the functionality of a program. There are hundreds of thousands of them for Python. One popular library is Kivy, which makes it possible to develop games and apps for the desktop, and for mobile devices.
With Kivy, you can build a sophisticated mobile game for iOS and Android – like Pong – with just a few hundred lines of code. You can even build desktop games and applications for Windows, OS X and Linux.
And because it’s Python, you’re still using the same, gentle syntax your child has probably learned in school.
A good starting point for learning Kivy is on the official Kivy documentation, where they’ve built a simple Pong game. Here, you can learn how with a few lines of code, you can place objects onto the screen, control the game’s physics, and even keep track of scores.
This demo game is licensed under the MIT license – a free, permissive software license that permits making modifications and copies – so you can turn it into your own game, and share it online without having to ask permission first. You can even build Android APKs, and distribute your Kivy game on the Apple app store. But for a more guided tutorial for Kivy, check out Richard Jones’s PyCon Montreal talk.
Installing Kivy on Linux is easy. If you’re using a Debian based distro, do this.
sudo add-apt-repository ppa:kivy-team/kivy
sudo apt-get install python-kivy
Instructions on how to install Ubuntu for OpenSUSE, Gentoo and Fedora can be found here.
Learn The Fundamentals of Code With Scratch
If you’ve got a younger child who is yet to take a formal computer science lesson, and you want to introduce them to programming, you might want to consider installing Scratch – available for OS X, Windows and Linux.
Scratch isn’t a programming language that’ll give you a lucrative programming career. But that’s fine. It’s not intended for that. Rather, it’s used to teach the basic concepts behind computer science.
Scratch is a visual programming language, so rather than typing code, you drag-and-drop building blocks in order to create simple programs. This presents a simple, approachable way to teach your child about how software is built, and programming concepts like conditionals, iteration and recursion.
But don’t let the simplified nature of Scratch fool you. Just because it’s easy, it doesn’t mean you’re restricted in what you create. People have built everything from games – like a multiplayer pong game – to animations – like a whimsical greeting card – to interactive art.
And once you’ve finished your masterpiece, you can share it with the welcoming Scratch community online, who can provide feedback and encouragement through ‘likes’ and comments.
And if you get bored there, you can use Scratch to build Arduino-based Internet of Things projects. Neat, right?
Control Your Home With the Raspberry Pi
The Raspberry Pi is a tiny, affordable, credit-card sized computer capable of running Linux. Incidentally, it’s also capable of running a stripped-down version of Windows 10, designed for building Internet of Things projects.
The Pi is a versatile beast, having repeatedly shown itself to be capable of running anything from art installations, to web servers, to even Minecraft servers.
One application for the Raspberry Pi that caught my eye was James Bruce’s home automation project, which uses a broad smorgasbord of technologies to control his house’s lighting.
If you’ve not played around with the Raspberry Pi before, and you’re looking for a more simpler project to sink your milk teeth into, consider Christian Crawley’s Raspberry Pi Wireless Printer.
Build A Twitter Bot
It’s no secret I’m a massive fan of the Python programming language.
It’s just so powerful, and versatile, and the broad supply of plugins and libraries means you can do almost anything.
Python makes you feel like a superhero. Just think of something, and chances are high you can build it with Python. But I’m not just talking games, or Raspberry Pi home automation systems. You can even build applications that build upon existing social networking sites.
Facebook. LinkedIn. Twitter. They all have APIs (Application Programming Interfaces) that allow you to use the data and functionality of these sites within the scope of your own programs. They can, at first, be quite intimidating. But they’re not.
Mastering them can take a few hour’s worth of work, but once you’ve learned how to use a particular API, you’ll be able to do some incredible things.
Take Twitter for example, which allows developers access to their data through three separate APIs. There’s the Firehose API, which offers unlimited, real-time access to every single tweet, but comes with a steep price tag that reaches into the thousands of dollars.
There are also two APIs that are free to use. Twitter has the the Streaming API, which allows you to track tweets in real-time, but with no guarantee that you’ll get every tweet. There’s also the Search API, which lets you search the Twitter database, but the amount of queries you can make are severely limited.
The Streaming API is especially interesting, because you can build applications that can respond to tweets in real time. There’s an endless amount of projects you could build.
You could, for instance, take James Bruce’s Arduino-powered LED cube, and illuminate it whenever someone posts a tweet containing a certain word. Or you could build a Twitter bot that tweets spoilers whenever someone posts “Just started watching Game of Thrones“. Or, you could build a bot that also uses the Wolfram Alpha API to respond to simple questions, like “what’s the capital of Burkina Faso”.
On Linux, you can take advantage of the Twitter APIs using the popular Python programming language, and the Tweepy library, available to download through the PIP package manager. To get it, simply open up your command line and type:
pip install tweepy
If you don’t have the PIP package manager installed, don’t worry. You can also install Tweepy manually. To do this, you’ll need Git installed.
git clone https://github.com/tweepy/tweepy.git
python setup.py install
The possibilities are endless, and because the Twitter API is so easy to use with Tweepy, you don’t need a Computer Science degree. You just need to know Python and have an awesome idea.
Build A Website
If you teach your child to code, and ask them what they want to make, they’ll probably say a mobile app. Because – let’s face it – what kid doesn’t want to make the next Flappy Bird? But after that, they’ll probably say they want to build a website.
The problem is, when you’re first learning to build for the web, you’re confronted with a dizzying array of technologies. Should you use the tried-and-tested LAMP stack, which uses Linux, Apache, MySQL and PHP? Or perhaps something a bit more modern (and, dare I say trendy) like Ruby on Rails, Flask or Node.js?
What’s worse, this broad buffet of technologies can be incredibly distracting when you’re a journeyman coder, as you flit between frameworks and language with all the focus of a Labrador Retriever.
It’s a lot to take in.
But I think it’s important to remember that learning to build websites is something that’s fundamentally multidisciplinary.
Then, you learn about persistence, and the need to store things in a database to retrieve them later on. So, you learn about MySQL, and perhaps MongoDB. You learn about schemas, and atomization, and relations.
The point I’m trying to make is that learning to build websites is a multidisciplinary process, which depends on the person learning a ‘stack’ of wildly different technologies and then mentally tying them together, and understanding how they work in relation to each other.
When it comes to choosing a back-end technology, I’d encourage your child to learn PHP, which has a gentle learning curve. There’s a lot of documentation available for it. And moreover, installing a LAMP server on Ubuntu is merely a matter or typing ‘sudo apt-get install lamp-server^’.
CodeAcademy has a PHP course. So does Tuts+, and Lynda. All are great. Although, I’d personally recommend Larry Ullman’s PHP and MySQL for Dynamic Web Sites, which at the time of writing is available for $28.90 on Amazon. I own a copy myself, and have found it to be an approachable, accessible, guide to web development with the PHP programming language.
I have no doubt that the average teenager would be able to grasp the contents of this book.
Failing that, MakeUseOf has published a guide to PHP (written by yours truly), available to read for free here.
But above all, instill in your child that learning to build for the web is a learning process, and one which takes time and dedication. To keep your child motivated, you might want to set them a project they can work towards.
There are lots of simple websites that could be built by a learner developer. Perhaps a guestbook, or a microblogging site like Twitter.
One of the most overlooked aspects of learning to code is feedback. Once they’ve build something, consider convincing them to share it on Github, so more experienced developers can critique and offer guidance. The Learn Programming subreddit is also pretty good for that.
And then, perhaps teach your child how to host and manage their own Linux web servers by purchasing them a Digital Ocean droplet, which costs as little as $5 per month.
Attend A Code Club
Okay, I’m cheating here.
This isn’t a project, per se. But if you want to teach your child the basics of computing, and you want to do it in a more structured, social manner, then you should take them to a code-club.
The availability of these will, of course, will vary based upon where you live. In the UK, there’s Code Club, a not-for-profit that aims to teach children between the ages of 9 and 11 to code. Code Clubs can be found in most major towns and cities, with the tuition organized in ‘terms’. Each term teaches a different facet of programming, such as Scratch, HTML and CSS, and Python, with the course content getting more and more complex as each term progresses.
Code Clubs often take advantage of Raspberry Pis and Linux, due to the fact they’re extremely cheap to acquire compared to traditional computers.
But what about across the pond?
America has far, far too many Code Club-like organizations to mention in one article. But there are some that stand out.
The Gates and Zuckerberg funded Code.org is most well known for its Hour of Code project, which tries to get adults and children alike to spend one hour a year learning to code. But did you know that it hosts a near-comprehensive list of computer science classes available in the US, with many available in libraries, community centers and schools?
But I’d be remiss if I didn’t mention the brilliant Black Girls Code, who are doing some really important work. They’re attempting to address the shameful ethnic and gender gap in the STEM (science, technology, engineering and mathematics) field by providing free computer science classes to black girls throughout the US. Classes are available in a number of major cities, subject to availability. Check the Black Girls Code website for more information.
Time To Code
Okay folks. Summer is officially here. The schools have either closed, or are closing. What are you going to do? Are you going to take them to a code club, or are you going to give them a Raspberry Pi and see where their imagination takes them?
Either way, I want to hear about it. Drop me a comment below, and let me know.