slant

Sitsofe's diary for April 2002

29 April, 2002

Sorting in parallel (Internet Computing coursework 2)

Hmm. I don't want to use bubble sort because it's inefficient - O(n^2). I'm a bit reluctant to use quicksort because it can't be used incrementally as the input is read - you need to put all the numbers less than the pivot on one side and all the ones greater equal to it on the other. If you have more numbers to come then your lists may not necessarily be completely sorted when you come to merge them together. I don't have to do things inclemently though - reading from a file is very fast... A comparison network based solution is out because it is unlikely that I will have enough comparators when say n > 2, not to mention the network overhead of only getting each slave to sort 2 numbers at a time. I don't yet completely understand heapsort so I'll pass on that for the meantime. Mergesort can be done incrementally and is fast - but not as fast as quicksort (on average). Quicksort can also sort in place, which could be useful. I doubt it is that useful because space isn't the main concern with this problem and arrays are going to be copied across the network anyway.

Page 37 of my Sonic's copy of the Introduction to Algorithms talks about when it is better to use the insertion sort rather than the merge sort, which occurs when the input is small.

[...] All talk of sorting algorithms now looks like a waste of time. The array class has a sort method that sorts an array in place (it uses a tuned quicksort). Well that has rendered a one night and one morning's thinking useless but has saved me writing unnecessary code.

[...] That's the slave finished. Nice and easy so far but the nasty bit is yet to come (writing the master). I've written a random number file generator (if you give it a number n on the command line then it will produce 10^n random numbers otherwise it will just produce 10). However, I think I will use a file format that has the number of numbers (!) on the first line because it makes dealing with array allocation oh so much easier.

My diary is only getting hits from boring familiar places like home and computers like cslisWhatever. Where are you Googlebot?

I need to remember to add support for turning <h> tags in XML into regular HTML headings. Oh and navigation links so I can do gestures with the mouse and travel between months.

The number of Mozilla unconfirmed bugs is rising again...

28 April, 2002

Well I found out that my ampersand problem (when Xalan transforms XML with an output format of HTML and it sees an &amp; within an href it outputs "&" rather than "&amp;") is a known bug in Xalan which doesn't seem likely to be fixed any time soon. I checked this in both the C++ and Java versions of Xalan's testXSLT but there was no difference. So I've jumped shipped to Saxon, which I used to object to because it was Java. Now I have a JDK installed there's no objection other than the fact starting a JVM for each file was slow, so I compiled a small Java program that does compiles the stylesheet and does the transformation for every file on the command line in one go. While still not as fast as Xalan C++ testXSLT (which took only 1.65 seconds to finish), I have managed to get the time down from around 22.47 seconds to 2.51 seconds (and I suspect most of that is waiting for the JVM to start).

Anyhow, the upshot is that all but one of my diary pages will validate, which is a big step in the right direction.

The NTL proxy inktomi2-car.server.ntl.com has been a bit unreliable today. Hopefully NTL will get it sorted soon.

27 April, 2002

Sun seem to have a tutorial to RMI.

I hereby nickname my current state of mind RadioHead syndrome.

Did you know Google has a dictionary feature in it (in addition to its spell checker that Britney Spears fans have obviously found useful)?

Interesting site about using bleeding edge CSS to create interesting web page layouts.

I wonder if the reason why people never get past the first page of my diary is because the navigation is at the bottom of the page. If so it proves that users don't scroll.

I will fix the validation problems in my diary when I can. One class of the problems are being caused by Xalan (the program I am using to transform my original XML into HTML). Another set are caused by my insertion of <pre> tags into <p> tags. In fact I think I'll switch from using <pre> to a style that looks fixed width because DaveB managed to break things in IE when he made the page really small.

25 April, 2002

Long rant today...

