Superstition is Rife among developers

I was reading John Stuart Mill’s on Liberty and came across the following passage:

There is a class of persons (happily not quite so numerous as
formerly) who think it enough if a person assents undoubtingly to what they think true, though he has no knowledge whatever of the grounds of the opinion, and could not make a tenable defense of it against the most superficial objections. Such persons, if they can once get their creed taught from authority, naturally think that no good, and some harm, comes of its being allowed to be questioned. Where their influence prevails, they make it nearly impossible for the received opinion to be rejected wisely and considerately, though it may still be rejected rashly and ignorantly; for to shut out discussion entirely is seldom possible, and when it once gets in, beliefs not grounded on conviction are apt to give way before the slightest semblance of an argument. Waving, however, this possibility assuming that the true opinion abides in the mind, but abides as a prejudice, a belief independent of, and proof against, argument this is not the way in which truth ought to be held by a rational being. This is not knowing
the truth. Truth, thus held, is but one superstition the more,
accidentally clinging to the words which enunciate a truth.


Have you ever heard Perl and PHP fans get stuck into each other, or Java vs C++, or Vim vs Emacs (there can be only one). It’s crazy! Most of the noise is created by people who have no real understanding of the technology they are arguing against and some of them don’t even understand the tech they’re arguing for. Wikipedia has an entry on Editor Wars.

Basically Mr Mill is stating that if you’re arguing against something with little real understanding about what that something is then your just another superstitious idiot.

Political Compass

I am rather please with this: I took the Political Compass Test and I got the following result.


If you are wondering what the above means the following diagram will
give you an idea of where I stand compared to some famous characters.


Patent Nonsense

As an owner of shares in both Merck and Glaxosmithkline the following is very depressing reading.

Patent Nonsense (Henry Mintzberg)

Surely any rewards system should be encouraging cures to diseases not relief of symptoms. The appendix of the article is very depressing, are they truly this corrupt? I wonder if any of these people actually go to prison for their actions. The Limited Company encourages people to take risks they would not otherwise take in case of financial failure etc but surely when they start blurring the lines, especially when it’s peoples lives on the line, there must be some rule of law.

In 2008 Merck, Glaxo and Pfizer had a combined turnover of over $100 billion, a fine of a few million is like shooting an elephant with a pop gun, mild irritation but little cause for concern. The elephant continues on its merry way and soon forgets the sting on its ass. If you check out the first page of first page of Pfizers 2008 Annual Summary, they have a cute kid on the first page but do they give a damn about that kid or any other or is shareholder value the main driver. I know the company answer would of course being wrapped up in cotton wool and they would wax lyrical about how important people are but then why all the apparent corruption, the government fines. They cannot wash their hands of setting the wrong rewards system or crap managment, and I don’t mean crap management ie they got caught.

One of the reasons I bought shares in Merck was the story in Tom Collins Built to Last: Successful Habits of Visionary Companies about them helping with River Blindness, that’s a company I want to own a stake in. Don’t get me wrong their financials are also a factor but every company has a social responsibility and Merck’s actions in the River Blindess case was good evidence to me that they take that responsibility seriously.

Pfizer talk about putting trust back on the agenda in their 2008 report but then they all talk about Corporate Responsibility but is this just lip service ie we were naughty and we are cleaning up shop but really nothing changes. Do any of them realise that Corporate Responsibility is missing a word, “Social”, it should be Corporate Social Responsibility. I personally hope that the big pharmaceuticals stop talking about Corporate Responsibility and start living it. There are few other companies that can have a bigger impact on our total well being than the big pharmaceuticals and if we let them get away with this sort of nonsense we will continues to have countries with an average lifespan under 50 for years to come.

Glaxo 2008 Annual Report

Merck 2008 Annual Report

Eclipse Cannot connect to keystore

If you get the following error:

An error occurred during provisioning.
  Cannot connect to keystore.

You need to check what version of java you’re running. I’m running Debian and hat gij installed and this is no use for eclipse. I tried the following:

apt-get install openjdk-6-jdk
update-java-alternatives -s java-6-openjdk

but this failed miserably. I ended up downloading and installing a new java bundle from Sun and removing every debian package related to Java.

Mental Wanking and Premature Optimization

bugatti-veyron.jpgOptimization appeals to us geeks. I am sure there is some psychological reason for this, If you happen to know what the reason is then drop me a line. I promise not about to witter on about The Fallacy of Premature Optimization either. Optimization is important but far too many of us get caught up in pointless arguments about performance. The following article deals specifically with the faster webserver, in particular serving static pages.

