Java XHTML Renderer
Joshua Marinacci has started writing a new XHTML renderer in Java. He’s done a pretty impressive job at getting started but I get the impression that he has no idea what he’s in for. At the moment the rendering is pretty good but the speed is absolutely awful. While you shouldn’t ever optimize too early, it’s certainly possible to optimize too late and HTML rendering is one of those areas where you suffer death by a thousand cuts. I wouldn’t be at all surprised if he has to rework large parts of his architecture to reduce the number of string comparisons to speed things up. That’s the kind of thing that you probably should think about before hand (note that I haven’t even looked at the code so he may have already considered that). The other thing that I notice is that it doesn’t seem to support incremental layout yet so it has to wait for all the images to download before it can do anything. In an HTML editor that pretty easy to do because you’ve already got the code to update the layout quickly in response to changes but I’m not sure if there’s an easy and efficient way to do it without having to implement all that. The big complaint I have though is that there doesn’t seem to be any licensing information which is something you really should sort out at the very start of the project so people know what they’re getting themselves in for. Anyway, it will be interesting to see how the project goes. Update: The project page says the license is LGPL. Oh well, guess I won’t be having anything to do with it then.
Java Deprecation
Java.Net is having conversations about removing stuff from the standard Java libraries because they’re getting too big. The comment below really stuck out at me:
Combine that with a program to remove redundant functionality (by declaring it deprecated so it gets killed 2 releases later) and you have a powerful tool to get people to stop using old stuff like Vector and StringTokenizer.” Vector and StringTokenizer aren’t “old stuff” – they’re extremely useful classes with a specific purpose. Vector is a guaranteed thread safe implementation of List – something you can’t possibly get other than declaring that you want a Vector. To clarify that, consider the method signature
public void doStuff(List items)what are the thread safe requirements on items? There’s no way to know and the default assumption would be that it doesn’t have to be thread-safe. Whereas with:public void doStuff(Vector items)the code may be less flexible now but the compiler now guarantees that you’ll get something that at least claims to be thread safe. It is still possible to extend Vector and perform non-thread safe operations but that would be a bug in the extending class because it failed to live up to the contract of the parent class.StringTokenizeris a particularly useful class in that it provides the simplest way to break a String down into tokens. You could iterator of the characters yourself or you could use regex to do this but manually iterating is reinventing the wheel and regex are highly inefficient for doing what StringTokenizer does. Furthermore, nothing in StringTokenizer is marked as deprecated in my copy of the Java 1.4 API, nor anything in Vector. Seriously, just because you don’t find something useful doesn’t mean it’s not useful.
Senators Behaving Well…
While browsing a collection of stupid pranks (most of which aren’t at all funny) I stumbled across some really great responses to a “10 year old school kid” (who in fact was the prankster) writing in to ask all 100 US senators what their favorite joke was as part of a school project. I think it’s fantastic to see that a number of them replied, but one that really stood out was this one from Senator Jon Corzine from New Jersey. Not only did he take the time to respond with his favorite joke, it was actually a good joke and he took the opportunity to teach this young child about the state of New Jersey. Now whether or not he wrote the letter personally or one of his aids wrote it for him, it’s still great to see that there’s a culture in that office of going beyond the minimum required and taking the opportunities to do good that are presented. Disclaimer: I know nothing else about Senator Jon Corzine, I’ve never been to New Jersey (or the US for that matter) and until I read his letter I knew nothing about the state of New Jersey (which for some reason that noone seems to know, is called the Garden State). For the record, “the garden state” in Australia is Victoria. Who knows why…. They have since changed their license plates to read “Victoria – On the move” to which most Queenslanders add: “to Queensland”.
Unique Snowflakes
You are a unique and beautiful snowflake – just like everyone else.
Is This A Joke?
This is either a joke or the most biased reporting I’ve ever come across. If it’s a joke it’s not funny and if it’s biased reporting it’s so overly biased as to be obvious and thus much less effective. Not that I don’t think Blair’s labour party deserve to be voted out but comparing them to Hilter’s Nazi party is way over the top. For the record, the article appeared on the front page of Google News.
What Were They Thinking?
Firmly in the “what were they thinking?” category: two menu were arrested and charged with animal cruelty. What did they do? Kill a live mouse (each) by chewing it. The management of the Exchange Hotel where the incident occurred as part of an organized promotion claim “they knew nothing about it”. I’m the sure the expense claim for a holiday weekend on the Gold Coast (which was to be the prize) wouldn’t require any explanation….
Lawyers Behaving Badly
David Starkoff points out this case regarding the provision of adult entertainment on Good Friday. David points out how “ironic (apt, perhaps?)” it is that the Common Prayer Book is pivotal in the final decision. However interesting it may be that:
the Almanac annexed to the Common Prayer Book has been regarded as part of the common law, and in consequence would have been received into Australia as part of the common law (Halsbury, 3rd Edition Vol 15 para 611 and Vol 37 para 133) from my exclusively non-lawyer stand point I would have to pick the following excerpt as the highlight of the document:
Apple Bugreporting
Apple has a bug tracking tool called radar and they let any ADC member log bugs into it which they may or may not get around to fixing. They don’t however let anyone outside of Apple view the current bugs in the system. This causes great amounts of flamage on Apple’s java-dev list (and I imagine many of Apple’s other lists as well) about whether or not the list should be open. Every few weeks someone just has to come along and ask how they search the open issues and it starts again. Last time it came up some actual progress was made on the issue. Someone suggested creating a publicly accessible, unofficial bug listing that people could log bugs in, in addition to logging them with Apple, and those bugs would be publicly accessible so that people could find any work arounds that might be available. Of course there are three draw backs to this: 1. People may log the bug just with Apple and not in the 3rd party bug reporter. 2. People may log the bug in the 3rd party reporter and not with Apple. 3. People may see that the bug is already logged in the 3rd party bug reporter and not log it with Apple. Problem 1 is a non-issue. It just means that that particular bug report isn’t publicly available. Too bad, so sad. Problem 2 is a major issue because it means that Apple will never know about the bug and thus never fix it. (Nothing gets done at Apple without a radar issue being created according to the Engineers who’ve commented on the matter) Problem 3 is also a major issue because Apple prioritizes bugs based on how many duplicate reports they get. If people see the bug has already been reported they won’t report it again and Apple will think it’s not important and fix it whenever they get around to it. Obviously the combination of problems 2 and 3 is particularly disastrous. So the question then becomes, how do you create a system that lets people easily log bugs and search for existing bugs while still getting most people to log the bug with Apple? The ideal solution would be to have any bug logged in the public system automatically logged in Apple’s system as well. Existing bugs could have a button that allowed users to log a duplicate bug complete with a reference to the original issue with one click. The trouble with that approach obviously is that it requires access to Apple’s system which I don’t have. I’m not sure they’d appreciate having an automated system screen scraping their bug reporter to log bugs. It also doesn’t encourage people to specifically log their own case and thus can deprive the Apple engineers of that one subtle bit of information that suddenly makes the bug simple to reproduce. It’s probably possible to make the form look just like Apple’s so that it’s a simple matter of copy and paste to log the bug in both systems. A big red notice about how Apple wants to get duplicate bug reports might help alleviate problem 3 but it definitely wouldn’t solve it. All up, I’m just not sure if a publicly available, 3rd party bug database would help or hinder the situation. It would definitely be useful to have a place to go to search for existing work arounds though.
Musical Reaches Beta
The musical I’ve been writing has now reached “beta” stage. All the scenes are written, pretty much all the lines are written and it really just needs to be reviewed and cleaned up. Like developing software it’s hard to know exactly when to called it finished. I also have the feeling that I get at the end of most software projects: I know it’s not finished yet and I know things need to be improved, but I can’t quite put my finger on what to work on and how to improve it. Essentially, I don’t feel that the script is ready for prime time and while there are some things that I know still need work there’s a lot of stuff that I just feel that I want to improve but don’t know exactly how to go about it. Part of that feeling is actually not knowing exactly how to move from writing the script into actually starting production. Hopefully the same approach I take with software will work with musicals too: do everything that you can work out needs to be done, write done each new thing you find needs to be done as you find it and when you can’t think of anything left to be done, release it. In terms of starting production I think just arranging some auditions would be a good start – finding a venue is another task I know needs to be dealt with and will likely be difficult. I’m sure it will all fall into place.
Moving House
It looks like I’ll be moving house at the start of July. Just went to check out the new place and it’s a big 5 bedroom house on top of a hill in Mt Gravatt. Almost 270 degree views out over the suburbs (the missing quarter is the city view) and the place is currently being renovated. Still no lease signed but the owner is apparently a friend of one of the guys I’ll be moving in with. The only real concern is that I haven’t actually met this guy, but he comes on the recommendation of my current house mate and that’s proved reliable in the past. Besides, I’m really sick of living in this tiny little unit with two cars and one garage.
JavaScript Hacks
JavaScript is one of those odd languages that noone really appreciates the full power of. Mostly that’s because it’s also an awful language that’s hard to get the full power out of, particularly when working with multiple browsers. Still, my work often calls for large amounts of JavaScript hacking.
Some interesting things I’ve learnt lately:
In Safari, if you use window.open(‘file:///Users/aj/file.html’, …) it will either not open the file at all or refuse to execute any JavaScript in the file in the first time the page is loaded (reloading the page causes the javascript to execute). However, if you use window.open(”, …) and then window.location = “file:///Users/aj/file.html”; it works perfectly. Go figure.
Google Ranking
Hey, I’ve hit the number one spot on Google again. Ha! In your face Adrian Sutton!