September 04, 2008
Django 1.0

Congratulations to everyone involved in getting Django 1.0 out of the door. Great job.

Posted by Simon Brunning at 03:40 PM | Permalink | Comments (2)
Apress eBooks

Buy a book from Apress (such as the superb Definitive Guide to Django) and you can get the PDF version for a fiver, so you can keep a copy on your laptop when you are on the road.

What a great idea. I don't want only the PDF - I much prefer to read the dead tree edition. But you can't carry dozens of chunky tech books around with you, so I want the PDF too. Clearly I shouldn't have to pay full whack twice, but the fiver that Apress is asking seems fair.

I wish O'Reilly did this.

Posted by Simon Brunning at 03:29 PM | Permalink | Comments (5)
August 22, 2008
Welcome, Simon!

Welcome to the Guardian, Simon! I only wish I'd still be there when you started, but I'll be gone by then. :-(

Posted by Simon Brunning at 06:03 PM | Permalink | Comments (2)
August 19, 2008
Python Mock Frameworks

Given that I'm speaking on Python mocking shortly, I thought I'd better dig through my accumulated bookmarks and see what I'm missing.

PyMock is what I've been using up till now. It's heavily inspired by EasyMock, a mocking style I'm used to. It's pretty good, really. The docs really could be better, and the failure messages are not very helpful, but it does the job.

But then I found Mox. Superficially, it's very similar to PyMock. It's also based on EasyMock. But wherever Mox does differ from PyMock, it's better.

It's much better documented than PyDoc, and has more meaningful, helpful failure messages. I think it's has more functionality, too, with some nice comparators, side effects and callbacks. StubOutWithMock() is nice too. But it's possible that PyMock has all of this - given the documentation, it's hard to tell.

Mox will warn you if you call a method on a mock that the mocked class doesn't have, which is handy. It can get confused if your mocked class uses delegation, but you can always fall back to MockAnything(). The mailing list is small but helpful.

On the downside, Mox isn't in PyPI, which is a shame. And they missed a trick not calling the documentation MoxDox. ;-)

There are many other Python mocking packages out there, too - notably pMock, a jMock style mocking library, Mock and minimock, a mocking library for the doctest unit test library.

In early development there's Mockito For Python, a port of Mockito, which will be worth keeping an eye on if Szczepan ever gets the hang of Python. ;-)

As an aside - I think we need Spamcrest!

Update: Seems there's already a Hamcrest for Python - source here.

Also - I forgot one other problem with Mox - the naming standards. One of my biggest early stumbling blocks was that my brain refused to see the the initial capital on the AndReturn() method, and I couldn't get anything working. It's Google's internal naming standard, I gather. Yuck. I feel a patch with PEP 8 style synonyms coming on.

Posted by Simon Brunning at 08:59 PM | Permalink | Comments (2)
July 18, 2008
Code Swarm

code_swarm - Python from Michael Ogawa on Vimeo.

I so want to run this over my current project.

Posted by Simon Brunning at 10:08 AM | Permalink | Comments (2)
June 10, 2008
Adrian Holovaty at the Guardian

I was well aware that Adrian Holovaty is a very big name in the Python world. He's one of the two original developers of Django (my personal favorite web-app development framework) about which he's written the book. He's since used it to power some very cool mashups; and, amongst others.

What I didn't know is that he's also well known and regarded by forward-looking journalists. Emily Bell's introduction to his talk at the Guardian set me straight.

Adrian's talk was inspiring, both to the few techies in attendance and to most of the journalists, who made up the bulk of the audience. His central idea is that we should ensure that the information that the journalists have collected is stored in a structured way wherever possible. It's hard, skilled work gathering that valuable information, but full use is not being made of it. If it were stored in a structured fashion (rather than just in the text of a story; in a "blob" as Adrian put it) it could be made use of in many different ways.

A great example of this is Faces of the Fallen. The information here is gathered by the journalists, but it can be explored in many different ways; by age, birthplace, all sorts of things.

Another interesting strand to Adrian's talk was the automated collection of data. The Washington Post runs a congressional voting record site, almost all the data for which is collected automatically. is another example of this kind of thing.

Explorability is crucial. Think how often you get stuck in the Wikipedia, 'cos there are just so many interesting links to follow. You go in to read one article, and find yourself with half a dozen tabs open all containing apparently unrelated corners of the 'pedia that you've stumbled upon, all of which you want to read. Don't you want your site to be like that?

Jemima Kiss has written up Adrian's talk better than I ever could here: Future of Journalism: Adrian Holovaty's vision for data-friendly journalists. Well, she is a pro.

Then, after work, Adrian, Julia and I headed off to Le QuecumBar for some disappointingly inauthentic Gypsy Jazz.

Posted by Simon Brunning at 02:32 PM | Permalink | Comments (0)
It'll Be All Right On The Night

Last week was mayhem. I don't think I've ever been so busy, and I've not really caught up on my sleep even now. I was far to busy to blog about it at the time, and now my boss Julia has beaten me to it: Better late than never.

Her own blog at the Guardian; I'm so envious. ;-)

A couple of interesting things came up. The third party supplier of our comments system uses a non-relational data store, so I now have first hand experience of the problems that can be encountered. I'm not impressed. To my original list of capability gaps that going non-relational gives you I'd now add one more point; ad-hoc data fixing. We were able to update our side of the data as and when needed, which proved vital.

For example, one new but crucial date field had been missed out of the migration process, and so hadn't been populated properly. We were able to populate it with a new value calculated from a couple of other date fields in a matter of minutes, on tens of thousands of articles. I love the smell of SQL in the morning.

On the other hand, where a date value had been populated incorrectly on the non-relation data store, we had no choice but to do a complete new import, which took 24 hours. Sigh. Hence the delay.

Another problem we discovered on the night was a bug that was causing IE to die. Really die. It turned out that the bug had already been fixed, but that the fix hadn't been back-ported to the release that we were launching on. We needed a very last minute merge and deploy, so I got to demonstrate the speed and usability advantage of the Subversion command line interface in the hands of someone who has the hang of it. Marvelous.

Posted by Simon Brunning at 01:46 PM | Permalink | Comments (1)
May 28, 2008
Subversion 1.5

Subversion 1.5 looks awesome. Svnmerge is now built-in, and refactoring won't cause quite so many conflicts now file moving works properly. I can't wait.

But I'll have to. It's not just a matter of waiting for the Subversion 1.5 release itself, I'll also have to wait for Subclipse, Textmate's Subversion bundle and plug-in, the team's Windows victims will have to wait for a new Tortoise, the list goes on.

Posted by Simon Brunning at 09:45 AM | Permalink | Comments (7)
April 22, 2008
Sport Without Beer?

The good news; the new Guardian Sport and Football sites were launched successfully, and seem to be working fine. The bad news; 24 hour licensing notwithstanding, we couldn't find anywhere to serve us a beer at two in the morning. Grrr.

Update: More on the new sites here; Our new look.

Posted by Simon Brunning at 09:59 AM | Permalink | Comments (1)
April 16, 2008
More on the GAE

One of the most interesting things about the GAE to me is the non-relational data store. I've blogged only recently about my doubts about that approach.

A friend of mine from the big G go back to me about this. "To answer your question about what's wrong with a real database, the datastore is all about scalability. The API trades off flexibility with access paths and transaction boundaries for the ability to store terrifyingly huge volumes of data, while serving a bazillion concurrent accesses.

Compared to an RDBMS, I find this style of data storage requires a bit more thought and design up front. However, almost every RDBMS based app I've ever written has required me to go back and optimise my schema and queries any way, so overall, schema-related work is about the same. Not having SQL does make running arbitrary reports and so forth more difficult."

Hmmmm. Now, coming from Google, this bears thinking about. Scalability as an issue I can see. We do have to put in a lot of work to keep performant, and it's almost all at the database, fiddling with schema and queries level. Much to think about...

Other people's thoughts on this; Google Datastore and the shift from a RDBMS and Google AppEngine, BigTable and why RDBMS mentality is harmful.

More on the GAE:

Posted by Simon Brunning at 03:46 PM | Permalink | Comments (0)
April 08, 2008
Life in the old dog yet

I've had some pushback from Felix over my relational databases aren't dead yet post. He points to db4o.

Now, I've not used db4o, but I've tried out ZODB, and very good it is too. especially with a dynamic language it's really nice to be able to tag arbitrary attributes onto your objects, and to be able to persist and retrieve them complete.

But still, I've be wary of using one for a real project. Performance aside, there are things that you just can't do as easily with an ODBMS as with an RDBMS. I'm thinking of things like:

  • Report writing
  • Data loading
  • Data exploration (especially during debugging)

Also, I find it hard to imagine that an ODBMS can be optimized to the same extent as something as notionally simple as a relational database can be.

All this is leaving aside things that don't yet exist AFAIK but which are probably just a small matter of programming - management tools, clustering, that kind of thing.

No, I'll be sticking with the RDBMS for the foreseeable.

Posted by Simon Brunning at 04:49 PM | Permalink | Comments (3)
April 02, 2008
Who will write tomorrow's code?

Who will write tomorrow's code? Perhaps no one will need to, thanks to Proj-o-matic!

Seriously, there's a good point here. When I was a kid I had a ZX81. You couldn't play any worthwhile games on it, so the only real fun you could have with it was to program it, if you were so inclined. (Lord, did I dream of getting a QL. I mean, 128K and 2 built-in microdrives? Wow! Never could afford one, though.)

Programming requires a certain way of looking at a problem, a certain approach to breaking it down into automatable chunks. I firmly believe that this way of thinking can only be developed by exercising it, and that it's most easily learned as a child, while your thought processes are still developing. I hold this belief with no evidence whatsoever. Hey, it's my blog! So sue me. ;-)

These days, more kids have a console than a general purpose computer. Most of those that do have a general purpose computer are running Windows on it, so they don't get built-in development tools. Of course, you can simply download something for a general purpose computer, and even for a console there might be solutions for anyone who's really keen. But either way it's much easier just to fire up Call of Duty and blast stuff. So, what's going to happen?

Posted by Simon Brunning at 03:48 PM | Permalink | Comments (4)
March 25, 2008
I'm not dead yet!

The Death of the Relational Database (via Media Influencer).

Sigh. I've been hearing about the death of the RDBMS for nearly twenty years. And the recurring problem with this thesis is not that the RDBMS is perfect, but that everything else is worse. Until someone comes up with an idea for a persistance mechanism that's better then an RDBMS across large parts of the problem space that the RDBMS solves, this is just idle hand-waving.

Posted by Simon Brunning at 01:52 PM | Permalink | Comments (2)
February 11, 2008
New site...

It's been a busy weekend, but it's mostly done now. We did UK, World, The Guardian, The Observer and Audio this time, along with a few bits and pieces. The biggies.

Next up for re-launch, Sport. And given the storm-in-a-teacup over the removal of the football link from the front page, and you imagine what it'll be like when the entire sport site changes?

Posted by Simon Brunning at 04:46 PM | Permalink | Comments (1)
January 01, 2008
Bitter at all?

Thanks to Jay for pointing out this rant, via reddit.

Now, I'm sorry they guy can't get a job, but if this is his attitude, I can't say I'm surprised. He's burned his bridges with ThoughtWorks, for a start. ;-)

Disclaimer - I work for ThoughtWorks. But I can say that with perfect honestly that his impression of TW doesn't mesh with mine. Thing is, he seems to think that what TW sells is platform expertise. It's not. We primarily sell smart people. (Oh, and me, too.) A smart person will pick up a new platform quickly. If that's not possible with Rails, that that's Rail's problem - not that I believe that to be the case. Yes, you do need a cadre of people with platform experience for a project to succeed, but not the whole team. (Perhaps he'd have better luck job hunting if he didn't restrict himself exclusively to Rails?)

He says that TW leaves bad code bases behind. Again, in my limited experience, that's not true at all. TWers seem to care deeply about what they do. Anyone else out there who doesn't work for TW who has any experiences they'd care to hare?

Also, his dismissal of TDD and agile practices such as pair programming suggests to me that he's not really tried them. We at TW have a lot of experience in these areas, and it all works just fine for us. If he claims to have improved productivity by dropping them, then he's clearly not comparing like-for-like. Done properly, I fervently believe that these practices improve productivity in the long term (if not in the short term).

I do wish we used more Django and less Rails, though. ;-)

Posted by Simon Brunning at 05:58 PM | Permalink | Comments (8)
November 26, 2007
Agile in the Large

What if powerful languages and idioms only work for small teams? (via Small teams and big jobs) is interesting. We are running a really large Agile project here at GU; what, 60 odd people? Mention any of the road bumps you hit, and people tell you your team's too large.

That's no good. The team, and the project, are the size they need to be. Splitting them arbitrarily might be possible, but it would carry huge costs of its own. The challenge is to make agile work with a big team. And on the whole, I think we are.

Interestingly, despite the fact that we've made agile methodologies scale up, some people here are still nervous about whether agile languages can do the same. Plus ca change...

Posted by Simon Brunning at 09:49 AM | Permalink | Comments (14)
November 22, 2007
Am I stupid, or is Oracle?

The story is this. We have to make a change to one of our data migration scripts. It's already doing some really nasty string manipulation, and we are about to make it far far worse. Frankly, I don't have a hope of making the change unless we can simplify things a bit first, so I was hoping to break some of our string manipulation out into functions.

In order to do that, we wanted to develop these functions out of the context of the migration script, so we could play with, uh, I mean test them. ;-)

Problem is, the finest minds in Herbal Hill haven't been able to write a function that Oracle is happy with. We have removed all the complex stuff, and are trying to write and run the simplest function that we can think of, but we get no joy. Running the broken_function.sql, we get this:

