Szeretem érezni az énekes hangján az utolsó, felvétel előtt elszívott cigaretta torokfüstjét, a hangot, ahogy a mikrofon védőhártyájára valami rárepül, ahogy a pengető elcsúszik picit a gitáron, a keverő hibáit, ahogy összeollózta a számot. A hangszerek csendülését, ahogy a háttérben újabb-s-újabb komplex formákat fedezek fel, a tízezredik visszahallgatáskor.

(more…)
… And especially about Darjeeling first flush maharani 2010
The following text was originally a letter to my friend, Massimiliano Mirra, along with a pack of the aforementioned tea, reproduced here as it was written, in the public library of Amsterdam, as he said it’s a text which shouldn’t be enclosed into a single letter. This story was told before to a few tea-loving friends already, but this is the first written version. In case you spread it, please drop me a mail, and at least also mention my name. Creative commons nc-sa…
Darjeeling tea is known as the Queen of black teas and not without a reason.
Darjeeling is in the Indian part of Himalaya, with a breathtaking view of the tschomolungma, and an also a breathtaking height of 6000 meters. Mount Everest seems like a small bump from there. Its slopes makes it ideal for tea, as they get so much sunshine, just like the slopes of Tokaj are ideal for wine.
Darjeeling tea is harvested three times a year, called first flush, second flush, and autumn flush. Since they are queens, let’s look at them as women, and be sure we won’t miss a point.
First flush is like a sixteen years old girl. She’s really fresh, but also don’t have too much experience of the intercourse with hot water. Therefore, you have to brew it carefully: don’t use too hot water with it, as it would make her closed, and you can’t really enjoy your meeting with her. 70 degree celsius or a little more is about enough. Also make sure you always use clear water with her: mostly we recommend spring water, but having a usual bottled water without gas is enough.
The advantage of her, that if you are careful enough, she has the curiosity and strength to be with you multiple times in a day;that is, if you don’t pour too much water on her - just about one deciliter per 2 teaspoons - you can enjoy her 3-4 times without getting another portion.
The problem with such a 16 years old that she will spend only her summer vacation with you: after that, girls go back to school, and either become more serious, or unenjoyable at all.
First flush is harvested in late march, and usually gets into the stores early may. Be sure to drink it before september.
Second flush is harvested in mid-may: she’s about 26 years old. already has some experience with hot rains of the himalaya, you don’t have to teach her everything. Also she is more serious and more colorful: knows more of the world, and has more to tell you. However, she isn’t that interested in you: maybe you can go two rounds with her, but after that she won’t be really part of your experience. Yet you can enjoy her year-round.
Autumn flush is 36 years old: full of experience, full of shades and secrets which shine through her personality. You can only experience her once per session, but what an experience it will be! Also, she has the dark colour you would expect from most of the black teas. Be careful with her too, however: pour water just below the 100 degrees, 95 should do fine.
The tea I gave you is a first flush maharani from this year. I have an autumn flush maharani at home, she’s my celebration tea, along with a 30 years old pu-erh. Maharanis are a bit sad, sour like a lemon: you will feel it. She’s an emo kind of girl: this will grow into the experience of the autumn Diva later. I hope she can grow up at you - some first flushes turn into older by themselves - but I’m not sure, so enjoy her through the rest of the summer.
Ez a poszt angolul van most, bocsi. Igaziból egy kommentem egy InfoQ-s cikkel kapcsolatban, de önmagában is megállja a helyét, így gondoltam, kirakom
Recently, a whole module of a legacy web application written in PHP4 around 10 years ago (and constantly “maintained” since) was needed to have new features.
We’re talking about 1000s of lines of code within one function, or even case of a switch case.
Most of the time, people don’t refactor maintained legacy applications, as somebody told me “the first rule of support development is: don’t change anything other than requested, just add your stuff.”
I haven’t been able to track the application back to its beginnings but its imminent to me that if-else branches don’t grow to 600 lines by themselves, without human intervention. Somebody has to mess these up, and someone has to have such kind of thinking. This is pretty general in enterprise programmng:
- most of the tasks are about legacy applications
- people fear to clean things up
- it’s not about development, but adding requested features and fixing bugs.
Also, PHP is a dynamic language, and therefore formal refactoring tools are usually unavailable. For example, PHP refactoring support in netbeans is basically non-existing.
So, what would you do here?
I decided that a system’s answer is dependent only from its input and its context. This seems pretty straightforward:
System ( input, context ) -> output
OK, what is the input of a web application? Of course, its HTTP request! In PHP, it’s hard to think about any other input.
What’s the context? Context is given by two components basically: the underlying platform, whatever it is (no matter you have a framework or just common libraries, we call these platform together), and the persistent data layer. So:
Web app (request, persistent data) -> answer
(I know, I forgot platform to add, but in refactoring scenarios, platform should stay the same anyway. In case you change platforms too, there are other complications which we won’t talk about this time.)
What’s the answer? First, it’s an HTML (or XML, JSON, etc) output. We didn’t have to care about it in this particular case. The other output is: changes to the persistence layer. It’s unusual for web applications to change anything other than their database and cache layers.So:
Web app(request, persistent data) -> (written-out response, persistent data' )
OK, what to do? We have an old system and we want to refactor it to a new system, and the question was: are they equal in functionality?
Question is: Web app == Web app' ?
Let’s see what I did:
- Ask a manual tester to go through every possible combination on the user interface
- Recorded these into files (serialize($_REQUEST)), or, even better, (serialize($GLOBALS))
- Ask the DB layer to NOT write anything to the DB (ugly global variable hack, if it is present, only select queries are executed), this way, we ensure that we keep a consistet state
- Record every writing operation (so, instead of executing them, take note of them)
- An algorhythm:
- load the serialized request,
- start recording db,
- run the original controller,
- collect db recordings,
- re-load request (in case it was modified by the original controller - we could never know)
- run the new controller
- collect db recordings
- see if the two are equal
This way, I could be sure, that in all of the scenarios a manual tester could come up with, both of the controllers behave the same way.
After the original recordings, I did a few additional points:
- re-load the request again
- enable db writing
- run the new controller
- display result.
This way I could create an - albeit slower - but seemingly normally functioning version of the software, which did everything it did previously, and it was verified that functionality haven’t changed with the new controller.
I called this blackbox-harness test.
What do you think?