Archive for October, 2005

Oct 28 2005

How wrong can making soup go?

Published by under Activities

Last Saturday night I was planning on having a nice quite evening in on my own. My girlfriend had gone on holiday that morning, my sister was out camping and my mum and dad were going out to the cinema to watch Walace and Grommit: Curse of the Were-Rabbit – it’s a great film so go watch it if you haven’t already!

Any way, as I was staying at home my mum suggested that I cook dinner for when they returned from the cinema. As I quite enjoy cooking this seemed like a good and I settled upon the chickpea, coriander and chilli soup from the Delia Smith Soup book. I decided to make a double lot of the soup as there were supposed to be several “extras” coming back after the film for food.

I had already been out shopping to get all the ingredients, all that remained was the actual cooking. Having previously read through the recipe I worked out that it should take about 1.5 – 2 hours to make the soup so I planned to start cooking at about 8pm – I even set an alarm on my phone so that I didn’t forget whilst watching TV.

So I started cooking at 8pm. The 500gs of chickpeas needed boiling for a hour, so they were the first to go on in 6 pints of water. I wasn’t sure why I needed such a big pan as they really didn’t take up that much room. Whilst they were boiling I prepared the rest of the ingredients. When the chickpeas were finally cooked I strained off the water, added the rest of the ingredients and buzzed them in the food processor. I don’t why but for some reason, although I had followed the recipe to the letter, there just didn’t seem to be enough for six people.

Lastly I had to return the mix from the food processor to the pan and add the six pints of water that had been used for boiling the chickpeas. It was just as I was adding the last of the water that it finally stuck me why there didn’t seem to be enough ingredients and why now, after added the six pints of water, the soup seemed incredibly running. The recipe said to use 500g of dried chickpeas soaked over night. Where as in my haste I had simply used 500g of tinned chickpeas. If you soak 500g of dried chickpeas overnight their resulting mass is more like 1kg!!!

At this point I was rather… err… irritated! It was also at this time that my parents returned home from the cinema. After explain what had happened (they thought it was rather amusing) I promptly did a disappearing act to the pub with Dave as I couldn’t stand to be in the same room as that damn soup any longer than I had to.

The moral of the story? When following a recipe don’t just follow what it says, understand what it implies. There may be somethings you need to think about that aren’t explicitly laid out on the page.

3 responses so far

Oct 28 2005

Suspect Rounding In .Net

Published by under .NET

For the past week (might be a slight exageration) I have been working on two rather complex and long winded calculations for a certain project that I am working on. I have been given a set of data to run through the calculations and a list of expected results. Unfortunately I have been receiving some rather unexpected rounding results and as soon as I manage to fix the rounding for some of the dataset it seems to throw out the results for other items in the dataset.

Unfortunately I am unable to step through the code as it is running the calculation and (until late on Friday) I was only able to output one result value. As a result I debugging has been a rather slow and laborious process. On Friday I implemented a debugging system that let me not only output a final result but also log various values throughout the calculation process.

Today I finally I managed to track down the round problem to the .Net Math.Floor() function.

From the MSDN library:

Returns the largest whole number less than or equal to the specified number.

[Visual Basic]
Public Shared Function Floor(ByVal d As Double) As Double

Parameters
d
A number.

Return Value
The largest whole number less than or equal to d. If d is equal to NaN, NegativeInfinity, or PositiveInfinity, then that value is returne

The code that was causing me problems was the following:

Public Function Truncate(number As Double, places As Integer) As Double
    Dim temp As Integer = Math.Floor(number * Math.Pow(10,places))
    Return temp / Math.Pow(10,places)
End Function

What this code does, is take a floating point number and truncate it to a user specified number of decimal places. For example Truncate(125.12542, 2) should give a result of 125.12. It should also be possible to truncate to 0 decimal places using, for example, Truncate(125.12542, 0) should give a result of 125.

The trouble I was getting, however, was that I was calling Truncate(1001.010, 2) and I was getting a result of 1001.00 when the result should have been 1001.01. As you can imagine, when you are working with financial calculations even a penny out is far from acceptable…. all calculations have to be exact. So this problem had to be resolved.

I’m not about to give you a run down of the whole debugging process that I had to go through as it took several days and a lot of caffine and stress. But in the end I tracked to the problem to being the fact that I had used the Double vairable type. For some reason, which I’m still not entirely aware of, the is some odd rounding when rounding Doubles. These issues seem to disappear if you use variables of type Decimal. So I spent a whole day going through my code replacing all instances of Double with Decimal.

