Clutter: a beginner's tutorial

Code

There are lots of cool things in Moblin, but Clutter is our #1 most favourite thing of all. Why? If its OpenGL-accelerated, object-oriented, GTK-integrated API isn't enough to convince you, then perhaps its powerful animation framework, easy texture manipulation, and lightning-fast object picking system might.

But one problem with Clutter is a distinct lack of documentation - a lot of folks want to learn how to use it, but the web is somewhat lacking in tutorials right now. We hate to see awesome free software projects without the userbase they deserve, so we spent a few hours putting together a kickstart guide for people who want to get into Clutter in the minimum time.

Code Project: control Digg with Python

Code

Everyone knows that Digg is a hugely popular social news website where like-minded folks gather and flame each other to death. But if you're a Digg user and want to flex your coding skills to get a little more from the site, we've got the perfect code project for you: we're going to show you how to write a Python app to read Digg submissions and geo-locate them using GeoIP.

You should know that, even though there's a perfectly reasonable - if slightly out of date - API for Digg, we're going to create our own miniature one instead that does just what we need. If you want to go further you'll find this an easy place to start, and it also gives you some good practice in working with XML.

Make a Python game in minutes with Gloss

Code

When Hudzilla isn't busy working on his free Mono tutorials using C#, he likes to hack on one of his pet Python projects: Gloss. It's hosted right here on TuxRadar and you may already have given it a try. If not, he wrote a short tutorial for PC Plus magazine a few months ago, and took the time to repurpose it for the web.

So, if you fancy learning the fastest way to create Python games, read on as Hudzilla talks you through an example Gloss project...

Learn Qt programming with our free tutorials

Code

We've put up three tutorials using Qt, and we think you should try them. Why? Because they use Nokia's awesome new Qt Creator tool for quick design. Because Qt is easy to learn, cross-platform, super fast and lots of fun. Because each of those tutorials is a complete, finished project that does something useful and is easily extended to fit your needs. But most of all because coding is fun and everyone should give it a try at least once!

Rather than make you dig through Google to find our Qt tutorials, we figured we'd list them here for easy access. And if you have any suggestions for more Qt project tutorials, drop us a comment below and we'll see what can be arranged.

  • Create a media player Looking for a tutorial about Qt and Phonon? You've found it: this teaches you how to build a simple media player with less than half an hour's work.
  • Create an ffmpeg front-end Learn how to execute command-line programs through Qt by building a front-end for ffmpeg that makes it easy to encode videos for the iPhone, the PSP or the GP2X.
  • Create an RSS reader Get your news delivered straight to your desktop with this tutorial on Qt, XML and RSS - it really couldn't be much easier.

If you've whizzed through all those and want more programming projects to tackle, make sure you check out our coding project archive - it's full of tutorials for Python, C++, C# and more, all for free!

Code Project: create a Qt RSS reader

Code

We're going to build a complete application that wouldn't take too much additional work to qualify for re-distribution as a bona fide open source application. It's an RSS reader which allows you to add your own feeds, lists the stories on that feed and then lets you read those stories within a browser window attached to the main application.

If you already tried our previous two Qt code projects - Create an ffmpeg front end and Create a media player - and are looking for more Qt fun, read on...

Hudzilla Coding Academy: Project Eight

Code
Hudzilla Coding Academy

 

Code project: create a Python Twitter bot

Code

Once upon a time, there was a person who decided that people needed more distractions in their lives, so he created Twitter. This may not be exactly how they tell the story at Twitter HQ, but that's probably because it would create a less than glamorous image (oh, and it's also wildly inaccurate). After all, Twitter is pretty much constantly in the news. If you want to catch up with where in the world Stephen Fry is now, what everybody in North America had for lunch or precisely how smugly great Jonathan Ross thinks he is today, there's really only one place to turn.

Amazingly, Twitter can be put to useful things as well. As it happens, Twitter's application programming interface (API) is particularly convoluted - it seems to have evolved by using many different ways of doing various things. That needn't worry us, though, because there are plenty of API wrappers for Python. The one that's most suited for us is the standard Python-Twitter, which is available through most repositories and also at http://code.google.com/p/python-twitter.

Code Project: create an ffmpeg front-end

Code

There's nothing wrong with the command-line. For many of us, it's one of the best reasons for using Linux. You can accomplish almost anything by typing things out, and command-line tools will often provide an unprecedented degree of control over how they can be run. But the command-line isn't for everyone, and there there's a surprising number of Linux users who find it unfathomable and intimidating, perhaps even a reason to avoid the Linux completely. And while it's true that you no longer have to use the command-line if you don't want to, it still means that you're missing out on some great utilities.

And this is where Qt can save the day. It's the perfect tool for creating a warm and fuzzy GUI around your favourite command-line tools. It doesn't require any ace programming skills, and only a little bit of effort, but in the process you can help your command loathing friends and make your own contribution to open source application development. Creating GUIs for command line tools is one of the best ways of getting started!

If you already finished our previous Qt Creator code project, how to create your own media player, you're more than ready to tackle this...

Code Project: create a media player

Code

Amarok is a great music player for KDE when judged by both its capabilities and its size. But it's hardly a quick point and click music player - it takes several clicks and some careful GUI navigation to listen to your music collection and that takes a toll on both your CPU and your head. We're going to offer an alternative by building the most simple and straightforward music player we could think of.

