Greg
Greg's diary
June 2006
Translate this page
Select day in June 2006:
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
Select month:
2006 Jan Feb Mar Apr
2006 May Jun Jul Aug
2006 Sep Oct Nov Dec
Today's diary entry
Diary index
About this diary
Previous month
Next month
Greg's home page
Greg's photos
Network link stats
Greg's other links
Copyright information
    
Groogle

Thursday, 1 June 2006 Echunga Images for 1 June 2006
Top of page
next day
last day

Yes another day where I can't see where the time went. I'm suspecting mail messages more than before. Sure, writing a serious technical mail message can take a while, but the research that goes into the answer takes even longer. Finally got round to answering the review messages I have had, but it took most of the day. I've decided to estimate that an in-depth mail message or reply takes an hour. That's much too high for my normal load, of course:

On 1 June 2006 you received 2857 mail messages and sent 30 mail messages.

Most of those outgoing messages are either trivial or automated, though; I only sent three or four that took more than a few seconds to write.

The day started early enough with the arrival of Shane Adcock, the electrician, to change the switch that had blown up in January. This time he didn't manage to change the wiring to a single switch before the UPS for teevee, my current video machine, died. It had been up for six months. sigh.

Also did a first cut at a macro set for using nroff to produce output text for MediaWiki. As expected, it's not much work, and I had something that looks almost correct in an hour or so. Made one discovery in the process: I had a macro P (paragraph), which in normal nroff simply inserts vertical space. In MediaWiki you don't need vertical space, but if you're in a list environment, you need to prepend the line with :, one per level of list. So the macro looks like this:

.de P
.br
.nr P*indent \n[li*lvl]
.while \n[P*indent]>0 \{\
:\c
.nr P*indent \n[P*indent]-1
\}
..

The first time round, I had a typo: the third-to-last line read:

.nr P*indent \n[P*indent ]-1

(in other words, a space after the variable name). This apparently causes groff to treat the name as containing a space, i.e. a different identifier. This, of course, meant that the macro looped, and it took a while to understand where it was dying.

In the evening, into town to the Adelaide MySQL Meetup Group meeting. On the way picked up the camera from Yana, who arrived 40 minutes late, making me late from then on; I also picked up a DVB-T tuner card from Ben Kramer, in a tearing hurry, and then back into town with far too little time. On the way, found Unley Road blocked (I later heard that there had been a fatal car accident there 45 minutes before), but somehow managed to make it on time anyway.

Presented the current state of the API document. Going through it again made me justify some of the decisions I have made, and I left with two pages of handwritten notes. There's still a lot of writing to do.


Friday, 2 June 2006 Echunga Images for 2 June 2006
Top of page
previous day
next day
last day

Lars still doesn't have VoIP working properly, so he's asked me to install Skype. I have certain reservations about using a proprietary, non-standard solution when there are perfectly good free, standards-based solutions available, but on the other hand, we need to communicate. Didn't even try to install on FreeBSD; for one thing, I don't have a machine with a sound card in easy reach, and I have had enough issues with multimedia under FreeBSD already. Installing from the web onto eucla (in its Fedora Core 5 incarnation) was an interesting experience. Just clicking almost worked:

 

https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060602/big/skype-1.jpeg
Image title: skype 1
Dimensions: 510 x 326, 24 kB
Dimensions of original: 510 x 326, 24 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Friday, 2 June 2006:
thumbnails    small images    diary entry

Unfortunately, to do it right you need to download the signature as well; otherwise you get this message:

 

https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060602/big/skype-3.jpeg
Image title: skype 3
Dimensions: 514 x 301, 30 kB
Dimensions of original: 514 x 301, 30 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Friday, 2 June 2006:
thumbnails    small images    diary entry

The web form allows you to download the signature, but gives absolutely no help installing it. I don't even know where to put it. That could definitely be improved on.

After installation, you're on your own. The web site doesn't even tell you what to do next. After some searching, discovered that it had installed it in the GNOME “Desktop”, where it finally brought up a far-too-small window (eucla has a 1920x1200 display). And it's not where I need it. Checking with ps confirmed that it's started simply as skype, so tried that. The result, on my lowest-resolution monitor, was a barely legible window with characters slightly less than 1mm wide (about 3 pt), and with input fields black on dark grey:

 

https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060602/big/skype-4.jpeg
Image title: skype 4
Dimensions: 525 x 595, 120 kB
Dimensions of original: 525 x 595, 120 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Friday, 2 June 2006:
thumbnails    small images    diary entry

For some reason it wouldn't let me enter more than 4 letters of the password I had chosen. It seems to be related to the fact that I entered a space earlier, but that doesn't make any sense.

This is Yet Another application which claims that all names I choose are taken. I can't really believe this. I tried groggy, groogle, gurgle, Ihateskype before finally being given givemevoip. Then I found that I have done this before with the name groggled, so used that instead. Finally logged in and got a screen with more tiny characters:

 

https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060602/big/skype-6.jpeg
Image title: skype 6
Dimensions: 312 x 506, 80 kB
Dimensions of original: 312 x 506, 80 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Friday, 2 June 2006:
thumbnails    small images    diary entry

This is the sort of window that leaves me feeling probably very much the way the “modern” GUI user feels when he sees:

FreeBSD (eucla.lemis.com) (ttyv0)
login:

It's really not “intuitive”, and the strange icons say nothing to me. About the only thing that is better than the login prompt is the offer of help. Selecting Help did help; it connects me to the web site that I should have been pointed to in the first place. For some strange reason it started a Konqueror, though I normally use firefox, and one instance was already running. I was also able to select sizes from the Tools bar. After changing from small to large, the text size changed from flyspeck to small (characters now 1.35 mm wide, nearly 4 pt). Why do so many programs have such enormous difficulties with text size?

Tried to set preferences, and once again was given a Konqueror. Stopped that and started a firefox. This time Skype made up for the tiny windows it normally presents and gave me a screen-filling, overlapping page with enormous texts which I couldn't shrink. After selecting “Sign in” it looked like this:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060602/big/skype-8.jpeg
Image title: skype 8          Dimensions:          1600 x 1200, 336 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Friday, 2 June 2006, thumbnails          All images taken on Friday, 2 June 2006, small
Diary entry for Friday, 2 June 2006

 

Note the overlapping text and truncated texts. Also, why does Skype set the title of all windows to “Skype?”?

As if that wasn't enough, this page decided that my password was no longer valid—though I had just logged on with it! Went through the “recover password” process yet again.

I finally got things working—almost. I called up somebody I know and got the dreaded one-way audio. I hadn't used this headset on this machine for a while, so there was a possibility that there was something wrong with it. Rebooted into FreeBSD and tried linphonec, which I had successfully used in the past. In the meantime, though I had “upgraded” the FreeBSD installation—from 7-CURRENT to 6.1-RELEASE—and I didn't have some of the libraries I needed. As so often, installing from the Ports Collection failed for reasons I didn't want to investigate, so spent some time setting up the library paths for ldconfig to include the libraries for 7-CURRENT. After that, and after setting the mixer controls, linphonec worked as well as it ever did. So it wasn't a problem with the headset. Probably it was something to do with the mixer. I know how to do that in FreeBSD; like most other Linux users, I don't know how to do it in Linux, and the instructions don't just not tell you, they don't even mention the issue.

