/* jquery */ /* jquery accordion style*/ /* jquery init */
Showing posts with label Articles. Show all posts
Showing posts with label Articles. Show all posts

10 Essential Web Skills

Today the web abounds with attractive, high quality, professional looking websites. Yet creating such sites requires a surprising number of skills. Skills that aren't limited to technical knowledge and prowess, but extend into many other areas including user-focussed design, self-organisation, business acumen and market awareness.

In Micro Mart issue 1219 I describe the top 10 web skills needed to create great looking, content-rich, audience-centric websites which top the search engine ranking charts.

Here are a few extracts:

JavaScript has been synonymous with browser-based development since the late 1990s. Unlike HTML or CSS it's a complete programming language, able to tackle virtually any coding challenge. An interpreted scripting language with a Java-like syntax, JavaScript was specifically designed to add webpage features that cannot be done using HTML and CSS alone.

Whether it's interactive popups, smoothly scrolling slide shows, animated cartoons, data field validations or cookie creation and management, JavaScript code provides the solution. Modern web browsers use advanced just-in-time (JIT) compilation to deliver extremely fast execution speeds. This speed, combined with HTML5's <canvas> tag, enables JavaScript developers to create sophisticated 2D and 3D web-hosted games.

You might consider empathy to be a rather peculiar skill for website creation, but that's not the case at all. Establishing an empathy with your prospective audience is at least as important as any technical prowess.

Any successful website will have a target audience in mind. It could be aimed at business people, sport-minded individuals, technology experts, bookworms or those with a social media addiction. Delivering a website with plenty of frequently updated, audience-specific content will give them reason to return to your site time and time again.

An empathic perspective enables you to determine who these people are and what makes them tick. The trick is to understand what's likely to grab their attention and, just as importantly, what will turn them off. In effect you're attempting to detach yourself from the website technicalities and try to think like a visitor who is assessing the site for the first time.

Achieving a high search engine ranking doesn't happen by accident. It requires and in-depth knowledge of your chosen domain or marketplace and its customers. The more research you perform, the better you'll be able to target your site's content, links and advertisements.

Search engine optimisation (SEO) and marketing (SEM) expertise takes competitive advantage of this research to boost the website's search ranking and connect with your chosen audience. By taking a user's perspective you can identify the search keywords and phrases they are likely to enter and the content they'll want to see. So, once again, audience empathy is an essential element.

Raspberry Pi Potpourri: March

Struggling to keep up to date with the fast moving Raspberry Pi world?

Then why not buy the Micro Mart magazine this week and read the March issue of my monthly series covering Raspberry Pi news, community events, hardware, software, games and tips.

Here are a few extracts:

Limor Fried, or Ladyada as she's known on the web, is the CEO of New York-based AdaFruit Industries. AdaFruit provide electronic components, project kits, and masses of helpful device-hacking open-source designs, construction tutorials and general tips.
...
High on the AdaFruit kit popularity front is the MintyBoost. It's a portable USB charging device, built from a few electronics components housed inside an Altoids tin - perfect for delivering an emergency power boost to your mobile phone.

The Model A board has been available from the Premier Farnell/element14 and RS Components for a number of weeks now.
...
This slightly stripped-down version of the Model B is likely to be a big seller. After all, a $25 Linux-based computer, perfectly suited to software coding, gaming and project construction, has to be the bargain of the decade.

If you're just beginning to create electronic circuit layouts you might like to mockup and evaluate your designs first. If so, hop over to CircuitLab's website to create a virtual circuit board layout and simulate its behaviour. The website also includes a list of quick-start circuits to browse and edit.

I mentioned Mojang's Minecraft: Pi Edition - the special, hackable version of Minecraft for the Raspberry Pi - in my January potpourri. Now Mojang have replaced the previous beta version with a full version of the game.

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

Raspberry Pi Potpourri: February

Struggling to keep up to date with the fast moving Raspberry Pi world?

Then why not buy the Micro Mart magazine this week and read the February issue of my monthly series covering Raspberry Pi news, community events, hardware, software, games and tips.

Here are a few extracts:

The Sony manufacturing facility at Pencoed in Wales is an impressive place, with an output of 4,000 Raspberry Pi Model B boards per day.
The Model B has well over one hundred surface mounted components (SMT) located on both sides of the circuit board, plus a few PCB Through Hole (PTH) mounted components on the top side.
To ease handling issues they travel down the production line as a connected 'Pi six-pack'.

Raspberry Pi Jam, or Jamboree, events are springing up all around the country. A quick browse of the Raspberry Jam website reveals events in London, Manchester, Cambridge, Bristol, Coventry, Milton Keynes, Durham, Machynlleth and even Tokyo.

