Oct 31, 2007

TDD

In my opinion test-driven development and refactoring are the most important contributions of the Agile movement. Personally, I find the movement itself rather controversial and oriented on less complex systems. I believe that school of thought brings in a few valuable ideas from cognitive and industrial psychology. On the flip side, I am highly suspicious of their lack of engineering rigor.

Throughout my career I have seen different development organizations. Some took unit testing for granted (sadly, TDD was not explicitly encouraged but even sufficiently extensive unit tests go a long way). Others only briefly dabbled with JUnit. The latter invariably turned out to work on profoundly boring applications with little to brag about in the quality attributes department. Naturally, this experience taught me to screen potential employers by their attitude to unit testing and test coverage tools.

Most of the time the refactoring part of the equation was mostly the matter of taste of individual developers. It is easy to justify but certainly much more challenging to amend. I think refactoring is so intrinsically intertwined with artsy questions of style, readability and proper OOD that it is destined to be a way of thinking and not merely a cookbook. If you remember the founding book on the subject, virtually each and every refactoring there is accompanied with a counterpart reversing the action - you choose which one to apply in a particular situation.

In my experience things that are difficult to formalize are easier to learn by watching. Probably this is the only way and that's why it takes so long for a developer to mature despite a relatively narrow skill set required typically. Such learning tends to evolve through time and requires good reference materials to learn from.

I am reading a couple of books on the subject, namely Test Driven and xUnit Test Patterns. Clearly, they are not comparable - the former is an also-ran, the latter is essentially the bible from a world-renowned series.

From Test Driven I would recommend an interesting chapter on testing concurrent code (thread-safety, blocking operations, starting and stopping threads, asynchronous execution). I hesitate to come up with another book addressing it.

Strangely enough, I found Test Patterns to be rather boring. Probably because of its 950 pages :) It reads more as a catalog of test idioms ("five ways to create a test fixture - transient, persistent, shared ..") and I was overwhelmed in my attempts to find and learn quickly a few new useful tricks. Surely enough the book is valuable, especially as a conceptual guide, but do not expect much fun.

Oct 30, 2007

Distributed systems tutorials from Google

More goodies from GOOG, this time for us developers. Under an unpromising title of Google Code for Educators they hid a bunch of tutorials and video lectures on distributed systems and the Map/Reduce paradigm in particular.

Oct 17, 2007

Vaccination

As a part of your I-485 filing you pass a Medical Examinations of Aliens. Which essentially means a basic physical exam and a few vaccine shots if you cannot prove you had them done before. In my time I did not find a conclusive list of the necessary vaccination. From my present experience the list is as follows: Polio, Td, MMR, HEP B (all four can be done on the same day). The last one is actually comprised of three shots done within six months.

Oct 16, 2007

Authors@Google

GOOG originated many good things big and small. Among the latter is a serious of interviews with book authors shared on YouTube. It seems to be an instructive glimpse into the culture of the company - how many employers out there have book clubs like that? On the flip side, the selection of authors is rather eclectic up to the point that there are fiction writers among them. Nevertheless, I found a couple of gems.

Steve Wozniak talks about his career at Apple as well as his life. I have never been crazy about AAPL be it Mac or iPod. So for most of my life my knowledge of Steve and his contribution to our industry was pretty limited. Boy I was wrong. His life story is fascinating and provides a good hard-core engineer role model. Listening to him I cannot help thinking that theirs was the age of titans.

The other discussion is about startups and the way they are started. Founders At Work: Stories of Startups' Early Days dispels some myths and tells less-known facts about well-known companies.

Oct 15, 2007

Autumn in the Bay Area

Last Friday was the first rainy day since spring. It was rather cold and windy and I had to wear a jacket over my usual short-sleeve shirt. Luckily, this last weekend was more typical and I was riding bike in a t-shirt. The reason I love October (and, symmetrically, Mar-Apr) is that the sky is still blue and the sun is shining but the temperature becomes much more comfortable for outdoor activities. I really like the 70-75 range.

My impression is that rains here are slightly different although I hesitate to clearly explain how exactly. Probably that's why they call them showers - a plenty of water and some wind make you pretty wet. Almost every time I had to dry my trousers an boots after just a 10-minute exposure. The good news is that there are no dirty stains left on clothes once it has dried - something which still does not cease to amaze me :) In earnest, the rainy season is supposed to be officially started in Nov. A rainy day predicted this week means we might be slightly ahead of the schedule but so far it is warm enough to offset any inconvenience.

Oct 14, 2007

Founding fathers on the past and the future

I ran across a pretty entertaining joint interview with Bill and Steve. It was quite interesting to see them together.

Oct 9, 2007

Why go to the US?