There’s a ton of articles on Apache vs Apache2 vs lightttpd vs thttpd vs mongrel vs nginx vs litespeed vs whatever-httpd. The vast majority of these articles cater for people not adverse to a bit of mental wanking. These people have a perceived problem ie performance. They want to get an extra few percent from their machine. Off they go on their merry way Googling for a performance comparison chart that will show them some stats. These people are the unadulterated speed freaks of the computing world. A lot of them understand their… affliction, but quite a few don’t.

In some organizations performance is critical ie Yahoo, Google, Wikipedia, livejournal, BBC, Dozens of Universities, Any bank, etc…. I am missing hundreds here. For some it’s competitive advantage ie Google. For these organizations performance is talked about all the time. It’s brought up in meetings, at the bar, over lunch, out jogging and in their dreams. It has a direct affect on the bottom line.

My point is this, most people online discussing the relative merits of Apache vs Apache2 vs lighttpd are not in this select group, most are running small websites.

Here are some idle thoughts that may help the more pragmatic developers out there.

A fairly common question asked is. “What hardware do we need to sustain “N” requests per second”? Assume a static page is 25KB. If we also assume that we have an eCPM of $1.00 (and this is a small amount) we can put “N” in perspective……

  1. 1   rps  == 2,592,000      rpm == $2592 per month
  2. 10 rps  == 25,920,000     rpm == $25,920 pm
  3. 50       == 129,600,000   rpm == $129,600 pm
  4. 100     == 259,200,000   rpm == $259,200 pm
  5. 500     == 1,296,000,000  rpm == $1.296 million per month

500 pages per second is nearly 1.3 Billion Pages per month. This is an awful lot of pages and $1.3 million dollars is certainly an awful lot of money. On hearing 500rps as a requirement a common reaction is to jump too Google and start looking for a suitable configuration. It would be far simpler and more enlightening to do a few calculations and a small test to see where we stand.

For instance:

500 * 25KB requests per second == (500*25*1024*8)b/ps == 104Mb/s

This is a serious requirement. A 100Mb dedicated line is not cheap and would be likely to set you back several thousand dollars per month but hey we are making $1.3 Million per month, who cares!

Now, if I was to go out and spend $2000 dollars on a server just how many pages could it serve. Lets assume I own the following machine:

  • Dell 2850
  • RAM: 2GB
  • model name: Intel(R) Xeon(TM) CPU 2.80GHz
  • cpu family: 15
  • 6 10K SCSI disks (2 mirrored, 4 in raid 10)

Basically a decent spec 2005/6 Single Processor Dual Core machine with the OS disks on a raid 1 array and the web server serving pages from the raid 10 array.

So, is it possible for this single machine to serve 500rps? Yes! It could, if we had enough bandwidth! The following results were taken from a base install Debian machine. I did not tune apache2 in any way whatsoever. This was done on a 100Mb Ethernet network.

debian:~# ab -n 10000 -c 50
This is ApacheBench, Version 2.0.40-dev
Completed 1000 requests
Finished 10000 requests

Server Software: Apache/2.2.3
Server Hostname:
Server Port: 80

Document Path:   /
Document Length: 25000 bytes
Concurrency Level: 50
Time taken for tests: 21.877168 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 252929056 bytes

HTML transferred: 250243696 bytes

