October 31, 2003
Tuple arguments

I've just come across this while browsing through Python-Dev - tuple arguments. WTF?

So, you can do:

>>> def f(a, (b, c), d):
... print a, b, c, d
>>> f('a', ('b', 'c'), 'd')
a b c d

What I can't work out is - why?

Posted to Python by Simon Brunning at 05:27 PM

Say it ain't so! Google Considering Merger With Microsoft.

Hmmm, well, OK, it doesn't look too realistic to me. But just imagine if it did happen. Oh, the horror!

Via Everything Burns.

Update: Via d2r, How good is Google? from The Economist.

Sigh. I miss The Economist. I used to read it, back when I had the time.

Posted to Business by Simon Brunning at 03:25 PM
I sense a disturbance in the blogsphere

looC fo seulaV llamS

Incredible. It seems to work for just about any website - Mirror Sytes. A perfect Friday afternoon time waster.

Posted to Funny by Simon Brunning at 02:31 PM

I finally found some time to have a play with Knoppix, as recommended by Andy and Simon.

Is there a Nobel prize for software? If there were, Linus and Klaus Knopper should share one. The year after Guido's win, naturally. ;-)

Posted to Software by Simon Brunning at 01:01 PM
Data != information

World drowning in oceans of data

800MB, per person, per year. Blimey.

But, the BBC uses the terms 'data' and 'information' interchangeably in this article, and they aren't the same thing at all. Data are just the raw material - information is meaningful and usable. I doubt very much that all 800MB could really be called information...

Posted to The Big Room by Simon Brunning at 12:38 PM
Windows archive software

Most Windows users have WinZip on their PCs. Naturally, almost none of them have registered it. WinZip is good software, supporting just about every archive format around. Explorer integration is good, and command line support is available, so you can script it.

Me, I use Ultimate Zip instead. It's free (as in beer), and just as good. But I'm looking for a free as in speech equivalent. Any suggestions?

Posted to Software by Simon Brunning at 08:52 AM
October 30, 2003
Outlook one, Simon nil

I've been having a bit of a struggle with Outlook '97 today. Outlook is winning.

Yes, yes, I know, Outlook sucks, and I shouldn't be using it. Is there anything better that I can use, bearing in mind that my company is using Microsoft Exchange 5.5 as a server?

Posted to Software by Simon Brunning at 02:24 PM
October 27, 2003
He kept that one quiet...

Happy birthday, Dan! 40 today.

Dan is our 'Mission Impossible' coder. When we find out that a problem can't be solved, we give it to Dan. Sooner or later (usually sooner), Dan will come up with working code. Looking at this code will make us even more convinced that the problem can't be solved.

"That's all very well in practise, Dan," we'll say, "but it will never work in principle."

Posted to Apropos of nothing by Simon Brunning at 03:55 PM
Windows tip of the day

Well, probably my Windows tip of the year, in fact. And it's better than just "Don't use it". ;-)

Enabling Windows Command Completion. If you don't fancy hand editing the registry, download and run this registry entry file, auto_completion.reg. At your own risk, naturally. ;-) This works for me on NT (SP6) and XP.

With this done, you can type in the first few letters of any file or directory name at the command prompt and hit tab, and cycle through all matching names. Class.

I simply don't understand why you have to hack the registry to get this working. Microsoft went to all the bother of putting this very useful feature in, then didn't provide any way of turning it on. Idiocy.

Posted to Software by Simon Brunning at 02:24 PM
Buffy, scary?

According to Channel 4, Buffy provided the 25th scariest moment. Are they kidding? The only thing scary about Buffy is that anyone actually watches it.

Now, I know that my colleague Mark will disagree - he loves the program. Along with, amongst other things, Charmed and (would you believe it!) Popular. Should Mark's IT career stall at any point, he has a good job ahead of him as TV critic for Sugar.

OK, I'll admit to watching Charmed occasionally - but only 'cos Rose McGowan is as fit as a butcher's whippet.

