Friday, July 31, 2009

What I wish had known when I came to USA

When I first came to USA 4 years back no one told me about 401K plans and IRA and others. So I was paying uncle Sam a bucket loads of money. Like USA in India there is no formal education about money in Schools and colleges. If it were not my curiosity about the latest stock market bust I wouldn't have read books about Money and wouldnt have known the basic Rule about Pay yourself first. I guess know I know the basic rules. I wonder what I wish I had known when I was young. Get Rich slowly puts it in a nice post

http://www.getrichslowly.org/blog/2009/07/31/what-we-wish-we-knew-when-we-were-younger/

Tuesday, July 28, 2009

"Maker" schedule vs. "Manager" schedule

Interesting post about how programmers think v/s managers think about meetings
http://www.paulgraham.com/makersschedule.html

I myself feel like if there is a meeting scheduled at 11 AM than between 8:00 - 11:00 AM I should not pick a task that takes more than 2-3 hours. The reason is that context switch is so expensive that if I leave a task in between than coming back and picking it up again will again require additional 15-20 mins to reestablish the context. Hats off to Paul for writing such a good post.

Monday, July 27, 2009

ASCENT of Money

Recommended viewing for anyone wanting to know the history of Bonds, Stock market, Insurance and how banking system works.

http://www.pbs.org/wnet/ascentofmoney/featured/watch-the-two-hour-the-ascent-of-money/24/

DWR like Javascript client for REST

Was trying to find a Javascript client for REST api. Seems like there isnt a one available. The idea is simple if you have a Java class annotated using JSR 311 annotations than one can write a tool like DWR that can at compile time or at runtime introspect Java classes and generate a stub.

If there is a class like
 1    // The Java class will be hosted at the URI path "/helloworld"
2 @Path("/helloworld")
3 public class HelloWorldResource {
4
5 // The Java method will process HTTP GET requests
6 @GET
7 // The Java method will produce content identified by the MIME Media
8 // type "text/plain"
9 @Produces("text/plain")
10 public String getClichedMessage() {
11 // Return some cliched textual content
12 return "Hello World";
13 }

14 }

than requesting a script like /Jersey/RESTClient/HelloWorldResource.js should generate a javascript class that takes primitives/JSON as method params and form a proper REST Url and invoke the URL and gets the result and returns it using AJAX. I am unable to find a library like this so far therefore will try to write one