10 August 2016
I can now reveal the free gift that comes with the print edition of Cool Scratch Projects in Easy Steps: it's a pair of 3D glasses. They're the red/cyan coloured lens type (called "anaglyph"), and the book has three projects that show you how to use them to make 3D effects with images that pop out of the screen or sink into it. There's a game called 12 Angry Aliens, where you have to zap the aliens that rush towards you; a 3D art package that enables you to position shapes at different depths, and a game called Space Mine 3D that shows off the depth you can achieve with a nice tunnel effect. You can see all the projects here, although the videos for the 3D projects will make more sense if you have a pair of 3D glasses. If you are buying the ebook, lose your glasses or want another pair, anaglyph glasses are available cheaply online from Amazon and eBay.
Cool Scratch Projects in Easy Steps is now expected to be available 12th August, rather than the end of the month, so you can get started on the projects over the summer holidays. You can get a special launch price by ordering direct from the publisher, and be one of the first to get your hands on a copy of the book!
Here are some photos of the book being printed.
And here's the first photo of the first copy the publisher received! It's nearly here! I'm getting excited...
28 July 2016
Now I've finished writing Cool Scratch Projects in Easy Steps, I'm going to start uploading the examples and supporting content as we approach publication. By publication day, you will be able to find the projects in the official Cool Scratch Projects in Easy Steps studio on the Scratch website. I hope that you'll agree that the projects in this book bring something fresh and exciting that you won't have seen somewhere else, and that they can live up to the label of being 'cool'.
The projects won't necessarily be shared in the order they appear in the book, but I thought I'd start with the first one. Magic Mirror is a new spin on the 'cat going for a walk' project which starts many tutorials, including my previous book Scratch Programming in Easy Steps. In Magic Mirror, you move the cat using the left and right arrow keys, with the up key to jump. When you walk in front of the Magic Mirror, you see your reflection. Jumping into the buttons changes the mirror's settings, with different distorted reflections available. It's like a fairground's hall of mirrors, reimagined. This is a fun short project that shows you how to use graphic effects and layers, and introduces some ideas that are used in the more advanced projects later in the book.
Cool Scratch Projects in Easy Steps is available for pre-order now and will be released 31st August. Amazon's pre-order guarantee means that you will pay the lowest price they offer until the publication date if you pre-order now. If you have any questions, feel free to ask in the comments below, although we're saving a surprise for a bit later on so I might not be able to answer everything...
The project is embedded below:
12 May 2016
UPDATE: The Scratch team has now fixed this bug.
My book How to Code includes a buzzer game project. There's a bug in Scratch at the moment, which means the arrow sprite doesn't face the direction of travel. When you add a sprite, its default movement direction is right, so sprites are usually drawn to be facing right. The arrow1 sprite, however, points up when it is loaded.
This is a new thing, because it wasn't the case when I wrote and tested the game and it isn't the case in my downloaded version of Scratch 2.0, which is older than the current online version.
If you are experiencing this problem, you can fix it by adding a block to set the costume to the correct one at the start of the game, as shown below.
04 March 2016
The March 2016 issue of The MagPi is out now, featuring my project Clef Hero. The game uses the Piano Hat, a tiny music keyboard that fits on the top of the Raspberry Pi, to teach you to read sheet music. I made it for myself first of all, but it provides a good example of how the Piano Hat works and will hopefully help others to learn too. I don't read music fluently, especially around the leger lines, and many years ago I learned chord fingering using a program I wrote for the Amstrad CPC (pictured, right), playing my keyboard while watching the computer screen.
In the Clef Hero game, you are shown the treble stave and notes appear on it, which you then have to hit on the keyboard. The keyboard only has one octave on it, so the same key is reused for the same note in different octaves. The game starts easy with a small selection of notes, but gradually adds more notes and introduces sharps and flats until you're working with the full stave.
For its musical notes, the project uses Sonic Pi, so my tutorial also explains how you can use Sonic Pi to generate a scale and then use Audacity to turn it into separate note files that Clef Hero can play. You can find a guide to note numbers in Sonic Pi here.
The game is written in Python, using Pygame Zero.
Here are the links you need:
- Download The MagPi here - it's free as a PDF, but you can support the Raspberry Pi Foundation's educational mission by buying it in print or through the Apple App Store and Google Play Store.
- Download the Clef Hero Python code. - It downloads as a text file. Rename it to clef.py.
- Download the Sonic Pi code. - It also downloads as a text file. Rename it to listing1 or copy and paste it into Sonic Pi.
For more information on Sonic Pi and Python, take a look at the book I co-wrote with Mike Cook, Raspberry Pi For Dummies.
With thanks to Gerd Altmann who created the background design I'm using here.
10 February 2016
Writing a book can be a solitary business, especially for self-published novelists. I had a policy of not discussing my novel while writing it, because I wanted people to be excited by the book when it came out and not bored of hearing me talk about it. But that meant I overlooked an important step in the book's lifecycle: that of testing the cover and title with its audience before proceeding to publication.
My novel is a techno-thriller set in the music industry, and involves a conspiracy where a record label sells computer generated music to fans, without telling them the bands are fake.
It originally came out under the title University of Death, named after the "real" band that gets mixed up in the action. The cover design was a stark black and yellow silhouette of fans with their raised arms at a concert. The cover and title were distinctive, but they didn't reflect the book's content well, and some people were put off by what they thought was a zombie story. Given that most of my non-fiction books are about programming and website design, it was a real kick-self moment when I realised I'd failed to test the end product with its audience before releasing it.
When I came to publish the book on Kindle recently, I decided to get some more brains on the case. I started by running a brainstorm on Facebook to invite people to suggest a new name for the book. I had really struggled to come up with a good name, but there were lots of brilliant suggestions from my friends. I filtered out the titles already claimed for erotic fiction novels (my, those authors are prolific!) and those encumbered by trademarks or other business activities (I was particularly sorry to see Spytunes and Autotuned struck off the list). Finally, I chose the title 'Earworm', suggested by my friend Andy Lawn.
For the cover, I ran a design competition through 99designs.co.uk. You provide a brief, and the site's talented community of designers submit designs to meet it. After some rounds of feedback and shortlisting, you pay £189 for your chosen design.
Almost immediately, a design came in that I thought was a contender to be the final winner. It looked professional and it had dramatic typography that wouldn't look out of place in an airport bookshop. Even as some great other designs came in, it remained a favourite. When I had a few designs in, I put together a shortlist and ran a poll among my Facebook friends. Guess what? My favourite cover ranked fourth. Out of six. It looked like a war novel, somebody said, and they were right.
This was when I had to trust the crowd. It might be my book, but it needs to appeal primarily to my readers, and my friends represented those readers in all their diversity much better than any one person could. They identified a cover with much broader appeal, that better reflected the themes of the book, and which I'm pleased to say I've grown to love.
I've learned that whether it's for a brainstorm, or market research, one of the best assets an author can have is a network of friends who can provide a fresh perspective on the big decisions. Thank you to everyone who helped me. It made a huge difference.
Find out more about Earworm and see the final cover here. Earworm is out now on Kindle and in print on Amazon.
Photo shows Display Stand with Brains by Katharina Fritsch
21 January 2016
Somebody once said they would start jogging the first time they saw a jogger smile. That's a view I used to subscribe to too, but over the last year or so I've taken up running using the Couch 2 5K programme, and I'm writing this blog to recommend it to anyone who's interested in starting running. The programme has taken me from no running experience (and no real history of exercise) to completing a 10K run in the Olympic Park.
Couch 2 5K (or Couch to 5K) provides a structure for starting gently, and working your way up. In week one, you do several short bursts of running, with walking between them. Gradually, over the following weeks, you run more and walk less. By week 10, you're able to run 5K (or for 30 minutes) without stopping. There are many ways you can use the Couch 2 5K framework. The NHS provides a series of podcasts that you can listen to while you run, with cues for starting and stopping your run. I found this a great way to do the programme, because it saves you having to worry about timings, and they've chosen some uplifting music to carry you through the run. There's also an element of surprise if you don't read ahead: Laura will tell you at the start of the run what's coming up. One week I remember feeling like there was a significant step up, but the course prepares you, so it doesn't ask you to do something you haven't trained for, and I was hugely uplifted to achieve that week's goal. If I had read ahead I might not have felt ready to take it on.
The programme works on the assumption you can run every other day, but I can manage twice a week at the most, and had my programme broken by our trip to China, so it took me longer to complete. Many people are put off running or even injure themselves by trying to go too far or too fast too soon, so it's better to go at a pace that works for you and fit the programme into your life comfortably.
I started off with my normal trainers and got some proper running trainers when it was clear I was going to stick with it. Go to a running shop and let them do the treadmill analysis on you: with the right shoes, they can correct your gait to make your run smoother and safer.
After completing the podcast, I started putting together my own running playlists. Initially, I would put together a 30 minute playlist of running music, with a warm up and warm down track. By knowing the final song, I was able to use the playlist as my cue to stop running. Knowing the number of songs also helped me track my progress. I put the longer songs first as a psychological trick so I completed the songs more quickly at the end when I was more tired. After a while, I moved to using a playlist of running music and setting it on shuffle. I update that playlist with new music from time to time, and take out tracks that turn out not to be much fun to run to. My playlist includes a lot of 80s 12" remixes, and I get a real boost from some of the Depeche Mode remixes in particular. Sometimes I'll be feeling really drained, and then a track comes on that gives me a real surge of energy.
The problem with running for a set amount of time is that when you have a hard run you don't know why. There are good and bad runs, and you don't know what you'll get until you go. But there's a difference between a run that feels hard because you're having an off day, and a run that feels hard because you went faster, further or steeper than before. Getting a Garmin Forerunner GPS Watch really helped me to understand my running activity. On a day when it felt tough, it often showed me that was because I'd worked harder, rather than because I was having a rubbish day. It's helped me to measure performance and coach myself after the Couch25K ended, and many runners consider a GPS watch (or tracking app on a phone) to be an essential investment. At the Olympic Park run before the race, there was a constant chirrup of runners starting their watches. One runner had a shirt on that said: "If I collapse, pause my Garmin!"
So if you're curious about running, or just looking for some exercise you can do anywhere, any time, with minimal equipment, I hope you'll check out the Couch 2 5K. I won't pretend I find running easy and I have no great ambition to push myself to go ever further or faster. But I get out when I can and find it invigorating. Once in a while, you might see me in the flow, running steadily and enjoying my music. Maybe even, sometimes, with a smile on my face.
11 December 2015
My novel Earworm, a technothriller about the music business, features the band University of Death. Led by the charismatic and eccentric Dove, the band is struggling to survive as its fame and audience are in decline. I had a lot of fun writing about the UoD concert, where my goal was to capture the electricity of a live performance and give readers a hint of the band's sound that they could flesh out with their own imagination. One of the nice things about the book is that everyone will have a different idea of what the band sounds like.
I have, however, made a short track to help promote the book in which you can hear "University of Death" soundchecking at their Berlin concert, which is mentioned in the book. I put it together using some sample-based music software when the book was first published a few years ago, and thought I'd share it again now. It originally appeared on Dove's MySpace page, back when MySpace was the next big thing for bands. Now, I've uploaded it to my SoundCloud page. I've enabled it for download too, so you can add it to your iPod and playlists, and I've embedded it below so you can play it without leaving this page.
Earworm is available to order now in print and on Kindle from Amazon worldwide. It makes a great gift for a musician or music fan, so if you're looking for something a bit different to give this Christmas, I hope you'll take a look at it. You can read a sample of the book on the Amazon website, and read the rave reviews from music magazines here.