Posted to Music and Film by Simon Brunning at 11:51 AM
October 24, 2003
The average Playboy centrefold, by decade

Every Playboy Centrefold, The Decades

Totally safe for work, and fascinating. Clearly, men prefer skinnier, paler, blonder women these days. There is some difference of opinion as to whether the pictures indicate bigger boobs, too, or just shinier ones. Me, I'm a one BSH man myself, and I reckon the latter.

Via Kim.

Posted to Apropos of nothing by Simon Brunning at 05:47 PM
A man in the ladies...

Once all the women working in my office have gone home, one of my male colleagues (who shall remain nameless) is perfectly happy to use the ladies toilet. (It's much closer.) Me, I don't think I could set foot in there if you put a gun to my head.

Clearly, one of us is a bit weird. I just can't work out which one...

Posted to Apropos of nothing by Simon Brunning at 05:26 PM
Important lessons for the digitally inept

Important lessons for the digitally inept

Funny, and oh so true.

Via The G Spot.

Posted to Funny by Simon Brunning at 05:18 PM
October 22, 2003
And the moral of the story is...

Now this has to be expensive.

Following procedures and doing the documentation is dull, but you had better do it anyway.

Via the effbot.

Now, of course, people are thankfully moving away from documentation and procedure heavy methodologies these days. But if you feel that a procedure or document is unnecessary, get it removed from the procedures that you are using. Don't just not follow them.

Once, fifteen years ago or so, when I was an operator (and a young know-nothing), I didn't bother to fill in a form when printing cheques. The batch of cheques got lost by someone, and the company didn't know which range of cheque numbers to cancel. I nearly lost my job over it.

Posted to Science and technology by Simon Brunning at 05:20 PM
Sun Clock screen saver

Another cool screen saver to add to my randomiser - the Sun Clock. It'll show a world map with current daylight displayed, or a sky map showing stars and planets. Plenty of knobs to twiddle. Too cool for words.

Via vsbabu.org.

My other favourite screen savers:

Posted to Toys and games by Simon Brunning at 03:46 PM

So, if I'm going to be using JavaScript and bretheren, I'm going to need a unit test framework. So, is JsUnit the standard?

The past couple of days' JavaScript training from Lumia was good. We covered a lot, and had plenty of hands on exercise. I've supported JS before, but I was in at the deep end, souring the manual. Now, I think I'd be happy to know what I was doing, and to develop new stuff from scratch.

With the manual in hand, of course. ;-)

What was missing from the course was any mention of OOP, or of exception handling. Both of these should have been covered, IMHO, especially given JS's somewhat idiosyncratic treatment of the former. This would definitely have pushed the course into three days, though.

Posted to JavaScript by Simon Brunning at 10:07 AM
October 21, 2003
JavaScript Training

OK, Andy, EMCA Script then. ;-)

It turns out that the JavaScript Training is pretty good, and the trainer is coping pretty well with the disparate needs of my disparate team. We covered a bit of CSS and DOM as well as JS yesterday. By end of play today, I reckon we'll all know enough to achieve most of what one might want to do, and know where to go to find out the rest.

Dan and I are tearing through the examples, while the others are proceeding a little more slowly, but we are keeping together fairly well in terms of subject matter. I knew pretty much all of this stuff in theory, but practise is a little different, of course.

Bob, the trainer, and I have made a few discoveries along the way, mostly to do with the way that IE handles CSS. I had put a !DOCTYPE into all my HTML files, pretty much without thinking. This put IE into standards mode, and some of the examples didn't work. Nor did they work in Firebird. Took a while to work that one out, but having done so, it was useful stuff to know.

Posted to JavaScript by Simon Brunning at 09:04 AM
October 20, 2003
The curse of getting in early strikes again!

Once again, I tried to get in early this morning. Once again, chaos ensued. Sigh.

I was getting in early 'cos I'm on another training course today. Two days of JavaScript. It'll be interesting to see how the trainer deals with the range of experience he'll find in the attendees - we range from me, with extensive experience in various scripting and OO languages, and some real world JS experience, to Tracey, who has barely programmed at all.

