/* jquery */ /* jquery accordion style*/ /* jquery init */

30 December 2012

Raspberry Pi Python: Module Installation

One of reasons for Python's popularity is its large collection of modules to help you create tools, utilities, games, websites, smartphones, robotics, and much more.

While the Standard Python Library contains well over 200 modules, sometimes you'll need to install new ones. In particular the graphical user interface (GUI) module 'Tkinter' and the impressively functional 'PyGame' module can be missing.

Assuming your Raspberry Pi has the official Debian-based Linux image on the SD card here is how you'd perform an install.

Boot up your Raspberry Pi and ensure it's connected to the Internet. Then open a new terminal window with the LXDE Desktop's 'Other->Terminal' menu option.

Now type the following Linux commands next to the '$' prompt, pressing the 'Enter' key each time:

  $ sudo apt-get install python-tk

  $ sudo apt-get install python-pygame

If prompted enter the password you used when logging on to your Raspberry Pi, and reply 'y' to any prompts.

28 December 2012

Raspberry Pi Python: Interactive Mode

Did you know Python has an interactive mode?

Here's why it's a great place to start coding with Python:
   you can be coding in seconds
   type any Python statement and see the results immediately
   Python tells you if there's something it doesn't understand
   it's an interactive way to experiment and gain coding confidence

So, boot up your Raspberry Pi and let's get started.

Python's interactive mode runs in a Linux terminal window. Two simple steps are all that's required:

Open a new terminal window

From the LXDE Desktop menu on your Raspberry Pi and select the 'Other->Terminal' option.

This will open a new terminal window.

Start the Python interpreter

Next to the '$' command prompt type 'python' and press the 'Enter' key, as below:

$ python

You'll see a short message about the version of Python, and the interactive mode cursor '>>>' will appear.

Now you can type any Python statement and press the 'Enter' key to see the results.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

25 December 2012

Raspberry Pi SD Cards

The Raspberry Pi board doesn't come with any onboard storage. Instead it has a more flexible solution, namely an SD card socket. You could build up a collection of SD cards, each with a different version of the Linux - or even a completely different operating system.

To install your chosen operating system, and still have plenty of free space for files and data, buy an 8GB or SD larger card. Operating system downloads and installation instructions are available on the Raspberry Pi Foundation website.

Unfortunately, not every SD card on the market is compatible with the Raspberry Pi. So, I'd suggest consulting a compatibility list before making a purchase. One of the most comprehensive is provided by the eLinux website.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

21 December 2012

Raspberry Pi Geany Editor

The Geany editor is an excellent environment for the Python programmer.

Here are just some of the reasons why:

Geany is a lightweight editor, so ideal for the Raspberry Pi
Geany is easy to setup and use, yet offers many customisation options
Geany understands Python syntax and colour-codes the source code
Geany checks your code for syntax errors before it runs
Geany runs your program with a single mouse click
Geany understands the syntax of many other programming languages

Your Raspberry Pi image may already include Geany. If not don't worry, it's easily installed.

Install Geany

Just open a new LXTerminal window and type the following command:

sudo apt-get install geany

Fix Geany

By default Geany uses the 'xterm' program to execute your program. Unfortunately, some Raspberry Pi images do not have the 'xterm' program installed.

To fix this problem select Geany's Edit->Preferences menu option, then select the 'Tools' tab on the left. Now change the 'Terminal:' setting to the one below:

/usr/bin/lxterminal

Press the 'Save' button to keep your changes.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

13 December 2012

Accessorise Your Raspberry Pi

Looking for some interesting and fun accessories for your £25 Raspberry Pi computer? Maybe as a Christmas stocking filler for your kids?

Then take a look at my four page Accessorise Your Raspberry Pi article in Micro Magazine issue 1239, out today.

There's plenty of choice including mini keyboards and mice, tiny wi-fi adaptors, USB hubs, cameras, all kinds of GPIO-connected electronic boards, colourful cases and books.

Here are a few extracts:

The latest version of the 'official' operating system - based on the Debian 'Wheezy' release - has all the necessary wireless drivers and support software. So, all you'll need is a suitable wi-fi dongle.

One of the most attractive is the tiny Nano Wireless USB adapter. Its miniature dimensions makes it a perfect companion to the Raspberry Pi. Yet, despite the size it's based on the more advanced 802.11N wireless standard, which delivers much greater range and speed potential than older 802.11g based alternatives.

An easy way to start is with a breadboard-based project kit, which includes the ribbon cable plus various components and wires. An example is this programmable traffic light kit (goo.gl/kbZPB). With such a kit new projects can be tackled simply by purchasing a few more electronic components.

Adafruits prototyping Pi Plate (goo.gl/DQhsw) goes a little further. The plate surrounds a breadboard grid layout with numerous connector blocks to wire up all kinds of sensors, components and electronic devices that won't easily fit on a breadboard. The Adafruit website also provide an informative tutorial about how to use the Pi Plate (goo.gl/WemiU).

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

22 November 2012

A Quick Guide to Scratch on the Raspberry Pi

Would you like to delve into the world of animation and game creation? Do you want to bring your imaginative ideas to life without learning a software development language?

With Scratch, from MIT's innovative Media Lab (media.mit.edu), you can construct all kinds of multimedia projects without writing a single line of code. Find out more in Micro Mart issue 1236 - out today.

Here are a few extracts:

The fully visual interface is aimed at anyone old enough to use a keyboard and mouse. In fact, you hardly need to use the keyboard at all.

Scratch does away with the traditional editor and symbolic language approach. In its place there's a collection of graphical, snap-together programming blocks. Blocks with different shapes that lock together in specific ways. Blocks that perform distinct operations. Blocks with entry fields and drop down lists for specific data values.

The easiest way to dive into Scratch is to start with a ready-made program. This way we'll have something that works immediately. So we'll do just that, then spend a little time discovering how this particular example is put together, before making some changes of our own.

As we've seen Scratch makes it easy to create multimedia software, and have plenty of fun at the same time. For more inspiration visit MIT Media Lab's large and dynamic educational community at scratched.media.mit.edu. A community who frequently updates this website with new projects and helpful videos.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

18 November 2012

Enterprise Games by Michael Hugos

In fitting with the subject matter this book has a lively, engaging and conversational delivery. In structure it's loosely divided into three parts.

Part one addresses the business-centric application and potential of what Hugos refers to as Game Mechanics. It stresses the need for game-like goals and rules, real-time feedback, player engagement and generating a desire to participate. Here you'll find a succession of insightful thoughts and challenges to the status quo of business operations.

The second and third sections are filled with examples to illustrate Game Dynamics in action. Examples as divergent as multi-player online games, social media, mobile apps, 3D animation and visual data analytics. These sections are quite similar in form, with the latter focusing more on the social implications.

Is the book an informative and thought provoking guide to Game Mechanics? Yes it is. Does the book contain examples of how specific companies employ Game Mechanics today to attract, engage and motivate your customers or employees? Absolutely.

However, this book doesn't answer the puzzle of how to implement Game Mechanics inside your own organisation. It's left to the reader to find their own path within the gaming framework. Such a description isn't really possible. After all, there are so many routes to take, so many options to explore, there isn't one simple formula that will work for every organisation. A positive book in nature, the optimistic highroad focus means it doesn't really explore the potential drawbacks and consequences of a game-centric approach.

The world of Game Mechanics is at an embryonic stage. Enterprise Games is a comprehensive and accomplished entry point to exploring this new world. In the coming years it will be interesting to see who's had the foresight, bravery and determination to make it work.

1 November 2012

Raspberry Pi Updates and News

