Percidae

For the last few weeks I have been looking for a job as a programmer. One of the jobs that interests me involves writing VB.net. Many of my friends who are also programmers have howled with anguish at the mere mention of this technology.

In order to get a better idea of how the language works, I’ve written a small program for editing the PATH environment variable on Windows machines:

http://code.google.com/p/percidae/

I find myself editing this variable on various Windows machines pretty regularly. Every time, I also am annoyed by the small text box in the dialog in the Control Panel.

So far I’ve enjoyed the experience of writing with Visual Basic and can’t see what all the fuss is about. Having written PHP for years, I’m used to ignoring the comments of language purists. I’m much more interested in getting something working than any imagined superiority of different languages.

How not to fight global warming

http://www.guardian.co.uk/technology/2009/may/03/internet-carbon-footprint

Above is a link to an article on the carbon footprint of the internet. In the comments, we can find the normal luddite opinions. If only people didn’t like the modern world, we could live in pre-industrial simplicity.

It seems embarrassingly obvious to me that if we have any hope of survival, it is in moving forward, rather than backwards. If we think that we can solve the world’s environmental problems by rejecting technology, then we’re sunk. Do the troglodyte commenters on the Guardian really think that the world is going to be able to implement the sort of engineering projects that are going to be necessary for a revolution in the world’s energy industry without the internet? How do they imagine engineers study and design things like solar panels, wind turbines or smart electricity grids? Using pencils, recycled paper and 30 year old text books?

The One Thing Needful

The weather has been very nice here in Guri today. I’ve just read two articles predicting that this summer will be good for barbecues in Britain.

http://www.timesonline.co.uk/tol/news/weather/article6201364.ece
http://www.guardian.co.uk/uk/2009/apr/30/warm-summer-uk-forecast

The Met Office apparently predicted the same thing last year and got it completely wrong. My guess is that they will be wrong again this year. My thinking is not really very scientific, just a willful and immature contrariness coupled with a lifetime of disappointing summers in England.

The sun is at the bottom of its sunspot cycle as well:

http://www.swpc.noaa.gov/SolarCycle/

Noticing correlations between seemingly unrelated data has always been a rich source of new knowledge. I understand that correlation is not causation, but the reverse does appear to be true. If the expected outcome of a hypothesis does not coincide with the recorded data, then the hypothesis should not be trusted or a least questioned thoroughly.

I watched a lecture last night on Wolfram|Alpha

I imagine that when this goes live, there will be a lot of bloggers who use the data to show relationships that are very questionable. The old line about statistics being used like a drunkard uses a lamp post, for support rather than illumination, will no doubt apply. I am interested to see what all the amateur climatologists who have sprung up since climate change has obsessed the world will come up with. Like everything in life, more than 99% of it will be banal and worthless. It’s the rest that’s intesting. Luckily, the internet provides incredible filters for sorting through enormous amounts of information for finding the most interesting things to think about.

One of the problems that I can see with W|A is that it is closed and proprietary, although users will be able to access the data for free. The company may be able to run profitably. The search engines have done well being run this way. As far as I know, this is a new sort of service that has not been tried before. I hope that the likes of Google, Yahoo! and Microsoft try to build rivals to this quickly.

I hope that the diverse open source communities of the world try to come up with something to compete with it. At this stage, it is clear that a lot of human intervention is needed to get the data into the system. Wikipedia has shown that this is something that people are willing to give up their free time to do. Providing the vast computing resources for an open source version of this project is also a hurdle. I would certainly consider giving up some of my computer’s spare cycles for a distributed and open source version of this came along, and I am sure that I would not be alone. However, the popularity of Google compared to, for example, Yacy shows how difficult it is for these sorts of things to be fully open.

Another development that I hope that W|A brings about is to force universities and other publicly funded research institutions to do more to make all of their experimental data available in machine readable formats. A single open source project that can absorb all of the scientific, engineering, technical, sociological, economic and financial data in the world might not come about, but lots of smaller projects that each try to solve part of the problem might. No doubt, such projects would take pains to cooperate with the other projects.

What developments occur in the next few years in this field are the subjects of anyone’s guesses. As Dickens pointed out in Hard Times,

http://www.19thnovels.com/hardtimes.php