ORA-06550: line 11, column 13:
PLS-00231: function 'FOO' may not be used in SQL
ORA-06550: line 11, column 13:
PL/SQL: ORA-00904: : invalid identifier
ORA-06550: line 11, column 6:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.

Any clues?

Posted by Simon Brunning at 11:38 AM | Permalink | Comments (9)
November 21, 2007
Subversion Log Filtering

So, Annabel was complaining that she couldn't see a log of just her Subversion revisions along with details of the files that have changed from the command line. Shock horror - something you can do from Tortoise that you can't easily do from the shell!

(If you don't care about seeing a list of the files that have been changed, you can just do svn log | grep -A2 sbrunning | less, but adding the -v option turns the output to gibberish.)

Clearly I wasn't going to to let that stand, so I knocked up a very quick script. Then proceeded to over-engineer the snot out of it. (In my own time I must add.)

You can filter by author or by checkin message, with regexps. You can also reverse the output and see the latest checkin last, which is handy if you are only want to see the most recent checkins and don't want to pipe the output to less.

Get it here: svnlog (syntax highlighed - loving that Django TextMate theme) or svnlog (text). Requires Python 2.5. Works on Mac & Linux, probably on Windows too if you give it a .py suffix.

Posted by Simon Brunning at 06:05 PM | Permalink | Comments (4)
Birds do it...

We are desperately short of both QA and CS people at the moment. I wonder if we could induce them to breed?

Posted by Simon Brunning at 05:47 PM | Permalink | Comments (1)
Return Triumphant, Or Not At All

Returning None is Evil. I agree. I've always subscribed to the Samurai Principle myself. If you allow nulls to float around you inevitably end up with NPEs. These can be hard to diagnose properly; not only do you not know if null is actually invalid, but if it is, it's often non-trivial to work out where it came from.

Posted by Simon Brunning at 10:28 AM | Permalink | Comments (3)
November 20, 2007
Mocks and Stubs and Fakes, Oh My!

Fuzzyman has a new mocking library for Python, which he presents in Mocking, Patching, Stubbing: all that Stuff.

Michael takes issue with Martin Fowler's Mocks Aren't Stubs; specifically where he defines mocks as objects pre-programmed with expectations which form a specification of the calls they are expected to receive. Michael's mocks are not pre-programmed with expectations - his expectations are defined after the test execution.

Now, to me, this is a trivial distinction - the important difference between a stub and a mock is in the existence of expectations. Whether the expectations are defined before or after the text execution is not crucial - it's still a mock.

It does matter in terms or usability, of course. It feels more natural to Michael to define his expectations after the test object is exercised, along with his assertions. For me, I have to say that defining the mock object's behaviors all in one place makes sense, so both the expected method calls and any return values should defined together - and the return values have to be pre-defined. We are using EasyMock here at GU (along with the Hamcrest constraints library) and I like it just fine. But that's more a matter of taste than anything else.

Posted by Simon Brunning at 03:26 PM | Permalink | Comments (2)
November 02, 2007
Brunning's Law

Brunning's 1st Law of Source Control: He who checks in first, merges least.

"Source control ate my files!" is a superb post. Spot on - 9 times out of 10, when someone complains about Subversion (or whatever) screwing things up, it can be traced back to fear of updates or commits, or to someone blatting someone else's changes with a blind merge. This last, especially, can always be traced - there's no hiding the truth when history is an open book.

The other time, it's someone trying to revert a revision from a dirty working copy. I've never yet seen the software get it wrong.

But for the love of God, Darren, start running a continuous integration server already!

Posted by Simon Brunning at 08:02 PM | Permalink | Comments (8)
November 01, 2007
Coverage Tools

Julian and I have been asked to put together some unit and functional test coverage figures. We've not actually been given any time in which to do it, though, so I wouldn't hold your breath.

Looks like some work was put into using Emma to provide these figures, but it's not finished.

Over in the Python world, there's been some discussion over on about Ned Batchelder's, which looks like a fairly nifty module.

OTOH, I think you have to be a bit careful with metrics such as those provided by these coverage tools. Ned himself points out many of the problems with taking your coverage figures at face value (though Emma's block-level approach fixes some of them).

I'd add one more issue - gaming. People can start to see good coverage figures as an end in and of themselves. If the coverage isn't at, oh, say 80%, the tests must be crap. If they are at 100%, they must be great. It's not just that the figures can be meaningless, they can actually lead people astray.

Now, for an approach to coverage testing that actually makes sure you are testing that your code does the right thing, check out Jester & Pester.

Posted by Simon Brunning at 06:26 PM | Permalink | Comments (3)

I've never been too intimidated by driving Subversion from the command line, so I've always maintained my branches by hand, keeping note of what had been merged in the check-in messages. But today Graham Tackley recommended I take a look at svnmerge. I must say, I didn't know what I was missing.

It keeps track of merges for you, ensuring that you'll never try to merge the same revision more than once, or miss any out by accident. Makes it easy to block revisions that you don't want to merge, too. Give it a try.

Don't forget - you'll need a decent merge tool, too

Posted by Simon Brunning at 12:39 PM | Permalink | Comments (3)
February 08, 2007
QCon London

I don't think I'll be able to make QCon, London this year - my current employer doesn't really see the point of conferences. Which is a shame, 'cos it could have been designed for us. There are an uncanny number of speakers relevant to us: Jeff Sutherland ('cos we Scrum), Gavin King ('cos we use Hibernate), Rod Johnson ('cos we use Spring), and Alex Russell ('cos we use Dojo), plus movers and shakers like Martin Fowler, Werner Vogels, Kylie, and Dave Thomas. I might be lying about one of those, though.

Never mind - there's always PyCamp!

And who knows - I might win a ticket. ;-)

Posted by Simon Brunning at 11:54 AM | Permalink | Comments (9)
November 06, 2006
London 2.0 RC 9

Right, I'm off to London 2.0, via a spot of CD and book shopping. I'll see a few of you there, no doubt.

Posted by Simon Brunning at 04:54 PM | Permalink | Comments (1)
October 24, 2006
Long interregnum

For reasons beyond our control we have a week and a half between scrum sprints - the period I have taken to calling the interregnum.

We usually only have a couple of days, which is a bit tight. There are plenty of things to do; a bit of user story definition and estimation, infrastructure maintenance, bug fixing, that kind of thing. But eight days - luxury!

I might get some blogging time in!

Posted by Simon Brunning at 12:34 PM | Permalink | Comments (1)
October 13, 2006
Merge tools

If you are going to be doing a lot of merging working with Subversion (or, I'd imagine, CVS), you are going to need good a good merge tool. And believe me, you are going to be doing a lot of merging.

Subversion itself doesn't provide a merge tool - and nor should it. It's a cross-platform command line driven tool, and besides, I suspect that most developers have their own favourite - or need to find one quickly.

If you are working on Windows, you'll probably have Tortoise installed, 'cos it's really good for simple stuff. Tortoise does come with a merge tool, but it's horrid, really nasty. Aside from just how damn ugly the thing is, it's also almost totally incomprehensible. All those colours - what do they mean?

But that's OK. There are alternatives, and they are easy enough to integrate into Tortoise. The first thing I came across was WinMerge. WinMerge is very good for showing diffs, but it doesn't (as yet) do three way merging - so that's out. Another, more powerful alternative is KDiff3. By the time I came across this, I'd already made my happy move to the Mac, so I've not used it myself, but my Windows-victim colleagues report that it works fine.

So the trick is to use the tool with diff in the name for merging, and the tool with merge in the name for diffing. ;-)

Tortoise also provides tools for making and applying patches, but they seem to use fully-qualified path names, so you can't apply patches from one machine to another unless it happens to keep everything in the same place. So, it's best to use Subversion to make your patches with svn patch > whatever.patch to make your patches (or svn st | awk '/^\s?[MAD]/ { print $NF } ' | xargs svn diff > whatever.patch if you've made the same externals mistake that I did), and to use unxutils' patch to apply them.

In the Mac, there's a natural solution - FileMerge, part of the XCode suite. It's very nice to use, if not perfect. (A few more keyboard shortcuts would be nice, for example, Apple, Just 'cos it's GUIfied and beautiful doesn't mean I should be reaching for the mouse all the time.) Integrating it with command line Subversion would be non-trivial but for Bruno De Fraine's lovely Using FileMerge as a diff command for Subversion - he's done all the hard work for you. Thanks for that, Bruno.

Oh, SubClipse also provides a merging tool, but I've never really used it. It's nice to have SubClipse around - the fact that it decorates all your files showing you their status against the repository is nice, and I often use it to add files - quicker than an svd add if you are in the IDE already. But IDE/version control integration is far less crucial than it used to be in the bad old VSS days when you couldn't edit a file without checking it out, so I do most of my Subversion tasks from the command line.

I'd be interested to know what all you *nix types use - especially anything console based.

Have I missed anything cool?

Posted by Simon Brunning at 08:27 PM | Permalink | Comments (16)
svn:externals: just say no

When we set up our Subversion repository, we did it wrong. And by we, I mean me. ;-)

Our application is modular - you can buy one bit, or several, depending on what you want. There's a core module, containing anything that all the other modules can't do without - authentication and authorisation, audit logs, that kind of stuff. Then we have a simple contact management module, a technical accounting module, and so on. (Mostly still to be written.)

Each is a separate web application - a separate WAR file. They communicate via SOAP. (I know, SOAP in this day and age. Still, it was what was required...) And each has its own Java package -,,, and so on. But they have a fair amount of code in common, which lives in And that's where we (all right, all right, OK, I) went wrong.

It's not all my fault - I blame VSS. We'd been using it for ages, and in VSS, you do things like this using shared folders. This was our first major project to dump VSS in favour of Subversion, and the closest thing we could find to VSS's shared folders was Subversion's externals. Brain damaged by VSS as I was, that's what we used.

In hindsight, a mistake.

Subversion's externals are really intended not for code shared within your own project, but for genuinely external code - stuff you want to pull in from other projects and so on. Subversion treats externals as 2nd class citizens in a way.

Updating your working copy is not a problem - the usual svn up works fine. But checking your changes back in, that's not so easy. If you've made changes to common code, svn commit leaves them behind. Merging, branching, making patches, just the same - externals are ignored. Fair enough, given what externals are intended for.

It's not so bad for me - bash helps out a lot here. To check all my changes in I do a:

svn st | awk '/^\s?[MAD]/ { print $NF } ' | xargs svn commit -m"Blah blah blah"

(Thanks to Andy for the awk lesson!)

Branching is still a bit of a pain - branching both common and the other apps, and munging the svn:externals property is a fiddle, but I can live with it. But for my Windows-victim colleagues, it's much worse. Padawan Dan has taken to cygwin like a duck to water, but for the rest of the team there's Tortoise.

Tortoise is fine for simple stuff, like updating and looking for conflicts. (Though its conflict resolution doohicky is horrid.) But whenever people try to use it for the slightly more complex jobs such as branching... things just go wrong. And we can never work out what happened. I'm not blaming Tortoise as such - I'm sure that it works fine. But GUIs are just not good for this kind of stuff. You need to be able to work from examples, and with a GUI, it's just too easy to leave some checkbox or other unchecked - and you'll never be able to work out what you did wrong after the fact.

So, what should we have done? Well, I think I know, but this is all a bit suppositional. ;-) What I think we should have done is not to have bothered trying to keep one copy of our common code. Instead, we should have had a copy of the common code in each application, and merged any changes to that common code to the other applications.

Sound right?

Of course, for all this merging, you need good merging tools. But that's another post...

Posted by Simon Brunning at 01:07 PM | Permalink | Comments (19)
October 04, 2006
Emacs and me

There's a discussion going on at the moment concerning refactoring dynamic languages. For whatever reason, its protagonists don't seem to be aware of Phil Dawes' excellent Bicycle Repair Man.

I'd love to give Bicycle Repair Man a go; it looks fab when Phil demos it. but there's one hurdle to get over first - Emacs. And it's a big one.

I've given Emacs a go a couple of times (most recently Aquamacs), and it seems to make sense to me. It's not totally horrid like that nasty vi thing that just beeps at me all the bloody time. No, it's just that the learning curve is steep, and I have real work to do, work that I can accomplish far more easily at the moment using jEdit.

There are loads of tasks that I can achieve really easily using jEdit that I wouldn't even know where to start looking for in Emacs - line sorting, search and replace across a filtered set of files throughout a directory sub-tree, opening files in archives or FTP repositories, HTMlifying, XML re-indenting. I know Emacs can do all this stuff, but I really don't know where to look for it all, and I need to get stuff done.

There are a couple of other jEdit features that I really like and would miss, too. The File System Browser (which I keep docked and open at all times) is a fabulous tool. I like a mouse driven interface for navigating around the file system, and jEdit's is a very powerful one. Also, the combination of the search bar and the hypersearch panel (which I leave on by default and dock at the bottom respectively) is really powerful too. Are there Emacs analogs of these tools?

Oh yes, and I like buffer tabs too.

And before Andy comes in and starts accusing me of being a weak-minded GUI lover, I'm not. I'm getting on fine with bash on the Mac. I'm starting to use awk and sed to do stuff on the command line that are totally impossible via a GUI. (Oh, and thanks for the help on that, Andy.)

So, should I stick with what I know? After all, it's not like I'm using Notepad here - jEdit's very good. Or should I take the pain and try to switch to Emacs? I'd be able to use Bicycle Repair Man!

Posted by Simon Brunning at 12:34 PM | Permalink | Comments (15)
December 08, 2005
Brunning's 1st Law of System Hassle

All IT systems have roughly equal hassle rates. Should you improve the quality of your software (by means of thorough automated testing and so forth), other components of the system (such as the RDBMS, or the hardware) will take up the slack by failing more frequently.

Posted by Simon Brunning at 01:39 PM | Permalink | Comments (8)
November 25, 2005

There goes our crowd for London 2.0.

Update: Just to be clear - London 2.0 isn't off by any means. It's just that I'm concerned that many of our potential attendees will go the the Backstage meetup.

Posted by Simon Brunning at 05:04 PM | Permalink | Comments (2)
November 23, 2005
London 2.0rc1

This is getting out of hand. December the 12th now appears to be a combined Python/Django/TurboGears/Ruby/Rails/Java/Spring/Hibernate/the million other things you need to build a Java web app these days/Perl/Catalyst/Maypole/Groovy/Grails Christmas party, and Jez is trying to get the Geek Girls on board too. Though that may be just wishful thinking on his part. ;-)