Keeping up with the news and events in the fast moving Raspberry Pi world can be tricky.

Read my Raspberry Pi Updated article to discover the essential manufacturing, availability, software and community news - out now in Micro Mart issue 1233.

Here are a few extracts:

Coinciding with the revision 2.0 announcement is the news that Raspberry Pi boards will now be manufactured in the UK. It's a happy announcement in these times of gloomy economic outlook and high levels of unemployment.

The Sony factory, situated in the Welsh town of Pencoed, is the chosen site. Sony have had electronic manufacturing facilities in Wales for the last 40 years, and this particular factory is celebrating its 20th anniversary this year. Current production is around 2500 per day.

News and magazine coverage only seems to grow with each passing month. Here at Micro Mart we've published numerous Raspberry Pi articles including a getting started guide (July Special issue), building a media server (issue 1222), the summer coding competition (issue 1219) and a six part introduction to Python (issues 1220 to 1225).

Issue six of The MagPi monthly magazine, dedicated to Raspberry Pi enthusiasts, came out this October. Each issue has a wide selection of hardware and software projects - such as the Skutter robot - plus a generous sprinkling of tutorials and tips. And best of all it's free to view and download.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

25 October 2012

Hybrid PCs, Microsoft Surface and Windows 8

Hybrid PCs aim to provide all the advantages of a handheld tablet with a fully functional laptop.

Discover their potential, including an appraisal of the new Microsoft Surface devices, in my Micro Mart issue 1232 six page feature article - out today.

Here are a few extracts:

Laptops are essentially a portable desktop machine, complete with powerful processor, large storage capacity, enhanced connectivity, well-specified operating systems and fully-featured application software. Their owners need a device that supports a wide variety of construction-focussed activities. A device that can create and edit office documents, write blogs and articles, fabricate and process images, produce and manipulate videos, design and build websites, or develop and test software apps.

However, a tablet is quite a different proposition. It's a consumption-centric device, aimed primarily at leisure and entertainment activities. Tablet owners want to swipe through photos, kick back with a video, catch up on missed TV programmes, listen to music, play games, surf the web and read ebooks. The smaller 7 inch screen versions are ideal when reclining on the couch, visiting a coffee shop, travelling by train and packing the holiday suitcase. Tablets with high definition 9 to 11 inch screens are more suited to business professionals and researchers, who wish to read documents, magazines and websites without recourse to frequent zooming in and out.

A successful hybrid device must cater for both construction and consumption activities. It's quite a challenge. Any device attempting to run office suites, software development tools or high-end image and video manipulation applications must have a reasonable screen size, adequate CPU and graphics horsepower, plus a good quality keyboard. Yet, lightness, portability, touch-centric operation and long battery life are the prerequisites for tablets you can pop into your bag as you head out of the door.

Take the Surface device case for example. It's thin and light, constructed from a unique VapourMg material. VapourMg combines the strength and lightness of magnesium with an industry-first process that forms a tough, scratch-resistant, subtly tactile finish. It has a superbly designed, integrated flip-out stand with a high-quality, dependable hinge mechanism - all in the same VapourMg material. Despite the sleek form it's still endowed with a good selection of connectivity, including full-sized USB ports.

Then there's the snap-on covers, complete with integral keyboard and trackpad. They're attached magnetically in an easy snap-on operation, yet hold securely. They protect the screen and give a reassuring 'book-like' feel when carrying the device around.

The crux of the Windows 8 architecture is its dual personality. The classic desktop mode still exists to deliver that familiar productive experience and ability to run the powerful software required for office, web, multimedia and software development activities.

However, the desktop is now supplemented by a new Metro-style user interface. This UI offers a radically different, colourful, touch-friendly user experience. Gone are the fiddly menu options, scroll bars and general multiple window clutter. They're replaced by a collection of horizontally sliding tiles supporting swish-able panels, pinch-able zooms and gesture invoked operations.

The Metro-style UI is attractive, clean and fast. The 'live tiles' deliver real-time, dynamically-updated content, such as weather reports, RSS feeds, new email messages and tweets. It successfully creates the sort of laid-back, consumption-mode experience that's best enjoyed while reclining in a comfy chair, lolling around on the sofa, or sipping your cappuccino.

Purchase Micro Mart back issues in a variety of formats at the Zinio website for just £1.49 each.

Read more Microsoft analysis posts.

20 October 2012

Terminal World by Alastair Reynolds

Dividing a world into mysterious zones is an inspired storytelling concept. The conditions in each zone dictate the type of technology that can be employed, and anyone crossing a zone boundary will suffer from physical distress. It all leads to considerable intrigue and tension as the main characters, Quillon and Meroka, undertake their long journey.

The zonal constraints impart a distinctly steampunk feel, with horses, airships and various steam power contraptions making regular appearances. Each zone tends to have its own collection of inhabitants. Although largely humanoid they often exhibit divergent evolutionary traits, including enigmatic Angels and dark-souled Skullboys. The grotesquely memorable Carnivorgs are an exception.

I found the book both entertaining and easy to read, but it might not appeal to everyone. Some may be unhappy that many certain key aspects are never fully explained. For example the source, number and extent of the zones, or the origins, capabilities and evolutionary map of its humanoid inhabitants. Plot lines are sometimes left hanging in a wait-for-the-sequel type fashion - especially the ending. Yet, as there is no sequel, some readers may feel shortchanged with this approach.

Of course, just as in real life, a fictional book doesn't have to provide all the answers. As a writer, hanging story lines simply stir my imagination. And, in the end, I found this book had a distinctly different feel to other SF books I've read. A good thing in my opinion.

11 October 2012

Google's Data Liberation Front

Data privacy and control is a big issue in these cloud-centric times. It often seems users are blocked at every turn when trying to access their own information.

However, the Data Liberation Front can help. Find out how in Micro Mart issue 1230.

Here are a few extracts:

The ability to view, download and delete cloud-stored information is often heavily restricted. Try to uncover exactly what details have been captured and stored and you'll invariably be confronted by a wall of silence.

Why? Well, the value of personalised data to organisations like Google, Apple, Facebook and Amazon is immense. If a user cannot move their information en masse, they are far less likely to move to a rival service.

With so many Google products and services the team faced a considerable challenge. Although Google already had a rich collection of low-level programming interfaces, they didn't always fit the bill. And delivering a well integrated solution, which also incorporates appropriate levels of security, isn't the simplest task in the world. As a result it's taken quite a while for the project to get off the ground.

The technology developed by the DLF team may help Google's public image, and go some way to pacify those who say their 'Don't Do Evil' motto has been forgotten in a headlong rush to complete with the likes of Apple and Facebook.

Read more analysis posts.

4 October 2012

Advanced Driver Assistance Technology

The annual Department of Transport road accident statistics are tragic and depressing. These accidents wreck lives, destroy families, create financial havoc and stress the NHS system.

Soon all new vehicles will be fitted with Advanced Driver Assistance Technology, designed to significantly reduce the number of deaths and injuries.

Find out more in Micro Mart issue 1229, out today.

Here are a few extracts:

Figures released for the UK from the Department for Transport (DoT) make depressing reading. In 2011 almost 2,000 people lost their lives due to road accidents, a figure that includes over 450 pedestrian and 107 cyclists. This exceeds the death toll from four jumbo jet crashes. Widen the scope to European roads and the number of fatalities climbs to tens of thousands.

UK injury statistics are much higher still. DoT's 2011 figure for reported car occupant injuries was just under 125,000, with more than 8,000 of those being serious in nature. The road-related injuries suffered by pedestrians and cyclists are just as depressing at over 8,000 a year - that's over 150 every week.

