Thursday, November 16, 2006

Stripes J2EE Framework

Just found another framework for J2EE that looks good (atleast judging by its documentation).

Stripes

So now there are a ton+1 J2EE Frameworks I know about. Oh the joy.

Tuesday, November 14, 2006

A story

Two Buddhist monks were walking downstream along the bank of a river. Usually the river was a trickle but now melting snows in the distant mountains had swollen it into a torrent of raging water.

On the opposite bank, a young girl, perhaps twelve years old, called to the monks to help her cross the river. She wanted to get home but feared being swept away by the rushing water.
One of the monks stepped into the water and found that the current was indeed treacherous, even for a grown man. He crossed the river, took the girl in his arms and carried her safely back.

The girl thanked the monk and continued homeward. The two monks kept walking downstream for about twenty miles without uttering a word. Finally, the monk who had carried the girl across the stream turned to his companion and said, "Something is troubling you, my brother. Let me hear it."

The second monk said, "Yes. You and I both took a solemn vow never to touch the body of a woman. Now you have broken that vow."

The first monk replied, "I merely carried the girl across the river but you have carried her all this way in your mind."

Monday, November 13, 2006

Key parts of Java released under GPL v2!

http://www.javalobby.org/java/forums/t84244.html

Months of speculation and waiting are now over. Sun will release key parts of Java under GPLv2 today (November 13th, Monday). The initial release today will include the HotSpot runtime, javac compiler, JavaHelp, and Sun's Java ME implementation. The rest of Java will be released under GPLv2 early next year.

Richard Stallman of the FSF has endorsed the move, and will appear on a live web cast with Sun CEO Johnathan Schwartz and software chief Rich Green.

The license that GPL Java will be released under includes a classpath exception, which allows linking against the Java class libraries without open sourcing your code, so the GPL licensing will not affect the ability of Java developers to produce closed source applications with Java.

In addition, Sun will offer dual licensing of Java, so there will also be a commercial port still available which is fully certified to be standards compliant.

"This is a milestone for the whole industry," said Rich Green. "Not only are we making an influential and widely used software platform for the Web available under an open-source license, it also underscores Sun's commitment to changing the whole industry model for how software is enhanced and developed.

Thursday, November 09, 2006

Two new books I read recently

Memoirs of a Geisha by Arthur Golden

Written in a playful writing style but with a story that constantly depresses you as it progresses. Gave me a headache. I'm not saying the book is bad, it might be only slightly short of brilliant for all I know, but it just isn't my type.
Pluses -
  1. Somehow I loved the names Nitta Sayuri and Chiyo (given to the protagonist)
  2. Interesting Japanese cultural references (like a person having wood or water in him/her)
  3. Interesting, playful, almost innocent, writing style that's in stark contrast to the story.
  4. A sprinkling of some innocent cheeky humour that fits well in the story.
Minuses -
  1. Depressing!!!
  2. Depressing!!!
  3. Depressing!!!
  4. Depressing!!!

Flappers and Philosophers by F. Scott Fitzgerald

Simply Brilliant! A compilation of 8 stories and my introduction to the fine short story telling style by Scott Fitzgerald, left me wanting more more more!

The best of the lot -
  1. "The Offshore Pirate"
  2. "The Ice Palace"
  3. "The Cut-Glass Bowl"
  4. "Bernice Bobs Her Hair"
Brilliante!

How to destroy the earth

Marvin the Martian would love this! A comprehensive document on how to destroy the earth. Yup.. Destroy.. Not merely spin out of orbit or break up into smaller planets, those are for wussies!

Here are some methods I particularly like -

Method - Blown up
You will need: 1,300,000,000,000 tonnes of antimatter.

Method - Swallowed up as the Sun enters red giant stage
You will need: patience

Method - Destroyed by God
You will need
: God

So while you run off to the link above to get the details, I will be rubbing my hands together in glee! Finally a way to kill time productively! Project!

Wednesday, November 08, 2006

Kinda funny story

Quoting from the comments in a blog entry about gifts

[Quote]
Perfect timing - you can allow me to recount a story I'd recently remembered that amuses me...

It was my birthday - I'd guess maybe 7th. I was given a toy. It was a plastic box, and a roll of paper with a long continuous outline picture on it was inside it. Two knobs held the paper such that by turning the knobs, you could wind the paper back and forth so a different portion of the picture was visible through the clear plastic "screen". It came with wax crayons. The idea was to colour in the picture by crayoning on the screen, then wiping it off, moving the paper back and forth to get another bit of the picture, and then colouring in that part instead. Hours of fun, and you could recolour the same part over and over again, if you wished.

Well, there I was, colouring, wiping, moving the paper, colouring, wiping and moving the paper... and I got to the end of the paper. I looked at what it said, and burst into tears. I ran to my mum with it in hand.

"What's wrong?" she asked.
"It's broken!!" I cried.
"What happened?"
"I don't know... but it's ruined... see? It says so right there!"

