Archive for February, 2005

Coding for your kid

Saturday, February 26th, 2005

Back when I was a wee youngster, we bought a BBC Basic model ‘B’, the draft-horse of the 80s British education system. As we all did, I learnt to program a bit etc etc. My dad also did some programming (with a bit of Fortran experience from the decade before I think) and wrote two applications for my sister and I.

The first was a mathematics quiz program. Simple stuff, but nicely laid out so it was more than just questions on the command line. The second was a graphics program that he ended up playing with more than we did and discovering the limits of his environment (his program listing got too large to load into memory).

So if nothing else, I want to write programs for my child(ren). The first game is called Pound and is wonderfully simple (so easy to code, or would be on a BBC model ‘B’). Each key that is hit on the keyboard translates to a sound (musical note) and a change to the screens colour. Baby sits and hits keyboard, learning that the keyboard leads to two repeatable events.

Musical notes are bizarrely complex in Java; you have to use the javax.sound.midi package to create them. A bit of googling put together the system needed, and sounds pretty good once you put in a bugfix for 1.3/1.4 JVMs as well. For the colours, I just change the background of a Canvas object; the tricky part with the colours is coming up with an exciting set of colour changes that won’t turn into an epileptic strobe effect.

My current algorithm is to treat the key’s ascii value as a streaming cipher. Key pressed equals the blue of the background’s rgb. The last backgrounds blue is the green, and the previous ones green is the red. This creates some nice colours, doesn’t strobe easily and encourages use of more than one part of the keyboard as it tends to grey quickly if the same key is hit repeatedly. Bad side is that the colour is not repeatable.

We tried Nathan out on it this morning, and it seemed to go well. It was near nap-time so he got tired quickly, and was wet, but he still wanted to hit the keyboard to make more noises so I think it was a success. Now if only there was a way to get the joy of seeing your child use a program you wrote into every coder/user relationship :)

Jakarta download pages now live

Monday, February 21st, 2005

Keep going on about these. Anyway, now live at http://jakarta.apache.org/site/downloads/. Various minor improvements to come I suspect (1.0.zip -> hivemind-1.0.zip as link name for one). Apologies if any links are broken, done my best to avoid screw-ups.

Cafepress + Books

Friday, February 18th, 2005

So when blogging that what the open-source book world needs is someone like Cafepress who’ll handle the pdf to book conversion; one should really check Cafepress to notice that they do this already.

A Homer moment.

VisualCafe….

Tuesday, February 15th, 2005

I happened to wonder what happened to VisualCafe today. Saw a job advert that wanted it. If you don’t recall it, VisualCafe was at one point the market leader in Java IDEs along with JBuilder. The IntelliJ of its time.

It was brought by WebGain in 99 or something, a company who bought a few products to release as a grouped studio. Then they vanished. Heading over to their site, they’ve wound the company down and sold their assets off to various buyers. VisualCafe went to TogetherSoft. TogetherSoft were then bought by Borland. So the current owners of VisualCafe (I’m guessing), are Borland.

So it’s dead :)

More Jakarta download page work

Sunday, February 13th, 2005

More work on the Jakarta download page replacement tonight: http://jakarta.apache.org/~bayard/jakarta/site/downloads/download.html

Mainly all about simplification. Still needs CSS improvements where things are a bit cramped; there’s a missing ul tag to fix on the 2nd level of pages (velocity, tomcat, commons) and the cgi strategy (ie mirrors) still needs to be figured out.

Nightlies are now on the specific download page, as suggested by Robert. Makes a lot more sense I think.

So few more bits to do, try and get Jakarta to move to it, and then try to integrate it into larger ideas for java@apache :)

Dashboard vs Konfabulator

Saturday, February 12th, 2005

I’ve been discovering the Konfabulator widget framework recently. Very nice, develop using XML and JavaScript, integrates nicely into OS X and a bit less to Windows, very good community built up. Commercial though, so hard to say if I’ll pay the N x 25 dollars, where N is the computers I’d want to run it on.

The Konfabulator product has been in-housed by Apple with their new Dashboard. It’s developed using extended HTML and JavaScript, which might make life a bit easier. Konfabulator’s absolute positioning is a pain in the arse. Also makes Safari the test environment.

