kerneljack’s diary

some thoughts and comments on my day to day experiences

Archive for April, 2003

Weather Parser

22nd April 2003

I’ve packaged up the InterceptVector parser and related files into a tar file and you can download it from the software section. There are some examples in there as well to help people get started. Hope whoever uses it likes it, let me know what you think.

Nice article on NewsForge today about the difficulties of being a web developer in Africa. Makes me really wonder about the things I take for granted everyday, such as electricity. Load-shedding, a practice used to save electricity is used often and usually without notice. Adding to the problem is the egotistic attitudes of programmers, who won’t work for anyone not looking like Bill Gates :)
Here’s a nice excerpt:

After writing yet another program, you just get fed up. I mean, what happened to all those bonuses that you were promised? Why aren’t you riding in a nice flashy car like all the managers? In fact, how come the managers have so many nice cars and you are so poor? I thought I was doing good work!!!

I don’t plan to live my life earning less than $300 a month.

[You hear a little voice in your head ...]

Welcome to the real world, buddy!! Let me explain things to you, you simply have to understand. You’re a big fish in a small pond. There’s not enough water to go round, so sorry if you are feeling a little uncomfortable. After a few more years, your body will get used to it and you will become a small fish, much more comfortable you know …

Posted in coding | No Comments »

I’ve gone weather mad!

21st April 2003

Blimey, some people who know me know that I tend to obsess sometimes over things. In the same vein, I’ve positively gotten obsessed with the weather, obtaining latest readings, parsing them, storing them, displaying them, the works.

So yesterday I spent a significant amount of time writing a PHP program to parse the XML feed from InterceptVector. They provide a free weather feed for tons of cities worldwide in XML. They’ve been having problems though, sometimes the server is down, sometimes the data is incorrect (as I found to my surprise this morning!). So I verify their feed first, and if there is a problem I fall back to PHP Weather’s feed, which is more reliable.

Why use InterceptVector at all then? Well, they provide feeds from a lot more locations than just Heathrow and 1 or 2 other airports. Plus, they supply a 5-day forecast, which you can see by clicking on ‘More details’ on the left.

I’m going to add all the files required to this stuff to my Software section, in case anyone else wants to use it :)

Posted in website | No Comments »

Weather feed

19th April 2003

I’ve added an hourly weather feed to the site, using PHP Weather. I had to use the older version 1.x series as it is easier to use at the moment anyway. I wasted too much time struggling with the 2.x series trying to make it display simple temperature information.

Ironically I went running straight after I added the weather feed to the side, and had the worst run ever :( I should have known, the weather is horrible today, especially the wind. My shins are hurting now, and they never hurt before! Well, I’ll be much more careful next time.

The Slashdot and LinuxToday feeds on the right aren’t working at the moment, hopefully the weather stuff hasn’t messed them up. I’ll have to check.

Posted in website | No Comments »

London Marathon 2003

13th April 2003

Yay! The London Marathon is about to start in about 5 minutes, I’m watching it live on TV. I’ve been interested in the Marathon and running in general since I started running about 2 months ago. I’ve gone slack in the past 2-3 weeks but I hope to go running today, as the marathon has given me some inspiration :)
Information about the marathon can be found on the official London Marathon website. For anyone who wants information on running, how to start, how to avoid injury, etc, runnersworld.com is an excellent site. For UK-specific information, there’s runnersworld.co.uk.

There’s a great interview here with Paula Radcliffe, Paul Tergat, and Sebastian Coe. The questions were asked by runnersworld.co.uk members. A choice quote from Paula:

>>From Monique: Do you feel nervous?
>>Paula Radcliffe:Definitely. I think if you don

Posted in health | No Comments »

Code reviews and Peer Programming

10th April 2003

Kasia has been trying out code reviews/pair programming at her work and I do tend to agree that code reviews should be done and that they probably result in better code, i.e. code that is less full of bugs :) We don’t do much code review either at work and after reading her entry it got me thinking that perhaps we should.

When 2 developers at least are working on 2 sides of the same problem I tend to think that pair programming could be very useful. Personally it sometimes does get on my nerves, especially when we are talking about the same thing but thinking about it differently, or there is a subtle difference in what we are actually talking about.

In the end, though it does tend to keep people focused on the task at hand and forces us to quickly work out a solution or pull each others hair out ;)