So, we really need another name. Jez suggested London 2.0, which is just so zeitgeist. Me, I'm more London 0.9, but I'll go with it...

Let's just hope the Perl guys don't have a punch up.

Posted by Simon Brunning at 01:14 PM | Permalink | Comments (10)
November 22, 2005
London Web Framework Night

Speaking of the London Web Framework Night - I never did write that up, did I?

OK, so, first up, Catalyst. What can I say? Catalyst may or may not be a great web framework, but since I didn't understand a word of the presentation, I'm not in any position to judge. It seemed mainly to consist of a list of CPAN modules that are either part of Catalyst, or can be plugged into it. No code, no working system, no screenshots, no inkling of what's in it for me. Nothing. Awkward, opaque, and unfriendly to all but insiders - much like I imagine Perl to be. (It must be said, the Perl mongers are aware of the problem - see this post, and this one. Message for Simon Wistow re your "Show Leon's Catalyst based web debugger. I'm willing to bet that it would be largely impossible in either of the other two" comment - I give you Ajaxy Exception Catching.)

Next up came Simon's Django presentation. I may have put The Fear into Simon about presenting to so many people, but perhaps I did him a favour - despite his admitted inexperience as a presenter, it was a cracking show. Compelling, funny, enthusiastic, and giving a very good idea as to what Django does, and how it does it. Using it will be pretty much a no-brainer when it comes to putting together a CMS style site. Whether it's the right platform for database driven sites like the kind of thing that I do for my day job is another matter. There's a clear front end/back end division with Django, with editors using its spectacular "magic" admin interface, and users mainly viewing content - though you do get community features like commenting pretty much for free. Perfect for a lot of sites, but would it suit enterprise database apps like banks and insurance houses need - and I write?

Simon demonstrated both the front and back ends of Django using - one of the sites for which Django was developed in the first place. Though the God of Demos made an apprearance at one point giving Simon an SQL exception, he also had a number of "oooh"s, and outright applause at least twice.

Last up was Matt Biddulph giving us a flavour of Rails. Struggling manfully through a stinking cold, Matt gave us the phiosophy of Rails in a very punchy manner. It looks very much a case of "do it our way", but that's often the right approach. Not enough code on show to tempt me away from a Python platform, though. ;-)

Without a doubt, the highlight here was Matt's demo of BBC Programme Catalogue. I have no words for how cool this project is. None.

I missed out on the booze up afterwards - I was feeling a bit fragile after several heavy sessions on the trot - so I'm sorry if I missed any of you. It was a good night nevertheless - a big thank you to Dean Wilson for organising it all.

Me? I'm looking at TurboGears. ;-) I like the concept of tying together best-of-breed components. Getting it running on my Mac was trivial, and the 20 minute Wiki is a superb demo. As soon as I locate some of that copious free time of mine, I'll try throwing together a simple site or two to see how it hangs together.

Posted by Simon Brunning at 06:46 PM | Permalink | Comments (8)
London Python/Django/Ruby/Rails/Java Christmas party

Not content with a Python/Django/Ruby/Rails meetup, Sam, Jez and I have teamed up to throw a Python/Django/Ruby/Rails/Java Christmas party this year. (For "party", read "bunch of nerdy blokes, many with beards, standing around drinking beer and chatting about computers".) It's at The Old Bank of England, Fleet Street on the evening of December the 12th.

Do leave a comment if you fancy coming - we have a room booked, and but we can change it to a bigger one if we need to. I anticipate a lot of interest, what with combining the Java crowd with the dynamic language people, and possible extra interest due to last week's London Web Frameworks Night.

Anyone want to demo TurboGears? ;-)

Update: Thanks to Dave and Dave, it's now a Python/Django/TurboGears/Ruby/Rails/Java/Perl/Catalyst/Maypole Christmas party. That has to be every web nerd in London, right?

Son of Update - This Time it's Personal: See London 2.0rc1.

Posted by Simon Brunning at 12:36 PM | Permalink | Comments (27)
November 17, 2005
London Web Frameworks Night

Off to the London Web Frameworks Night soon. It's gonna be good, I think. I met Matt on Tuesday at a meal organised by Sam, and the lovely (if slightly obsessive) Simon was there too. He's a little nervous about presenting to so many people. I don't think he was before I pointed out how scary it'll be, but he certainly is now.

Name dropping or what? ;-)

Anyway, I hope the drinking won't be too intense this evening. Tuesday night involved a lot of Kronenbourg Blanc. This is evil stuff - I had a very nasty hangover yesterday moirning. Not that it lasted - we had a new starter, Amy (just turned 18, bless her), and spent the afternoon in the pub. But I could sure do with a quiet evening.

Yeah, yeah, I know.

Anyway, I hope to see a lot of you there.

Posted by Simon Brunning at 04:10 PM | Permalink | Comments (3)
November 01, 2005
From Little Acorns...

We finished our first XP iteration last week.

My major observation - watch your estimates. Because the iterations are relativly short, one bad estimate can really fuck you up. One of our stories was initially estimated at 20 bananas, but when we broke it down into tasks, we had nearly 300! Since the first iteration (Acorn) was bound to carry a bit of overhead in terms of infrastructure, we were only intending to schedule 400 bananas for the whole iteration. Doulbling our estimates almost straight away was always going to be a bit of a problem.

(A banana is a an arbitrary unit of time - not an hour, but hopefully not too far from being an hour, either. Establishing what a banana is actually worth - which will take an iteration or two - should give us our velocity.)

Anyway, with a bit of hard graft, we didn't do too badly in the end. We delivered just about everything that we were intending to, bar one missing major function and a few missing system table maintenance functions. Oh yes, and a few missing unit tests, too - bad Simon.

We demoed it to our directors (our internal clients) yesterday. It seemed to go pretty well - everything worked, and after a shakey first five minutes, I even made use of some of the presentation skills I'm supposed to have been taught. I think the directors were more impressed by what we've done than we are!

(In fact, one of the Big Four missed yesterday, so I'll be going through it all again this afternoon with the help of my glamourous assistant, err, I mean my assistant, Tulna.)

Next week, another planning meeting, and round we go again. I'll be keeping a more alert eye on all the estimates this time. ;-)

BTW, here's an XP practice that I'd like to see us put into effect - Beer O'Clock.

Posted by Simon Brunning at 01:19 PM | Permalink | Comments (5)
Busy Month

It's going to be a busy month for nerdy stuff.

Firstly, there's Jez's London Java meetup on Thursday. Always a good night.

Then, next Monday, we have the London Python/Django/Ruby/Rails meetup. It's looking like we might get a good turnout for that - including my Technical Director! Gulp - I'd better be on my best behavior.

Then again, naaah.

On the 17th, there's the London Web Frameworks Night. Looks fascinating - demos of many of the happening web app frameworks back to back. Given the noise and drunkeness I don't tend to take much detail in during the Python/Django/Ruby/Rails meetups, so it'll be interesting to see more formal demos. Let's hope I'm quick enough to book a seat...

And lastly, there's the Einstein vs. Newton debate at the Royal Society on the 23rd. A different kind of nerdy, but nerdy nevertheless. Not to be missed.

Update: If you want to go to the London Web Frameworks Night, sign up now.

Posted by Simon Brunning at 10:28 AM | Permalink | Comments (2)
May 11, 2005
Hungarian Rehabilitated?

In Making Wrong Code Look Wrong, Joel explains the difference between Systems Hungarian Notation (which is what most people think of when they think of Hungarian Notation, and which is utterly pointless these days, Mark) and Apps Hungarian (which isn't anything like so crap, and might still have some utility from time to time). In fact, I find that I use something similar to Apps Hungarian, though I use suffixes rather than prefixes, and I don't tend to abbreviate.

He's still wrong about exceptions, though, Raymond Chen or no Raymond Chen.

Posted by Simon Brunning at 04:04 PM | Permalink | Comments (4)
April 04, 2005
So much for Joel the guru...

Joel has written some very insightful articles in his time. And as a writer, he's very talented. But then again, he's not right all the time. He doesn't like exceptions. He's not investing time in his toolset.

There's worse to come. He and his people build their FogBugz product using ASP. Well, it's not what I would have done, but clearly they are an MS shop with a considerable investment in MS tools and skills, and if they are happy to run on Windows servers, then it's an understandable decision.

Err, no. It turns out that they do want to be able to run on Linux. So, they have written an ASP to PHP converter. Madness, I tell you, madness. Even if it works.

Deciding upon the platform that you want your software to run on is pretty fundamental. If you want a cross platform application, write it in a cross platform way in the first place.

Posted by Simon Brunning at 01:34 PM | Permalink | Comments (6)
March 18, 2005
Jolt 2005 awards

Congratulations to the Jolt 2005 award winners (PDF). I've read, used or will use a number of the winners:

But where's Spring?

Posted by Simon Brunning at 09:39 AM | Permalink | Comments (1)
February 11, 2005
The curse of the project meal

We had planned the project meal to be on January the 31st. The system blew up spectacularly that day.

We fixed that, and re-scheduled the meal for today. Guess what's happened.

Update: Fixed. It was a nyetwork issue. We're off to Haz...

Posted by Simon Brunning at 10:31 AM | Permalink | Comments (2)
February 01, 2005
"I suppose that you'll be needing it now."

I won't go into much detail yet over yesterdays thirteen hour epic, but it was a narrowly avoided catastrophe.

Suffice it to say that we needed a copy of Lumigent Log Explorer, sharpish. I gave Solution Data a bell at around five. "Can you give me some idea as to the lead time on a copy of Log Explorer, please?"

"I suppose that you'll be needing it now, won't you? You can download it now, and I can get you a key in, oh, an hour or so." Clearly, they know their market!

"Err, yes."

They were as good as their word. So, a big thank you to Andrew Hulley over at Solution Data.

As for Lumigent Log Explorer, well, it works. ;-) It does what it says on the tin, and the interface was good enough that we were able to do what we needed to do, despite the fact that our first exposure to the tool was when we were using it to fix a critical problem. Not pretty, and a bit complex, but then it's not exactly an end user tool. You don't need Log Explorer, but if you do need it, you need it bad.

One other thing. If your backup strategy depends on something as complex and delicate as SQL Server Replication, then it's not a robust backup strategy. ;-)

Posted by Simon Brunning at 10:40 AM | Permalink | Comments (2)
January 28, 2005
Damn you, Mark Matthews!

I've had to make some changes to a very old project of ours. Very old. I've not worked on it since rebuilding my PC, so I've had to rebuild the project's environment from scratch.

Well, I can certainly see that we've learnt a great deal since then. The first problem is that the structure in VSS has nearly no resemblance to the structure in disk. Setting up all the working folders correctly is a nightmare. (OK, using VSS is the first problem :-)

We didn't know about Ant back then, so everything is built using nightmarishly huge batch files. Batch files aren't too flexible, so we have multiple versions of all of these batch files, which we have to build using template versions and a cool little find-and-replace script that I put together in Python. (God, that's nasty, too. I've learnt a lot of Python as well!)

The whole process is insanely complicated. (And I do mean complicated, not complex.) Thank God Tracey was in charge of documenting it. No one has ever accused Tracey of leaving anything out of a document. ;-)

All this is irritating. But the worst thing, by far the worst thing, is that bloody Mark left fistfuls of PAUSE statements all over the place. If I see "Hit any key to continue..." one more bloody time...

Update: It's finished, finally:

Press any key to continue . . .
* FINISHED EVO Development/EVO_Base GET ALL *
Press any key to continue . . .

Seriously. There's a PAUSE, and ECHO or two, then another PAUSE. Daily WTF?

Posted by Simon Brunning at 11:06 AM | Permalink | Comments (8)
January 26, 2005
Common sense

Or it should be common sense: Don't build web apps that only work in IE.

Don't do it deliberately, and don't do it by accident, either. Test with multiple browsers. I use Firefox (which is also my main day-to-day browser) and IE. I'd test with Safari on a Mac, too, if I could talk my management into buying me one, and with a Linux browser or two if I could talk them into allowing me to run a Debian box on the network.

Oh, and don't write web apps that don't work in IE, either. Like it or not, it's still 90% odd of the market, and will remain the number one for the foreseeable future.

Posted by Simon Brunning at 09:56 AM | Permalink | Comments (5)
December 17, 2004
December 09, 2004
Coders are from Mars, Clients are from Venus

A client sent me a request to build him a new report. (Using SQL Server. Don't ask.) Most of the request was specific enough, except for where he told me that he wanted me to include "the relevant financial values".

My level of domain knowledge isn't sufficient to know which financial values might or might not be relevant. (That's IT consultant speak for "I don't have the faintest idea how his business works, and I haven't got a scooby which columns to show him".) So I emailed him for clarification.

He came back to me, explaining that he wants to see the "appropriate financial values".

Ah, OK, thanks. I think a phone call is in order.

Posted by Simon Brunning at 03:20 PM | Permalink | Comments (3)
November 19, 2004
How can the richest country in the world look like this?