facts alone do not make a person educated or complete. However, I imagine that everyone being able to ask lots of little questions involving data and relationship between them will have a similar impact to that of Google and Wikipedia. In the past, if we wondered to ourselves “What is the name of the Aztec sun god?” we might not have bothered to go to a public library or even take an encyclopedia of the shelf to find out. Now, we are much more likely to find out about

http://en.wikipedia.org/wiki/Tonatiuh

because it takes such a short amount of time with our modern tools.

MySQL Connections Plug-in for Haddock CMS Projects

I’ve extracted some of the code for connecting to MySQL databases from the database module and put it in its own plug-in:

http://haddock-cms.googlecode.com/svn/plug-ins/mysql-connections/trunk/

I’ve not changed the code very much (just renamed a few items). There are not very many additions that I want to make to this plug-in. The intention is just to refine what is there and add some automated tests.

This little plug-in should make writing Haddock CMS programs that use a MySQL database simpler. Especially for projects that run solely on the command line.

I’ve not removed anything from the old database plug-in, so do not think that you need to add this plug-in to existing projects.

Resurrecting Coelacanth

I registered a project on Google Code months ago called Coelacanth. I’ve had a few different ideas about what my intentions were for the project but I’ve decided to use the name for a secure password management system.

To get the ball rolling, I’ve put up a very simple random password generator. This can be downloaded from:

http://code.google.com/p/coelacanth/downloads/list

This is my first C# program, so be kind.

I’ve written this using Microsoft Visual C# Express Edition 2008, so if you have that program installed, checking out the trunk and double clicking the Coelacanth.sln file should give you access to the source. If you want to study, compile, test, develop or extend the code in a different environment, please tell me about your experiences.

This is a very open ended project for me with no pressing time-frame. The program exists to help me with a specific problem.

I’ve only tested the program on Windows XP Pro with the Microsoft .NET Framework 3.5 SP1 installed. If you want the program to run on a different platform (e.g. on Mono on Linux), but this release does not work, please submit an issue on the Google Code site.

One area where I would like to extend this project would be to do with saving the passwords in some sort of secure data store. For example, in a file in an encrypted file system. I’m not terribly interesting in this store having any sophisticated access control. I only intend Coelacanth to be a single user system. It’s hard to see what value any other sort of system could be in this domain. So saving the file in an encrypted file system and assuming that anyone who can access that file system can access any password in the file is fine by me.

Another area that the project could be extended would be to give the user some sort of warning about how long a password has been in use. If a password is given an expiry date, then after that date the user should be alerted to update the password.

I was quickly reminded as I was putting this simple application together that once an idea is transferred to source code, it takes on a life of its own. Limitations become apparent and extensions become attractive. A Google Code project for a program as limited as this might seem like overkill, but hacking a little app, posting it on my blog, and then forgetting about it, did not seem to do it justice either.

Large Amounts of Personal Data in Excel Files

Another week, another catastrophic personal data leak story (this time, one that’s not from the UK):

http://www.koreatimes.co.kr/www/news/biz/2008/09/123_30635.html

What I always find surprising about these stories is that people are using spreadsheets to handle datasets with millions of records in them.

I use Excel everyday at work and have done so, on and off, for years. If I’ve not been using Excel then it’s been OOo. Spreadsheets are ubiquitous, flexible and people seem to be able to work with them without a great deal of training.

But as a way of handling the data for 11 million people, how well do they perform compared to database systems?

Let’s assume that these big companies have professionally administered and expensive database systems that collect their millions of customers’ data. This data is probably fairly secure. Accessing it would involve sophisticated hacking (in the mainstream press sense of the word).

Non-technical employers of the company extract data for some or all of the customers as a spreadsheet and use the spreadsheet to do market research or what-have-you. Such a system’s security would be compromised if that employee were to accidentally or deliberately leave a CD or pendrive somewhere public. In terms of security, such a system is evidently not fit for purpose.

But how useful is it? As someone who’s spent a fair amount of my professional life working with script languages like PHP, Perl, Bash and what-not, I tend to see spreadsheets as a rough draft of a more automated system. Shouldn’t office employees be trained to write scripts in VBA or similar and not cobble stuff together with spreadsheets?

I am reminded of an epigram that the writer and engineer Nevil Shute used:

An engineer is a man who can make something for five bob that any bloody fool can make for a quid!

If you have a lot of employees, a Heath Robinson arrangement of spreadsheets is workable. A well trained programmer might be able to automate a lot of what they are doing.