Requests per second: 457.10 [#/sec] (mean)
Time per request: 109.386 [ms] (mean)
Time per request: 2.188 [ms] (mean, across all concurrent requests)
Transfer rate: 11290.35 [Kbytes/sec] received

I know ab is not the best tool to be running benchmarks and that requesting a single file is different thatn random files etc but I am not trying to be precise.

So, a cheap machine can saturate a 100Mbit line. Yes, Easily. At no point during the tests did the server go over 0.5 load. I also ran a more long running test and the results were the same. It hardly broke a sweat and this is running an unmodified, untweaked pre-forking Apache2 server.


So whats the conclusion, is benchmarking Apache2 vs lighttpd pointless? I would say that 99% of the time, yes. If you ever have the problem were you need to be serving the amount of pages where the difference between Apache2 and lighttpd makes a big difference then you are likely able to afford more hardware or staff but I wouldn’t be choosing lighttpd over Apache2 unless I really have to.

Heres a quote from a 20000 concurrent connection apache setup

… HEAnet’s National Mirror Server for Ireland. Currently
mirroring over 50,000 projects ….. It regularly sustains over 20,000
concurrent connections on a single Apache instance
and has served as
many as 27,000 with about 3.5 Terabytes of content per day. The
front-end system is a Dell 2650, with 2 2.4 Ghz Xeon processors, 12Gb
of memory and the usual 2 system disks and 15k RPM SCSI disks, running
Debian GNU/Linux and Apache 2.x.

So the next time you hear someone discussing how fast their httpd server is at serving static content ask yourself if they are just jerking off or do they know what they are talking about.

Mental Masturbation

My definition of Mental Wanking reads like a medical affliction.

Main Entry:
men·tal mas·tur·ba·tion

stimulation, especially of one’s own mind commonly resulting
in time wasting. Can be achieved by missing the point or an
acute lack of realism. More prevalent in certain fields, critics ( in
particular literature ), software engineers, tv buffs etc. Can
occasionally be accompanied by
mental fantasies, arrogance, bad temper and or delusions.

For those looking for individual definitions of the word I took the following from Websters.

Main Entry:
: erotic
stimulation especially of one’s own genital organs commonly resulting
in orgasm and achieved by manual or other bodily contact exclusive of
sexual intercourse, by instrumental manipulation, occasionally by
sexual fantasies, or by various combinations of these agencies

And the following entry for Mental:

Main Entry:

1 a: of or relating to the mind; specifically : of or relating to the total emotional and intellectual response of an individual to external reality <mental health> b: of or relating to intellectual as contrasted with emotional activity

Continue reading “Mental Masturbation”

Exim4 Unrouteable Address

I have no idea when or why this started happening for me but I started getting Unrouteable address appearing for any external address.

I’m a huge fan of Debian but there are some things that really piss me off. One is the way they have completely screwed the exim4 configuration. Exim4, if you are not an administrator or mail guru is not the simplest thing in the world to configure, it’s config file is fairly involved and you can do anything in it. Add DEBCONF variables to this and you have a complete nightmare configuration.I spent two days tracking this error down to the following:


That was all I had to add to /etc/exim4/exim4.conf.template

Why this changed I have no idea. The setting I am using in /etc/exim4/update-exim4.conf.conf is


I really cannot make head nor tail out of this at all. I sometimes wish I had started learning Postfix instead of Exim but part of me thinks that it’s not Exim but rather the way it has been packaged up thats compicated.

Losing Weight

I managed to get to 108 Kgs (17 Stone) by  the 5th April. This was a total weight loss of 14 Kilos or for our imperial readers 31 lbs. The resting heart rate has not been going so well though, I stopped tracking it.

Losing weight and a Sub 50 Heart Rate

As usual over the Christmas I over indulged. I weighed myself and came in at 122KG (269LBS). Luckily I’m not 5′ tall or I’d look rather odd. Being almost 6′ 6″ I carry the weight not too bad, but it still annoys me. So I decided to do something about it.

At various times in my life I’ve done a fair bit of training, running (I was a lot lighter then), rowing (Concept 2 only), swimming, walking etc. Any time I’ve started training again I’ve always had a goal or target to get my fat ass moving so I had to set myself some targets. A target or goal needs to be something measurable and there needs to be a carrot to make it fun.

The most easily measurable target I can think of is weight so my carrot needs to help me reduce calorie intake so I decided to stop drinking alcohol, no more beer. At around 200 calories a pint this is a good place to reduce my calorie intake. My target weight is 108KG (238LBS), I picked this weight because it will be the lightest I’ve been in several years, it’s also approximately 17 stone and that’s a nice round (prime) number. (Apologies for using Imperial and Metric, I seem to think in both).

The other target I decided to set myself may be somewhat harder to achieve. The lowest resting heart rate I’ve ever had is 52. I think I’ve had it lower but 52 is the lowest I’ve ever recorded it at. As far as I’m aware to get it below 50 involves some effort so that’s my second target. I’m not 100% sure if I’ll be able to get it as low as this but it’s worth a shot.

I have a 3rd target that’s not really fixed but its another thing to aim for. I’m walking up Mount Snowdon in early April so I’m hoping I can lose all the weight by then because I don’t want to be carrying too much to the top.

With the targets set the next thing to do is to start working towards them.

Weight gain or weight loss although sometimes difficult to achieve is governed by a very simple rule. To lose weight you need to:

Burn more calories than you eat.

There is a little bit more to it than this i.e. if you just stop eating as much and don’t exercise you are likely to lose Fat Free Mass (FFM) and this is generally not a good thing. This is where most diets fail miserably and people end up in the yoyo diet hell that a lot of celebrities write books about or invent some new fad diet to make a buck so some other poor smuck stays in yoyo diet hell. There is no easy way to lose weight and keep it off. It’s a lifestyle change that normally involves exercise. Losing some weight in a few months or a year does not mean you found a new wonder way to lose weight. Once you’ve kept the weight off for ten years look back and look at what you did to achieve it and ask yourself if it was lifestyle or wonder diet. Don’t get me started on people that opt for surgery over self discipline.

In life self discipline is the key to mastering many thing not least of which is health. If you’re unable to master the urge to eat a chocolate or a bag of crisps then you are unlikely to succeed at keeping your weight under control. It’s my self discipline that always lets me down but I also have an extremely disciplined streak in me that saves me from slipping too far. It’s this streak that berates me when I see the cheddar in the fridge or the crisps near the checkout. It’s this self discipline that will get me into shape, without it I would remain overweight.

I own a Concept 2 rower so its the perfect tool to start on. I’ve been using the Concept 2 for over 15 years off and on so am comfortable with it. I also took the Instructor course a few years ago to make sure I was using it correctly because I was worried about injuring my back with too much rowing. It’s been a while since I’ve done any training so I intend to go easy on the rower to start and do more walking to get a base fitness level.

I intend to row three times a week for about 20-30mins duration and then to walk on Sundays for about two to three hours over the fields behind the house. I need to take it easy because my knees and back are both buggered from being in the Navy but thats another story. My knees are also why I will probably never be able to take up any high impact sport again. My knees got bad when I was significantly lighter so its not weight that caused the damage.

If anyone is actually reading this, different rules apply to different people, so don’t think that anything I do is equally applicable to you. Its probably not. I will post some more details around the training plan soon.

Gaming Performance and Hardware

After my Gaming Hardware post I decided to have a look at what the gaming field is up to i.e. do ping times still dominate the conversation. Is everyone still as infatuated with performance as they were several years ago. I used to do some gaming and I would still like to
but I get too sucked into it and lose weeks of my life so I made
a conscious decision to stop. I backslide every once in a while when a killer game comes out or if I play something somewhere and get hooked.

chp_chess_game.jpgCaveat: I am not addressing game enjoyment in this post its game performance i.e. do you want to be the last man standing. High performance hardware does lead to more “fun” etc but not necessarily better gaming performance. When I say mid-range hardware I am also not talking about moms word processor or 3 year old hardware. It needs to be reasonably decent hardware to run the game properly.

From a casual glance around the net it would appear that hardware performance and hardware issues seem to dominate the message boards. I always found the perpetual hardware performance chasing and worrying about hardware to be a distraction.

I remember playing games on mid range hardware, for the time, and dealing out my fair share of mayhem. In general the people who were trouncing everyone were also running mid range hardware. Don’t get me wrong I’m not talking PC world hardware, that’s what I would call bottom of the range. The machines were mostly hand built based on bang for buck at computer fairs on Tottenham Court Road. The biggest factor I found in action games was ping times not hardware. Above a certain level of performance it seemed to matter very little what hardware you were running.

I’m not sure if this still holds but I believe ping times and player performance still dominate overall gaming performance. Slight digression… It annoys me to see how much emphasis there is on the hardware performance but it’s in the interests of the manufacturers to make sure that performance is seen as a big advantage in gaming or anything. The following is a question I have heard more than once.

My PC is slow on the internet, what sort of PC would you recommend to speed it up?

The PC is most likely not the problem in this case, its the connection. You can browse the quite happily on 5 year old hardware if the connection is good. Shop owners are also selling PC’s that people don’t need its a bit like going looking for a Mondeo and coming out with a Ferrari.

Anyway, back to the main point. Lets assume all ping times are equal. If this is the case then player performance really matters. To get good at something involves practice and lots of it so it pays to watch how sports teams or the military train, its drill, drill, drill. The military make you go through the motions so often you are sick of it but can do it blindfolded. There’s not a huge amount of fun in this and it involves a lot of effort and mental stamina, it’s also why not everyone is cut out for the military or sport. My brother played Super Mario Bros to the point where he would reset it if he lost a life and was able to easily complete the entire game with one life. It was when I seen him do this that I knew I would never be a great gamer. To be great at any sport involves this level of dedication and yes I consider gaming to be a sport.

So if you’re serious about gaming stop focusing on hardware etc and start focusing on yourself. Are you fit, well rested? Do you respond faster to sound than light? Do you drink alcohol, take too much caffeine, how much caffeine is too much? What time of day are you at your best? What’s your resting heart rate? How often do you practice, are your opponents as good or better than you? Drill Drill Drill….

My personal opinion is that most of us don’t need to focus on hardware that much. Ping times possibly but I don’t believe hardware would give me that much of an edge. It may make the game more fun or a better overall experience but this does not necessarily mean I would perform better.