The other day I was asked by a colleague with a newly-minted H1 visa a question you would not normally expect from a person in his position. Essentially, he admitted he had wanted to live in the US but facing the need to make the final step he almost got cold feet. Been there, done that - there is, so to speak, a world of difference between window shopping (thinking of going somewhere to work and telling friends about your plans) and shoplifting (severing your current ties, parting with a hard-won comfortable position and actual relocation) :)

1. Desire, Decision and Determination

Naturally, this question requires a strategic decision and in my experience it is unlikely to be completely rational. From what I know, human beings are pretty emotional animals and their decisions tend to be initially based on desires and passions and only later rationalized into more logical world views. Moreover, in real life it is unusual to have a reasonably complete understanding of something new before actually jumping into it. No matter how much you can learn from your friends, your journey will be different.

Leaving your comfort zone always takes a leap of faith. Such a leap is hardly possible without strong motivation. For some people it could be "going from" (e.g. a country of unpredictable past and uncertain future; personal problems and yearning to start from scratch in a new environment; boredom), for others it is about "going to" (e.g. more interesting jobs; personal growth; trying to achieve as much as you can and then some; stability; better future for your children). If you feel no need to change anything in your life, why on Earth would you attempt anything as transformational as living abroad? Otherwise, your visa gives you a free ticket to a different life. The worst possible consequence would be coming back after a few years with dramatically different experience and probably a much-coveted blue passport.

The more I think about it, the more I believe that this kind of reflection is vital. You need to know what makes you tick. Even (and especially) if your musings turn out to be wrong later :) In my opinion, if you ever wanted to come here you should. Do not over-rationalize (especially if you do not have children) and follow your dreams. You miss 100% of shots you do not take.

2. If you are so clever, show me the money

While for the previous generation of engineers immigration was a no-brainer, the current economical situation seems to be more nuanced or at least blurred. Certain developing countries seem to be awash with windfall money and I hear that officially paid salaries of 30K+ are achievable there.

I hesitate to provide a meaningful way of comparison. Nowadays most people seem to be aware of the elusive concept of quality of life and few expect to draw any conclusions from a difference in salaries. You simply cannot compare this country with a handful of habitable cities in one eighth of this world. One of the reasons is the sheer size and diversity of this country. Although some professions tend to concentrate in a few locations it by no means results in the whole country squeezing into three or five largest metro areas. Naturally, prices and salaries differ as well.

From TX to WA and NY to CA, there are so many places to work and live that this choice occasionally seems to be intimidating. In my view, this country is so different that it takes living here to find your way of valuation. In other words, you cannot judge solely on the financial basis but I doubt you can be worse off here.

3 . The span of my wings does not constitute my reach

I heard a story about fifteen H1 holders who were asked by the company where exactly they would like to go to. The unanimous answer was quite predictable but instructive - they wanted to go to CA. Brand recognition in action :) And frankly, I still completely share their sentiment after actually living here.

The Googles of this world tend to concentrate in a few high-tech clusters in the US and even when they have international R&D offices they tend to keep core development at home. Not to mention that both capitals of the startup universe are located here (the SFBA and Boston). So if you yearn for working on something exciting and really stretching yourself you are much more likely to achieve your objectives here. Creme de la creme of the software world has its R&D in the SFBA while in most countries they have only sales offices.

Global mobility is a myth - ask anyone working in the US or the UK how easy it was to get there and obtain a work permit. Equally, the distribution of interesting jobs is also skewed. For all the offshoring hype, the most challenging jobs are likely to stay here for the foreseeable future (especially if you want to strike it rich in a startup). Thus, one's professional perspectives here are better than anywhere in the world.

4. Think global, act local

Anecdotal evidence seems to be surprisingly efficient if you attempt to compare two countries. Pondering lofty ideas and theories could be fun but your normal life is comprised of mostly mundane moments. It is difficult to explain how different many of those are here.

My favorite illustration juxtaposes updating last year my driver license in the country I am originally from and getting a driver license here in CA (making an appointment online, paying fees with a card right there, not a single uniformed employee, polite and even smiling government officials, superbly organized process, the office itself an order of magnitude larger and better equipped - and we are talking about a remote suburb with a population of at less than 100K). And I observe such differences in many areas - efficiency, politeness and general feeling of normal people around you. Immigrants somewhat spoil the picture but even they mostly behave themselves.

I believe choice is a common theme here. You have it here most of the time in almost any respect from climate to neighborhood. This country feels as a huge place. There is no center, there are so many decent places (even if you simply count major metro areas; at a different scale, there are many quite different nice places within the SFBA itself) that it almost overwhelms your ability to choose. This country is truly diverse and you are more likely to find your optimal environment here than anywhere else. Personally, I regret only the distance to my parents.