I’d be all for Dashboard, but it doesn’t seem that you can attach your widgets to the desktop (think Active Desktop, but good). Konfabulator lets you do that on a Mac (though not on Windows) and it’s the killer feature for me. I want to always see all my monitoring widgets and not have to press a key or key-chord to see what’s going on.

That’s another killer feature that Dashboard sounds like it might not have. If I’m not in the Dashboard, the widget probably doesn’t run. I want a widget that not only periodically monitors something in the background, but then opens Safari or a dialog to tell me that something is wrong. Konfabulator looks like it could do that, Dashboard looks like it couldn’t.

Quite possibly, Apple have focused too hard on mimicing the basic functionality of Konfabulator and not enough on the power-features.

JDK 1.4 'bug'

Friday, February 11th, 2005

Been having fun with a painful bug in JDK 1.4 on and off over the last week. Seems to be something that is known about out there, so just thought I’d mention it.

An Applet running in JDK 1.4 may not deserialize a java.util.TimeZone object; it breaks the permissions by accessing sun.util.Calendar. I’ve been serializing JFreeChart Time graphs on the server for use on the client and they’d only work in 1.5 or on one particular developer’s 1.4.

In the end I setup a test servlet/applet system, and sent lots of different types of objects back and forth, and used the -verbose flag on the java console (okay, should have done this immediately) until I narrowed the StreamCorruptedException down to TimeZone. The one working developer 1.4 is because he has changed his security permissions to test webstart stuff.

So, solutions seem to be:

  • Upgrade clients to 1.5/5.0.
  • Sign applet.
  • Manually edit the JRE security.
  • Modify JFreeChart to be TimeZone’less in the graphs.

Probably just try to go with 1), though as we run other tools on the client-side it makes the upgrade a bigger deal.

Back into Football

Thursday, February 10th, 2005

Had my first indoor football match in a year or so. My throat is raw from shouting, my chest is tender from the breathing, my thighs are tight, my calves tighter and my feet are not in the mood to move. We lost 6-1, but who cares about that eh? Considering getting sports glasses so I’m not passing to the amorphous blobs who happen to be vaguely in my team’s colours.

BCEL - new life?

Tuesday, February 8th, 2005

Something I should probably advertise.

Jakarta BCEL has been a bit of a norwegian blue parrot recently. The committing community had dried up while the user community continued to post bugs and post patches. Obviously a bad situation.

We were left with the choice of whether to find some way to pension BCEL off into a corner, or try to reinvigorate activity in the community. No guesses for the one we’re trying first.

I’m not a user of BCEL, and I’d heard from quite a few people that ASM is the way to go. So I did the necessary asking around (codehaus irc channel I suspect), and also asked the bcel-dev list whether we should just be suggesting people use ASM instead. The best analogy I got was that BCEL/ASM is much like DOM/SAX (or is it SAX/DOM?). Two different ways to view a problem, one of which is inherently going to be faster, but both have their uses.

So we decided to apply the reinvigoration cream. Three Jakarta committers volunteered to be more active (Simon Kitching, Henning Schmiedehausen and Conor MacNeill) and we added two new committers to the project (Dave Brosius of FindBugs and Torsten Curdt of Cocoon/Commons).

We just completed the migration from CVS to SVN today (I’m having fun this quarter organising lots of these) and hopefully the patches can start to fly in to get an updated version released, and then maybe some more exciting ideas?

Anyway, (sounding like Ronnie Corbett, a classic comedian of shaggy dog stories) to cut a long story short, feel free to join the bcel-user or bcel-dev list if you’ve anything you’d like to say or contribute to bcel.

Mac mini

Tuesday, February 8th, 2005

The latest addition to our Apple collection arrived yesterday, and I dutifully showed it off at work this morning. Four of the onlookers sounded very positive on getting one themselves, and I think it’s no surprise that they are the four others in the company who have long owned an ipod. Apple being apple, 2 of them were drooling over the prospect of getting their own before I even plugged it in.

So far the Mini is behaving perfectly. Speed is faster than my 400mhz Titanium, so I’m happy.
Biggest worry? It’s so small that I’m worried that if I leave it lying around on my desk overnight, that it might vanish.