Archive for September, 2002

Java API Diff

Thursday, September 19th, 2002

I wanted to create a document showing the differences between commons-lang-1.0-b1 and commons-lang-1.0. I looked into jdiff.org, but it is just too heavy to get started on easily.

So I hacked my own bash script to do it. Basically it produces a diff like report given two jar files. No html, no source needed, no javadoc needed. It’s tempting to wrap it in some perl so it can easily have the power to output a html report as an option.

It’s hacky, but functional. Check out the commons output.

Java LOGO

Thursday, September 19th, 2002

A few people might know that I did my thesis on Java teaching frameworks, creating a [immature now I have more experience of Java] framework on which implementations like Logo and Karel could sit. The idea was nice I think, but it’s never been something I’ve headed back into much. Maybe a PhD idea.

Anyway, MIT have released a new version of LOGO and I’m just wondering how long it will be before Lego Mindstorms bots are hooked up to them…..

Open Source killing Markets

Wednesday, September 18th, 2002

A comment byJames Strachan about a previous weblog by Don Park has me thinking a little.

Don has argued that open source kills off commercial opportunities for new technologies and argues for XML Parsers being an example. I try not to be a raving open-sourcite, my reasons for open sourcing are for my own improvement, not to save the world, but it seems to me that Don is looking at it wrong.

His actual example is flawed as design goal of XML was that any ‘fool’ could write a working parser. They lost that a bit, but as I managed to build a perfectly quick and stable XML parser out of the humble case-switch statement in a few days, I think this design goal was achieved pretty much. So the lack of market in XML Parsers is a natural reflection.

Even without open source, I would still be doing nicely in the 20 dollar XML Parser library market, focusing on small size and ease of use. Indeed, open source has helped to stop my parser being worth my time. The world doesn’t need another un-standard parser being hiked.

If we focus on something else, like a Notepad application. Is Don saying that Notepad should not be ‘free’ as many would believe it is. I imagine few would think that their Windows licence pays for the hunk of uselessness that is Notepad. Why is this??

It’s because Notepad is no longer rocket science. It’s no longer magic. Every developer has the ability to write their own with a tiny bit of focus, so it has become unchargable. Just like air [at the moment], it’s just not something you could get away with charging for.

Now, let’s say I have written my own Notepad. I’ll hawk it at work, get a few mates to use it too. They’ll help me with bugs and ideas and add some their selves. So now we have the idea that a few developers grouped together [and every company has them] are able to challenge Notepad with their far more powerful version.

Obviously the developers want to be the best Notepad. But if they charge money then it makes no sense, some other set of developers will just undercut them or overfeature them. So their only way to do business in the ‘Obvious Application’ market is to release it free and go for a mass-market domination.

I would argue that Word would have been in this position a long time ago except for obscure unused features that MS added. I imagine this is the stuff that makes it hard to declare a perfect clone of Word. So if we take what the large percentage of customers want Word for, it’s in the same position as Notepad. This is public domain, it’s nothing special, why pay for it? For a proprietary file format? That’s not a feature.

In fact, all computing would seem this way. Applications, libraries, operating systems, become more well known and less magic, and therefore lack a price.
The Internet is partly to blame here. Communication++. With more communication comes an increase in the destruction of magic and an increase in the networks of developers.

Would Don argue that the Internet should be banned because it makes it easier for people to see porn, or because it makes it easier for criminals to commit fraud? I would hope he can see that ‘easier’ just shows that an existing problem needs to be solved. So the Internet has made it easier for poor products that companies output to be debunked, to be cast aside because they lack magic.

What other companies do we have… we have companies who drop software. Currently the local MacGroup are bemoaning the loss of “One Click” and “Timeslips”, products that the companies are not going to port to OS X. Most likely due to a belief that the customer base is too small. Free software fills this gap.

The other company I can think of is the leading edge company. These are the ones who Don is talking about and who are struggling to identify themselves as different to the open source answer. Has the Internet got to the point where the magic in a protocol is gone by the time it is finalized? Or are too many protocols too simple?

One question to leave you with…

Which code do you think a developer cares more about? The one they write for a company where they have grumbles and wants that bonus they’re owed? Knowing that they didn’t have time to plan it fully or get all the features THEY wanted in there? But they don’t expect to have to live with that code forever as they’ll be doing a different project/job-role/job in a year or two….
Or the code they’re releasing open source to their peers, with which they hope to increase the level of respect they gain, and which they’ll have to live with until no one is interested in the code.

So if you’re looking for a product which has been thought about more, has more love and care from the developer and is honest about its version number, [many open source projects sit at beta for a long time, while others release version after version of buggy releases], why would you ever choose a commercial licence if not for the fact you can demand support?

And then ask yourself… Am I happy with the commercial support I get? Or do they just muck me around…..

Unthreadsafe Java

Wednesday, September 18th, 2002

Just a Java idea… but what if my class could implement Unthreadsafe.

