Locking Ubuntu Gnome Panel

Children have a knack for messing up anything tidy. Unlike their rooms, and the car, however, your computer can be kept orderly – at least in part. On Ubuntu, it is possible to lock down the panels (the top and bottom bars with icons and menus).

Firstly, get System Tools>Configuration Editor displaying. Do this from System>Preferences>Main Menu.

Once the menu item is available, go to System Tools>Configuration Editor>apps>panel>global>locked_down and tick it. In Karmic there appears to be no need to reboot or restart Gnome. It is not too painful to undo this, make some changes, and relock it if necessary.

Making custom emblems for Ubuntu

Have you ever wanted to make your own emblems for Ubuntu? It is very easy. Just use the GIMP (or something similar) to make a png image (make it at least 40x40px) and then open nautilus (e.g. Places>Home Folder>Edit>Backgrounds and Emblems and add it. I store all my emblems in ~/Pictures/emblems. For a brilliant overview of adding emblems etc visit http://www.go2linux.org/How-Customize-Ubuntu-with-Backgrounds-and-Emblems.

Karmic RC sound problem

Installed Karmic release candidate. Trying to play various media. Oops. Attempts to get plugins for Firefox failed but fortunately I know the magic trick:

sudo apt-get install ubuntu-restricted-extras

OK. But no sound to hear the media with. I seemed to fix the problem with two small changes under System>Preferences>Sound>Output. I changed the device for sound output from one option to the other (both labelled “Internal Audio Analogue Stereo”) AND the connector from “Amplifier” to “No amplifier”. No idea why those weren’t set correctly for my system from the get-go and no idea why they’re relevant – just grateful to be hearing sound :-). My soundcard is a Soundblaster Audigy 2.

BTW the command cat /proc/asound/card0/codec#* | grep Codec didn’t work for me as the only thing similar in the rough location was cat /proc/asound/card0/codec97#0/ …

Python fits in my brain – no accident

One of the things I like about Python is the way I can hold so much more in my brain without having to look stuff up. If you know the tools for working with sequences (strings, lists, tuples, dictionaries etc), you know what to do with anything that is a sequence. Data from a database can be handled using the standard tools for processing lists and tuples etc etc etc. You don’t need to know how ADO differs from DAO etc. This is no accident – it was by design. Anyway, it was nice to see that a prominent programmer feels the same way about Python:

Bruce Eckel: They say you can hold seven plus or minus two pieces of information in your mind. I can’t remember how to open files in Java. I’ve written chapters on it. I’ve done it a bunch of times, but it’s too many steps. …

The other issue is the effect of an interruption. If you are really deep into doing something and you have an interruption, it’s quite a number of minutes before you can get back into that deeply focused state. With programming, imagine you’re flowing along. You’re thinking, “I know this, and I know this, and I know this,” and you are putting things together. And then all of a sudden you run into something like, “I have to open a file and read in the lines.” All the clutter in the code you have to write to do that in Java can interrupt the flow of your work.

Another number that used to be bandied about is that programmers can produce an average of ten working lines of code per day. Say I open up a file and read in all the lines. In Java, I’ve probably already used up my ten working lines of code for that day. In Python, I can do it in one line. I can say, “for line in file(‘filename’).readlines():,” and then I’m ready to process the lines. And I can remember that one liner off the top of my head, so I can just really flow with that.
http://www.artima.com/intv/aboutmeP.html