Lock screen when I close the laptop lid

I’m quite sure that Ubuntu 7.0.4 (Feisty Fawn) with GNOME 2.18 locked my screen when I closed the lid of my laptop. Ubuntu 7.10 (Gutsy Gibbon) with GNOME with 2.20 did not until I made this change under the hood. The XML below can be imported with gconftool --load.

  <entrylist base="/apps/gnome-power-manager/lock">

I want to read “Peopleware” again

Bruce Eckel recommends Peopleware — Productive Projects and Teams (by Tom DeMarco and Timothy Lister) in his recent weblog entry The Mythical 5%. When I ordered a bunch of book recently I was thinking of including both The Mythical Man-Month by Frederick Brooks and Peopleware, but I didn’t. It is probably a good idea to read both of them again as I haven’t read them for five years or so and I’m trying to be one of those 5% mentioned by Bruce Eckel…

I have plenty to read anyway though, and yesterday I spent some time on my latest project. I want to use Rails 2.0 but I keep Googling and reading pages like Rails 2 Upgrade Notes a lot when things don’t work exactly as they did in previous versions. A complicating issue is that the web interface for my project will be in Swedish so I will give my controllers Swedish names, but I want English names in the database so it will either be a kind of mix under the hood or I’ll use set_table_name in the models. I hope that Swedish Rails can help me out a bit!

Holiday project!

The day before yesterday I registered a domain name for a new project and yesterday (while recovering from a really upset stomach) I wrote three A5 pages with a database model, sketchy requirements and possible features. All from very basic ones (“It shall be possible to register a new user account”) to some that are way into the future (“A user can customize font and color”). Maybe five of those requirements will make the cut for a first version of the site…

I’ve promised myself to write the project in Ruby on Rails (not a PHP hack like folkmun.se) and do my best to use TDD or maybe even BDD. If I go for BDD there’s an RSpec plugin for Ruby on Rails and I’ve found some interesting reading, for example Developing a Rails model using BDD and RSpec, Part 1.

So, will it fly? Evan Williams lists a number of questions for evaluation of product ideas:

  • Tractability: How difficult will it be to launch a worthwhile version 1.0?
  • Obviousness: Is it clear why people should use it?
  • Deepness: How much value can you ultimately deliver?
  • Wideness: How many people may ultimately use it?
  • Discoverability: How will people learn about your product?
  • Monetizability: How hard will it be to extract the money?
  • Personally Compelling: Do you really want it to exist in the world?

I read that ThoughtWorks is looking at Sweden

If I wasn’t content about living in my corner of Sweden, I would have knocked on ThoughtWorks door a long time ago. I consider them to be one of the most interesting companies around and some people I admire work there, most notably Martin Fowler and Dan North. Today I read in Ola Bini’s blog that ThoughtWorks is looking at Sweden. He writes:

So what are we doing for exploration? Well, of course we have started to look into business opportunities and possible clients. We are looking at partnerships and collaboration. We are looking at potential recruits.

I must say that a collaboration between my employer Softhouse and ThoughtWorks would be really neat!

Ant “replace” task does not preserve Unix file permissions

This is probably a well-known fact for everyone who has used Ant on Unix for a while, but an annoying discovery for me who have been hiding under a C++ rock. The five year old bug report File Permissions not preserved in replace task pretty much says it all: Java couldn’t stat files, and it seems like it still can’t.

Update The “replace” task destroys file ownership too, of course.

Beautiful Code

I’ve been reading Beautiful Code from time to time during the autumn. It’s mixed bag and I actually skipped some chapter that was too deep into maths for my taste. Chapter 22: A Spoonful of Sewage was an instant favorite; it is a a fascinating head-first dive into a bug hunt in Sun Solaris’ synchronization primitives. It was a bit over my head but interesting nevertheless. Another very interesting chapter was Chapter 23: Distributed Programming with MapReduce about Google’s “programming system for large-scale data processing problems”.

Only because of the title of this blog, I’d like to mention that more than one chapter mentions the Divide and Conquer approach used by the Quick Sort algorithm, including using a subtle bug found in early (or naive) C, C++ and Java implementations to show off JUnit.

I’ve thought of sorting the chapters by programming languages and see what language the most author used for his or her beautiful code. At least Lisp, Python, Perl, Ruby, Java, C# and C++ are present. Some day I want to do a bit of Lisp programming, but I haven’t found a suitable project yet. Maybe I should buy a Lisp book too first…

Where is my own Beautiful Code then? If “get the job done” is considered beautiful, it could be the PHP code for any of my web sites! 🙂 I’m pretty happy about the architecture for my unfinished MidaSync project; maybe I should try to describe it here some day.

For MidaSync I also wrote a D-BUS wrapper for C++ that I’m quite proud of, but at some point it became a bit “magic”. For example it relies on the presence of a partial specialization to create a D-BUS path from an object exposed through D-BUS. I’ve never released this properly and I think that the D-BUS wrapper in OpenWengo is used by today’s C++ developers in need of D-BUS support.

Old and new Ruby and Agile books

A bunch of computer books I had ordered arrived to the office last week. Since I’m working on-site at my client I’m not at the office very often so didn’t pick them up until today. The books are:

  • Agile Software Development With Scrum by Mike A. Beedle and Ken Schwaber
  • Agile Web Development With Rails (2nd ed.) by Dave Thomas, David Heinemeier and Leon Breedt
  • Everyday Scripting With Ruby by Brian Marick
  • Programming Ruby (2nd ed.) by Dave Thomas, Chad Fowler and Andy Hunt
  • User Stories Applied by Mike Cohn

Unfortunately two of them are already old. A version of Programming Ruby updated for Ruby 1.9 now exists in PDF format and Agile Web Development With Rails will most likely be updated due to the recent 2.0 release of Ruby on Rails. Maybe Everyday Scripting With Ruby will be updated too soon, but I hope that all of them will still be of use to me. I only use Ruby and Ruby on Rails for my personal projects anyway, but I think that both of them — the language and the framework — make too much impact to be ignored.

Speaking of Ruby on Rails: I read that Hemnet, the major Swedish site for real estate ads, is using Ruby on Rails. Cool!

I bought Agile Software Development With Scrum in order to read one of the major works about Scrum. I really ought to have read it before by Scrum Master certification but I can admit I didn’t. Now it’s time to make up for that.

The reason for buying User Stories Applied is that I want to improve my skills in handling customer requirements. My current client is very fond of use cases but I don’t think that diminishes the value of the book in any way.