Posted to Apropos of nothing by Simon Brunning at 09:28 AM
October 17, 2003
Setup.exe, OK, OK, reboot, repead ad infinitum...

About halfway there with installing stuff. I'd be further along but for a lengthy lunch at The Halal, with Mark amongst others.

Cobra, class...

Posted to Software by Simon Brunning at 03:50 PM
October 16, 2003
It's alive!

My dead PC has risen again.

It has NT4 SP6 on it, and that's my lot. So now I just need to spend the next week or so installing stuff.

I've made a list:

MS Office 97, and service pack 2
MS Visual Studio 6, and service pack 5

Python 2.3.2-1
win32all build 159
mxBase 2.0.5
ctypes 0.6.2
PythonCard 0.7.2
py2exe 0.4.2
Twisted 1.0.7
Cheetah 0.9.15

Java, versions 1.1.8, 1.3.1 and 1.4.2
Eclipse 2.1
VSS Plugin 1.5
Lomboz 2.11
TruStudio 0.4.1
Eclipse 3.0 M4
Lomboz 3.0 M2
Ant 1.5.4
Tomcat 4.0.6
Tomcat 4.1.27
Struts 1.1
Velocity 1.3.1
Commons Lang 2.0
JUnit 3.8.1
JTOpen 4.1
JGL 3.1.0 (No longer free)

Mozilla Firebird 0.7 (plus Adblock, IE View, Linkey, Tab Browser and Google Bar extensions, and Firebird Modern theme)

WinKey 2.8
DiskMon 1.1
Sizer 3.3
PowerMenu 1.5.1
Powertoys: Send To, Command Prompt Here, Explore From Here and Tweak UI.

jEdit 4.1 (plus Buffer Tabs, Character map, Code2HTML, Common Controls, Console, Drag and Drop, ErrorList, FTP, Jakarta Commons, JDiff, JythonInterpreter, Look And Feel, Macro Manager, RETest, SideKick, Templates, TextTools, WhiteSpace, XML, XML Indenter, XSLT plugins, and Kunststoff theme)
Andale Mono
TightVNC 1.2.9
NSIS 1.98

Reflection 8.0


And then, when I've installed that lot, I've just got to configure it all. ;-)

What do you have on your PC? What cool stuff am I missing? (Other than Linux, naturally ;-)

Posted to Apropos of nothing by Simon Brunning at 02:09 PM
The Old Lawnmower Club

The first rule of Old Lawnmower Club is, you do not talk about Old Lawnmower Club.
The second rule of Old Lawnmower Club is, you do not talk about Old Lawnmower Club.

Posted to Funny by Simon Brunning at 01:48 PM
Entry 1000!

Entry number 1000! Jesus, I've got to get a life, haven't I?

In fact, this is the 976th extant entry - deleted entry numbers are not reused, and I've had to delete a few duplicates. 24 to be exact. ;-)

Posted to Blogs by Simon Brunning at 11:56 AM
October 15, 2003
This evening...

Steve, Michael, and I will be in The Alexandra, Wimbledon, from 6:30 this evening. All welcome.

Posted to Apropos of nothing by Simon Brunning at 10:40 AM
October 14, 2003

I'll be in training for a couple of days now. JIS for XHTML version 8.

Sigh. Not very exciting.

Posted to Software development by Simon Brunning at 09:05 AM
October 13, 2003

Joel's The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) and Dan's What the heck is: A string both cover the what, why and how of Unicode. Me, I work in The City, and i18n just isn't an issue. UK English only.

The effbot, as ever, gives you everything you need to know, with added brevity: Some Observations on Working With Non-ASCII Character Sets.

Posted to Software development by Simon Brunning at 01:01 PM
Eclipse M4

New Java refactoring goodness in Eclipse M4.

Via Ted.

Posted to Java by Simon Brunning at 12:50 PM
October 09, 2003
Total Recall

