Archive for November, 2002

C#/.Net vs Java

Friday, November 15th, 2002

Some thoughts of mine in response to a post on why Java lacked easy XML tools and .Net had them:

******
This is becoming quite a common occurence it seems. Someone pointing out how Java is missing something .Net has. Often the person points asks why Sun can’t manage it when MS can?

Now. I’m no Sun fan, they’re too controlling etc. Java isn’t Sun now, but it still is kinda.

The reason MS have got a lot of things right that Java currently hasn’t is because MS had the advantage of looking at Java feedback and bug reports and fixing them beforehand.

Anyone in that situation should be able to make a better language, and C# does probably edge Java at the moment.

What will be interesting is the process over time. MS and Sun are not in new modes of work, Sun still are the same company who smashed around in the early 80 unix wars. MS are still the company who released an XSL processor in their browser based on a beta spec that wasn’t released fully for another year(?), and changed heavily.

What will the .Net community be like? No one really knows. Will it just be lots of freeware apps and shareware, or will a real open-source community happen. Will MS drive .Net solely, or will other companies help to steer it. This is the real question for .Net vs Java.

******

And I think that is true. [and no surprise to many I’m sure.]

C# is better than Java at the moment in terms of a pure language. Its library has some nice fixes. It failed to add in real-time support, Mixins, Generics/templates though, which the Java world has been calling for for ages. I don’t recall seeing a Matrix or Complex number class. So .Net still missed some blatant obvious things.

In a couple of years? Where will MS have dragged C#, and will it have a real strong open source community. I’m not aware of a massive open source VB community, so will be interesting. At the moment I think there’s just a lot of Java people playing, and some real projects like Nant, Nanning, others. I dunno though.

Seeing source for the first time

Thursday, November 14th, 2002

A blog a while back asked how people dealt with source code the first time. How did they walk through it. We’ve got an ugly library which is just a pain to figure out each time, and as I’m on a documenting spree at work [drawing diagrams! see, I’m an artist] I’m documenting this.

It seems the solution I’m using, and I never would have thought I do this but I guess I do, is to find the entry point, grab the equivalent of index cards [company memo note paper] and to start breaking down functionality and structure in a very short-hand way. Really no method to the madness, just the notes on bits that are important. Then I’ll draw a relatively custom diagram incorporating the Queues/Topics, the major object clumps, the major objects in those clumps, the database operations, and any special notes, into one diagram on a 2 ft by 3 ft flipchart.

Birthdays

Thursday, November 14th, 2002

So yesterday was my birthday. Fun, wife brought me cake at work, I didn’t even know she could make cake. Local JUG had our monthly ’social-meeting’. These are turning more and more into a alcoholic griping session. Work, taglibs, java, laws.

Best things I got for my birthday, Pink Floyd’s The Wall on CD, a Wycombe Wanders t-shirt [my family-team, though I didn’t grow up there], and the Mac version of Civ 3. So I got to sleep last night at 5am, and can heartily confirm that Civ 3 is great. The old Civ concepts, but refined. Lovely touches. And of course, never read the instruction manual, that way the touches are so much more of a surprise.

Like clearing forests actually results in resource. And there’s the concept of nationalities and cultures which makes it a little like playing Europa Universalis 2, my current favourite game. On EU2 I’ve been playing as the Timurid/Mughal Empire, and then as Saxony. Very interesting.

NetBeans

Monday, November 11th, 2002

So, IDEA 3.0 finally is released, I download it, an hour later I’m installing NetBeans having discovered the nice concept of the NetBeans platform, a GUI framework layer.

Who knows, maybe it’ll be impressive. Joseph Bowbeer over at the Seattle JUG thinks so [he convinced me to have a look].

Installing IDEA 3.0 on OS X

Monday, November 11th, 2002

The trick to installing IDEA on OS X appears to be to create a sym link in the idea-676 directory:

ln -s /System/Library/Frameworks/JavaVM.framework/Home jre

I think this should be fine, but things don’t work. I get an error continually and after entering the license the IDE hangs on the new project dialog. The speed is terrible and I get the following:

