Archive for the ‘Geek’ Category

A Breath of Fresh Air – The Well Grounded Rubyist

Tuesday, June 9th, 2009

After a tough day in the office you want to catch up on the news, so you look at the ticker on a TV channel or tune in your car radio. Other days you’ll want to sit down with a meaty broadsheet and really take in the detail of what lies behind the headlines. This is a book about Ruby which which triumphs at walking the line between these two styles. The Well Grounded Rubyist aims to appeal to a developer that has been exposed to some Ruby coding and take their knowledge to the next level. And it succeeds brilliantly.

This is not a book about Rails or any other web frameworks; purely Ruby. Though much of the material will also apply to the 1.8.x series of Ruby, this is a book about the 1.9 version of the Ruby language. It’s broken into three parts – Ruby foundations, Built-in classes and modules and finally Ruby dynamics. But don’t let the title of Ruby foundations fool you for part one – this is not some remedial rush through the basics of Ruby in six chapters. Rather, after a couple of warm-up chapters, it moves quickly to clarify the key aspects of how classes and module inter-relate, as well things such as crystallising what ’self’ really means in different contexts in a Ruby program. The author sets out his stall early – what makes Ruby different from other languages is it’s focus on objects rather than classes. Everything else stems from this and by the end of the section you feel like you have an understanding of Ruby’s design and focus.

Part two of the book is Built-in classes and modules. Now that you know what makes Ruby tick, it’s time to get seeped in all aspects of the core library that ships with it. One of the problems when learning a language is that becoming familiar with all methods of a particular core class is a tedious task. It’s much more interesting to learn about concepts such as meta programming than memorising lists of methods by rote. But if you don’t take the time to familiarise yourself with the dusty corners of a language’s API then you’re less likely to think of those handy methods when a problem they would elegantly solve presents itself. At this point the book shifts gear to a more reference style of text. However, it still gives the reader an interesting story to follow as it documents arrays, hashes and other classes – throwing in the occasional golden nugget of information that will be a valuable additional to the toolbox of even experienced Rubyists. One side effect of the change in style is that this section is probably the most accessible to beginners. Again it’s broken down into six chapters. In addition to collections, it also covers topics such as regular expressions and file handling. Each topic takes a zero-to-hero approach meaning that you can bring little regular expression knowledge to the table yet still walk away learning an immense amount about the subject.

The final part of the book, Ruby dynamics, returns to the book’s roots from part one – a focus on imparting a deep knowledge of Ruby’s design. Before you even pick up this book you have an inkling that procs and lamdas are going to make a guest appearance at this late stage. And they do not disappoint. Extending the behaviour of objects takes centre-stage and meta-programming based techniques move quickly to the fore. Any block/proc/lamda confusion you may have will be a distant memory by the time you finish this section. Threading is also covered here – though a detailed discussion of 1.9’s new native OS threads vs green threads is left to one side to focus on the usage of threads regardless of which underlying type you use. Lots of material is also provided on querying objects; which is not only useful for program design but also invaluable as a debugging aid. The book really shines in this section because a lot of other texts make the mistake of going into ’super-boffin’ mode at this point, leaving the reader lost, whereas the author here continues to provide patience and context to get you round that final lap on you way to becoming a Well Grounded Rubyist!

This book cannot be all things to all people. Because it is catering for a wide range of intermediate to advanced Rubyists, it will feel like it’s moving a little too slowly for some. By the author’s own admission, this is in order to make it accessible to a wider audience and no doubt it will make it easier for developers of all levels to digest – your humble reviewer very much included! Ruby first-timers would be best off having some straight-to-the-point tutorials or entry-level text to hand in order to get some instant gratification – as part one of the book, by it’s very nature, is a little more abstract than a complete beginner would expect. But all in all, this book is a great way to learn just how Ruby crams so much expressiveness into such a simple clean framework. Whenever I read a book like this I keep a list of new things learned along the way. For The Well Grounded Rubyist it is a very long list! Well done to David A. Black and Manning for producing a book that fills those gaps in many Rubyists’ understanding of the language while at the same time delivering an absorbing readable book that would sit proudly on any Ruby programmer’s bookshelf.

