Saturday, October 22, 2005

Daily devotions - getting started

I spent today getting started on my Daily Devotions software project, that I mentioned in my previous post. So much trial and error was involved for a PHP novice like me I decided to document it here.

The first thing I decided was I would try and procede in an XP (eXtreme Programming) style way. This involves many things, including writing stories on cards for what you want the software to do, and then proceeding forward in very small steps. This is ideal for a project like this I'm doing in my spare time. Unfortunately, some of the other practices like pair programming I will not be able to do as an individual, but we will see how it goes.

The first story I started with was "show a web page with the correct 'Through the bible' reading for that day on it". So the first thing I needed was some webhosting. I found "Perfect Free Web Hosting" (PFWH) which offes free MySQL and PHP as well as webhosting. Another option was MyJavaServer which offers free Java as Hypersonic SQL. I decided to go with PFWH as:
  • it gave me an opportunity to learn PHP
  • it meant I was likely to resist the temptation to make things too complicated starting in Java
  • it was likely to be able to move the site to somewhere else fairly easily, as lots of people offer PHP and MySQL, including BlackCat, who I use to host this site
  • I thought I was going to need a database to store the lists of readings. I could have used a flat file, but I've learnt its usually better in the end to start with a database, you always want one ventually. And I couldn't find a flat file database that worked easily with PHP and Java, if I wanted to change languages in the future. If I use MySQL then I can swap to another language very easily.

So having done this, the first step in XP is always to write a testcase. Now, I normally develop in Java where I am spoilt having IntelliJ IDEA, the best IDE I've ever come across for any language, with fantastic JUnit integration. I wanted something as similar as possible for PHP.

I spent all of today searching and to save you the effort, here is the configuration I ended up with. It turns out that if you are paying for an IDE for PHP then Zend Studio seems like the only choice, but I'm a cheapskate, so couldn't go for that. After much trial and error I finished up with PHP-Eclipse, with a local copy of Apache and MySQL for development, before deployment to PFWH. I installed Apache, PHP and MySQL through XAMPP. This took quite a few tries to get it right. I'm sure there are lot's of other solutions to get a free PHP IDE with PHPUnit etc, but I recommend following these instructions exactly.

Make sure you follow just that page. Even following the other instructions on the PHP-Eclipse Wiki it is possible to get in a mess, with editing files etc. Use the page linked to above. That's why I haven't added any other links, as that page has all you need to get set up on it. And now I have an IDE which will create PHP that connects to a local MySQL and Apache, within the IDE.

It also gives me the benefit of gaining familiarity with Eclipse, which is something I've been meaning to do.

Ideas Factory: Daily Devotions

Well, after an initial burst of enthusiasm, my blog petered out like so many others. My excuse for this is I just had my final exam for my Open University degree in psychology. This has meant my spare time has been spent revising or feeling guilty about not revising. But now that's out of the way here's an idea which I've been meaning to post about for ages.

Daily Devotions

As a Christian I think it is good to spend part of each day in prayer and reading God's word - the Bible. This is not what gets you to heaven, only accepting Jesus as your Lord and Savoiur can do that. Christianity is all about having a relationship with God, and part of having a relationship is communicating. Prayer lets us talk to God, and reading the Bible lets God talk to us.

Anyone who has tried to be dedicated in these two activities will know how hard it can be. If you are not a Christian, it can be similar to revising for an exam. You want to to do it, you know it is important, but unless you get into good habits it is possible for a million and one other things to distract you.

Part of my day job is writing software tools which make the lives of me and my colleagues easier. This means my brain is trained to think in statements like "How can I automate that?" or "How can I get a computer to help me overcome my mistakes in that?". Automation of prayer has been tried by other religions, but I do not believe in it. However, a tool to help in the discipline of daily reading the bible and prayer has been something I've looked for and haven't found.

It would be nice if this tool had features similar to several other programs:
  • A Calendar/Diary program, so it would help you overcome apathy by giving you a reminder (maybe by email)
  • A collaborative information tool like a Wiki, so things like a Church prayer diary could be shared
  • A database of resources, so for example you could automatically get the M' Cheyne reading each day
  • An educational software tool, maybe testing you on memorisation of bible verses
  • A statistical/bug tracking/Business Intelligence tool so for accountability you could keep track of how you were doing

There are several general tools which will do this job, for example, with a bit of hacking I'm sure you could get Lotus Notes to do a lot of it. But by creating a specific tool you could make it very easy to use for this one particular job, and that would mean people are more likely to use it.

I haven't managed to find anything which does this yet. I think this idea from the ideas factory I will start to do myself.

Wednesday, August 31, 2005

An Incentive to Lie

If there is one thing I really hate it is when a company creates a situation where lying to them makes everyones life easier, and hurts no one.

As a Christian, I try not to lie, even with "white lies", mostly because of these passages in the Bible: Matthew 5:37, James 5:12, and various false witness verses. So as someone who tries to live honestly, it is very annoying when my life would be so much easier if I lied, for no good reason. I've come across two examples recently, but they seem to happen fairly regularly to me, so I'm sure I'll notice more.

The first is the fault of the DVLA (Driver and Vehicle Licensing Agency). In England we have two parts to our driving licenses, a plastic credit card sized identity part, and a paper record part. This is a fairly silly design to start with, but let us ignore that for now. I recently lost (or had stolen) my wallet and in my wallet was the plastic part of the drivers license. I keep it there because it is a useful photographic ID with proof of age. I do not carry the paper part about because it is more bulky.

It is a legal requirement to be able to produce your driving license, so I need to get a replacement. Now according to their website, if I had lost, or had stolen both parts I could just call up, pay the fee on my credit card, and get a replacement sent to me. But because I have only lost one part, I have to fill in a form, and post off the paper part back to them. So it is in my interest to lie and say I've lost both bits which saves me some hassle and doesn't hurt them. But if I'm honest my life is made harder for no good reason.

