Thursday, March 30, 2006

Day 331

So I think I'm done with a second draft of my scribblings about software engineering. There's a bit of a change of focus compared to the first draft; the new version is more focused on the development sector I'm most experienced in, rather than trying to talk about all kinds of software engineering. The shift was mostly triggered by feedback on the first draft—partly because it covered things I wasn't really qualified to discuss, and partly because it was pointed out to me that there's a distinct gap in the market for books about six-nines development.

The next step is probably to leave the text for a while and come back to it later—at which point the grammatical errors, verbose wording and general textual infelicities will be much more obvious.

[A:37282 B:3218 C:346 D:9187 Total:50033]

Tuesday, March 28, 2006

Day 329

Oooh, spangly article on Mach-O format binaries*. I've just added a link into my Linkers For Dogs page for now; at some point soon (if I have some Copious Free Time) I might do a more thorough update to take advantage of it.

* Yes, I am aware of how sad it is to get excited about executable binary formats.

[A:35106 B:3218 C:346 D:9187 Total:47418]

Monday, March 27, 2006

Day 328

A trifle bizarre. After a bunch of investigation, I eventually narrowed down a synchronization problem to the following mini test program:

#include <time.h>
#include <stdio.h>
int main()
  time_t tv = time(NULL);
  struct tm *tms = localtime(&tv);
  printf("%02d:%02d:%02d DST:%d\n", 
         tms->tm_hour, tms->tm_min, 
         tms->tm_sec, tms->tm_isdst);