Optimising Apache serving Ruby on Rails via Passenger

Monday, May 11th, 2009

An unusual blog post this in that I have such little value to add other than pointing you at two great links. The first is a wonderfully useful post on tweaking Phusion Passenger when running some Rails apps on a 256MB Slicehost VPS and the other link is a no-nonsense explanation of tweaking Apache config options to cut down on your swap memory usage. Thanks so much to these folks!

Bug of the Day: nil.include error with create_time_zone_conversion_attribute

Thursday, January 22nd, 2009

This was an ‘orrible bug. Tired and midway through writing up a Ruby on Rails tutorial on setting up emailing with AR Mailer and a little postfix configuration I wasn’t exactly in the mood for a bizzarely cryptic issue to waste my time. Enter the mysterious create_time_zone_conversion_attribute? method in all it’s glory. Basically you will get this error if you set …

config.cache_classes = false

… wherever it is set in your environment files (in my case config/development.rb) but the error goes away if you change it to …

config.cache_classes = true

… bloody daft! Here is the bug on lighthouse. Arrgh!!!!

Anyway here is the full stack trace which may help someone googling to pick up this page

NoMethodError in UsersController#create

You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?

/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:142:in `create_time_zone_conversion_attribute?’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:75:in `define_attribute_methods’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:71:in `each’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:71:in `define_attribute_methods’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:350:in `respond_to?’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2587:in `attributes=’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2583:in `each’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2583:in `attributes=’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2283:in `initialize’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:691:in `new’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:691:in `create’
vendor/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:92:in `perform_delivery_activerecord’
vendor/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `each’
vendor/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `perform_delivery_activerecord’
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:526:in `__send__’
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:526:in `deliver!’
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.2.2/lib/action_mailer/base.rb:392:in `method_missing’
app/controllers/users_controller.rb:47:in `create’
app/controllers/users_controller.rb:45:in `create’

Happy hackin’

Hackin on Gruff – A Brief Overview of Gem Development with Ruby

Friday, January 16th, 2009

Ah such is the life. Chillin’ in Havana (the bar, unfortunately not the city), hackin’ away on Gruff of all things. This is the my first attempt at development on a gem and it has to be said is surprisingly satisfying. Getting gems to build is a doddle. Here’s a great link that shows how it’s done in moments. Also a handy thing to know is how to suck the code out of your OS’s gems directory and unpack them to under your app’s vendor/gems directory – all courtesy of VendorEverything. You can create the vendor/gems directory manually if it doesn’t already exist.

When developing on the gem, I found that the best strategy was to clone down the gem source code from GitHub or Rubyforge to under the vendor/gems directory of my application rather than using the OS package unpacking technique of Vendor Everything (though they do it more for deployment than development – which is a great idea). That way I could easily stay on top of the latest source code using git. Actually, to make things even cleaner I downloaded the Gruff gem source code to a different directory totally unrelated to my sample project and then symlinked to it from under vendor/gems of my app. Clean as an (unused) whistle!

And with Gem, Git and GitHub behind me life was trouble free. Now back to my search for great Cuban cigars…

Just Diff the Internet

Sunday, June 22nd, 2008

Woke up this morning and found myself dead… Well, more to the point, my Internet connection dead. So being a Nymphobyte – someone feverously attracted to a reliable high bandwidth connection – there was little else to do than ponder the state of broadband in Ireland. Options are limited in the land currently home to the so called ‘Pariahs’ of Europe. Just make our broadband better and we’ll vote Yes! to Lisbon II and even Lisbon III ‘The Search for Spock’. Until then, you’re better off sending your packets of data back and forth via carrier pigeon rather than trying to connect via the empty promises of the current providers.

At least things aren’t as bad as in Sweden, oft thought of as land of the liberal and freedom loving Swedes, where their elected leaders are trying to sell them down the river – forcing a copy of all networked communications to be forwarded on the government so that they can, presumably, check for things like terrorists trying to share the latest episode of Desperate Housewives over Bittorrent. Sweden is now being mentioned in the same breath as China and Saudi Arabia with respect to Internet Freedom. According to an Information Age article even Google, not known to be adverse to collecting data on people, has been heavily critical of the crippling legislation. Blogger Oscar Swartz has a rallying mayday call on his site. Yes, that’s right, even the Scandinavians have given up on civil rights – now we know the world is doomed! They’re kind of like a civil liberties version of those budgies that used to warn of noxious fumes down the mine shafts in the old days – once they go tits up then you know the game is over.

Nope, freedom is not on the menu anywhere this week. An article in The Economist took stock of the scale of civil liberties that have been eroded under the Labour government and the relative apathy that this has been met with by the people. Gordon Brown, despite the having the popularity of Brian Cowan at a Eurocrat orgy, has even managed to push through legislation in Parliament to the effect that one can now be detained for 45 days at a go without charge. That’s over 6 weeks! You could miss the whole European championships if you’re unlucky enough! Which might suit you if you’re a Portuguese or Croatian fan, after their sides painful exists. But 6 weeks! Perhaps Gordon just has a secret repressed side that he didn’t know about – which is subconsciously upset that Ireland is now seen as more Eurosceptic than Britain. Forty five days isn’t so bad though. After all, Tony Blair wanted to lock ‘em up for 90 days without charge. Why not go the whole hog and just lock people up at birth? It saves all that awkward decision making and you wouldn’t even need National Identity Cards anymore. Mind you, who needs ID cards when everyone one has already gotten their own copy of secret government dossiers that they picked up on the Tube on the way to work. Now there’s a government I wouldn’t trust mind my dog for the weekend, never mind my confidential information. And I don’t even own a dog…

It’s been a tough week all right. It’s hard to know how to stay on top of things. My great plan is to do away with RSS feeds and subscriptions and just diff the Internet each morning before going to work. If there was some interesting news found it could be managed using git and deltas emailed to friends to keep them informed. Sure, it would be a lot of data to contend with, but there would be some scant satisfaction knowing that it would make those draconian Swedish government servers that spy on their citizens work that little bit harder!

Quick Example of Serialisation via to_json in Ruby On Rails

Monday, May 19th, 2008

Ruby On Rails provides a few neat ways to serialise/deserialise objects to JSON. Out of the box you get the following approaches

SERIALISING

* json_string = a_house.to_json

DESERIALISING

* an_object = ActiveSupport::JSON.decode(json_string) # gives you an object of type Object
* a_house.from_json(json_string) # gives you an object of type House, note that a_house
                                             # is an instance of House

These are pretty straightforward and do exactly what they say on the tin. Of the deserialising methods, note that using ActiveSupport directly gives you an object of type Object so you may prefer the stronger typing of the second technique which gives you an actual House object.

Note: There’s been some great improvements to JSON support built right into Rails since Rails 2 has come around. For more info on this see here.

When things just aren’t enough…
There are times when you will want to override the default serialisation that Rails provides – such as if you want to do some object ‘flattening’ like including an attribute from an association on serialising. Now before proceeding check out the latest Rails 2 JSON support mentioned at the end of the previous section as this might make your life a lot easier. Otherwise, let’s press on with an example of DIY JSON handling.

Given a House object which has an associated Owner object, you might want to include the Owner’s name attribute when serialising a House.

House Class
- has address and value attributes
- has an associated Owner object

Owner Class
- has a name attribute

We’ll need to override the default to_json method on the House model.

class House::Base
  def to_json
    result = Hash.new

    self.class.content_columns.each do |column|
      if self.attributes.include?(column.name)
        result[column.name.to_sym] = self.send(column.name)
      end
    end

    if self.attributes.include?(column.name)
      result[:owner_name] = owner.name
    end

    result.to_json
  end
end

The above was partially taken from the howtogeneratejson page on the Rails wiki, which is has little bit more detail. Now all you need to do is call the a_house.to_json method and you get lots of lovely JSON which represents your model! One final note is that you may not want to override the default to_json method. If not, just call your method something else like to_custom_json. Also, there’s

Mercurial, Python and a Packet of Crisps

Monday, April 7th, 2008

Came across this exciting bit of news on the ol wireless just recently that rails is moving from SVN to Git. Exciting times indeed as more and more developers are realising the merits of distributed source control to manage an ever expanding code base. This Irish Penguin’s been in the fortunate position of working a lot with Mercurial, an alternative to Git, for the last few weeks and these types of tools are just a great way to work.

One of the big pluses is that your code and your repository (the history of all edits you’ve ever made to the code) is all in one directory which makes the process of source control really filesystem based. This is great when you’re learning and just experimenting as you become more familiar with your new favourite toy. If you want to try something out, you just copy the directory somewhere and if it all goes to pot then it’s just a quick copy command to restore it back to its original state!

If you’re a Ruby or Python dev one of the really nice things about Mercurial (also known as hg – after the chemical symbol) is that it’s done in Python, which means that it’s pretty easy to hack a bit of code together if you want to extend functionality. A whole Saturday was lost to the cause of hacking Mercurial in Dublin’s Central Hotel last weekend – as your host recovered from a bout of Extreme Coughing (there are more germs going round here at the moment than sheep in New Zealand!) over a pint of orange and a packet of crisps. Good fun! It was kind of weird though. As soon as urs truly had booted up the laptop, a bunch of folks grabbed seats to the back of the room muttering about Ubuntu cds and wifi. Sounds like Linux is all over Dublin like a rash. A very nice rash of course!

Getting the Huawei E870 to work on Kubuntu (and Mobile Internet from O2)

Wednesday, March 26th, 2008

It’s a shiny express card and it promises Internet free from cables, plugs and sockets but will it work on your pretty Kubuntu laptop? Let’s hope so. This guide worked for me and hopefully it’ll work for you too!

Now before we start let me tell you my setup. I’ve got this working on a Kubuntu based Dell Inspiron using O2 as my network provider. It did not work on a separate Dell Vostro running Ubuntu 7.10 (however I did get it working on a different Kubuntu 7.10 Dell Inspiron laptop). So I’m not sure whether that was a Ubuntu or Vostro thing or just bad luck. Also, note that the below approach worked for me when setting up Huawei’s E220 USB modem too.

In any case, here’s the 6 step plan to happiness
1.) Download the huaweiAktBbo-i386.out file
2.) Create the /etc/chatscripts/huawei-e220.chat file
3.) Create the /etc/ppp/peers/huawei-e220 file
4.) Create the /etc/wvdial-huawei.conf
5.) Edit the /etc/resolv.conf
6.) Create and tailor the /home/username/bin/connectme script (and chmod it!)
7.) Tip of the day – lose the Edge!

1.) Download the huaweiAktBbo-i386.out
This can be done by visiting http://www.kanoistika.sk/bobovsky/archiv/umts/ and downloading the file huaweiAktBbo-i386. If you really want you can also build it from the C source provided (in order to build it you will need to have a C compiler and some basic tools on your system). NB: Copy the huaweiAktBbo-i386.out file to your /home/username/bin directory after downloading. If you don’t have a bin folder under your home directory then create one (‘mkdir /home/username/bin’). Also ensure that it is in your $PATH environment variable. Try echo $PATH and if you don’t see it listed add the following line to your /home/username/.bashrc file

export PATH=$PATH:/home/username/bin

To get this change immediately picked up by your shell run the command ’source ~/.bashrc’. This something I didn’t learn for years!!! D’oh!

2.) Create the following /etc/chatscripts/huawei-e220.chat file

TIMEOUT 3
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" ATZ
OK ATQ0V1E1S0=0&C1&D2
OK ATDT*99#
CONNECT ""

3.) Create the /etc/ppp/peers/huawei-e220 file

/dev/ttyUSB0
460800
noipdefault
defaultroute
persist
noauth
nodetach
usepeerdns
connect "/usr/sbin/chat -vf /etc/chatscripts/huawei-e220.chat"

4.) Create the /etc/wvdial-huawei.conf

[Dialer Defaults]
Modem = /dev/ttyUSB0
#Baud = 3600000
Baud = 7200000
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 =
Area Code =
Phone = *99#
Username = ppp
Password = ppp
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1

5.) Edit the /etc/resolv.conf file
Add the following entries at the top of this file (they are O2’s nameservers)

nameserver 62.40.32.33
nameserver 62.40.32.34

6.) Create the and tailor the /home/username/bin/connectme script as follows (and chmod it!)
Note: See step 1 for more instructions if you don’t have a bin folder in your home directory

#!/bin/bash
sudo /home/username/bin/huaweiAktBbo-i386.out # CHANGE THIS TO YOUR 'USERNAME'
sleep 3 # wait for the USB host to settle down...
sudo wvdial --config /etc/wvdial-huawei.conf
#/usr/sbin/pppd call provider

Then just do a ‘chmod u+x /home/username/bin/connectme’ from the command line (to allow you to run ‘connectme’ from the command line directly) and hopefully you should be ready to rock! The next step is to insert your E870 into the express slot. You might start to see Linux picking up the the devices and popping dialogs asking you if you want to mount the device (you should select ‘Cancel’ for them all).Wait about 5 seconds for it to steady itself and then run ‘connectme’ from the command line. You should see

Hladam HUAWEI E220 a prepnem na modem - bbo 06
4 set feature request returned 0
Prepnute-OK, Mas ttyUSB0 ttyUSB1 (cez usbserial vendor=0x12d1 product=0x1003)
pozri /proc/bus/usb/devices
WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATQ0 V1 E1 S0=0 &C1 &D2
WvDial Modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2
WvDial Modem<*1>: OK
WvDial<*1>: Modem initialized.
WvDial<*1>: Sending: ATDT*99#
WvDial<*1>: Waiting for carrier.
WvDial Modem<*1>: ATDT*99#
WvDial Modem<*1>: CONNECT
WvDial<*1>: Carrier detected.  Starting PPP immediately.
WvDial: Starting pppd at Tue Mar 25 21:22:08 2008
WvDial: Pid of pppd: 11465
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: Using interface ppp0
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: local  IP address 62.40.58.185
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: remote IP address 10.64.64.64
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: primary   DNS address 62.40.32.33
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: secondary DNS address 62.40.32.34
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]

If you want to disconnect from the web simply press Ctrl-C twice to kill it off. The first time you press it, it talks of wanting to exit gracefully – but better to press it a second time and exit effectively ;-)

You’ll see the following

Caught signal 2:  Attempting to exit gracefully...
WvDial<*1>: Terminating on signal 15
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: Connect time 8.6 minutes.
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: pppd: H���h�[06][08]`�[06][08]
WvDial<*1>: Disconnecting at Tue Mar 25 21:30:45 2008