Now that I have completed that all my code is now producing the correct results. If only Microsoft had made these issues more clear in their documentation I might have saved myself several days work and a lot of stress.

2 responses so far

Oct 21 2005

The Evilness of Magazine Subscriptions

Published by under General

“What?”, I hear you say. “How can magazine subscriptions be evil?!?!”

And you might be right to question me as magazine subscriptions offer you get benefits such as:

  • Delivery to your door
  • Early delivery (from some publishers)
  • Free gifts
  • Guaranteed delivery of every issue

But please hear me out. I have been thinking about this for a while now and I think that I have come to the right ethical conclusion. I started thinking about this subject when I decided to get my sister a subscription to FHM last christmas. Since I came back from university she had been nagging me every month to go and get the latest issue from the newsagents as she likes reading it but she felt uneasy going to buy it herself. As I’m not a great fan of FHM this got rather anoying so I decided to get her the subscription.

Health

It may not seem much like exercise, especially if you drive to the newsagents, but just getting out of the house/office will have benefits for your health. And if its really too much effort for you to get to the newsagents then you really should start asking yourself some questions about the state of your health. Think of the trip to the newsagents as a fitness indicator.

Diversity

Ok, so you’ve found a magazine that you like and so you decided to get a subscription to it. End of story. But what about the other magazines that are avaiable for the same subject. If you get a subscription to, say, FHM and you never again go to the newsagents you may well be missing out on other magazines such as Loaded, Esquire, GQ, etc. On several occasions I have been in to the news agents to see if the latest copy of my regular magazine is out only to find a really interesting in another magazine. Maybe you’ll find a new magazine that you never knew existed. If you get a subscription to one magazine you could really be missing out.

Selectivity

One disadvantage of having a subscription is that, even if you don’t want an issue because there is nothing in it that interests you, your stuck with it. There’s no point complaining because you’ve already paid for it. If, say, the edtorial team changes part way through your subscription and you don’t like the new teams style you’re stuffed. You could try and get the remained of your subscription back but the chances are that if its more than half way through you wont get anything. What are you going to do now? By going into the newsagents to pick up the latest issue you can have a look through it first to decide whether or not you want it. If you don’t want it you’ve then got the option of getting a different magazine, maybe this new magazine will become your regular magazine.

Social

On several occasions I have been into a newsagent to pick up my regular biking magazine only to find someone else flicking through the same issue, its only taken a slight comment such as “Oh, good… this ones got a section on touring” and before I know it I’m having a conversation with the other person in there. No matter how hard you try you’re just not going to have the same social interaction with your letter box.

Economic

Yes, I know the offers that you get when you subscribe to a magazine: “Three free issues – when you sign up for a year”, “Free copies of our sister magazines”, etc. One things to realise is that the magazine company is probably receiving more money from you than if you went and bought it at a local newsagents. On the one hand, you’re saving money but, on the other hand, the extra money that the magazine company is getting is leaving your local economy and is potentially leading to a decline in local newsagents. It may sound purist of me… but I like my local newsagents and I really don’t mind payign a little extra for my magazines in order to keep them there.

So there you have it. Those are my basic reasons for why magazine subscriptions are evil. I’m sure there are other reasons out there, and I’m sure there are plenty of people out there that think that my arguments are ridiculous. So make up your own minds, after all this is a free country we’re living in.

3 responses so far

Oct 21 2005

Kittens @ Work

Published by under General

Flickr PhotoYesterday Janice brought two of her kittens into work to have a play around the office.  I’m not sure if we’re going to be employing them full time though as they spent most of the afternoon sleeping in my in tray… I don’t think they’re quite old enough to figure out the meaning of “Casual Labour”.

One response so far

Oct 19 2005

Benefits Of Moving

Published by under Site Work

Having only had my website hosting service provider changed on Monday evening I am already reaping the benefits.

The things which have impressed me so far include:

  • Much faster IMAP mail access
  • Faster webpage load times
  • PHP modules required for JPGraph library
  • More than 3 simultanious FTP connections
  • Much improved customer support

2 responses so far

Oct 18 2005

Site hosting moved

Published by under Site Work

If you tried to access my site yesterday afternoon you may have received the message:

I’m in the process of shifting my website to another hosting company. Please bear with me and I’ll get my site back online asap.

This is because yesterday I change my hosting company from hexhost.com to UH-Hosting.co.uk, which is the hosting company that my good friend Phrixus uses.

Luckily I was able to get everything set up on the new servers before I changed the domain name servers. The only reason I put the above message on my old server is so that nobody posted any comments after I had copied the wordpress database over, as that you have been a right royal pain.