Autonomous Emergency Braking (AEB) systems continuously monitor the scene directly in front of a car and use smart software to ascertain if a collision is likely to occur. If there's cause for concern the driver will receive some kind of audio-visual warning of an impending accident. In the event a driver fails to take the necessary action and the situation becomes critical, the AEB system will act independently of the driver, applying the brakes to perform an emergency stop.

LIDAR uses light beams to offer a lower cost alternative to radar. These beams illuminate the scene and a receiver captures the light reflected back from any objects. In this way it can ascertain an object's shape, size and distance information. LIDAR isn't restricted to visible light. Ultraviolet, near infrared and laser beams can be used for improved range and low-light imaging. This capability means LIDAR is routinely found in surveying instruments, archeology equipment and onboard aircraft and satellites.

Volvo is well known for its safety focus. So, you probably won't be too surprised to know it is one of the leaders in AEB research and implementation. Some models, such as the XC60, S60 and V60 have had AEB options since 2008. However, did you know Audi, Ford, Honda, Jaguar, Lexus, Mercedes and VW all offer AEB-installation options. Two mainstream examples are the highly popular Ford Focus and the Volkswagen Up.

Purchase Micro Mart back issues in a variety of formats at the Zinio website for just £1.49 each.

19 September 2012

Monetizing The Mobile Web

How do you make money from the mobile web?

As the mobile Internet fast becomes the dominant way to access the web, previously successful advertising strategies clearly need to be evolved.

Google, Facebook and others don't appear to have the answer. So, who will find the key to mobile marketing?

Here are a few extracts:

As mobile device usage evolves, mobile advertising needs to evolve too.

We've already seen a shift from text and banner ads to more sophisticated efforts. And there's a growing need for alternatives to the pay-per-click scenario. With a click-to-call model the advertiser only pays when the user responds with a phone call. Another new tactic is posting an entry into the user's smartphone diary, say for a new film or music concert.

One of the most interesting gamification models comes from startup company Kiip (kiip.me). Although Kiip has only around 30 employees, they've already secured big-name clients such as Pepsi, Disney and Best Buy. What's different about Kiip?

...

Instead of avoiding popups and trailers, now users actively seek them out simply by playing the game. It's led to dramatic growth. Kiip is already inside 300 apps on over 30 million iOS and Android devices, and has rewarded over 50 million players.

As well as being declared the first 'social media games', the London Olympics also emphasised the popularity of the mobile web.

In the UK mobile access accounted for 46 percent of all Olympic online traffic. While across Europe around a third of all Olympics related searches originated from mobile devices.

Video figures are just as impressive. The BBC revealed 41 percent of video streams were watched by mobile device owners, and US broadcaster NBC delivered 45 percent of its online Olympic videos to smartphones and tablets.

Read more analysis posts.

16 September 2012

Win-Win Selling by Wilson Learning Library

Selling isn't an easy profession. In a rapidly changing world with increasingly savvy consumers, the techniques that worked yesterday might not succeed tomorrow.

The approach discussed by Win-Win Selling takes the well known needs-fulfilment salesman scenario and extends it to the 'counselor evolution' model. This model is all about creating a close relationship, or even longterm partnership, between the salesman and the customer.

There are four main sections, namely Relating, Discovering, Advocating and Supporting. The overall aim is to encourage a more customer friendly approach by changing attitudes, rather than imposing a rigidly defined structure. While the primary audience is sales professionals, there's plenty of thought provoking information for anyone connected to sales, marketing or advertising.

Throughout it emphasises the importance of honesty, credibility, competence, and in particular empathy. Empathy is essential to discover your customers attitudes, motivations and feelings, understand their problems and develop a strong, trusting relationship. In this way a successful salesman will identify and fill the gap between the customers current needs and their desired solution.

Once learnt the basic 'relationship' selling principles can be used to form the basis of your own bespoke technique. In fact, the book positively encourages the reader to pursue their own style and best practices based on the information provided.

It would have been easy to create just another 'theory' book. Instead the reader will enjoy a practical style of presentation, one where advice is backed up with a raft of stories and case histories, which clarify the messages and illustrate how they work in real-world situations. My only niggle is the occasionally disjointed layout and flow.

In a crowded marketplace Wilson Learning have created a distinctly individual book that's as easy to read as it is informative. And one that successfully conveys a better way to sell.

9 September 2012

Home Truths (Novella) by David Lodge

Create a stage play script. Develop it during the rehearsal stage. Watch it being performed. Then turn it into a prose fiction novella.

Certainly not your typical fiction book journey, however, in the skilful hands of Lodge the result is a delightful little book.

Throughout the narrative I was constantly aware of a stage-like influence. In my mind's eye I could easily visualise how the set would appear to the audience, 'watch' a new character take to the stage and 'see' the dialogue performed. I could even anticipate the audience laughter.

How much of this was down to prior knowledge of how the book was conceived, the image on the cover, or the actual content was difficult to ascertain.

David Lodge isn't afraid to experiment with composition, style and voice. It's one of the primary reason I enjoy reading his novels so much. In the 'Afterword' section of the Home Truths novella Lodge asks the reader to judge if process 'works'. This reader say it does, brilliantly.

5 September 2012

Write To Sell by Andy Maslen

Write to Sell is a focussed, content-rich guide to the craft of copywriting. Maslen's highly regarded experience, knowledge and skills really shine through the pages.

I particularly liked the book's format. No padding waffle, no excessive repeating of points and advice, no drifting into marketing mode. Just richly-packed pages with masses of relevant, plainly stated and insightful information.

Split into six sections, the first three aim to clarify and focus the reader's thinking, and encourage them to view things from the buyer's perspective. The last three sections guide the reader through copy generation. It's an easy and engrossing read from cover-to-cover. However, the clear layout, numerous summaries and abundance of tips also make for a great reference book.

I think Maslen has created a gem. The techniques, advice and tips are applicable to reporting, presentations and writing in general. As a source of inspiration and advice it's become a constant companion in my copywriter activities - which says it all really.

Links: Andy Maslen's Sunfish company website

3 September 2012

Raspberry Pi PyGame Module Introduction

The last of my Learn Python on the Raspberry Pi series, in issue 1225, has an introduction the PyGame module.

The article builds on previous lessons including loops, condition statements, function definitions and event handling. The end result is a fully explained program structure that can form the basis of more advanced PyGame programs.

If you don't have a Raspberry Pi you can still follow the series with these emulation instructions.

Here are a few extracts from Part 6:

Trying your hand at game programming is an excellent way of honing existing expertise and gaining new skills. Unfortunately, creating even a simple game with the Python language and its Standard Library requires significant levels of programming experience.

However, and not for the first time, Python's extensive collection of modules comes to the rescue. The PyGame module is designed to ease the path to game creation with a rich set of highly specialised functionality.

A complete game will typically involve graphics, animation, collision detection, sound effects, music tracks, scoring and handling user input events. Quite a challenge. The PyGame module is nevertheless more than capable of meeting this challenge.

PyGame can draw lines, shapes and surfaces; write text in a large range of fonts and styles; load, manipulate and move images; play sounds, music tracks and videos; consume keyboard, mouse and joystick input events; interact with files, CDROM disks and cameras; and much more. To see a list of PyGame module functionality visit pygame.org/docs/ref.

A major reason for choosing Python as the default Raspberry Pi programming language, is the huge collection of programming resources, tips, videos and code examples that are available. The PyGame module is no exception.

