Sunday, December 27, 2009

Pleasureful stroll through San Telmo

Just returned from a pleasureful stroll through San Telmo. Even though it was not the first time we went there, it was the first time i really enjoyed it. Last time we went on a Sunday to visit the "famous" Feria de San Telmo. Then it was ways too many people and the whole thing was too touristy.
Today we went on a Satuerday and on top of that it was the 2nd day of Christmas. Some shops were still closed and there were just enough people around to create the right atmosphere. We ended up in the market hall of San Telmo. Even there the antiques stalls have almost taken over, but a considerable large part is still filled with fruit and vegetables stands.
There is something special about this places. No matter which city I visited, the markets are always a great place to hang out. Be it the Adelaide Market, Melbourne's Prahan Market, Göteborg's Saluhallen or in this case San Telmo's Market Hall - they were always good place for spending some peasureful hours. Today we ended up in a little cafe in the entrance of the hall and ended up staying several hours since Anna started to talk to one of the shop owners. Here are a few pictures:



Maybe that's a good time to talk about costs of living again. In my previous post I already talked about the rental costs and they are not really cheap. The good news is that the costs for having a coffee are very low. It normally costs around 6 ARS. A sandwich with jamon y queso to go with the coffee should not cost more than 12 ARS. A softdrink (cola, mineral water, etc) is around 7 ARS. Of course this all depends a little on where you go :)
Another great thing is that public transportation is so cheap. There are two tariffs 1.20 and 1.25. If using a bus you just tell the driver where you want to go and then put the money into the machine behind the driver. The subway (Subte) is always 1.25. Compared to public transportation in Europe this is a real steal.
Last but not least, in case you are going to travel a lot by bus it is a good idea to buy a bus guide - guiat which is available at newspaper stands. You need a degree in rocket science to work the pocket version of this guide, but once you figured it out it is worth the investment :)

Enjoy,
Hardy

Wednesday, December 23, 2009

Finding an apartment in Buenos Aires

It's about time for my first Buenos Aires blog. We are here now for three weeks and lots has happened. The first challenge was to find a temporary (fully furnished) rental place. First the good news. There are plenty of apartments to choose from, so there is no need to panic. The bad news is that all real estate agents we met (and we met a few, believe me) tried to screw us. It surely felt this way. It is bad enough that foreigners have to pay in US Dollars what Argentinians have to pay in Argentinian Pesos. The least you could expect in return is some honest help. What we have experienced is that once you have signed a contract you fall on deaf ears when it comes to any problems. Nevertheless, here is a list of a websites you could check for apartments (no preferences):

There are a few things you should watch out for though:
  • Always look at the apartment before singing anything. Pictures can be deceiving and you never know which major highway runs past just outside the apartment.
  • Ask if the advertised rental price includes the commission. If you rent via an agency expect a minimum commission of 20%. Often the commission is included, but we lost several hours with one agency which appeared to offer great value for money, only to realize that their price did not include their commission. To top things off this particular agency also wanted the the rent for the whole rental period in cash and in advance. Needless to say we walked straight out.
  • Make a list of things you are missing in the apartment or you want to get fixed. It is amazing how much these agencies will do before you signed and how little once you did.
  • Don't hesitate to negotiate the price. Given the amount of available apartments it is more than reasonable to ask for at least 100-200 USD discount, especially if you are staying for several months.

You probably ask yourself now what to do in order to avoid real estate agencies. Personally I would recommend renting directly from an owner. The best source to find direct rentals is via craiglist. The site's look&feel sucks and you have to get familiar with some Spanish terms, but it is worth the effort. Of course it also helps a lot if you are able to speak Spanish when calling up people, but I don't think is is absolutely necessary.

Price wise expect to pay at least 1000-1300 USD for a reasonable place for two. Most apartments will fall into this price bracket, but what you then get for the money will differ enormously.

Last, but not least here is a link to the place we ended up renting after a two weeks intermediate rental with Pura Buenos Aires. Needless to say that we are very happy now :)