A second example was similar from First trains. My train season ticket wore out - it stopped working in the barriers at the station. If I was dishonest I could ring up, say it had been stolen, and get a replacement sent to me. But if I was honest I had to post them the ticket, wait for them to post me a replacement. While waiting I had to pay for daily tickets with my own money, save the receipts, and then post them all off to get a refund. A lot of work, for no real benefit, as if I wanted to cheat them, I could just lie and say it was stolen.

Companies shouldn't be encouraging people to be dishonest to them.

Monday, August 22, 2005

Being User-Focused: More examples

Royal Mail's feedback options just provide more examples of them not being user focused, but Abel & Cole get it right.

On Friday I was ranting a bit about how the redelivery service for Royal Mail's recorded delivery demonstrated a lack of user focus. I decided to try and be helpful, and send a copy of my comments to the Royal Mail. That is when I discovered the horror that is trying to give online feedback to the Royal Mail.

Before I start criticising, let me add some mitigating comments. The number one priority for the Royal Mail has to be getting as many deliveries as possible to arrive, safely, and on time. Any other customer service issues will always be secondary to that, and if all of their energy is currently devoted to sorting out delivery problems then that is entirely reasonable.

However, suppose you are a customer, who, like me, wanted to make a suggestion on improving their redelivery options, or make some other suggestion about Royal Mail service. So much about the process is horrible I cannot describe it, you have to experience it for yourself. The only reason I can think of is that they are trying to persuade you that writing letters is better than email! But in summary:
  • There is no contact email address
  • You can only give feedback on the website, not on anything else
  • You have to log in before giving feedback!
  • Before giving feedback, you don't merely relinquish any intellectual property claims to the idea, you assign all intellectual property to the royal mail
  • Feedback is limited to 255 characters at a time
  • You are limited in the number of pieces of feedback you can give, and you have to work through a horrible, slow customer service wizard
  • As part of the process you are shown everyone else's rude comments about Royal Mail
The process is so bad it is almost funny. It leaves Royal Mail's customer service department looking like a shambles. Feedback should be sought out, not made as hard as possible to get.

Abel & Cole

In contrast, Abel & Cole are incredibly user focused, and as a result I have recommended them to a huge number of my friends, and I recommend them to you all. They deliver boxes of organic fruit and vegetables, either irregularly or regularly. I have no interest in Abel & Cole besides being a satisfied customer.

I cannot list all the things they do well, as there are probably many I have not discovered. However, a few highlights are:
  • You can contact them by email, telephone, fax or letter, with clearly presented addresses on a contact page. They explain clearly when the office is open, and what you can do if it is not
  • When you set up your account, not only do you give a delivery address, there is space for extra directions for the delivery man, and instructions on where to leave deliveries if you are out
  • When my wallet was stolen, I let them know, and they responded promptly, by telephone, to my daytime number as it was daytime, and said they were happy to delay the charge and keep delivering until I could register my new card with them.
  • They will deliver weekly, monthly, biweekly, or on irregular intervals or one-off orders
  • They provide recipes and descriptions for items you might not know what to do with
  • They allow you to list items as disliked, and they will never deliver them to you again

Each of these clearly solves a specific problem that someone has had or could have had in a nice way that it easy for the user. As a result, it is easy for me to spend money with them regularly every week, and so I do, and we are both happy.

Friday, August 19, 2005

Not User-focused: An Example from the Royal Mail

What happens when you are not at home for a delivery provides a good non-programming example about what it means not to be user focused.

One day soon I'll write and article on being user-focused, which is something that a few programmers and software companies do really well, and as a result they do well, and a lot of programmers do badly. However, this week I came across a really good non-programming example which I thought I'd share.

There are three classic symptoms of not being user focused:
  1. It is possible to get the job done.
  2. The way that would make it simplest for the user to get the job done does not happen, and often the user is made to feel stupid or awkward for wanting it done this way.
  3. The job is done in a manner which seems most convenient for the people doing the job.

I think this story illustrates all three.

The other day I ordered a firewire card for my laptop, as the built in one has died. Normally I get parcels delivered to work, but the udiggit would only deliver to the credit card address, so I had to get it sent to my home. Unfortunately, they sent it Royal Mail Recorded Delivery.

A brief aside for those of you not in the UK. The Royal Mail are the UK's postal service. Recorded Delivery means it normally arrives within 24 hours and has to be signed for. And this is where the problems start.

I am usually at work during weekdays, so I am not at home to sign for items. When the Royal Mail make an attempt to deliver a recorded delivery item the delivery does not happen. The item is taken back to the sorting office, and they will keep it for 1 week. A note is left with four options for how to get the item.

  1. Go to the sorting office itself and collect it during the sorting office opening hours.
  2. Get the letter redelivered to your home address.
  3. Get the letter sent to another local address for free.
  4. Get it sent to a local post office for you to collect.

This seems very reasonable at first glance but it completely fails to meet user needs. I would guess that most failed deliveries happen because the person and their cohabitants are all out at school or work during the day when the attempted delivery happens.

  • If you have a normal fulltime job getting it redelivered to your house (option 2) is no good as there is no guarantee on delivery time.
  • If you do not work in the local area, option 3 is no good, where are you supposed to get it delivered?
  • The local post office opening hours are basically office hours, so option 4 does not help.
  • The sorting office opening hours are weekdays 9am until 5.30pm, and Saturday 8 until 12. That information is from memory, because in another example of not being very user-friendly, I cannot find it using their website or google. So for the typical person who fails to have something delivered, they are left with a four hour window on Saturday or the delivery fails.