And there, at the end of the paper roll, in big letters, it said:

R E W I N D

[/Quote]

Tuesday, November 07, 2006

Rorschach inkblot test


The famous ink blots that offer a window into your soul! Well NOT if this guy is right.. He (She?) practically rips the test apart with a detailed analysis and makes it seem like the test is without any substance.

The most striking thing is that there are only a handful (10) of ink blots and each has limited interpretations. The actual test is copyrighted so you cannot even publish any of the ink blots, which casts a shadow of doubt on validity or usefulness of its results.

Good reading.

The image alongside is a monocolor outline of the actual "plate IV" in the Rorschach test (taken from the link above). I chose to use it because on seeing it for the first time I immediately saw a perspective view of a guy standing (seen from a low angle). It is the "father-figure" card. Your interpretation of this ink-blot supposedly reflects the father figure in your life.

You can even take a similar test here. Great! Don't forget to click on the "evaluate again" link at the end, in case you miss the point the website is trying to make.

It doesn't get any better than this!


"The dog who is so angry he cannot move. He cannot eat. He cannot sleep. He can just barely growl. Bound so tightly with tension and anger, he approaches the state of Rigor mortis."

I stumbled on this cartoon strip called The Angriest Dog in the World. Here is what the wikipedia link says -

[Quote]

Visually each strip is the same. The first three identical panels feature the black dog growling, straining on his chain. He is between a tree on the left and one wall of a house with a window on the right. The fourth panel is the same, but at night with a circle of light coming from the house's window.

A word balloon appears in one or more of the panels, indicating speech from a member of one of the house's unseen family. Usually the speech is in the form of an aphorism or a non sequitur. Such sayings include:

  • "If everything is real...then nothing is real as well."
  • "It doesn't get any better than this."
  • "Bill...Who is this San Andreas? I can't believe it's all his fault."
  • "The only way you have exceeded my expectations is in weight."
  • "Green wood shrinks."
  • "The psychological origin of the idea of space, or of the necessity for it, is far from being so obvious as it may appear."
  • "It must be clear even to the non-mathematician that the things in this world just don't add up to beans."
  • "Unfortunately, life contains an unavoidable element of unpredictability."
[End Quote]

The strip ran from 1983 until 1992! Yup, that's nine years of comics with absolutely no drawing skills required! I think I'll start one of my own!

"It doesn't get any better than this."

Arbit fluidity detected in the struts framework!


Whoa! I am no Struts master but being able to do this just seems wrong to me -
<logic:iterate name="blah" id="blahObj" type="Yadda" indexId="index">
<% String s = "anArrayFieldInTheForm["+String.valueOf(index)+"].someField";%>
<html:text property="<%= s %>"/>
</html:text>
</logic:iterate>
My problem with the above code is that it seems to mix levels. When we output stuff using <%= %> tags, it goes to the final HTML at the client end. But in this case the value of the property is interpreted by struts which is server side and pure JAVA. Considering JSP/Servlets (Java) to be a Layer over HTML, it seems that control is being passed ad hoc between two components of the same Layer. I think if formal and fluid protocols (like JSPs) are used to communicate, then the communication should only be inter-level and not intra-level.

Don't ask me why. It just feels wrong. Period.

Anyways, the context of the above code is - There is an Array of value objects in the Form bean, the fields of which I needed to populate from the text boxes in the JSP. The number of text boxes is equal to the number of value objects in the array. Each value object has only one field.

Now in the property field one may put values like -

property="abc.def"

which generates

getAbc().setDef(value);

behind the scenes (i.e. the last piece of the dotted-path becomes a setter and the rest of the pieces become getters.

OR one may put values like -

property="abc.def[0]"

which generates

getAbc().getDef()[0]=value;

(i.e. all become getters, the index number is placed in the proper place at the end, and simple assignment is used instead of any setters.

This also seems arbitrarily fluid.

In short I need a better language and I need a better application framework!!

PS: The picture above is relevent to this post because it is a swirling fluid that seems like a hapless confused face to me. FYI.

Somehow I find this ad nice

Monday, November 06, 2006

Trivialising the coding style Holy wars


Brace style:

I prefer the opening-brace-on-the-same-line style such as the following -
public PortfolioSL[] getPortfolioSL() {
return portfolioSL;
}
Looks like a smoking gun doesn't it (pointing towards the right)? I like it because of that and because it is concise.

Spaces vs. Tabs:
I used to prefer spaces but now I prefer tabs. Tabs are better because you can configure your editor to display the code with howsoever much indentation as you like. I realised the importance of this the hard way when I had to convert 2 spaces to 4 spaces across a bunch of files I got from the net. (Though thanks to python scripting, it was quite painless). I like it because of that and because
  1. It's easier to press a tab key instead of 4 consecutive spaces
  2. I feel bad for the tab key which would otherwise be hardly used while coding