Made in USA - why americans make good software, and good movies, but bad places to live, and bad cars. By Paul Graham.

Paul himself points out the most obvious counter example, Apple, an island of beautiful design in a sea of cack.

Posted by Simon Brunning at 11:26 AM | Permalink | Comments (1)
November 17, 2004
Bloody SQL Server

It's just given me the error message:

Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '('.

Line three is, of course, a comment. The full script is over fifteen hundred lines long, and has a lot of parenthisies in it. How am I supposed to work out what's wrong?

Posted by Simon Brunning at 10:05 AM | Permalink | Comments (7)
September 03, 2004
Mad Hungarian

One for Mark: Hungarian notation: an outdated concept. See, Mark, there's almost nobody left who still thinks that Hungarian doesn't suck.

Posted by Simon Brunning at 01:48 PM | Permalink | Comments (5)
August 19, 2004
Code Complete, Second Edition

Another one for the wishlist.

Posted by Simon Brunning at 04:49 PM | Permalink | Comments (1)

The bloody clients now want major changes to a report which it took me about a week to develop in the first place using The Tool from Hell; StyleReport Pro. Bastards. The changes are probably major enough that I'll need to start again from scratch.

Posted by Simon Brunning at 02:20 PM | Permalink | Comments (2)
Hierarchical SQL

Cool - Joe Celko’s writing for O'Reilly. Joe Celko is the SQL guru's SQL guru - and if you're not an SQL guru, you need to become one. Hierarchical SQL is a nice introduction to handling tree structures.

Posted by Simon Brunning at 01:47 PM | Permalink | Comments (1)
June 28, 2004
Pragmatic Programmers Interview

Pragmatic Programmers Interview: "To get job security, developers need to position themselves as highly effective business-value generators, working with the rest of the company to solve common goals. If you sit in your cube waiting for a spec to be thrown over the wall, then you may be in for a wait -- that spec might be in an envelope on its way to Bangalore."

Posted by Simon Brunning at 12:55 PM | Permalink | Comments (1)
June 09, 2004
5250 fans aren't Luddites

Well, not all of them, anyway. ;-)

One of our biggest recent projects was a new Java front end to an old 5250 green screen application of ours. The majority of users were more than happy with the pretty new front end, but some were not. These users were finding that the GUI slowed them down.

Mouse considered harmful: "Have you ever watched an experineced heads down data entry clerk do thier job? With a green screen system they rarely look at the keyboard and in most cases ignore the screen. They are responding to audible feed back (key press clicks, console beeps, etc) with thier eyes focused on the data to be input. They remember key sequences (press 1, A, down arrow 2 times, F2 to save) to navigate. A mental model of the screens become engrained in thier head. They "SEE" the application in thier head and that vision is updated realtime. They know the system because it's predictable."

What's more, if the 5250 user gets ahead of the system, it doesn't matter - the 'dumb' terminal will just buffer their keystrokes, and play them back when the application is ready for them. So, they can enter data as fast as they can hit the keys.

I heard a story, probably apocryphal, about a salesman trying to sell what IBM calls a 'refacing' tool, and what the rest of the industry calls either a screen-scraper or a 'lipstick-on-a-pig' tool. He demonstrated how easy it was to slap a new front end on the 5250 app. The head of the data entry department then snipped off his mouse with a pair of scissors, and asked him to enter some data. "It costs us a penny every time one of our data entry people takes their hand off the keyboard," he explained.

Anyway, I've implemented a keystroke buffer for a Java app once before, and I know it's pretty much top of our to-do list for our pretty new front end. Perhaps then we can wean the last of our 5250 users onto it...

Via James Robertson.

Posted by Simon Brunning at 01:45 PM | Permalink | Comments (3)
May 28, 2004
Log it all! Mwahahahahahaha!

The artful logger.

Logging settings changes? What a good idea! When it comes to logging, less is not more; less is, in fact, less - more is more.

We use log4j to log everything in sight, with a DailyRollingFileAppender to keep from taking up too much space. We do get some pretty hefty log files, though, so we use Tail for Windows to keep an eye on them in real-time, or Python (what else!) to trawl through them if we are looking for something in particular.

Via Joe Grossberg.

Posted by Simon Brunning at 12:30 PM | Permalink | Comments (3)
May 19, 2004
Software Patents

Oh, shit: EU votes through software patent changes. This is bad.

Update 21st May: The Computer Weekly coverage is good: European Council approves 'controversial' software patent draft directive.

Via perfect.

Posted by Simon Brunning at 04:02 PM | Permalink | Comments (10)
A Rose By Any Other Name

A rose by any other name might well be bloody confusing. Naming is important. Sam writes about this in The importance of naming. I thought I'd point out Hacknot's fabulous Naming Classes - Do It Once And Do It Right.

Posted by Simon Brunning at 02:04 PM | Permalink | Comments (3)
May 12, 2004
Hara-Kiri computing

The demise of Hara-Kiri computing: A non-specialist might conclude that all the what-if analysis is aimed at ensuring that the system can detect and then recover from errors gracefully. However, in the vast majority of cases, this is not what is motivating the development team. Instead, the name of the error handling game is to detect errors and then *die* with as much grace as possible. The emphasis is on graceful death, hara-kiri style, rather than graceful error detection followed by correction/resumption. Nicely put.

Via Sean McGrath.

Posted by Simon Brunning at 01:28 PM | Permalink | Comments (2)
April 07, 2004
Postcode formatting

OK, sorry about this. Remarkably tedious (if rather useful) post coming up.

Everything you will ever need to know about UK address and postcode formats (in PDF), via the Universal Postal Union (where you can find similar documents for other countries' address formats), found via

Posted by Simon Brunning at 04:10 PM | Permalink | Comments (8)
March 30, 2004
Why Do Java Developers Like to Make Things So Hard?

Why Do Java Developers Like to Make Things So Hard?

"Imagine if the Perl cafe and Javahut were across the street from each other. You walk into Javahut, and ask to sit down. "I'm sorry," says the person at the door. I'm not actually the hostess, I'm a Factory class that can give you a hostess if you tell me what type of seat you want." You say you want a non-smoking seat, and the person calls over a NonSmokingSeatHostess. The hostess takes you to your seat, and asks if you'll want breakfast, lunch, or dinner. You say lunch, and she beckons a LunchWaitress. The LunchWaitress takes your order, brings over your food, but there's no plates to put it on because you forgot to get a CutleryFactory and invoke getPlates, so the Waitress throws a null pointer exception and you get thrown out of the place."

This is so true it hurts.

Still, could be worse. Working with RPGIV, there are no restaurants. Nor are there any supermarkets; you have to grow your own food. And make your own cutlery.

Via Ian Bicking.

Posted by Simon Brunning at 01:06 PM | Permalink | Comments (12)
March 22, 2004
Karmic feedback

I'm getting a spot of Karmic feedback for taking the piss out of Mark for his burger flipping VB6 programming - I'm starting on a six week RPGIV project at a client site next week!

This is bad: in decreasing order of love, my used-at-work programming languages are:

As you can see, RPGIV isn't high on the list. Sigh.

Still, I'll be working with one or two people I know and like, so it isn't all bad.

Posted by Simon Brunning at 04:29 PM | Permalink | Comments (9)
March 19, 2004
The world's worst variable names

The world's two worst variable names is a great read. I especially liked this comment.

I'm glad to see that How To Write Unmaintainable Code is having the real-world impact that it deserves.

The worst name I've seen recently in the projects I've been working on has been Skippy, the originator of which shall remain nameless.

Via The Farm.

Posted by Simon Brunning at 01:38 PM | Permalink | Comments (5)
March 10, 2004
Designing Developer Tests

Building good unit tests is a lot harder than it sounds. Designing Developer Tests is a very nice introduction to the art.

Got a good quotation in it, too: The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair. - Douglas Adams, Mostly Harmless

Posted by Simon Brunning at 04:44 PM | Permalink | Comments (3)
March 03, 2004
Defending YAGNI

Defending YAGNI.

One day, I'd like to be able to present an idea as well as Charles does here. One day.

Posted by Simon Brunning at 01:17 PM | Permalink | Comments (1)
How To Spot A Fake Programmer

How To Spot A Fake Programmer.

One more: Doesn't (or can't) use Google as their first stop when they have a problem.

Posted by Simon Brunning at 01:11 PM | Permalink | Comments (7)
February 27, 2004
Code Complete

Steve McConnell's Code Complete is one of the best books on software construction ever written, IMNSHO. Every standards manual (or as I prefer to call them, coding style guide) I've participated in since I came across Code Complete has been based upon it.

So it's great to hear that there's going to be a second edition. This new edition covers the construction of OO software, which the first edition did not. The draft is on line - looks good.

Via paradox1x.

Posted by Simon Brunning at 02:11 PM | Permalink | Comments (3)
December 17, 2003
Joel on Windows and Unix

I friend of mine recently referred to Joel as "A pompous, opinionated windbag". Which raised a laugh, I must say, but it isn't really fair. Joel's writing varies between the insightful and the frankly flaky, it's true, but I think that the former predominates.

In Biculturalism, he sums up the differences between the Windows and Unix cultures with: "Unix culture values code which is useful to other programmers, while Windows culture values code which is useful to non-programmers".

He was prompted to think about this while reading Eric S. Raymond's excellent The Art of UNIX Programming. ESR can be rather flaky himself at times - he's a gun nut, for one thing, and we really don't see his point on this side of the pond. But on technical issues his judgement is superb. We already knew that he likes Python. In The Art of UNIX Programming, we see him give an overview of Python and Java, amongst other languages. He's pretty fair, I'd say, but his preference is clear.

Posted by Simon Brunning at 04:14 PM | Permalink | Comments (8)
December 01, 2003

When trying to explain the difference between dynamic typing and weak typing, I used to refer to this page (specifically the Addendum at the bottom). I still will - it's brief, but gets the point across.

For the long version, though, in future I'll refer to What the heck is: A type.

Posted by Simon Brunning at 01:48 PM | Permalink | Comments (6)
November 27, 2003

Steve has a job. Good. Let's hope that this means that Kim is right, and things are picking up.

Posted by Simon Brunning at 02:13 PM | Permalink | Comments (0)
November 24, 2003
Pragmatic Programmer t-shirts

My programming job went offshore, and all I got was this lousy T-shirt.

Via PragDave.

Posted by Simon Brunning at 04:09 PM | Permalink | Comments (1)
November 21, 2003
codeja vu

codeja vu: the feeling that you are coding something that you already coded before.

Via James Strachan.

Posted by Simon Brunning at 01:34 PM | Permalink | Comments (2)
November 07, 2003
Code Kata

Steve's just about getting to the end of Head First Java now. (Which, BTW, he recommends.) He's going to work through Thinking In Java next, which I recommend.

But I've also advised him not to stick too closely to book learning. The best thing to do, I find, is dive off onto real coding whenever you have an idea for something to write. Do as much as you can, then and when you get stuck, go back to the books until you have another brain wave.

Robocode is great for this, if you are learning Java. You can write a simple robot very quickly, but the sky's the limit - as you work through the books, you'll get ideas for all sorts of clever things that you can do.

Another good source of ideas are Dave Thomas's Code Kata. Not just good for newbies, these coding exercises are good practise for anyone. I see Andy and Ian have been using them. I may have a go myself!

Posted by Simon Brunning at 01:54 PM | Permalink | Comments (3)
October 14, 2003

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

Sigh. Not very exciting.

Posted by Simon Brunning at 09:05 AM | Permalink | Comments (6)
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 by Simon Brunning at 01:01 PM | Permalink | Comments (1)
October 08, 2003
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 by Simon Brunning at 02:00 PM | Permalink | Comments (3)
September 24, 2003
The lucky, lucky bastard...

Joel is bragging about his new office.

In my office, I'm the lucky one, 'cos I've got the window desk. It only looks out onto an atrium, with a brick wall and another window ten feet away, but at least it's natural light, and I can open the window for some fresh air. Besides, the sill gives me somewhere to put my books. I don't have much room around me, though - Tulna's desk is four feet behind me, and we both have to fit into that gap!

Still, I can hardly claim to be on the 99.9 percentile, I'll freely admit.

Posted by Simon Brunning at 04:58 PM | Permalink | Comments (5)
September 22, 2003
Programming Fonts

Most developers spend a huge amount of time looking at code. Obviously, the quality of your VDU is very important, but it's also important to use a good font.

Obviously, you're going to use a non-proportional font for coding. As a Windows victim user, you get a couple by default. Courier New is just too hideous to contemplate. Lucida Console is better, but both these fonts have one big defect in common - it's hard to distinguish between zeros and upper case letter 'o's. Me, I prefer Andale Mono. (You can download Andale Mono here.)

Ned Batchelder points out Tristan Grimmer's programming fonts. Proggy Clean especially looks really nice for day to day code and text editing. Proggy Tiny, is, well, a bit too tiny for editing with, but it might make a good console font. I'll give them a try.

Update: I've had a look, and I think I'll be sticking with Andale for the moment, though Proggy Clean is almost as nice - it just takes up that tiny bit more room. Some samples: Andale Mono, Proggy Clean, and (for Hans) FixedSys.

(BTW, this code snippet arose because a colleague was struggling using a text editor to open a 1.2 gig log file in order to find all the lines containing a specific exception. A slight variation on this code pulled out the required lines, and took 13 minutes on an oldish PC. Another Python convert, I hope!)

Another update: V S Babu mentions Bitstream Vera in passing. There's a non-proportional font in there which looks pretty nice. An example - Bitstream Vera Sans Mono. But again, I think I'll stick with Andale.

Posted by Simon Brunning at 10:37 AM | Permalink | Comments (14)
September 09, 2003
Not my finest hour