The pygame.org website has masses of information and assistance for the keen PyGame coder to explore, including documents, tutorials and screenshots. In particular there's an extensive collection of examples at pygame.org/docs/ref/examples. If you prefer a visual approach to learning, a quick search on YouTube will uncover plenty of video tutorials and guides.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

29 August 2012

Learn Python on the Raspberry Pi: Turtle Fun

This week in my Learn Python on the Raspberry Pi series it's all about having fun with Turtle Graphics.

Using Python's 'turtle' module all it takes is a few lines of code to create engaging, colourful graphical patterns and designs.

If you don't have a Raspberry Pi you can still follow the series with these emulation instructions.

Here are a few extracts from Part 5:

Logo is an interesting computer language.

While its origins go back to the 1960s (see boxouts), in recent times Logo has been associated with something called 'turtle graphics'. The idea is to draw pictures and generate patterns by issuing commands to a screen-based 'turtle'.

Logo has a lot going for it. It's a language based on simple commands, using words that even the youngest primary school pupil will understand. Words such as 'forward', 'backward', 'left' and 'right'.

So, how do we access all this fun with Python? Well, it's all down to a module called 'turtle', which has a collection of Logo-like commands, implemented as functions - plus some useful window and event management features.

I hope you enjoyed this introduction to turtle graphics. Maybe you've been surprised at how easy it is to create quite complex patterns. There's so many ways to experiment, so have some fun creating your own little turtle programs. Visit the turtle module reference pages to discover more.

Next time I'll continue the visual theme by introducing game programming with the PyGame module.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

22 August 2012

Learn Python on the Raspberry Pi: A GUI World

Part four of my six part Learn Python on the Raspberry Pi series introduces the Tkinter module, which allows us to code Graphical User Interface (GUI) apps, complete with windows and widgets.

The article shows how to create a file search app with search criteria entry fields, search button and scrolling results list.

Unfortunately, there's a missing boxout containing instructions on installing the Tkinter module. It's a simple enough task, just type the following line into a terminal window:
sudo apt-get install python-tk
If you don't have a Raspberry Pi you can still follow the series with these emulation instructions.

Here are a few extracts from Part 4:

Every GUI application has a very similar structure. Once we understand this structure we'll be able to create any number of GUI programs, from the very simple to the highly complex.

Just as we saw last time, we can use functions to divide the program into easy-to-read, easy-to-maintain code blocks. A typical GUI program has four main sections:
  • window and widget creation
  • window initialisation
  • the main window loop
  • event handlers

A GUI program must be able to determine which key was pressed. Not just the alphanumeric keys, but also shift keys, control keys, alt keys, function keys, cursor keys, the escape key and special keys like the Windows key. As for the mouse, a program needs to determine the current coordinates of the mouse pointer, whether a mouse button has been clicked and if the scroll wheel has moved.

How do we do this? In a GUI program it's done with something called 'callbacks'.

As you can see a GUI program requires quite a bit more code than a simple terminal-based one. However, the flexibility offered by a widget-based user interface is certainly worth the effort. And the possibilities for refinement are almost endless. For example, you could change a widget's size or colour, add new widgets, or create a completely different layout.

Next time I'll show you how to have loads of fun with turtle graphics.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

15 August 2012

Learn Python on the Raspberry Pi: Building Blocks

In part three of my six part Learn Python on the Raspberry Pi series you'll discover how to defined your own functions, creating a number guessing game in the process.

Functions enable you to develop modular, well structured programs. Such programs are easier to edit, extend and debug.

If you don't have a Raspberry Pi you can still follow the series with these emulation instructions.

Here are a few extracts from Part 3:

So far all our programs have had a simple flow, from top to bottom. While this is fine for small examples, as soon as programs become longer and more complex, things tend to become more difficult.

...

A far better approach is to break the solution down into a series of identifiable steps. Each step can be designed and coded in isolation.

As an analogy think of a Lego set. You have a wide selection of bricks in all kinds of sizes, shapes and colours. These bricks enable you to build models quite quickly, just by combining the right type of bricks in the right sequence. If you change you mind, or have a new idea, the type of bricks used or their assembly sequence can be quickly changed.

All functions will have a pair of brackets, or parenthesis, after the name. Optionally there may be one or more parameters declared inside these brackets. Here there is just one called 'radius', which will contain a numeric radius value. Finally, there's a colon ':' at the end of the definition. As we saw last time with Python loops, a colon signifies that all the indented code below will belong to this function, and will be executed when it's called.

Creating our own functions is a major step in becoming a more accomplished programmer. Study just about any program example on the web or in a book and you'll see functions everywhere.

Next time we'll be getting much more visual. We're going to create graphical user interface (GUI) programs using another powerful Python module, Tkinter. Until then have fun with the guessing game.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

9 August 2012

Learn Python on the Raspberry Pi: Going Loopy

Part two of my six part Learn Python on the Raspberry Pi series is out today. This week you'll learn about loops and conditional statements, using them to create a simple timer and a file search program.

Python loops and conditional statements are important programming elements for anyone thinking of entering the Raspberry Pi Coding Competition.

If you don't have a Raspberry Pi you can still follow the series with these emulation instructions.

Here are a few extracts from Part 2:

Loops are a very important concept in any programming language. Almost every program will contain at least one loop. They are especially important in graphical user interface (GUI) and game programming.

There are number of looping scenarios. One is to repeat the code inside a loop a fixed number of times. Another is to loop until a specified loop condition is satisfied. Alternatively, a loop exit command can be issued depending on a particular program state. In this and subsequent articles we'll meet all three of these scenarios.

Sometimes we need a loop that executes a fixed number times. The 'for' keyword is the classic way to create such a loop. You'll find this keyword in many other programming languages.

Let's look at a typical Python 'for' loop statement. Suppose we wanted to print out each character of a string. The code would look like this:
message = "Hello"
for char in message:
   print char

That concludes our first look at loops. We've seen how they enable us to create small yet extremely useful programs. Loops are usually associated with conditional statements - another key programming technique. We'll be using loop and conditional statements extensively throughout this series.

Next time we'll be defining our own functions, the raw building blocks of any well structured program.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

2 August 2012

Learn Python on the Raspberry Pi

My new Learn Python on the Raspberry Pi tutorial series started today in issue 1220 of the weekly Micro Mart magazine.

Each week for six weeks there'll be an interactive four page article covering a different aspect of Python coding.

It starts with the basics then moves on to more advanced topics such as GUI with Tkinter, Turtle graphics and animation using the PyGame module.

See my Gentle Introduction to Python Coding on the Raspberry Pi.

Visit my Raspberry Pi page for Pi news, reviews, advice and tutorials.

26 July 2012

Raspberry Pi Coding Competition

On 7th July 2012 Games Britannia launched the first Raspberry Pi programming competition.

Its aim is to inspire and encourage young people to create original software applications.

With kind permission of Micro Mart the full article is reproduced below.

Raspberry Pi Coding Competition

In 2006 Eben Upton assembled a small team of teachers, academics and computer enthusiasts. The goal was to create a small, low-cost programmable computer, aimed at inspiring owners to experiment with software development and hardware projects. A computer that could recreate excitement and the taste for engineering many acquired in the 1980s, while using the BBC Micro, Commodore 64, Sinclair Spectrum and other similar home computers.

The result is the Raspberry Pi. A highly capable computer on a tiny circuit board, not much bigger than a credit card. Despite its diminutive size the on-board processor is capable of running a fully-specified Linux operating system, complete with graphical user interface. Running Linux ensures access to a huge collection of software applications, tools and programming languages.