Then the JVM could keep an eye on threads accessing the objects methods and if two threads are accessing the objects method at the same time it would throw a RuntimeException. If the object was of type Unthreadsafe.

It’s more a Stereotype that I want to apply to various classes and have a smart JVM. Would the performance hit really be that bad??

Java User Groups

Monday, September 16th, 2002

I’ve spent the weekend going through Sun’s JUGs list, taking the real JUGs that have an online web presence [I feel a bit bad ignoring ones that claim to have 100 members but lack a website], and building a list. Mainly to see just how much Sun is overhyping the number of JUGs.

I’ve posted the active list and will merge the javafaq’s list in at some point.

Todo program

Sunday, September 15th, 2002

I’d love a todo program in which the ideas represented bodies in a solar system. The speed would be the importance, deadlines would be represented by decaying orbits, inwards for things that had to be done, outwards for things that don’t have to be done. The size of a task would be the mass of the body. The distance of the orbit would be the likelyhood of doing them? Todo’s would have a set of categories, and as they get more similar they would merge into the same larger todo? A walk in the clouds….

TLD Diff

Sunday, September 15th, 2002

String Taglib v1.0 is about to be pushed out, and 2.0 is not far behind, so I need to consider how I tell people what the changes are. Doing it manually offends my lazy nature, so I have to automate it. But how?

At heart I need an XML Diff tool, xmldiff looks like a viable candidate. It’s GPL’d, but as this would be a simple tool, the output of which is used, I figure I can start with it. Then I would take the XML Diff of the .tld files and build a report.

That report would then be snazzy. This could even be plugged into the Jakarta Taglib build tool [unless it already is] or added to JDiff.

[Unless one exists already?]

Java logging

Sunday, September 15th, 2002

Not a brand new article, start of August by looks of things, but it’s very interesting for us all. It’s by Ceki G주, the creator of Log4J, which is probably the best Java Logger around.

He discusses the JDK 1.4 Logging API and his own Log4J and then the concept of a wrapper such as Jakarta Commons Logging. His chief discussion is that the commons-logging wrapper and how it is not of great use to users.

I find that I agree completely with him, however there is an area he seems to miss in his discussion. When downloading a library like Jakarta ORO Regexp, I would expect it to integrate into my Logging API. If I am on JDK 1.4 Logging, and I grab Regexp, I will be most unhappy to find it is using Log4J. I expect it to integrate into my system. So an API like Commons-Logging is necessary for a reusable library which is being exported to another environment. From commercial APIs to open source APIs, they’ll all need to easily fit into an environment.

No user will want to use commons-logging, but many will want to deploy it underneath their libraries.

NB: I am not a Commons-Logging developer, and I”ve never put any effort into installing commons-logging in a product except to download the jar for use when another library demands it.

Code Generation

Friday, September 13th, 2002

I’m seeing various projects out there doing code generation, commons-sql being one of them, so I guess it’s time I dug out GJGeneration from its careful constructed cocoon and started to fulfill the promise of its grandiose design.

Currently it takes XML, my own ObjectModel [which can be scripted] notation as input. There is an untested MetaModel input from Internation’s old metamodel [my old company], and half-coded CSV and JDBC inputs. The CSV input was the one that beat me, CSV is just too bloody painful to store an object model. I need to add Doclets if possible. The doclet API is a bit weak, but I think I figured out a way to hack it across.

On the output side, it only outputs to Java and vaguely to Html. Which was never really in the plan. So I need to add Ruby, CSharp, XML, JSP etc.

On the templating side, it only has the rather difficult GJT language. While I like the fact that GJT embeds XML in Java and not vice versa, thus making nice templates, it is a pain to parse and isn’t something I really want to continue growing. Instead I’d like to sit on top of Velocity, BeanShell, and really any good scripting language :) JSP? JPython? Java?

At some point, hopefully it would gain enough momentum that people would realise that a framework for code generation is damn cool. Switching from a JDBC source to a Doclet source would require nothing but supplying the raw material. A template written in velocity could happily be outputting along side one in BeanShell. Having Velocity able to import the BeanShell import would be very nice, but would probably involve hacking each scripting language.

Anyways. Enthused to take GJGen to the next step. Brief explanation available at the GJGen webpage.

Fink

Thursday, September 12th, 2002

Having upgraded OS X, I’m no longer tied to the MacGIMP I bought. This was stopping me from being able to easily install Fink, so now it’s gone, Fink is installed. It’s wonderful. A great concept, and appears to work.

I’m holding off grabbing anything which will suck down X, but I’m hopeful that I can start to get important apps like gnumeric, w3m, expect and gnucash. And freeciv!!

And then I’ll be one step closer to my desired OS, Microsoft Linux. Or Linux with a fully working Wine. Or Max OS X. A few choice MS apps that work well, and a host of Linux apps that work great. I’ve been missing the Linux apps on the Mac, so now I get to enjoy again.