I'm not going to comment on the whole "Arnold Schwarzenegger as governor" thing. I don't live in California, so it's none of my business. Besides, I couldn't care less.

I did want to point out this comment from Jay Leno, though. It made me laugh out loud on the tube this morning. "For the first time in his career, critics are calling him an actor." ;-)

Posted to The Big Room by Simon Brunning at 01:18 PM
Zip it

I'm rather pleased with this c.l.py post of mine. Python never ceases to impress me, to give me that "how cool is that?" feeling.

Andy wanted to know how it worked. Here goes:

The zip() built-in function takes a number of sequences as arguments, and returns a list of tuples, each tuple consisting of the nth element of each of the argument sequences. That makes no sense, does it? Never mind, it's easier to demonstrate than to explain:

>>> zip(['a', 'b', 'c'], [1, 2, 3])
[('a', 1), ('b', 2), ('c', 3)]

There, now that makes sense. ;-)

But the OP had a list of lists, like so:

>>> spam = [['-', '-', '-', '-', '-', '-', '-', 'K', 'S', 'A', 'K'], ['-', '-', '-', '-', 'L', 'Q', 'Q', 'T', 'N', 'S', 'E'], ['T', 'L', 'E', 'E', 'L', 'M', 'K', 'L', 'S', 'P', 'E']]

If you just pass spam to zip(), well, that's only one sequence. It's a sequence containing sequences, yes, but it's just a sequence nevertheless. So you'll get a list of tuples, each containing just one of spam's sub lists:

>>> zip(spam)
[(['-', '-', '-', '-', '-', '-', '-', 'K', 'S', 'A', 'K'],), (['-', '-', '-', '-', 'L', 'Q', 'Q', 'T', 'N', 'S', 'E'],), (['T', 'L', 'E', 'E', 'L', 'M', 'K', 'L', 'S', 'P', 'E'],)]

What we actually want to do is to pass each of spam's sub lists into zip() as a seperate argument. We can do this the brute force way easily enough:

>>> zip(spam[0], spam[1], spam[2])
[('-', '-', 'T'), ('-', '-', 'L'), ('-', '-', 'E'), ('-', '-', 'E'), ('-', 'L', 'L'), ('-', 'Q', 'M'), ('-', 'Q', 'K'), ('K', 'T', 'L'), ('S', 'N', 'S'), ('A', 'S', 'P'), ('K', 'E', 'E')]

This give the OP what he was asking for. But I don't want to give you that. It's ugly, doesn't scale well to lists with many sub-lists, and only works if the sublist has a specific number of sub-lists. And being Python, there's a nice way of doing it.

Python's function argument handling is pretty sophisticated in comparison to other languages that I know. You've always been able to define a function that is able to take any number of arguments. The function receives these argument as a tuple:

>>> def clever(*args):
... print args
>>> clever(1, 2, 3)
(1, 2, 3)

Python 2.0 introduced a new way of calling a function with a tuple of arguments. Just pass in the sequence, prefixed with an asterisk, and each element of the sequence gets passed into your function as a separate positional argument

>>> eggs = [1, 2, 3]
>>> clever(*eggs)
(1, 2, 3)

We can use this feature to pass each element of code>spam to zip() separately, as so:

>>> zip(*spam)
[('-', '-', 'T'), ('-', '-', 'L'), ('-', '-', 'E'), ('-', '-', 'E'), ('-', 'L', 'L'), ('-', 'Q', 'M'), ('-', 'Q', 'K'), ('K', 'T', 'L'), ('S', 'N', 'S'), ('A', 'S', 'P'), ('K', 'E', 'E')]


Posted to Python by Simon Brunning at 11:54 AM
Sex and the Holy City

Vatican: condoms don't stop Aids. Bloody Hell, doesn't the truth matter to these people at all?

Posted to Rants by Simon Brunning at 10:05 AM
I'm resting, darling

I met Steve last night. I'm rather heartened by our conversation about his 'between jobs' situation, I must say. It seems that he has several irons in the fire at the moment, so things are decidedly looking up.