This mini-computer includes HDMI, video, USB and ethernet connectivity. In addition there's a general-purpose input-output (GPIO) interface, which can be connected to experimental circuit boards and a range of peripheral devices, such as a video camera.

With a price tag of around £20 the Raspberry Pi generated a huge amount of interest immediately it was announced. The initial stock sold out almost as soon as the ordering lines opened, creating a long waiting list of enthusiastic but disappointed consumers. In the first week alone the Raspberry Pi operating system was downloaded over 30,000 times.

Competition Launch Day

On 7th July 2012 in Sheffield Games Britannia set out to inspire and encourage young people to create original software applications by launching the first Raspberry Pi coding competition. The competition has two age categories of 13 or under, and 14 to 18. To qualify all entrants must still be in full-time education.

The contest, sponsored by the Raspberry Pi Foundation, will run for eights weeks until 1st September 2012. A period that neatly coincides with the school summer holidays - in the northern hemisphere at least.

As far as Games Britannia is concerned, this is just the first of many challenges. Plans are already in progress to create a series of frequently run competitions, possibly one every week or two.

Judging And Prizes

The judges will select the eventual winner by choosing the most impressive piece of Raspberry Pi software. There are no application categories, so anything goes. Contestants are free to let their imagination run wild.

Creating such an impressive piece of software will undoubtably take a while to envisage, design and develop. However, there are some very attractive prizes on offer. The winner will receive $1000, or around £650, and there are five runner up prizes of $200 (£130) each.

No Raspberry Pi?

Does this competition only apply to Raspberry Pi owners? Not at all. In fact, any PC owner can take part. How is that possible you might ask?

Well, what's required is a software application called a virtual machine. This application can emulate the Raspberry Pi within a virtual environment, complete with user interface, applications and tools. It doesn't matter whether you own a Windows, Apple or Linux machine, they can all run a virtual machine environment.

There are quite a few virtual machine software applications available, each with their own pros and cons. Let me describe how it's done with VirtualBox from Oracle, a popular and easy-to-get-started option. It's just a three step process.

Step one is to download and install VirtualBox.

Visit virtualbox.org/wiki/Downloads to see the latest versions. Make sure you select a download appropriate to your PC's operating system. The installation process is pretty straightforward, and there's help available at virtualbox.org/manual/ch02.html.

Step two involves obtaining a Raspberry Pi image.

This image contains everything you need to start writing code, including the same Linux operating system and software development tools you'd find on a real Raspberry Pi. There are quite a number available on the web, but I've used this image. After downloading this file unzip it to create a new folder called 'RaspberryPi-VirtualBox'. This folder will contain a '.vmdk' virtual disk file and a '.ovf' configuration file.

Step three adds the image to VirtualBox.

Startup the VirtualBox application, then select the File->Import Appliance menu option. This will start a wizard prompting you to choose an '.ovf' file. Select the one in the unzipped folder. Complete the wizard pages to finish importing the image.

Now all that's left to do is boot the image with the VirtualBox 'Start' button. After a short delay, the Raspberry Pi desktop will appear in the new window. Login using the username 'rpi' and password 'password', and you'll be up and running.

There are a number of alternative virtual machine applications. QEMU is a popular choice, with plenty of how-to-get-started instructions on the web. And you'll find a few other Raspberry Pi images to download at rpi.descartes.co.uk/sim-emu.

What Language?

The competition rules don't specify a particular programming language. The official Raspberry Pi development language is Python. Not only is Python installed by default, but a Python-friendly editor called Geany is also provided. If Python is a new language to you, then look out for my new Micro Mart series Learn Python on the Raspberry Pi.

However, as the underlying operating system is Linux, there's a wide range of well-supported languages to choose from. Languages such as C, C++, Java, JavaScript, PHP, Ruby, Perl, Lua and BASIC, to name just a few. The only complication is you may have to have to install these languages yourself.

Scratch from MIT is another interesting alternative. It's a visual language which uses interlocking blocks to build a program, as opposed to writing lines of code. There's a collection of colourful scratch cards to show how easy it is to create simple applications.

How To Enter

Competition entries are accepted from 4th August 2012. On this date an entry form will appear on the Raspberry Pi home page. Once you've created your software application you'll need to create a single archive file containing all the source code, images, data, and anything else the application needs. It's this archive file that will be submitted along with the entry form information, including the entrant's age on the date of entry.

If you have more than one application idea, that's fine too. There's no limit to the number of entries per entrant, so feel free to send in as many applications as you like. Just make sure they are truly original software creations.

Happy coding.

The Micro Mart magazine is on sale at W.H. Smiths, newsagents and some supermarkets. Purchase Micro Mart back issues in a variety of digital formats at the Zinio website.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

20 July 2012

The New Domain Names

It's the biggest shakeup of the domain name system since the popularisation of the web.

Starting next year we'll find our familiar domain strings - '.com', '.co.uk', '.net' and '.org' and so on - supplemented by hundreds of others.

So what are these new suffixes? How many will there be? Who has applied for what? And which companies are battling for the rights to own '.music', '.play', '.app', '.cloud' and '.shop'?

All this, and more, is in this week's Micro Mart magazine, issue 1218.

Here are a couple of extracts from my article:

So, what's changed? Well, now you can apply for a bespoke top-level domain string. Any name can be proposed, although there are guidelines on what's likely to be accepted. International languages are supported, so the string can be in Chinese, Arabic or Cyrillic.

Before you get too excited it's not a low-cost operation. In fact, ICANN's price is deliberately set very high to deter 'timewasters'. First, there's an upfront fee of $185,000, followed by an annual fee of $25,000. In addition there's the possibility you'll have to reserve some money for lawyers’ fees (more on this later).

And taking control of your own gTLD is a weighty responsibility. It equates to owning a piece of the Internet. So, apart from the financial side of things, ICANN will also perform checks on the nature and strength of each applicant. In the end only a relatively small number of medium to large sized organisations will end up operating one or more custom TLDs.

Integral to the ICANN process is a seven month objection period, which commenced on 'Reveal Day'. You may be surprised to know objections are not limited to other applicants. Anyone with suitable grounds can submit a formal objection, for example if they think an organisation will misrepresent the domain string in question. The ICANN site contains detailed information on how to file an objection.

ICANN has allocated around a third of the $350m so far gathered to handle objection resolutions. It sounds a tidy sum, but will it be enough? Many of these battles are bound to be lengthy and expensive. Cash-rich organisations can afford top-class intellectual property lawyers. With so much at stake the sums of money thrown at securing certain strings will be staggering - it's a great time to be a lawyer.

And if you really can't wait to find out, visit ICANN's website for the Reveal Day list of who applied for what.

Read more analysis posts.

9 July 2012

Raspberry Pi Emulation

Would like to have a Raspberry Pi experience the before you buy one of the boards?

What you need is a virtual machine.

This is software that can emulate the Raspberry Pi within a virtual environment - complete with user interface, applications and tools. It doesn't matter whether you own a Windows, Apple or Linux machine, they can all run a virtual machine environment.

QEMU software is such virtual machine solution, which can emulate the ARM chip that powers the Raspberry Pi board.

QEMU on Windows

If you are using a Windows PC the simplest and fastest way to get up and running is with a way is to obtain a zip containing everything you need.

Step 1
Download this zip file, which includes the 2012-07-15 Raspberry Pi operating system image based on a Debian Wheezy Raspbian build.

Step 2
Unzip the downloaded zip file.

Step 3
Follow the instructions in the 'README.txt' file in the 'qemu' folder.


QEMU on Linux or Mac OS X

As far as I know nobody has produced a similarly simple process for emulating a Raspberry Pi with QEMU on Linux or Mac OS X.