NOT IMPLEMENTED FOR CLASS: class sun.awt.font.NativeFontWrapper - getType1FontVar (I believe we do not need to support, other than return true)
NOT IMPLEMENTED FOR CLASS: class sun.awt.font.NativeFontWrapper - getFontPath (I believe we do not need to implement - returning null)
kCGErrorIllegalArgument : windowGroup: error getting ordering group property
NOT IMPLEMENTED FOR CLASS: class apple.awt.CWindow - disposeImpl

So who knows. OS X beta and first release of IDEA, bugs could be in either, or in my desire not to go copying binaries and jars around the OS.

IDEA 3.0

Monday, November 11th, 2002

Well, 3.0 of IDEA released.

First impressions are not too hot.

1) No Mac OS X download, so I have to install it as generic unix. It’s so easy to build an OS X app as far as I know. Maybe they’ve hit other issues.

2) Dragging the link to the desktop downloads ‘file.jsp’. Always a pain.

3) To install I have to copy files from my JAVA_HOME into the IDEA_HOME. Basically the JRE. Erm. This seems utterly wrong.

So I’m already wondering how I can run IDEA without having to screw up Apple’s vision for Java on the machine.

Embaressment x 2

Monday, November 11th, 2002

Doh. Took far too long to realise that a machine without ssh keys can easily get in still. Not just the embaressment of screwing up, but the embaressment of unnecessarily hassling admins.

DbUtils

Monday, November 11th, 2002

Announcing a new project at Commons :) DbUtils, a generic set of functions/components for using with jdbc. Sadly I can’t call it Commons-JDBC as this is trademarked by Sun, and I can’t do Commons-Sql as it exists.

Had a good few days pushing code in, but anything anyone has is gladly welcomed. Once I get my access back I’ll upload a Mavanised site.

Currently it’s just the view-cvs

Embaressment

Monday, November 11th, 2002

So I was getting tired of having forgotten my ssh passphrase for apache.
ssh-keygen -t dsa…. new passphrase… copy and paste onto the two apache servers….

suddenly I can’t get on. Oops. I cocked something up somehow. Cue embaressing email to the admin :)

JDJ #7.11

Sunday, November 10th, 2002

So.. what’s in the latest issue of JDJ, the only Java magazine left on the market [JavaPro’s a joke, then again, JDJ used to be too… is it still?]

Five editorials. All very opionated, which is good, though it’d be nice to see some form of solid way of responding to these. If it were a website I’d expect to look at the threads of rants below the editorial, in a magazine it’s just a rant on its own.

One about Patterns snobs [Williamson has an accurate point, but blames it on the Patterns snobs. The reality is that people who don’t know the community’s name for a Decorator, and are unable to recognise it as a pattern in a discussion and go find it out are becoming the trailer-trash of the community].

One about the JCP. Valid points again from Ottinger, but afaik he’s wrong about Log4J.

One about extreme programming from the J2EE editor Sagar. Amazing how much text there is and how little it seems to say.

J2SE editor, Bell, calling for more Java evangelists. They stopped preaching and started doing. Maybe Java evangelists have evolved, rather than telling people that JBoss will take over, they just make it take over. Alternatively, maybe the evangelists are all in J2EE and Bell’s J2SE job means he doesn’t see them [I doubt it], or maybe he’s just looking in the wrong place, ie) he needs to read more blogs.

J2ME editor, Briggs, yet another editorial on how the J2ME world is heating up. I’m sure it is, but it just doesn’t affect me yet as I can’t bring myself to get ripped off by the US phone deals compared to the UK phone deals. J2ME moves so slowly as an industry it seems.

Articles….

We get an article on Ant. Whoop-de-do. There are books on Ant now, good books. I don’t expect the number 1 article to be on something I can get a better book on. [The article is a seller for an Ant book by the author].

An article on good news for the Java Universe. Apparantly the Java Web Services world is not dead, there’s all these companies evangelising their products [maybe Bell needs to read this article]. I’m a techie, so I don’t trust it when the excited sales dept or CEO of a Java company tell me how their product will save my life. There have been very few commercial products which have been that good. [IDEA springs to mind, and Eclipse now matches it it seems, OmniGroup do a lot of the same, but lack MS as a real competitor half the time].