A user focused approach would think "Why has this not been delivered?" Then realise the answer was because the person was usually busy during the day. And then maybe offer some of the following options as well as or instead of the ones above:

  1. An evening redelivery to a local address or your address.
  2. One or two days a week, open the sorting office counter from 1pm-9pm. No extra staff time is required, in fact it might offer some staff a choice of working hours they would value.
  3. Allow an option to pay to redeliver to a non-local address.
  4. Allow a letter to be sent to the sorting office to authorise a non-signed delivery, with the signature on the letter counting as the signature.

So the three symptoms were met:

  1. It was possible for me to get the item
  2. It was not easy or convenient for me
  3. It was made very easy and convenient for the post office
Interestingly, this isn't an example of not being customer focused. I was not directly the customer, udiggit were. I was a user. As such I have no monetary power to change things except indirectly, by not shopping with people who use special delivery, and insist on delivering to my home address. This is very similar to the software example, where the people choosing to buy the software, often the IT department, are different from the people who use it.

Code is for reading

Code is primarily written for programmers to read. Why don't people seem to realise that?

This is a rant I've wanted to have for a while, and have finally been pricked into it by a friend, Andrew Ketley making a comment about writing spreadsheets. He said:

The modern spreadsheet is no longer a simple tabulating and adding machine - it'a a highly sophisticated construction kit for certain classes of corporate applications, and needs to be approached as such....Hardcoded constants, obscure naming, spaghetti logic - it's all there.

Code is primarily written for programmers to read. Often that programmer is you - 5 seconds, 5 days, 5 weeks or 5 years later. Sometimes it is other programmers. If code was not written to be read, then we would all be happily writing in assembler, as the time to write assembler probably isn't that much slower that modern programming languages. What is slower is the time to test it, and modify it, whether those modifications are to add functionality, change functionality or remove bugs.

This is one reason why I don't like Perl, though many people love it. A motto of Perl is "There's more than one way to do it", and as a result people have a huge amount of freedom to develop different idioms in coding. And so reading the code is like understanding english spoken in lots of different accents. It might add to the richness of life, but it does not aid speed of understanding. A language with more constraints, like C, Java or C#, still allows personal style and idioms, but it tends to be much easier for one Java programmer just to pick up and read another's code.

However, in any programming language it is possible to write code that is hard to read, if you don't concentrate on readability. Readability is a very subtle thing, and something which is more readable for me might be less for you. It's analogous to spoken language again. If I am drunk, and mumble in a slurred voice everyone will find it harder to understand. However, with a southern English accent, another southerner might find me easier to understand than someone from Glasgow, whereas for someone from Glasgow it would be the other way around. Similarly, some code is just harder to read than other code. However, it is also true my colleague Jason might find my code easier to understand than Joel's, whereas one of the Aardvarks might find Joel's easier - neither is necessarily better, it is just more familiar.

So when you right code, you should try and make it more readable for everyone, and especially readable for the intended audience, for example, those on your project. This is one reason why coding standards are a good idea - which brace style to use does not matter, as long as everyone uses the same. This is one thing which heps cause the "Not Invented Here" syndrome.

So, I should get back to Andrew's point about spreadsheets. A spreadsheet is confusing because it presents two views to the world in one user interface. It presents a view to the user, who wants to use it to calculate something, and the programmer who wants to change how it does that calculation. And it can be good or bad at either. Normally the "user" user interface gets improved before the "developer" user interface, but I've written spreadsheets which were great to develop, but lousy to use. Normally the model-view-controller pattern will be helpful here for separating the two, but you could also use Smartspread, which provides a much better development environment, in my opinion, than Excel. But then I did write it, with Jason, so I'm biased.

There's lots more I want to rant about readable code, and I want to give some examples, but that can wait for another time.

Tuesday, August 16, 2005

Book Review: Better, Faster, Lighter Java

Better, Faster, Lighter Java
Bruce A. Tate & Justin Gehtland
ISBN 0596006764

A great book for someone else - about the worst thing you could say for a book.

The other week Vaughan Roberts, the rector of my church, was giving a sermon on the sermon on the mount. He was covering Matthew 7, where it talks about not judging:
Do not judge, or you too will be judged. For in the same way you judge others,
you will be judged, and with the measure you use, it will be measured to you.
Why do you look at the speck of sawdust in your brother's eye and pay no attention to the plank in your own eye? How can you say to your brother, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye? You hypocrite, first take the plank out of your own eye, and then you will see clearly to remove the speck from your brother's eye.

And he said that a very common reaction to this passage is to think "Well I know that, but I wish my friend Luke would read that"! (As far as I know, I don't have a friend called Luke.) Well on reading the Better, Faster, Lighter Java book, I had a very similar reaction.

It was full of good stuff, but things that I wish that my colleagues could read, rather than new ideas for me. Concepts like doing the simplest thing that could work, and not doing too much up front were prominent, which will be familiar to anyone who has tried XP. Now that makes it useful, because the authors explain concepts better than I probably would. Also it showed me that I am not alone in my opinion on certain programming topics. Also, if you didn't know about Hibernate (I did) or Spring (I didn't) it's worth reading, but now I've told you about them.

So I cannot give it a huge recommendation, as I cannot tell you much I learnt from it, it just made me feel self-righteous. I've lent it to one of my colleagues, and I await to hear what he thinks of it.

Three Level brands?

Something strange seems to be happening in the world of brand management.

