• Zeth will be attending PyCon UK on the 12th to 14th September 2008.

This Week on the Command Line: The Light and Dark Sides

6 May 2007

Hello everyone, it has been a little while since I last did a round up of random blogs I have read. So lets get started.

Freedom of speech

The BBC News website had a discussion thread about the HD-DVD encryption key where you were not allowed to mention the code or include links to it. Here was my accepted comment, I only got half way into my point but it was late and I wanted to go to bed:

Can you tell what it is yet

Can you guess what it is yet? (The answer is in the comments below).

People have been very cool with the code, if you use the hex values for html colours then you get a nice flag, you can also sing it as a nice ballard (youtube) (mp3/ogg files). It is probably not work safe, depending on your job, but here is a picture of things that are currently banned somewhere in the world (mirror).

I feel the need, the need for speed

A cool dude called Marutosan has some rather low level ways to Tweak Linux for speed, I'm not sure how many of these would really make a noticeable difference for me. Here are some more, Using all of GCC's optimisations will make a difference at the low end (or better just buy some RAM), using a filesystem that is not ext2/ext3/ext4 will probably have more of a noticeable effect for most people, but it will not be earth shattering. Again none of this matters for me, my computer needs to be more like a VW camper van rather than a formula one car, but your needs may be different.

I have noticed before that there are Bash commands called cut and paste but had no idea what they did, well read this post to find out.

Some guy is doing a month at the command line only, so we can see how he gets on, as you know, a lot of the time I use computers with no GUI and it makes no real difference to me, except I like a minimal X sometimes so I can launch mplayer to watch normal people do stupid stuff on YouTube.

OS X command line

The desktop version of OS X is still a BSD system, even if it is a bit messier under the hood than certain Linux systems that expect you to go there, such as Gentoo where the configuration files are a work of art. An article that forms part of 'Mac OS X Unleashed', is 'Locating and Editing the OS X Configuration Files', worth a read.

I actually find OS X a well thought out and perfectly usable command line system, it comes with Emacs and Python and so on. The downside is that there is not much software compared to the amount that is readily available through Gentoo's Portage or Debian's apt-get, for example. If you are willing to do a little spit and polish yourself (i.e. use make, etc to install stuff) then it is fine. For more on being a warrior within the OS X world, see my earlier series on it.

Here is a useful piece on how to get Mac OS X's terminal to forward Page Up and down to the shell.

Andy finds an angry blog post of a Mac user. To repeat my comment that I made on Andy's blog, that Mac user thinks that he is a Mac OS X genius and installs a load of weird third party stuff; he then starts to randomly delete folders that he does not recognise (i.e. the /usr folder), and then blames Apple and everyone else that his computer does not work. Even though /usr is a core part of OS X, he describes that folder as 'Unix' which, he argues, means he should not have to learn about that.

A very weird and circular argument indeed. My opinion has always been that you must know about the tools you use. We do not let just anyone just jump into a car and start driving it, for example, they need to take lessons first. Otherwise you should stick to the bus. It is similar with a multi- purpose personal computer, if you are not willing to read and learn then you should have something else, perhaps an embedded Internet tablet appliance, or at least drive carefully.

The Light and Dark Side

Aaron Toponce argues that light text on a dark background is less painful for your eyes and changed his blog theme accordingly. Interesting stuff, I have my gnome-terminal set to black but most graphical apps are the other way around, the brightness of the backgrounds can be a bit off-putting I agree.

A different Andy notes about the problem of being forced to use particular bits of proprietary software, rather than being assessed on the results. This is both an educational problem, i.e. that the use computers having infiltrated all disciplines but the best practices for teaching them have not yet followed, but it is also a problem of how people often do not realise that they are furthering the interests of monopolies over the needs of their students. Often these practices within education have been found to be illegal under various laws but they go on. No teacher would require students to have a particular brand of pen or paper, yet you will find teachers that will insist on a certain software package, often for no real reason. It is up to all of us to stand up for free choice, free markets and free software wherever this happens.

Some interesting musing on the Virgina Tech shootings on Don't Worry I'll Think Of A Title,

> I can see both sides of the GOA argument. The biggest problem is that it's purely hypothetical. We can't know one way or the other if he would have been stopped. On the other hand, we do know that being in a gun free zone didn't help anybody.

Well we can assume that people go psycho-nuts everywhere at more or less the same rate, however, the consequences are different. Here it is, more or less, a handgun free country, at least for people not in the illicit drug business. There is a mandatory five-year jail term for carrying a gun. If a British student goes psycho then he/she might stab one or two people before being disarmed, there is no way a normal student can just go and buy two guns as was the case in Virgina. However, that being said, if I lived in certain parts of America, would I be the only one without one?