7.) Tip of the day – lose the Edge!
Disclaimer: this is just my opinion as to the performance of the Edge network so O2 lawyers keep your knickers on (however Apple iPhone suckers, enjoy the sheer speed of the Edge network, getting dripfeed broadband at 1500 Euros a year!). In stark contrast though, my experience with the HSDPA network have been good. Yes, as you may have already guessed, the Edge network was not really delivering for me. But a friend of mine showed me how to change your O2 broadband Express card (or USB modem) settings so that it not even bother connecting if it can’t get a proper UTMS or HSDPA signal. For this you need a Windows friend. Install the express card on their machine and from the O2 broadband application and select “Tools->Choose Network Type->3G Only”. This setting directly updates the card so even when you switch back to a using it on a Linux box it will go with 3G only. If I don’t do this I’ve found that it will flip flop between Edge (GPRS) and 3G networks and drive you mad in the process. I found it pretty much impossible to even check my email on Edge.

Special thanks to Andy and Paul on the ILUG mailing lists for their help and also to O2, Vodaphone, Three et al. for providing Mobile Internet via hardware that can actually be used on an Open Source platform such as Linux; as we hopefully move from an era of proprietary lock-in and DRM-based crippleware to software that delivers genuine value for businesses and users. Vodafone have gone as far as having their own Open Source website to help along development at Betavine. Enjoy!

The revolution will not be televised! It will be streamed over TCP/IP…

K-k-kubuntu 7.10 on a Dell Inspiron 1520

Thursday, November 22nd, 2007

Ahhh… Another day, another distro. The harddrive partitions around here are a bit like the Wizard of Oz; every day a new one joins the merry troupe. Todays turn was the KDE spin on Ubuntu Gutsy. So armed with the standard Kubuntu CD, which serves as a live distro and an install CD in one, we set on the path to enlightment (or should that be KDE – always good to end the week on a bad pun).

Generally, it seems to be recommended practice these days to install Ubunutu or its derivates off the ‘alternate’ CD when trying to set up an Inspiron to avoid things like incompatible versions of ALSA or wireless drivers working their way into the install. But the Penguin didn’t really feel like giving the whole GUI experience a miss. And so the live CD was fired up before you could say ‘Holy wireless drivers, Batman!’. A nice desktop link provided a pretty path to installation and within an hour Kubuntu was installed and ready to go.

First thing that was apparent was that the default Kubuntu appearance is quite bland. Especially when compared with something like OpenSuse’s nice crisp out-of-the-box KDE look (however nothing will ever get installed waiting around for YAST!). But the good news is that Kubuntu’s eye-candy vacuum can be fixed with a bit of tweaking. That wasn’t the initial major concern though. The lack of sound and wireless was!

The fix for the sound was easy, running ’sudo apt-get install linux-backports-modules-generic’ from the command line delivered sound after a reboot. The wireless was a lot more fiddly to get working – the strange thing is that NetworkManager was picking up all the secured networks and tantilisingly displaying them in its wireless list. But no way in the world was it going to connect to any of them. (BTW, the card is a Intel Pro Wireless 3945). However, the laptop in question is also running Ubuntu Studio out of another partition and it can connect through Gnome’s network-admin program without any probs. So there was definitely something fishy up.

Plan A at solving the problem was to install wlassistant (sudo apt-get install wlassistant) in order to try and put a different network program in the firing line. But alas still no connection. Then after a bit of head scratching we decided to install the whole bloody Gnome network admin and try and use that (sudo apt-get install gnome-system-tools) – which can be run via the ‘network-admin’ command. There was a time there when this was looking like a winning plan but no joy. Weird thing is, and the Irish Penguin has no explaination for this, is that rebooting and connecting via wlassistant did the job! Worked a charm! A lucky charm!!!

Final things on the list was to glam up that gaudy GUI. The install of Gnome’s networking stuff had left a few stray icons in the menu so they had to be wisked away as they weren’t working anyway. Then a few nice things to do are

* Right-click on the quicklauncher at left of the taskbar and configure it to have a fine big icon size – 28 looked good on the Inspiron. Big icons always look nice in KDE’s taskbar, otherwise where’s the fun?

* One of the best ways to brighten up the panel is to (right-click on the taskbar and configure) set ‘Enable background image’ for the panel and select a nice tile. This also puts a pretty sash down the left of the K-menu. Optionally choose ‘Colorize to match desktop theme’

* In the system settings keep the Style->Widget Style as ‘Polyster’ but change the Window Decoration to ‘Keramik’

* Change the window background to be a nice soft colour – a very light fawn is nice – and in keeping with the Ubuntu theme…

* And for God’s sake pic a nice desktop background!

Along the way, we flicked over to the proprietary NVidia drivers via the restricted driver management without problems. Although it did make all the fonts bigger for some reason – so they had to be tamed again using the following fix (note: changing font properties in System Settings isn’t enough to fix this). I used a dpi of 75 instead of 100 as the fix did. Another thing that was hard to track down was power management adjustment there’s no setting in System Settings – rather it can be found by right-clicking on the battery icon to the right of the task bar and selecting ‘Restore’ to bring up the dialog – of course!

So what’s the verdict after all the hard work is out of the way. Kubuntu is a fine desktop if you’re prepared to put in a little effort customising its look and feel. Because of the effort required in prettying it up – Kubuntu initially feels less polished than it’s sister Ubuntu. Package management in Adept isn’t as smooth as Synaptic. But there are some real pluses out of the K stable. Dolphin has replaced Konqueror as the default file browser and its two pane mode is great. Not quite sure why its taken so long for a two pane file manager to crop up in a modern OS but it’s not before time. All the usual great KDE apps from K3B to Amarok are in there. The Penguin’s final verdict is that it feels a little more ‘bright’ and ‘fun’ than Ubuntu which is more ‘finished’ but serious.

The Quick European Fox Jumps Over the Lazy Dog

Wednesday, September 19th, 2007

Breaking with the blogging tradition of incredibly obvious (and search engine indexable) article titles, I think it’s fitting to have a subtle, more European perhaps, heading for this post. To cut to the chase, it deals with the great transatlantic dog fight between possibly the world’s biggest monopoly and the Eurocrats – that is Microsoft vs European Competition Commission.

This has caused great entertainment for those browsing the net as, for some, this has broken down into a full scale Europe vs America battle. The ruling is Microsoft’s first court loss of significance that stands to have genuine legal ramifications as most other similar cases have been settled out of court by deep pockets and hamstrung prosecutions. Although it’s always hard to pick the legal meat off the bones in a lot of software related court cases, other articles have mentioned that the ruling means limited scope for MS to appeal, possible requirement of protocols disclosure and of course the small matter of hundreds of millions of dollars in fines. Small change to a big fish perhaps but no one likes to throw away money.

Those who support the decision are proudly strutting the streets with their vin rouge in one hand and their petit pain in the other singing “Vive la Revolution” as they go. Some have changed to spelling color with a ‘u’ and prefer to organise their day than organize it. Those against, see the fleeting head of communism attacking capitalism’s finest hour. Cries of “Red! Reds! Under the beds” can be heard from those who shun the European Courts ruling. Particularly entertaining is the comments at the end of the article Microsoft’s Stunning Court Defeat. I don’t normally mange to keep chugging through the comments but I did find this little flame quite amusing.

So what does the future legal direction of this case hold? Well that’s anyone’s guess, but the interesting thing that FFII correctly pointed out in one of their recent press releases is that patents are where the battle is at. Whatever respect Europe can garner by being the first one to call a spade a spade – or an illegal monopoly an illegal monopoly – will be soon squandered if software patents are allowed in the back door. How anyone could be stupid enough to repeatedly bring software patents to the brink of legality in Europe is amazing. But that is what’s happened time and time again. Software lifecycles are measured in months (not decades like in big pharma) and innovation has always occurred by building on the ideas of others. But yet there are those who are scared that taking a stance against software patents means being anti-intellectual property – when the reverse is the case. Let’s hope that the next time software patents are on the European menu, that there will be enough intelligent people in the room to call the spade again.


Digg!