Monday, March 31, 2008
Weekend Movie.
What a great performance by Will Smith and what an interesting movie to watch. From start to end, this movie was never boring. Especially art direction and Will Smith's performance is a big plus for this movie. This movie is an adoption of 1954 novel of same name. It was very interesting to see timesquare and main New York streets without traffic and people. The director planned very well for Will Smith's solo scenes with "Sam" which is unavoidable, so that we never felt dragging on any scenes. The story is very simple, a virus outbreak causes billions of people dead and make some monster, only less than one percent of world population survive without becoming monster because they have the natural immune against this deadly virus. Will Smith played US army doctor role, trying to resolve this crisis by his own with "Dark Seekers". Very interesting movie to watch.
Sunday, March 30, 2008
Chennai Cricket Test.
UML - Use Case.
Thursday, March 27, 2008
Wasting of Powers.
Tuesday, March 25, 2008
Struts 2 Vs Struts 1
Action Class :
In Struts2 action class implements an Action interface, but in Struts1 it was extends an Action class. This is a major difference and Struts2 action classes are POJO(Plain Old Java Object) hence testing is easy, no need to write HTTP mock objects to test action classes.
Thread Modeling :
Struts1 action classes are singleton, one instance per container, all request were handled by this one instance. ThreadSafe mechanism has to take care while developing Struts1 action class. In Struts2, action classes are not singleton, as many instance can created and there is no performance penalty and garbage collection overhead.
Servlet Dependency :
Sturts2 action classes are not servlet API dependent, because HTTPServletResponse and HTTPServletRequest objects will not be passed to execute methods directly.
ActionForm Input :
Struts1 action forms are extended from action form base class and action form inputs can't access by other JavaBeans. But in Struts2, action form inputs can be accessed from taglibs.
ValueStacks :
Struts1 uses standard JSP mechanism to bind objects into page views. But Struts2 uses valuestack technology to bind objects into page, hence taglibs can directly access objects without coupling page view (needed more understanding).
Control of Action Execution :
Struts1 supports separate request processor for each module, all are sharing same life cycle. Struts 2 supports creating different life cycles on a per Action basis via Interceptor Stacks.
The following are additions of Struts2
- instant support of AJAX,
- integration with Spring dependency injection,
- Configuration based profiling
- Debugging
Source :
http://struts.apache.org/2.0.11.1/index.html
Sunday, March 23, 2008
IPL and ICL - Do we need this?
But now the creation of Indian Premier League(IPL) and Indian Cricket League(ICL) are overdose to already addicted Indian cricket fans. Because now itself the way we are watching cricket and spending time towards to cricket is more than enough.
This is utter copy of US based NBA or NFL franchise model. The money involves for this franchise from private party is huge and this money can spend for our infrastructure development or build some factories to give job opportunities for needy people. No body wants to spend money for non-profit business, but building factory or infrastructure development projects are now huge profit busiess in India. Why we are spending money towards already developed area?
Google - Win or Lose Wirless Spectrum.
From Google's Official Blog...
"This afternoon the Federal Communications Commission announced the results of its 700 MHz spectrum auction. While the Commission's anti-collusion rules prevent us from saying much at this point, one thing is clear: although Google didn't pick up any spectrum licenses, the auction produced a major victory for American consumers.We congratulate the winners and look forward to a more open wireless world. As a result of the auction, consumers whose devices use the C-block of spectrum soon will be able to use any wireless device they wish, and download to their devices any applications and content they wish. Consumers soon should begin enjoying new, Internet-like freedom to get the most out of their mobile phones and other wireless devices.We'll have more to say about the auction in the near future. Stay tuned."
As per Eric Zeman from information week, Google's intention was not to win any license since there main business is ad. But Google wins what they want from this auction, that is, open access to any devices and applications. Since Verizon forced to spend 4.75 Billion by Google, so Verizon didn't win for open access to devices. Google is "happy loser" and American consumers are ultimate winners. Now all set for Google's Andriod to use these open access spectrum for some good features.
Unified Modeling Language(UML) - Class Diagrams.
UML is not a strict language, in other words, there is no compiler out there to check our code against standards. A rough sketch can do the purpose. UML is useful on both forward and reverse engineering. The main component of UML is class diagrams, there is almost none design document without class diagrams. In class diagrams, the following notations and relationships are really important. This class diagrams are going to be a blue print for long time, hence this notations are important to communicate because we don't know whether designer who developed this diagram going to be with company or not.
1. Associations
In Class diagrams, if a class associate with other class, the a solid line with a arrow, from source to target. A perfect example would be, Customer and Order class. Order class must give a customer id, who created order. Since we can identify an unique customer id from order, Order class has an association with Customer class, that same with customer class also, from customer class we can find orders by the customers.
2. Compositions
A class can have other class's reference in it. This is useful when we want to utilize other class's methods without inheritance. Decorator pattern is mainly based on compositions.
3. Generalization
This is for grouping similar classes, to add these similar methods in a super class and all other classes are derived(inheritance) from it. This is nothing but super class and sub class notation in UML.
4. Aggregation
Aggregation and association are interchangeable. There is no major difference between them. A car has an engine, then car (whole) has a aggregation relationship with engine (part). To make our life simple, we can use association notation instead of aggregation. Most of the UML gurus discourage us to use aggregation notation in class diagram. We can just use association for top level design and composition and aggregation can be used in detailed design.
5. Realization
Realization is relationship between an interface and implements class. The interface specifies behaviours and a class implements that behaviour then the class realize relationship with interface.
6. Dependency
Dependency relationship as name implies, if one class change, other class's state changes then these two classes are dependency relationship. MVC pattern can be good example of dependency relationship.
The other important elements from class diagrams are multiplicity (upper bound..lower bound), Stereotype, visibilities and properties.
Wednesday, March 19, 2008
BPEL - Manipulating with XML.
XPath is standard way of manipulating XML data in BPEL. More advanced manipulation can be done using Java,XLST and XQuery. XPath is a simple language to navigate XML document to find a information from XML. But XPath is painful to do complex manipulation hence most of the complex logic can be done in Java or XQuery.
Following is from http://www.w3schools.com/
Here is a simple XPath Query example
/BookStore/book[1] - Selects the first book from BookStore element.
/BookStore/book[last()] - Selects the last book from BookStore element..
/BookStore/book[last()-1] - Selects the last but one book from BookStore element..
It is not necessary to remember all systex and commands, since now almost all IDEs has plugins to develop BPEL logic and complex logic can be done in Java as custom code.
BPEL - Anatomy.
- PartnerLink - Reference to the services partcipants in the process flow and their ports/roles.
- Variables - List of messages exchanged between the BPEL process and each of the partcipanting web service.
- Flow Logic - The core of the business logic goes hers. The most used commands are receive,invoke,assign,pick,wait,throw,terminate,flow,sequence,switch,Scope,fault handlers.
- Falut Handlers - Catch and handle faults
- Compensation Logic - Undo logic.
A BPEL process file can directly comparable with Java class, PartnerLink is import statement, Variables is class variable, Flow Logic is methods, Fault Handler is nothing but exception handling.
The above guide can found in here.
Tuesday, March 18, 2008
Business Process Execute Language (BPEL)
Since Oracle Fusion is consider as next generation middleware implementation because one stop buy for products and cost benefits, Oracle's BPEL Process Manager getting more attention, major advantage of Oracle BPEL Process Manager is, it is not stored executable files as Oracle specific, that is, it is as native format. So portable to other BPEL engines in future is not an issue. One more advantage would be, instant fail over support and cluster management.
Oracle BPEL Process Engine consists of four components
1. BPEL Designer - GUI based
2. BPEL Console - Monitoring, Performance tuning and administration
3. BPEL Server - Sync and async messaging, exception management
4. Built in Integration Services - JMS messaging support, Java embedded.
Here is a quick start guide with installation of Oracle BPEL and executing a sample code. In general, learning curve for this is very little, assuming that you have some web service experience.
Monday, March 17, 2008
Weekend Movies
Great Movie. This movie revolving with 3 main characters
- Micheal Clayton (Geroge Clooney) : A gambling addict working in a well known law firm, scratching his seat for 17 years at same position, nick named as Miracle Worker.
- Arthur Edens (Tom Wilkinson) : A mental breakdown top notch lawyer, try to cover up a big organization (U-North) from 3 Billion dollar lawsuit.
- Karen Crowder (Tilda Swinton): A cut throat chief counsel working at U-North, her primary job is to rescue her company from the law suit.
As movie starts, I didn't understand first 2-3 scenes, after flashback started everything is clear. This story is based on 4 days happening between this 3 characters. Micheal wandering around for money to settle his unsuccessful bar business, he got an emergency call to Milwaukee to support his colleague and his long time friend Arthur's mental break down. At same time Karen found that Arthur is helping people who sued her company. After that, story becomes wild and Karen ordered to tap Arthur's phone calls, follow him and finally ordered to kill him. Micheal come into big play after Karen ordered to kill him also. Final moments of this movie is really great and twists and turns. Overall, this movie is must see for movie lovers.
2. No Country for Old men :
Excellent movie and core of this movie is, how bad this hit-mans are and the drug related crime in Texas. Javior Bardem acted as a hit-man, awesome and superb performance. No wonder why he was selected for best actor in Oscar. He just dramatize audience as well as Josh Brolin. Josh Brolin happened to found 2 million dollar suitcase from drug dealers and he wants to settle with that money. But poor guy doesn't know that it was buged. Where ever he goes, Javior followed him with sophisticated killing weapons. Finally Josh able to hide money and recovered it but murdered by Mexican gang members. But I won't agree with Javior's final murder, that is, Josh's wife. He justifying it by saying that he already given word to her husband (Josh), that too, she just came back from her mother's funeral. Tommy Lee acted as sheriff and he just can't stop any violence in this county. This movie is a flawless movie and can give 10 out 10 score.
Sunday, March 16, 2008
Exchange Trading Funds (ETF)
As I mention above, due to complexity of diverse, there is good opportunity for part time investors to pitch in ETF. Because ETFs are already well diversify. ETFs are well in middle of Stocks and traditional mutual funds. The benefits of ETF are
1. Low cost
2. Instant diversify
3. More transparency (This is one makes difference from mutual funds).
4. Tax Benefits(Because mutual funds managers are very frequently add/remove stocks and capital gains will transfer to stockholders rather ETF will not add/remove stocks frequently)
ETF can be traded as same as stocks or mutual funds. The Net asset value(NAV) would be determine after market close and if you are selling next trading day, you might loose or gain something since you are selling based on previous day NAV.
The only issue with ETF is complex creation and redemption process. But if you are familiar with mutual funds then okay. Normally if you buy a mutual fund, you are dealing with a money manager and he/she could decide to buy basket of stocks on your behalf. To make this process better, money manager could already created a basket of stocks and name it like "Large Cap Fund" as name implies, this fund dealing with large cap stocks so you can buy 25% of your investment money for "Large Cap Fund" and remaining goes for "Small Cap", and "International fund". The same here in ETF, all you can do is by typing "NY" to buy New York 100 Index Fund, which means you are buying a 100 stocks diversify fund on one click. If you are fully buying ETFs, you portfolio would looks like,
1. New York 100 Index fund (25%) - Fully US based and combination of large and mid size companies.
2. S&P Growth Fund(25%) - High growth S&P index.
3. Dow Jones Oil Funds (25%) - Group of oil explore and drilling companies.
4. S&P 50 Asia index(25%) - One fund for all Asian market companies.
Do you see modularity in here? Your portfolio now well diversify as well as you have a choice of modularity, sector wise, index wise, growth wise, geographic wise. If you thing swap oil funds with technology funds, we can easily swap it. The maintenance time to manage portfolio is almost zero.
http://www.ishares.com/home.htm - good one for ETF and well established one.
http://www.fool.com/etf/etf.htm - 60 seconds guide to ETFs.
Up in the air : A special work.
Already ISS is the most expensive object ever build by mankind[Source:Wikipedia], after all these additions it would become more expensive and greater scientific achievement .
Thursday, March 13, 2008
Spike of Oil Price.
With combination of credit market meltdown, oil price and decline home equity, things are looking very gloomy and positive signs are far away, may be summer of 2009 unless oil price come down and stimulus rebate checks going towards shopping not to pay off loans.
Tuesday, March 11, 2008
Manage situation before it controls you...
Most of us, try to play our game by the principle "don't drop ball". Don't drop ball is good and very honest way of doing our day by day job and reaching high on our career. But if we are stick with don't drop ball after having family and kids, we are vulnerable to "controlled by situation" person. If some situation happen to you, drop the ball and step back, analysis the situation, found an alternate way or delegate something and then carry the ball until you reach goal line. There is nothing wrong with that. If we are adamant to carry the ball all the time without dropping, each situation would make our life a living hell.
At the end of the day, our health, our family and our career is important to our life. We can make ton of money if we are in good health, good family support and good career. If we want to achieve all of this, drop the ball and step back and analysis when some situation demanding you to do so.
Saturday, March 08, 2008
Recession then Shopping spree then Boom.
Thursday, March 06, 2008
Finally Apple opened iPhone.
Wednesday, March 05, 2008
GOP Steady and Dems still ...
One more controversy is brewing from FL and MI that their voice has to be heard since Dems top leaders rejects FL and MI delegates all together because both the states conducted primaries earlier than party guidelines. I think that even court can't intervene here because the process is internal to one party and its leadership decisions.
As I learned more about these primaries and Caucasus, I believe it is true democracy and I wish all demarcate countries should follow this system. But associated cost and time with this is unbearable by most of the countries. As I know India has the similar set up but we are not utilizing it properly and everything there is finally decided by party leader with help from his/her close friends and relatives :).
Tuesday, March 04, 2008
We are the champions.(this time outside india)
The series winning game was simply a team effort, everybody contributed their share to win this game. Especially Sachin and Praveen were good. Sachin is like lion nowadays, when he is hungry, he would use all of his strength to score runs for team. Earlier he was like tiger, score in all games and showed his strength almost all games. But lion is always better than tiger. Unfortunately I didn't watch this game, so I can't comment on Praveen's blowing in details but based on scoreboard, he was awesome. Way to go team India.
Monday, March 03, 2008
Weekend Movies.
American Gangster
I can give 8/10 to this movie. Good storyline and screenplay and most scenes were filmed very naturally and costume also modified to fit into 1960s timeline. All the locations in the film were authentic and real places in and around New York city. One of my favorite hero is Denzel Washington and he was amazing in this film, he just lived as "Frank Lucas" character.He was really acted well in the scene where he burnt down $50k coat because that was the turning point of the movie, after he wore that coat to boxing match, everybody knows that he was rich and running a gangster.
Russell Crowe is another brilliant guy also acted as equivalent to Denzel. Director handled the scenes excellently by separating them the whole movie, that is, big plus for this movie. In other hand, movie was little slowed in the middle because of unnecessary family affairs to fill up time to delay the meeting of 2 characters.
Overall I skeptic about this is a real story, I think that 10-15% is real and remaining is just imagination from director Ridley Scott. It was very hard to believe that US military cargo planes used for heroin transportation.
The Brave One
I think Jodie Foster would love to act solo nowadays. The storyline should based on her role 100%. I hate monopoly even in movies. So nothing to write about this movie. I wasted 120 Mins by watching this movie.
Sunday, March 02, 2008
FOW - Future Of Web Apps.
Saturday, March 01, 2008
Any other logic?
The aim is to print all possible 3 and 2 letter word from String "GOLD".
public class TestChars {
public static void main(String []args) {
String str = new String("abcdef");
char[] chara = str.toCharArray();
int count = 0;
int countForTwo = 0;
for(int i = 0; i < str.length(); i++) {
for(int j = 0 ; j < str.length(); j++){
if(i != j) {
System.out.println("" + chara[i] + chara[j]);
countForTwo++;
}
for(int k = 0; k < str.length(); k++) {
if( i != j && j != k && i != k) {
System.out.println("" + chara[i] + chara[j] + chara[k]);
count++;
}
}
}
}
System.out.println("" + count);
System.out.println("" + countForTwo);
}
}
BTW, Cricker match getting interested now, "Noxious Weed" really undesirable for Aussies.
From Generative AI to Agentic AI: 2 Weeks of Building MyNewsAI.io
From Generative to Agentic AI: 2 Weeks Building MyNewsAI.io Over the last two weeks, I set out to evolve MyNewsAI...
-
When I start thinking about future, my mind exploding without control, particularly current events and state of our economy. There is no d...
-
When I was young, i used to listen old stories from grandmother and a cousin of my grandfather. Most of the stories are from their flashback...
-
Already Microsoft getting heat from Google, that Google is capturing all critical functionalities from Microsoft office suite and developed ...