Skip to main content

Posts

Showing posts from January, 2007

How to change your default locale on Ubuntu Linux

One problem that has repeatedly cropped up when developing in Java is strange error messages in our unit tests for certain text manipulation tests when running on a freshly installed Ubuntu desktop. They are all related to Ubuntu's default British locale: en_GB.UTF-8 This was causing files checked out of CVS to be in Unicode ( UTF-8 ) format rather than ISO-8859-1 and so the British pound sign (£) was being encoded as a double-byte (rather than single-byte) character in the file. To check which locale you currently have as your default just run: locale Changing the default locale is a little different on Ubuntu compared to most Linux distros, these are the steps we needed to go through to get it changed: Add the locale to the list of 'supported locales' Edit /var/lib/locales/supported.d/local and add the following line: en_GB ISO-8859-1 Regenerate the supported locales Run sudo dpkg-reconfigure locales Change the default locale Edit /etc/environment and ensure the LANG

January's AgileNorth - Theory of Constraints (TOC)

The first AgileNorth of the new year was kicked off by an active session on the “Theory of Constraints” run by Kevin Rutherford and David Draper . It was a re-run of a session from the Agile North conference - I'm not a Bottleneck, I'm a free man! The Theory of Constraints (TOC) is a management philosophy that aims to continually achieve more of the goal of a system. Every system or process must have at least one constraint, which prevents the system from achieving a better result relative to it's goal. In order to increase the performance, these constraints must be identified and removed one by one. There is a five-stage process to go through to follow TOC once you have clearly identify what the goal of the process is, e.g. better quality, more widgets, less wastage: Constraint Find the largest constraint that is holding you back from achieving that goal. Note: you are not trying to fix any and all problems or possible optimisations that you find, just the largest key b

Problems with shell (sh) scripts on Ubuntu Edgy Eft? Find the fix here!

I use Ubuntu at work and recently upgrade from 6.0.6 (Dapper Drake) to 6.10 (Edgy Eft) . Today I found a problem with an SQL tool that we use - Oracle's SQLDeveloper. It runs from a shell script and was failing with a very strange error (it couldn't find a config file). After some head scratching and searching on the web I found the reason why : Previous versions of Ubuntu (and probably most distributions of Linux) map sh to bash . Bash has more features and many scripts are written with Bash in mind. Ubuntu 6.10 has changed this so that sh now uses dash - a faster-than-bash alternative that only supports what the original sh did. There is even an outstanding Ubuntu bug regarding this. This was the reason why my script was failing - it was assuming a bash shell even though it mentioned #!/bin/sh at the top of the script, and dash just doesn't have bash's features. The fix was simple: In the /bin directory sh is linked to dash so you just need to update the