We're going to take some inspiration from Apple's new iPod Shuffle, and only offer the bare minimum of controls. One button for selecting your music, another button for play and pause, and a third button for skipping to the next track. For most people, and most uses, these are the only controls you need, and it makes a refreshing contrast to the bloated frippery of players like Amarok.

Code Project: Tower of Hanoi in Python

Code

If you've already followed our previous code projects and are using the weather for wallpaper, enjoying talking RSS feeds, running your own Ruby-powered web server and chatting to your own IRC bot, here's something new to try: we're going to show you how to make a Tower of Hanoi game using Python.

Which version control system is best for you?

Code

Version control systems are indispensable if you're working on a multi-person project, and they're pretty damn useful even if you're just working solo. Keeping a full history of the changes you've made gives you a basic backup and enables you to revert back to an earlier version if you screw something up.

But with so many options available, from the rather dated CVS onwards, which one is best? What about distributed versus centralised? Read on as we look at three of the big names - Bazaar, Subversion and Git - to give you an idea of which one might best suit you and your project, whether that's large-scale software, small-scale coding, keeping track of config files or anything else that might spring to mind.

Code Project: Use weather for wallpapers

Code

Not all information on the web is static, connected in a meaningful way, or even as cool as it should be. Which is why one of the post-web 2.0 movements of note is the mashup - the repurposing of data from the web into new and exciting forms. Welcome to the world of data punk.

Introducing Gloss

Code

Taking a short break from his coding academy, Hudzilla has spent the last few weeks touring Italy and - believe it or not - fiddling around with Python. The first fruits of his effort are now available for world + dog to try, so if you're looking for something new to hack on, continue reading to hear from the man himself...

Write your own web browser

Code

Our cohorts at PC Plus have been particularly prolific with their Linux content recently, explaining how to create your own distro and build a Linux-powered cluster. Now they've turned to programming, with a tutorial on writing a portable web browser with Qt and WebKit. Thanks to the drag-and-drop goodness of Qt Creator, coupled with the embeddability of WebKit, writing a simple browser doesn't require a zillion lines of code. It's a great project if you want to get started with Qt.

Code Project: Build an Ncurses UI with Python

Code

Picture the scene: you're logged into a remote server via SSH, or you've installed a new graphics card and you're left staring at the command line. You need to enter a command, but you can't remember the zillion options that go along with it. You're stuck - all you can do is consult the manual pages and pore through pages of waffling technical gobbledygook. We've all been there, and no matter how experienced you are with Linux, sometimes you need to accomplish a job quickly without sifting through masses of reading material.

In this coding project, we're going to solve this problem - and have fun along the way! We'll show you how to write a dialog-based program that gives you options one-by-one so that you don't need to consult the man pages. In this guide, we'll show you how to write a nifty front-end for the useradd utility, a command which (unsurprisingly) lets you add user accounts to your Linux installation. Like many administration tools, useradd requires a long string of options and parameters; we're going to make it much simpler by creating an interactive dialog-driven version called UserMaster.

Arduino hardware hacking: Part 2

Code

In part 1 of our Arduino tutorial seres we covered the basics of how the Arduino works, and we're going to use that knowledge in a hands-on project and see how this open-source hardware programming environment works when we're actually trying to get something done with it.

After this, you'll have more than enough information to be able to tackle your own projects with confidence - we're going to build on the existing foundations to work on an entire project using nothing but cheap components and open source.

Qt Creator

Apps

Reviewed: Linux isn't short of a few integrated development environments, but if your chosen development arena happens to be Qt, and/or KDE, the only viable option for the last eleven years has been KDevelop. KDevelop is a powerful application that supports many more languages than just C++, but the bewildering array of icons, panels, tabs, menus and windows are likely to scare beginners back to Blitz Basic.

There's a new version of KDevelop on the horizon, but Nokia has beaten them to the punch with Qt Creator, which comes included in the latest release of Qt 4.5 - that's the one with the LGPL licence.

Code Project: Make talking RSS feeds

Code

On the face of it, writing a script/program to download and parse an RSS feed, and from there send news items to a speech synthesizer, sounds ambitious - even for TuxRadar. But as it turns out, it's actually rather straightforward.

Principally, this is thanks to three technologies, Python, Festival and Linux. Python, the world-dominating scripting language par-excellence makes it easy to construct a script without too much thought or effort. The open source Festival Speech Synthesis System sounds fantastic, and can be installed with just a couple of clicks from your distribution's package manager. And Linux itself; without its powerful pipes and process scheduling, we'd have to spend a lot more time writing that functionality into our program, and we'd also need to add a GUI to make it all easily accessible.

Luckily, all we need to do is write a small Python script and use a little command line magic to tie all these things together. We're going to write a simple script in Python that will output plain text news stories than can then be piped into Festival, which will then speak the news through your speaker or headphones. This gives you maximum flexibility. This two-pronged approach (Python script piped to Festival) can be modified to suit almost any purpose. In less than an hour, you'll be able to sit back and listen to the dulcet tones of a female voice synthesizer reading the latest happenings from TuxRadar.com.

Username:   Password: