Free Ubuntu 11.10 CDs for the UK
Today the Ubuntu UK LoCo team CD allocation arrived from Canonical, as is traditional I have upgraded the Kubuntu CD that my chickens peck at. I have a different set of chickens to the ones in the last photo due to a series of unfortunate events. In July we restocked by purchasing three rather young hens, Specky, Chocolate and Snowdrop who entertained the crowds at the Oggcamp Crew BBQ and have been growing fast ever since. Pictured here with the new Kubuntu CD is Specky. We wanted three nice new hens to lay lots of eggs and they are approaching egg time. Of the three, Specky has grown the fastest and has a nice comb and a tail and really is quite a lot bigger than the others and . . . actually Specky is looking a bit um, butch, for a hen. . . and those cockadoodledoo noises are not a good sign. I think we may have a problem here. Girls are lovely and useful and hard working. Boys are big, noisy and useless. I think Specky needs to urgently get in touch with it’s feminine side and lay some eggs, or there will be a less full henhouse and a more full curry pot.
Anyhow, back to the subject of this post, which is the CDs. If you are living in the UK and want an Ubuntu CD, a Kubuntu CD or an Ubuntu Server CD (or combination thereof) then you are most welcome to one. Please follow the procedure and I will send one out to you. For a while I will also include an 11.04 CD until I run out of them. If you want more than one CD then do ask me and we will try and work something out particularly if you are wanting to distribute them at a University or similar.
I almost forgot to mention, I removed their old Kubuntu 11.04 CD and washed the muck off and stuck it in a desktop, it still boots!

