Steve Cook has a particularly interesting blog post on UML and semantics. Steve points out that UML has no objective semantics, but that each team should decide on a shared semantics for their own diagrams. That semantics is usually written in prose.
All very sensible, but it makes me wonder (again) what using UML really buys you. I guess if you could write a formal semantics for the diagramming elements you planned to use, it might be possible to generate more sensible code from the diagrams. Steve points out, though, that such a formal semantics clashes with the way people think. And that, I reckon, is the whole problem with UML. In the past (and the present, for some of us) we all used to write whatever gibberish we liked, not necessarily consistently, and it meant whatever we wanted it to mean. Now we have a universal syntax (though no universal semantics), life's a bit different, and diagrams are no longer thoughts written out loud. Now our diagrams have to serve several purposes: to help us clarify design thoughts, to communicate designs to others, to generate stubs, and loads of other stuff. Can one syntax or tool really do all this? I suspect not, and I think Steve's point is the reason why: people don't think unconsciously like they do maths consciously; and that's always been a problem for Computer Science.
- Weird Python bug?
I've been writing some nice Python code for work and come across the single weirdest bug I've ever seen or heard about -- maybe I'm just naive! All my Python files are scripts, just so I can run each file to do it's unit testing. I usually say #!/bin/env python at the top of each file, but #!/usr/bin/python replicates the bug just as well.
The bug is this: for one of my files (and only one) if I type at the command line $ python filename everything works fine, but if I type $ ./filename I get this error message: : No such file or directory and nothing else.
I've tried commenting out the entire file, renaming the file, running cat -v to see if there are odd non-printing characters (there aren't) and now I've run out of ideas :-(
- Weird Python bug update
- Since posting this a bunch of extremely nice people have emailed me to say that this bug is caused by 'doze-like new line characters at the end of the #! directive. D'OH! Thanks to everyone who wrote to me...
- Er, life's all right atm although nothing wildly exciting's happened. Maybe that's a good thing ;) This Christmas John and I are going to be visiting friends, which should be excellent. It's amazing how long it's been since we saw anyone outside Coventry. Eek!