Chameleon is a Raspbian remix image (without the X graphical environment) which uses its own launcher to run emulators for old computers, arcades and consoles.
The supported list includes the ZX81, Amstrad, Atari ST, C128, Vic-20 and Oric Atmos.

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

Nanotechnology

Nanotechnology has immense potential. Our future computing hardware could be radically transformed.

Virtually indestructible, solar cell covered smartphone cases. Vivid, flexible, low-energy displays. Blazingly fast memory, processors and graphics. Cheap bio-sensors and personal tricorders.

Find out more in my six page feature Micro Mart magazine article in issue 1245 - out now.

Here are a few extracts:

One of the primary reasons nanoparticles are so interesting is they exhibit quite different properties and capabilities compared to the very same material in bulk form. Just as predicted by the visionary scientist Richard Feynman in his famous 1959 lecture 'There's Plenty of Room at the Bottom'.

Carbon nanotubes are strong and resilient, with an ability to 'spring' back to their original shape after bending. And it's possible to fabricate multi-walled nanotubes for even greater strength and resilience. Adding nanotubes to composite materials will significantly increase their strength-to-weight ratio. A tactic that's frequently employed by organisations like NASA, the military and F1 racing teams.

Unlike the previous OLED components nanowires exhibit an ability to flex while continuing to operate. If the nanowires are deposited onto plastic sheets the whole display will be able to bend. Flexible displays would be a revolutionary technology for gadget designers, who could envisage all kinds of novel and innovative scenarios. Foldable e-readers, bendy iPads and screens that wrapped around your wrist are just some of the possibilities. And flexible devices will be far less likely to suffer damage after a heavy impact or drop.

Head over to the Micro Mart website or my own author page to find a collection of past articles.

Raspberry Pi Potpourri: January

Are you looking to make the most of your Raspberry Pi computer?

Then take at Micro Mart magazine this week to see the first of my monthly article series covering Raspberry Pi news, community events, hardware, software, games and tips.

Here are a few extracts:

The Model A board is an even cheaper entry point to Raspberry Pi computing. The goal was to produce a $25 board, to complement the $35 Model B. To achieve this price a few components are missing. Nevertheless, there are some advantages to owning a Model A.

The Pi Store is a joint venture involving IndieCity (indiecity.com) and Velocix (velocix.com). A client app runs on the Raspberry Pi as an X application. The latest update to the official Raspbian image already contains the store app.

If you have an older image the app can be downloaded by typing the commands below into a terminal window on your Internet-connected Raspberry Pi:
$ sudo apt-get update
$ sudo apt-get install pistore

A blog post in late 2012 from Mojang, the Stockholm-based indie games development company, confirmed it is working on a Raspberry Pi version of Minecraft (minecraft.net). Dubbed the Minecraft: Pi Edition it's a port of the existing Minecraft: Pocket Edition.

Interestingly, and totally in keeping with the Raspberry Pi theme of open software, this will be a 'hackable' version of the game.

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

Raspberry Pi: Online Articles

The Micro Mart magazine has posted a number of my articles on the web, including a couple about the Raspberry Pi computer.

My recent 'Accessorise Your Raspberry Pi' which looks at the hardware, component and project aspects of Raspberry Pi ownership.

While the 'Quick Guide to Scratch on the Raspberry Pi' is all about how to create animations and games - without writing code.

Further back in the archives there's an in-depth article about The Promise of Hybrid PCs, including a detailed look at Microsoft's combination of Surface technology and Windows 8 operating system.

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

Byte Sized Languages Series

The first in my new series of one page articles, entitled 'Byte Sized Languages', appears in this week’s Micro Mart magazine, issue 1242.

A new article will appear each week.

Languages in the pipeline so far include FORTRAN, COBOL, Pascal, BASIC, C, C++, Java, C#, Objective-C, Visual Basic, HTML, CSS, JavaScript, PHP, Python, SQL, ActionScript, Logo and R.

Here are a couple of extracts from the first article:

Dating back to the 1950's FORTRAN was one of the first computer languages to provide a practical alternative to assembly code.
...
Even at this early stage it was designed to be an optimised complier, so program performance would approach that of pure assembly code.

The scientific and engineering programming community has a particular affinity with FORTRAN. Over the decades they've written million of lines of code and numerous domain-specific libraries.

These domains invariably have a strong mathematical nature such as weather forecasting and climate modelling, oil exploration, fluid dynamics simulation, or computational chemistry and physics. FORTRAN code is employed in a wide diversity of scientific research projects, including some at the famous CERN laboratories.

Head over to the Micro Mart website or my own author page to find a collection of past articles.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.