However, here are a couple of websites that provide step-by-step instructions:

Linux
xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way

Mac OS X
www.rpiforum.net/forum/tutorials/article/16-a-raspberry-pi-emulated-environment-on-osx-lion

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

21 June 2012

Dell's Project Sputnik

Dell’s Projects Sputnik is is a six month initiative to take a premier laptop – the XPS 13 Ultrabook – and create an out-of-the-box Linux-based development machine.

Various languages, tools and SDKs will be ported and installed onto a hardware-optimised version of Ubuntu platform.

Here are couple of extracts from my article:

This tool set extends the existing collection of Linux software by adding powerful web, cloud and app friendly development environments. Examples include the ever popular Eclipse platform for multi-language development and testing, and Git-based source control management software. All the key web languages, such as HTML CSS and JavaScript will be supported. Other languages, such as Ruby, will depend on the 'feedback noise' generated by their proponents.

Mobile app support will be important too. Android development tools another early target, so both the Android and Java software development kits (SDKs) will need to be included. Additional support for Appcelerator, PhoneGap and similar mobile-targeted JavaScript-based frameworks may also be considered.

One suggested scenario is for web and app developers to work with 'micro clouds' on their local machine, before the final solutions are pushed out to a real-world public or private cloud. Incorporating OpenStack technologies is another idea. OpenStack was founded by Rackspace Hosting and NASA to create a series of interrelated technology projects for cloud infrastructure solutions. It's freely available under the Apache 2.0 licence.

Dell employee Barton George has created a seven minute video overview of Project Sputnik (goo.gl/Wy0Pr). He talks about being able to select self-contained language and operating system profile packages as part of a simplified configuration operation. JavaScript, Ruby and Android are just some suggested profile packages.

One of the biggest benefits to selecting Ubuntu is its massive user and developer community. There's a particularly impressive collection of informational web sites, interactive forums and videos of all aspects of the operating system. And plenty of opportunity to get personally involved.

Throughout the six month trial Dell will attempt to elicit plenty of developer-centric suggestions and comments. For some time now Dell has used their Idea Storm site to gather feedback. Now there's a Sputnik Storm session (goo.gl/sX81q) which allows anyone to contribute to the success of the project.

There’s loads of other articles in the magazine including keeping passwords safe, cloud-based storage evaluations, Ubuntu Server, Gmail tips, mobile gaming, a look back at the social history of computers in the 70s and 80s, and lots more.

All for just £2 - amazing.

Liquidmetal

Liquidmetal is a fascinating material from a group of alloys often referred to as amorphous metals or metallic alloys.

They have a non-crystalline structure, just like glass, and exhibit similar shape forming characteristics while retaining conductive properties.

The potential for this new material is enormous (as you can see from my article extracts below):

At first glance a liquidmetal alloy looks similar to stainless steel, albeit with a slightly different tone and hue. The exact colour depends on the alloy's specific composition.

However, hold it in your hand and you'll notice a distinctly warmer feel than with metal. Straight from a casting mold or die, liquidmetal objects exhibit a smooth mirror-like finish. But satin or brushed finishes are also possible. 

The key attributes are super strength and resilience, high scratch and corrosion resistance, and an ability to be precision cast into complex shapes. It's a very attractive combination.

In contrast plastics are easy to shape, but simply aren't strong enough. Metals have the strength, but complex shapes are difficult to create. And glass, despite its malleability and beauty, is just too fragile.

The hardness and strength-to-weight ratio of a liquidmetal alloy are particularly impressive. Compositions containing zirconium are stronger than aerospace-grade titanium alloys, and on a par with the very latest high-strength steels and specialised composite materials.

Some manufacturers have already experimented with liquidmetal cases. One such case enabled SanDisk's Cruzer Titanium USB flash drives to withstand crush pressures of over 2,000 pounds. SanDisk chose the same material for some of their 200-series Sansa flash-based MP3 players. While Nokia's Vertu Ascent mobile phone also featured a liquidmetal case.

With such a high strength-to-weight ratio liquidmetal is extremely attractive to aerospace designers and racing engineers. These industries have the motivation, money and skills to make rapid progress in both material science and manufacturing techniques.

The impressive strength, combined with liquidmetal's elastic nature (it's many times springier than steel), makes it ideal for all kinds of sporting equipment. Examples include golf club faces, tennis racket frames and skis.

Read more Apple analysis posts.

5 June 2012

Fish! Omnibus by Steve Lundin, John Christensen, Harry Paul and Philip Strand

We'd all love to have a positive, energetic and happy work environment. For the authors of Fish! this is not only possible, but something we can control.

This omnibus edition combines the original Fish! book with Fish! Tales and Fish! Sticks. The supplementary books take the fishmonger-inspired philosophy and reinforce it with real-world examples and motivational suggestions respectively. Each book is quite short in length, so it's possible to whiz through one in a couple of lunchtime reading sessions.

Fish! imparts its wisdom using a story. Yes, it's a highly Americanised and somewhat corny story, an approach that won't suit everyone. Nevertheless, it's quite easy to spin through the text and draw out the salient points. And what are these salient points? Well, it boils down to four key messages: attitude, playfulness, goodwill and presentness.

Your own attitude is probably the most important factor of all. How you feel about the day, how you respond in different environments and situations, and your relationship with others; it's all under your control. You can be positive, energetic, creative, patient, caring and supportive. Or you can decide to be bored, disinterested, regretful, bitter, hostile or angry. Essentially the message is become whoever you want to be simply by changing your attitude.

Treating every task as a play activity can't fail to engender a sense of fun and enjoyment. Once again it's just a matter of personal perspective and attitude. The authors suggest that even the most serious and demanding tasks can be viewed in a playful light. Though I'm certain transforming some of your most obnoxious chores into amusing entertainment will require more than a little effort.

How does it feel to make someone else's day? Energising? Satisfying? Good deeds invariably bring about good feelings. Money and success, on the other hand, tend to bestow far less in terms of personal gratification. The message here is when you offer your time, assistance, feedback and support, your own happiness levels increase.

Busy lives, weighty responsibilities and relentless deadlines are difficult enough. However, beating yourself up about past events or worrying about what will happen tomorrow, only makes coping with today that much harder. So, the final key message is be present; live in the moment. The past cannot be changed. The future is yet to happen, and often turns out to be strikingly different to what we'd imagined. It's notable how many individuals, when questioned late in life, say what they regret most of all is the time they spent worrying about situations and events that never actually happened.

Of course, you can apply the Fish! philosophy to any aspect of life. A simple recipe to create a happier you.

27 May 2012

Beyond Bullet Points (3rd Edition) by Cliff Atkinson

Ever witnessed a slide presentation without bullet points? No? I can't remember one either. Yet, all too often this de facto standard of presentation acts as an aide-memoire for the presenter, rather than a compelling story for the audience.

The aim of Cliff Atkinson's book is to banish bullet points and text-dominated slides. His mission is to encourage you to create a very different kind of presentation. One that engages the audience with a well crafted, highly focussed, carefully ordered collection of headlines and images. A collection that delivers a story rather than a lecture. As the subtitle suggests he wants you to "create presentations that inform, motivate and inspire."

To compose a successful presentation the Beyond Bullet Points (BBP) approach takes cues from other mediums, namely stage plays, newspapers and movies. As with a stage play, a successful story flow will have three acts; a beginning, a middle and an end. Each slide has the kind of strong, memorable headline you'd find in a newspaper. And the complete slide collection is designed in a movie-style storyboard manner.

