It's Sean!

UK freelance journalist, author
and writer Sean McManus

Printed from © Sean McManus.
You are here: Home > Blog Home > Sean McManus's Writing blog: March 2014

Sean's Tech and Writing Blog

The Scratch 10-block Programming Challenge

21 March 2014

Back in the 80s and 90s, I used to write programs for Amstrad computer magazines. One of the best features was the 10-liners pages in Amstrad Computer User, which challenged programmers to come up with something interesting, fun or useful in no more than 10 lines of code. In many ways, it was a precursor to the coding competitions that still run today, with a limit on the final file size. You can see one of my contributions here:

magazine cutting showing my program Digital from Amstrad Computer User in February 1991

One of my 10-liners from ACU magazine. If this is your kind of thing, see my Amstrad CPC pages here.

I got around to thinking about what could be done in up to 10 blocks of Scratch. If you haven't heard of it, Scratch is a highly visual educational programming language. I've been using it a lot at my Code Club, and I wrote the book Scratch Programming in Easy Steps.

It's been an interesting challenge: You could pack quite a lot of instructions into one line of Amstrad BASIC (as you can see from the program above), but 10 blocks of Scratch means just ten instructions or functions. The upside is that the core purpose of the demo really shines through. I've used some of my 10-block programs with my Code Club, and they've enjoyed their simplicity, and the ease with which they can experiment with them. Quite simple ideas, like adding a password to a program, or making one sprite control another have really captured their imaginations.

Here are the 10-block demos I've created so far. Click each one to find tips on how they work, and demos that show them in action:

How broadcasts work: click for explanation

How to add a password to your game: click for explanation

How to make a sprite explode: click for explanation

How to draw any regular shape: click for explanation

How to draw a circle: click for explanation

Feel free to share those images and links on your social networks.

I have a few more ideas, so I've set up a page for 10-block Scratch demos which I'll update as I publish new examples. Do you have any ideas for simple examples you'd like to see? Leave a comment below.

Bookmark and Share
Permanent link for this post.


Three things you should know before embedding Getty Images

07 March 2014

Getty Images, one of the world's leading photo libraries, is abandoning watermarking and encouraging bloggers to embed its images in their posts. It's a huge turnaround for a stock library that makes money from licensing its images for use online and in print. In effect, it's a surrender to social media, with the library acknowledging that people were using its images anyway. This strategy will help Getty to build the business from those who are willing to pay for commercial usage, by making the images more traceable to their owners.

The images are fantastic, and take you to people, places and times you couldn't otherwise access. Here's Prince, up close and in concert in the US in September 1984.

Here's Einstein with physicists Paul Ehrenfest (in whose home they're meeting), Paul Langevin, Kamerlingh Onnes, and Pierre Weiss.

Here's the 7th century pyramid and Temple of the Inscriptions in Palenque, Mexico.

And there's plenty more to explore, although not all images are available for embedding.

Before you start using Getty Images on your blog, though, there are three things you need to know:

  1. Getty's terms say photos may not be used "for any commercial purpose (for example, in advertising, promotions or merchandising)". This is a potentially grey area, given that lots of blogs carry advertising and almost every company uses social media to keep in touch with its customers. 
  2. You are only allowed to use the photos by using a special embed code. This is the same technique used to embed Youtube videos today. You don't actually put a copy of the photo or video into your blog, you just put in a code that brings it in from Youtube or Getty when someone looks at your post. That means, however, that Getty controls the embedded photos on your blog, not you. They can remove them at any time, serve alternative content, or even serve ads. Some content management systems might not allow you to embed content in this way. Using embed codes slows down your web page because it adds in another request to a different server. For those who want to optimise the user experience, they're not ideal.
  3. The entire image area is a link back to Getty at the moment. It would be more usual for the credit line to be a link. Having such huge links creates the possibility that people (especially those using touch-based devices) will end up visiting them by mistake, which can be a frustrating user experience.
The collection of images is fantastic, though, and the way the photos are presented looks great. This is an interesting strategy, and it will add some wonderful imagery to the web. As long as you have a strategy to manage the risk of images disappearing, this provides a great free source of high quality editorial photos.

Bookmark and Share
Permanent link for this post.


Dip into the blog archive

June 2005 | July 2005 | August 2005 | September 2005 | October 2005 | November 2005 | December 2005 | January 2006 | February 2006 | March 2006 | April 2006 | May 2006 | June 2006 | July 2006 | August 2006 | September 2006 | October 2006 | November 2006 | December 2006 | January 2007 | February 2007 | March 2007 | April 2007 | May 2007 | June 2007 | July 2007 | August 2007 | September 2007 | October 2007 | November 2007 | December 2007 | January 2008 | February 2008 | March 2008 | April 2008 | May 2008 | June 2008 | July 2008 | August 2008 | September 2008 | October 2008 | November 2008 | December 2008 | January 2009 | February 2009 | March 2009 | April 2009 | May 2009 | June 2009 | July 2009 | August 2009 | September 2009 | October 2009 | November 2009 | December 2009 | January 2010 | February 2010 | March 2010 | April 2010 | May 2010 | June 2010 | August 2010 | September 2010 | October 2010 | November 2010 | December 2010 | March 2011 | April 2011 | May 2011 | June 2011 | July 2011 | August 2011 | September 2011 | October 2011 | November 2011 | December 2011 | January 2012 | February 2012 | March 2012 | June 2012 | July 2012 | August 2012 | September 2012 | October 2012 | December 2012 | January 2013 | February 2013 | March 2013 | April 2013 | June 2013 | July 2013 | August 2013 | September 2013 | October 2013 | November 2013 | December 2013 | January 2014 | February 2014 | March 2014 | April 2014 | May 2014 | June 2014 | July 2014 | August 2014 | September 2014 | October 2014 | November 2014 | December 2014 | January 2015 | February 2015 | March 2015 | April 2015 | May 2015 | June 2015 | September 2015 | October 2015 | December 2015 | January 2016 | February 2016 | March 2016 | May 2016 | July 2016 | August 2016 | September 2016 | October 2016 | November 2016 | December 2016 | January 2017 | April 2017 | July 2017 | August 2017 | October 2017 | November 2017 | January 2018 | February 2018 | Top of this page | RSS

Books by Sean McManus

Scratch Programming in 

Easy Steps

Scratch Programming in Easy Steps

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Learn to program with the Scratch programming language, widely used in schools and colleges.

Set up your Pi, master Linux, learn Scratch and Python, and create your own electronics projects.

Coder Academy

Coder Academy

Cool Scratch Projects in Easy Steps

Cool Scratch Projects in Easy Steps

Learn to make games and other programs in Scratch 2.0, and make a web page in HTML, with this highly interactive book for 7-10 year olds.

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

More books

©Sean McManus.