I just can't keep going. I think I've hit some sort of internal limit (at least that's what I hope) because I for the past month I've been at the stage where I just don't want to do any University work. Doing my User Interface design essay was a real tooth and claw struggle riddled with simple mistakes ("it's" instead of "its" springs to mind). Time spent doing work seems to have been substituted with time spent surfing the web. I'm not even playing on the Game Boy all that much.

Yet there is no obvious cause for this. I have not split up from a relationship (I have never been in one), no one I know has died (this year), I have not caught any work stopping physical illnesses. So there really isn't a good reason for my feeling the way I have. I doubt it's because the work is too hard (I am an able student) - I don't understand it. I have managed one evening of work on my project in months and that's it.

Someone found my Postgres backup comment useful!

I've updated this diary a bit more. I really should put it up on my main site because part of the reason I set it up was to improve knowledge searches. By linking and creating pages that answers queries I've had hopefully it will become easier for other people who have similar problems to find answers.

I really do wish Mandrake would remove the time synchronisation script that happens when my computer is shutdown. It is again causing terrible drift in the real time clock. I also wish that msec wasn't quite so annoying - it does some really strange stuff like always setting KDM to show faces when I've told KDM not to.

Whilst I'm here, something that annoyed me was the lack of response that I got on the cooker mailing list. I eventually got the hint that perhaps I was on the wrong list - they really aren't interested in 8.2 at all even if the RPMs you are using under 8.2 are the same as those currently in cooker (but not before someone else suffering the same fate put up a post). What annoys me most was that I told them that WINE did not work out of the box on 8.2 and asked whether it was because it had been compiled with -O3. There was a follow up (thanks avblokland) saying it hadn't worked since 8.1 but nothing else (yet the Codeweavers rpm worked great). Yet later, someone posted Wine doesn't work, compile with -O2 and it gets responses. Irritating.

The Swansea University netblock name still has a typo in it.

24 April, 2002

I have received a reply to my packet marking question. It turns out that Diffserv does not use the lower two bits (those are for ECN) only the upper three bits.

I've noticed that there was a loose CD at the bottom of my rucksack and it turns out that it was from the dissertation I borrowed. The CD has been scratched so much that it can't be read any more. Gah...

It looks like #kill-unco is making a difference - this unconfirmed bug chart shows that the number of active unconfirmed bugs has started to fall.

I think I'll put my diary online today. The layout and colour scheme on it will hopefully be used on the rest of the site at some point in the future.

Odd - testXSLT from the Mandrake 8.2 xalan-c RPM caused a segfault when I tried to transform the XML of my diary. Downloading the latest RPMs from cooker seems to have fixed the problem.

Long day.

23 April, 2002

There is an interesting article about Mozilla at TIME (purchase necessary).

I've discovered that Jeff Minter's Llamasoft site is finally up and working. I've downloaded the PC versions of Hover Bover II (Grand Theft Flymo) and Deflex but they don't work under WINE so I'll have to boot to Windows 98 and try them some time.

22 April, 2002

Today tr decided that because OpenBSD appeared to support all his hardware he would install it on his desktop machine (it later turned out that SBLive support wasn't added until OpenBSD 3.1). I think that while the idea has merit (it's good to be introduced to new things), it is important that he proceeds with a large amount of caution. OpenBSD is (at least initially) hard work - especially if you are used to Windows, MacOS or even your average Linux distribution. I'd say it's best suited to the sort of person who reads all of the READMEs before trying to install something new because if you don't it's going to be and even tougher struggle to get anything working. Personally, I won't go anywhere near the partitioning programming because I remember the pain I went through last time I was doing an install and it is very easy to mess up and do some real damage with it. That process is a stupidly risky thing to do if you can't afford to get it wrong a few times.

I've handed my User Interface essay into the Psychology reception because the lecturer is away until tomorrow.

I have finally decided to send a message to the ALTQ mailing list asking why my config which did packet marking using Diffserv was failing to catch all the marked packets correctly.

Spent some time looking for the RFC that describes what each of the flags in the TOS field mean. This RFC has been deprecated by the Diffserv RFC but I think the general meaning is still semi-respected.

21 April, 2002

Restored my database from the SQL backup. All I can say is thank goodness I read the PostgreSQL documentation on doing backups and did an SQL dump of the database before I formatted and reinstalled. It appears that the version of PostgreSQL shipped with Mandrake 8.2 is sufficiently different to that shipped with 8.0 that it was impossible to migrate my old database by restoring the database at filesystem level - I received a warning and a quick guide which basically told me to migrate it by doing an SQL dump :).