We are all use to two level brands. That might not be the right term, but by that I mean names like "Microsoft Excel" or "Kellogg's Cornflakes". A company name followed by a product name. Apparently this has good legal reasons as a sensible thing to do (Joel's explanation - see "The Name"). But recently I've seen two three level brands emerge. They are things "Cadbury's Dairy Milk Caramel" and "Kellogg's All Bran Bran Flakes".

Until recently there used to be "Cadbury's Caramel" and "Cadbury's Dairy Milk" and "Cadbury's Fruit and Nut" but now they have all been renamed into "Cadbury's Dairy Milk X". Kellogg's have done a similar thing with All Bran, Bran Flakes, and Sultana Bran. I wonder why this was done. I could speculate, and probably will, but the best way of finding out has to be ask the companies involved, so I've done that using their online forms.

This article seems to suggest that it is because when launching new products, a brand extension is easier to get underway than an entirely new product.

Meanwhile, I'll keep my eye out for other examples.

Friday, August 12, 2005

Ideas Factory: Phone translator

Another idea for my personal effort at patent prevention - the phone translator.

I've been thinking of going to China on vacation. One thing that worries me is I don't speak the language at all. Hopefully a lot of things will be made easy by helpful Chinese people, good guidebooks and gestures, but some things remain scary. Two big problems are road signs and menus.

Now a bunch of technologies have become fairly solid and common in the last few years. These include OCR (optical character recognition), automatic translation, and mobile phones with Java and cameras. A great device would be something you could point at a sign or menu, and it would translate it for you into your language. A mobile phone seems like the ideal device to put this onto, as they often have a programmable computer, a camera, and a screen, and they are natural to take on holiday.

Obvious extensions would be to have something that would do audio translation, especially the other way, so I could type something in in english, and it would translate it and say it in chinese. That's probably too CPU and memory intensive for my mobile phone at the moment, but it should happen eventually.

There's nothing new under the sun! If you are willing to carry a laptop, something pretty good like this exists already: The PenPower Mini ScanEYE (note I haven't tried this but it looks cool). And even on the Wikipedia entry for mobile phones they suggest a translation function, but don't say whether they mean audio or text. They don't mention using the camera.

Wednesday, August 10, 2005

Route planning with Baby steps

I'm becoming more and more convinced that one of the most important skills for any programmer is route planning with baby steps, and I've never really seen anyone write about it.
I was first struck by this when seeing Kent Beck give an introduction to programming at XP2001, a conference about eXtreme Programming. He demonstrated writing some code to convert between an integer and the corresponding roman numerals using XP practices like writing test-first, pair programming, and constant refactoring. But the thing that impressed me most was the way the code seemed to emerge out of nothing, taking one small step at a time, with the code always working and always getting better.

Programming is very like walking. When you walk, to move forward you have to put yourself off balance, and run the risk of falling. But without that risk you will never get anywhere. In programming every time you change the code you break it. For example, in a standard editor, typing a single character means the code will no longer compile. This is like being off balance. When the code again compiles, runs and passes all the tests it is like being back on balance. A step forward is making a change that adds functionality or improves usability.

Any programmer can break the code. The most mediocre progammer if told what tiny step to take will usually be able to write code to take that step. Good programmers can envisage how to take big steps, writing a lot of code to solve a difficult problem. What was amazing about how Kent programmed was that he could see how to take a big step as a sequence of tiny steps, each of which left the code in perfect working order, with a tiny bit of added functionality.

Most programmers cannot do this, and it is a hard skill to learn. Good programmers often find it harder to learn, as when they take big steps they often get them right. The only way to get better at it is to force yourself to try it. When about to start making changes that will stop you checking in code for a week, see if you can make it a day. Or try and break a day's changes into an hour's changes.

I think, counterintuitively, that this leads to one of the biggest problems with XP. In XP, the customer has to present a sequence of small stories. The onus is put on them to break a product into baby step stories, and as I've said, this is not an easy skill to learn. The problem is not that the customer has a hard job, as XP acknowledges the customer is a key part of the team, and has a job as hard as the developers'. The problem is that this part of the customer's job is assumed to be easy.

By taking more baby steps, it is easier to deal with a changes in requirements, easier to test, easier to integrate with everyone else, and probably results in better, simpler code.

Wednesday, August 03, 2005

Ideas Factory: Market Research the Cluetrain way

In the spirit of giving my ideas, here's one I had about a new software product, like a search engine, but push instead of pull technology.

When I worked at a commercial research lab I used to get very frustrated with the lack of contact with customers. We had a building full of smart people, great at solving problems, but not knowing which problems was most important for the customers to solve. We tried to get more contact with customers, but it involved working through internal bureaucracy and politics, and researchers are never very good at that.

At some point I read The Cluetrain Manifesto, which during the dot-com era did seem a bit revolutionary, and it did manage to spawn a book, which was more than most dotcom ideas. Its focus on big companies being responsive to customers rang a bell with the problems I was having in the research lab. I started thinking about how we could be more responsive as a lab to solving the problems our customers really had.

If I'm a customer and have a problem with a camera, I'll probably search their website for technical support and google to see if anyone has complained on the web. And this searching usually finds something. Imagine if the moment anyone posted about a problem to a message board, newsgroup or mailing list a pre-stored search query was matched, and the message sent to the company's proactive customer service department. Or if it was a post saying "I wish I could get a camera that did X", this got found automatically and sent to the research lab who invented a way of doing it. Firms would be so much more responsive.

This would also be a fantastic tool for those in small companies. They could monitor the whole web for comments about their particular niche area, without employing an expensive market research department, or hoping that customers contacted them. In these days of the long tail being the latest business fad it would be incredibly useful.

Google have gone some way towards this with Google Alerts and I've just found out that GoogleAlert is a commercial service, but both of them only monitor the web (and news for Google Alerts). What about mailing lists, newsgroups, radio, TV, podcasts, blogs and a million and one future forms of media?

So in summary, the idea is registered users, with prestored search queries, matched against multiple forms of both push and pull media, with results fed to the user as a push service either in real time or in digest.