There's a debate going on right now on python-dev about what kind of changes are acceptable in micro releases. (Micro releases are where you go from x.y.z to x.y.z+1 - for example, from 2.2.1 to 2.2.2.)

At one point, Fred Drake said "We might not be able to remove a core dump since it would allow code to run that was not run before, thereby changing the behavior of the code".

No one would rely on something like a core dump, right? Well, perhaps, but I was reminded of one of my nastiest ever iSeries hacks, which was very nearly as bad. Scarily enough, this was (and is) used in production code.

Posted by Simon Brunning at 12:31 PM | Permalink | Comments (0)
August 27, 2003
Sample aptitude tests?

Steve is looking for sample programmer aptitude tests. Any suggestions?

This one is funny, but Steve is looking for real ones.

Posted by Simon Brunning at 11:25 AM | Permalink | Comments (10)
Naughty naughty

Configuring Automatic Log Ons for Windows NT.

You probably shoudn't do this. But it's nice to know how. ;-)

I nearly used this hack. I was automating a process involving an application which only seemed to work properly if you rebooted before using it!

In the end, though, soving a bunch more RAM into the box seems to have done the trick.

Posted by Simon Brunning at 10:54 AM | Permalink | Comments (1)
August 26, 2003
The secret life of GetWindowText

The secret life of GetWindowText, via Joel.

I've been fiddling with GetWindowText myself recently. This explains a lot.

Posted by Simon Brunning at 01:09 PM | Permalink | Comments (0)
August 21, 2003
Test versus Type

Oliver Steele's excellent post, Test versus Type, explores at some length the argument that test driven development makes static typing unnecessary at best, positively injurious at worst.

I leave with you with a quotation from Quinn Dunkan:

"The static people talk about rigorously enforced interfaces, correctness proofs, contracts, etc. The dynamic people talk about rigorously enforced testing and say that types only catch a small portion of possible errors. The static people retort that they don't trust tests to cover everything or not have bugs and why write tests for stuff the compiler should test for you, so you shouldn't rely on only tests, and besides static types don't catch a small portion, but a large portion of errors. The dynamic people say no program or test is perfect and static typing is not worth the cost in language complexity and design difficulty for the gain in eliminating a few tests that would have been easy to write anyway, since static types catch a small portion of errors, not a large portion. The static people say static types don't add that much language complexity, and it's not design "difficulty" but an essential part of the process, and they catch a large portion, not a small portion. The dynamic people say they add enormous complexity, and they catch a small portion, and point out that the static people have bad breath. The static people assert that the dynamic people must be too stupid to cope with a real language and rigorous requirements, and are ugly besides.

This is when both sides start throwing rocks."

Via Ted Leung.

Posted by Simon Brunning at 11:27 AM | Permalink | Comments (0)
August 19, 2003
Extreme refactoring

Mark is stuck building a VB6 project at the moment. I took the piss out of him for a while, but by now I'm feeling really sorry for him.

He's currently having problems with 'event cascading', whatever that is.

"Right, I'm going to delete and re-write all the routines which are giving me gyp," he's just said. Well, shouted, mostly.

Posted by Simon Brunning at 02:20 PM | Permalink | Comments (2)
August 01, 2003
IT the EasyJet way

In Open Source Flying, Matthew Langham contends that the way the air travel industry has changed over the years may be a good model for the way the IT industry is changing.

In the old days, if you wanted to fly, you went to your national carrier and payed whatever they demanded, and that was that. Just as now, 99% of businesses go to one of the big vendors (Microsoft, IBM, Sun, etc.) for their software.

These days, there are a number of low cost carriers fighting over you. The national carriers are still there, offering high price, high standard, high convenience travel, but they no longer own the skies.

Will the big vendors lose out? I can't say I see any sign of it yet, but it would be nice if he were correct. ;-)

Via Daily Python-URL.

Posted by Simon Brunning at 01:46 PM | Permalink | Comments (2)
Nerd meetings and events in London

NullBlogException posted a list of Meetings and events in London.

I think I'll give one or more of these a bash. The Python booze-ups just ain't happening.

Posted by Simon Brunning at 01:05 PM | Permalink | Comments (1)
July 23, 2003

Nice little windows utility - AR RAM Disk.

If you develop software, you probably have steps in your build process where you create a lot of temporary files. (For example, a typical Ant build process will compile a lot of Java into class files, then put them together into a jar file). Creating all these transient files would be quicker on a RAM disk, and would fragment your disk less.

If, that is, you have the RAM for it.

Via John Lipsky.

Posted by Simon Brunning at 02:03 PM | Permalink | Comments (6)
July 21, 2003
Corporate Pimps

Corporate Pimps - Dealing with Technical Recruiters

Because recruiters are universally maligned, their clients have no more respect for their opinions than you do.

The recruiter has no technical knowledge. The skills you’ve spent years acquiring are just empty keywords and acronyms to them.

All so true it hurts. The only good thing about the downturn in the technical job market is that the Recruitment Consultants (as they label themselves in the UK) are getting it in the neck even worse than we are.

Anyway, some good tips here.

Via Alan Green.

Posted by Simon Brunning at 11:53 AM | Permalink | Comments (1)
The Ideal Programmer

Bruce Eckel, The Ideal Programmer.

An interesting, if unfocused, semi-rant about the poor quality of the average coder.

Some interesting numbers: 5% of the programmers are 20 times more productive than the other 95%. The majority (probably that other 95%) of programmers don't read books on programming. Now, I'd love to take this at face value - after all, I read a lot of books on programming. But most books probably don't make people into better programmers, just better informed programmers. In fact, it's often the complete opposite. The code examples in most tech books irritate me greatly, for example - they get across the narrow technical point that they are attempting to illustrate, but apart from that, they are often good examples of how not to code.

There are, however, a very few books which can make one a better programmer, I think. Code Complete and The Pragmatic Programmer, for example, should be mandatory reading for anyone who makes a living cutting code. Other good examples might be the GoF book, or Bitter Java.

How many people in our profession really love what they do? Not many - 95% (the same 95% again?) are in it for the cash - indoor work, with no heavy lifting. There do exist, though, programmers who do not love what they do, but do nevertheless approach it in a professional manner. I know - I work with some of them. But the couldn't-care-less brigade are always present, too...

Posted by Simon Brunning at 11:42 AM | Permalink | Comments (4)
July 04, 2003
XP and design

The company for which I work is not yet 'agile'. We are introducing test-first throughout our development process, though, and other we are looking at and discussing the other XP core practices.

One if the aspects of XP which seems to be putting some people off the idea is the absence of a specific design stage. Demystifying Extreme Programming: Just-in-time design demonstrates the just-in-time design concept.

Posted by Simon Brunning at 01:52 PM | Permalink | Comments (5)
July 01, 2003
Open source = higher quality

Interesting. In Closed source versus open source in a model of software bug dynamics, Damien Challet and Yann Le Du of the University of Oxford show that open source software has less defects than closed source, other circumstances being equal.

I'll have to try this on on El Presidente - "It's your fault that the software I wrote is crap. You insisted that it be closed..."

Via Azeem Azhar.

Posted by Simon Brunning at 02:50 PM | Permalink | Comments (1)
May 30, 2003
What is an object?

A post over at steered me towards this - Building user interfaces for object-oriented systems.

It has some interesting, if perhaps somewhat controversial, things to say on the nature of object orientation.

You may have read in a book somewhere that an object is a data structure of some sort combined with a set of functions, called methods, that manipulate that data structure. Balderdash! Poppycock! First and foremost, an object is a collection of capabilities. Very true, this. The important thing about an object is what is does, not what it has. The latter is an implementation matter.

Classes are irrelevant -- they're just a convenience provided for the compiler. Also true. This was pointed out to me while looking at JavaScript recently. Its rather, uh, idiosyncratic OO model does away with 'classes' as such. Instead, you just define a construction function, and add methods to its prototype. Look, Ma, no classes. (I don't really like this approach much - it makes subclassing rather clumsy if nothing else. But it does work after a fashion.)