Here's a quick sequence of the stuff I did:
Prior to upgrading from Mandrake 8.0 to Mandrake 8.2 I used pg_dumpall > alldatabases.sql
to back up the data from Postgres (I also manually backed up the database at filesystem level but this proved to be troublesome to migrate back).
To restore the data once I had Mandrake 8.2 setup and installed I did the following: /etc/init.d/postgres start
/etc/init.d/postgres stop
(this made the /var/lib/pgsql/data directory)
I then edited /var/lib/pgsql/data/pg_hba.conf and uncommented the lines: local all trust
host all 127.0.0.1 255.255.255.255 trust
(this relaxes permissions because in order to restore data for all users, Postgres has to be able to connect as each user)
I then restarted the server with: /etc/init.d/postgres start
Next I became the postgres user by (as root) doing su postgres
I created a single table postgres by doing: createdb -T template0 postgres
and I imported the tables back in with: psql < alldatabases.sql
Now all the tables were present I tightened up permissions again by commenting out the host and local lines that was uncommented in /var/lib/pgsql/data/pg_hba.conf and finally, I started the server with /etc/init.d/postgres start

I have to admit, I was having trouble working out where they had moved the configuration file. It appears to be /var/lib/pgsql/data/postgresql.conf which is a bit against the Unix standard of configuration files being in /etc.

Read an interesting article about Usability in open source software by Havoc Penington (from Advogato).

20 April, 2002

I've discovered this newsgroup thread about dealing with the influx of bugs into Bugzilla. There was discussion about the setting up of an IRC channel to help train new people on how to farm Bugzilla which is basically what #kill-unco is currently doing. It would be great if the people who were discussing it in this thread were to hang out in the channel (I know some already do) so they can make suggestions and improvements.

Found a frustrating default configuration in Mandrake 8.2. By default the distro does not include Perl pages in it's man keyword database which is annoying enough. However, in the /etc/man.config file the options to enable additional man pages are all beneath the line containing MANPATH /usr/man which means they are never returned in a apropos search. I wasted about half and hour tracking that one down.

19 April, 2002

Well I was in for a surprise today. While doing some work on #kill-unco endico (a Netscape engineer) turned up and and explained that Bugzilla had been suffering a bit due to large numbers of heavy queries being run on it. It turned out that because people had been reloading these queries as soon as they had added a comment, Bugzilla shadow database was starting to fall out out of sync with it's main database. Someone had checked the refer logs and noticed that hits were coming from my site.

I honestly didn't think that this would happen but I did warn people not to link directly to the queries. I am well aware that Bugzilla has been slashdotted huge numbers of people all running queries are just going to make things incredibly slow. However I didn't think far enough ahead to realise that my queries would cause a problem. I had seen linked queries before on documentation pages so I went right ahead with the idea.

The queries have been taken down for now and instead a link to static page of all the old unlooked at unconfirmeds has been put up. I hope to make some sort of Perl script that caches Bugzilla query pages so that repeated hits on the same query within a short time will be to a static page on my site rather than the Bugzilla database.

Coerced into looking at lots of Mac stuff by tr. It's nice but for the prices being asked I should think it was.

17 April, 2002

#kill-unco was brought into being today. This irc channel was set up to try and do something about the huge number of unconfirmed bugs growing in Bugzilla.

