Look here for the latest developments and releases of SEQUENCE.
In July I wrote a little LGPL program for UML Sequence Diagram Sketches. I've now taken the time to make a couple of improvements in response to user requests.
- The diagram can now show a notation next to the return arrow. So, for example you could show the return type.
- There is now a very basic preferences system so that you can change the colors that are used in the diagram and choose whether or not to display return types.
- You can now include spaces in object names, method names, and return types by surrounding them by single or double quotes.
So, for instance, this diagram is produced from this text.
(Comments newComment
(CommentFactory newComment "a new comment"
(Comment new
(IDGen nextID newId)
(Transaction "add(this)")))
(Comments addToCache))
Here's a screen shot of SEQUENCE in action and finally links to an executable jar file and a jar file containing the source code.
A useful search for today in the US. Google Search: temperature turkey internal cooked
When you hear Mr.Gravel is in the foyer in a theatre what does it really mean? This thread provides some answers/guesses/complete inventions. I really can't distinguish between the three cases as I've never had a job where anyone's told me any of this sort of stuff.
Via Simon Brunning I was pointed to this post, J2EE vs. NET, Java vs. C#, by Graham Glass.
It's an interesting read. I agree with his remarks about Java and C#. C# is a decent evolution of Java. There are a few point I don't like, for instance why reintroduce goto or why have to use virtual before you can use override? On the other hand attributes are very useful.
However, I disagree about with Mr. Glass about the relationship between .NET and J2EE. It may well be that J2EE appears more complex that .NET but I think this is for a very understandable reason. J2EE has been around a lot longer, and has been used to solve a greater range of real world problems than .NET. Sometimes it wasn't able to provide a solution, so things were added and J2EE has evolved to become more complex. .NET will go the same way; currently it looks simpler, in the way that Java was simpler in 1997, because it hasn't been around long enough to have to have it's limitations patched or overcome. I think there is a certain irreducible complexity in some problems and the framework used to solve them is going to have to address that, not everything is simple and easy to solve.
Via Lambda The Ultimate comes this commentary Impressions of the International Lisp conference ILC2002 from Oleg Kiselyov. Excellent stuff, including such gems as I learned that Kent Pittman is an angry man --- and interesting observations on Google and programming in general.
I was reading an article on the BBC site about the firefighter's strike which includes the quote pour discourager les autres. This is interesting because I think the author meant pour decourager les autres. I'm not claiming my knowledge of French is even slightly above minimal, I have an O level from a long time ago, but Google reassures me on this. The original quote, which was, I'm sure, being knowingly referred to is pour encourager les autres. Applicable in many situations when a punishment far heavier than is warranted by the offense is imposed in a politically motivated, and fairly cynical, attempt to prevent others committing the same offense, and to deflect blame.
The original quote is by Voltaire in Candide
Dans ce pay-ci, il est bon de tuer de temps en temps un amiral pour encourager les autres.
In this country it is good to kill an admiral from time to time, to encourage the others.
He's referring to the execution of Admiral John Byng in England in 1757. Sent in 1756 to prevent the French from taking Minorca, he arrived when the island was already under siege and, after an indecisive naval engagement, withdrew without relieving the siege. He was court-martialed and executed for "failure to do his utmost". This brought charges that he had been used as a scapegoat for ministerial failure. On his tombstone it says "bravery and loyalty were insufficient securities for the life and honour of a naval officer".
I sort of got carried away with this post. I knew the original quote and vaguely what the story behind it was but it's interesting how easy it is to find things out on the web. I'm sure I don't have any books at home that mention Admiral Byng at all, so doing this a few years ago would have involved many trips to the library; which, though fun in themselves, can be a bit time consuming.
From The Register, what is purported to be an internal MS whitepaper comparing Win2K and FreeBSD from the point of view of running Hotmail. Gotta love the tabloid headline though. MS paper touts Unix in Hotmail's Win2k switch.
It looks like I'll be taking a trip to Redmond to take part in a Java to .NET migration workshop. Of course the whole thing is covered by an NDA so that's about it. Maybe I'll find out the real answer to the question "Why .NET?" that I wrote about on kuro5hin.
An experiment. The Java to .NET evalgalist who's running this workshop is called David Weller. The usual google search turns up the fact that he has a blog. Interesting, I wonder if he, or Microsoft, will do similar searches on the attendees? At work we tend to search on google for anyone who comes for an interview, or arrives to take up some position or other, which recently of course hasn't been many people!
An interesting quote from Frank Atanassow in a discussion Lambda the Ultimate What's Wrong With RDF? This may help to explain why XML advocates are so strident about syntax: if they were to admit the negation of the proposition "syntax does matter", then they would have to revise all the consequences of that proposition, on which the greatest part of their ideology is founded. Frank goes on to say I think the importance of syntax is dwarfed by the importance of semantics, and most of my ideology vis-a-vis PLs is founded on the fact. That's a position I agree with.
I really don't like going to the dentist. A couple of months ago I finally plucked up the courage and went in for an exam. Of course it turned out that I needed what I considered major work, to whit removal of two wisdom teeth and four fillings. So what's the point of this? Well, two things really. First I can heartily recommend the oral surgeon and dentist I went to. The wisdom tooth removal was completely painless and the fillings were bearable. Second, laughing gas greatly improves the Cartoon Network. I was lying in the dentists chair before the fillings breathing laughing gas (I'm a nervous patient!) waiting for the local to take effect and watching the Cartoon Network, without the sound, on the TV on the wall. I had three thoughts, one, I have no idea what sort of animal some of those little Warner Brothers cartoons were based on, I mean, I only know little bugs bunny was a rabbit because big bugs bunny looks slightly like one. Two, several movies I've seen recently would be much improved by laughing gas. Three, these ideas are all pretty silly and therefore I should write them down.
I ran some quick tests to compare the performance of Grouping Using the Muenchian Method and grouping using the technique I wrote about earlier.
Of course the clear winner is the Muenchian Method, which takes about 2 seconds to produce the same output that the other method requires 29 seconds to produce. Here's the XSLTXT version of the Muenchian grouping code I used.
I was pointed to Jenni Tennison's excellent XSLT Pages for a better and faster way of grouping using XSLT. I think I'll try and point our consultants at work at this, should improve the general standard of XSLT. Hopefully this weekend I'll be able to give the Muenchian Method a try and see how it works for me. Thanks to Ned Batchelder for the pointer.
Things are pretty hectic at the moment.
Imagine that you have an xml document containing record elements. Record elements contain column elements, which have name attributes. The record elements are ordered by the text content of the column with the name purchaseOrder. You want to transform this so the the record elements are separated into groups with each group containing records with the same purchase order value.
The imperative solution is pretty obvious. Have a variable that keeps track of the purchaseOrder value of the previous record. Loop over the records and each time the purchaseOrder of the record being processed is different from the previous purchaseOrder you've reached the start of a new group.
Of course in XSLT you can't update the value of a variable so this solution isn't going to work. One way to do it is to recursively process the list of records. In XSLTXT it looks like this which in XSLT looks like this.
Everyone knows you can write regular expressions that are easy to understand as you write them but difficult to decipher later. XPATH of course suffers from the same problem. As an example I offer this:
.//Container[not(ancestor-or-self::Container/@name = 'buttonPanel' or ancestor::Container[contains(@name, TWTableWidget')])]|.//Component[not(ancestor::Container/@name = 'buttonPanel' or ancestor::Container[contains(@name, 'TWTableWidget')] or contains(@name, 'Zoom'))]|.//Component[@name = 'saveButton' and ancestor::Container[@name = 'buttonPanel']]
Thankfully when I wrote it I also wrote a comment.
Ignore the buttonPanel, anything it contains except for any saveButton, any Zoom buttons, and the contents of any TWTableWidget panels.
So there's obviously going to be no problems maintaining this in the future :)
This happened in Knutsford, the town down the road from where I grew up. Granddad guns down terror squirrel We have squirrels in the back garden here in Austin but they seem much more timid, thankfully :)
A O'Reilly Weblogs post extolling the benefits of code generation. I tried to look at the Gen
Will Stuyvesant provides the shortest renaming. You can just type ren *.txt *.xml when using Windows. The full rules for using ren to rename multiple files are here.
I've added code to XSLTXT so that it can be used in place of XSL in the Ant style task. Take a look at the longer explanation here.
I wonder if they'll eventually be more firms like Netbox to provide less generic computers? The selling point is the design, the technical specs are good enough for general work but it certainly looks better than the three beige boxes I've got at home.