All data is private. Period. (This rule applies to all implementation details, not just the data.) get and set functions are evil. (They're just elaborate ways to make the data public.) I like Python's approach here. No data is really private (see The principle of least privilege for why), but you can intercept any references to this data if you want. So, you just refer to object.attribute, and it's the object's business whether that just accesses the data attribute or calls a method. No need for get and set methods here.

All objects must provide their own UI. What? Is he serious? The presentation object should always be separate from the business object! Some business objects don't need any presentation layer, and some may need several. (The persistence layer should also be separate.)

Posted by Simon Brunning at 10:43 AM | Permalink | Comments (9)
May 28, 2003
Writing good exceptions

Cameron Laird on how to use exceptions - Writing good exceptions. Not how to use them in terms of syntax, but rather in terms of semantics. The examples are in Python, but the advice is applicable to any language supporting exceptions.

We have a lot of classes in one of my current Java projects (written by a cow orker) in which every method has a catch-all exception handler which logs any unexpected error, and then tries to keep on going. Me, I prefer the RuntimeException approach.

Posted by Simon Brunning at 01:45 PM | Permalink | Comments (2)
May 22, 2003
'Point-and-click' programming

Code diagrams enable 'point-and-click' programming. Yeah, right.

Anthony has been thinking about this sort of thing (see his Visual Programming posts), but I remain profoundly sceptical.

Posted by Simon Brunning at 10:43 AM | Permalink | Comments (8)
April 30, 2003
April 28, 2003
Are Programmers People?

Are Programmers People? And If So, What to Do About It?

Ken Arnold on human factors in programming language design.

Naturally, in a discussion about why programming languages are crap, Python is bound to be mentioned as a counter-example!

Via Ned Batchelder.

Posted by Simon Brunning at 03:42 PM | Permalink | Comments (1)
April 24, 2003
Ted Codd

A moment's silence, please. Dr. Ted Codd passed away last week.

I'd like to second Andy here - RDBMSes have been my bread and butter for years. Thanks, Dr. Codd.

Posted by Simon Brunning at 01:07 PM | Permalink | Comments (3)
April 16, 2003
The Hundred-Year Language

What will programming languages look like in the next century? No one knows, but Paul Graham has been thinking about it.

Posted by Simon Brunning at 01:16 PM | Permalink | Comments (1)
March 31, 2003
Your Knowledge Portfolio

Steve's post makes an interesting point - if they sack us all, who'll buy anything?

My current company is in a similar situation. We are small, and everyone knows everyone. After some initial rounds of redundancy (mostly chaff, but some wheat), we have now all voluntarily gone on to 4 days weeks to avoid any more job cuts. For the moment, that is.

The only means you have to protect yourself really is to keep your own skill set up to date. In The Pragmatic Programmer, (which I recommend) Andy Hunt & David Thomas talk about your skill portfolio. They suggest that you should treat your skill set like your share portfolio - invest regularly, diversify, mix high-risk-high-return investments with low-risk-low-return investments. Good advice, I think.

Posted by Simon Brunning at 11:50 AM | Permalink | Comments (1)
February 20, 2003
Seven Deadly Sins of Introductory Programming Language Design

Seven Deadly Sins of Introductory Programming Language Design (PDF)

An interesting read this, I thought. Most I agree with, some I don't.

It occurred to me that a few of the issues raised might point towards ways of improving Python as an introductory language. (I'm not talking about Java here 'cos I consider Java to be totally inappropriate for beginners.)

  • A single numeric type. Python is already moving in this direction. Slowly. Kinda-sorta. Python's two integer types (integers and long integers) are already pretty indistinguishable from a programmers point of view. The paper suggests that the single type be a rational. The addition of a rational type has been discussed on python-dev, but I don't think that there are any immediate plans to go ahead. But even if there, I just can't see Python abandoning integers and floats. A single type would make life rather easier for beginners, but Python is a real world tool. Anything which would help the beginner at the expense of crippling the experienced just wouldn't fit.

  • A single non-terminating loop construct. I do like the idea of something like a loop statement. The standard idiom for this in Python is while 1:, which I can see a beginner mistaking for something happening once. Perhaps better these days would be while True:, but again, I can see a beginner thinking - while what is true?

  • Zero offsetting. I can certainly see the fact that list[1] refers to the 2nd item of a list is likely to be a problem for a newcomer. But what to do about it? Apart from the practical impossibility of changing something like this in an existing language, (can you imagine the furore on if this was suggested!), it's also the case that in practise this is a more convenient notation. If beginners started off with 1 offsetting, and had to move to zero offsetting later, well, that's even harder. And I speak from experience here, coming from RPG.

On reflection, it seems that none of these would have any chance of making it into Python. Only the non-terminating loop construct would be reasonably backward compatible, and while while True: is ugly, it works. Ah well...

One thing I didn't agree with, (as you might expect from a Python fan) is the paper's assertion that using indentation to specify scope is an example of 'detrimental cleverness'. It refers to 'useful redundancy' between delimiters and indentation. I don't see it as useful redundancy, I see it as potentially confusing. If the two don't match, which is correct (in terms of the programmers intention)? Redundancy is almost always A Bad Thing in code, and having both delimiters and indentation is no exception.

What I don't see, though, is any indication that all this is anything more than personal opinion. Informed opinion, yes, but opinion nevertheless. Real useability studies would be good.

Via iamcal.

Posted by Simon Brunning at 01:29 PM | Permalink | Comments (1)
February 07, 2003
Typing: Safety causes Bugs

Alan Green: Typing: Safety causes Bugs.

Hmmm. Well, I've been using a mixture of Python and Java for some time now, so here is my personal conjecture:

I don't think that the extra typing required by 'safety' features actually cause bugs - they just don't stop them. Or rather, the ones that they stop are balanced by the additional ones that they introduce. For every time Java saves me from using a String as an int, I'll get a runtime error casting something around in order to get to a method that I know damn well it has, even if the bloody compiler doesn't.

In Python, if an object has a method, I can just call it. Thank you. If this isn't going to work, I'll find out while testing.

Ah yes, testing. That's where you stop bugs. Static typing might have pointed you at a few bugs a little earlier than your testing would have, but your testing would have picked them up soon enough. And if you don't test properly, your stuff is going to be buggy anyway.

The so called 'safety' features are only going to catch a subset of problems, and you would have found these problems eventually anyway. So if they add too much work at the coding stage, they are a net time loss.

Cameron Laird and Kathryn Soraiz's Syntax Checking the Scripting Way is interesting on this. And I'm reminded of a quotation:

The static people talk about rigorously enforced interfaces, correctness proofs, contracts, etc. The dynamic people talk about rigorously enforced testing and say that types only catch a small portion of possible errors. The static people retort that they don't trust tests to cover everything or not have bugs and why write tests for stuff the compiler should test for you, so you shouldn't rely on only tests, and besides static types don't catch a small portion, but a large portion of errors. The dynamic people say no program or test is perfect and static typing is not worth the cost in language complexity and design difficulty for the gain in eliminating a few tests that would have been easy to write anyway, since static types catch a small portion of errors, not a large portion. The static people say static types don't add that much language complexity, and it's not design "difficulty" but an essential part of the process, and they catch a large portion, not a small portion. The dynamic people say they add enormous complexity, and they catch a small portion, and point out that the static people have bad breath. The static people assert that the dynamic people must be too stupid to cope with a real language and rigorous requirements, and are ugly besides.

This is when both sides start throwing rocks.

Quinn Dunkan, 13 Jul 2001

Posted by Simon Brunning at 03:14 PM | Permalink | Comments (1)
February 05, 2003
Dave Thomas has a blog

Dave Thomas (co-author of The Pragmatic Programmer) has a new weblog - PragDave. One for the aggregator!

If you've not read The Pragmatic Programmer, you should. Well, if you are a programmer, that is. Not a lot in it for accountants, for example. (Or maybe there is - 'No broken windows', anybody? Still, there is certainly a lot of techie stuff in there.)

Via Ned Batchelder.

Posted by Simon Brunning at 12:07 PM | Permalink | Comments (1)
January 13, 2003
Erroneously Empty Code Paths

Ned Batchelder on Erroneously Empty Code Paths. Wise words.

Posted by Simon Brunning at 12:59 PM | Permalink | Comments (1)
January 10, 2003
.NET viable on non-Windows platforms?

Ted Neward thinks that .NET is viable on other platforms.

Is it just me, though, or are his points one and two somewhat contradictory? He says that WinForms, ASP.NET, ADO.NET, etc. won't be available off Windows. If you start leaving this sort of stuff out, how valuable is .NET anyway?

J2EE is indeed separate from, J2SE, but it's every bit as cross-platform, and every bit as free (i.e. free as in beer, but not free as in speech).

Posted by Simon Brunning at 11:19 AM | Permalink | Comments (0)
January 09, 2003
Decimal Arithmetic

IBM's Decimal Arithmetic FAQ is an interesting read.

Coming from an AS/400 background, I'm used to having decimal arithmetic around (albeit somewhat limited in terms of functionality). It is mainly used to store monetary values. Using floating point to store monetary values sucks.

Python doesn't come with a fixed decimal type, but the FixedPoint class will probably make it into the standard library at some point.

Posted by Simon Brunning at 01:58 PM | Permalink | Comments (1)
December 19, 2002
Encapsulation gotchas

The mutable return value gotcha mentioned in Avoid these simple Java encapsulation gotchas certainly isn't specific to Java - the same would apply to Python, and (I think) to C#.

Now, as a Python-head, I'm not big on enforcing encapsulation - see The principle of least privilege. But you certainly don't want to break encapsulation by accident, and mutable return values are an accident waiting to happen.

Posted by Simon Brunning at 04:09 PM | Permalink | Comments (0)
December 12, 2002
Choose your ghetto

Software development is just too complex these days for anyone to really know what they are doing in more than one 'programming world', according to Joel.

I think that he's probably right. I'm painfully climbing the foothills of the Java/J2EE world at the moment.

The iSeries world, my bread and butter for many a year, is probably static enough these days that I don't need to get left behind. This is good - it took a long time before I knew how to make the '400 fly in the first place.

A number of people at work are getting into the .NET world at the moment, in their own time. This seems a little odd to me - there is no realistic prospect of anyone making use of this stuff in my company in the near future. Still, I can see the attraction - .NET might not kill J2EE, but MS won't let .NET die under any circumstances.

Not that I'm tempted, you understand - MS are the Great Satan, so far as I am concerned. No, I'll stick with Java/J2EE.

Some tools are just so good that they help you whatever world you are in.

Posted by Simon Brunning at 01:04 PM | Permalink | Comments (0)
IBM to buy Rational - or Microsoft?

Speculation about the possibility of IBM buying Rational software have been slopping around the blogsphere recently.

Now, according to Reuters, it seems that it's possible that Microsoft might be trying to outbid them.

What's more, the Borg might be looking to snap up Borland, too.

Now, I've never used anything by Rational, so I have no strong opinion about who owns them.

The Borland thing is a different kettle-of-fish, though. I can't see how it would be anything but a bad thing if Microsoft were to take over one of its few real rivals in the development tools market. One of the few real innovators, to boot.

Posted by Simon Brunning at 09:20 AM | Permalink | Comments (2)
November 27, 2002
Hi-tech Hell

Hi-tech workplace no better than factories

They face the lonely insecurity of the individual entrepreneur in a marketplace and culture that stresses, with macho imagery from war and sports, that they are ultimately alone. For many this may be the shape of work in the 21st century.


Posted by Simon Brunning at 04:39 PM | Permalink | Comments (0)
November 18, 2002
The Journal of Object Technology

The Journal of Object Technology looks pretty interesting, if a little heavy at times.

Posted by Simon Brunning at 01:12 PM | Permalink | Comments (1)
November 12, 2002
The Law of Leaky Abstractions

The Law of Leaky Abstractions is dragging us down.

Yup, Joel, there is a lot more to know these days. But some of us like that. ;-)

Posted by Simon Brunning at 01:47 PM | Permalink | Comments (1)
The principle of least privilege

A very interesting post, nay, essay from the martellibot on The principle of least privilege vs. public by default, taking in the Waterfall methodology, Eastern European politics and Wittgenstein en-route.

It's in the Python newsgroup, but it's applicable to any development environment, and the code samples are in multiple languages.

The only Python thing that you need to know is that object members prefixed with a single underscore (_likeThis) are 'private by convention'. That is to say - there is nothing to stop you accessing or modifying these members, but the onus is on you to know what you are doing.

Members prefixed with a double underscore (__likeThis) really are private. You cannot access or modify these members through the normal mechanisms. (There are still ways of getting at them, but you really better know what you are doing.)

Alex argues that 'private by convention' is A Good Thing.

Posted by Simon Brunning at 12:52 PM | Permalink | Comments (1)
November 08, 2002

The deeper I look into persistence, the more confused I get.

In the old days, it wasn't too hard. We wrote our SQL, muttered a swift prayer to Codd, and away we went. In the even older days, we used native access methods, but there was still an RDBMS underneath.

In fact, the first systems that I worked on used flatfile, tapes, and DB1, all under PL/I. But my memories of that time are lost in the mists of Guinness.

But now, it's all very different. It isn't just data that we want to persist, it's objects. And from what I can tell, there isn't a generally accepted right solution to this.

One approach is to map objects onto tables in an RDBMS. Castor JDO can do this, as do Entity EJBs. In fact, there are many such frameworks. The advantages of this are obvious, especially to those of us who are comfortable with SQL. (My friend Steve used to whistle The Ride Of The Valkyrie when I was doing SQL updates.)

But it isn't very OO, is it? Not very twenty-first century.

Then there are OODBMSs. Java has Ozone, about which I know nothing, and Python has ZODB, which I've used, and is pretty funky.

Somehow, though, I can't see OODBMS replacing RDBMSs. Perhaps it's just that I've not got used to them. But when I first learned about RDBMSs, a light went off in my head - I knew that they were just right. I get no such flash of light from OODBMSs. But then, what do I know?

I suppose that there is always pickle. For Python, at least...

Update 11th November: A couple of approaches I neglected to mention. You can persist to XML. Castor does this, in addition to being able to persist to an RDBMS.

Then there is the Prevayler/PyPerSyst approach - keep everything in memory. Which is OK for small data sets, I suppose...

Posted by Simon Brunning at 01:44 PM | Permalink | Comments (5)
November 04, 2002
WebFacing into Tomcat does go!

They said it should work, and it does. So, can anyone tell me why a WebFacing user needs WAS?

Posted by Simon Brunning at 01:03 PM | Permalink | Comments (1)
Repetitive automation

The Cranky User: Could you repeat that?

One of the tools that we use is almost totally non-automatable. Not only does in not have any built-in automation features, but it doesn't seem to play by the rule in terms of its GUI, so AutoIt and the like can't drive it. Our weekly integration build takes all day, and is largely a manual process. Boring and error prone, too, and any repetitive manual process is bound to be.


Posted by Simon Brunning at 12:45 PM | Permalink | Comments (1)
November 01, 2002
File renaming - Java vs. Python.

See the Python (imperative) version, and the Java version.

Now, this is totally unfair to Java - this is exactly the sort of job that you shouldn't use it for. What it does demonstrate is the importance if picking the right tool for the job.

As to the functional version of the Python script, well, it looks ghastly to me. But that's probably more to do with the fact that I'm not used to fuctional programming than anything else - I'm sure that Alex's code is fine, and that a functional style is appropriate to the task. But if you haven't grokked functional programming yet, it just looks wrong.

Posted by Simon Brunning at 01:14 PM | Permalink | Comments (1)
October 17, 2002
The Browser will Rise Again

The Browser will Rise Again, according to Paul Prescod.

I'd like to think so. The problem that I have it that HTML's set of controls is so limited.

Java Applets, of course, get around this to some extent, though you certainly can't assume the presence of Swing, so you have to stick with AWT. You still get Paul's big four advantages, but the downloads can be pretty big...

Update 21st October: Browser UIs - is XUL the answer?

Posted by Simon Brunning at 01:34 PM | Permalink | Comments (1)
October 11, 2002
Ravioli Code

The Complete Pasta Theory of Software.

Via The Fishbowl.

Hmmm. My current system is probably tortellini code - components, but some are too large to swallow. ;-)

Posted by Simon Brunning at 01:24 PM | Permalink | Comments (1)
October 07, 2002
Scripting Java Applications

Anthony Eden has some interesting things to say on the subject of scripting Java applications.

Naturally, there are loads of options available for scripting Java apps, and choosing the right one can be difficult. Unless you are a Python bigot, like me, in which case the answer is obvious. ;-)

The Bean Scripting Framework (BSF) looks fascinating, though. BSF is a scripting framework which allows you to use any one of a number of languages to script your Java app, of which Jython is only one.

We are hoping to get Anthony over to talk at Python 2003 on scripting Java applications with Jython.

JPublish looks interesting, too.

Posted by Simon Brunning at 02:01 PM | Permalink | Comments (1)
Tips for Pragmatic Programmers

I have The Pragmatic Programmer, naturally, but I didn't realise that the Quick Reference Guide was on-line.

Via Sanjay.

Posted by Simon Brunning at 01:05 PM | Permalink | Comments (1)
October 04, 2002
How do I loath thee, VB? Let me count the ways

The worst has happened - I have to learn VB, so that I can look after some VB scripts that we use as part of our build process while our VB-head, Mark, is on honeymoon.

Then I come across this - Thirteen ways to loathe VB. Cancel the wedding, I say.

Actually, it's not quite as bad as all that. I'll get to teach everyone Python in return, and I'm confident that it will be well received. I reckon that I'll base the training on the first three chapters of Dive Into Python, then wing it on some more advanced topics. See what people are most interested in - COM, GUI building, regular expressions, web programming, Jython/Java integration, DB-API, that sort of thing.

Update 8th October: Mike Mitchell defends VB, and Verity Stob kicks the shit out of it again.

See also - Microsoft kicks the shit out of VB - VB.NET incompatibilities with VB 6.

Posted by Simon Brunning at 12:57 PM | Permalink | Comments (3)
October 02, 2002
Minimalist GNU For Windows

Minimalist GNU For Windows - GCC for Windows, basically.

Also on the MinGW site is MSYS, a command shell.

Might make a good companion to the Unix utilities for Windows.

Posted by Simon Brunning at 04:38 PM | Permalink | Comments (1)
October 01, 2002
The Extreme Tuesday Club

The Extreme Tuesday Club.

Can't make today - tube strike. Besides, I have a Python UK 2003 committee meeting this Thursday, and a Python UK booze up next Tuesday, and there is only so much geek-boozing that a man can take!

Posted by Simon Brunning at 02:05 PM | Permalink | Comments (0)
September 25, 2002
Software Engineering for Everyone

Software Engineering for Everyone is an interesting read.

Got this from

I would certainly not call myself a software engineer at the moment. I don't think I have ever worked with anyone that I'd call an engineer, either.

I have decided that it's time for a new language, so I'm finally going to give Haskell a go. I've got Simon Thompson's The Craft of Functional Programming. One of the things that I find interesting about functional programming is that is amenable to proof - you can prove a program correct. Whether this is useful in terms of non-trivial development is something I don't know yet, but it will be interesting to find out.

Update: Functional Programming Koans.

Posted by Simon Brunning at 01:41 PM | Permalink | Comments (1)
September 20, 2002
Text Processing in Python

The first four chapters of David Mertz's Text Processing in Python are online.

Fascinating stuff - I shall certainly be picking this up when it comes out - whenever that might be.