So looked at Skype on FreeBSD. It installed out of the box, and worked. Even the tiny characters are gone, so maybe this is a GNOME issue and not a Skype issue. The only problem is that this is my Linux box, and I have to reboot it into FreeBSD to run Skype. That will need to be improved on.

Long (Skype) phone call with Lars in the evening. It looks as if we might be very close to creating code.


Saturday, 3 June 2006 Echunga Images for 3 June 2006
Top of page
previous day
next day
last day

Woke up in the night with a flash of inspiration and the complete detailed design of the online backup API in my head; got some of it down in writing later in the day, but was overtaken by other events. At least I have the warm, fuzzy feeling that I'm making headway.

Other events included installing the DVB-T tuner that I borrowed from Ben Kramer on Thursday, along with c't magazine's Debian “VDR” software. I think this stands for “Video Disk Recorder”, a term which doesn't make much sense to me: where's the video disk? I prefer to use the more descriptive term “CVR” (“Computer Video Recorder”). That hung up a surprising number of times; I wonder if the motherboard is getting even flakier. And why does Debian load the floppy driver three times in the course of installing on a system that doesn't have a floppy drive?

That, too, was interrupted by the arrival of Yana to pick up her new camera.

This was a Canon EOS 20D, the first DSLR I had ever bought.

Spent quite a bit of time setting that up and taking a number of random photos. Also gave her tomato, my Apple G3 Powerbook, to run it with.

Installing software showed yet more nonsense in contemporary software: this really expensive camera comes with a USB cable, of course, but it doesn't offer a SCSI interface. Instead, you have to use the software they provide, and it's “user-friendly”: the files on the camera show up as a “folder” (i.e. directory) in a GUI-style lists with lots of triangles representing “open” or “closed” “folders”. Yana was trying to copy to the directory /Users/yana/Photos/20060603. To do that, you select the directory on the camera and drag it to the target directory. Of course, that means you need to “open” the /Users directory, the yana directory in that display, and finally the Photos directory in that to display the directory 20060603.

The problem is that this list is so long that it can't be displayed on the screen at the same time as the camera's directories. And since you're dragging, you can't influence the scroll bar. What a stupid method! To add insult to injury, it didn't install them in the directory /Users/yana/Photos/20060603; it created a new directory and installed them in /Users/yana/Photos/20060603/100CANON/ instead. That's completely broken.

Gave Yana a compact flash adaptor for the card, after which she can do (the easy way, from the command line):

=== yana@tomato (/dev/ttyp9) ~ 77 -> cd Photos/20060603
=== yana@tomato (/dev/ttyp9) ~/Photos/20060603 78 -> cp -p /Volumes/TOSH1G0/100CANON/* .

I never cease to be amazed how complicated “user-friendly” software is.

This appears to have been a particular problem with Canon. Other makes provide a file system interface on request.

Sunday, 4 June 2006 Echunga
Top of page
previous day
next day
last day

Spent the morning writing up some recipes, then continued trying to install c't magazine's “VDR” software. I think there must be a conspiracy amongst authors of multimedia software to avoid documentation; once again, and unexpectedly for c't, the documentation was almost completely missing. During the installation I had to choose a transmitter profile, and of course they were only available for Germany (I didn't even see Switzerland or Austria). The on-screen instructions (all that I ever found) said that they could be changed afterwards, so chose one at random. At the end of the installation, the terminal under Alt-F8 was supposed to have the application; but it just produced a text-mode message saying (roughly) “this screen reserved for DVR”.

Spent a lot of time investigating and discovered:

On the positive side, I did find out how to override DHCP and use manual setup when installing a Debian system: let it do its thing, then press the back button.

Also tried KnoppMyth again. This time the installation failed consistently with an error in an installation script. I'm not sure what I did differently, but given my previous experiences, I couldn't be bothered trying more than 4 times. Gave up in disgust. This is all far more complicated than it needs to be.


Monday, 5 June 2006 Echunga Images for 5 June 2006
Top of page
previous day
next day
last day

Usual Monday routine in the morning, then more work on my backup design. Lars and others have complained that the “low-level design” section of the online backup API isn't detailed enough. Continued with the work I started on Saturday and discovered that I was making immense headway—but in writing the code, not the “low-level design”.

Is this the right way to go? All texts on programming state that you should design first, then code. I agree, but there's a point that many people miss: don't use the wrong tools. The purpose of a design is to understand what you're going to do. Then the code itself becomes trivial, as indeed it is proving to be. The issue is that a “low-level design” that looks more like pseudo-code is just that: pseudo. If you write a spec down in C, you can put it through a compiler and perform at least formal checks. With pseudo-code, you can't.

So I think that there's no particular point to write a low-level design as a coding specification; it's written in a badly defined language, and it's bound to have some issues that wouldn't have happened in the first place if it had been written in C (or some other real programming language). This doesn't mean that the design is superfluous: it can be a great form of documentation for the program. But it should be derived from the program, rather than the other way round. And with good comments in the source code (something that's far too seldom), the derivation should be simple.

Another phone call with Lars in the evening. He still doesn't have his VoIP working, and so I had to reboot eucla to FreeBSD to call him with Skype. Then I rebooted to Linux to send him the work I had done today and—it was gone! Investigation of the file system showed that the last three files updated in the directory were:

-rw-r--r--  1 grog grog     5718 Jun  3 14:59 backup.c
-rw-rw-r--  1 grog grog    59108 Jun  5 14:15 handler.h
drwxrwxr-x  6 grog grog     8192 Jun  5 14:15 .

I saved backup.c at about 17:15; the previous timestamp was where I had finished working on Saturday. Spent a lot of time looking over all machines I have for the file, without success. Rebooted Linux in single user mode to see if there was something in the file system journal, but found nothing. Only much later did it occur to me what must have happened:

What's the moral of the story? Rebooting is bad? Certainly. More backups? Not really. I back up my systems every evening at 21:00. All the changes were done today, so that wouldn't have helped. About the only consolation is that the changes are fresh in my mind, so it won't take too long to reproduce them.

Yvonne tried loading an impatient horse in the afternoon; not a good idea. It banged her head against the bar at the front of the float, giving a nice bulge over her left eye:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060605/big/yvonne-1.jpeg
Image title: yvonne 1          Dimensions:          2112 x 2816, 432 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Monday, 5 June 2006, thumbnails          All images taken on Monday, 5 June 2006, small
Diary entry for Monday, 5 June 2006 Complete exposure details

 

Fortunately it wasn't too serious.


Tuesday, 6 June 2006 Echunga
Top of page
previous day
next day
last day

Spent today catching up with the lost data from yesterday. Somehow it's difficult to maintain the same enthusiasm when you're repeating work you've already done, and at the end of the day I wasn't much further than yesterday. Well, not as much further as I had hoped.

I'm still considering how to make the “low-level design” useful. Another problem is that the real issues with most algorithms in complicated products like the MySQL server is not the algorithm itself, but how it interfaces with the rest of the system. Consider a low-level design snippet like this:

  USE dbname;

  /* Stop DDL operations */
  stop_all_ddl ();

  write_backup_header ();

  /* Start the backup threads */
  for each atend engine
    spawn_thread (backup_worker, engine);

This nicely captures what I want to do; we select a database, stop DDL operations, write a header to the output stream, and spawn one worker thread for each storage engine.

This gives a completely misleading feeling that I've achieved something. What I have really done is expand the previous paragraph to several lines of useless pseudo-code. The real issues are:


Wednesday, 7 June 2006 Echunga Images for 7 June 2006
Top of page
previous day
next day
last day

Winter is here! It doesn't happen often, but we had a (mild) frost in the night:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060607/big/frost.jpeg
Image title: frost          Dimensions:          2816 x 2112, 928 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Wednesday, 7 June 2006, thumbnails          All images taken on Wednesday, 7 June 2006, small
Diary entry for Wednesday, 7 June 2006 Complete exposure details

 

Out to Grumpys in mid-morning to watch them prepare some of their “Grumpys One” wort concentrate. 250 kg of malt in 1000 litres of wort (OG about 1060). After all my step infusion and decoction mashes, their single infusion mash looks relatively primitive:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060607/big/mash-3.jpeg
Image title: mash 3          Dimensions:          2112 x 2816, 656 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Wednesday, 7 June 2006, thumbnails          All images taken on Wednesday, 7 June 2006, small
Diary entry for Wednesday, 7 June 2006 Complete exposure details

 

Still, the resultant beer is good, and that's what counts. Spent quite some time talking technical details with Thomas, including heat considerations. Their HLT (Hot Liquor Tank) holds 1000 litres and has 30 kW in heating elements, and it takes hours for it to reach a boil. A HERMS (Heat-Exchanging Recirculating Mash System) isn't much use if it can't change temperature relatively quickly.

Continued work on the backup API. I'm pretty much done with the logic; now I need to look at interfacing, which could take longer. Set up a test server with debug tracing enabled to investigate what happens when the client issues specific commands:

When I find something interesting in the trace, I can then put the server into the debugger and look more carefully. For example:

  1. In the client:

    mysql> select * from nothing;
    ERROR 1146 (42S02): Table 'test.nothing' doesn't exist
  2. In the corresponding trace, I find:

    +T@4271008: | <mysql_parse
    +T@4271008: | info: query ready
    +T@4271008: | >net_send_error
    +T@4271008: | | enter: sql_errno: 0  err: Table 'test.nothing' doesn't exist
    +T@4271008: | | >send_error_packet
  3. I can then start a gdb and attach it to the running server, then run the query again:

    === grog@eucla (/dev/pts/2) /home/MySQL/5.1-Online-Backup 6 -> ps aux | grep mysqld
    grog     19834  0.0  2.4 111436 25588 pts/1    Tl   Jun07   0:01 /home/MySQL/5.1-Online-Backup/sql/mysqld  ...
    === grog@eucla (/dev/pts/2) /home/MySQL/5.1-Online-Backup 7 -> gdb sql/mysqld
    GNU gdb Red Hat Linux (6.3.0.0-1.122rh)
    ...
    (gdb) attach 19834
    Attaching to program: /home/MySQL/5.1-Online-Backup/sql/mysqld, process 19834
    (gdb) b net_send_error
    Breakpoint 1 at 0x823ab86: file protocol.cc, line 60.
    (gdb) c
    Continuing.
    [Switching to Thread 4271008 (LWP 19896)]

    Breakpoint 1, net_send_error (thd=0xa36c420, sql_errno=0, err=0x0) at protocol.cc:60
    60        NET *net= &thd->net;
    (gdb) bt
    #0  net_send_error (thd=0xa36c420, sql_errno=0, err=0x0) at protocol.cc:60
    #1  0x0826c3b0 in dispatch_command (command=COM_QUERY, thd=0xa36c420, packet=0xa3e0af1 "select * from nothing",
        packet_length=22) at sql_parse.cc:2114
    #2  0x0826c708 in do_command (thd=0xa36c420) at sql_parse.cc:1548
    #3  0x0826cb01 in handle_one_connection (arg=0xa36c420) at sql_parse.cc:1190
    #4  0x007763b6 in start_thread () from /lib/libpthread.so.0
    #5  0x006ba33e in clone () from /lib/libc.so.6
    (gdb) f 1
    #1  0x0826c3b0 in dispatch_command (command=COM_QUERY, thd=0xa36c420, packet=0xa3e0af1 "select * from nothing",
        packet_length=22) at sql_parse.cc:2114
    2114        net_send_error(thd);
    (gdb) l
    2109
    2110      /* report error issued during command execution */
    2111      if (thd->killed_errno() && !thd->net.report_error)
    2112        thd->send_kill_message();
    2113      if (thd->net.report_error)
    2114        net_send_error(thd);
    2115
    2116      log_slow_statement(thd);
    2117
    2118      thd->proc_info="cleaning up";

Thursday, 8 June 2006 Echunga
Top of page
previous day
next day
last day

More work on the API code today; things are slowing down, as I expected: I'm now looking at how to interface to the storage engines. That means a lot of code reading, in the process adding a few comments to explain what is going on. That took up most of the day, but at the end of it I had a feeling that I understood it much better.

Another 2 hour call with Lars in the evening.


Friday, 9 June 2006 Echunga Images for 9 June 2006
Top of page
previous day
next day
last day

Long mail message from Lars in the morning, with a long list of things that needed to be fixed in the Online Backup specification. I've been pushing changes ahead of me for quite a while, and today I found one good reason why: it took me all day to review about a third of the document. Part of that is, of course, that it's so much in need of review, but it's still a pain.

Another long phone call with Lars in the evening. Looks like this will be a daily thing for the next couple of weeks at least.

While working on the design, was interrupted by some loud laughing from a pair of kookaburras in the gum tree just outside the house:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060609/big/kookaburra-3-detail.jpeg
Image title: kookaburra 3 detail          Dimensions:          932 x 611, 144 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Friday, 9 June 2006, thumbnails          All images taken on Friday, 9 June 2006, small
Diary entry for Friday, 9 June 2006 Complete exposure details

 

The last time this happened to me was when I was designing the RAID-5 code for Vinum, and at the time I wondered if it was an omen. In any case, though the RAID-5 code was some of the most complicated code I have ever written, it has also been some of the most reliable; I've never heard of any error there. If it is an omen, it might be positive. On the other hand, I'm wondering whether they're planning to nest in the tree, and if so, whether I like the idea or not. They're noisy animals.


Saturday, 10 June 2006 Echunga
Top of page
previous day
next day
last day

Why am I so tired? Looking back at the last few weeks, I suppose that's obvious. Finally I seem to have had enough time to catch up on my sleep, so today got up late and went to bed early.

In between that, bottled some beer and tried to install Ubuntu “Dapper Drake” on ceeveear. It hung during install—not the first time that this has happened. I'm coming more and more to the conclusion that many of these problems are with the motherboard. Or is it the processor? Or memory?

Looking at the history of this motherboard, I note:

So what's defective? Motherboard? Processor? Memory? I've had all three in the past. The easy one to test is memory. Downloaded Memtest86+, burnt an ISO and let it run. By the time I went to bed, some hours later, it had not found any errors.


Sunday, 11 June 2006 Echunga
Top of page
previous day
next day
last day

Three Yemeni hostages at the American Concentration Camp in Cuba have committed suicide. Given the inhumane conditions, it's not surprising. What really galled me, though, was a statement by Rear Admiral Harry Harris, the commander of the camp, who is reported to have said: "I believe this was not an act of desperation, but an act of asymmetrical warfare waged against us".

On a superficial level, this is silly, of course. The whole justification that the USA use for the camp is that these are terrorists, not soldiers, so they claim that the Geneva Convention does not apply. In that case, as Yvonne observed, it would have had to have been an act of terrorism.

