Thursday, March 20, 2008

grepWin is free now?

It looks like it is free now, and it is hosted on google codes web site. In any events, it is a nice tool for windows and specially for Linux addicts that need to live in da windows world.

 

grepWin is a search and replace tool for windows. It has lots of useful features and unlike windows search it works!

Wednesday, January 23, 2008

Thinking in Java

Few days ago I was drown in my memories of the good old days and I remembered the first book I ever read on Java, and it was Thinking in Java. I learned a big deal from that book and that was the Java starter kit I needed. Today, I have been programming in Java for I don't know how many years and I do believe I should give some credit to that book. Recommended for all people who want to base the future job on software development in Java.

Friday, December 28, 2007

Spring, Struts and Weblogic 8.1 SP6

It's hard to get these things working together in Weblogic. You will have to think about class loading issues. The main problem is Spring support action classes reference Struts action classes and this fails to work if they are located in sibling class loaders. It's a pain to find why. Weblogic doesn't come with a nice class loader debugger (or I am blind enough not to see it) and you have to write your own debugger. The only thing so far I could do to get around this is to edit Spring manifest file and add struts.jar to class path dependency so that Weblogic makes the link. I am wondering if this should be a part of spring jar file anyways. As far as I understand it is a Java fashion to do this. On top of this, I think spring jar file should be sliced up a little bit for class loading reasons. I mean the web part of it might not need to be in the same class loader its container code is. The container code has state, it loads a network of beans and it keeps the network in memory along with static scoped beans. Therefore, it makes much sense if you want to share this container with multiple modules for performance reasons. Nonetheless, you won't need to share the web helper classes. 

Saturday, December 15, 2007

Spring Experience 2007

A colleague of mine sent this picture to us, right from Spring Experience 2007. I resist not to comment on it. It's cool, hey?

 

bobble-head

Thursday, December 13, 2007

Flex is the future?

The more I read about Flex the more I am convinced Flex is the way to go. For me the bigger question is how long HTML and its descendents will last. HTML was really useful but know it is just too incapable and simply it has no memory. It's intelligence is also usually supported with scripting languages such as JavaScript which is a beast of its own kind. Look at the complexity of Java front end frameworks. There is tons of them and still neither has a neat solution to the front end puzzle. The Java front end code is usually terrible. It really takes very good developers to come up with a web based GUI in Java that is well designed and it is easy to maintain. However, this is not what we want. We want stupid programmers to be able to produce. Java front end model is suffering from HTML shortcomings. Mostly from its lack of memory. That is, a request should be sent to user for every time a data is updated and server should keep this in memory for the scope of a conversation. Think of a form that adds items incrementally and as user presses save the changes are flushed to database. This will require Java code to take care of the temporary list of Items. That is why we have request scope variable, session scope variable and application scope variables. These are all a problem when it comes to scaling. In any events, Flex seems to be the answer. At least it is a great improvement. It has memory. It is richer that HTML and it can customized the same way. Even Microsoft is pushing its SilverLite.

Wednesday, December 5, 2007

SELECT FOR INSERT

Wouldn't it be nice if we had some like SELECT FOR INSERT in SQL?  I am not even sure if we don't but I have not been able to find anything like that. The problem I am trying to address is the classic problem of two transactions trying to insert a data if it is missing. Lets say T1 reads for record X and if it doesn't find it, X gets inserted. T2 is doing the same. T1 and T2 happily start together so T1 reads and there is no X, same happens to T2. T1 inserts X and commits, T2 inserts and commit and boom, Duplicate data. In the same fashion we have SELECT FOR UPDATE, it would be nice to have SELECT FOR (POSSIBLE) INSERT in SQL. This would mean looks for this data and if you don't find it lock the table because I am going to insert it. It has a bad effect on performance though. That's probably why we don't have it.