Only today, I was asked for a good RE tutorial, and I was able to recommend chapter 3.

I'm working through Mastering Regular Expressions, 2nd Ed at the moment. It's making my head hurt, but I'm learning a lot.

Posted by Simon Brunning at 01:03 PM | Permalink | Comments (1)
September 18, 2002
The "What Sucks" Index

The "What Sucks" Index - PHP comes out well, with Python coming in second. VB sucks big-time, C++ sucks bigger-time, and Perl and Java suck a bit.

All very scientific, I'm sure. ;-)


Posted by Simon Brunning at 04:57 PM | Permalink | Comments (0)
The End of Inheritance

The End of Inheritance: Automatic Run-time Interface Building for Aggregated Objects is a fascinating new recipe on the Python Cookbook.

Knowing both Python and Java has made me think about the relationship between types, interfaces, inheritance and classes a lot more than knowing just one would have done, I think. It certainly seems to me that the central concept is the interface - what roles can the object take. This is quite a separate thing from inheritance - that's about behavior, what an object actually is.

A good example here is the Python concept of a 'file'. Any object which follows the file 'protocol' (or the required subset of that protocol which is actually used) can be used anywhere that a real file object can. You could do this in Java quite easily, by implementing 'file' using an interface, but people usually seem to use inheritance instead.

This recipe allows you to build a class composed of other objects (with a 'has-a' relationship), but to automatically implement the behaviors of the contained objects.

You can do something similar with Java's Dynamic Proxy Class API, as as Java 1.3.

Via the Python Daily URL.

Posted by Simon Brunning at 02:07 PM | Permalink | Comments (0)
September 10, 2002
Hypocritical politeness

In A Culture of Candor, Phil Windley talks about the problem of a culture where being gentle to people's feelings is more important than the truth.

This is not the case where I am working at the moment, not really, but the right balance can be hard to find. I can be rather, uh, blunt at times, and when I first joined my company it seems that this was interpreted as arrogance. Now people know me, and they are aware that I'm not really arrogant, and that I know what I am talking about at least some of the time, the problem has gone away.

In my current team, discussions can be robust at times. That's OK, I think - we are all opinionated, and need to put our points across, but we all respect one another's abilities.

Our manager Paul finds it all very disturbing, though, worrying that all this ranting meant that we weren't getting anywhere. (Mark and I are particularly amenable to a good rant.) Now he tries to leave us alone to get on with it, and no longer tries to 'facilitate' our meetings. He's still unhappy, though, and I can see why - throw the wrong personality into our team, and it could turn into a real problem.

Posted by Simon Brunning at 09:47 AM | Permalink | Comments (1)
September 09, 2002
Open Source a threat to Java?

Sun's CEO Scott McNealy contends that Open Source is hurting Sun (and J2EE) in its fight against Microsoft (and 'NET).

In Sun's J2EE Standard Needs JBoss, Marc Fleury, JBoss founder, contends this.

O'Reilly's William Crawford has some interesting reflections on all this in J2EE Open Source.

VB and Java the only successful languages of the last two decades? Hmmm. Well, it really depends upon how you define successful. In terms of market share, I suppose that he's right, but people are successfully using Python, Ruby, Haskell, Objective C, PHP, Tcl and especially (shudder) Perl to develop useful tools, to name but a few. None of which detracts from his essential points.

It is certainly true that Java isn't really delivering revenue for Sun. But then, as Joel points out (Headline: Sun Develops Java; New "Bytecode" System Means Write Once, Run Anywhere), a hardware company developing a system which effectively makes hardware a commodity was always rather an odd decision. I'm not sure that you can pin the blame on Open Source!

Posted by Simon Brunning at 10:21 AM | Permalink | Comments (0)
September 05, 2002
IT is not geeky

IT is not geeky, says industry group.

Clearly they have never visited my office...

Posted by Simon Brunning at 03:35 PM | Permalink | Comments (0)
September 04, 2002
The IT Job Market

The rise and decline of Java/C++ programmers

This are US figures, yeah, but more or less the same is happening this side of the pond. Computer Weekly was down to two pages of non-public sector jobs last week. The number of my ex-colleagues out of work is truly frightening.

At least my project is making money. There is some reassurance in that.

But will the market pick up again? I think so, but not just yet, and not to the level that it reached during the golden years of the late nineties. CEOs are looking for dead-cert projects these days.

Posted by Simon Brunning at 02:05 PM | Permalink | Comments (3)
C# vs. Java

A Comparison Of Microsoft's C# Programming Language to Sun Microsystems' Java Programming Language

Some interesting stuff here.

Java desperately needs a foreach statement, properties and variable length argument lists. Especially foreach.

C# isn't cross platform, and exception handling looks weak.

Naturally, Python has all this. God, Python programmers are spoiled!

Update September 13th: A Comparative Overview of C#, another C# vs. Java comparison.

Posted by Simon Brunning at 11:48 AM | Permalink | Comments (2)
September 03, 2002
Eclipse Workbench is a site dedicated to the Eclipse open-source community.

It links to articles and plug-ins, and has an FAQ.

Also worth a browse - the Eclipse Wiki. The JDT Key Bindings, Remote Java Debugging and Interesting information got by Martin Möbius
pages are all worth a look.

BTW, Eclipse 2.0.1 is out. I used the Software Update feature to update automatically, and it worked fine - as smooth as silk. The same cannot be said for a couple of my colleagues - it didn't seem to do anything for them.

Ah well - Mark has never got on with Eclipse. It just doesn't like him. I think that it's 'cos he's a VB man at heart - Eclipse resents it. I've recommended to him that he stick to Notepad. Or EDLIN.

Posted by Simon Brunning at 02:06 PM | Permalink | Comments (0)
Good Advice and Maxims for Programmers

Mark Jason Dominus' advice for programmers. Very funny.

Not just funny, though. Very true, also.

Via Aaron Swartz.

Posted by Simon Brunning at 01:04 PM | Permalink | Comments (0)
September 02, 2002
Windows scripting

Eric's Webspace has some fab tips on DOS and Windows script writing.

Combine with Unix utilities for Windows, and you can get a lot done.

Of course, you really ought to be using a real scripting language...

Posted by Simon Brunning at 09:24 AM | Permalink | Comments (0)
August 28, 2002
The problem with Web Services

A New Direction for Web Services points out web services' Achilles heel - protocols.

Tools vendors have not, on the whole, implemented loose binding, because it's hard. So you need to write specific code for each protocol, so much of the hypothetical advantage of the web service approach is lost.

Posted by Simon Brunning at 01:15 PM | Permalink | Comments (1)
Why women make better managers

Why women make better managers

Women are more willing to explore compromise and to solicit other people's opinions. Is she kidding?

Via Babu.

Posted by Simon Brunning at 01:02 PM | Permalink | Comments (0)
August 27, 2002

Piet is a programming language in which programs look like abstract paintings.

See also Ook!, a programming language designed for orang-utans:

  • A programming language should be writable and readable by orang-utans.

  • To this end, the syntax should be simple, easy to remember, and not mention the word "monkey".

  • Bananas are good.

Java - who needs it?

Via iamcal.

Posted by Simon Brunning at 01:23 PM | Permalink | Comments (1)
August 21, 2002
Using Tomcat in Production

Interesting discussion on Slashdot - Who is Using Tomcat or Jetty in Production?

No one recommending Websphere, I notice.

We are using Tomcat for our latest product, but we haven't rolled out to our largest clients yet...

If we end up with scalability issues, there are some alternative J2EE servers mentioned here which we can look at.

I've been looking at JBoss anyhow. Tomcat gives you Servlets and JSPs, but not EJBs. JBoss gives you the whole J2EE stack.

Posted by Simon Brunning at 09:38 AM | Permalink
August 08, 2002
Go To Statement Considered Harmful

Edsger W. Dijkstra, the author if the seminal paper Go To Statement Considered Harmful, died yesterday.

Go To Statement Considered Harmful was the opening shot of the structured programming wars.

Edsger W. Dijkstra quotes:

"The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague" (from 1972 Turing Award Lecture)

"Program testing can best show the presence of errors but never their absence"

"Computer Science is no more about computers than astronomy is about telescopes."

"If you don't know what your program is supposed to do, you'd better not start writing it."

"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence."

"The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay."

"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."

Posted by Simon Brunning at 01:46 PM | Permalink | Comments (1)
August 06, 2002
Weak, Soft and Phantom references in Java

Reference Objects and Garbage Collection By Monica Pawlan.

See also O'Reilly on the WeakHashMap class, and an implementation of SoftHashMap, which is missing from the Sun library.

Weak references exist in Python, but unfortunately soft references do not. Which is a shame, 'cos they are very useful for eliminating memory leaks from data caches.

Posted by Simon Brunning at 01:51 PM | Permalink | Comments (1)
July 24, 2002
Mastering Regular Expressions, 2nd Ed

Mastering Regular Expressions, 2nd Ed, is out. The author explains What's New with Regular Expressions.

Python and Java coverage much expanded, apparently.

Update August 30th: Order placed with Computer Manuals.

Posted by Simon Brunning at 01:50 PM | Permalink | Comments (0)
July 16, 2002
Python Eclipse

Superb! Gerhard Kalab has started work on a Python plugin for Eclipse!

Early days yet, mind you, but excellent news nevertheless.

Posted by Simon Brunning at 04:54 PM | Permalink | Comments (1)
Measuring performance

Joel reviews Robert D. Austin's Measuring and Managing Performance in Organizations. Interesting for managers of any knowledge workers, not just Software developers.

See also David Aaronovitch's We all end up losing if we play the blame game.

Posted by Simon Brunning at 02:50 PM | Permalink | Comments (1)
July 15, 2002

PyUT is a UML class diagram editor with Python and Java round-trip support.

Or it will be...

It's going to be good, though - see the features list and screenshots.

Posted by Simon Brunning at 01:15 PM | Permalink | Comments (1)
July 01, 2002
Connection Pooling with Tomcat

Connection Pooling with Tomcat is just what I have been looking for - I've been trying to work this out for hours!

Dive into connection pooling with J2EE is a good follow-up read, but it doesn't have a simple step-by-step guide to getting started.

Posted by Simon Brunning at 02:21 PM | Permalink | Comments (0)
June 28, 2002
Open source web application servers.

Open-source servers today discusses a number of interesting web app platforms.

I use Apache and Tomcat at work. Java is my company's platform of choice, and we are doing a lot of servlet stuff. Seems to work beautifully. Small footprint too - WebSphere is a monster.

JBoss and Enhydra I will look at further - I'm just reading up on J2EE now. (Java for the Web with Servlets, JSP, and EJB. Good. A big book, but that's 'cos it covers a lot.)

I have mentioned Zope before.

(Via Daily Python URL)

Posted by Simon Brunning at 01:29 PM | Permalink | Comments (1)
The case for static types

The case for static types at developerWorks is an interesting counterpoint to Cameron Laird and Kathryn Soraiz's article.

I'm beginning to think that the thing that I dislike most about Java is not the static typing. I think it is mainly down to the fact that you cannot override the built-in operators ('+', '-' and so forth).

This, combined with the fact that the common data structures (Vectors, Hashtables and so on) are not built-ins, but come as part of the standard library. It seems to me that 80% plus of my code involves these data structures. Due to the fact that every operation requires an explicit method call, the code is very verbose. They don't call Java 'Object Oriented COBOL' for nothing!

In Python (You knew I was going to get on to Python, didn't you!) you can override operators, and high level data strictures are built-in. So you can iterate through any sequence with a simple:

for item in sequence:

Lists and files are both sequences, so both can be iterated with this syntax. And because you can override operators, you can make sequences of your own simply by overriding a couple of methods, and then process them with this syntax. Beautiful.

Posted by Simon Brunning at 11:50 AM | Permalink | Comments (0)
June 27, 2002
Stargate Eclipse - iSeries Development Update

The dawn of Eclipse.

My boss and I attended the Stargate event at IBM yesterday. There we were shown the new version of the WebSphere Development Studio Client. This comes in a bewildering variety of versions, and consists of an equally bewildering array of subcomponents. All of the versions of WDSc, and all of the subcomponents were referred to by acronym, and all the acronyms began with W, and we were thoroughly confused.

But anyway, the long and the short of it is that if you are an iSeries shop, you get the lot.

The new version of WDSc is based in the Eclipse framework. As anyone who has used Eclipse will know, it is just beautiful.

Eclipse is basically a framework for building IDEs, and other things. It ships with a plug in which makes it into a Java IDE, which as I said, is superb. Tools vendors other than IBM are also basing tools on Eclipse.

WDSc consists of a number of plug-ins to Eclipse to enable iSeries development. It has tools to navigate libraries and objects on the iSeries - think of a cross between PDM and Windows Explorer, but with filtering options more powerful than either. You can edit and compile RPG, DDS and so on, with any one of several powerful editors. SEU is ancient history now.

There are also some powerful tools for developing Java based web applications possibly involving iSeries components, though not necessarily. The tools for building JSPs, beans of various types (including EJBs) and so on are powerful. There are also tools to building wrappers around iSeries based RPG modules and turning them into beans and/or web services.

All great stuff, and for iSeries development it is going to be wonderful.

It is missing one crucial set of tools, though, as far as I am concerned. There are no tools for refactoring RPG. All these clever tools which IBM provide are meant to work on nice modular systems, where your presentation and business logic are nicely separated. Our legacy system isn't like this - it consists of large programs (5000 to 15000 lines) with the business and presentation logic thoroughly mixed. There are no separate callable modules implementing business functions, and that is what much of the new tooling requires.

Now, obviously there is no way to automate the modularise of a large program - it is inevitably a manual job, and a big one. But there are tools which can help - or there could be.

The Java development tools which ship with Eclipse include a number of powerful refactoring tools. For example, you can highlight a block of code and extract into a separate function (method). All inputs to and outputs from the selected code are automatically worked out, and turned into parameters (arguments). If large RPG systems are to be modernised, this is the sort of tool which we need.

I brought this up at the event. IBM have no plans to build this sort of thing into WDSc. Eclipse is totally modular and extensible, though, so anyone could do it. It was suggested that this might be an opportunity for my company! We are not a tools vendor, though, so it isn't going to happen. There were a number of tools vendors present, though, and a couple were interested enough in the idea to come and talk to me...

The latest version of WebFacing was also demoed - on which more later.

Update: Eclipse Forces Developers Across the Java Divide at the iSeries Network.

Update 02 July 2002: See Welcome to the Dawn of Eclipse by Phil Coulthard and George Farr, the guys who presented Stargate. Plenty of screenshots, and lots about the RPG tooling.

Posted by Simon Brunning at 11:50 AM | Permalink | Comments (1)
June 25, 2002
Always the bridesmaid, never the bride.

Why is it that CEOs are never from an IT background?

AWS thinks that it is because IT people are IT centered, rather than people and business centered. This probably used to be true, but I think that it is less true now.

See also this SlashDot thread - Project Management For Programmers?

Posted by Simon Brunning at 01:43 PM | Permalink | Comments (0)
June 20, 2002
The truth behind programming languages

Brainfuck, Mueller: "I wasn't aware of the existence of Perl". ;-)

