Tuesday, November 24, 2009

The Girlfriend Experience

I was looking forward to watching this movie since I saw the trailer starring Sasha Grey. Who she is, if you don't know then I would leave it upto you to google her and then take some time off and "google" yourself.

This is Sasha Grey's first mainstream feature film, I could live with that. A feature film directed by Steven Soderbergh, peaked my curiosity and interest. This has to be done tastefully and I must say I was not disappointed.

The film has Sodebergh's much loved hand held camera look, which he uses very often. He does it well to the point that you don't notice it. As implied by the title the movie is about a high-end Manhattan based escort. She gets paid well for what she does and has a variety of clientele ranging from stock brokers, jewelry shop owners actores, etc. The interesting point is that the story is based during the current recession at the Obama election time period. Her clients are all very worried about their businesses which kind of puts her on high alert too. She has a steady relationship with a guy who is a fitness trainer. The guy must be earning $300 perday doing what he does and she earns $5000 doing what she does.

The movie is shown in time slices and jumps back and forth. This gets a little confusing. I think that on a second look it might make more sense. Sasha Grey. Well, her acting skills don't appear to be bad but I think that's coz she has an A list director guiding her. She is probably one the best in what she does, and feature films don't seem to be her calling unless she keeps getting roles with such directors. The movie is worth a watch.

Sunday, November 22, 2009

Cheesy ending from Pittsburgh…looses virginity in Newyork

"Adventureland" another movie based in Pittsburgh. Ahhh…. Pittsburgh. My home for 19 months. I get a warm fuzzy feeling when I watch a movie based in Pittsburgh. This was the third one I have seen so far.

Lately I have seen few movies ("The Reader", "My Summer of Love", and some more) where the teen main lead spends his or her summer vacation indulging in endless sexcapades. I had to go to stupid summer camps. Do share what you guys did during your vacations. This movie though has a nice feel to it. Guy graduating from high school has dreams of studying in Columbia. His biggest nightmare is to be stuck in Pittsburgh and go to school there. (I took that offensively) At one point his mom suggests him to take up a program in U Pitt and he looks at her as if he is going to throw up. He has cut short his Europe backpack trip because his father was demoted. So instead to make sure he has enough money to reach newyork he has to work in a summer carnival. He meets interesting people there, I would say nice development of characters, that was one of the few positive points about the movie. Ofcourse he meets a girl and falls madly in love wit her. He is a guy who calls sex or "doing it" as "intercourse". Probably one of the reasons he was a virgin in the story. The girl is played my Kristen Stewart, the star of Twilight Saga. She shows interest in our guy, an interest which seems confusing to me because she is happily sleeping around with an older man working at the Carnival who is a part time rock star as per his claims. The lead role is played by Jesse Eisenberg who I have seen in a very nice movie called Squid and the Whale. His character is very similar in both movies.

When I watch such movies, they go really well until all comes crashing down in the end with a very atypical all happy ending. For once, show the guy not getting the girl. In this case our boy finally looses his virginity in New York where he finally comes running behind his "one true love".

Wednesday, November 18, 2009

Monday, October 26, 2009

Criteria - What are yours?

I read a very interesting article today on bbc website.

So they finally discovered the ultimate secret to a blissful married life. I bring this topic forward specially because many of my dear friends are scheduled to dive into holy matrimony.

The article has the heading "'Younger wife' for marital bliss".
They also point out that if the wife has better education than her partner than they have a higher chance of sticking together. For some reason the researchers choose JayZ and Beyonce as the sample in their study. Case in point Jayz not passed high school and his better half was fortunate enough to have a high school diploma. After reading this article I would urge all of you to promptly go to your shaadi.com profile and do some heavy duty editing. Guys plz go for girls with higher number of degrees than you have and girls go for dumber guys.

I would love to hear your opinion about this topic. In the mean time I am on a look out for a prospective bride - 21 year old phd student or double masters or beyonce knowles.

The interesting article :)

Wednesday, October 21, 2009

This is a must watch ... please spare a few minutes

“Merry” Diwali