Ciaran McCreesh wrote a post, where he argues that, in his example, Python's Object Orientation is broken because an instance of a derived class does not inherit a property in the init method. However, as I argued in greater depth in the comments, he is specifically overriding the init method, so it should not inherit it, otherwise you would be stuck with it whether you want it or not. If you have an instance of class that has multiple inheritance and you could not override the init methods, then you would have all kinds of unwanted actions going off everywhere, you just wanted some small piece of functionality but end up with a fireworks display.

OS Updates

I am a Gentoo user mainly (I do set up Ubuntu for others though, and use it on one of my machines), where you install the system once and then if you keep with the updates then you are at the latest version. Obviously, in Ubuntu, if you are already subscribed to the back-ports and universe then after an upgrade your system is more or less the same as before.

However, in a business setting you need stable versions that are easy to track and keep at the same level, which is why Gentoo as currently constituted will reach a glass ceiling and will have to change a few years down the line to become more of a meta-distribution with child distributions being maintained by businesses and communities. However, that point has not come yet, there is plenty of life in her yet.

**Feisty Fawn **

System Message: WARNING/2 (<string>, line 139); backlink

Inline strong start-string without end-string.

So since last time, Ubuntu had a new release, which again shows how extremely rubbish a certain proprietary operating system is, with just one major (minor?) update to the home desktop in five years. It is nice to see Ubuntu make an attempt to include desktop affects too, hopefully in the next version, desktop effects will be mature enough to be on by default for compatible video cards. Ubuntu's release was the biggest issue in the blogs, so I will give it my two pence.

Stuff on Feisty fawn can be found from Phill, Bug, Paul and Pete who uses Kubuntu now, while Mez tries out Xubuntu. While Ravi wonders if Ubuntu is over-hyped? There are probably others that I have lost, let me know in the comments.

According to this blog post, if you try to use a command at the shell that you do not have, Ubuntu Feisty will tell you what package to apt-get, that is rather handy.

As I have argued before, Ubuntu is currently the best attempt at an end- user desktop that can be installed and used by non-technical people. On that front, it surpassed Windows XP in the last release (Edgy Eft), but it still has a long way to go to be as friendly as OS X out of the box.

Some of that difference is not Ubuntu's fault but is due to the stupid US legal system meaning that all the stupid codecs are not there for you. However, the main problem is with GNOME and GNOME only. While Ubuntu have done well at reducing the number of installed apps, it still has not yet got the message that less is more. Don't get me wrong, I think GTK+ looks great and the Applications are superb, but the arrangement of the GNOME Panels really lets it down slightly.

So the update tool(s) could still do with some major work, having three different interfaces to Apt is ridiculous (Add/Remove, Synaptic, the update manager, also there is the software sources tool and gdebi) and need to be merged into one application that is non-threatening but has the advanced options hidden away. It is not complicated, just make the thing really simple by default, then have an option in preferences that turns to advanced mode then you get that forever more. Once a user has moved up to the advanced mode (i.e. Synaptic) then that user does not need the simple mode any more, so get rid of it.

GNOME's System Administration Sucks

Even worse, there is still 30 tools in Preferences/Administration, which is as much of a mess as Windows. OS X again manages to have one clear and consistent System Preferences panel with four lines (Personal, Hardware, Internet & Network, System), each line has about 5 icons each. I think we could do even better.

One approach would be a single interface, which always has a taxonomy in the left column, and selectable options in the right column. The form of taxonomy would be three icons. When you click on an icon then you get both options (i.e. controls) on the right and new (more specific) icons on the left. I am not explaining this well and should probably just draw a picture, so let's start again.

When you open the application, there are three icons on the left and the most important controls on the right. When you click on an icon then you are taken to the next level down, which has more specific controls on the right hand side and three new icons on the left; if you click one of these icons then you move onto even more specific controls and a final three icons. This means that 27 sets of controls can be contained within one friendly application, with the common options near the top and the advanced and obscure options are only two clicks away. If you never need something then you never find it.

The three top level icons could be:

  • My Desktop - things to do with Gnome, keymaps, screensavers, etc.
  • My Computer - things to do with the system, network settings, sources, users, etc.
  • My Peripherals - things that hang off the computer, ipods, printers, etc.

How would you do it? Do let me know.

1 (Other) Andy says...

I like your comments about UI design. I've been doing a psychology and business degree, and just coming to the end of it. The most enjoyable essay I wrote was on the way in which cognitive psychology is applied to UI design, and how to best design the UI.