On a more serious note: I don't often comment on politics, but this really turns my stomach. 70 years ago the Germans ran concentration camps, and after their defeat, who hunted down and prosecuted everybody involved? First and foremost the Americans. Where is their concern now, when they are doing the same things themselves? Where are the ideals which they claim to hold so dear? And where is the plain common sense that should tell the US military that persecuting people isn't a way to end terrorism?

I had intended to brew today, but I'm still so tired, so decided to postpone it. It's not as if I didn't do anything; I still had some kimchi to make, and in the process discovered lots of duplicate packages of herbs and spices. Tidied that up; some of this stuff is really ancient. Found some dried sage with a “best by” date of December 1993, and some mustard seeds with a label written by my first wife, Doris, with whom I split up 24 years ago. The seeds must have been quite a bit older than that.

After that, instead of watching TV, I somehow ended up writing some significant new stuff for Wikipedia about the Citroën DS 19. Why can't I just relax for once?


Monday, 12 June 2006 Echunga
Top of page
previous day
next day
last day

Queen's Birthday holiday today, spent mainly brewing beer. We had intended to go riding, but it was too cold.


Tuesday, 13 June 2006 Echunga Images for 13 June 2006
Top of page
previous day
next day
last day

Back to work after a long weekend is even more of a drag than most Mondays. In addition, I seem to be getting nowhere with my review of the Online Backup specification. Somehow I'm reminded of what I know of Brooks' “The mythical man-month”. I suppose it's about time I read the book.


Wednesday, 14 June 2006 Echunga
Top of page
previous day
next day
last day

Up early this morning to complete my worklog stuff ahead of a meeting of the ICT Council for South Australia. Yesterday Microbits, a local systems integrator, closed down, and we had the ABC news team in to take some video and interview David Raffen; it appeared on the evening news.

Back home and caught up on my review mail. Things seem to be calming down again.


Thursday, 15 June 2006 Echunga Images for 15 June 2006
Top of page
previous day
next day
last day

How I hate broken web sites! But I seem to be one of the few. Once again had to access the FreeBSD web site, which was “modernized” about 8 months ago (i.e. layout made to overlap, ridiculous font sizes, text lines a multiple of the screen width). Mentioned this on a BSD IRC channel and found little agreement. It seems that people have given up on traditional values and find it good to have to mess around to read things. Here some of my objections and the responses I received:

Sigh We're such a long way from having good presentation on the web that it's not funny. As long as people don't understand that it's a problem, it won't be fixed. And until it is, we're not going to get monitors that can display digital camera images in native resolution (currently from 6 MP to 11 MP).

Finally gave up on my memory test on ceeveear and sent Yvonne into town for a new motherboard. The memory test had been running for 115 hours, done 183 passes and found no errors; a far cry from the results I got on Opterons last year.

In fact, a “new” motherboard for a 32 bit machine (in this case, Athlon XP) is almost impossible to find. Almost overnight everything has become 64 bit. That's a serious issue if you have a 32 bit processor, of course; and the sorry state of multimedia seems to be even worse on 64 bit processors.

Apart from the motherboard, Yvonne brought back a couple of wireless mice, USB devices with very small dimensions—and despite promises, no middle button. Well, you can press on the scroll wheel, but for that you first need your middle finger cut off at the second joint. When will mouse manufacturers adapt to human hands?


Friday, 16 June 2006 Echunga Images for 16 June 2006
Top of page
previous day
next day
last day

Things are gradually quietening down; as usual in such times, spent much of the day catching up on other issues. Also spent far too much time trying to code in pic a diagram of the control flow between the threads of the backup server. pic reminds me of Nehru's comment about democracy:

Democracy is good. I say this because other systems are worse.

Still, within limits it does allow me to do both a PostScript version and a plain text version:

 
https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060616/big/pic.gif
Image title: pic
Dimensions: 675 x 321, 4 kB
Dimensions of original: 675 x 321, 4 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Friday, 16 June 2006:
thumbnails    small images    diary entry
                      Server        At end engines   At start engines
                         |                 |                 |
           Write header  |                 |                 |
                Prepare  +----prepare------+                 |
                         +-----------------+-prepare---------+
                         +----prepared-----+                 |
                         +-----------------+-prepared--------+
                         |                 |                 |

I still need to work out why the plain text version looks so bad. In particular, the arrowheads are missing. That shouldn't be the case with this input:

.\" At end engine prepare
       arrow right colwid from P1 "prepare" above
       arrow from P3+(colwid,0) to P3 "prepared" above
.\" At start engine prepare
       arrow right atstartwid from P2 "  prepare" ljust above
       arrow from P4+(atstartwid,0) to P4 "  prepared" ljust above

Saturday, 17 June 2006 Echunga Images for 17 June 2006
Top of page
previous day
next day
last day

Into the office this morning to find that I had 33 MB of mail:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060617/big/mailcount-week.png
Image title: mailcount week          Dimensions:          1600 x 1200, 18 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Saturday, 17 June 2006, thumbnails          All images taken on Saturday, 17 June 2006, small
Diary entry for Saturday, 17 June 2006

 

The daily output from echunga was 30 MB in size, mainly a printout of the mail queue. After stopping the MTA, ran mailq, which ran for 22 minutes before printing at the end:

695A213C2CE     5793 Sat Jun 17 02:10:32  MAILER-DAEMON
                                         bzvrc@hotmail.com

6EA4613C2DC     5800 Sat Jun 17 02:10:32  MAILER-DAEMON
                                         cizzmikfip@hotmail.com

6478C14236C     5807 Sat Jun 17 02:10:36  MAILER-DAEMON
                                         himvwwezjgnkqi@hotmail.com

-- 564253 Kbytes in 114058 Requests.

The entries in /var/log/maillog showed that they had mainly come from addresses that don't resolve, or that resolve to ADSL lines. Looks like a DDoS attack; I wonder how hotmail is handling this: they'll be getting all the bounces. After some consideration about how to get rid of the bounce messages, decided to let them take their course.

Many of these messages were from systems with no reverse DNS, so I'm now once more rejecting host names which don't map. I suppose a few “innocent” people with misconfigured mail systems will be hit too, but this is ridiculous. It's only a partial solution, too. One of the worst offenders does have reverse lookup:

Jun 16 18:42:35 wantadilla postfix/smtpd[5036]: NOQUEUE: reject: RCPT from
  62-15-241-180.inversas.jazztel.es[62.15.241.180]: 550 <ba@lemis.com>: Recipient
  address rejected: User unknown in local recipient table;
  from=<inzdxbh@hotmail.com> to=<ba@lemis.com> proto=ESMTP helo=<mx4.hotmail.com>
Jun 16 18:42:35 wantadilla postfix/smtpd[5742]: NOQUEUE: reject: RCPT from
  62-15-241-180.inversas.jazztel.es[62.15.241.180]: 550 <bb@lemis.com>: Recipient
  address rejected: User unknown in local recipient table;
  from=<dqxgqvfzbue@hotmail.com> to=<bb@lemis.com> proto=ESMTP helo=<mx4.hotmail.com>
Jun 16 18:42:35 wantadilla postfix/smtpd[5743]: NOQUEUE: reject: RCPT from
  62-15-241-180.inversas.jazztel.es[62.15.241.180]: 550 <bc@lemis.com>: Recipient
  address rejected: User unknown in local recipient table;
  from=<wihzopixszevvtud@hotmail.com> to=<bc@lemis.com> proto=ESMTP helo=<mx4.hotmail.com>