It all started when I was sitting on #mozillazine not doing very much when someone commented that the number of unconfirmed bugs had risen to almost 3000. That's 3000 bugs that people have tried to submit but no one has decided whether they are really bugs or not. This sort of backlog creates a bad impression and may put people off filing new bugs in the future. It means that engineer time may wasted trying to investigate bugs that have been fixed etc. Someone commented that there should be a #kill-unco channel and I thought to myself "Yeah why not?". So I typed /join #kill-unco and because it didn't exist it sprung into being. A few people joined and we took it from there. Later, I created the FAQ to help new people understand the basics of what we were doing and speed up initial learning.

16 April, 2002

I've reinstalled Mandrake 8.2 after reformatting the main partition to Ext3. It looks like a part of the first CD or my CD drive is dodgy because while installing the kernel had a bit of trouble reading the SDL-mixer package and turned off DMA on the CD drive...

15 April, 2002

Hmm 486s simply don't respond to network packets as fast as Athlons and Durons. I noticed that whereas DaveB's computer is considered to be 0.178 ms away from my computer, roo (the router) is considered to be 0.665 ms away. I found that even a ping on roo to itself isn't faster than 0.897 ms. Weird huh?

I remember there was a time when I was looking a Beowulf clustering for the large number of 486s that seemed to be accumulating in SUCS. However it was only recommended for computers which were PIIs or faster. openMosix doesn't seem to have that limitation though so it would be interesting to see how well it would work...

After finding out that my Galeon history and bookmarks had been completely wiped out after yesterday's power cycle tests, I did a little bit more research. What it boiled down to is my choice of filesystem. ReiserFS has done everything (journalling wise) it promised to and that promise was filesystem integrity and no more fscks. What I failed to realise was that while filesystem integrity is maintained, data integrity is not (the contents of files can be easily corrupted). Doh. There doesn't seem to be anyway to repair the damage because ReiserFS currently does not keep track of file contents. For my purposes (desktop system monthly backups) this sort of journalling misses the point.

Ext3 on the other hand, does ensure data integrity (along with filesystem integrity) without the fsck so I think I will reformat and go back to it. ReiserFS may well be faster and more space efficient but I simply can't afford for the contents of my files to suddenly be corrupted just because the disk wasn't synced (for whatever reason).

I think that for a desktop systems where backups may not be run every night, data consistency is far more important than speed. Sure I could turn write caching off and stick with ReiserFS but that hit is very high - much higher than Ext3 for my day to day work I bet.

14 April, 2002

I've just updated mail on the OpenBSD router which was not the easy process that it might be with a Linux distribution. Let me explain why...

When a hole is discovered in OpenBSD, the fixes are only distributed as source code which means that the end user has to recompile the software themselves if the want said hole fixed before the next release of OpenBSD. Sadly in this case following the instructions didn't work and after doing make install I the install program was throwing up *** Error code 64
because the $BINDIR variable hadn't been set. It turns out that the Makefile within the mail directory was meant to be called by a script higher up in the directory structure and it was that Makefile that set that variable. But of course, since I have no intention (nor the space) to build every binary on the system I just downloaded the directory I needed from CVS. In the end the fix was as simple as putting: BINDIR=/usr/bin
before doing make install. Of course errors were still thrown up because it wanted to install the nroff form of the documentation too. None of this was covered in the FAQ about this though and the only other non kernel binary I've tried to patch was ssh which worked absolutely flawlessly.

OpenBSD - not for the faint hearted. It is frustrating that the recompiled binaries aren't provided but I guess they just don't have the resources to do it...

I've noticed that wtmp (the file that keeps track of who has logged in/out and when the computer was brought up/down) had become corrupted and appeared to have bits of my Galeon history inside it. Other files were also affected - my dnetc log is not consistent nor is syslog. If I remember correctly, yesterday I suffered some sort of freeze when I brought the system up and I was forced to power cycle because not even the sysrq keys were working...