The conclusions I came up with (and there are rightly other different conclusions that can be reached) is that each individual has a preference for how to best interface with their computers. Whilst users that understand (albeit superficially) where to find the relevant icons/applications can utilise your system such as the three step system, the method for novice users needs to be more like the physical world. The problem is that there are so many difference comparisons you can make between interfaces and the "real world" (filing cabinet style storage for example), that it is more of an art that a science in getting an interface that suits the user. The best way is to have multiple UIs that the user is able to choose from (such as a simple UI and advanced UI).

I think it's something that Ubuntu will be able to address, as more and more WMs are being produced around the releases. I, like you, enjoy using gentoo, but the simplicity of ubuntu has made it a winner when I have to remotely support computers at home. Most problems my family can sort by themselves, with the help of the ubuntu community - now they know where to find it.

Display, Contents and Peripherals.. I think those three would work for me.

Posted at 9:05 p.m. on May 6, 2007


2 Zeth says...

So here is the answer, I entered the first part of the code acrostically into the post:

http://commandline.org.uk/images/posts/other/bbc-and-me2.png

Posted at 9:11 p.m. on May 6, 2007


3 Phill says...

Actually I found out about Ubuntu's "suggest a package" feature the other night - it is pretty cool! Unfortunately the reason it suggested a package for me was because /usr/bin/java was symlinked to an old version of java (i.e., it wasn't actually on my system any more). So installing the package they suggested didn't actually fix anything! Ah well, that's only because I've messed around with the Java version installed on my machine (the GNU version of Java unfortunately still isn't 100% compatible with Sun's Java).

Posted at 10:43 p.m. on May 6, 2007


4 bug says...

"According to this blog post, if you try to use a command at the shell that you do not have, Ubuntu Feisty will tell you what package to apt-get, that is rather handy." -- I like. Can I get that for Arch?

Posted at 5:36 a.m. on May 7, 2007


What do you have to say?

Show Editing Help


PyCon UK

About

Hello, my name is Zeth, I'll be your host here.

Command Line Warriors is about taking control of your own technology, it looks at our experiences of computing; especially using GNU/Linux, the Python programming language, the command-line and issues such as techno-ethics, best practices and whatever is cool now. If you take control of your technology then you are a Warrior too!

This site is your site too which means that you can contribute and get involved. You can leave comments using the facility provided. For me, the comments and discussions are by far the best part of the site. So please do have your say!

Latest Discussions

deesha

September 8, 2008
hey all, i just wanted to check the other stuf if nay1 can help me what i want is i have to convert the line starting with my function name ...
Email Syntax Check in Python

Daniel Black

September 3, 2008
Hey, sounds good already. There's another Python script for command-line 140-character-messaging (won't call it "tweeting" for obvious reasons), Tweety Py, that's currently languishing. Not, I think, because the developer's disinterested, ...
Using new social networking service Identi.ca from the command line

Antonio Araujo

September 2, 2008
Dear friends, has anyone built debian packages of db xml 2.4.13? Best regards Antonio
Native XML storage with Berkeley DB XML - part one

Zeth

September 1, 2008
Thanks everyone for your different solutions, absolutely fantastic. I have tried them all. The one from Ciaran McCreesh was the one I was subconsciously groping for.
Sisu and typing unicode in GNOME

andylockran

September 1, 2008
In ubuntu, I do ctrl, and the functions to the right of my keyboard for extra characters. Such as: alt gr + ; + e for é I'll post more ...
Sisu and typing unicode in GNOME

Jinks

September 1, 2008
I am from Germany but i use an US-layout keyboard since that's a lot easier for most my programming needs. Now, having to also write the occassional german letter or ...
Sisu and typing unicode in GNOME

Toni

September 1, 2008
Hi, You might want to add an xkb keymap. Make backups before you begin ;) And sorry about formatting. in /usr/share/X11/xkb/symbols/gb, after "intl", add this: partial alphanumeric_keys xkb_symbols "intl_fi" { ...
Sisu and typing unicode in GNOME

Ciaran McCreesh

September 1, 2008
On a UK keyboard you do alt-gr+[ followed by a to get ä. You don't need the control key at all.
Sisu and typing unicode in GNOME

name

September 1, 2008
Hi!,
List files recursively by modified time

name

September 1, 2008
Hello!,
List files recursively by modified time

Leif

September 1, 2008
On my Norwegian keyboard, the diaeresis is easily accessible, like on Jani's Finnish one. It's one of the few keys that doesn't advance the cursor, along with the tilde, circumflex ...
Sisu and typing unicode in GNOME

Lornix

September 1, 2008
ä <= compose, ", a ö <= compose, ", o å <= compose, o, a Ä <= compose, ", A Ö <= compose, ", O Å <= compose, o, A ...
Sisu and typing unicode in GNOME

name

September 1, 2008
Good day!,
List files recursively by modified time