Thursday, July 31, 2003

This guys blog is very cool(Siva Jagadeesan)

Wednesday, July 30, 2003

Urban performance legends : Has some good stuff

Intersting link from Suds blog on J Vs c#

I got dragged into a little flame-fest on a mailing list and got a little out of hand... Here's a email from me:

What a troll-ish set of remarks based on zero knowledge and spreading massive falsehoods. Normally I don't respond to such drivel, but this time, if feels like I have to:

From: XXX Subject: Re: YYY
No, as I understand it he is a C developer.

It is true, I have been a C developer, and I still do occasionally. But I have also developed code in C++, Fortran, Algol, SNOBOL, Mesa, Smalltalk, Pascal, Modula, Simula, Cobol, Basic, Focal, BLISS, PL/1, Pearl, several versions of Lisp, and assembler code for x86, Sparc, PowerPC, IBM 360/370, CDC 7000(CPU and PPU), PDP {8,10,11,VAX} and a bunch of stuff too obscure for me to remember at all. Of that lot I've probably written the most in C - at least 500K lines of C written by me, personally, over a couple of decades. For the last decade I've written almost zero C code and write almost exclusively in Java.
Apart from throwing T-shirts, he hasn't done any work with Java lately.
One could start a Clintonian debate on the use of the word "with". Almost everything I write is in Java these days. I mostly work on things other than the compiler or the JDK release.

This is the piece that makes my blood boil:

He designed Java so marginally capable developers could have a job. Hence all the annoying little limitations that slow down development but prevent errors (and features). He finds it too limiting to use himself. I can't really blame him.
This is so damned false I don't know where to begin. I designed Java so I could write more code in less time and have it be way more reliable. In the past I've wasted huge numbers of hours chasing down memory smashes and all the other time wasters that are so typical of what happens when writing C code. I wanted to spend time writing code, not debugging. Life is too short for debugging. All of those little "limitations" turn out to be things that make coding faster and debugging vanish.

For example, lots of newbie's coming in from the C world complain about exceptions and the fact that they have to put exception handling all over the place - they want to just write their code. But that's stupid: most C code never checks return codes and so it tends to be very fragile. If you want to build something really robust, you need to pay attention to things that can go wrong and most folks don't in the C world because it's just to damn hard.

One of the design principles behind Java is that I don't care much about how long it takes to slap together something that kinda works. The real measure is how long it takes to write something solid. Lots have studies have been done on developer productivity, and Java beats C and C++ by a factor of 2.

It's kinda like the evolution of the airplane. Once upon a time when folks scooted around in open cockpit biplanes they navigated by sticking their heads out over the side of the plane and looking down. When covered cockpits with windows were first introduced pilots didn't like them because there was no way to stick their head out. But if they had won the argument, they'd never have been able to fly at Mach 1 or at 30,000 feet. Stick your head into a Mach 1 airflow and see what the bloody stump looks like. I want to fly at Mach 1. I'll take the windows.

On Sunday, July 27, 2003, at 02:55 PM, ZZZ wrote:
I've forgotten, is Gosling a Java developer? If he is, why does he use a Mac? Masochism? "A state of denial"?

I use the MAC because it's a great platform. One of the nice things about developing in Java on the MAC is that you get to develop on a lovely machine, but you don't cut yourself off from deploying on other platforms. It's a fast and easy platform to develop on. Rock solid. I never reboot my machine... Really! Opening and closing the lid on a Powerbook actually works. The machine is up and running instantly when you open it up. No viruses. Great UI. All the Java tools work here: NetBeans and JEdit are the ones I use most. I tend to think of OSX and Linux with QA and Taste.

I was quite busy and not updating my blog (Huh..) I will do bloggging from today..

I was quite busy and not updating my blog (Huh..) I will do bloggging from today..

Sunday, July 27, 2003

Check out If you're running Linux and need anything Java-related, then this is definitely the place to go. The JPackage Project has two primary goals:

To provide a coherent set of Java software packages for Linux, satisfying all quality requirements of other applications.
To establish an efficient and robust policy for Java software installation.

Thursday, July 24, 2003

Viva - Open Source Java - Operation Java Freedom -->

This has some good links so far...

Wednesday, July 23, 2003

Rise of the blogs

Tuesday, July 22, 2003

How to Work with Poor Code

It is very common to have to work with poor quality code that someone else has written. Don't think too poorly of them, however, until you have walked in their shoes. They may have been asked very consciously to get something done quickly to meet schedule pressure. Regardless, in order to work with unclear code you must understand it. To understand it takes learning time, and that time will have to come out of some schedule, somewhere, and you must insist on it. To understand it, you will have to read the source code. You will probably have to experiment with it.
This is a good time to document, even if it is only for yourself, because the act of trying to document the code will force you to consider angles you might not have considered, and the resulting document may be useful. While you're doing this, consider what it would take to rewrite some or all of the code. Would it actually save time to rewrite some of it? Could you trust it better if you rewrote it? Be careful of arrogance here. If you rewrite it, it will be easier for you to deal with, but will it really be easier for the next person who has to read it? If you rewrite it, what will the test burden be? Will the need to re-test it outweigh any benefits that might be gained?
In any estimate that you make for work against code you didn't write, the quality of that code should affect your perception of the risk of problems and unk-unks.
It is important to remember that abstraction and encapsulation, two of a programmer's best tools, are particularly applicable to lousy code. You may not be able to redesign a large block of code, but if you can add a certain amount of abstraction to it you can obtain some of the benefits of a good design without reworking the whole mess. In particular, you can try to wall off the parts that are particularly bad so that they may be redesigned independently.


The office of the Presidency of the United States is an example of a Singleton, since there can be at most one active
president at any given time. Regardless of who holds the office, the title “The President of the United States” is a
global point of reference to the individual.

Interesting: Java Vs C# for CONST declaration

In Java there is no direct CONST keyword available, We need to make it by declaring static final.
In C# CONST is there which acts similar to static final in Java.
What is the diff between final, static final?
Here is my answer. final variable will be given memory location each time the object is instantiated.
But if we declare it as static final then it will act as CONST.

Monday, July 21, 2003

The new Java logo was unveiled at this year's JavaOne conference. There was so much secrecy around the logo that, even though O'Reilly edits the content for and the new logo sits at the top of every page. How come I dont know this ????

This is all about human tendancy towards emotions.. killing your emotions is literally killing yourself.

.NET Truths

Java Good and Bads

An Article on Hungarian Notation

It has been quite exciting to write about .NET (C#). Huh!! I started reading C# to know how well MS has tried to clone the C++ and Java. Here are some interesting points I noted to share with you.( I welcome Comments/Answers...)

1. When I come across the point from Tom Archer (The Book I am reading Inside C#) said Java is not pure OO language. He has given the reason that "Java is has no compatibility with Primitive Data Types.

2. C# does not follow Hungarian Notation but there is an exception for Interface declaration.

3. We can have as many main methods in different classes which is saved with single file name we can call explicitly those main methods based on the need/testing purpose. I don't understand why he has given this option.

4. MS again proved that it gives programmer friendly languages by allowing to declare directives and assigning.
Ex: Using console= System.Console;

5. One more included option in C# which is not there in Java (If I am wrong please correct me) is Read-Only fields. This is good to see.

6. I guess: A C# file when complied is converted to MSIL file which is PLATFORM INDEPENDENT and CLR (PLATFORM DEPENDENT) will interpret to give the output in the runtime. --> Correct me if not as I have not read anything about this earlier...

These are just basic outlines I found during my 100 pages visits of that book. I am about to start Garbage Collection.

Saturday, July 19, 2003

this is my first is it looking ? a one liner ?