Wouldn't it be nice to have a way to recognize ADSL lines and reject mail from them?

Put the new motherboard in ceeveear. It's not at all new; in fact, it's so old that it can't correctly identify the Athlon XP+ 2500 processor that I'm using, and it runs at half speed. I've also had to scrape up some SDRAM because it doesn't take DDR. But it runs, and the hangs I had before no longer occur. I still couldn't get the “VDR” software to do anything useful, though, and this brain-dead setup is such a pain that I gave up after installing X and discovering that the configuration routines couldn't recognize my nVidia 6200-based board and wanted all the horrible configuration rigmarole that you used to have to supply years ago.

Tried KnoppMyth, which installed this time (another difference from two weeks ago), but it forgot to install the boot loader. What a pain this stuff is! Installed FreeBSD 6.1-PRERELEASE and started building -STABLE: at the speed this processor is running, it took the rest of the day before hanging on NFS access to echunga. That never used to happen.

In the evening, did some experimental cookery, pancakes with meat filling. Not uninteresting, but I'm not done with experimentation yet.


Sunday, 18 June 2006 Echunga Images for 18 June 2006
Top of page
previous day
next day
last day

Finally I've gone riding again! I suppose it's an indication of how busy I've been that I haven't been on a horse since 2 January, and even then only briefly. It shows, too; Darah was completely out of condition, and once again we only rode for an hour. Time to ride more often.

