Archive for January, 2003

MYTH: Java has only one language

Friday, January 24th, 2003

It’d be nice if the media could get over the myth that .Net supports many languages while Java supports one.

I try to avoid seeming like a Java fanatic [and aim more to be a Java manic depressive], but whereas Java language support looks like hitting 200 soon, .Net support at the level that MS have promised is limited to three. Managed C++, VB.Net and C#. And really these are the same language. Managed C++ is just what sits under C#, and VB.Net has seen VB modified into a lexical translation of C#.

Perl, Python, Mondrian were all hyped early on, but we don’t seem to hear much of them anymore and there are rumours of pain at getting them to fit into the .Net CLR.

So it seems that the challenge is more that .Net needs to be as successful as Java is at supporting multiple-languages. Sun in the meantime need to start to accept that there are so many JVM-bytecode creating languages, and look to support them better.

Brave Old World

Tuesday, January 21st, 2003

In terms of my personal computer, I started off using a BBC Acorn ‘B’. I migrated from there to an Amiga 500. Then I used Windows 95 and Linux on a dual boot, but really spending most of my time dabbling with different Linux distro’s before settling on SuSE and becoming quite adept at many SuSE and Linux things. In some ways I’m a hardcore expert, in others a dumbie.

A year and a bit ago I switched to OS X. It was nice. Linux++. But with a corporation leading the way and being quite untasteful. I’m no Mac expert, but I have a few tricks on the Mac now, it’s basically become the Linux laptop I never had.

A few days ago I took the eventful plunge. I would quit using Linux at work and use Windows 2K. My Windows box is nicely proportioned [640Meg memory] so surely I can do anything I normally do on the Linux box. So I removed the monitor from my Linux box and declared it my development-server, regaled at the newly found desk-space and leapt backwards into the world of Windows.

So far, my belief has proven true. I use Aston software’s Desktop to give me 16 virtual desktops. I run JProfiler, IDEA, Visio, TOAD [when it’s being stable], Outlook, Putty sessions, lots of IEs and Unreal Tournament [though I usually free a bit of memory for this. Visio/JProfilers]. Cygwin is installed, but I’ve not needed it yet. Of them all, TOAD is the only application that is a Windows-only. Visio can be nicely replaced with Omnigraffle [or I assume Dia] for my needs. IDEA/JProfiler will run on the other OSes.

So for my intents and purposes… OSes are no longer important on the desktop. They are effectively equivalent. That said, I’ll still be sticking with my SuSE linux servers. Experimentation and trust do not mix.

OReilly pocket references

Tuesday, January 21st, 2003

OReilly have been pushing a whole slew of pocket references recently, and like the hopeless addict I am I’ve been aquiring. C/C# pock-refs will be useful as I don’t use those languages enough, but do have knowledge of them. I forget stupid syntacticaly things and hopefully these will solve that. The Perl and JavaScript pockrefs do a good job for me there.

Other new ones i’ve not aquired yet:

Objective-C
JDBC

and a new Java series: [JavaTech] Best Practices.

While I don’t hold OReilly’s Java books to the level I hold their Perl books, [though some of their Java books are solid, especially IO/Network. I used to love Nutshells, but now feel I’ve outgrown them, or they outgrew me], they are usually good enough to be a leading candidate for my overweight tech bookshelf.

MVC/3-tier/JSP/Servlets

Tuesday, January 21st, 2003

First off, the usual apology for lack of blogging etc. I’ve been draft reviewing and the wireless network is continuing to piss me off.

One thing I’ve come across is continual vagueness over MVC. I just read a document in which someone said that MVC was important as it kept the presentation/business-logic and data-access separate. Which is a clear description of 3-tier architecture [where you could probably argue for MVC at each tier, but in reality you tend to just argue for it at the top tier, presentation].

I also see a lot of people viewing Model-2 as being MVC, so people think you have to have JSP and Servlets to be MVC. There’s no reason why you can’t have MVC with simple JSP [and some DAOs and JavaBeans, or kill the DAOs and make dao_blah.jsp’s].

Personally I like MVC as a concept, but I also like prototyping/creating a lot in JSP. Especially through the use of a JSP-layer enhancing language, be it velocity or JSTL/EL. While I dislike SQL at the JSP level because JSP is a poorly reusable format [ie) no one has created a JSP plugin into normal Java, so my Java code can’t reuse the JSP SQL] I don’t see any other problems with having it there. In fact, with JSTL it can be quite nice.

Philosophy

Thursday, January 16th, 2003

I’ve been pondering philosophies recently. Just the simple stuff, how to live happily etc. How to approach a day so that at the end of the day you have a smile on your face. As a developer, a lot of my happiness is tied up in developing, so naturally being happy with my day’s developing is closely tied to my happiness with the day. Here are my current core views:

1) A good deed each day. I’m starting to focus on looking back at the day and thinking, what one thing improved my life. So a few days ago, I added backup scripts to my second server, and got the automatic server->home download working. Next day I wrote a simple script to show the bandwidth usage of each website on my servers. Yesterday I added a couple of methods to DbUtils, but it’s quite a weak deed. Today I had a played in a great football [not american] match and discovered that Apple’s Safari will greatly improve my happiness].
By focusing on one such useful thing, I do 365 of them a year, and I don’t care about shit battling with buggy code.