Interestingly, all but one of these prospects have come through people who know Steve, and have worked with him. The other prospect is a friend-of-a-friend thing, with me being the friend. None of them have been put to him by a recruitment consultancy. Thing is, the Synon/2[1] market is a small one, and people know one another. Steve's reputation is good - very good - and it's now that this is paying off for him.

So, there are grounds for optimism here. Good luck, Steve!

[1] OK, OK, it's called Advantage 2E these days. But it will always be Synon/2 in my heart. Just as the AS/400 will always be the AS/400, though IBM have called it the iSeries for some time now...

BTW, The Stage Door turns out to be a lovely pub. First off, it really is a pub - rather than a bar - with a proper pub feel. Good, attentive staff, more interested in serving beer than chatting, unlike in many places I could mention. And not to pricey for a London pub, either. Recommended.

Not enough eye-candy for Steve, though, so at his suggestion we decamped to The Fire Station later on in the evening.

Posted to Apropos of nothing by Simon Brunning at 09:56 AM
October 08, 2003
Mmm, beer

I'm shortly off to meet Stevan at The Stage Door. All welcome.

Posted to Apropos of nothing by Simon Brunning at 04:09 PM
Being me

Hmmm. It seems that being me is one of Tilesey's greatest fears. One of my greatest fears is that I will be a 35 [year old] divorced father of 2 kids who I can only see at weekends. Sigh.

And if he thinks that six months is a long time to be single, he knows nothing.

Posted to Apropos of nothing by Simon Brunning at 03:14 PM
Web applications rule the enterprise

Developers show their independent streak, favoring Web-based apps

Actually, legacy applications in COBOL and RPG rule the enterprise in my experience. But in terms of new enterprise applications, I can certainly believe that web based applications are very popular. The advantages are huge, provided that you don't need any UI that a browser based app can't give you. (And as this DHTML widget shows, a browser can give you more than you might expect.)

Posted to Software development by Simon Brunning at 02:00 PM
Sometimes, it's quicker to walk

Tube Map with Walklines

Hmmm. I would have thought that Embankment/Waterloo is another candidate - I always walk that one. The new pedestrian Hungerford Bridge is lovely. Still, fascinating map.

Via kottke.org.

Posted to Apropos of nothing by Simon Brunning at 01:31 PM
Blogger demographics

The Blogging Iceberg makes for interesting reading.

Blogs are updated much less often than generally thought. Active blogs were updated on average every 14 days. Only 106,579 of the hosted blogs were updated on average at least once a week. Fewer than 50,000 were updated daily. Wow, as few as that? Perhaps ten million was an overbid. ;-)

Also, it turns out that I'm very much in the minority demographically speaking - I'm male (44%) and over thirty (7.6%).

The survey upon which this is based seems only to include hosted blogs. I'm sure that the vast majority of blogs are hosted, but I would imagine that techie blogs would be far more likely to do their own hosting. Tech bloggers are overwhelmingly male (in number, if not in temperament ;-).

Via Rebecca Blood.

Posted to Blogs by Simon Brunning at 11:25 AM
Scroll Lock

What's the "Scroll Lock" key on my computer for?

It even mentions Python, though I must point out that using back-ticks instead of the repr() function is not the done thing these days.

The Windows key is actually pretty useful, and can be made more so.

Posted to Software by Simon Brunning at 10:49 AM
October 07, 2003
Cthulhu -- why let something less evil serve your web pages?

The Cthulhu webserver. ;-)

Posted to Funny by Simon Brunning at 03:42 PM
Running mod_python on Apache on Windows

Running mod_python on Apache on Windows. Just keeping the link in case I need it later myself. ;-)

Posted to Python by Simon Brunning at 11:33 AM
PythonCard and Boa Constructor

PythonCard and Boa Constructor not ready yet, according to Andrew Dalke.

His major criticism of both tools is that there is no support for any layout management other than absolute positioning. This is a fair criticism - many of your dialogs need to be resizable, and absolute positioning just won't cut the mustard. But then again, many dialogs don't need to be resizable, and I've found that PythonCard works fine for these.