I had this idea in 1999 I think, when it was a good idea. I should have published it then, and then it might not be 2005 with us still not having the service available. The best people to do this are Google, I just hope they read this and take the challenge on.

Tuesday, August 02, 2005

An incentive to cheat

I've written a couple of articles already giving reasons why I'm not keen on Software patents. (Embrace and Extend, and 1% inspiration, 99% perspiration). I see no reason to stop writing them though, while there are so many other good reasons to oppose them. For example, consider all the economic reasons.

Now most economists think that by default regulation in the markets is a bad thing, if sometimes a necessary evil. Another no-no for economists are monopolies as they make things expensive for everyone. In fact, one of the few types of regulation that economists support is anti-monopoly regulation. A patent is regulation creating monopoly, so needs extremely good reasons for it even to be considered.

The normal reasons given for patents is that without protection people will not put the effort into research and development, only to have the ideas "stolen" by someone else. I disagree with this in most cases - being first to market with a new feature in software is often enough to start a success. And even without patents a company will require constant research and development to stay ahead of the competition, and so will do that R&D. I would argue that just as much innovation happens in the open source world as in the commercial world in software. Innovation happens because people have a problem they want to solve. Of course there are counter-arguments to this. However, let us look at some other economic arguments against patents, especially software patents..

In "The Armchair Economist" (a good book) Stephen Landsburg argues that economics can be summed up as "people respond to incentives". I'd like to look at some places where the incentives lead to the wrong result.

The first place is in the pay structure. Patent Office examiners are government employees, and get paid worse than in the private sector (though they do have some nice perks). So if people were only motivated by salary, you would get worse people checking the patents than the law firms who help file most of them. In my experience however, checking for prior art for a patent is actually harder than having the idea in the first place, as you need someone who is intelligent enough to understand the idea to spend a lot of time doing a lot of tedious searches. It must be even harder in the patent office where you only have the horrible legalese that patents are translated into, rather than having a human being to answer your questions. And it would seem very difficult to incentivise patent office inspectors to do a good job when more and more patents are filed every year giving a bigger and bigger workload.

Secondly, consider the following situation. Once when I was in the process of preparing to file a patent, I spent weeks diligently looking for previous publications which might have shown someone else had thought of the idea first. Eventually, a couple of days before we were due to submit the application, I found a paper in an obscure japanese journal which theoretically covered my idea. Let's look at my incentives. By that point I was an expert in the area. I knew that if I submitted the application there was no way the patent examiner would have found this paper, the link between the paper and my idea required expert knowledge to understand. So the patent would have been granted. Also, investors think that patents are intellectual property, so more patents protecting key ideas mean that you have more property. So your must be company more valuable. So if I filed the patent I would have increased the value of my company through research, and made my boss happy, and increased my chances of a higher salary and promotion.

Finally, getting a patent invalidated even if it has prior art is an expensive, slow process, so if someone did use the idea it might be cheaper for them just to pay a license fee or swap patents than to actually get the claim revoked. So all the monetary incentives meant I should have filed.

For many small startup companies struggling to get investment the temptation must be there to file patents, as they will almost certainly be granted, and then they look good to investors whether they are valid or not. This has to be a bad thing.

I'd love to do a research project on this. Pick 10 software patents filed in the last 5 years in the US. Get some trained researchers to really search for a few months for each of them looking for prior art, with the best tools available. If prior art is found, go through the whole process of getting as many claims as possible invalidated. From this you could get an estimate of how many bad patents are filed, and how much it costs to invalidate them.

For more on this issue see Tim O'Reilly's page. Unfortunately the BountyQuest project that it mentioned died a death.

I never did file that patent.

Monday, August 01, 2005

Book Review: Trend Following

Trend Following - How Great Traders Make Millions in Up or Down Markets
Michael Covel
ISBN 0131446037

This book is a useful introduction to the philosophy behind trend following and some evidence for its success, but is written like a fiery sermon from a true believer, rather than a fair evaluation.

In 1989 Jack Schwager wrote Market Wizards. He interviewed many of the traders with the most impressive or consistently good trading results, and asked them sensible questions about themselves, their methods, and their beliefs on what it took to be a good trader. He had a background as a trader himself, but tried to listen openly, and not be judgemental and report accurately, focusing on similarities and differences in the answers he got. It led to an excellent book.

Michael Covel's book clearly wants to be a new "Market Wizards", focusing on Trend Followers. Trend Followers are traders who trade not from any understanding of the underlying fundamentals of the market or prediction of the future, but on the belief that human nature means that markets going up will tend to keep going up, and markets going down will tend to keep going down.

Unfortunately, the book reads like it was written by an enthusiastic person who has been hanging around some very smart people and hero worships them. Covel seems to think Trend Followers can do no wrong, and non Trend-Following traders are stupid and destined for a fall. For example, he consistently says that trend followers don't make predictions about the future, and derides non-trend followers for making such predictions. However, every time a trend follower goes long they are predicting the price will go up, and if they go short they are predicting the price will go down. Of course, they accept that their predictions will often be wrong, and get out quickly, but the implicit prediction is there.

Also, despite his claim "if we could have developed a book comprised of only numbers, charts and graphs of Trend Following performance data, we would have", there is very little hard data. What data there is, is usually presented very badly, for example, 3D absolute return bar charts with a log scale. I think he really needs to read Tufte.

If you want to read some useful quotes about trend following, and get a good feel for their philosophy then I would read this book, but don't read it as a balanced debate on different styles of trading.

Saturday, July 30, 2005

What's wrong with being a fundamentalist?

Recently the word fundamentalist has become an almost uniformly derogative term, most often applied to Moslems, and often to Christians, but in many other areas too. I think this is unfortunate.