2) Don’t invent problems. This has long been at the core of my design philosophy. It was reminded to me today when my ex-boss mentioned he was re-using some old code of mine [in fact, a product to create webpages from models etc]. It was version 1, and despite versions 2 and 3 being out, version 1 is still the one that solves the problem. This is something that makes me feel happy and proud, I spent a lot of time arguing with others that we should just make the product do what we do now, but better. I didn’t want to solve problems that I felt were too hard. This is in eXP I believe, though I think they go over the top on it. Extreme is often very silly [just look at half the extreme sports].

3) Be Clean. Be intensely clean. In fact, be psychotically clean. I don’t mean in terms of personal hygiene, but in terms of code hygiene. If a lump of code is not in use, kill it. Throw it away. Gain a perverse pleasure by throwing it away and hold a ceremony. If code is full of debugging or hacks, aim to fix it. Push for chances to simplify and discard. Again, this is at the core of refactoring and is mentioned a lot in pragmatic programming. I believe I am a pragmatic programmer. Back in the UK I didn’t really get the psychotic level of clean. I used to complain about it, but never really tried to solve the problem. The code was good, but the build environment was poor and the chaff was high. Coming to Kentucky [think of a cheap Eddie Murphy ripoff film] I met a codebase that was sickening in its grubbiness. I got the clean religion. Now I wish I could head back a few years and be the psycho I’ve become. [And I’m not pyscho enough. There are still patches of dirt that MUST be removed].

I hope to come up with more, but I’m happy I’ve recorded them here for myself.

Sold on Apple Safari

Wednesday, January 15th, 2003

I just discovered the bookmarks bar in Safari. I’ve never really been one for bookmarks, for years I used to just remember the small handful of sites I cared about.

When my OS X laptop turned up, I started to use one browser on one machine for a large amount of my browsing. I liked how in IE I could drag the link down to the bar and have it there. With Safari, I can make menu’s.

Now, this is an example of stupid user-ism at its best. Yes, this is probably an age-old feature and I am just opening some kind of new world for me, joining everyone else who is already there. However, it was only on an Apple browser [Konq re-packaged, but I use Konq everyday at work] that an example [News] was already there and I realised I could do funky things. I quickly imported my IE-browser bar, and started to structure it. Bang. My ‘good thing’ of the day is done. [more on that in the next entry].

Agora

Wednesday, January 15th, 2003

This is so so cool:

http://cvs.apache.org/~stefano/agora/

A visual way of looking at communities via mbox’s. It’s an applet view on the data created from a python harvesting script. Instant depression that I can’t find myself hidden on the edges somewhere, but I don’t frequent the three mailing lists looked at.

Java vs .Net

Monday, January 13th, 2003

Java and .Net are in the battles again. It always seems so absurd at first glance, Java being a language, and .Net being a platform. .Net is centered on C# which is a blatant copy of Java with a few hacks and a few modifications. Sun and Microsoft are both running around claiming theirs is better. J2EE is held up as some stunning concept and not just a loose federation of ideas under one standard. CLR is seen as something other than the bytecode for C# [VB.Net and Managed-C++ are, like J#, just migration plans].

So what is the difference between the two?

1) Sun lack Microsoft’s power. What does this mean? It means Sun have to worry a lot more about developers. A dictator is the most effective form of government, however an open democracy is one of the better forms of society to be a part of. Microsoft are closer to the dictator than Sun, so .Net could quite well end up a better product by far.

2) JCP vs ECMA. This is an odd one. ECMA is the obvious better choice, and yet it’s only a part of .Net, while JCP is run by companies and not open, and yet all of Java is in it. My preference? Please put Larry Wall in charge. Failing that, open up JCP more or put all of .Net in ECMA.

What amuses me is the ECMA bit. No one seems pissed off that the Europeans are going to have control over .Net. You’d think the US government would be pissing themselves and the average introverted US developer would be cursing.

3) Open vs Closed. This is tricky. Open source will inhabit any gaps. Sun are not too bad at being a little open. Microsoft tend to announce things early. Apple win here, they play their cards so close to their chest that no one has a clue.

4) Free vs Costly. This is what drives my side of things. I am not tied to honesty, but I believe in working within an honest framework. I also believe that I should not have to pay a company money to do them the privilege of writing for their platform, dedicating some of my years of development to them and evangelising for them. Java is free. Sun have a free development environment and the Java books do not teach via an IDE. .Net’s framework is free. Microsoft charge 1000 dollars for a properly working version of their IDE. I don’t know if there is an MS-Amateur version which would be fully working. I don’t believe that Sun’s payware IDE is needed to code Java. The .Net books from what I can see, teach largely via VS.Net.

5) Both sides are full of misinformation. If MS could allow people to develop without throwing thousands of dollars away, ie) don’t see developers as customers but followers, then I would happily develop in either Java or C# until a better environment/language came along.

MoveableType

Friday, January 10th, 2003

When I have a brief break from blogging, then I blog, MoveableType has an irritating habit of only showing the last N days of blogs [it’s set in the Blog Config]. This seems to screw with my CSS [or theirs… unsure] on Windows-IE.

By setting: in the template for the index page, I’m able to make it simply show the last 5 blog entries.

Would be nicer to make it show the last 5 days, with a min of 5 entries though :)

JCP Article

Friday, January 10th, 2003

An interesting article over at builder.com [Note: I have/do write for them sometimes] on the current view of the JCP. It doesn’t really go into any call to arms or anything, but it does do a good job of providing what seems a common view.