and has 0 comments

  Dune, a mega-classic of sci-fi books, written in 1965 by the ecology obsessed Frank Herbert, tells the story of a future world that is dependent on the substance known as spice, of a vast stellar empire led by an emperor and the noble houses and shaped by religion. Dune is the first in a series of six books, each one increasing the level of "epicness" of the story. There is no way I can do justice to the book in my review, it is that good and that complex. All I can say is that I've read it every ten years from the time I was 15, and every time I read it, I interpret it differently. This also shows how different we are at various ages.

  Anyway, I was saying that Frank Herbert was obsessed with ecology. I am saying this after having read all of his books a while ago and noticing the pattern. The Dune Wikipedia article claims that this book was the result of events that started Herbert's interest in ecology, while he was working for the Department of Agriculture, trying to stabilize sand dunes using plants. Herbert is also the author of brilliant books like the Pandora series or like Hellstrom's Hive which, for many reasons, I consider masterpieces as well. However most of his books and short novels feature some interest in ecological systems.

  The story is set twenty millennia into the future. As it was written in the sixties, it had to solve the problem of exponential technological advancement that was obvious even then. How can one write a book about the future, when the future moves so fast? Herbert solved it in a simple way: he imagined a world where humans rebelled against the use of intelligent machines, for religious reasons, thus removing computer advancements from the equation. Also, in order to solve the issue of ever evolving weaponry, he imagined a world where energy shields were cheap and small and could be used personally or on buildings or ships; these shields would stop any object or energy moving fast enough. This reduces battles to hand to hand combat, with knives and slow needles that can penetrate the shield. It's not like Herbert had all the answers: there are obvious technological devices that would have rendered this version of a shield useless, as well as clear reasons while perfect control over technology could not have been enforced. But the way he envisioned this future world, where everything important was the human being - as a thinking, feeling, believing creature - made it close to timeless.

Now, the plot is vast and the beauty of the book is in its minutiae, not in the overall story. This has been proven, I think, by the way people have received the 1984 David Lynch film adaptation versus the 2000 version. The first took "poetic license" to change the story and make it more script like, but preserved the feel of the book, with the interior dialogues, the epic scenes and careful attention to minor details. The 2000 adaptation was completely faithful to the book in the way of following it scene by scene, but the lack of attention to punctual details made it unappealing and bland. There is a project called Dune for 2014, maybe that will give us another point of reference. So I will not talk about the plot and let you discover it for yourself. Enough to say that it is a great book.

It is important for me to talk about the difference between my personal interpretation of the book at different ages. When I was 15 I thought it was a glorious story of personal achievement, where Paul Muad'dib and Leto II were becomes gods by the sheer power of their thoughts and feelings. At 25 I thought it was a deep analysis of human interaction, of how logic, emotions and belief clash to mold our beings. And now, at 36, I feel like the book is brilliant, but I can read between the lines, see how the structure of the story was created from various sources; a bit of the mythos has lost its power, but gained more respect. If at 15 I was identifying with Paul and at 25 I was dreaming to become Leto II, now it's easier to me to identify with the likes of Gurney Halleck or even Feyd Rautha Harkonnen. I am not saying that I like them more, I just feel I gained more insight into the other characters. I say it again: Dune is a book of details (without being boring with them).

I cannot end this review without mentioning the Dune video games. I spent many an hour playing the adventure game Dune and many a day playing Dune II, the real time strategy game that was to inspire all others in the future. The game was so primitive that the controls were not designed for ease. Each unit was controlled individually and had very little autonomy, the result being that one rarely had time to blink when many units were constructed. This prompted my father to take me to a mirror and show me my own eyes. They were red and irritated. "Oh", I said, "it's from the spice!".

Review at 45

In between Villeneuve movie adaptations of Dune, it was time for another reread and, amazingly, I got something else out of the book, again! This time I saw through many of the flaws of the book. Small flaws, to be sure, but some contradictory facts like when to unsheathe a crysknife or where the origin of a mind altering substance was and stuff like that.

I also understood why it is so difficult to make an adaptation of the book to movie form. First of all, because the people in the Dune universe are supposed to be superhuman. They remember much, think fast, feel deeply, move fast, after going through harsh training regimens and being subjected to exotic substance, strange rituals and being subject to strong religious and political forces. I can even say now that I think Herbert didn't write well enough to convey what he wanted, as his book is inconsistent in how it portrays the abilities that noble people use at every moment of their existence. Lynch tried to make it work, while all others glossed over it. On paper you are shocked by the way the characters take in the world, observe and analyze minutiae, only to then act with ruthless swiftness. On the screen, you just see normal people in a fantasy world that makes little sense.

The first part of the book is also more consistent that the second. From the moment Paul and Jessica meet the Fremen, everything is done quickly, based on rituals and knowledge that is somehow common to characters from completely different cultures and, when that fails, there are premonitions or instincts that tell them how to act in order to move the story exactly as the author wanted. And failing that, there are always coincidences that help. The Fremen themselves are described in wildly oscillating ways: they are the noble savages, but they also have a very old culture, but they are also violent simpletons that are blindly driven by ritual and implanted religion, but they also have technology, they are honorable, unless they kill stabbing you in the back or in a fit of rage. They are superb fighters, but they are not trained, so Paul can defeat them, but not the super trained Sardaukar. And so on and so on.

At the end, some particular important events are written as happening "off screen", like Herbert wanted to get it over with.

And I understand that, too. The complexity of the story and characters, the careful (superhuman?) effort that must have been necessary to make this work - while writing it on typewriter 70 years ago and also trying to get people from that time to accept it - must have been titanic. Did you know that Dune was the first best seller science fiction novel? Before this book was (repeatedly rejected and only then) published, science fiction was a niche for people to write for themselves and not others.