More work on ceeveear, the computer video recorder that I'm trying to build. Got a fractionally newer version of KnoppMyth, which refused to exit the partition menu during a manual install. Gave up on that, grabbed another (“empty”) disk and installed on that using the “automatic” install. That worked, and it even recognized my nVidia 6200-based card and installed a driver on it which set contrast so flat that I could barely recognize anything. Put in an nVidia 4000-based card and it worked. MythTV still has one of the strangest user interfaces I have ever seen, and I still wasn't able to get it to “open” the video card. xawtv found it (though at the time I didn't have an antenna connected), so it looks like my next job is to learn how to set up MythTV.


Monday, 19 June 2006 Echunga Images for 19 June 2006
Top of page
previous day
next day
last day

I'm getting to hate Mondays; there's just too much routine work to do. Maybe I should move some of it to Fridays. After getting the administrative stuff out of the way, spent some time finishing the documentation of the handler interface. I had hoped to define the additional functions, but that's going to have to wait until tomorrow.

Wyeast supplies its yeast in “smack packs”, sealed metal foil packets with yeast and nutrient in two separate parts of a separate plastic sachet inside. To start the yeast off, you “smack” the pack to cause the inside package to rupture and the yeast to mix with the nutrient. Depending on the age of the yeast, it can take from a day to a week for the yeast to come to life, causing the outside package to swell up. I really don't like the method; it's very difficult to decide whether the interior package has ruptured or not.

On Saturday, I smacked a package of Weihenstephan W68, and it didn't swell as much as usual. Finally decided to put it in a starter and discovered that I had only half opened the package:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060619/big/yeast.jpeg
Image title: yeast          Dimensions:          2816 x 2112, 800 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Monday, 19 June 2006, thumbnails          All images taken on Monday, 19 June 2006, small
Diary entry for Monday, 19 June 2006 Complete exposure details

 

It doesn't seem to have done the yeast any harm not to have the nutrient, though.


Tuesday, 20 June 2006 Echunga
Top of page
previous day
next day
last day

I've been trying to resolve a problem auction with PayPal for over a month now. First they asked me to get a quote stating that the camera was defective, then asked me to send it back at my cost—both fees that they would not refund. After sending it back, I had to send them the tracking number, by fax. That happened at the end of last month, and I got a message back stating:

Date: Sat, 03 Jun 2006 09:20:35 -0700
From: service@paypal.com.au

We are currently in the process of investigating your claim:

After review of your fax,  I show the return tracking is invalid.

You have stated, you have returned the item back to the seller.  Please
provide the shipping company and the online tracking number of the returned
item.

Failure to respond to this email within 3 days may result in this case
being closed in the sellers favor.

So I did that, and got a reply which appears to have been computer generated. All attempts to contact a human being at PayPal failed, and finally today I got a message:

Date: Mon, 19 Jun 2006 06:00:47 -0700
From: service@paypal.com.au

We have concluded our investigation into your Buyer Claim.

Based on PayPal's definition of significantly not-as-described, this claim
does not qualify for a refund.We found the seller to have accurately
represented the item(s) in question.

What nonsense! PayPal seems to work well enough under normal circumstances, but they seem to have people in the claims department that fail the Turing test. Finally found a phone number and called them up; Felix at the other end was definitely human, so far the first evidence of humanity I've seen in their resolution department. He didn't understand it either, and so I had to do more faxing (with the line dropping every time after the first page) of the proof of receipt. What a pain! Is this the way of the 21st century?

While removing a USB device from wantadilla, it spontaneously reset. I've been meaning to upgrade to FreeBSD 6.1 for some time, but I had had problems with a display card. Now I had a new card, so decided to finally take the plunge. With the new nVidia 6200 card (the one that showed inadequate contrast with KnoppMyth on Sunday), X ran fine, and spent the rest of the day trying to install ports. I still can't install firefox: it depends on some GNOME components, and somehow the build doesn't work right.

Despite everything, managed to get my first cut of the design of the handler interface for the online backup written up; possibly a little too hastily: Lars tore it to shreds during the evening. sigh.


Wednesday, 21 June 2006 Echunga
Top of page
previous day
next day
last day

Things are working relatively well with the new wantadilla, but firefox still refuses to build. Attempts to install some of the myriad GNOME components didn't work either. Finally tried a pkg_add -r, which finds a remote binary package and installs it. That worked! Somehow the Ports Collection isn't what it used to be, though probably cans of worms like GNOME don't help.

Another message from PayPal in the evening:

Date: Tue, 20 Jun 2006 23:22:55 -0700
From: complaint-response@paypal.com

Dear Greg Lehey,

We have received the tracking information you submitted in reference to the
following complaint:

...

The information you supplied is insufficient for us to track the shipment
of the merchandise.  As a result, we are unable to grant your claim appeal
at this time.

If you have any further questions, please feel free to contact us again.

The obvious conclusion: PayPal's guarantees are worse than useless. They have caused me to return the merchandise, and they now refuse to accept the proof. This means that I no longer have the merchandise, and that I can't get the money back. Tomorrow I'll investigate the legal implications.

Work on the backup code is getting into detail; hopefully there'll be some kind of milestone by the end of the week.


Thursday, 22 June 2006 Echunga
Top of page
previous day
next day
last day

Much time on the phone this morning with PayPal. Spoke first to “Gurkha” (is that really his name?) who told me that the case had been closed because I had not provided suitable evidence. I pointed out that I had provided all evidence required in a court of law, and asked him if he would prefer the vendor's head on a pike, but of course that exceeded his vocabulary by even more than the concept that a complaint about their actions can't be resolved by describing their actions. Got an address to serve legal documents (Locked Bag 10, Australia Square, PO Sydney NSW 1215), which also got what attention he was able to muster. On the second attempt he passed me on to his supervisor, Jub, who was more sensible. She said that it needed escalation, and that I would be contacted by tomorrow evening.

Work on the backup implementation continues; I now have of the code for the storage engine interface in place.

Edwin DeSouza had been nagging me about various web pages on the subject of online backup; one, on the Microsoft Developer Network, claims that it's bad to optimize your backup strategy for backup speed.

That's an interesting issue, and one that we thought about early on. We decided that, in general, it is good to optimize your backup strategy for speed. One size doesn't fit all, of course, but:

This is only peripheral to the tenor of the article, though. The author is primarily trying to get people to think through their strategy, and the title basically refers to one example. One way to speed up backups is to do incremental or differential backups, or log backups. The example of recovering a database from a month-old backup and a month's worth of log backups makes my hair stand on end, and that's probably the intention. At least it gets people to think about the issues, and that can only be good.

To reinforce this viewpoint, the author wrote a second article about the different reasons for making backups; though he doesn't compare his statements there with the other article, he does state that archival backups don't need to be so frequent. And that frequently means faster backups.

The question is, which kind of backup is more common? You'd think the disaster recovery scenario is more important, but even there there are two kinds:

I don't have the overview myself, but people whom I respect tell me that the main use of backups nowadays is for archival purposes. We're using that as the basis for design decisions for the backup software, though it will be on a per-storage-engine basis: most transactional engines will do a “dirty backup” of the table (i.e. copy the table data without regard for consistency), followed by the redo log for the duration of the backup. Restore will then restore the dirty table and perform a recovery operation on it. This is slower than just restoring clean data, but it makes the backup much faster. I'd be interested in feedback on this approach.


Friday, 23 June 2006 Echunga Images for 23 June 2006
Top of page
previous day
next day
last day

I don't believe it! Only last month I was complaining about firefox brain-death, but now they've made it even worse! I tried to view a PDF document with the newly installed firefox, and was presented with the following dialogue box:

 
https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060623/big/firefox-4.jpeg
Image title: firefox 4
Dimensions: 634 x 450, 128 kB
Dimensions of original: 634 x 450, 128 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Friday, 23 June 2006:
thumbnails    small images    diary entry

Last month I complained that firefox had broken the pathname into directory name and file name; now they've made it even worse. There is NO WAY to enter a file name. And of course, they still completely ignore the concept of search path for executables and offer me a directory containing ancient pre-Microsoft DOS as a potential candidate to view PDFs.

It didn't even give me any idea of how to find the executable. Went looking and found that my preferences are stored in a directory /home/grog/.mozilla/firefox/07vn6ri5.Default User/ (yes, with spaces in the path name!). Just getting there was difficult:

=== grog@wantadilla (/dev/ttypm) ~ 1 -> cd .mozilla/firefox/07vn6ri5.Default\ User/
bash: cd: .mozilla/firefox/07vn6ri5.Default: No such file or directory
=== grog@wantadilla (/dev/ttypm) ~ 2 -> command cd .mozilla/firefox/07vn6ri5.Default\ User/
=== grog@wantadilla (/dev/ttypm) ~/.mozilla/firefox/07vn6ri5.Default User 3 ->

The background here is that I have a bash macro that changes the title on the xterm to display the directory name, using the /usr/ports/x11/xtset/ program. That strips off the \ in the input above, so it ends up with two parameters and tries to change to the first. This is indicative of the stupidity of using spaces in file names; they don't buy you anything, but they limit you in what you can do. Not coincidentally, it also broke the Emacs macro that I use when writing this diary to highlight the prompt colours.

In this directory I found a file mimeTypes.rdf which included the line:

                   NC:path="/compat/linux/usr/local/Adobe/Acrobat7.0/bin/acroread"

With the help of wh, another script, I established:

=== grog@wantadilla (/dev/ttypm) ~/.mozilla/firefox/07vn6ri5.Default User 5 -> wh acroread
-r-xr-xr-x  1 root  wheel  2574 Jun 20 17:04 /usr/X11R6/bin/acroread

wh is pretty much like which(1), of course; the difference, apart from the ls -l format, is that it shows all executables in the path in sequence, not just the first one; this can be useful when things are behaving strangely because you're not executing the file you think you're executing.

So the problem was that the location of the executable had changed. No problem for a shell, but fatal because of firefox's brain-dead ignorance of PATH. Tried changing the pathname, with no success. Finally, quite angry, followed a maze of twisty little menus down to /usr/X11R6/bin/acroread. That worked, of course, but why have we been taken back to the stone age? Then went and compared the “before” and “after” state of the file:

--- mimeTypes.rdf~      Fri Jun 23 11:14:16 2006
+++ mimeTypes.rdf       Fri Jun 23 11:13:57 2006
@@ -112,8 +112,8 @@
                    NC:prettyName=""
                    NC:path="" />
   <RDF:Description RDF:about="urn:mimetype:externalApplication:application/pdf"
-                   NC:path="/usr/X11R6/bin/acroread"
-                   NC:prettyName="acroread" />
+                   NC:prettyName="acroread"
+                   NC:path="/usr/X11R6/bin/acroread" />
   <RDF:Description RDF:about="urn:mimetypes">
     <NC:MIME-types RDF:resource="urn:mimetypes:root"/>
   </RDF:Description>
@@ -211,7 +211,7 @@
   <RDF:Description RDF:about="urn:mimetype:handler:application/pdf"
                    NC:alwaysAsk="false"
                    NC:handleInternal="false"
-                   NC:useSystemDefault="true"
+                   NC:useSystemDefault="false"
                    NC:saveToDisk="false">
     <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/pdf"/>
   </RDF:Description>

The first set of diffs are just a change in sequence; the real difference is to unset “use system default” (which for some reason is also set to a null string). Why does this have to be so difficult? Are people losing all sense of reason?

Spent the day working on the handler interface for online backup. Finally found a list of handlers (an array, in fact) in sql/handler.cc:

/* While we have legacy_db_type, we have this array to
   check for dups and to find handlerton from legacy_db_type.
   Remove when legacy_db_type is finally gone */
handlerton *installed_htons[128];

This is in the current version of 5.1, which hasn't been released yet; it looks as if it will change. There's also a reference to an array handlertons[], but that doesn't exist beyond the reference. Maybe I should take some time to do a tidy up here.


Saturday, 24 June 2006 Echunga Images for 24 June 2006
Top of page
previous day
next day
last day

firefox continues to infuriate me. Spent some time this morning trying to work out a good recipe for coconut chutney, and printed out the draft. The print settings had apparently been set to default—in this case, 15 point characters. What kind of default is this? Investigated and discovered that firefox has no idea at all about the basics of page layout:

 
https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060624/big/firefox-2.jpeg
Image title: firefox 2
Complete exposure details
Dimensions: 438 x 449, 64 kB
Dimensions of original: 438 x 449, 64 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Saturday, 24 June 2006:
thumbnails    small images    diary entry

Instead of point sizes, it talks in percentages—presumably of some undefined ”page size”. It seems independent of the size of the display, which is some consolation, anyway.

While experimenting with the settings, decided to print to a file. What directory was I offered? bin!

 
https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060624/big/firefox-4.jpeg
Image title: firefox 4
Complete exposure details
Dimensions: 543 x 222, 44 kB
Dimensions of original: 543 x 222, 44 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Saturday, 24 June 2006:
thumbnails    small images    diary entry

Why bin? Which bin? The one to throw firefox into? It didn't say, of course. Tried printing there—I didn't have permissions—to see what the error message was, but—there wasn't one. Where did it go? I searched the entire disk for a file, and that didn't exist either. It seems that firefox just ignored the problem.

Set the directory to /var/tmp (sorry, tmp) and was able to print to a file. Sort of:


https://lemis.nyc3.digitaloceanspaces.com/grog/Photos/20060624/big/firefox-3.jpeg
Image title: firefox 3          Dimensions:          1249 x 1518, 304 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Saturday, 24 June 2006, thumbnails          All images taken on Saturday, 24 June 2006, small
Diary entry for Saturday, 24 June 2006 Complete exposure details

 

For some reason, some characters were swapped. When I repeated the print (having to fill out “print to file” and the file name again), it printed correctly. I don't know what causes that, except maybe that the first time I overwrote an existing file.

I use the word “correctly” loosely. The line spacing was too small, and the margins were incorrect. Although I had selected DIN A4 and “metric” margins of 12.7mm, it printed the headers and footers on the edge of the paper, where most laser printers can't print anything. When I tried to print out my diary entry, it produced a page break after the header. On investigation, it proved to be this line:

    <div align="justify">

Taking that out made the right margins ragged, of course, but the page break was gone. It didn't occur under opera, so I'd say that this is yet another bug in firefox.

Once again I'm left wondering how so much breakage can occur. We have at least:

This is the future of web browsers? O brave new world, That has such people in't! I've come to the conclusion that they made firefox extensible so that the team can say “If you don't like it, it's in your power to fix it”. This makes life easier for the team, but that's about the only advantage. It's certainly no excuse for writing such patently bad software.

After that, I had intended to do some work on getting MythTV to work, but decided I had had one frustration for the weekend, and did some cooking instead. That was no better: my coconut chutney was a disaster. At least, it tasted nothing like what I was aiming for. One factor is probably the way it's made: you can't grind coconut in a blender. I used our meat mincer instead, but the result left something to be desired.


Sunday, 25 June 2006 Echunga
Top of page
previous day
next day
last day

Another day where I didn't feel like doing anything with computers. Went out riding again, once again in the Peter Creek Road part of Kuitpo forest; this time Darah was more her usual self, though she's still pretty out of condition.


Monday, 26 June 2006 Echunga
Top of page
previous day
next day
last day

Printing with acroread failed with the message /compat/linux/usr/bin/lpr does not exist. Correct; it seems that the newer versions of Linux don't include it, probably because they use the can of worms that is CUPS. I've already established that the standard /usr/bin/lpr doesn't either; I get the same message, incorrect in this case. However, managed to work around the problem:

=== root@wantadilla (/dev/ttyp9) ~ 77 -> ln /usr/bin/lpr /compat/linux/usr/bin/

Today I had two meetings that I didn't really want to happen today: the ACS opened a new office in Adelaide, and in conjunction I was invited to lunch with the president. Then, despite our resolution at the last meeting, the ICT council had another Monday meeting.

Things didn't quite go according to plan: these are “dress up” events, where I need to wear a suit and tie, and even more difficult for me, shoes. Got a phone call just before leaving, with the result that I left in a bit of a hurry. I was already on the other side of Adelaide before I realized that I had left my shoes behind, an “accident” that prevented my attendance.

The ICT council meeting was in a bit of a hurry; presented an item about current intellectual property issues in Australian law, but we were in a hurry, and I sensed a bit of an impression that this is an “open source” (i.e. pimply teenagers and communists) initiative. People need to think out a description that is understandable to business people.


Tuesday, 27 June 2006 Echunga
Top of page
previous day
next day
last day

Why doesn't man work on eucla, my Fedora Core 5 work machine? For some time I've been getting things like:

=== grog@eucla (/dev/pts/1) /home/MySQL/5.1-Online-Backup/mysql-test/var/log 29 -> man fsync
sh: -c: line 0: syntax error near unexpected token `)'
sh: -c: line 0: `(cd /usr/share/man && (echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/m
an/man2/fsync.2.gz'; echo ".\\""; echo ".pl
(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff
-c --legacy ISO-8859-1 -mandoc 2>/dev/null | )'
Error executing formatting or display command.
System command (cd /usr/share/man && (echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man
/man2/fsync.2.gz'; echo ".\\""; echo ".pl
(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c
 --legacy ISO-8859-1 -mandoc 2>/dev/null | ) exited with status 512.
No manual entry for fsync

That looked like some kind of file corruption, so set to to look for it. strace seemed to be the obvious starting point, and fortunately I had another Linux box to read the man pages on. Found that:

So, this is Open Source, right? Well, sort of. With FreeBSD I would fix things, but here I don't have the sources. I could get the sources, but then I wouldn't be sure that they matched, and there doesn't seem to be an obvious way to return the fix. I suppose I should enter a bug report, but that's no better an option than closed source.

More work on the handler interface for the backup system. It's fascinating how relatively minor changes require complete restructuring.


Wednesday, 28 June 2006 Echunga Images for 28 June 2006
Top of page
previous day
next day
last day

More coding today; spent most of the day writing the handler interface. Nothing of great interest in the process.

Finally got round to investigating why my secondary MX mail bounced last week. Finally found the postfix variable mynetworks_style, which appears to be new; it didn't appear at all in my old main.cf. It was set to host, which had the effect of making all other systems on the local net to appear to be remote and thus untrustworthy. This modification solved the problem:

--- main.cf     2006/06/24 01:13:09     1.31
+++ main.cf     2006/06/28 06:03:01
@@ -240,8 +240,8 @@
 # only the local machine.
 #
 #mynetworks_style = class
-#mynetworks_style = subnet
-mynetworks_style = host
+mynetworks_style = subnet
+# mynetworks_style = host

 # Alternatively, you can specify the mynetworks list by hand, in
 # which case Postfix ignores the mynetworks_style setting.

Thursday, 29 June 2006 Echunga
Top of page
previous day
next day
last day

Spent most of the day walking through the parser to get an idea of how to write the parser code for backup. There are some good functions in there, but finding my way around the source tree (one of my perennial issues) has proved less good than I would like. etags seems even less useful than previously, possibly because of all the C++ code in MySQL. Two years ago I started looking at source code navigation tools, and since then nothing much seems to have changed. Downloaded GNU global, but didn't get as far as using it properly.

I've been keeping this diary in RSS form for some months now, and it's been satisfying the RSS Validator for a while, but my feed to Planet MySQL still doesn't work right. Spent some time looking at that with Arjen; it would help to have a definition of what the aggregators want to see.


Friday, 30 June 2006 Echunga
Top of page
previous day
next day
last day

If there's one thing that inflames the passion of programmers, it's indentation style. I've been working out my own for some years, since before the advent of the C programming language, so it's not surprising that it's at variance with other indentation styles.

I started programming in Algol 60; an early program of mine, written in 1971, included this function (sorry, procedure) declaration:

     'PROCEDURE' CHECK M AND NU (A);
     'VALUE' A; 'REAL' A;
     'BEGIN' 'REAL' B;
     B:=K(A); NU:=H(A)*DELTA X/B;
     'COMMENT' IF THE PARAMETER NU HAS CHANGED IN SUCH A WAY THAT       00018820
     M < 2*NU+2, THEN THE SOLUTION IS NO LONGER STABLE: MAKE M          00018830
     EQUAL ARBITRARILY TO 4 OR 2*NU+3, WHICHEVER IS THE GREATER, AND    00018850
     RECALCULATE DELTA T;                                               00018870
     'IF' M < 2*NU+2 ! M<2 'THEN'
          'BEGIN'
          M:='IF' NU> .5 'THEN' 2*NU+3 'ELSE' 4;
          DELTA T:=DELTA X_2*RHO*CV(A)/(B*M)
          'END'
     'END' OF CHECK M AND NU

This was written for a compiler that respects the fact that Algol 60 didn't have reserved words, it had symbols. The numbers at the end of some lines are card numbers; I don't know why they don't all exist.

Converted to a more modern version of Algol 60, this might look like:

     procedure check m and nu (a);
     value a; real a;
     begin real b;
     b:=k(a); nu:=h(a)*delta x/b;
     comment if the parameter nu has changed in such a way that
     m < 2*nu+2, then the solution is no longer stable: make m
     equal arbitrarily to 4 or 2*nu+3, whichever is the greater, and
     recalculate delta t;
     if m < 2*nu+2 ^ m<2 then
          begin
          m:=if nu> .5 then 2*nu+3 else 4;
          delta t:=delta x_2*rho*cv(a)/(b*m)
          end
     end of check m and nu

This makes liberal use of Algol "features" such as spaces in variable names and implicit comments after an end keyword. Converted to C, but without changing the indentation, it would look like this:

     void check_m_and_nu (float a);
     { float b;
     b=k(a); nu=h(a)*delta_x/b;
     /* if the parameter nu has changed in such a way that
     m < 2*nu+2, then the solution is no longer stable: make m
     equal arbitrarily to 4 or 2*nu+3, whichever is the greater, and
     recalculate delta_t */
     if ((m < 2*nu+2) || (m<2))
          {
          m= nu> .5 ? 2*nu+3 : 4;
          delta_t=delta_x_2*rho*cv(a)/(b*m);
          }
     } /* of check_m_and_nu */

Isn't that ugly? At this point, we can all agree. Now let's consider how it could be changed. The FreeBSD style(9) would make this into:

void
check_m_and_nu (float a);
{
        float b;

        b = k(a);
        nu = h(a) * delta_x / b;
        /*
         * if the parameter nu has changed in such a way that
         * m < 2*nu+2, then the solution is no longer stable:
         * make m equal arbitrarily to 4 or 2*nu+3, whichever
         * is the greater, and recalculate delta_t
         */
        if ((m < 2 * nu + 2) || (m < 2)) {
                m = nu > .5 ? 2 * nu + 3 : 4;
                delta_t = delta_x_2 * rho * cv (a) / (b * m);
        }
}

Isn't that so much more legible? Yes, it needs more comments (in those days most of mine seem to have been rows of asterisks to highlight the program structure), but that's not the issue here. It's just readable. But I still don't like it:

My own layout looks more like this:

void check_m_and_nu (float a);
  {
  float b;

  b = k (a);
  nu = h (a) * delta_x / b;
  /*
   * if the parameter nu has changed in such a way that
   * m < 2*nu+2, then the solution is no longer stable:
   * make m equal arbitrarily to 4 or 2*nu+3, whichever
   * is the greater, and recalculate delta_t
   */
  if ((m < 2 * nu + 2) || (m < 2))
    {
    m = nu > .5 ? 2 * nu + 3 : 4;
    delta_t = delta_x_2 * rho * cv (a) / (b * m);
    }
  }

Here I've reduced the indent to only 2 characters. I've got to this value over the years, starting at the 6 characters in the first examples and reducing one by one, and I find it the best compromise. Indentation is still clearly recognizable, but you don't wander off the right margin so easily. I've also lined up the braces over each other, and put spaces in “natural” places.

I started writing adapting the Emacs c-mode macros to this style years ago—the date in my comments is 13 November 1991. In the course of time I added nice little macros like things to automatically indent the next line, indent comments and so on. In the meantime, the official c-mode changed, and I became increasingly incompatible.

It would be too much to expect the MySQL style to be the same, and of course it's not. But it's surprisingly similar. Adapted to the MySQL style, the example above would look like this:

void check_m_and_nu(float a);
{
  float b;

  b= k(a);
  nu= h(a) * delta_x / b;
  /*
     if the parameter nu has changed in such a way that
     m < 2*nu+2, then the solution is no longer stable:
     make m equal arbitrarily to 4 or 2*nu+3, whichever
     is the greater, and recalculate delta_t
  */
  if ((m < 2 * nu + 2) || (m < 2))
  {
    m= nu > .5 ? 2 * nu + 3 : 4;
    delta_t= delta_x_2 * rho * cv(a) / (b * m);
  }
}

The differences here are:

Still, it's pretty close, and I can live with it, especially since it has my beloved 2 character indent.

But how do I format code like this? My macros are old and crufty, and the Emacs macros suggested in the style guide don't work for me. Lars wanted me to indent the code correctly, so spent a lot of today looking at the macros, with only partial success. A lot has happened to Emacs since I learnt it, and I need to read up on things. To make matters worse, the cc-mode documentation on my system (in this horrible info format that I haven't been able to get to like in the over 15 years I've been using it) and on the web site don't agree on a number of things; the latter, in PostScript form, is nearly 100 pages long. Much to learn.

Also with Emacs, finally got my RSS feed for Planet MySQL sorted out. I've had a lot of trouble with RSS. Apart from the fact that I don't like the approach, I've had difficulty understanding how the code should look like. The final hurdle seems to be that Planet MySQL wanted a <pubDate> tag (and yes, the capitalization is significant). Ended up modifying my html-to-rssxml macro to add the link. Starting with an HTML entry like this:

      <h2><a name="30">Friday, 30 June 2006</a></h2>

      <p>
      If there's one thing that inflames the passion of programmers, it's indentation style.
      I've been working out my own for some years, since before the advent of the C programming
      language, so it's not surprising that it's at variance with other indentation styles.
      </p>

It creates XML like this:

<item>
  <guid isPermaLink='true'>http://www.lemis.com/grog/diary-jun2006.html#30</guid>
  <link>http://www.lemis.com/grog/diary-jun2006.html#30</link>
  <title>Friday, 30 June 2006</title>
    <pubDate>Fri, 30 Jun 2006 00:01:02 +0000</pubDate>
    <description>
      <![CDATA[
      <div align="justify">

      <p>
      If there's one thing that inflames the passion of programmers, it's indentation style.
      I've been working out my own for some years, since before the advent of the C programming
      language, so it's not surprising that it's at variance with other indentation styles.
      </p>
      </div>
      ]]>
    </description>
</item>

Had some discussion about the pubDate with Arjen; it's not clear that it has to match the date in the title.

My brewing fridge has failed: the compressor runs, but it didn't cool. Off in the evening, through rain and storm, to pick up another one in Balhannah.


Do you have a comment about something I have written? This is a diary, not a “blog”, and there is deliberately no provision for directly adding comments. It's also not a vehicle for third-party content. But I welcome feedback and try to reply to all messages I receive. See the diary overview for more details. If you do send me a message relating to something I have written, please indicate whether you'd prefer me not to mention your name. Otherwise I'll assume that it's OK to do so.


Top of page Previous month Greg's home page Today's diary entry Next month Greg's photos Copyright information

Valid XHTML 1.0!

$Id: diary-jun2006.php,v 1.57 2021/06/05 05:34:55 grog Exp $