Thursday
Feb192009

The Day Of


Here is the first decent picture I took today with the newly arrived Nikon D60. The very first picture was a fuzzy mess, not worth the screen real estate. I read up on the basics, and took few shots of my miniature chair collection. They turned out great, looking way bigger than they really are.


This baby is a Herman Miller Eames chair. One day, I will have the real thing, but the small one suffices for now.

Wednesday
Feb182009

The Day Before

Today is the day before I get my first SLR camera -- Nikon D60. I am anxiously awaiting the little gem of technology to arrive tomorrow. If it won't come, Petiatko will be very very sad.
I will put it to use this Friday, at the next Photo Friday which we plan to do at the museum (after hours). Stay tuned for more about my little D60. Any suggestions on how should I name this new baby?

Tuesday
Feb172009

Economics in One Lesson

Henry Hazlitt wrote this book more than 30 years ago and it still keeps selling. I loved hearing (this was an audio book) his rants about bureaucracy, and wished I heard this book before my previous post.

Basically, Henry points out that every government intervention into the natural flow of the economy causes more harm than good and hurts the economy beyond what we usually imagine. He explained this on a number of examples:

  • you never get anything for nothing => if you give money to some group, it means you took it from some other group, thus discriminating that other group
  • cost of armed forces during the war and during the peace => army employees are living on money we (taxpayers) earned by being productive and yet they are not producing anything => as a result the whole country is less productive
  • impact of the controlled rent and its impact on the housing industry => builders not incentivised to build in areas with controlled rent, landlords unable to maintain and often abandon their buildings => people not utilizing the space economically (to keep the apartment, they are less likely to move into a more appropriately sized apartment as their families grow or shrink) => other people unable to live in the location with controlled rent since all apartments are taken (lack of price bidding for the space)
  • worker unions and minimum wage rules => demanding wages higher than is the market price of their work => results in shrinkage of businesses and higher prices of products => results in less money in people's pockets => results in less money spent => results in less businesses coming to existence
  • import tariffs => forcing higher than free market price => making Americans pay more for the same item (eg: sweater) compared to the imported one => results in helping one American industry (such as sweater makers) at the expense of many other industries (where people would have spent their extra money which would be the sweater cost minus tariff)
  • over-taxing people == forcefully taking money people earned and giving them to the groups with the best lobbyists. This is not to be confused with the taxing that is necessary to keep the society protected (firefighters, police), organized (judges, DMV), etc.
  • import equals export => increased import means increased export and vice versa. There is no way we can only increase export, since we would end up with too much foreign currency which we can not use in the US.
  • impact of fixed under-market pricing => more demand for cheap items => but less companies interested in producing goods that sell at a loss
  • other harmful effects of bureaucracy
Why isn't this book a required high school reading?

Sunday
Feb082009

Peace on you!


I am planning to travel with Fluffy later this year, and was excited to fly through one of my favorite and very efficient airports -- Munich Airport. I could not find any information about animal relief areas at this airport, so I sent an email to their customer service folks who replied that there are no animal relief areas at any of their terminals. Apparently, I have to leave the security area to get outside of the airport if my pet (who would be already eager to pee after waiting for 2 hours before flight + 12 hours of the actual flight) needs to go. I am very disappointed. I will probably end up finding a large planter in one of the airport halls and encourage Fluffy to water the indoor plants. Peace on you Munich Airport!

Sunday
Feb082009

Getting Rid of Flakiness in GWT RPC Tests

To avoid flaky RPC testing in GWT tests, use fake service implementation which you inject directly into the constructor of your custom widget. There will be no delays, and you will be in complete control.

with real servicewith injected fake service
public void testSomethingHappened() {
CustomWidget w = new CustomWidget();
w.doSomethingThatTriggersRpcCall();

Timer timer = new Timer() {
public void run() {
assertTrue(widget.somethingHappened());
finishTest();
}
};
timer.schedule(200);
delayTestFinish(500);
}

public void testSomethingHappened() {
Service fake = new FakeService();
CustomWidget w =
new CustomWidget(fake);
w.doSomethingThatTriggersRpcCall();
assertTrue(widget.somethingHappened());
}