Alexander Beletsky's Development Blog: 2011-11

Develop With Tests

I've been recently thinking about my TDD and I came to interesting conclusion. I'm not TDD practitioner any more!

TDD is quite strict practice, it suppose you following certain rules. The main rule is test first. You create test, you create code after. For years I've been using that practice as dogma. I've seen a lot of value with such approach and that worked for me really much.

Do you use that rules now? Not always.. Do you use something different than TDD? Yes, I do develop with tests.

See, TDD main power is not in tests itself. The power of TDD is Test Driven Design. This is design that makes code more readable and maintainable. Tests of cause helps regression and general quality, but it is not always the truth. As long as you practice TDD much you feel how designed for tests code should look like. You do not need to create test to prove that code is testable. Following very simple rules you simply guarantee that tests are possible here.

Now, I simply optimize the process a bit. I could skip first step and go ahead for code. That does not mean I'm skipping test. No, I'll create there I feel it necessary.. And I feel that mostly to all code I create. But this is no longer TDD, I call that develop with tests. DWT as you want ;)


develop with tests

I think a some developers might say, "Oh, I'm using DWT as well". Others will say, "I will use DWT since TDD is boring and requires too much time". Please do not do that. I strongly believe that is TDD that could make you stronger as developers and your code robust and good looking. So follow the rules before you absolutely sure, you ready to break them.

It's Writing Time

There are great series of stories called "Azazel" by Isaac Asimov. They are about 2 cm demon named Azazel and George, guy who is able to talk to him. Azazel knows actually nothing about demons or angels, hell or haven.. But he understands the nature of things able to change them. The stories are short and fun and smart, so I would recommend it to read.

In particular, there is one great story called "Writing time". It's about the man whose name is Mordehai and he is writer. He has a great issue. He always need to wait for something, like wait for doctors, waiters, cab drivers, wait in a shop lines etc. Mordehai treated that time as completely wasted, because he could not spent it for job.

He shared that problem with George. George asked Azazel if it's possible to help to poor Mordehai. As always Azazel was angry about peoples misery, but agreed to help. He could introduce change that make it possible to Mordehai never need to wait for somebody. That change required a little cost, literally the sun will stop shining in 2 million years earlier, but who cares.

George met Mordehai again in several month. For his great disappointment, writer created simply nothing in that time! Not even a small story. Instead of being hyper productive he became non productive at all.

How could it be, that person who spend all his time for work are not able to do the work? As Mordehai understood as he sat behind his type writer - he had no ideas. Simply, he don't know what to write about.

As it turned out all that time he waited actually spent for thinking. It was absolutely not a waste for him, otherwise it was the most productive time.. But he did not realized that before. Unfortunately, Mordehai's career totally ruined.

You know what? I think that I'm wasting the time instead of doing "cool things". I work as hard as I can, but the results aren't impressive. I neither could find good idea nor have good rest recently - I'm exactly like Mordehai who blames waiting line for his problems.

I'll try not to repeat this issue. Having a rest, spending time with family or sport activities are equally important as job (perhaps even more important). And even if you are "doing nothing", something is still going on your head. If inputs are right, outputs will be right as well.. Sooner or later.

Sayonara Nippon

I've just got back from the most wonderful country I ever been to - Japan.


japan gates

Japan is really different from everything I got used to. Differences are everywhere, from traffic direction to people behavior. But in general Japan is well developed, high cultural country with interesting history.

Tokyo is huge, but the same is Tokyo Metropolitan which is really complex, but makes travel from one part of city to another very fast. First day we have a lot of problems to understand metropolitan labyrinths, but with a little practice it does not look so scary anymore. Btw, I've never seen very over crowded stations and trains, even if you travel in rush hour. Comparing to Kyiv metro, Tokyo one is very expensive, where you pay as much as you go.


tokyo metropolitan

People there are very kind, ready to help you. But the problem is communication. Very few Japanese can speak English. Usual dialog is something like. "Do you speak English?", "A little.." and then nothing, even if you try to use as elementary words as possible. So, language barrier is very high. But as soon as they understood your problem, be sure you gonna get help. Once we've lost in metropolitan and one lady went out from station with ask, contacted metropolitan officer and explained our further actions. Such scenario happened several times.


noodles

Food is very delicious and relatively not expensive. Chinese and Japanese dishes are usually available together in restaurants. But if you want to go with sushi, you have to find specialized one. There are absolutely not a problem to eat in Tokyo. In each corner you could find small restaurants and cafeterias where you will be able to find what you like. Food is available mostly everywhere, including metro stations.


tokyo park

Tokyo is concrete and wires jungle, but there are several great parks inside. They are beauty and calm. It is easy to find a bench to sit and observe spectacular views. It is great to relax body and mind there.

I would not say I've seen a lot, but I really enjoyed with everything I saw.

Sayonara Nippon! Hope to visit you again in a while.. Best luck to you!