More about Brainfuck.

Posted by Simon Brunning at 03:07 PM | Permalink | Comments (1)
June 19, 2002

Hmmm. A quiet news day today.

Anyway, there is a discussion about testing at Slashdot Developers.

Posted by Simon Brunning at 12:44 PM | Permalink | Comments (0)
June 18, 2002
Why software is so bad...

Why software is so bad...

Ironic that this is on MSNBC. ;-)

So, litigation is the answer, eh? Bloody Americans. Still, it's true that software is currently a long way from being an engineering discipline, but that it could be. It would be a huge culture shift, though.

'Correct by construction' - there aren't any languages which make it hard to write bad code, I'm afraid. "Real programmers can write assembly code in any language." There are languages which make it easy to write good code, though.

(Via Techdirt)

Update: Slashdot is covering this. Interesting comments this time.

Posted by Simon Brunning at 12:13 PM | Permalink | Comments (0)
June 14, 2002
Design Pattern Matrix

Netobjectives' Design Pattern Matrix is a design pattern quick reference.

Worth a hard-copy, I reckon.

Posted by Simon Brunning at 01:04 PM | Permalink | Comments (1)
June 13, 2002

The effbot likes BEEP (see July 9th.)

What is BEEP? Well, see Bird's-eye BEEP. It's an XML based peer-to-peer asyncronous message protocol framework. Enough buzzwords for you? I can't say that I know what it's for, though...

Posted by Simon Brunning at 05:06 PM | Permalink | Comments (1)
Managing Software Engineers

Managing Software Engineers. One for Paul, my ever-suffering boss.

Like we are engineers. Yeah, right.

(Via Babu.)

Posted by Simon Brunning at 02:26 PM | Permalink | Comments (0)
Get to know some tools!

Get to know some tools!

If you don't like learning new things, then you are in the wrong business.

Posted by Simon Brunning at 01:45 PM | Permalink | Comments (0)
June 12, 2002
New release of omniORB

A new version of Duncan Grisby's CORBA ORB for C++ and Python, omniORB, has been released.

I saw Duncan speak at this year's Python UK conferance. He sold me on CORBA, I must say, but I haven't put it to use yet. I wouldn't be surprised if I used CORBA with Java first.

Posted by Simon Brunning at 03:32 PM | Permalink | Comments (0)
Professional Programmers

"VB is often the first language of the clueless". ;-)

Funny, but a bit harsh, I think. I know some good VB programmers.

Also, I agree with tk's post - I think that it's likely that good programmers want to get into open source, rather than that getting into open source will make you a good programmer.

Why? Because you are likely to be a good programmer if you are an enthusiast. And who gets into open source? Enthusiasts, that's who!

Posted by Simon Brunning at 01:41 PM | Permalink | Comments (0)
Software installation with Ant

A good introduction to Ant at O'Reilly onJava.

(Via Babu)

Java Tools For Extreme Programming finally turned up, after going to the wrong address at first. I'm not far into it yet - I'll write more when I am. Just going from the introduction, though, Ant looks wicked powerful. The source control (including VSS) and web application integration make it a must-learn.

Posted by Simon Brunning at 01:13 PM | Permalink | Comments (1)
June 07, 2002
Eclipse community projects and plugins

There is a new community projects and plugins page on the Eclipse site.

Jalopy and CheckStyle look interesting on the Java side. Still nothing Python related though. :-(

Posted by Simon Brunning at 01:17 PM | Permalink | Comments (4)
June 06, 2002
Conceptual Models of a Program?

Very interesting discussion on Slashdot Developers.

Posted by Simon Brunning at 02:42 PM | Permalink | Comments (1)
Using Swing with Jython

Useless Python has an article on Jython and Swing.

Other good tutorials and code snippets here too. Worth exploring if you have some time while you are waiting for the Python Cookbook.

(Or you could always look at the cookbook online.)

Posted by Simon Brunning at 02:09 PM | Permalink | Comments (0)
Eclipse F2 is out.

Eclipse F2 - get it now!.

Other Ecllipse news:

New version of WebSphere Development Studio to be based on Eclipse.

QNX Releases Eclipse-based IDE.

Posted by Simon Brunning at 01:34 PM | Permalink | Comments (1)
May 30, 2002
Totally awesome software?

This article at Salon Tech is a good introduction to Extreme Programming.

There are some good ideas in XP. I must say, though, that I think that it would have a lot more chance of being accepted by the pointy-haireds if it was called something else. Oh, wait, it is! It's also referred to as Agile Programming - see this article in Software Development.

Well, perhaps it isn't exactly the same thing, but it's pretty close. And it has a much more sensible name.

BTW, I have now ordered Java Tools For Extreme Programming.

Posted by Simon Brunning at 02:59 PM | Permalink | Comments (0)
May 29, 2002
Wicked Problems

Fascinating article in this month's Software Development magazine.

We have all worked on projects like this. Nice to have a name for the phenomenon, and to know why they are so difficult to deal with. A couple of good tips on dealing with wicked problems, too.

It's interesting how giving a name to something makes it easier to grasp. Somehow, concepts are more tractable when they have a name.

Patterns are like this. Once you have decided that you need, say, an abstract factory, all of a sudden you know a lot more about your problem than you did before.

Posted by Simon Brunning at 03:33 PM | Permalink | Comments (0)
Language Neutrality and the Java Platform

Interesting links from Lambda the Ultimate.

Of course my favorite language has been implemented on the Java platform, so it's good enough for me!

Posted by Simon Brunning at 01:57 PM | Permalink | Comments (0)
May 27, 2002
Why won't users RTFM?

According to this article it's basically because manuals aren't interesting.

This is true, but what can you do about it? If you are writing a game, well, perhaps you can make things more interesting. But if you are writing a manual for, say, an insurance system, well, what can you do?

In fact, Joel points out that users don't read anything.

Posted by Simon Brunning at 12:42 PM | Permalink | Comments (1)
May 21, 2002
Eclipse 2.0 soon

According to the release schedule for Eclipse 2.0, it will be released at the end of June.

We use Eclipse as our IDE for Java development. It is bloody good.

It is also going to form the basis of future versions of the WebSphere Development Tools for iSeries. RPG in Eclipse - I can't wait!

There are also Eclipse plug-ins for C# and Ruby - perhaps a Python plug-in is in progress? Can't find one.

Posted by Simon Brunning at 12:33 PM | Permalink | Comments (0)
Are All Languages Equivalent?


"If you want to trick a pointy-haired boss into letting you write software in Lisp, you could try telling him it's XML." Classic.

I don't think that Python is a Lisp clone, though. It steals borrows from loads of languages.

(Via Lambda the Ultimate)

Update 28 May 2002: Paul Prescod's reply, On the Relationship Between Python and Lisp. Oh, and Lisp isn't XML. Still a good line, though.

Posted by Simon Brunning at 12:05 PM | Permalink | Comments (0)
.NET to be patented?

Over on, it has been suggested that Microsoft might patent .NET, C# and so forth, despite opening the standards.

Is this true? If so, what will happen to Mono?

Posted by Simon Brunning at 11:29 AM | Permalink | Comments (0)
May 20, 2002
What is Well-Commented Code?

Interesting discussion at Slashdot Developers.

I must say that I am commenting a lot less these days. Using modern IDEs like Eclipse or Boa, long names are not a problem., so I'd rather give a function a self explanitory name, and not bother commenting it at all.

Back on the iSeries, 90% of my work is on existing RPGIV code. With a six character limit on field and subroutine names, well, loads of comments are needed..

One of the comments on the /. discussion agrees with this. And has a link to a Radio 4 live feed! Cool!

Posted by Simon Brunning at 12:57 PM | Permalink | Comments (1)
May 03, 2002
Google's Genius, or Google's Gaffe?

Paul Prescod wrote an article suggesting that Google might have made a mistake in basing its new Web Service API on SOAP.

Sam Ruby thinks different.

Mark Pilgrim, the voice of common sense as usual, points out that all existing Web Services are pioneers. Have a go with all the web service protocols, 'cos a de-facto standard won't arise for a while yet.

The effbot, meanwhile, has his own opinion.

Joel also has his opinion on this, in which he claims that "the trend is away from variant-bound scripting languages (VBScript, PHP, perl) towards typed code (C#, JSP).". See here for why I think (and certainly hope) that he's wrong.

Posted by Simon Brunning at 01:17 PM | Permalink | Comments (1)
May 02, 2002
Jython Essentials

I picked up Jython Essentials on my way home last night, more or less on a whim. I don't actually use Jython, but a juxtaposition of my language of choice, my favourite technical publisher, and my workaday language was impossible to resist.

Its a good book, and I learned a lot about Jython. It's even cooler than I thought. You can subclass Java classes in Jython, or vise versa. A Java class subclassed in Jython can then be re-subclassed in Java again. It's just all too cool to be true!

Type conversions between the two languages is pretty much automatic, though you can get fine control if you want it. You can embed Jython in a Java app if it needs scripting. You can compile a Jython app into a single Java class or jar, either a small one requiring the jython.jar to run, or a big standalone one. And the interactive prompt is a brilliant way to explore the behavior of Java existing classes, and to smoke test your own. It's a one stop shop for all your Java scripting needs.

It also got me thinking again about why I prefer Python to Java so much. The things which irritate me the most are these:

  • Boiler plate code. This is the code which you end up writing again and again and again. Looping through the containers, for example, requires so much code. Now I don't object to verboseness as such - where it adds value. But where it just adds characters, it's irritating. Python's

    for line in list:


    syntax is perfectly comprehensible, and concise.

    And don't get me started on Enumerations...

  • Integration of data structures into the language. You can't override the the built in operators for classes, which leads to very verbose code.

  • Hand holding. If Java tells me one more time that a local variable 'may not have been initialised', when I know damn well it will have been, I swear I'll scream.

Having said all that, Java has its pluses - interfaces are really cool, and JavaDoc is a wonderful tool.

Posted by Simon Brunning at 03:59 PM | Permalink | Comments (0)
May 01, 2002
Syntax Checking the Scripting Way

Cameron Laird and Kathryn Soraiz's article is well worth a look.

One of the most frequent objections to scripting languages (such as Python) is that their lack of static types and declarations will make your code buggier. Until I tried Python, I would have thought the same thing myself. In practice, though, it just doesn't seem to be a problem.

At work, I use Java. Sure, some of the mistakes that I might make are picked up at compile time (or earlier, using a smart IDE like Eclipse). But only some of them. So I have to unit test thoroughly anyway. So all that the static type checking buys me is that I find some errors earlier than I otherwise would.

This would be good, except that static type checking makes me jump through a lot of hoops sometimes to get stuff done. I am certainly many times more productive with Python than with Java.

Now, I would never have discovered this unless I had given Python a try. Dave Thomas and Andy Hunt recommend that a professional developer should learn one new language a year, and preferably one based upon a new paradigm. I'll second that.

My next target is the functional language Haskell.

Posted by Simon Brunning at 03:58 PM | Permalink | Comments (0)
Joel talks to Tom DeMarco

Joel's chat with Tom reveals that groups of developers can work in open plan offices. Bah!

I find that I have real problems staying in the zone these days. Phones ringing, other peoples conversations, you name it, it all distracts me.

See also Joel on XP.

Posted by Simon Brunning at 12:11 PM | Permalink | Comments (3)
April 29, 2002
What Every Computer Scientist Should Know About Floating-Point Arithmetic

What Every Computer Scientist Should Know About Floating-Point Arithmetic, by David Goldberg.

But remember, in Business computing, all you really need to know about floating point is to never use it. Quite seriously.

Posted by Simon Brunning at 06:05 PM | Permalink | Comments (0)
Java Tools For Extreme Programming

(Book review at Slashdot.)

This looks interesting. I've not practiced Extreme Programming (XP) myself, but I'd like to work up the courage to have a go.

Actually, I'm not in a position to make this decision. If my team don't practice XP, then I can't.

For more about XP, see the Extreme Programming Roadmap at the original Wiki Wiki Web. This is also home to the Portland Pattern Repository. Be warned - you can lose days here!

But even without XP, this looks useful. It has sections on Ant,JUnit, Cactus and HttpUnit, all of which would be useful even outside the context of an XP project.

Posted by Simon Brunning at 05:47 PM | Permalink | Comments (1)