But we’re all back online now. Now after months of submitting support requests to hexhost to get TTF support in PHPs GD library I don’t have to worry about it.

I’ve also signed up for a Reseller account, so if anyone wants some PHP hosting space you can drop me a line and I’ll see what I can do (I’ve already got a couple of takers on the cards).

2 responses so far

Oct 07 2005

FAlbum

Published by under Bookmarks,Site Work

Thanks to Phrixus for pointing me in the direction of the FAlbum plugin for WordPress.

I’ve only just installed it and already I’m really impressed. It was litterally a two second install:

  • Upload the files.
  • Authorise the plugin with Flickr.
  • Create a dummy page that redirects to the plugin.

It ties in really neatly with the site, I didn’t need to make any modification to the plugin… it just uses the current theme. Even the list of tags is using the right theme colours.

So far I have’t uploaded many photos to Flickr but that was because it was such a pain to try and get the images tied into my blog. Now with this plugin I’m sure I’ll be uploading a whole load more pictures.

You check out the photos that i have uploaded here, they’re mostly of my Bandit at the moment.

No responses yet

Oct 05 2005

The Future Of MojaviBuilder

Published by under General

I have been asked serveral times recently what the future holds for Mojavi Builder. At this time I would like to say that there doesn’t appear to be a future and I would like to take this opportunity to explain why.

The last release of MojaviBuilder was way back on the 18th August 2004, that being MojaviBuilder X. Soon after (or possibly before) then Sean Kerr started work on Mojavi 3.0. At that time MojaviBuilder contained all the functionality that I wished it to contain for Mojavi 1 & 2 so I decided to wait until Mojavi 3 was release before I started work on a new version of MojaviBuilder.

Well, time passed and there was no sign that Mojavi 3 was going to be released any time soon. Then, in February 2005, a team of Mojavi users decided they’d had enough of waiting and forked Mojavi to create new open-source framework Agavi.

At this time I was unsure as to how things were going to pan out, so once again I put further development of MojaviBuilder on hold, at least until the dust had settled over the forking of Agavi. Shortly after the forking I noticed that the Agavi team had created a set of commandline scritps that effectively did the same work as MojaviBuilder which pointed me towards the fact that MojaviBuilder would not be required for Agavi. Now it seems that the Agavi team is using Phing for doing the same work that MojaviBuilder was created for.

It also now appears that illusina has branched his own version of Mojavi 3 and I’m sure I read somewhere that Mojavi and Agavi might (through ilusina’s branch i guess) be merged back together. If this is the case then I am sure that the Phing tools will be brought through to Mojavi, therefore rendering MojaviBuilder obselete.

So there you have it. A breif overview of what has been happening in the world of Mojavi development and why I’m not currently planning on releasing a new version of MojaviBuilder.

No responses yet

Oct 05 2005

Warp Delivery

Published by under Programming

On Sunday Shane told me about some energy mints that his gf had got for him, from firebox.xom, called Warp Mints. He said that next time I went round to his place I should try them.

I tried waiting, but by Tuesday I just couldn’t resist so I ordered some for myself. I ordered a box of peppermint and a box of Lemon Lime at a total cost of £10. I wasn’t expecting them to arrive until atleast Thursday but probably not until Friday, so I was rather pleasantly supprised when a package from Firebox arrive at wrk this morning.

Its a good job they arrived today as I had rather a late night last night (ask me no questions and I’ll tell you no lies!) and after just one mint I’m already feeling much more alert.

The good thing about these mints is that they don’t contain any caffine, the energy boost is from Guarana and Ginseng. The Lemon Lime mints also have Green Tea extract in them.

Watch this space for a long term review!

3 responses so far

Oct 04 2005

Microsoft/AOL/Netscape

Published by under Technology

It was reported a while back on Slashdot that Microsoft was in talks with Time Warner to buy a stake in AOL.

Well, the coin finally dropped for me today. Doesn’t Time Warner AOL own Netscape? You know… the “other” browser that Microsoft was battling so hard with in the Browser wars of the 1990′s. So where does this leave Netscape? In the hands of the evil behemoth that is Microsoft?

Given that Netscape 8 has a ability to run off either a Mozilla or IE backend will the Mozilla backend option be dropped if Microsoft manages to get its sticky fingers on Netscape and assimilate it into the Borg?

This is purely speculation and I guess only time will tell…. in the meantime, elsewhere in cyberspace, you may be interested to know that:

  1. Opera is now available for free… and this time there are no banners!
  2. The FireFox team are preparing for the release of FireFox 1.5 Beta 2

No responses yet