13 April, 2002

This interview with Moby has something on it that I've often felt about myself - without other people I am practically nothing. My skill is not in producing new things for myself but rather helping other people to produce whatever it is they are doing. I'm a catalyst, an enhancer of other people's productivity. I think it may be worth my while reading something by William Whyte.

Hmm after reading the above article I'm reminded why I bought Play (the second album I'd ever bought for myself). I had liked listening to Honey on Mark and Lard's radio show on Radio 1 and it seemed destined to disappear without trace. Then Jo Whiley started to play Natural Blues which I also liked. However, the real clincher was when I downloaded Honey and Bodyrock from Napster (these were the first and only songs I got from Napster for myself). It was so simple an effortless on Rich's computer at University - I had both within minutes (this was long before the UK Universities banned Napster and an even longer time before the RIAA pushed it into oblivion). I had heard a bit of Bodyrock on a small Flash applet and wanted to hear the whole thing. When I found that both it and Honey were on Play I went out and bought it.

So yes, Napster actually made me buy music, music that I may not have bought otherwise.

12 April, 2002

Replaced the battery in the cooker. Now the "clicker" works about five times faster than it did.

DaveB is back but attempts to get hooked on the Game Boy have so far failed. Still, early tests suggest that he may well be susceptible...

10 April, 2002

Plunged the shower again but this time the force of the water being taken away practically sucked the plunger down. I hope I didn't break a pipe somewhere because the water really seems to be flowing faster than ever.

9 April, 2002

Back in Swansea after another trip home.

While I was at home I finished Oracle of Ages. Yes I used a walk through but only on one room in dungeon three and the last phase of the rock boss on dungeon seven.

Finally got around to moving all my old emails into a folder of their own so now pine doesn't take nearly so long to start up.

Moving a window should not make an XMMS stop :(

Wow, The GIA site is closing down and Sceneone is offline. I guess that's another two bookmarks to remove...

6 April, 2002

I'm off home again...

5 April, 2002

Popped into Uni and showed off the Game Boy. People are impressed by the colour and it's small size. An attempt to leave it with Phil ended in failure when he returned it saying he wouldn't get any work done. Alfie complained that there was too much writing in Oracle of Ages.

3 April, 2002

I've got neck ache. I should have taken more breaks when I was playing on the Game Boy...

It's really infuriating when you know that you've read something but you can't find out where you read it. I've just had that experience after Gareth said his computer kept telling him that his "System Has Recovered from a Serious Error". I knew about the problem and after a fruitless search in Galeon's history and Google, I managed to find the Knowledge Base article by searching the Microsoft support site. However, I couldn't for the life of me find the location that had tipped me off in the first place. In the end a Google search for the Knowledge Base number turned up this Winamp article Windows XP Advisory which was where I had learned about the problem. It now makes sense why it wouldn't be in the Galeon history - I was using IE under Windows to check the Winamp site because I was wondering whether there was a new version available.

2 April, 2002

Got my Game Boy Advance today :). If you are looking for videogame shop (console or PC) in Swansea, I recommend 5th Dimension (the shop is near the train station and their phone number is 01792 480702). They were selling Mario Kart Super Circuit (Reviewed at Gamespy and Gamespot) for £19.99 whereas everywhere else was selling it for £34.99. I was so pleased with the saving that I bought Zelda Oracle of Ages for £26.99. Whilst I could have bought Zelda a bit cheaper, the saving on Mario Kart has inspired instant shop loyalty in me.

It's going to be difficult to hand in the User Interface Design essay when the lecturer is on holiday and isn't coming into University. What am I going to do?

1 April, 2002

Back in Swansea... Isn't funny how most of my diary entries tend to stop at the end of March? Well this is because that's when I tend to go on holiday and when I get back I have so little free time I never get round to updating my diary and then I forget about it and...

Drew a favicon for openoffice.org.

Previous month Next month