Fittingly, the book begins with a BBP success story, and by the end of chapter three you'll have acquired a solid overview of the steps required. At this point many readers may want to head off and apply their new found knowledge immediately. However tempting this might be, only by reading the rest of the book will you discover many valuable nuances, and learn how to avoid some of the more common mistakes.

Content organisation is excellent, with a smooth transition from chapter to chapter. More advanced information and reference material is relegated to one of the five appendixes, rather than clutter up the book's main flow. As you'd hope with a book focussed on presentation, the page layout and general styling is clear and effective. Nevertheless, with the PDF version there is an occasional problem with text contrast, the result of some poor colour choices; namely black-text-on-dark-grey and white-text-on-light-grey. Although no such problems on my Kobo Touch e-reader.

The book's website has a number of very useful downloadable resources, including toolkits and templates for a range of Microsoft Powerpoint products (2003 to 2010).

I believe this book will help anyone create better presentations. Whether you create them as part of your job, or as an ad hoc activity for work, clubs or social groups, I heartily recommend it.

24 May 2012

Smartphones In Space

Yes, it's true. Android-powered smartphones have orbited the Earth.

Read all about CubeSats, PhoneSats, SPHERES, Smart SPHERES and space-oriented app competitions in this week's Micro Mart magazine, issue 1210. It's the one with a Smartphones ... In Space banner at the top of the front page.

Here are a few extracts from the article:

On the face of it smartphone technology seems a perfect fit for CubeSat projects. A smartphones is already a highly sophisticated miniaturised device, with a relatively fast processing speed (well over 10 times the power of typical space-borne computers) and ample memory. The latest smartphones bristle with wireless communication systems, and have built-in cameras, accelerometers, gyro-meters, GPS, proximity and light sensors. The whole package is easily customised via an open source operating system and readily available application software tools.

Developed by the MIT Space Systems Laboratory, these 200mm (8-inch) diameter SPHERES are designed to operate in a variety of environments. MIT professor David Miller was inspired by a scene in the original Star Wars film, where Luke Skywalker spars with a small hovering droid to practice his force-enhanced Jedi light sabre skills.

The first generation of smart SPHERES are paired with the Android-powered Nexus S smartphone from Samsung. The open source Android operating system and freely available application development tools only adds to the flexibility. As Intelligent Robotics Group software engineer Mark Micire said, "The availability of Android source code allows us to customise the smartphone to be used as a compact, low-cost, low-power computer, rather than just a phone."

Download the free Micro Mart iPad/iPhone app and purchase the magazine for only £1.49.

4 May 2012

Big Data - Big Questions

My comprehensive guide to Big Data is published in Micro Mart issue 1207.

I begin with an explanation of what's meant by 'big data' and the technological challenges it poses. Challenges which are starting to be addressed by Apache's Hadoop framework and startups like Cloudera and Hortonworks. Then I discuss why there's so much interest in capturing our personal information and the worrying concerns over privacy, before considering the likely effect on personal computing.

Big data is a hot topic this year. There's been a surge in cloud storage offerings from the likes of Apple, Microsoft, Amazon and now Google. Plus plenty of media coverage on the personal privacy issues surrounding the UK Government's push for GCHQ access to social networking and website data.

Here’s a couple of extracts from the article:

Acquiring masses of data is pointless unless its hidden secrets can be revealed. This means uncovering the patterns and trends within masses of unstructured data, and creating human-understandable reports and charts. Before this happens the data needs to be extracted, filtered, manipulated and subjected to deep statistical analysis.

Existing technology isn't well suited to big data challenges. Spreading the processing load efficiently can be a hard problem to solve. Relational databases, such as those from Oracle and MySQL, store, manage and retrieve information in carefully designed tables. However, table-based storage isn't suited to the dynamic, unstructured nature of big data information. And SQL is too inflexible to cope with big data analysis.

What's needed is a new breed of data storage and transaction processing technology. Oracle and other relational database organisations are already working hard to offer big data solutions that supplement their relational offerings. But Apache has rather stolen the initial limelight with their open source Hadoop project. Even Microsoft has Hadoop at the centre of its big data strategy.

However, there is another and somewhat darker side to big data. With much of the focus being on acquiring and storing social information there are obvious concerns about the protection of our right to privacy and anonymity.

We are already very close to a situation where every message you send, every call you make, every website you visit and every item you buy, is logged and stored in some anonymous far-flung server. These logs reveal patterns of our daily lives, including electronic communications, geographical movements, social interactions, personal preferences and regular habits.

And these logs contain other secrets. Think you have deleted some emails? The log will have recorded any previous email contact history. Removed some website images from your website or Facebook? They could well still exist in a backup on some Internet-connected server.

Read more analysis posts.

3 May 2012

Smart Key Fobs

There’s a new kind of key fob starting to appear - the smart fob.

A smart fob can act as a ‘bridge’ between the car’s Electronic Control Unit (ECU) and your mobile phone, tablet or PC.

It's really a mini-computing device in its own right, with built-in data storage and wireless communications technology.

It's all in Micro Mart issue 1207. Here’s a couple of extracts from the article:

With Bluetooth or wi-fi technology, the smart fob can act as a 'bridge' between the car's sophisticated electronic control unit (ECU) and your mobile phone or computer. In practice this means feeding information from the car's many sensor logs, control modules, navigation devices and entertainment systems to smartphone and PC applications.

Take a 'find my car' app for example. When you lock the car the fob captures the current GPS coordinates and stores this data in its memory. When it's time to return to the car, take out your smartphone and start 'find my car' app. The app will connect to the smart fob, read the stored GPS data, then display the parked position on a map, using Google Maps or some similar geo-location software. Very handy when you're in an unfamiliar city.

Read more analysis posts.

1 May 2012

EU Cookie Directive

On the 26th May the EU's Cookie Directive comes into force. This legislation was delayed a full 12 months to allow organisations and website owners to digest the detail, understand their responsibilities and implement the necessary changes.

In essence this directive is all about user consent. Any website that captures user information using cookies must first obtain consent from the user.

Any website that employs a tracking cookie is covered by this directive, and many others too, even if they just save a few user preferences. A cookie can be classified as having either first-party or third-party status, depending on which server issues the cookie. Any embedded advertisements, popups and so on will have to be reviewed.

Unfortunately, there's no single clear cut solution to follow. Appropriate action will revolve around how the easy-to-misinterpret rules apply to your own website design. Solutions range from simply displaying a prominent message informing users that tracking is taking place, right up to giving users the opportunity to allow or block each individual piece of information (as in the much cited BT.com solution).

Metanym have a a particularly helpful and informative web page with tools and examples. Plus there's more to read in this BBC news story and the ICO's cookies guide.

Read more analysis posts.

29 April 2012

Reading Renaissance

The influence e-books have on their paper-based cousins is still a hot topic for debate. However, a recent New York Times opinionator blog adds a note of optimism.

In his The Reading Renaissance post Timothy Egan points to figures from the American of American Publishers, which show an overall rise in books sold across all formats. The suggestion is the more people read the more they want to read, regardless of the medium.

With e-readers in the UK edging towards the sub-£50 price point, and the rise in popularity of digital newspaper subscriptions, this has to be an encouraging sign.

Speaking as a writer, long may it continue.

12 April 2012

Create Your Own E-books

Are you a would-be author? How about creating your own e-books?

In a six page article I consider some key questions to answer, investigate online e-book creation services, talk about Amazon's Kindle tools, discuss editing an e-book with Sigil, and hint at the possibilities of app-books with Apple's new iBook Author.

It's all in the mid-April Micro Mart magazine, issue 1204.