Posted in coding | No Comments »

Weblogging, Journalism and the future

10th April 2003

I’ve been thinking a lot about weblogs recently, having started one of my own. After reading several of them I began to wonder what the general media thinks about them, since they allow people to skirt around the news issues that television and other media consider important, as well as put an honest spin on the important ones. Blogs like kevinsites, salam pax and the agonist are very interesting simply because they try to put an honest and very down-to-earth spin on the popular stories, in essence negating the sense of urgency that TV news anchors exhibit all the time.

I also think about how television and journalism in general might change since blogging essentially allows real people (i.e. non-media personalities) to reach us directly through their blogs. A lot of ordinary people could become celebrities or a lot of media journalists could become obsolete (I don’t think so).

Dan Gillmor posted today that he is writing a book that explores these topics I’m thinking about and a lot more. It’s called “Making the News:
What Happens to Journalism and Society When Every Reader Can Be a Writer”
, which I think is a very appropriate title. Indeed, blogging allows every reader to add his or her own comments to any discussion, resulting in a feedback loop which ends up looking not unlike a real discussion or personal talk. He has already got an outline up on his site and it is already a great read, do go and try to skim through it at least.

Posted in blogging | No Comments »

SARS

8th April 2003

We temporarily have a second modem now, still waiting for DSL. It should already be set-up now, we just need to set-up our network for it (gateways, firewalls, etc).

Dan gillmor has an interesting piece on how news about the SARS (severe acute respiratory syndrome) virus initially spread:

It wasn’t newspapers or television or radio that originally spread the word about the outbreak of a serious respiratory illness, now known as SARS, in southeast China. It was SMS — text messages on mobile phones.

It seems that the fear of the virus is adversely affecting the lives of people in the countries where the virus is more widespread. Currently this includes Hong Kong, China, Vietnam, Taiwan and Singapore. Horror stories include taxis not stopping for certain customers, nurses being told to avoid using the elevators, and people being sent home from work if suspected of being in contact with anyone who may have themselves come in contact with the virus. This Channel Asia piece sums it up well.

Posted in health | No Comments »

Moveable Type!

6th April 2003

I finally migrated the weblog to Moveable Type. It wasn’t easy, I had a lot to figure out and the biggest problem was fixing the layout of the site.

I’m using a 3-column layout and I’ve noticed that most other MT blogs use 2-columns and now I know why: divisions! I really had a hard time using divisions and trying to get the site to look right across 3 browsers. In the end, I gave up and went back to my trusted tables which never fail me.

Anyhow I now have to fix the rest of the pages (links, about me, tips, etc) on the left and I want to add a weather applet to the site (probably php). I’ve found one on mt-plugins but it’s not a dynamically updating one. I’ve had an itch to write one myself for sometime now, so I might just do that ;)
Still waiting for the DSL at the job, all four of us are sharing a *single* connection right now :) I set up the forwarding using iptables but it’s really slow at the moment. Apart from that, the office is quite nice, a bit more posh than the previous one and lots of good restaurants nearby which I have to avoid ;)

Posted in blogging | Comments Off

Office madness

2nd April 2003

Been quite mad in the office the past few days since the move. Things are still not all organized yet, such as the ADSL connection, networking cables, etc. Everyday we come in and get distracted from work slightly. I just wish it all gets sorted out in a few days or a week’s time.

At home, I managed to mess up my gateway configuration completely. I upgraded a few things in Debian and messed it up. After a reboot, the box connects to the net, but even simple name resolution or pinging doesn’t work. It’s really confused. I need to upgrade Debian fully now or re-install. Reinstalling actually gives my a chance to play around with SME Server which is a linux gateway that installs simply from a CD, similar to Smoothwall.

stupid me! I just solved the gateway problem, and there was nothing wrong with it to begin with! I spent an hour with my 7 debian CDs dist-upgrading the gateway and I found the problem was that I had rebooted the system after a very long time and it had re-initialised it’s networking configuration from the files in /etc/network/interfaces. In that file I had specified my laptop to be my gateway, which is the way it used be a very long time ago. I must have changed the default route without rebooting the machine (a good thing) and after the reboot it was looking for my laptop :( Well that goes to show that linux never needing a reboot can cause problems :)

Posted in computers | No Comments »