Hello World in Python
Today I ran a class session as part of the Ubuntu Application Developer week. My topic was a really basic introduction to python, starting with the traditional “Hello World!” program and here is the transcript from the logs:
[19:01] good morning/afternoon/evening all
[19:01] welcome to this Application Developer week session on Python
[19:02] so after jderose turning things up to 11 we are going to go back and start with 1 2 3
[19:02] This session is an introduction to Python from the very very beginning, I going to do my best to assume no prior knowledge at all.
[19:02] just so I can see who is here say hi in the #ubuntu-classroom-chat channel o/
[19:03] great, I love to have an audience ![]()
[19:03] so Python is a programming language, but not a scary hard one.
[19:03] Python is kind of like BASIC, except you don't have to be embarrassed about saying you are a Python programmer!
[19:04] we are going to write a computer program, which is a set of instructions to the computer to tell it to do some interesting stuff for us.
[19:04] Lets get set up first, we are going to need a text editor to write the instructions in and a terminal to tell the computer to do the instructions.
[19:05] hopefully you will find them next to each other in the Applications-Accessories menu
[19:05] or if you are using unity hit the super key and type gedit and return for the editor
[19:05] and terminal for the terminal
[19:06] they are also somewhere to be found in the apps lens, but that is another story altogether
[19:06] so open both of them now and get comfortable with the three windows on screen, IRC, terminal and gedit
[19:06] are we sitting comfortably?
[19:07] plain old text editor is perfect, none of your fancy IDEs for this session
[19:08] Traditionally the first program you should write in any language is one to get the computer to say hello to the world! so lets do that.
[19:08] in the text editor type the following:
[19:08] print "Hello, World!"
[19:09] that is it, your first program, now lets save it and run it (I did tell you it looked like BASIC)
[19:09] file-save as and call it hello.py
[19:09] this will save it into your home directory by default, fine for now, but you would probably want to be a bit more organised when doing something serious
[19:10] feel free to be more organised right now if you like ![]()
[19:10] ok, now in the terminal lets run the program
[19:10] python hello.py
[19:10] did it say hello to you?
[19:12] as I saved it in the home directory and terminal starts there by default it should just work, if you are putting things in folders you might need to navigate to it with the cd command or specify the path to the program
[19:13] ok, so that was running the program by running python then the name of our application, but we can do it a different way, by telling Ubuntu that our program is executable
[19:13] What we are going to do now is try to make our program directly executable, in the terminal we are going to CHange the MODe of the program to tell Ubuntu that it is eXecutable
[19:13] so at the $ prompt of the terminal type:
[19:13] chmod +x hello.py
[19:14] now we can try to run it
[19:14] again at the $ prompt
[19:14] ./hello.py
[19:14] oh noes!!!
[19:14] Warning: unknown mime-type for "Hello, World!" -- using "application/octet-stream"
[19:14] everyone get that?
[19:16] ubuntu doesn't know how to run this application yet, we need to add some extra magic at the top of our program to help it understand what to do with it.
[19:16] back in the editor, above the print "Hello, World!" add the following line
[19:16] #!/usr/bin/env python
[19:16] so the /usr/bin/env bit is some magic that helps it find stuff, and the thing it needs to run this application is python
[19:16] now you should be able to save that and flip back to the terminal and run your program
[19:17] ./hello.py
[19:17] that should now run ![]()
[19:18] as has been pointed out in python 3 you need to put brackets round the string so
[19:18] print ("hello world")
=== mohammed is now known as Guest99895
[19:19] which works in all versions of python
[19:20] OK, lets go on to the next concept, giving our program some structure
[19:20] back to the editor, and between the two lines we have already add a new line
[19:20] while 2+2==4:
[19:20] and on the next line put four spaces before the print ("Hello, World!")
[19:20] and save that
[19:21] Moshanator asked: can i just ./hello.py?
[19:21] lunzie asked: ​ are the quote brackets proper form?
[19:21] the brackets round the quotes are better form as they work on python 3
[19:22] so the while statement we added starts a loop, in this instance it will carry on until 2+2 is equal to something other than 4
[19:22] the double equals means "is equal to" a single equals is used to assign a value to something (more on that later)
[19:23] the colon at the end is an important part of the while statement
[19:23] There is no "until" "wend" "end while" type statement at the end, as you might expect to find in lesser languages ![]()
=== yofel_ is now known as yofel
[19:23] the indentation of the print statement is not just cosmetic and for our benefit
[19:23] the indentation level is part of the language, when the indentation stops that is the end of the loop (or other structure that you might expect to have an end)
[19:24] this means that python always looks neat and tidy (or it doesn't work)
[19:24] Always use four spaces to indent, not three, not five and certainly not a tab.
[19:24] Other indentations will work, but if you ever have to work with anyone else you must always be using the same indentation, so we all get in the habit of using four spaces.
[19:24] in gedit you can set it up to use 4 spaces instead of a tab
[19:25] edit-preferences, on the editor tab choose tab width 4 and insert spaces instead of tabs
[19:25] many other editors and IDEs have a similar option
[19:25] Lets run our new program, just save it in the editor and run it again in the terminal with ./hello.py
[19:26] and that is 4 spaces per level of indentation you want so if you have a loop in a loop then the inner one will be 8 spaces indented
[19:26] now we can wait for 2+2 to be something other than 4
[19:26] * AlanBell taps fingers
[19:27] or, if you are in a hurry, you can press ctrl+c
[19:28] ok, so ctrl+c is handy for breaking in to an out-of-control python program
[19:28] you can do other fun stuff with the print statement, if you change it to read:
[19:28] print "Ubuntu totally rocks! ",
[19:28] and run it again (note the comma at the end)
[19:29] print ("Ubuntu totally rocks! "), <- for the python 3 contingent I should think
[19:30] it should fill the terminal with text
[19:30] the comma prevents it doing a newline
[19:31] ctrl+c again to break out of it
[19:31] lets do something different now
[19:31] in the terminal, type python at the $ prompt and hit return
[19:31] you should have a >>> prompt and a cursor
[19:32] this is the interactive python console
[19:32] you can type print("hello") here if you want
[19:32] or do some maths like:
[19:32] print 2**1000
[19:32] which will show you the result of 2 multiplied by itself a thousand times
[19:33] python is kinda good at maths
[19:33] you don't need the print statement here either
[19:33] so 2**1000 should work in python 2.7 or 3
[19:34] you could even try 2**100000 it won't take long, and you can always stop it with ctrl+c
[19:35] while we are on the subject of maths, lets get the value of pi
[19:36] print pi won't do anything useful (but feel free to try it)
[19:36] we need more maths ability than the python language has built in
[19:37] so we need to get a library of specialist maths stuff, so type
[19:37] import math
[19:37] it will look like it did nothing, but don't worry
[19:37] now type
[19:37] math.pi
[19:37] >>> import math
[19:37] >>> math.pi
[19:37] 3.141592653589793
[19:38] So we have seen here how to import a library of functions to do something, and called one of the functions from the library (to return the value of pi)
[19:39] ok, so what is in the math package, apart from pi?
[19:39] try typing dir(math) at the python console
[19:39] ['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'exp', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'hypot', 'isinf', 'isnan', 'ldexp', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
[19:40] you can also look at http://docs.python.org/library/math.html
[19:40] callaghan asked: Is there a way to see which functions are in the imported library?
[19:40] yes ![]()
[19:41] and to get more descriptive help on each one try help(math)
[19:41] so dir() lists the names and help() lists names, parameters and a little bit of help text
[19:43] TheOpenSourcerer asked: is help() a python function useful for anything else?
[19:43] try help(help)
[19:44] it is a function that could be used, I can't off hand think of any particularly useful use of it other than for getting help
[19:44] Mipixal asked: Your favourite IDE for dev with Python, on bigger projects. (In before IDE flame wars :p )
[19:45] honestly my favourite is gedit
[19:45] I have used eclipse and pydev
[19:45] and I liked stani's python editor (SPE) for a bit
[19:46] but all I really want is a text editor with syntax highlighting
[19:46] and normally several terminal windows open across a couple of monitors
[19:46] All this command line stuff is all very well, but we want to do applications that have pretty windows and stuff!
[19:47] In the interactive console type or paste the following
[19:47] import gtk
[19:47] which will load a library full of stuff to do with the gtk toolkit that powers the gnome desktop
[19:47] now type
[19:47] foo=gtk.Window(gtk.WINDOW_TOPLEVEL)
[19:47] that assigns a window object to a variable called foo
[19:47] (the name doesn't matter, the single equals does)
[19:48] but nothing much seems to have happened yet, so type:
[19:48] foo.show()
[19:48] yay, a real live little window should be on screen now!
[19:49] lets see what we can do to it with dir(foo)
[19:49] quite a lot! lets try:
[19:49] foo.set_title("my little window")
[19:49] go ahead and change the title a few times
[19:50] so if you type "foo.show"
[19:50]
[19:50] There are 10 minutes remaining in the current session.
[19:51] you get printed out a reference to where the code for the show function is
[19:51] you need to do foo.show() to actually call the function
[19:51] ahayzen asked: In gedit is there anyway of adding code completion for python programming, like pydev in eclipse, via a plugin?
[19:51] teemperor asked: is there any naming convention in python? (because of set_title)
[19:52] ahayzen: I believe there are some plugins for that, last time I tried one it was rubbish though
[19:53] if anyone has any good ones I would be interested to know of them
[19:53] teemperor: http://www.python.org/dev/peps/pep-0008/ here is the python style guide
[19:54] many projects have their own more detailed conventions for object names
[19:54] everyone agrees on the indentation levels though ![]()
[19:54] Alliancemd asked: In a program changelog I saw a developer saying that he ported the code from python to java to make it faster and he said "because java is sometimes x10-x100 times faster than python". We know that java is very slow, does python have this big impact on speed?
[19:55] this is a myth
[19:55] There are 5 minutes remaining in the current session.
[19:55] sometimes java does take a while to start if it has to launch a JVM, this gave applets a reputation for being slow
[19:56] once up and running it is not particularly slow
[19:56] unless you are doing something massively time sensitive (where every nanosecond counts) then any language will do any task
[19:57] the performance problem is never the language, it is always the algorithm
[19:57] normally rewriting code so that it does fewer disk or database accesses will speed it up thousands of times more than changing the language it is implemented in
[19:58] Alliancemd asked: What do u think of PyQt? Is it that good how people say?
[19:58] mohammedalieng asked: what about python performance compared to Java ?
[19:58] callaghan asked: will there be a follow-up lesson, or where should unexperienced python-devs go from here?
[19:59] not played with Qt much
[19:59] there are some great books
[19:59] snake wrangling for kids is excellent
[20:00] and the dive into python book is in the repos, you can install it from software centre
[20:00] I believe there are other python classes in this channel so check the schedule
[20:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/05/%23ubuntu-classroom.html
[20:00] ok, think I am out of time
[20:00] thanks everyone o/
It was great fun to do, and thanks to David Planella and the classroom team for putting on these regular educational events.
The science of meetings
This post isn’t going to make an huge amount of sense to people who are not using IRC or involved in the Ubuntu project, feel free to let your eyes glaze over and wait for the next article.
The #ubuntu-meeting IRC channel is the place where most of the regular team meetings of the Ubuntu project take place. There was a bot called MootBot in the channel which was there to facilitate meetings, which it did for a number of years. I was never that impressed by what it did with the minutes, there was too much manual writing of meeting minutes which really the bot should have been doing for people. I started making a few tweaks to a copy of the bot so that it would generate formatted minutes in moin wiki syntax for pasting direct into wiki.ubuntu.com I had also been working on a complete rewrite of the code in Python rather than TCL that was started by the Debian project. This was a bit of a background task for me and was nowhere near finished, when a couple of weeks ago the original Mootbot broke and nobody had time to go fix it. As a result of this my next generation meeting bot was pressed into service somewhat ahead of schedule, bugs and all, and is now working hard in the #ubuntu-meeting channel under the name meetingology. The code is at https://code.launchpad.net/~ubuntu-bots/ubuntu-bots/meetingology and patches are very welcome. I am running a development version of the bot in the #meetingology channel, feel free to pop in and test it there.
Meetingology supports rather more commands than the old bot and you can use the old form with square brackets [TOPIC] or just #topic and it isn’t case sensitive about commands. The full list of commands is documented here https://wiki.ubuntu.com/meetingology. In particular note that you can now do “#startmeeting meetingname” to set the overall meeting title. There are a number of improvements and issues to fix with the output minutes, I will get round to that over the next few weeks (patches are welcome remember). Some teams have their own meeting syntax and scripts to parse it, if you want a particular output format for your meeting then do come and find me and we can make it happen. The goal is that the post-meeting effort for the chair is copy-paste-done. Writing up minutes is a task that is not worthy of a human.
Going dotty
Back when the very nice Ubuntu font was initially being developed I did some testing of it using the fontforge application and some looking through the Unicode specification for blocks of characters that should be implemented. There is all sorts of character sets tucked away in the Unicode standard including Klingon and Braille. Sadly the Klingon wishlist has been parked with a status of wontfix but Braille is an interesting one. I was expecting a block of characters in alphabetical order somewhere, but it isn’t quite like that. The specification has all the dot patterns but quite how you type “this is in braille” and get “⠞⠓⠊⠎⠀⠊⠎⠀⠊⠝⠀⠃⠗⠁⠊⠇⠇⠑” is not defined in Unicode as there are a number of different mapping tables you can use to go from letters to dot patterns. So it would be great if the Ubuntu font had those glyphs, however they would be of limited practical use to most people who are interested in Braille. At this point I should clarify that I do know that Braille patterns on screen or printed flat on paper are as much use as a chocolate teapot, they have to be embossed to be read by the fingers. I am taking a broad interpretation of “people who are interested in Braille” and I am including in that someone who wants to make a simple sign that can be read in Braille perhaps using a bit of sheet metal and a centre punch and teachers wanting to get a class to make labels for their coat pegs with their names in Braille, that kind of thing. So for these use-cases and not for typesetting a book in Braille I have made as my first fontforge project a little font which has Braille dot patterns as the characters. This means you can type something in LibreOffice Writer (or word processor of your choosing) and change the font to see it in Braille. You can print it out and stick things on the dots, (if you want to do the centre punch thing do bear in mind that you need to punch through the back of the paper over the dots or you will make a sign that is mirrored and incomprehensible). So here it is, Libertus Braille, a Free font for simple educational uses of Braille.
A Professional keyboard with an Ubuntu Logo on the super key
Today I got a new keyboard, nothing unusual and particularly blogworthy in that you might think, but look a little closer, especially at the two little keys on the bottom row that traditionally host two little adverts for a legacy operating system – they are gone! The little flags (previously discussed in the context of Google ChromeOS) are replaced with the Circle of Friends, the Ubuntu Logo that symbolises friendship and freedom. So where, I hear you ask, did I get such a marvel of modern clavicula engineering? Well the answer to that is from our friends at the Keyboard Company where they distribute and customise high end and specialist keyboards. This one is a Filco Majestouch which they modified by replacing the super keys with custom printed ones with the Circle of Friends on. Now you might note the price tag for this keyboard is £95 ex VAT, and yes this is a high end keyboard. It has a solid quality feel to it and the key action is superb. In fact when ordering you can specify one of three different key actions, tactile action, click action or linear action. I got the tactile one, which is not clicky, but has a point of resistance to push past in the travel at the actuation point. Kind of like pushing the accelerator on an automatic car past the bump to get it to kick down a gear.
It also does N Key rollover, which is great. Most cheap keyboards have a matrix of wires and switches that link keys into groups and when pressing multiple keys together this can lead to ambiguous signals that cause ghosting (keys being signalled as pressed which were not) and jamming (keys pressed, but not signaled). This keyboard has each key individually addressable, you can press a whole bunch of keys at once and it will know exactly which ones you have got pressed. This helps for the rapid typist and in gameplay where you might be holding down a bunch of keys to move a character whilst jumping, turning and firing. A missed keypress in this scenario could lead to an almost tragic loss of virtual life.
I am not really a gamer, but the N-Key rollover does interest me for a completely different reason, it means I can try out the chorded keyboard typing with Plover. This allows you to write instead of one key at a time by pressing a chord of multiple keys like a court reporter would do on a stenotype machine, this can in theory allow you to communicate at a blistering 250wpm. This open source software reads what you are typing using the steno chords and maps it from a kind of syllable level shorthand into what you intended to say.
If you would like to have one of these fine keyboards you can order them from the keyboard company, at the same price as the version with the flag key, just specify in the additional information box on the order form that you would like the Ubuntu Circle of Friends on the super key. They can ship anywhere and do them in pretty much any international layout, so if you want AZERTY or whatever then they can oblige. I would love to see them listed as a product in the Ubuntu store but as yet I have been unable to contact a human there, if anyone knows how to do that then do leave a comment.
Ubuntu UK LoCo CDs
The allocation of CDs for the Ubuntu UK team arrived yesterday, to the excitement of the chickens. They have been using Kubuntu 10.10 for the last six months and are keen to evaluate the features of 11.04 (I prefer GNOME, the chickens prefer KDE).
They started the upgrade by reading the CD sleeve carefully
and then installed the new Kubuntu 11.04 on a piece of string in the run so they can peck at it and check their feathers in the mirror.
After the upgrade I took their old Kubuntu 10.10 CD and gave it a bit of a wash, when it stopped smelling too much I put it in my laptop and booted it, there was a bit of a crack on the outside edge and it didn’t fully boot, but it got to the bootloader and did about 15 seconds of productive loading before it failed. Check back in 6 months to find out how the Kubuntu 11.04 CD boots.
So now we need to decide how best to use the remaining 49 Kubuntu CDs, 50 Ubuntu Server CDs and 250 Ubuntu CDs. Preferably in a slightly less frivolous way than entertaining livestock.
Now that shipit has stopped doing individual CD requests we are going to reserve some for people on dialup who want CDs. The procedure for this is as follows.
- Email me, alanbell at ubuntu.com with a clear subject line saying you would like a CD.
- I will then respond with my snail mail address.
- You send me a stamped self addressed envelope big enough to hold a CD.
- I put CD in envelope and send it back to you.
So this is mildly inconvenient, and costs you more than free, but only about a quid, in postage. If you are on dialup (or an obsessive Ubuntu CD collector) this is still well worth doing, those on broadband have probably already got the .iso and burned it already.
Another batch will go to people distributing recycled PCs pre-installed with Ubuntu like Remploy I want these PCs to go out with an official CD in the pack, and some information about the LoCo team for the end user. Any company or charity involved with recycling PCs for distribution in the UK through the RaceOnline initiative or anything else is welcome to contact me to arrange CDs and help with doing an OEM build image for cloning (so on first boot it asks the user their name). These kind of organisations are not going to engage Canonical services, they just don’t have the margins, working constructively with them is certainly something we can do as a community team.
The rest will go to events and conferences where we have a presence, which means we need to have a presence at some events. I would really like the team to run a few bring-a-box installfests at university computing societies. If you want to help organise one that would be great, I am happy to support it with CDs and help get some people along to help.
If you have further ideas on how to use the CDs then do comment here, on the Ubuntu-UK mailing list or at the next team meeting on IRC.