I am not sure if I will, but I am thinking already to continue to read the entire Dune series of books, not only the mandatory first six, but also those written by Herbert's son - the biography of his father and the collaborations with Kevin J. Anderson.

and has 0 comments
This book (complete title: Wired for Love - How Understanding Your Partner's Brain and Attachment Style Can Help You Defuse Conflict and Build a Secure Relationship) is a layman's terms summarizing of research done in the area of romantic relationships. Stan Tatkin is not the greatest psychologist ever, but he does a good job in writing this reference book. He lists ten principles that would help people retain their relationship and improve on it. Simple things like making eye contact, hugging till the other relaxes in your arms and fighting smart - for the couple, not against your partner, can make huge impact with little effort. Tatkin suggests that we are all untrained in this relationship crap and so he goes towards making a sort of abridged manual in how to proceed.

Now that I've said all those nice things about him, Tatkin is clearly not God in all matters relationshippy. He admits that the reason why he started the research was the fact that he went through a divorce. That must be especially jarring for a psychologist. Wasn't he supposed to know about people? What happened? He then proceeds fast pace to categorize people and tell them which parts of the brain and which bits of education made them like that and what to do in order to get to the "good" category. I particularly disliked that he branded people into three categories, then was obviously biased towards only one. That doesn't mean he is wrong and certainly when going for simple straight results you just have to put caution aside and go all in. But that's just it: this book is not THE solution, it's just a solution, one that felt right to Stan Tatkin, and so you must take it with a grain of salt.

The basic ideas of the book start from brain structure. We have parts of the brain that are wired for war, what he calls primitives, like the amygdala, who is responsible for the fast reactions that keep us alive. When we get into fights, for example, the amygdala gets excited and furiously fires neurons that prepare your body for a physical conflict. At this time other parts of the brain are more suited to assess the situation and define danger and behavior, parts he calls ambassadors, like the hippocampus. If we are too focused on our basic emotions, we start arguing and hurting the other in order for us, the individual, to come up top in the battle and miss important cues on how our partner feels and what are the correct measures to make the couple get through the situation. Tatkin makes the simple case that as long as we go through episodes where we fight for us and against our partners, this hurts, obviously, the relationship. The thing we should strive towards is the "couple bubble" (I know, terrible name) where both parties can feel protected and safe together with the other significant.

The author splits people into three categories. There is the island, which in childhood was not engaged by their parents, not hugged enough, they did not feel protected. They come out as individualists valuing their personal space and sensible to any close or intimate contact. They believe that as long as two people are self reliant and have a good life, they can have a good relationship without actually needing each other, only enjoying the company. There is the anchor, someone who was loved and engaged during childhood, with lots of attention and careful interaction with caregivers. They are balanced in their emotions, easily empathize with others and form natural couple bubbles, are fond of affection and close personal contact. And there are the waves, who oscillate between the two, alternatively needing affection and intimacy, only to run away when they receive it, for fear of being rejected or abandoned. From all three categories, the anchor is "the way", while the others something our childhood regretfully forced us to be. Thankfully, treating our partner right and being treated right back can change our affiliation.

Needless to say, I don't wholly agree with the guy. The categories feel arbitrary and unidimensional. Of course that restricting your metric restricts your vision of the world, but at the same time one can take this book as an advocate for a specific system. It is the job of others to find and validate others. This is what worked for Tatkin and so he shares it with the reader.

Here are the ten guiding principles of the book. For details, read the book. It's pretty short.
  1. Creating a couple bubble allows partners to keep each other safe and secure
  2. Partners can make love and avoid war when their primitives are put to ease
  3. Partners relate to one another primarily as anchors, islands or waves
  4. Partners who are experts on one another know how to please and soothe each other
  5. Partners with busy lives should create and use bedtime and morning rituals, as well as reunion rituals
  6. Partners should serve as the primary go-to people for one another
  7. Partners should prevent each other from being a third wheel when relating to outsiders
  8. Partners who want to stay together must learn to fight well
  9. Partners can rekindle their love at any time through eye contact
  10. Partners can minimize each other's stress and optimize each other's health

Conclusion: A book that can open eyes. One must be careful not to close them in other directions or look only this way. As I said earlier, it seemed as a theory based on a single dimension, the need to feel safe, with little bleedthrough in other areas. Some of the things in the book are so easy to do that not trying them to see if they work would be a shame. Also, whenever something feels too obvious, try to remember when (and if) you actually rationalized this before. Sometimes obvious things need to be said.

and has 0 comments
Meet my new puppy dog, Tyrion! The name is, of course, taken from A Song of Ice and Fire, where it is the name of a dwarf who is kind, intelligent and, when needed, ruthless. Of course, if it were a female puppy, she would have been named Arya.

The dog is a West Highland White Terrier, a breed that is known for a lot of sturdiness for their size, curiosity and intellect and also a strong personality which pushes them to claim leadership of the house, even over their owners. Even if the owners are assertive and consistent, only one of them is likely to be considered "leader of the pack", with the other a peer at max. He is supposed to be very stubborn.

That being said, Tyrion is a small lovable little puppy of only three months who so far liked every person that came into the house and was likewise liked in return. He seems to love us even if we do evil things to him like vaccinations or shouting at him when he poops all over the place. On the other hand, a Lannister always pays his debts, so you never know. In all fairness the vet warned us that he might need a few weeks to adjust to the house and learn to relieve himself in a single spot, but he is well on the way there. In only a week he learned to excrete on the Pampers like sheet we placed on the floor. More or less. Also, until we vaccinate him, he is not allowed outside, and that means he will stay indoors for at least another month.

And before you think I am in that "Ya gotta see the baby!" mood, let me tell you I am not. I am quite attached to the affectionate little fur ball, and he to me, but that's the extent of it. This is an informative post, just so you know why instead of blogging cool stuff, I put out puppy pictures.

Ano Hi Mita Hana no Namae o Bokutachi wa Mada Shiranai (lit: We Still Don't Know the Name of the Flower We Saw That Day) has only 11 episodes and the last episode finishes up the story completely, so it wasn't something larger that just got cancelled. Better known as "Anohana: The Flower We Saw That Day", it is the story of very close childhood friends that pass through a deep trauma when one of them dies in an accident. A few years later, they all have drifted apart and each of them blames him or herself for the way things ended up. And here comes the ghost of the dead girl Menma, showing itself to only one of the group and asking him to fulfil her final wish so she can get to Heaven. The five friends get together to fulfil that wish, even if no one, including Menma, remember what it was.

At times it got annoyingly emotional with everybody crying and cringing and getting angry and stuff like that, but overall it was a nice anime, exploring the deep feelings of childhood that we don't really get over. So overall I liked it and, being short enough, I can easily recommend it to everybody, even if at times it feels like a soap opera. Perhaps making it a movie or a small series would have made it better.

A couple a weeks ago I went for a job interview in order to see what is out there. It was a terrible phone interview and I failed to make a connection with the technical interviewers. I think I was just as disappointed in them as they were with me. However, what I believe killed it for them was an experiment I decided to conduct: to the usual question about software patterns I answered boldly that I didn't believe in software patterns and that I believed management techniques were what drove productivity and quality of work, not particular software commonalities. It was partly true, though, I do believe that, and this post is about my thoughts on the matter. Now, be warned: I may offend a few people that religiously pray in UML at Martin Fowler's shrine in the church of the Gang of Four.

Let's start with a brief history of software patterns. It started with inspiration from a building architecture book that explained that for similar problems there are similar solutions in architecture and that listing them would be a boon for the would be architect. Someone applied this to software in the form of common practices to solve common problems. The idea was that, outside the main goal of cataloguing best practices, these software patterns would provide a sort of common language for software architects.

The problem is, of course, practice. The good part of a software pattern is that it provides a tested solution to a common problem. The bad part of a software pattern is that there are not that many common problems and most of the time software patterns are applied badly in practice. Invariably, at some point, the application of a software pattern leads to the Golden Hammer "antipattern". If the software pattern is well thought to apply to as many of the situations where a certain problem is met, then it is defined by a lot of flexibility. That may sound good, but a flexible architecture is usually low performing, overly complex or simply hard to understand in order to use them in very specific circumstances. That is why for most requirements there isn't one software library, but many, each attempting to juggle the right amount of performance, complexity and ease of use. And, of course, if a pattern is not well thought, why use it at all?

I guess the point I am trying to make is that current software patterns try to catalogue small issues, things that are, really, of little consequence, and that other things are way more important to behold, like long term vision. What is the point of using Inversion of Control if you don't plan to ever make components modular? Why would you create an MVC application if the code monkeys that you have hired will riddle the view with business logic? In fact, why would you make any effort of standardizing your application if you don't plan anything? And that is the basis of my contention: planning an application is the bottleneck. I would go for Software Planning Patterns way before I even consider mid level software patterns. The planning is where the need of the technician does battle with the need of the business owner. One strategy might be perfect when chosen only to become obsolete during implementation, I agree, but then you have an initial strategy, a current strategy and the techs must find the way to transition from one to another. Planning is where all the interested parties come together and need to reach a decision; the technical implementation, let's face it, must just work and then, hopefully, be reasonably maintainable.

And I dare say that in building architecture the long term plan for the building is already there. It must be, as it will last for decades. You don't start a skyscraper only to change your mind in the middle of the work and go for a stadium. You know the purpose of the building, you know how you will use it, you know the needs it has to cover, and all that is left is to determine the technical way to achieve this plan. Software is way more elastic than this and I believe this is why the concept of pattern does not easily transfer from the domain of construction to the one of software development. In a way, forcing these patterns on the software world is in itself like using a Golden Hammer: they don't fit exactly. Moreover, the word of the day in software is Agile, the management technique that assumes right from the word go that there will be change in the plans for the project and that the team must be ready for it. I submit that the current state of software patterns is too rigid, too inflexible, based on the assumption that there is a plan and that it will not change. Or worse, based on the assumption that there is no plan and that anything must be enabled by the software architecture. They either force you to lose flexibility or add so much of it that it makes the end product bloated and unproductive.

The answer is somewhere in the middle and that middle is different from project to project. No matter how well software patterns are designed and applied, in the end they must conform (or end up hindering) the strategic plans for the software project, which are, in my view, the true bottleneck of software development. As a domain specific language between software architects, software patterns are good, but one has to acknowledge the extreme minority of architects in software. Even in that small guild I don't find there are a lot of discussions where the lingo of software patterns is used much. The complex patterns are invalidated by the many "flavours" that unavoidably appear to handle that complexity, while the simple patterns are invalidated by components that encapsulate them and relieve the developer from having to implement them. My conclusion is that the importance of software patterns is being exaggerated. Little more than a miniatlas of common software practices, it serves as a pretty picture book, rather than an instrument that promotes understanding the field of software development.

This 6 episode long anime can by all rights be considered a single movie segmented into 6 small stories. The story is not extraordinary and the animation not great, but the quiet way it is told makes it nostalgic and generates a lot of kind feelings. What's it about? There are these two (highschool, of course) guys in a not far away future where robots and androids are common place. Some of them are advanced enough to obey complex commands and to look human and they all follow the Three Rules of Robotics, as coined by Asimov. One of the guys notices in the logs of his house android that it goes out from the house, occasionally, to places where it hasn't been instructed to go. The two friends follow the logs and find a weird bar where androids and humans must obey a single rule: all customers are to treat each other the same and not discriminate against robots. This makes the two understand the complex feelings that robots can have and discover their own difficulty in relating to said robots under the weight of society expectations. There is even an "Ethics Committee" that hates robots and wants to limit the interactions between man and machine, but just before they make any move the show ends.

Eve no Jikan was an interesting concept, something that reminded me of some of the quieter episodes from Ghost in the Machine or Denou Coil, which says a lot considering that GiTS is my favourite anime ever. However, the sixth episode felt like one of the others and then it suddenly says the story is finished, so its production must have ended prematurely. Maybe with a little more backing, it could have become a cult anime, as well.

and has 0 comments
Finally, it is all over! The Dark One is defeated and all the character stories have come to an end. Funny enough, having Brandon Sanderson write the last two books made me want to read more. You may have noticed that in the title I give no credit to Robert Jordan; I know it's his story and that he left a lot of notes on how the book would continue before he died, but Sanderson has made it a lot better and it feels a waste to end it just when it got good.

The last book of the Wheel of Time saga, A Memory of Light, continues where Towers of Midnight left off, pits everyone against everyone and ends all threads. The battle of the end is epic and, except some slight miscalculations, is pretty much consistent with the other books. No Nynaeve braid pulling or needless spanking or otherwise humiliating women in this one, instead a lot of characters blooming from the dried up husks that they were becoming in the last Jordan books. As before, I loved Mat's character, but also Perrin is now a lot more involved, intrigues abound, people die (even important ones) and the ending is... let us say intriguing. One may still hope some offshoots of the story. There were some unexplained or otherwise inconclusive bits. For example there is a scene where Mat sends a lot of villagers to die protecting a river, then, when it matters most, the same villagers return through a gateway. I have no idea what that was about. Also there was a little bit of a story with some soldiers that had all their metal turned to something squishy. It just went and gone without much continuation. Then some ideas of the battle seem brilliant at the end of it, but not used during it, making the entire "Mat's strategical genius" idea a bit flimsy. Also, Demandred almost kicked his ass (and a lot of others as well) before he got killed. If there is something that felt a bit off, it was the women. Robert Jordan was obsessed with the women and he often wrote the story from their point of view. Sanderson is clearly a man's man :) Women had pretty small roles and little introspection.

Bottom line: a fourteen book saga is a lot to read. As much it pains me that it is over, it makes me even more glad that it is over. Sometime you just have to learn to let it go. The quality of the writing is very good and I dare say that this is probably the best book of them all, which makes it a fitting finale. It is also very long, the third in length from the entire series, at approximately 360000 words. If you have read The Wheel of Time so far, there is absolutely no reason to not read the last book. If you haven't started to read the series, you might want to think it over if you want to spend so much time doing it, but I don't think you will regret it. And lastly, if you have started to read it and then abandoned it for whatever reason, the last two books are a level higher than the rest of them and should provide motivation to carry on.

Oh, and you if you wonder if I am going to read the prequel and the companion books: no, I won't! If you do, though, please make the effort to comment on one of the Wheel of Time posts. Thank you!

Macross Frontier is a 2008 anime series of 25 episodes set in the Macross universe, itself 25 years old at the time. Humanity is expanding in the galaxy using huge self contained colony fleets that are defended by the ubiquitous Mecha humanoid robots. Their enemies, a strange race of space bugs that seem to have no mind of their own, but whose method of communication or reason for doing anything is a mystery. Enter Alto, a beautiful guy - and when I say beautiful I mean it, as he is cute as a girl and many times in the series people address him as one, to his chagrin - that wants to be a pilot. He accidentally joins up with an elite piloting force and there the story seems to become interesting: space battles, interesting aliens, amazing tech, even political machinations. But wait! In Japan there has to be more. And there is! Alto is 17 years old, that means he is also in high school. Two of his pilot buddies are his colleagues. Then there is this galactic idol pop star singer that is very beautiful and somehow falls for Alto and subsequently becomes a student in the same class! And there is another girl who also wants to be a singer and she becomes one rivalling the first, only to fall for Alto and... join the same high school class! And all the time they need to act on their feelings, without actually expressing them in an articulate way, and trying to protect one thing or the other. And if you thought the two singers are just a filler device, not at all connected to the main story, you are wrong. The singing of one of them seems to affect the alien bugs!

To quote a friend, WTF is wrong with the Japanese? Why would you mix space battles with j-pop and high school? Why hasn't there appeared a service that strips the annoying 2 minute singing at the beginning and then at the end of every episode and lets you watch everything start to end? It would be perfect if it would also remove in separate streams the fighting plus the sci-fi from the ridiculous fascination with high school puppy love!

To conclude, it wasn't great by any means, and the insistence of showing every space battle in the context of a pop song was really annoying. The story was OK, although I could spoil it for you in about 5 minutes. The animation was standard, I didn't think there were any issues with it. If you love the kind of "oh, oh, poor me, I am in a love triangle and can't get out" story, this is the one for you. The sci-fi was, really, taking the backseat in this one. I have to admit, though, that the highschool theme was not exaggerated much, nor was it absurd to the point of annoyance like in Elfen Lied, for example.

and has 0 comments
I have started a more formal chess training program, something that would possibly improve my skills as a chess player and finally getting me into that place where I can fully appreciate the beauty of the game. As part of this program I've watched the Daniel King Power Play DVD Part 1: Mating Patterns, in ChessBase format. It was a well presented material that made for very interesting time. The information contained is aimed at beginners such as myself and presents several chess mating themes, with some puzzles at the end, to test the knowledge gain. I can say that I liked it and I recommend it to other learning chess players as well. However, this post is aimed at summarizing the information, for future reference.

    Themes:
  1. Greek Gift
  2. Lasker Double Bishop sacrifice
  3. Lawnmower (Double Shotgun) mate
  4. Bishop See-saw
  5. H-file Rook distraction
  6. Knight mate
  7. Queen in on the pin
  8. Back rank mate

And then are the Puzzles.

For each theme I will post pictures with a position, let you think, then give you the opportunity to see the entire PGN. Same with the puzzles. Try to think things through before looking for the solution.

1. Greek Gift

The opposing king is castled short and you sack a bishop by taking the pawn in front of the enemy king. The king is forced to take, and then a knight check comes, followed by the arrival of the queen.

Netzer, Jean - Guezennec, Franck, 2000 (FRA-chT U20)

White to move. Click here to see the game.

Hartl, Rainer - Hecht, Christoph, 2000 (Landesliga Sued 0001)

White to move. Click here to see the game.

Langrock, Hannes - Gaede, Derek, 2000 (JBLN West 0001)

White to move. Click here to see the game.

Polugaevsky, Lev - Tal, Mihail,1969 (URS-ch37)

White to move. Click here to see the game.

Colle, Edgar - O'Hanlon, John,1930 (Nice)

White to move. Click here to see the game.

Thesing, Matthias - Borngaesser, Rene,1984 (NRW-ch)

Black to move. Click here to see the game.

Toulzac, Pierre Yves - Sokolov, Andrei,2000 (Mulhouse IM)

White to move. Click here to see the game.


2. Lasker Double Bishop Sacrifice

The light bishop is sacrificed just like in the Greek Gift, the queen comes around to check, then the dark bishop is sacrificed as well for the pawn in front of the enemy king. The mate is achieved by a rook lift.

Lasker, Emanuel - Bauer, Johann Hermann, 1889 (Amsterdam)

White to move. Click here to see the game.

Koenig - Cornforth, 1952 (London)

White to move. Click here to see the game.

Dizdarevic, Emir - Miles, Anthony , 1985 (Biel MTO op)

Black to move. Click here to see the game.

Jonkman, Harmen - Espig, Lutz, 1998 (Chemnitz op)

White to move. Click here to see the game.

3. Lawnmower (Double Shotgun) mate

Two rooks or a rook and a queen push the enemy king to the margin of the board, taking rank after rank or file after file until the king is mated

King, Daniel J - Krasenkow, Michal, 1989 (GMA Baleares op)

White to move. Click here to see the game.

Tkachiev, Vladislav - Watson, William N, 1993 (London Lloyds)

White to move. Click here to see the game.

Watson, William N - Merriman, John, 1993 (London Lloyds)

Black to move. Click here to see the game.

Bologan, V. - Van Haastert, E., 2005 (21st ECC)

Black moves h5, White to move. Click here to see the game.

4. Bishop See-saw

The queen has caught the enemy king at the corner of the board, his only escape blocked and continuously harassed by a bishop that gobbles all the pieces on its color and then gives mate.

From Nimzowitsch's book My System

White to move. Click here to see the game.

King, Daniel J - Kuijf, Marinus, 1982 (Amsterdam)

White to move. Click here to see the game.

5. H-file Rook Distraction

The enemy king seems safe, as your pieces appear uncoordinated, but here comes a suicidal rook bringing the king into the open and ready to be slaughtered.

Polgar, J. - Berkes, F., 2003 (Hunguest Hotels)

White to move. Click here to see the game.

Kuemin, Simon - Cebalo, Miso, 2003 (Biel MTO)

White to move. Click here to see the game.

Kudrin, Sergey - King, Daniel J, 1988 (London NWYM)

White to move. Click here to see the game.

Sorensen, Arne - Marciano, David, 1988 (Tecklenburg op)

White to move. Click here to see the game.

Kuzmin, Gennadi P - Zhuravliov, Valerij, 1992 (St Petersburg)

White to move. Click here to see the game.

6. Knight Mate

Mates with the knights, whether in conjunction with other pieces or with other knights.

Kotronias, Vasilios - King, Daniel J, 1990 (New York WFW)

White to move. Click here to see the game.

Wheeler, G. - Povah, N., 1977 (London)

White to move. Click here to see the game.

De Musset, A. - study

White to move. Click here to see the game.

Clemenz - Eisenschmidt, 1862 (Dorpat)

White to move. Click here to see the game.

Dumpor, Atif - Kosic, Dragan, 2001 (Ajvatovica IM)

Black to move. Click here to see the game.

Kortschnoj, Viktor - Karpov, Anatoly, 1978 (World Championship 29th)

White to move. Click here to see the game.

7. Queen in on the pin

The queen comes right next to the enemy king, where the poor protecting pieces are pinned by some other piece. The opposing king is stuck between his pieces and the troublesome queen.

Tatai, Stefano - Kortschnoj, Viktor, 1978 (Beersheba)

Black to move. Click here to see the game.

King, Daniel J - Costa, Jean Luc, 1987 (Bern)

From here, Black will move Ne4, then White to move. Click here to see the game.

Fazekas - Spielmann, 1938 (Prague)

White to move. Click here to see the game.

Peredy - Malanca, 2003 (Budapest)

Black to move. Click here to see the game.

8. Back rank mate

The poor enemy king is attacked and there is nowhere to go because of his own protectors.

Wolff, Patrick G - King, Daniel J, 1989 (London WFW)

White moves Rab1, Black to move. Click here to see the game.

Rovner - Kamyshev, 1947 (Moscow)

White to move. Click here to see the game.

Capablanca - Fonaroff, 1918 (New York - casual)

White to move. Click here to see the game.

Alden - Nilsson, 1972 (Sweden)

Black to move. Click here to see the game.

Adams, Michael - Giorgadze, Giorgi, 1997 (FIDE-Wch k.o.)

White to move. Click here to see the game.

Alekhine, Alexander - Colle, Edgar, 1925 (Paris)

White to move. Click here to see the game.

Bazan, Osvaldo - Fischer, Robert James, 1960 (Mar del Plata)

Black to move. Click here to see the game.

Puzzles

Think it through, prepare your moves in your head and only then look at the games.

Cinak, Nilufer - Novak, Ksenija, 2002 (Bled ol (Women))

White to move. Click here to see the game.

Bareev, Evgeny - Akopian, Vladimir, 2000 (Dortmund SuperGM)

White to move. Click here to see the game.

Sveshnikov, Evgeny - Sherbakov, Ruslan, 991 (URS-ch58)

Black will move g6, White to move. Click here to see the game.

Hillarp-Persson, Tiger - Hansen, Sune Berg, 2005 (Sigeman Chess Tournament 2005)

White to move. Click here to see the game.

Marin, Mihail - Kiselev, Sergey, 1997 (Ciocaltea mem)

Black to move. Click here to see the game.

Yates, Frederick - Reti, Richard, 1924 (New York)

White to move. Click here to see the game.

Jussupow, Artur - Ivanchuk, Vassily, 1991 (Candidates qf3)

White to move. Click here to see the game.

Bruzon, Lazaro - Jobava, Baadur, 2005 (Capablanca Memorial Elite)

White to move. Click here to see the game.

Vidmar - Euwe, 1929 (Karlsbad)

White to move. Click here to see the game.

Rozentalis, Eduardas - Kozul, Zdenko

White to move. Click here to see the game.

Azmaiparashvili, Zurab - Shirov, Alexei, 2002 (FIDE GP)

Black to move. Click here to see the game.

I know it has been a long read, but imagine how long it took me to write it! This is not something you read once, but a post that you return to again and again to rehearse the games and maintain the feel for these interesting mates.

Also, there are some inconsistencies between the start of the game and the pictures, also the puzzles are not very clear. It should have a text that explains what you are to try to do. And there are comments in German in the PGNs, as well. I am going to address this.

and has 0 comments
I was waiting for the moment when I would be reading a new sci-fi book. Based on a suggestion from some source I have long forgotten, I chose David Brin's Existence, a futuristic hard science fiction book.

And at first it felt good. It described a cyberpunk near future, after some sobering disasters that rallied the world against nuclear war and global warming. It was dialog based, like the books of Asimov. It delved into the political, economical, technical and personal aspects of the world. It even started with the discovery of an alien artefact and started an exploration into the Fermi paradox, the philosophical conundrum that asks: "if there are many civilisation in the galaxy and they all reach the sophistication to go to space, where are they?".

But soon it started to feel all wrong. The different stories were fragmented, in some parts badly written, in some parts conflicting, some never connecting to one another, like Brin got some texts he had worked on and mashed them all into the book. Then the "chapters" all starting with a little media announcement or quote that explained bits of the world, but in a reporter editorial style that said nothing and brought nothing new to the table. And then it started with the goading: an idea was forming, the characters were reaching a realization or another, and before the reader got to see what it was, another chapter was starting.

My conclusion after finishing the book is that, while filled with interesting ideas and also having a main plot that is, indeed, ingenious, this was not a good book! I've spent the time to read the acknowledgements at the end only to find I was right: Brin did publish a lot of the stuff in the book in short stories here and there. And after finishing all that material, he speeded things up to show the "future", because he really had been disconnected from all the stories he started, reaching that annoying fast-forward effect one often finds in the works of writing amateurs. And the thing is, David Brin is not an amateur - at least he shouldn't be after all the books he has written and prizes he has won. One possible reason is that it is the first book after a hiatus of 10 years. I hate to say it, but it looks like he needed some money and this is the way he chose to do it: frame a couple short stories, a couple essays and an old Usenet into a longer novella that feels like the patched mess it actually is.

The bottom line is that I can't recommend this book. The main idea is interesting, but it can be summarized in a few words, which I won't do for fear of spoiling it for you in case you do decide to read Existence.

and has 0 comments
We live now in a world where people get the same education, see the same movies, read the same books - if at all. We then watch the ones around us and see only ourselves and we get bored. That is why, I believe, we start to see various mental illnesses or strange behaviours as interesting. That is why, I think, The Drowning Girl, by Caitlín R. Kiernan has received so wonderful reviews.

That doesn't mean the book is not brilliant. Kiernan paints the world as seen from the eyes of a lesbian paranoid schizophrenic, combining ideas from paintings, old legends and written stories into a whirlpool of staggering creativity. However, I do have to wonder, would the book have received the same amount of positive reviews if the main character was a straight man?

All that aside, I have tried to keep an open mind when reading the book and I have found that the way the author mingles stories and goes back and forth, keeping the reader on their tows, is both excellent and terribly irritating. It builds up a lot of tension that needs to be released into a grand finale. However, the climax of the book seemed to me to be somewhere in the middle, with the ending lagging and wasting into pointless mental delusions.

It is hard for me to recommend or not recommend this book. It is clearly well written and very inspired. It not only delightfully weird, but also draws information and data from all kinds of art fields and mingles them together in an interesting way. The construction of the book aside, though, leaves a plot that doesn't really mean anything. It's the maelstrom of thoughts and feelings of a mentally troubled person with a slight mystical component which, even till the end, is not really clear if it is only in her mind or has some factual truth.

I did enjoy one thing, though, the idea that something can be "true", but not "factual". If you think about it, it makes sense, but usually words like "truth" hold an objective mask on them, when most of the uses of those words are actually subjective. Yep, it's true :) I also liked the way details about the artists led to connections to other works and facts, that a thorough analysis of art can show hidden worlds and interesting perspectives.

As a conclusion, what leapt into mind when trying to find a book that is similar to this was Geek Love, by Katherine Dunn. In a word: freaky. The Drowning Girl is much more interesting, though, and doesn't try so hard to shock with the character's sexuality or personal weirdness. But in the end, having read it, I felt like it said nothing. An interesting journey towards nowhere in particular.

I've often encountered this situation: a stored procedure needs to display a list of records ordered by a dynamic parameter. In Transact SQL, the Microsoft SQL server, one cannot do this elegantly in any way. I will list them all and tell you what the problem with each is.

First of all, let's start with an example. Assume we have a table called Test with a lot of rows, which has a datetime column which has an index on it. Let's call that TheDate to avoid any SQL keywords. We want to do something like this:
SELECT TOP 10 * FROM Test ORDER BY TheDate ASC

Notice that I want to get the top 10 rows, which means I only need a small part of the total. I also order directly by TheDate. In order to release a piece of code we also need to test it for performance issues. Let's look at the execution plan:


Now, let's try to order it dynamically on a string parameter which determines the type of the sort:
SELECT TOP 10 * FROM Test ORDER BY CASE WHEN @sort='ASC' THEN TheDate END ASC, TheDate DESC

As you see, I've used CASE to determine the sort order. There is no option to give a parameter as the sort order. The execution plan is this:


Surprise! The execution plan for the second query shows it is ten times slower. What actually happens is that the entire table is sorted by the case expression in a intermediate table result, then 10 items are extracted from it.

There must be a solution, you think, and here is an ingenious one:
DECLARE @intSort INT = CASE WHEN @sort='ASC' THEN 1 ELSE -1 END
SELECT TOP 10 * FROM Test ORDER BY CAST(TheDate AS FLOAT)*@intSort ASC

I transform the datetime value into a float and then I use a mathematical expression on it, multiplying it with 1 or -1. It is the simplest expression possible under the circumstances. The execution plan is:


Bottom line, there is no exception to the rule: when you order by an expression, SQL Server does not use indexes, even if the expression is easily decompilable. Don't get mislead by the apparent functional programming style of SQL syntax. It doesn't really optimize the execution plan in that way.. Even if the column is an integer, it will not work. Ordering by TheInteger is fundamentally faster than ordering by -TheInteger.

And now the solution, ugly as it may be (imagine the select is a large one, with joins and where conditions):
IF @sort='ASC' 
BEGIN
SELECT TOP 10 * FROM Test ORDER BY TheDate ASC
END
ELSE
BEGIN
SELECT TOP 10 * FROM Test ORDER BY TheDate DESC
END

Yes, the dreaded duplication of code. But the execution plans are now equivalent: 50%/50%.

This post was inspired by real events, where the production SQL server went into overdrive trying to create and manage many temporary result tables from a stored procedure that wanted to avoid duplication using the CASE method.

Update: there is, of course, another option: creating an SQL string in the stored procedure that is dynamically modified based on the sort parameter, then the SQL executed. But I really dislike that method, for many reasons.

More information from another blogger: Conditional Order By. They also explore rank using windows functions and in one of the comments there is a reference to SQL 2008 "Grouping Sets" which I have not covered yet.

Oh, the monster of a book! If you want to learn to do genetic programming, then this is the book for you. If you need an interesting presentation of what genetic programming is, then this book is way too heavy.

Let's start with the beginning. Genetic Programming: On the Programming of Computers by Means of Natural Selection (Complex Adaptive Systems) is a scientific book written by John R. Koza to explain why, how and what to do to make your computer find solutions to problems by using natural selection algorithms to automatically create programs to solve them. This is not a new field and a lot of research has been done in it, but this book takes it almost to the level of encyclopaedic knowledge.

First, Koza submits the idea that genetic programming can be used in most problems where computers are been used. That's a bold claim, but he proceeds on demonstrating it. He takes problem classes, provides code to create the programs that solve them, shows results and statistical analysis on the results and explains what the algorithm did to create said program at specific iterations. That's a lot to take in. If you are working on a program and you are using the book, you are more likely to find it extremely useful, both as a source for information and as a reference that can always be consulted.

However, if you are a casual reader like myself, reading all that code and statistical analysis in the subway can be difficult. And it's a lot of book, too. So, after some consideration, realising that I have no current project on which to apply the knowledge within the book, I've decided to stop reading it. I got to about a quarter of it, so I can safely say that it is a very thorough and well written book. You just have to need it in a certain way.

and has 0 comments



I have to say that most of the books I start reading, I am also finishing, no matter how bad they are. I will not be finishing Guns, Germs and Steel, but not because it is a bad book, but because it is too thorough.

I know, it sounds bad for me, but this book, as with the next one I am going to review, are true science books, going through all the arguments, all the proof, anecdotes and theories before making a point. It is not an overly large book, but each passage has meaning and there is a ton of data that must be assimilated in order to be able to say I read the book. Alas, I don't feel like assimilating this much and reading it to the end, just in order to pretend I've read it would be pointless.

The book, written by Jared Diamond, is trying to explain why some regions of the world are more developed than others, why some people are oppressed, while other are the oppressors, why some people get along fine having farms and cities and a thriving economy while others are fighting to stay fed or secure. The author immediately dismisses the idea of racial superiority. Given the biological incentives to stay alive and the selection process that still goes on in less developed areas of the globe, it would be silly to consider those people genetically inferior to well fed Westerners from countries where the leading cases of death are random diseases or accidents. So the reason must be something else.

Having done a lot of living and studying in Papua New Guinea and Polynesia, he has direct knowledge of the way people live there and extensive knowledge of their history. Especially Polynesia he considers a rich bed of "natural experiments" as the many islands have spawned numerous social, political, military and food systems that eventually had to interact. He doesn't stop here, though, giving examples from all parts of the world, the native Americans, Africa, Eurasia, etc.

As far as I could ascertain reading only half of the book, the reason the world looks like it does today is because of a lucky assortment of domesticable animals and crop plants that appeared in the Fertile Crescent. The advantage of such a food surplus allowing for all kind of social and administrative developments was too great to compete with. The culture that spawned from that area quickly overwhelmed the world. In the few areas where resistance appeared, technological advances, immunity to disease that they would still spread and the general historical knowledge gained from the written word made the dominance of said culture a certainty.

For a sociologist, a historian or a palaeontologist, this book should be a must read. It explains a lot, using a lot of arguments on very well documented facts. The style is sometimes too formal, eventually repeating some questions and answering them with overwhelming detail, but none of it is superfluous. As such, it was an interesting read, but a very difficult one. Something that would have ended up eating a lot of time and yielding little lasting knowledge.

So, having faith that I got the gist of it and hoping that maybe I will watch the PBS documentary based on the book to get to the end of it, I will end by recommending it to anyone in the field, but not so much for a casual reader.

and has 0 comments
I wanted to read this book as I knew the author experimented with LSD and sensory deprivation tanks. He was the inspiration for the brilliant film Altered States, which I enjoyed immensely. The third book of John C. Lilly, The Center of the Cyclone starts as an intense book, an exploration of the deep mind using arcane and sometimes forbidden techniques. A magnificent beginning... and a horrid ending.

Let me start from the beginning. Lilly is a psychoanalyst and a neuroscientist at the same time, perfect skills to explore and understand the limits of the human mind. He first starts his experiments with dolphins, trying to understand them and communicate with them. He starts an entire institute in order to research this field, but the book is not about that, but about the period starting with LSD experiments. At the time he begins taking the drug, it was legal. Parties were held where people would share the experience and entire schools of therapy were using LSD to facilitate access to the mind.

Having previously tried experiments of sensory deprivation, a sort of shutting down of all outside stimuli in order to explore inward, he attempts to mix the two techniques: LSD and sensory deprivation tanks. Something opens up and he gains access to repressed memories, deep understanding of self and incredibly fast and precise advances in pinpointing psychological hurdles, trauma points. Till this point, I have gobbled up the book, resonating profoundly with the scientific method of exploration aided by chemical substances that eliminate the barrier between consciousness and subconscious. But then it all changes.

If you intend to read the book and make up your own mind, I suggest you stop reading the review now and start with the book. I am going to express my own opinions on what I read there.

What I think happened is that Lilly had the spiritual openness that allowed him to connect empathically with himself and others, something I believe resides in the right hemisphere of the brain. This openness is facilitated by the catholic upbringing that he is subjected to as a child. He himself, under the influence of LSD, retrieves a repressed memory inside a church where he starts seeing angels flying around. He confesses this to a nun and she, bitchy as she was, gets terribly upset and tells him that only saints can have visions, not a seven years old boy. This makes him forcefully lock the door that he had opened in himself. But now, after he has dedicated himself to science and logic, he stumbles upon this drug which unlocks the memory and so the initial skill.

This should have been a momentous occasion, something to combine perfectly the scientific mind with a strong spiritual/emotional side. Unfortunately, he was truly unprepared for it all. From a scientific book, it quickly devolves into yogi and Eastern spiritual practices, combines knowledge gained from experiment with hearsay from ancient texts, mixes hallucination with perception. He acknowledges that he started writing the book, then, after experiencing all of this spiritual avalanche, he decided only the first three chapters were worth keeping. Unfortunately, those are the first three chapters that I loved and that made sense.

It is not just my own subjective disgust for his abandonment of reason that makes me think the book follows up with personal involution, but also the way the book is structured, the writing style, the use of information at the end which had not been introduced previously... it all gets worse.

Now, he is the second scientist I've read that reports some sort of mental or at least emotional connection at a distance, the first one being Kary Mullis, who also seemed rather wacky and experimented with drugs. I really wanted to believe that, as well as many of the extraordinary things reported in the book, and wanted to explore them for myself. But now... I am not so sure. Be it the LSD or some sort of giving up to the emotional side, I see this book as a diary of going bananas and not realising it.

That doesn't mean that the book doesn't contain valuable knowledge. The fact that, single or under guidance, the man could access hidden memories and background "programs" after the first LSD experience makes the entire business of psychotherapy laughable with their lengthy discussions and careful probing. Various methods to access the trance necessary to explore your inner spaces that don't even involve chemical aid (like the looping of a word and listening to it until entering the desired trance state) I bet are perfectly functional. Also, there was one collaborator of Lilly's, Ida Rolf, that used a technique combining deep tissue massage and trance to unlock the repressed memories that affected body stance.

Many more interesting and very useful facts are hidden in the book. Alas, it is difficult if not outright impossible to separate wishful thinking from actual fact, garbage from science. Or maybe, who knows, I am so biased that I can't understand some essential truths in the book. I guess it is up to you to read the book and decide for yourself. I loved the beginning and loathed the ending.