It’s not that I want to be disrespectful to or underestimate the intelligence and learning of people who work with spreadsheets. My feeling is that companies would probably achieve significant gains in terms of productivity and improvements in security if scripting were seen as a core office skill.

How did Microsoft get Vista so wrong?

Before anyone accuses me of being a Linux bigot, I would like to say that I’ve been frustrated by Ubuntu lots of times. Wireless networks on laptops have always been a bit of a bugger and my latest install on a partition of my laptop has been no exception. Getting an EEE PC has shown me how good Linux on a laptop can be, if it’s set up right by the manufacturers. Ubuntu does quite a good job at this but it’s certainly not for the impatient. Dell, Samsung, anyone, please start selling more Ubuntu laptops with all that boring driver nonsense sorted out!

Working with Debian servers at the command-line has never been anything but an unalloyed pleasure. I have a extremely complicated set of tasks that I want to achieve and the stable version of Debian has always done them quickly and painlessly. Some stuff takes research. I’ve no idea how much of my career has been taken up with reading tutorials on the syntax of UNIX config files, probably more time than I’m going to get back. But once you know something and it works it works well. On servers (which, at a glance, are indistinguishable from their counterparts from the 1970s), the bottlenecks have always been my intellect, knowledge and imagination.

And then there’s Vista.

At first I thought that it was a brilliant. Good look, nice fonts, WinKey+Tab 3D funkiness and so on. But then you use it and before long you need a shot of whiskey just to calm your nerves.

If I access an FTP server (even on a cheap shared host) or SSH daemon, logging on and moving from directory to directory is quick. Most programs, including Nautilus out of the box on Ubuntu, allow you to store previous connections. XP used to remember the SMB shares that I had accessed. However, in Vista, every time I go to the network window in the start menu, the list has to be refreshed. Why? And does this takes so long? Does the computer ping the whole of 192.168.*.* or something?

Eventually, you get a list of computers on the LAN. You start to move about but just going from one folder to another can take up to a minute. Eventually you get to a folder that just locks up the computer for a few minutes, Explorer tells you that access is denied and restarts Explorer.

You get a link to

http://support.microsoft.com/?kbid=937097

which tells you that an error occurred and gives you information on how to load up the event viewer that also tells you that an error occurred. Great! I guess that I better contact my system administrator.

I had hoped that the Vista service pack would sort this sort of nonsense out but it hasn’t.

I’m loath to spend an evening hacking away at config files on the Ubuntu partition of my laptop just to get the sodding wifi adapter to work but anything’s gotta be better that the soul destruction that is using Vista all day everyday.

People talk about Cognitive Surplus:

http://jeremy.zawodny.com/blog/archives/010218.html

I guess that any system where the bottleneck isn’t your intellect, like Vista and Ubuntu some of the time, then the thoughts that should be going into your work end up getting clogged. Hence, the need for hard liquor…

Haddock CMS site redesign for narrow screens

As promised, I’ve rearranged the divs on the Haddock CMS site to work better on narrower screens.

I made all the edits to the code using Komodo Edit on an EEE PC. The only modification that I’ve made to the EEE PC is to use the full desktop and install Komodo.

Shelling in to my dev and production servers for SVN and to run the various Haddock CLI scripts is not really any different on the small machine. Komodo connects to the dev machine using SCP better on Xandros than it does on Vista (which isn’t hard). phpMyAdmin and cPanel are also fine on the small screen.

While I wouldn’t want to work like this all the time, my main objection is anatomical rather than to do with the performance of the machine. My neck is a little sore.

The only things that I need on the EEE PC at this point are Subversion and TrueCrypt. I’m sure that I can get them working soon enough. Other than that, I would only need the bigger machine for testing what the sites look like other browsers on a larger screen.

Love for my EEE PC

After one factory reset and a bit of an ache in my hand, I’ve grown fond of my new EEE PC.

I have to say that it’s making me rethink web design to some extent. Left navigation bars are hopeless and annoying on a seven inch screen. Perhaps I should shift them to the top of the page? I’ll try moving the DIVs around on

http://www.haddock-cms.com/

later today to see if it’s much of an improvement. Are sites going to new a stylesheet for iPhone, EEE PC, laptop and wide screen Media Center style machines? We’ll see…

Staring at this small screen and then looking at the 17 inch screen on my Samsung laptop is a bit like teleporting from England to America. Everything is recognisable and similar but noticeably bigger.