Quite a few years ago I learnt to play the Oriental board game called Go, (also known as Igo, Wei Chi, and Baduk). A little yellow book by Toshiro Kageyama called Lessons in the Fundamentals of Go was the book that helped me improve the most. Whatever level in the game I had reached, I could come back, reread it, and my game would always improve. In the introduction he talks about the importance of fundamentals in all areas, and starts comparing baseball in America and Japan. He says:

"In every confrontation with a real American professional team it seems that what we need to learn from them, besides their technique of course, is how uniformly faithful their players are to the fundamentals. Faithfulness to fundamentals seems to be a common thread linking professionalism in all areas. If we consider the American professionals as the real professionals in baseball, then I think we have to consider their Japanese counterparts, who tend to pass over the fundamentals, as nothing more than advanced amateurs."

What should "Islamic fundamentalist" mean? I am not a Moslem, but in my understanding the most fundamental thing must be the confession you make if you become a Moslem. The Shahada (confession) is, in translation "I testify that there is no God but Allah; I testify to His Unity and that He has no partner; I testify that Muhammad is his servant and his Messenger." or in an even shorter form, the kalima, "I testify that there is no Allah but Allah, and I testify that Muhammad is the Apostle of Allah". I disagree with this statement, but it does not seem to include many of the things that seem to be called Islamic fundamentalism, but I'm not really qualified to comment.

I'm much better qualified as regards Christianity. I'm a Christian, and many might call me a Christian fundamentalist. So what do I think the fundamentals of Christianity are? It has to be, in the simplest form, the accepting of Jesus Christ as both Lord and Saviour. The Apostles Creed, long taken by Christians as a way of defining their faith, is all about Jesus, not about Christians and what they do.

So what if by fundamentals you mean how Christians should live and what they do? If you accept Jesus as Lord this has to be defined by his teachings. And the shortest, simplest summary of his teachings is (from Matthew 22:34-40):

"You shall love the Lord your God with all your heart and with all your soul and with all your mind." and "You shall love your neighbor as yourself."

Now those people who are normally called fundamentalists are those bombing abortion clinics (which I condemn), hating homosexuals (which I condemn) and creationists (as the term is commonly used - I don't condemn them, but I think they are misguided). These are only related to fundamentals in one way, and that is the authority of scripture. Many Christians, myself included, think the Bible is the inspired word of God. Unfortunately, we cannot always agree on how the Bible's teaching applies to a particular situation. That doesn't mean that the fundamental (the Bible's authority) is wrong, just that at least one of our interpretations is wrong. However, if any group abandons its fundamentals, it becomes trivial and shallow.

I'm very conscious of the fact that one of the wonderful things about the English language is its dynamism and that meanings change and develop. And I'm also aware I sound like the old man who makes himself look ridiculous by bemoaning the fact that gay no longer usually means "Showing or characterized by cheerfulness and lighthearted excitement; merry". But I wish people would use the word extremist rather than fundamentalist, when that is what they mean. Because being a fundamentalist, thinking about what is fundamental, should be a good thing.

Friday, July 29, 2005

Book Review: The Best Software Writing 1

The Best Software Writing I:
Selected and Introduced by Joel Spolsky
ISBN: 1590595009

This book aims to collect the best software writing, usually from online sources, over the last year or so and reproduce it in book form. The idea is to have a series - think about is as the Now of software writing (for any British readers).

By software writing it means writing in English related to software development. There's a couple of posts from Eric Sink about running a software company, an introduction to Ruby with cartoon foxes, and many other gems. The book is great and you should buy it, read it, and lend it to your friends.

It has two major weaknesses. Firstly, if you regularly read Joel's blog and follow the links, you'll probably have read much of it already. Secondly, because Joel is editing it none of his own writing makes it in.

I think the most important thing about it is that it is inspirational. It makes me think that I want to write well-written, provocative articles related to software, in the hope that one of them makes it into book 2. If it encourages others to think and act the same way then Joel and the publishers have done the world a service. It's a lot easier to write an insightful single article than to write "Writing Solid Code" or "The Mythical Man Month", and if this encourages people to start writing, we might have more classic software books to read.

Thursday, July 28, 2005

Ideas Factory: Developer Recruitment Agency

Yesterday I was complaining the patent system meant that people were not encouraged to share good ideas when they had one, which means the world does not improve as fast as it could. I said that I was going to put my money where my mouth was, and start sharing my ideas. Well, here's the first idea, but it's not an idea for a piece of software, its an idea for a business.

I've had to deal with a number of IT recruitment agencies, both as someone looking to hire and as someone looking for a job. The worst ones have been bad, though one, ECM was good, from both perspectives. However, they all have the same core approach - text searching on a candidates CV. This might work ok if you are looking for a Java developer with 3 years experience. However, as Joel Spolsky has commented, you should be looking to hire the superstars. And the superstars might not know Java, but they could probably learn it in a week, and be a better programmer than one of the unwashed masses with 3 years experience. CV text search is obviously the wrong solution.

The right solution involves trying to find people who are smart and get things done. If you had an agency which measured how smart people were, and how good at getting things done, then it would be much more useful. If it had features so the superstars really stood out, you would want to use that agency if you were looking to hire a superstar. And you would want to use that agency if you were a superstar, because you would know you were going to work for a company where they appreciated you. You probably wouldn't want to use the agency if you were a poor programmer because it would be obvious very quickly, thus improving the quality of the hirees.

So how would you do this? Well people looking to hire clearly have money, or they couldn't afford to hire a superstar, but not much time, whereas people looking for a job probably have more time, especially those in college, but less money. So the site should be cheap but possibly time consuming for the hirees, and quick and time-saving but with the hirers paying for it. Monster already have this model.