Here are two extracts from the article:

LuLu is an old hand at the DIY book publication game and has generated considerable respect, many complementary reviews and a loyal following. The range of services on offer, flexible options and attractive deals for authors means LuLu is a useful benchmark when comparing competitive e-book publishing services. A big plus is the financial deal: 90% for the author and 10% for LuLu - pretty much the maximum you're likely to receive anywhere.

To get started the site presents a straightforward six-step process. It leads you through uploading the book content, creating a cover, adding a book description and setting the sale price. At each step there's plenty of helpful information about the options available and the implications of certain choices, such as using a LuLu owned ISBN rather than your own to reduce costs. The last stage of the process provides details of their optional promotional services aimed at raising your sales figures.

LuLu's e-book creation process is focussed around handling textual content and images. Input formats include the various Microsoft Word document types plus the universal RTF format. And there's plenty of advice on offer, such as discouraging the use of tables, charts, scientific equations as many e-reader will not be displayed them correctly.

So, what is an EPUB file? In essence it's just a zipped container which holds a collection of HTML, CSS and XML files. Any unzip tool will be able to extract the file contents, even though it has an '.epub' file extension rather than the more usual '.zip' one.

So, after the EPUB file is unzipped what do we see? Taking the 2.0 specification, the root folder will contain all the content files, in HTML or XHTML format, plus a few special files such as 'content.opf' and 'toc.ncx'. In addition there are a number of appropriately named subfolders to contain images, style definition and any special fonts. The files 'content.opf' and 'toc.ncx' are in EPUB-specific XML format. As you can no doubt guess they are instrumental in providing the table of contents, and so they need to be kept in sync with each other.

While there could be just a single e-book content file, in practice an EPUB book is usually broken down into a collection of small chunks. The number and length of these chunks is completely at the discretion of the e-book creator, although new sections and chapters are obvious divisional candidates. Typically you also find a separate file for the book's cover, in addition to files for the introductory pages and index.

To ensure your e-book is supported by the widest range of e-reader devices you should only use simple HTML. The more HTML elements you include and the more sophisticated your styles become, the more chance there is of something not being displayed too well.

Download the free Micro Mart iPad/iPhone app and purchase the magazine for only £1.49.

8 April 2012

Apple's iWallet

In Micro Mart magazine issue 1203 I investigate if Apple are about to enter the mobile payment arena with an iWallet product.

The article focuses on a couple of Apple patents for a virtual SIM and an iPhone-based cashless payment and management system, which also includes multiple card account administration via iTunes.

Here's an extract from the article:

Apple's latest iWallet-type patent is a comprehensive piece of work. Published under the guise of 'Parental Controls' it incorporates numerous iPhone-style apps screen drawings, associated operational descriptions and banking interfaces.

The patent defines an extensive and flexible list of transaction control options. All controls can be applied by a primary account holder on behalf of other subsidiary account holders, such as for your children for example.

As you'd expect there are single transaction and daily spending limits, just as you'd find with the current range of NFC-enabled credit cards. However, with Apple's iWallet scenario you'll also be able to set times of day, add specific merchants, exclude certain products (such as alcohol or tobacco) and even define geographic boundaries (which will access the phone's geo-location information).

In addition, mobile communications are used to send rule violation alerts and purchase authorisation requests to the parent account holder. An authorisation request can even have different timeout limits, depending on whether it's an in-person or online transaction that's being performed.

Primary account holders can also define automatic credit top-ups schedules, such as a small daily allowance or a monthly lump sum. And, of course, all purchases will be tracked for subsequent online viewing.

Read more Apple analysis posts.

2 April 2012

Affordable 3D Printing in Nexus Magazine

The April/May edition of the Nexus magazine has published a rewritten and slightly shorter version of my Affordable 3D Printing article.

Though shorter it still covers five pages and contains:
- overview of 3D printing concepts and history
- 3D printer anatomy
- 3D materials science and thermoplastic polymers
- significant developments and applications
- low cost desktop 3D printers
- potential impact of these affordable 3D printers

Here's an extract from the article:

A basic 3D printer is uncomplicated in both design and operation. Typically it’s a cuboid frame supporting a print bed which moves in a vertical orientation, forming the Z axis. Above this bed, motorised arms propel the printhead in an X and Y axis motion. The printhead guides and heats the print material, which is extruded onto the print platform, rather like ‘hot glue’.

How big is this cuboid shape? Well, that’s really dependent on the items to be printed. Small items only need a small printer - one which takes up no more space than a inkjet paper printer. For larger items the whole assembly is scaled-up, as exemplified by a number of initiatives looking into printing full sized buildings. Even with industrial sized construction and a printhead gantry running on rails, these machines are instantly recognisable as big brothers to the desktop 3D printer.

A 3D printer’s on-board computing requirements are pretty basic too. Being more akin to a motorised calculator there's just a few circuit boards, and a PC connection port to receive a multi-layered 3D digital model. Once a model is received, printing a layer simply involves controlling the flow of material and the printhead's X and Y motion. After each layer it will move the Z axis print platform according to the previously specified print resolution.

The processing power and software required to create 3D digital models can be provided by the powerful computing devices we already own. Harnessing our existing computing resources helps to keep down the start-up costs, and there's already a large choice of commercial and open source 3D modelling applications. Widespread 3D printer adoption would encourage software developers to create additional innovative applications, some of which could be targeted at tablet and smartphone devices.

This international magazine is available from your local W.H. Smiths, and the article itself can be purchased online from this page.

24 March 2012

The Art of SEO by Eric Enge, Stephan Spencer, Jessie Stricchiolla and Rank Fishkin

Search Engine Optimisation (SEO) has a reputation of being a rather mysterious, even clandestine practice. The aim of this book is to lift the lid on this art form.

The book's four authors are highly active in the SEO field and have associations with organisations such as the Search Engine Marketing Professional Organization (SEMPO), Stone Temple Consulting, Netconcepts, Science of SEO and SEOmoz. This high-powered meld of business intelligence, technical knowledge and practical expertise has the potential to deliver a rich reading experience.

So, I already had high expectations as I started to work my way through the book. A glance at the table of contents hints at a meticulous eye for detail and comprehensive approach. After reading each subsequent chapter this feeling is only intensified. The tactics and methodology covered range from straightforward but essential SEO information to deep, sophisticated insights aimed at the advanced practitioner.

Subjects discussed include search engine theory and behaviour, key analytical tools, the impact of social media, user-focussed data, effective website creation, result tracking, SEO best practices and much more. The text is full of links to relevant organisations, in-depth reports, appropriate industry analysis and case-in-point websites. In addition the content is supported by a website, artofseobook.com, which contains content updates plus hands-on resources and guides.

The authors also found space to include a chapter on the merits of whether to build an in-house SEO team or outsource the operation. At over 30 pages this chapter is just as comprehensive as any other topic, and of significant value to any manager responsible for delivering a high quality SEO solution.

Despite the detailed coverage I found the material easy to read and understand. My relatively limited SEO knowledge didn't allow me to verify the accuracy or fine-grained quality of much of the book's material. However, I can say my own SEO knowledge was greatly enhanced by this book.

In conclusion I feel The Art of SEO is an absorbing read for anyone interested in SEO, and a book that will become a well-thumbed encyclopaedic reference for practitioners. As the authors note in their final chapter, SEO is an evolving art form, so it's obviously difficult to write a truly definitive book. Yet, I feel the Art of SEO is as close as you'll find anywhere.

After all, in today's marketplace taking full advantage of search technology can be the difference between a dominant success story and a business failure.