--Hardy

Wednesday, December 02, 2009

Notes on test driven development

This post was triggered by Per Lundholms post Beyond Basic TDD - an interesting take on problems and possibilities with TDD. The acronym means Test Driven Development and has been around since the pioneering days of eXtreme Programming. Many remember the kentbeckism "Listening, Testing, Coding, Designing. That's all there is to software. Anyone who tells you different is selling something." Serious developers test their work. XP or TDD didn't change that. TDD not only promises to make sure the code works, it can be done in many other ways, it also promises that the code that is created have a good design. The idea is that code that is easy to test also is of good design. Whenever bad design appears it is refactored with no fear of failure since unit tests guarantee quality.

I have been working test driven for most of my time as a java developer. I first started writing tests with the first version of Junit back in the late 90s. Back then I felt that this must surely be the way of the future. Not so. In every project I have worked in since I have had to fight to get people to even write unit tests. Per asks the question "What do you think should go into an advanced class on TDD?" The following are a couple of ideas from me.

(1) How much testing is good? Rare is the case when there are lots of tests that cover most of the system but for senior TDDers this may actually happen. In this rare moments it may be good to have some way of deciding on the correct amount of tests. If there are too much test code the cost of maintenance increases and it may be harder to change the test code than the production code. This leads me on to....

(2) Maintenance of test code. Sometimes developers are somewhat disregarding towards their test code - "it's only tests". This may lead to maintenance problems with the test code. If code is hard to read it is often thrown away and in the cases of tests often commented out or removed. I think that test code should be written with the same level of quality as the rest of the code.

(3) Build integration. Not all teams do continuos integration and even if they do developers arriving later to the code may not. If tests are not run at build time it is likely that they will stop compile after just a couple of months of nontesting. To avoid this - make sure that tests are always run when building. This is the case for anyone using maven but there are many homegrown ant solutions and if you are on something else than java it is a different story altogether.

(4) The problems with test driven design. One misconception that has sprung out from the XP movement (that they never advocated) is that code that is tested and refactored will inherently be of good design. Depending on the skill of your developers this may or may not happen. Just because we are agile doesn't mean that there isn't a need for design sketches. In XP this is called the system metaphor. Often this is forgotten in the agile mindset. An interesting subject is to do just enough designing and architecting up front.

(5) Per had a couple of interesting thoughts on tests as specification. I think this is a very important subject especially for teams without requirements documents. I think it is good to divide tests into unit tests and acceptance tests (or system tests or what you want to call them). Unit tests are developers tools to make sure they are done with their task. Acceptance tests on the other hand is the specification of how the system is supposed to work. I would like all unit tests to pass all the time and when they don't I want someone to drop everything else and fix it immediately. Acceptance tests on the other hand measure progress, when they all pass the iteration|sprint is finished. Acceptance tests test the system as a whole while unit tests test every part.

(6) The use of simplicity when coding unit tests. Often there is much effort to test classes in their entirety. Mocks, stubs and drivers are developed so that every unit can be fully tested. In many cases this is a really good thing but sometimes most of the code that really needs tests can be isolated in stand alone methods or functions and tested without setting up any complex surrounding. The surrounding will be tested by acceptance tests anyway.

(7) How to make developers want to test. The team I work with now got more enthusiastic about testing after installing the Emma code coverage plugin for Eclipse. Now they can see their progress in a neat way. The problem with this - of course - is that code coverage doesn't say that much about whether the tests are any good. Most developers know that you are supposed to write unit tests and they can probably argue about why as well. But when there is a bit pressure they feel that testing slows them down. This is largely a matter of habits. If you are unused to testing it makes you slower whereas when you use it all the time it actually makes you faster. Since this apparently is a case when logical arguments doesn't make it it would be interesting to hear about softer techniques for turning developers around.

I have been thinking about writing some notes about TDD for a long time. Thanks to Per for making it happen!