My idea is have a site with lots of puzzles, intelligence tests, essay questions etc., ideally most of them automatically marked. In my experience, most superstars like solving puzzles, and like being told they are smarter than other people, and being able to see their rank. IQ tests may only show how well you do IQ tests, but they are probably well correlated with intelligence. Every test you allow people to take multiple times and improve their score. That way, people who are willing to work hard do better, and you get people who get things done nearer the top of the list.

There are a million and one different competitions and tests you could have. You could get people to submit code samples and run them through an automated, lint-like code quality detector. It wouldn't be perfect, but it would be fun to use, and competitive. You could ask people which software books they have read. You could even make them write a review of them. You could get other people to rate their reviews, and through an emergent process of how their reviews were rated, and how their ratings correlated with other people, you could probably get quite a good measure. You'd also end up with people knowing that if they want to do better they should read book X, or write code in the style Y, and so people could actually be inspired to improve through using the site. I'm sure you can think of more ideas for clever tests.

If you had enough different sensible tests, and gave people free choices of which ones they did, then I suspect the ranking you gained might be well-correlated with how smart people were and how good they are at getting things done. And it would help software companies hire superstars, and superstars be better recognized and find better jobs. Which should improve software for everyone. And the world would be a better place.

Wednesday, July 27, 2005

Book Review: The End of the Line

The End of The Line - How Overfishing Is Changing The World And What We Eat
Charles Clover
ISBN 009189781-5

I read this book on the recommendation of a friend, and in turn would recommend it to anyone. This book describes some of the current fishing practices and economic effects causing them and argues that the resulting overfishing we are nearing the end of the line for fish stocks and dramatically altering the ocean ecosystems.

The book is gripping reading. It does not read like typical environmental literature. Charles Clover is a journalist for the Daily Telegraph, an English broadsheet (ie quality) newspaper, which I think it is fair to say most people would regard as rightwing. Probably as a result of this it reads more like an article from the Economist magazine, giving plenty of facts and an informed, well-written argument, rather than a rant.

It ends with a brief guide to buying fish in a sustainable way, though this he admits is not the purpose to the book. If you read this you may never order fish and chips at a fish shop again. But if enough people read it, we might have fish and chip shops in the future.

1% inspiration, 99% perspiration

Yesterday I was writing about one reason I'm not keen on software patents. I thought today I'd tell you another one.

One of my favourite software writers, Joel Spolsky has written an article on interviewing developers for a job. The article boils down to "Hire people who are smart and get things done." This maxim has served me well so far.

All cultures place a value on being smart and getting things done, but differ in how much relative value they place on them. I've lived in North America and the UK, and have noticed that the British seem to place far more value on being smart than working hard. You will often read articles in the British media praising an inventor's brilliant idea, but very rarely praising his hard work. The hard work is often presented as a surprising thing, or an unfortunate setback.

I personally think that good ideas are easy, in comparison to the hard work needed to make them a success Thomas Alva Edison is reputed to have said "genius is one percent inspiration, ninety-nine percent perspiration.", and I suspect you'll find anyone who has made a financial success out of a good idea will agree.

I think this especially true for software. Software very rarely becomes successful because it has a unique, patented brilliant idea. Usually successful software has many hours put into it to make it exceedingly usable, and continual improvement keeping it that way. It isn't from a new idea with no competitors, as Eric Sink comments.

Software patents encourage the idea that having an inspirational idea is the hard part, and the hard work into making a great product is easy, and anyone can do it. When a company like Microsoft copies the idea of a spreadsheet from Visicalc, and do it so well that we get the current Excel, that should be congratulated, not be treated like a stolen idea. Otherwise, be probably wouldn't have a spreadsheet as good as Excel.

Especially in the UK, I think we should be encouraging people to take their good ideas and make them public and freely available, not advising them how to protect them. Then we will learn that the way to successful entrepreneurship is through hard work, and my country might have an economy approaching America's success. This is just basic economics. I am a reasonably intelligent person, who is also quite busy. Occasionally I have a good idea for a business or software product. I have three options.

  1. I can quit my job and start trying to make the idea a success.
  2. I can keep the idea secret, and plan to do something about it in the future.
  3. Or I can publicise the idea as widely as I can, and hope someone else makes a successful business out of it.

In the first case, I run a very risky path, but have some chance of success. In the third case, at least I get the benefit of the product or service provides, so my life will be better. Only the second case does nothing at all to make my life better, and so is almost certainly the worst course to take, and yet the patenting system encourages this precise course for risk averse people.

I'm going to put my money where my mouth is on this one. I have ideas that I think would be successful on a fairly regular basis. I'm going to start putting them up on this website. That means:

  • If someone takes the idea and uses it, then I have a new product or service that I wanted
  • They might give me credit, which will make me feel good
  • They might feel generous enough to share some financial success with me
  • No-one can then patent the idea, which removes the chance of someone patenting it and stopping an entrepreneurial person from actually working hard to use the idea
  • If people think it is a good idea then they might well me, which means I have more evidence if I want to proceed
  • If people think it is a bad idea then they might tell me and I am less likely to work on it myself and hence waste my time

Tuesday, July 26, 2005

Embrace and Extend

You might think I'd be in favour of software patents, as I am the named inventor on a few myself. They were filed when I worked for a previous employer. However, I'm really not keen on them, for a number of reasons. I'll explain one of them here.

"Embrace and extend"
is a phrase usually used derogatively when talking about software standards, but it applies well to a tactic that can be used for patents too. Let me tell you a story, which I was told as an anecdote and may not be true, but certainly could happen.

A company, let us call then Xenon, invents the photocopier and patents it. Another company, Argon, sees this idea, and thinks, "Hey, this could really be improved by adding a memory to the photocopier, that way every copy would be the same if you made more than one copy, and you wouldn't have to scan so often." Argon duly file a patent on their extension.