Support for layout management is in the pipeline for PythonCard, and I'm looking forward to it. (How close is it, Andy?) Until then. you'll need to hand code some of your panels. (I'm just learning a bit of wxPython now - this section from Mark Hammond and Andy Robinson's "Python Programming on Win32" is a good starting point.) But PythonCard can already help you out with many (most?) dialogues, saving lots of time.

Posted to Python by Simon Brunning at 11:26 AM
Web applications and date entry

Simon Willison pointed out The coolest DHTML calendar widget, (demo here).

At work, we use a web application timesheet system (written in Notes, would you believe). You have to type the dates in yourself, which is irritating. There is absolutely no flexibility as to how you enter them, which is even more irritating. So, today is "07/10/2003". You cannot enter "07102003", and nor can you enter "7/10/2003", nor "07/10/03". You have to enter exactly "07/10/2003", or you'll get an irritating dialog box, detailing the acceptable date format, as soon as the date field looses focus. This drives me insane. We have got to use this widget, or something like it.

Mishoo has some other nice stuff on his site - the JS MenuBar (not free) and the Palm world time app are both worth a look.

Update: Our timesheet system is "functionally stable", i.e. no enhancements are being made, no matter how useful and trivial to implement. Sigh. I may have to get a petition up. I'm certainly not alone in being irritated by this.

Posted to Website construction by Simon Brunning at 10:22 AM
October 06, 2003
Ten million blogs

Ten million blogs, but most of them are moribund.

I wonder how many are still alive?

Posted to Blogs by Simon Brunning at 04:29 PM

I'm glad that's over, I must say. If I never install Client Access again as long as I live, it'll be too soon. 38.5 minutes per PC, we took, as if that means anything to anyone. The wonder is that we managed to edit well over a hundred registries without screwing anything up. Remarkable.

Now, I have a thousand emails to get through, and probably several hundred blog entries to catch up on.

Yes, really a thousand. c.l.py for the best part of a week. ;-)

Posted to On the road by Simon Brunning at 04:26 PM
Another day, another dollar

We are hoping that we have nearly finished cleaning out the Stygian stables. We are running 20% ahead of estimates, so we are hoping to finish today.

Well, it's a shit job, but it's a job.

Normal service should be resumed shortly.

Posted to On the road by Simon Brunning at 09:06 AM
October 02, 2003

Brain not working after a long day of crushingly tedious but nevertheless somewhat tricky tech-monkey work.

But that's OK, I won't be needing my brain this evening - I'm off to see The Matrix Reloaded at the bfi London IMAX.

Posted to Apropos of nothing by Simon Brunning at 05:35 PM
This just in...


Posted to On the road by Simon Brunning at 09:43 AM
October 01, 2003
This week I will mostly be installing Client Access Express

One of the nice things about working for a small firm is that you get to do a variety of stuff. Mainly system development, from inception, through architecture and design, right through to testing, coding and UAT. But we also support the systems that we've developed.

And if the money's right, we'll do just about anything.

One of our clients wants Client Access Express installed and/or upgraded on nearly 200 PCs. I'm not actually doing chargable work at present, so I'm one of those in the frame for this. Sigh. But you have to take the good with the bad, I suppose.

Posted to On the road by Simon Brunning at 09:26 AM
Morning Mayhem

Never, ever, try to get to work early. Sod's Law dictates that something will go wrong with your journey, making you end up getting in late.

Colliers Wood was flooded this morning. I don't mean Colliers Wood tube station, mind you, I mean Colliers Wood. Ankle deep it was.

Update: BBC coverage: Homes flooded after pipe bursts. Colliers Wood hits the big time!

Shit, my parents live on Cavendish Road. I hope that they aren't flooded out. They aren't answering their phones, landline or mobile. But then, they never turn their mobiles on.

I also hope that I still have water, but clearly this isn't critical.

Posted to On the road by Simon Brunning at 08:53 AM