When I ran on Mac OS X:
Mon Mar 27 14:12:29 BST 2006
14:12:30 DST:1
But when I ran on my main Windows XP box:
c:\>time /t
13:13:03 DST:0
Now, I'm usually happy to believe the worst of Microsoft, but it stretches even my credibility to think that their C runtime doesn't get the 1989 ANSI standard right (particularly as a quick web search didn't turn up any complaints).

Investigating further, when I ran the same code on a different Windows XP machine, I get the right answer:

c:\>time /t
14:15:24 DST:0

So I checked MSDN and found some mutterings about "localtime corrects for the local time zone if the user first sets the global environment variable TZ...TZ is a Microsoft extension and not part of the ANSI standard definition of localtime. Note: The target environment should try to determine whether daylight saving time is in effect."

Running echo %TZ% from the command line showed up as GMT. So I tried changing the timezone to EST, but echo %TZ% was still reading GMT. Odd.

Eventually, I discovered that my login had TZ=GMT hard-coded into the environment (Control Panel, System, Advanced, Environment Variables). Not sure how it got that way, but finding it and making it not so has just taken a couple of hours.

[A:35029 B:3218 C:346 D:9187 Total:47780]

Friday, March 24, 2006

Day 325

[reading: Robert Charles Wilson, "Spin"]

New toy. It's been a while; my fingers hurt.

Tuesday, March 21, 2006

Day 322

[reading: Michael Marshall, "Blood of Angels"]

Imagine my surprise. It turns out that estate agents are a bunch of thieving, conniving scum. Who'd have thought it.

[A:32051 B:3218 C:346 D:9187 Total:44802]

Monday, March 20, 2006

Day 321

[reading: Frank Miller, "Hell and Back"]

I wrote my first ever Visual Basic today, albeit only a few lines. My co-conspirator tells me it becomes quite natural as you get used to, but so far I've found it a bit frustrating. I see quite a lot of it in my future though, given that the project involves a bunch of Office integration.

Saturday, March 18, 2006

Day 319

[reading: Frank Miller, "Booze, Broads & Bullets"]

And in other news: on the Project X front, it now looks like I'm a company director. Surprisingly easy to set up, but that's because our company secretary did all of the heavy lifting.

At this point I guess there's no harm in going into more details about Project X. It's basically time-tracking software: monitor the user activity on a Windows PC, then summarize the details and present it in various forms so the user can figure out how they've spent their day (and can possibly optimize their activities to be more efficient). There are various things of a similar ilk out there, but ours will have rather better integration with Microsoft Office and more helpful summarization. Not quite sure what the product name will be yet: our not-quite-vapourware website has it as TaskLog, but we also quite like the name Clockwork. (Of course, the domains for "clockwork" and almost all of its variants are long gone; the nearest we could get was "qlockwork". Our need for a unique domain name sadly overrides my abhorrence of deliberately mis-spelled words).

Friday, March 17, 2006

Day 318

[reading: Frank Miller, "Family Values"]

So to celebrate the Return of Copious Free Time, a film-fest courtesy of the one pound offer at the Prince Charles cinema (home of the legendary sing-a-long-a Sound of Music). Serenity on the big screen again, a break for book shopping and beer (as I'm not that keen on Broken Flowers), then Pride and Prejudice and Corpse Bride.

Thursday, March 16, 2006

Day 317

Project Y is checked in and done, at least for now (I suspect I'll have to do a little bit of tidying up next week and possibly fix some things in a month or two). So back to Copious Free Time for a month or so.

[A:30327 B:3218 C:346 D:9187 Total:43078]

Monday, March 13, 2006

Day 314

Another damned, thick, square book! Always scribble, scribble, scribble, eh, Mr Gibbon!

I was supposed to be working on Project X today, but I seem to have instead been distracted by working on my software engineering scribbles. Most of my efforts today seemed to reduce the word count, but a final spurt eventually broached the 30kw mark.

[A:30003 B:3218 C:346 D:9187 Total:42754]

Sunday, March 12, 2006

Day 313

[reading: Neal Asher, "Brass Man"]

I discovered the other day that my old university has finally started offering a Computer Science degree (dragged kicking and screaming into the century of the fruitbat). Previously, the only course with computing in the title was the "Maths and Computation" degree, and anyone who took that hoping to learn about writing software was in for a nasty shock.

It did make me wonder whether they could do some sort of combination of the two, though. Denotational Semantics of Perl, anyone?

[A:29420 B:3218 C:346 D:9187 Total:42171]

Tuesday, March 07, 2006

Day 308

I spent all day today trying to make a single phone call. I failed.

Monday, March 06, 2006

Day 307

Here's a question: I needed some food for my bonsai, so I bought the one labelled "All Purpose Plant Food", which should be good for all purposes. When I got it home, I noticed it also has the slogan "Grows Plants Twice As Big!". So is it still the right thing to use for a bonsai?

With the arrival of my latest Amazon Aid Parcel, I'm think I'm doomed never to get my unread books stack back into single figures again. I couldn't quite resist the title and price (1500 pages for £25) of this one (particularly given my earlier comments on the subject), but it means I've now got over ten unread books that would each take months to read.

Sunday, March 05, 2006

Day 306

Grrr. I was on my way out to the cinema this evening (Syriana: incoherent & politically simplistic but with some nicely atmospheric segments) and was waiting for the traffic to clear so I could cross the road. At this point a car drove past, reasonably fast, and the occupants threw a box at me from the passenger window. It was just a cardboard box, but a fairly heavy one—one of those reinforced low boxes that are used for holding fruit and vegetables. Heavy enough to hurt, certainly, particularly given that it was probably travelling at around 30 mph.

I was somewhat stunned for a second, then I gathered my wits enough to try to write down the numberplate from the car. It was already too far away to make out the plate, but I could see that they'd had to stop for a queue of traffic waiting for the red light at the end of the road. Hmm, I thought, I reckon I can catch up to them before that light goes green, and I started to jog towards the car.

They were clearly watching out for the reaction of their victim, though. As soon as I started moving towards them, they backed up slightly and turned off into a side road away from the traffic. I gave up pursuit at that point, since I had little chance of catching them on foot.

In some ways it's probably just as well I didn't catch them, though. I was extraordinarily angry at that point, and I'd probably have launched in regardless of the size or number of the occupants of the car...

Thursday, March 02, 2006

Day 303

Looks like I might be able to get a slightly early escape from Project Y. It's pretty inefficient for me to do the majority of the testing (since I'd have to spend a lot of time learning new stuff for each test, and it's stuff that wouldn't be any use in the future), so I may just leave the code behind to be tested as part of the next big system test phase, and possibly return in a couple of months to fix any problems that show up.

So that should mean I get a month or two to return to projects of my own before Project X kicks up into a higher gear around the end of April. There's actually a few things I'm keen to get back to; it's amazing how losing all that Copious Free Time makes all those projects seem much more attractive—all those projects that I didn't quite get around to in six months of free time...