Now, the Argon can't sell a photocopier without licensing the patent from the Xenon. The Xenon would like to add a memory, as they think it's a fantastic idea, but can't add the feature without licensing the patent from the Argon. Both companies are pragmatic, and so decide to swap patents, knowing that no third company can compete with them, without paying for two patents. They both get well rewarded for their inventions.

You might think this is a fair outcome because they both invented something. Or you might think it is unfair, because the first company had the much more important idea. However, if the extension was so unimportant, the first company doesn't have to use it. The situation becomes much more serious though if the invention is software, and the first company doesn't patent.

Suppose I have a great idea for a piece of software - like a web browser. But I decide I don't want to patent it because I don't believe in software patents. So I release my web browser, but while it only supports text web pages. I'd like to have pictures and sounds though, so I say "soon I'll release a version with full multimedia pages."

You might see my web browser, and extend it by designing a way of loading images and sounds, and patent this extension. It will probably be very similar to the way I planned to add the feature, but that does not allow me to add the feature to my browser. How I was going to add images and sound was not public, and has not been done already. Even though I said I was going to include "multimedia", patents are always on a method or physical item, so I cannot claim prior art. If I had patented my web browser I could have trade the patent with you, but because I didn't want to patent, there is nothing I can do. I have to give up on having a full-featured free web-browser and cry.

Almost any good free idea can be taken over by this "embrace and extend" method. The big patent filers know this, and the standards set out by standards bodides are their favourite playground. Software is particularly vulnerable, because how it works can claim to be a trade secret. A good programmer can look at most programs and guess exactly how they work internally, but officially the code is not public, and so releasing software is treated very differently from selling a physical device. Anyone can take apart a physical device, but software normally comes with a clause against reverse engineering.

It would be fantastic if there was a cheap way of making a software idea public, with a GNU style copyleft, so that any extension of the idea would have to be allowed free use as well, but I cannot see any practical way of making this happen. Never mind - just keep lobbying against software patents.

Thursday, July 14, 2005

The Honour System Virus

On June 9, 2000 my friend and colleague Aaron Kotcheff posted the
following joke to our local "funny" newsgroup.

The joke

Honor System Virus:

This virus works on the honor system.

Please delete all the files on your hard disk, then forward this
message to everyone you know.

Thank you for your cooperation.

What we're doing

It's great isn't it? But besides being great, I noticed it was new! It is short enough that it is not just a derivative of another joke. The subject matter (computer viruses) is new enough that it must have been written in the previous 20 years or so. So the person who invented it is probably still alive. So I decided to try and find the person who actually invented a new joke. If you passed it along, and get an email requesting you to say who sent it to you, please carry the chain on. The chain will always be displayed here.

If you want your email address left off, fine. If you want your name
left off, fine. Even if you want your country left off, fine. Just please
don't stop us finding this out.

The chain so far, backwards

Thanks so much to everyone below who has helped so far.

Nick Fortescue9 June
Aaron Kotcheff9 June 2000England
David Bonas 8 June 2000
Martha Mazon 8 June
Diana Monterola8 June 2000USA
Renee C TylerUSA
Deb MedelUSA
Ed StokesUSA
Greg BruceUSA
Steve Groth?USA

Stop Press! We've found it. See this For details. Or read on.

We've found the source!We've found the (or a) source of the joke. For more details see here. But please don't let this stop you helping us trace the chain back. It will be really interesting to see how it got from the source to me. And it shouldn't be too long, as it was first posted on May 5 2000, and I received it on June 9, 2000.

Other sightings
These are other early sightings of variants. We are tracing their chain back too, including this post on Deja news which led to us finding the record of rec.humor.funny post
May 16 2000, Dr Billy Newsletter
May 25 2000, GCS tasteless joke board

To contact us, or send us information about early sightings please email:

A Bit About Me

You are currently reading this page, and I don't know who you are. You might be me while I edit this page, a bored friend or colleague trying to avoid doing something more constructive, or someone who might be interested in employing me.

This is worrying, as it means I have to be correct in spelling and grammar, and appear interesting and amusing, while simultaneously being responsible, professional and intelligent. If you want a more formal description of who I am, why not have a look at my C.V. It is guaranteed to be completely honest, though probably quite boring.

At the moment I live in Oxford, and work in London, taking the train every day. I am a member of St. Ebbes church. I might see you at the 6.30 service or Roots, and really enjoy helping with the sound desk.

Most of my spare time is taken up with dancing, with as many different styles as I can try. At the moment this is mostly modern jive, lindy hop, and west coast swing. Modern Jive is both at Ceroc, sometime in Kidlington or Oxford Town Centre and at Jive+. West coast swing is Paul Warden's classes in Oxford organised by Jive+. Lindy Hop I don't social dance anywhere regularly, but will be around at most of the weekends, including Camp Savoy, Swing Jam, Beach Boogie Swing, Hop the Castle, etc. I used to do a lot of Aerials with Andy and Rena at Jump 'n' Jive, but haven't done so many lately, and with Ruth Etherington was UK Aerials Champion at Beach Boogie in 2003.

For the last four years I've been studying for an Open University degree in Psychology. I'm nearing the end (final exam October 2005) with a sense of relief, but it's been fascinating.

Other things which I've done more of in the past, but don't do so much now include playing Go, juggling, most adventurous sports (rock climbing, walking, abseiling, canoeing, kayaking, skiing, x-country & downhill). I've done a sponsored parachute jump with the Red Devils, a short course in Hang-Gliding, and have done my CBT and theory test for my motorcycle license, but haven't got around to the real test yet.

© Nick Fortescue 1997-2005