Diwali is my favorite festival. Rasssi bombs, laddoos and lights make my day. Unfortunately in US I had to find alternate ways to enjoy this day. So I decided to visit the local temple to appease the goddess of prosperity (that's what I have been telling my American friends here).

On entering the temple I see some 10 LCD screens in the temple cafeteria that had the clip of President Obama lighting the diwali lamp in the Whitehouse and a priest reciting vedic shlokas. This clip was running in a loop with people passing by and looking very pleased. On entering the main temple complex I see a crowd of people in one corner. On a closer look I see that they are surrounding a priest who surprisingly looked very familiar. Yes!! It was the same priest from the Obama video. Apparently he has now become a rock star with people around shaking his hand ( I guess to complete the 6 degree of separation and become connected to Mr. Obama).

Looking at such euphoria made me wonder if Obama could be Lord Vishnu's reincarnation. With various hindu Gods like Rama, Ganesha, Krishna and Shiva… perhaps "Obama" is the deity we all have been "hoping" for.

Friday, October 9, 2009

Nobel Peace Prize...I want one too!!!!!

I too call for complete international nuclear disarmament*.












*Conditions apply

Wednesday, October 7, 2009

Honey I watched – “Shrink”

Movie time. A little unusual of me to watch a movie on a weekday, but I was in mood to break traditions. Watched a movie called "Shrink" starring his holiness Kevin Spacey, directed by Jonas Pate whom I have never heard of before.

I heard a very cool term sometime back when I was watching a God-awful movie, Powder Blue. It's called "Hyperlink Cinema". A sub genre has parallel stories that somehow merge in a very cool way. The perfect example that comes to mind, the movie called "Magnolia". Also not to forget the oh so famous and Oscar favorite "Crash". Well let us talk about this one then. It has a heavy weight actor playing the lead. But thats about it. Sorry to burst the bubble on this one so early but I don't feel like rambling too much.

The movie had good intentions, but just like with every unoriginal idea you cant help but fell," been there, done that". These so called hyperlink movies I fell are so difficult to write that 90% of time they get it wrong. They are also difficult to appreciate (I don't think I can find too many people who liked Magnolia)

In one scene, a girl is playing the recorded voice of Kevin Spacey. I wish I had a voice like that. Wow that was really random of me. Anyways as always the movie true to its genre had dreamy electric guitar playing for background score and hazy cinematography (don't know the technical term for it). There are plenty of people with shit loads of problems and each seems to out do the other. So to put it in brief, nothing original. But.. but … but … I don't want to be so unfair. It is watchable. So go for it. If you have Netflix then stream it and you can appreciate the holiness of his heavenly Kevin Spacey. ( I don think that was correct English, but who cares)

Saturday, October 3, 2009

Most idiotic american invention

So I am sitting at home on a nice saturday autumn late afternoon (lets not pass judgment on my choice of activity on a saturday) and all I can hear is the annoying sound of a "Leaf Blower". For god sakes do people really need a big ass blower to move LEAVES!!!!!

Lets not forget snow blower and hair blower (err...i mean dryer)

Har har har .....

Tuesday, September 29, 2009

Note to myself

In my quest to learn more about MVC pattern I should read more about Presentation Abstraction Control (PAC) and Model View Presenter … yeah guess what (MVP) ... u don't get prize for guessing.

Monday, September 28, 2009

New project – Coming up!!!

So I met a very interesting set of people last Sunday. Among then was a guy name Ted David who now retired is a promising musician. He plays Sax and Flute, leads a band that plays latin music and also arranges pieces of music that he sells to other bands. He is also an amateur programmer and it appeared that he knew more than me. Anyways, as we were talking he mentioned that he is trying to redesign his website which he uses to sell his compositions. He is interested in using Ajax, I guess partly because it is cool. Since I have been reading up on Google Web Development Toolkit for sometime and was getting bored with the dry text, I jumped on the opportunity to help him make this website using GWT. I want to use this opportunity to share on my blog the process that I will follow in this project. I am hoping that in return I can get some free flute lessons out of him.

So watch this space for more if you interested in learning about the "cool" GWT.

Friday, September 25, 2009

Flash of Genius or Fight Club

My landlady gave me this dvd to watch coz she had a week to return it. It was lying around on my table for one week and she asked me at the end of the week if I had watched it. I lied saying that I did coz I didn't want her to feel bad. Immediately I went to my room, popped some corn and with a chilled can of diet pepsi sat down to watch the movie.

"Flash of Genius", that's the name of the movie. Directed by Marc Abraham and based on a true story, it's a movie about a man who invented a gadget sitting in his basement and fought to earn his name as its inventor. Very inspiring story. With all the Hollywood glitz and "true story" remixing the movie was churned out very well. I apologize before hand if I sound a bit negative but I have my reasons.

One thing I was positive about was the acting talent exhibited here by Greg Kinnear who is a very impressive actor who is still waiting to earn the credit among the general audience (aka earn an Oscar). He managed to put a dimension to his role which I could personally identify with. When I say personally I mean I have faced such a personality before. A personality who believes in fighting every battle that comes along, fighting every battle as if it was the last one, fighting every battle with out caring what others are saying, what the loved ones are going through. The movie was inspiring because the battle was won with a very favorable end and they mostly are won in real life too. But my question is; is it worth the pain, the anguish that one might himself go through and put other people around him through.

The wife of the character has a line in the end that she tells her husband after he has won the "battle". "I know you, this is not the end. There will be another fight after this." I don't know what is right and wrong in this aspect. But from the perspective of the loved one, fighting with no legible cause at the end is an act of selfishness not heroism.

Monday, September 21, 2009

Derby – Not the horse race

Derby is an open source Apache project. It is a relational database implementation in Java. The basic advantage of this is that you can embed it in any Java-based solution.
Derby can be divided into two:
1. Embedded framework
2. Client/Server framework

Embedded framework: In the embedded system the derby engine does not run in a separate process and there are no separate database processes to start up and shut down. So the magic is that the database engine runs inside the same JVM as that of the application. So derby becomes part of the application just like any other jar that the application might use.

Friday, September 4, 2009

What is JAXB

JAXB is important in binding XML to Java classes. JAXB allows java programmers to process XML and XML data without having to know XML processing. The developer does not have to create or use SAX parser. JAXB makes use of the given XML schema and generates the required JAVA classes corresponding to the schema.


 

Why do we need XML representation of data?

One of the fundamental concerns in Webservices based systems is to be able to transmit data in an interoperable manner. XML has emerged as the standard for exchanging data across disparate system.


 

How is JAXB different and more preferable in comparison to using XML parsers like SAX and DOM?

Parsers like SAX and DOM are commonly used to access XML documents in a Java programming language. Programmers invoke DOM and SAX parsers to parse through the XML document and logically break it up into discrete pieces.

SAX parsers: In the SAX approach, the parser starts at the beginning of the document and passes each piece of the document to the application in the sequence it finds it. Nothing is saved in memory. The application can take action on the data as it gets it from the parser, but it can't do any in-memory manipulation of the data. For example, it can't update the data in memory and return the updated data to the XML file.

DOM parsers: In the DOM approach, the parser creates a tree of objects that represents the content and organization of data in the document. In this case, the tree exists in memory. The application can then navigate through the tree to access the data it needs, and if appropriate, manipulate it.

With JAXB programmers can get access to data without having to know XML or XML processing.

Monday, August 24, 2009

Core Services

AuthenticationManager is the interface.


Default implementation in spring security is ProviderManager.

ProviderManager delegates the authentication requests to a list of configured AuthenticationProviders.


 

Chaining providers to AuthenticationManager.











class="org.springframework.security.cas.authentication.CasAuthenticationProvider">





This declaration marks the bean as a authentication provider with the default Authentication Manager provided by spring security.

Spring Security

Ok .. I am working on spring security.

I am writing this article as I am reading the documentation. This will help me to remember the stuff and might be useful to others who are also trying to start working with it.


 


 

Core Components:

The most fundamental object is SecurityContextHolder. The security context for an application can be accessed from here. This includes the details of the principal currently using the application . Security context is always available to methods in the same thread of execution. So there is no need to pass it explicitly.

To access the details of the principal from the current security context, access the Authentication object.


 

Userdetails is an interface that represents the principal and acts as an adapter between the database and the securitycontextholder. UserDetails is part of the Authentication Object.

The authentication provider that ships with the spring security delegate to a UserDetailService as part of the authentication process.

UserDetailService is used to build the Authentication Object that is contained in the security context.


 

Authentication Process

Let's consider a standard authentication scenario that everyone is familiar with.

  1. A user is prompted to log in with a username and password.
  2. The system (successfully) verifies that the password is correct for the username.
  3. The context information for that user is obtained (their list of roles and so on).
  4. A security context is established for the user
  5. The user proceeds, potentially to perform some operation which is potentially protected by an access control mechanism which checks the required permissions for the operation against the current security context information.

The first three items constitute the authentication process so we'll take a look at how these take place within Spring Security.

  1. The username and password are obtained and combined into an instance of UsernamePasswordAuthenticationToken (an instance of the Authentication interface, which we saw earlier).
  2. The token is passed to an instance of AuthenticationManager for validation.
  3. The AuthenticationManager returns a fully populated Authentication instance on successful authentication.
  4. The security context is established by calling SecurityContextHolder.getContext().setAuthentication(...), passing in the returned authentication object.


 

AuthenticationManager is an interface. Its default implementation in Spring Security is ProviderManager. This implementation delegates the authentication process to a list of AuthenticationProviders. Each provider will check for authentication and throw an exception or create an Authnetication Object.

The AuthenticationProviders ask the UserDetailService to provide the UserDetail object. This UserDetail object is used to for populating the Authentication object.


 

GrantedAuthority is another element provided by the Authentication object. This element grants authority to a principal. Such authorities are usually "roles", such as ROLE_ADMINISTRATOR or ROLE_HR_SUPERVISOR. These roles are later on configured for web authorization, method authorization and domain object authorization.