Thread Pooling in Java Applications. Looks like a good article. Smells like a good article. Needs to be grokked to see if it is. But at least it’s a good topic.

Managing Java source code dependencies for SCM. Laramee needs to discover Maven or Centipede or JJar. Or subversion from all I hear. The reality is that Perforce is not where you’re going to find the evangelism these days. The only thing this article really hints at is that a MavenUI would be very nice. Typical Jakarta though, UI coders don’t do much there.

Unlimited Encryption on Limited Devices. The first J2ME article. Sounds good. Lack of any code though, so it’s mostly waffle? Looks like a good article though, has that feel, but it’s not a DOing article, more just a heads up on a new player in the world, who may not even live much in the java space.

MIDP 2.0. Article on a spec release. These seem to be easy ones for the Editors to decide to go for. They’re usually quite blah, but well timed. Their existence is to provide a quick summar of the spec, then point us to the real thing. Can’t fault this article being in there, even if MIDPing isn’t high on my list of todos.

Review of JSuite. Bunch of over-priced GUIs, except GUI components require more dev work than server-side it seems. Much more pain to go through etc. So usually it is worth paying the 1000 dollars for the handful of components you’ll use. Someone needs to put together a site detailing open-source Java GUI components.

Review of Adaptive Server Anywhere. Not a bad review, I imagine few will leave their enshrined worlds of Oracle/Sybase/SQL Server/DB2.

Java Awards. These are often the best part of the entire year for JDJ. Although JDJ’s list and readership always mean it’s a very commercial affair. Best book category is an odd one. JMS from OReilly wins. It’s not a bad book, but not amazing. The second placed one is J2EE Applications and BEA WebLogic server. I reviewed this book for Builder, it’s pathetic. Tries to claim all of Java is created by BEA [slight exaggeration].
Best DB: Oracle/DB2/JDataStore/MySQL. JDataStore? Wtf :) Obviously people just choose the one they use.
Best IDE the same way: WebSphere. Forte. JDeveloper. JBuilder for J2EE. Idea takes fourth in J2SE category. CodeWarrior 4th in J2ME category.
Biggest market-share wins.

JBoss takes fourth in best Java Application Server.
The next one is a joke. Best Java Class Library.
* Java.util.Collections
* Oracle BC4J
* Host Access Class Library from IBM
* Eclipse [it’s an IDE! Did they mean SWT???]

That one is laughable.

And so on and so on. Unlike the linux journal awards, these awards exist to make Borland/IBM/Oracle feel good about themselves.

Three to go.

We have a section entitled ‘Spotlight on Open Source’, about the ASK server or something. To be honest, this page is crap. The concept is great, best one in the magazine if you ask me, but sadly Enrique Gil’s article is crammed into too little space and hard to really get the jist. Still, the site is http://www.openode.org and I’ll mention in a later blog if it’s worth a look at.

The Job section is often interesting but useless. Two guys in California give us a view on what Java is like in California, pretty much. This month’s is quite good. Explains a fair chunk about hiring, and if it’s true, is useful information. We have to think about how we describe our previous companies when applying for a new job. If applying for the IDE job at IBM on VisualAge 3000, describe your previous companies as product companies. If a consultant job, describe the consultancy concepts you used there. etc etc.

Lastly we have Blair Wyman’s ‘Cubist Threads’. They’re trying to create a Michael Swaine [cf Doctor Dobbs] and failing most of the time. Blair rambles on about things for a bit and rarely gets techie. It does make for an interesting break [as I read it first, it’s usually more interesting than Williamson’s editorial], but a bit more focus on our world would be good. Or at least make the vague metaphors a little more solid for us stupid folk. He goes on about ‘foosball’ this time, which thanks to Friends episodes I now know means table football. Wish the yanks would relearn the english language, or if they’re going to steal german words, at least spell them properly.

So… why do I still subscribe to JDJ? It’s all there is. Java Report is dead dead dead. Java Pro is useless [I’ve let my subscription lapse, but still do pick it up monthly ish]. DDJ has stopped its Java focus and is now less useful. In fact, the best new Java magazine is Linux Magazine which has a monthly Java section. Go LM.