A colleague of mine asked a question that seemed trivial, but then it revealed interesting layers of complexity: how would you build an algorithm for a random number in any integer interval assuming that you already have a function that returns a random binary bit? The distribution of the bit is perfectly random and so it should be that of your function.



My first attempt was to divide the interval in two, then choose the first or second half based on the random bit function. This worked perfectly for intervals of even length, but there were issues with odd sized intervals. Let's take the most basic version there is: we want a random number between 7 and 9. The interval has a size of 3, which is not divisible by 2.



One solution is to split it in half anyway, ignoring one number, then use the random bit function one more time to determine in which half the remaining number should be added. For example the random bit yields 1, so we add the odd number to the second half: 7,8,9 -> 7 and 8,9 . Now the random bit is 0, thus choosing the first half, which is 7. This sounds good enough, let's see how this works:



Possible random bit results:
  • 0 (7,8|9)
    • 0 (7|8)
      • 0 (=7)
      • 1 (=8)
    • 1 (=9)
  • 1 (7|8,9)
    • 0 (=7)
    • 1 (8|9)
      • 0 (=8)
      • 1 (=9)




The interesting part is coming when deciding (pun not intended) what type of probability we would consider. From the tree above, if we take the terminal leafs and count them, there are exactly 6. Each of the numbers in the interval appear exactly twice. There is a perfectly balanced probability that a number will appear in the leaf nodes. But if we decide that each random bit run divides the total probability by two, then we have a 50% chance for 0 or 1 and thus the probability that 7 would be chosen is 1/4 + 1/8 (3/8), the same for 9, but then 8 would have a 2/8 probability to be chosen, so not so perfect.



What is the correct way to compute it? As I see it, the terminal graph leaf way is the external method, the algorithm can end in just 6 possible states and an external observer would not care about the inner workings of the algorithm; the second is an internal view of the use of the "coin toss" function inside the algorithm. The methods could be reconciled by continuing the algorithm even when the function has terminated, until all the possible paths have the same length, something akin to splitting 7 in two 7 nodes, for example, so that the probability would be computed between all the 2 to the power of the maximum tree height options. If the random bit yielded 0, then 0, we still toss the coin to get 000 and 001; now there are 8 terminal nodes and they are divided in 3,2,3 nodes per numbers in the interval. But if we force this method, then we will never get a result. No power of two can be equally divided by 3.



Then I came with another algorithm. What if we could divide even an odd number in two, by multiplying it with two? So instead of solving for 7,8,9 what if we could solve it for 7,7,8,8,9,9 ? Now things become interesting because even for a small finite interval length like 3, the algorithm does not have a deterministic running length. Let's run it again:



Possible random bit results:
  • 0 (7,7,8)
    • 0 (7,7,7)
    • 1 (7,8,8)
      • 0 (7,7,8)... and so on
      • 1 (8,8,8)
  • 1 (8,9,9)
    • 0 (8,8,9)
      • 0 (8,8,8)
      • 1 (8,9,9)... and so on
    • 1 (9,9,9)




As you can see, the tree looks similar, but the algorithm never truly completes. There are always exactly two possibilities in each step that the algorithm will continue. Now, the algorithm does end most of the time, with a probability to end increasing exponentially with each step, but its maximum theoretical length is infinity. We are getting into Cantoresque sets of infinite numbers and we want to calculate what is the probability that a random infinite number would be part of one set or another. Ugh!



And even so, for the small example above, it does seem that the probability for each number is 25%, while there is another 25% chance to continue the algorithm, but if you look at the previous stage you have a 25% chance for 7 or 9, but no chance for 8 at all. If we arbitrarily stop in the middle of the algorithm, not only does it invalidate the result, but also makes no sense to compute any probability.



You can look at it another way: this new algorithm is splitting probability in three equal integer parts, then it throws the rest into the future. It is a funny way of using time and space equivalence, as we are trading interval space for time. (See the third and last algorithm in the post)



My conclusion is that the internal method of computing the probability of the result was flawed. As a black box operator of the algorithm I don't really care how it spews its output, only that it does so with an as perfect probability as possible (pun, again, not intended). That means that if I use the algorithm two times there is no way it can output equals amounts of three values. The probability can't be computed like that. If we use it a million times we would expect a rough 333333 times of each value, but still one would be off one side or another. So the two algorithms are just as good.



Also, some people might ask: how can you possible use the second algorithm for large intervals. You are not going to work with arrays of millions of items for million size intervals, are you? In fact, you only need five values for the algorithm: the limits of the interval (a and b), the amount of lower edge values (p), the amount for the higher edge (r), then the amount for any number in between (q). Example: 7778888888899999 a=7, b=9, p=3, q=8, r=5 . You split this in two and (for the coin toss of 0) you get 7778888 a=7, b=8, p=3, q=1 (don't care at this point), r=4. The next step of the algorithm you multiply by two p,q and r and you go on until a=b.



You can consider a simpler version though: there are three values in the interval so we need at least a number equal or bigger than three that is also a power of two. That means four, two coin tosses. If the coin toss is 00, the result is 7; if the coin toss is 01, the result is 8; for 10, the result is 9. What happens when you get 11? Well, you run the algorithm again.

I needed to pass an array of IDs to a stored procedure on SQL Server 2008. This version of the server supports user defined table types and a way to access it from .Net, of course. A comprehensive resource for sending arrays to any version of SQL Server can be found here.



Long story short, for 2008 you first define a user table type that has a single int column (we are talking about an array of integers here, obviously), then a stored procedure that takes a parameter of that type. A way to send the array from .Net code is detailed here. As you can see, you create an array of something called SqlMetaData, holding the information of each column as defined in the user defined type, then you use an SqlParameter of SqlDbType Structured and with the TypeName the name of the user defined table in SQL Server. The parameter will have a list of SqlDataRecord instances that have the integer values in their first columns. Yes, there is an even longer story and I consider this short :-P



All nice and easy, but there is a caveat, something that is not immediately obvious from the code. The column metadata is set as a property value for any of the records that are added to the sql parameter value list. What if the list is empty? In this case it appears that there is a bug somewhere. The stored procedure fails, I guess because it does not receive the structure of the user defined table declared in the metadata and cannot map it to the user defined type.



A solution for this is to add a dummy SqlDataRecord with no values and then, in the stored procedure, check for NULL. A very ugly solution. The solution on Erland Sommarskog's blog did not say anything about this specifically, but I did find this: There are a few peculiarities, though. This does not work:

EXEC get_product_names NULL


but results in this error message:

Operand type clash: void type is incompatible with integer_list_tbltype


It is quite logical when you think of it: NULL is a scalar value, and not a table value. But what do you think about this:

EXEC get_product_names


You may expect this to result in an error about missing parameters, but instead this runs and produces an empty result set!
. Therefore the solution I used was to check in code if the .Net list of integers was empty and, in that case, do not send a parameter to the stored procedure. And it worked.

and has 0 comments
UAC is the most annoying feature of Windows 7, one that just has to be specifically designed to annoy the user with useless "Do you want to" alerts. Not even regular alerts, but screen dimming modal panic dialogs. I want it off. There are several options to do that, but the automated way to get rid of UAC is to change a value in the registry. Here is the reg file for it:
Windows Registry Editor Version 5.00



[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]

"EnableLUA"=dword:00000000



Warning! If you don't know what a registry entry is, then you'd better not do anything stupid! Now, if I could dim the screen while you read that, I would be Microsoft material.



But I digress. In order to execute the reg file above you need to save it into a file with the .reg extension (let's say nouac.reg) and then load it with regedt32 /s nouac.reg. The /s switch removes any confirmation messages and silently loads the file into the registry effectively disabling UAC.



However, my laptop is in a domain with some ridiculous policies enforcing the UAC setting so that when I next restart the computer I get the annoying popups again. Now if I could only run nouac.reg at logoff, I would be all set. And we can do that, also. Just run gpedit.msc, go to User Configuration -> Windows Settings -> Scripts (logon/logoff) and double click logoff. Create a batch file that contains the line to load the registry file and then add it as a logoff script. All set.



Update: Hold the celebration. After I restarted my computer, the hated UAC was back. Either the script was not executed, or it doesn't work like that because the policy is enforced after logoff scripts or before logon. Drat it!

Ok, I am cheating now. I was feeling bad for not playing chess lately (or playing badly when I had other stuff to do, generating even more guilt) and having nothing to blog about except maybe books and also thinking about all the other directions of the blog that I failed to cover: programming, music, tech news.

So I bring you Brute force or intelligence? The slow rise of computer chess, which is an article about chess, it is from Ars Technica (tech news) and it involves some notions of programming. All I need for this to be complete is music!

Seriously now, I went to a friend's last night and played a bit of chess. We were both a little tired and drunk, so we played chess "for fun" (which translates to incredibly bad), but it really felt fun as opposed to playing a computer at a very low level. Why is that? I believe it is all about prioritization.

When a human plays, he is trying to use the principles of chess, but he doesn't have the time or mental resources to take each one and analyse each piece or position. Humans do use subconscious mechanisms to quickly scan a table, but that only comes with a lot of chess training. So basically, what a beginner human player is left with is finding a strategy that would quickly and (preferably) forcibly win the game. That means that we use something akin with the "Type B" algorithm from the article above. But it's not quite it, because it is a bit of everything, something that is traditionally hard to implement in a computer program (and that has more to do with the psychology of programming engineers than with a specific level of difficulty). Basically we look at the pieces, prioritised by their power and reach as well as their position relative to an area of attack or defence. That is why we don't see the queen or bishop in the corner of the table, because, looking in ever wider circles around the area we are focused on, we suddenly stop and start doing something else. Compare that with a computer which can take the measly 32 pieces on the board and computer in a few fractions of a second all their possible moves and the resulting board position.

Then, when we see a possible good move, we take it forward as many steps as we can. Does a chess beginner do a comprehensive tree of all possible moves in that scenario? Of course not. Not only we do not see all (or most) of the moves, but when we see a possibility for the opponent to play a counter move, we quickly analyse the likelihood that the other guy would see it and sometimes we even gamble that they won't do it, just because we wish they didn't. This is also psychological: the gambler way of thinking has been documented for a while, they are motivated by loss which gives them more of an adrenaline rush than winning or that makes winning ever sweeter; also the guy we play with is probably our friend and we partly root for the guy as well. Program that into a computer! I've had games where I took huge risks on the hope that my friend would a) not see the move, which would make me look good when playing a cool game and b) that he would see the move, making his game look cool, thus making the entire session interesting.

Back to programming, I think that the easiest way of implementing this kind of bad human play in a computer game is to take a normal computer algorithm for playing chess, like mini-max, then program a sort of Alzheimer routine, that would remove bits of its reasoning based on a probability computed from the following factors: proximity of pieces to a region of interest (which would also have to be defined, but let's just assume it would be the average of positions of the pieces involved in the current line of thought), the artistic value of a line of thought (which would be defined either by massive sacrifices for important gains, or by how severely we limit the opponent options - in other words: power), the probability that the opponent would see a move (computed based on current history of play) and also by the artistic value of the entire game, as described in the last paragraph.

In other words, what I am proposing here is that we have a perfect algorithm for playing chess, one that is limited by computing power alone. What we don't have is a good algorithm for bad play, for fun play. Most computer programs I've seen, including ChessMaster, which boasts with its ability to simulate human players of varying abilities, have incredibly stupid ways of limiting performance. For example: a knight wants to attack f7, the black soft spot; it has plans to move a bishop there as well. I move a pawn to prevent the bishop from attacking that spot and the computer takes with the knight, sacrificing a minor piece for a pawn and my king's ability to castle. Or a rook attacks a knight. It then takes the knight, even if defended. In other words, random, pointless moves. Every human move is purposeful, even if the purpose if flawed by bad judgement. Random moves won't do, they have to be moves that follow a plan, no matter how bad that plan is. We need a perfect algorithm for throttling the playing chess level. We need to look at human bad games, make their own chess database, extract rules for bad play and implement this into computers.

and has 0 comments
Kary Mullis is a chemist who, in 1983, invented Polimerase Chain Reaction, something that would revolutionize DNA analysis in terms of increased speed. He won the 1993 Nobel prize for that. He also is a controversial scientist who claims possible alien encounters and telepathy, denies global warming as an effect of human intervention, is skeptic about HIV causing AIDS and generally believes that most scientists are inventing reasons to get funded rather than doing anything scientific. He also admits smoking pot, taking LSD and generally experimenting with any mind altering chemical that he can make. He likes women and some of them like him. That is what this book is all about, a sort of "I am Kary Mullis, hear me roar!".

I started reading the book because I was falsely led to believe that he describes how training his mind with LSD lead him to the idea of PCR. The book is not about that at all, and if the article above is true about Mullis had an advantage over his colleagues: he had trained his brain to think differently by using hallucinogenic drugs, there is no mention of that in this book.

It is simply an autobiography, but written with gusto and sincerity. Some of the things he says are both logical and hard to accept (because so many others are of opposite views), some of them are simply personal beliefs. As many a talented person, he is intelligent, he had early opportunity to practice his passion (chemistry), a close friend to share it with and support from a local chemistry business owner who kind of adopted him for the summers and gave him the tools he needed to grow. The way he writes his book reminds me of the style of another scientist friend of mine: devoid of bullshit and intolerant of stupidity.

Bottom line, it is a nice book, simply written, short, I've read it in a few hours. It is a window in the life of an interesting person, and as such, I liked it. I can't say I've learned much from it, though, and that is somewhat of a disappointment coming from a book written by a man of science.

and has 1 comment
The Art of Learning is a wonderful book, both concise and useful, with tremendous sources for inspiration at every level. It also has more meaning to me, as it started with an investigation in the life of Josh Waitzkin, prompted by my renewed attention to chess.
To start from the beginning, I've first heard of Josh Waitzkin when I've started going through the "academy" section of ChessMaster XI. The first chapter in this section was Josh Waitzkin's academy, which taught with examples of both life and game. I was intrigued, so I looked the guy up. This way I found references to Searching for Bobby Fischer, a Hollywood movie about the early life of chess prodigy Josh Waitzkin, based on a book by his father. I watched the film, with both positive and negative feelings, but at the most I was even more intrigued. I then found out about the two books that Josh wrote: Attacking Chess and The Art of Learning and started reading the latter, since I had to read it on my old Palm in the subway and I am not yet at the level in which I can mentally visualize chess notation.
The Art of Learning is everything I wanted in a book about learning: the personal introspective view, the theory of learning and its mechanics, clear examples and methods of achieving the same results. Frankly told, I doubt many people can learn at the same speed as Josh Waitzkin can - clearly the guy is a genius - but there are insights in this book that blew me away.
The book is structured in three parts:
  • The Foundation - describing the early experience of learning, the downfalls, the insights, the situations in which Josh found himself as a child discovering the game of chess and then becoming National chess champion.
  • My Second Art - the part where he finds less peace in chess and decides to abandon it in favor of the martial art of Tai Chi Chuan, which centers him and presents new opportunities for learning. Here similar principles are found to the ones related to chess.
  • Bringing it All Together - where Waitzkin describes methods for identifying your own method of learning and reaching the state of mind most conducive to high performance

It all ends with a climactic Taiwan International martial arts championships that Josh wins, overcoming adversity and malevolent judges, a story that rivals any of Van Damme's movies, but also shows where the inspiration for those came from.

There are some ideas that I could understand immediately, seem obvious, but I've never thought of before:
One of them is that the unconscious mind acts like a high speed parallel processor, while the conscious mind is a serial decisional engine. An expert in a field does not think faster than a beginner; he only placed many of the underlying principles in the subconscious, running them at high speed, and leaving the conscious mind decide, like a manager, from the granular information that is precomputed and available. That makes sense at the smallest biological level. Think of the frog eye that sends a yes/no signal through the optical nerve when a fly enters the field of view - the frog does not have to decide if what it sees is a fly or not. But it also explains quite clearly the effect of training, something that I, to my shame, had not understood until now. Training is not simply learning, it is also moving the information downwards, "internalizing" it, as Waitzkin calls it. GrandMasters do not think about the possibilities on the chess board from the bottom up, they already see structure and work directly with the aggregated, higher level information. Martial arts experts don't count the steps in a complicated move, they just make them. Normal people do not put a foot in front of the other, they walk, they don't string words up, they speak.
Another idea is that the process of learning, done in small increments, allows the direct internalization of concepts before we use them in combinations. First move a few pieces until you know how they work, don't start with complicated chess games. Reduce the scope of your training and the internalization will come a lot faster. Then, in a complex game, you just use the things you have learned previously. When training to fight, train each small move before you start combining them.
This is an important idea in The Art of Learning: the difference between what Waitzkin calls entity-learning and process-learning. Entity learners will try to find the quick way out, find the small trick that get the problem done; they will care only about the end result, collapsing under the fear of losing. The process learner would enjoy the challenge, see each problem as something that can be solved if attacked metodically and chipped away at bit by bit. They will value the process of learning over the end result. An entity learner will try to learn as much as possible, in the end reaching mediocre levels of understanding in all fields, while a process learner will take each process as far as possible before engaging another. Process learners would say "I didn't learn enough" when losing, while entity learners would say "I wasn't good enough".
I am sorry to say that I apparently fall towards the entity-learner category. It is obvious that must change and I hope it can. What I gathered from this concept is that entity learners identify themselves with the solution of a problem. Losing makes them losers, winning makes them winners. Process learners identify themselves with the process of learning, making them bad or good learners. A very good point Josh makes is that the type of learning is usually caused by the way parents reacted to the early success of their children and also that it can be changed, it is not set in stone like just another cemmented childhood psychological baggage.
An interesting thing about the book is that it also provides some mechanisms to improve, to reach that "zone" of serenity and presence in the moment. Borrowing from Taoist concepts, Josh Waitzkin advocates leaving in the moment, being present, aware, and he provides methods to train to reach that present state at will. I find that very interesting.

In the end I would call this one of the most useful books I've read and I certainly intend to improve on myself using some of the guiding principles in it. Josh is an extremely competitive and intelligent person and, given the opportunity of having good and talented parents, made the best of it. I am not saying that all can reach the same level of success and internal balance, but it is surely refreshing to see one of these great people lowering themselves to the level of the normal guy and giving him a few pointers. That is exactly what The Art of Learning is.

I guess it is finally official: I am now a corporate employee. While the previous company I worked with was nice in terms of the people there and the technology used, I got bored. I blame myself for getting depressed when assigned disconnected UI tasks and when singled out socially. It shouldn't have mattered. Surely I could have worked on overcoming adversity and improving my development methods, no matter how boring the task at hand.

However, bored I did get and when a big corporate company approached me with a job offer, I was intrigued. This is a long story, though, because I passed their phone screening, their 6 hour long technical interview and got the approval of the top brass yet in another interview, all some time at the end of March. This coincided with my birthday so I thought it was like a present to myself: an opportunity to learn new things, work in an environment I was scared of, but which was different and exciting, not the mention better payroll, although that didn't matter that much.

So, why am I writing this blog entry now, at the end of July? Because I only got hired two days ago. Budgetary strategy, corporate decisional speed and pure bad luck (I hope) pushed the employment date for four stressful and uncertain months. And I am not even fully employed, I am a contractor with an intermediary for the time being.

I can't tell you yet how things truly are in the new company. People are certainly more professional and yet relaxed, not at all like the stick-in-the-ass image I had (well, most of them). Frankly, these people are more geek and less social monkey than some of the juniors at my last job, which is great. On the other hand, until I start actual work (which will take another two weeks of gruelling meetings and annoying bureaucracy) I will not know how (and if) this company gets anything done.

Certainly, a quad-core laptop with 8Gb of RAM and SSD harddrive will decrease developing time (I used to watch movies and read books while compiling projects at the old job). They also seem very communicative (to the point of never stopping from talking about a project), which is something I am less used to and I welcome gladly. They encourage and help with personal development and good development techniques, like TDD and a commitment to Scrum. And if you don't know something, people are not sneering, but offering to help. So far, I can't complain (and you know me, I am so good at it).

I will be working on an ASP.Net CRM project, something evolving from an older VB ASP.Net 1.0 thing to a C# ASP.Net MVC monster. Hopefully, this will reignite my passion for development, rather than reassert my disgust with web work. So you will see Javascript and ASP.Net posts again soon and not so much WPF. Too bad, I really liked that particular technology.

So, wish me luck!

I was working on the chess board support on my blog, involving a third party javascript script. The idea was that, if any element on the page is of class pgn, then the parser should try to read the contents and transform it into a chess board.

Traditionally, what you would do is:
  1. load the external scripts
  2. load the external css files
  3. run a small initialization script that finds all the pgn elements and applies the transformation on them
. Now, imagine that I am doing several processes like this. On some blog posts I will talk about chess, but on other I would display some chart or have extra functionality. Wouldn't it be nice if I could only load the external scripts when I actually need them?

In order to do that, I must reverse the order of the steps. If I find pgn elements, I load external scripts. When loaded, I execute the initialization script. Long story short, here is a javascript function to load an external script (or several) and then execute a function when they are loaded:

function loadScript(src,onload) {
if (src&&typeof(src)!='string'&&src.length) {
//in case the first parameter is a list of items
var loadedScripts=0;
// execute the load function only if all the scripts have finished loading
var increment=onload
?function() {
loadedScripts++;
if (loadedScripts==src.length) {
onload(null);
}
}
:null;
for (var i=0; i<src.length; i++) {
loadScript(src[i],increment);
}
return;
}
var script=document.createElement('script');
script.type='text/javascript';
// HTML5 only, but it could work
script.async=true;
script.src=src;
if (onload) {
if (typeof(script.onload)=='undefined'&&typeof(script.readyState)!='undefined') {
//IE
script.onreadystatechange=function() {
if(script.readyState=='complete'||script.readyState=='loaded') {
onload(script);
}
};
} else {
//not IE
script.onload=function() {
onload(script);
};
}
}
document.body.appendChild(script);
}


I hope it helps.

and has 0 comments
Ok, I am mostly testing the javascript for the chess games, but this was also an interesting game for me. I am playing black and my trusty cellphone (running ChessGenius on an antiquated Nokia) is white. White starts with the Four Knights Spanish variation (bringing his light bishop to b5) and I am trying to do a Halloween gambit style move by sacrificing a knight for a center pawn in order to gain a positional advantage. Here is goes:
[Event "OpenChess"]
[Site ""]
[Date "2011.07.22"]
[Round ""]
[White "Computer"]
[Black "Player"]
[TimeControl "-"]
[Result "0-1"]
[ECO " "]


{Annotations by Chessmaster: Grandmaster Edition Auto-Annotator. 30 seconds per move.

White Black
Book Move 4 3
Leave
Book 0 1
CMX Agrees 19 21
CMX Disagrees 6 5
Agreement Pct. 76% 81%
Total Error 13.58 13.24
Relevant
Error 13.58 13.24
Missed Mate 0 0
Moved Into Mate 2 0

}
1.e4
{B00 King's Pawn Opening. The King's Pawn opening move is both popular and logical. It controls the center, opens lines
for both the Queen and the Bishop, and usually leads to an open game in which tactics, rather than slow maneuvering,
predominates.}
1...e5
{C20 King's Pawn Game. Black responds symmetrically, making a direct challenge to the central squares.}
2.Nf3
{C40 King's Knight Opening. With the possible exception of :2. f4, this is the most logical second move against Black's
symmetrical answer to the King's Pawn. The Knight attacks e5, clears the way for an eventual castle and rests on its best
defensive square.}
2...Nc6
{C44 Queen's Knight Variation. Now, when White plays 3.Nc3 (instead of the Ruy Lopez), it's the Three Knight's Game; a
leisurely system.}
3.Nc3
{C46 Three Knights Opening.}
3...Nf6
{C46 Four Knights Opening. With Black's final Knight development, the Four Knights Game results: Several imitations of
moves until Black must diverge and be content with a sound, but uninteresting game.}
4.Bb5
{C48 Four Knights Opening / Spanish Variation.}
4...Nxe4
{Out of Opening Book. Bb4 would have been in the Four Knights Opening / Double Spanish Variation 4.Bb5 Bb4 opening
line. Leads to 5.Nxe4 f5 6.Ng3 e4 7.Ng1 a6 8.Ba4 g6 9.N1e2 b5 10.Bb3 Bd6, which wins a pawn for a knight. Better is Bc5, leading
to 5.O-O a6 6.Bxc6 dxc6 7.Nxe5 O-O 8.d3 Bd4 9.Bf4 Be6, which wins a bishop for a knight and a
pawn.
}
5.Nxe4
{Blocks Black's pawn at e5.}
5...d5
{Attacks White's knight at e4.}
6.Bxc6+
{Partially pins Black's pawn at b7, removes the threat on White's knight at e4, forks Black's king and Black's pawn at
e5, and blocks Black's pawn at c7.}
6...bxc6
{Removes the threat on Black's king and attacks White's knight at e4. White wins two knights for a bishop and a pawn.}

7.Nc3
{Moves it to safety.}
7...d4
{Threatens White's knight at c3.}
8.Ne2
{Moves it to safety.}
8...c5 9.d3 Bb7 10.Ng3 g6
{Slightly better is Bd6.}
11.O-O Bd6
{Protects Black's pawn at e5 and makes way for a castle to the kingside.}
12.Re1 Qe7
{Slightly better is f6.}
13.Ne4
{Slightly better is Nxe5.}
13...f5
{Leads to 14.Bg5 Qf7 15.Nxc5 Bxf3 16.Qxf3 O-O 17.Qc6 Rab8 18.Nd7 Rxb2 19.Nxf8 Qxf8 20.a4, which wins two knights and a
pawn for a rook, a bishop, and a pawn. Better is f6, leading to 14.Bh6 O-O-O 15.c4 Kb8 16.Nfd2 Ka8 17.Nb3 Rb8 18.Qe2 g5, which
results in no exchange of material.}
14.Bg5
{Attacks Black's queen and blocks Black's pawn at g6.}
14...Qe6
{Moves it to safety.}
15.Nf6+
{Leads to 15...Kf7 16.Bh4 h6 17.b4 Rab8 18.a4 Bxf3 19.Qxf3 Be7 20.Ng4 Bxh4 21.Nxe5+ Kg7 22.bxc5, which wins a bishop
and two pawns for a bishop and a knight. Better is Nxc5, leading to 15...Qd5 16.Nxb7 Qxb7 17.Nxe5 O-O 18.Qf3 Qxf3 19.Nxf3 Rfb8
20.Rab1 c5 21.Re6 Rb6, which wins a queen, a bishop, and two pawns for a queen and a knight.}
15...Kf7
{Moves it out of check.}
16.a3 h6
{Threatens White's bishop.}
17.Bh4
{Moves it to safety.}
17...g5
{Forks White's knight at f6 and White's bishop.}
18.Nxg5+
{Leads to 18...hxg5 19.Bxg5 Be7 20.f4 Bxf6 21.Bxf6 Qxf6 22.Rxe5 Bxg2 23.Rxc5 Bc6 24.Qe2 Rag8+ 25.Kf1, which wins a
bishop and four pawns for a bishop, two knights, and a pawn. Better is Nh5, leading to 18...gxh4 19.Nxh4 Rag8 20.Ng3 f4 21.Qh5+
Kf8 22.Ne4 Qf7 23.Qf5 Be7 24.Qh3, which wins a pawn for a bishop.}
18...hxg5
{Removes the threat on Black's king and Black's queen and double-attacks White's bishop.}
19.Bxg5
{Protects White's knight and creates a passed pawn on h2. Black wins a knight for two pawns.}
19...Be7
{Pins White's knight with a partial pin.}
20.f4
{Partially pins Black's pawn at e5 and frees White's knight from the pin.}
20...Bxf6 21.Bxf6
{Attacks Black's rook at h8.}
21...Qxf6
{Disengages the pin on Black's pawn at e5 and removes the threat on Black's rook at h8.}
22.Rxe5
{Uh-oh! Leads to 22...Rag8 23.Qd2 Rxg2+ 24.Qxg2 Bxg2 25.Rae1 Bf3 26.Re7+ Qxe7 27.Rxe7+ Kxe7 28.a4 Bd1 29.c3 Bxa4
30.Kg2, which wins a queen, a rook, and a pawn for a queen, two rooks, and two pawns. Much better is c3, leading to 22...Bxg2
23.Qb3+ Kg7 24.Qc2 Bb7 25.cxd4 Qc6 26.d5 Qxd5, which wins a pawn for two pawns.}
22...Qg6
{Yikes! Leads to 23.Qe2 Rae8 24.g3 Qh7 25.Re1 Rxe5 26.fxe5 Ke6 27.c4 Qh5 28.Qxh5 Rxh5, which wins a queen and a rook
for a queen and a rook. Much better is Rag8, leading to 23.Qd2 Rxg2+ 24.Qxg2 Bxg2 25.Rae1 Bf3 26.Re7+ Qxe7 27.Rxe7+ Kxe7 28.a4
Bd1 29.c3 Bxa4 30.Kg2, which wins a queen, two rooks, and two pawns for a queen and a rook. Black had a won game before this
error, but it was not costly; black was able to eventually
mate.
}
23.g3
{White moves into a forced mate. Much better is Qe2. g3 leads to 23...Rxh2 24.Qe1 Rh1+ 25.Kf2 Qxg3+ 26.Ke2 Bf3+ 27.Kd2
Qxf4+ 28.Qe3 dxe3+ 29.Rxe3 Rh2+ 30.Kc1 Qxe3+ 31.Kb1 Qe2 32.Ka2 Bd5+ 33.b3 Qxc2# and checkmate. This was white's most crucial
mistake. Black didn't carry the mate through just yet, but was later able to
mate.
}
23...Rxh2
{Black has a mate in 10. Attacks White's pawn at g3. Leads to 24.Qe1 Rh1+ 25.Kf2 Qxg3+ 26.Ke2 Bf3+ 27.Kd2 Qxf4+
28.Qe3 dxe3+ 29.Rxe3 Rh2+ 30.Kc1 Qxe3+ 31.Kb1 Qe2 32.Ka2 Bd5+ 33.b3 Qxc2# and checkmate.}
24.Re7+
{Pins Black's pawn at c7, protects White's pawn at g3, and forks Black's king and Black's pawn at c7.}
24...Kxe7
{Black has a mate in 7. Frees Black's pawn at c7 from the pin, protects Black's pawn at c7, and threatens White's
pawn at g3. Leads to 25.Qe1+ Kf7 26.Kf1 Rh1+ 27.Ke2 Re8+ 28.Kd2 Rh2+ 29.Qf2 Rxf2+ 30.Kd1 Bf3+ 31.Kc1 Re1# and checkmate.}
25.Qe1+
{Removes the threat on White's pawn at g3 and checks Black's king.}
25...Kf7
{Black has a mate in 6. Moves it out of check and threatens White's pawn at c2. Leads to 26.Kf1 Rh1+ 27.Ke2 Re8+
28.Kd2 Rh2+ 29.Kd1 Qg4+ 30.Qe2 Qxe2+ 31.Kc1 Qxc2# and checkmate.}
26.Rc1
{White moves into a forced mate. Much better is Qe7+. Rc1 leads to 26...Rh1+ 27.Kf2 Qxg3+ 28.Kxg3 Rg8+ 29.Kf2 Rg2# and
checkmate.}
26...Rh1+
{Black has a mate in 3. Moves it to safety, skewers White's king, and checks White's king. Leads to 27.Kf2 Qxg3+
28.Kxg3 Rg8+ 29.Kf2 Rg2# and checkmate.}
27.Kf2
{Forced. Moves it out of check.}
27...Qxg3+
{Black has a mate in 2. Forks White's king and White's pawn at f4 and isolates White's pawn at f4. Leads to 28.Kxg3
Rg8+ 29.Kf2 Rg2# and checkmate.}
28.Kxg3
{Removes the threat on White's pawn at f4. White wins a queen for a pawn.}
28...Rg8+
{Black is one move from mate. Checks White's king. Leads to 29.Kf2 Rg2# and checkmate.}
29.Kf2
{Forced. Moves it out of check.}
29...Rg2#
{Checkmates White's king.
}
0-1


Unfortunately, the script I am using doesn't have support for adnotations. I've analysed this game with ChessMaster XI and it added some interesting comments. I will try to add the relevant ones to the post. Silly me, it does have support for adnotations, but can't read the PGN correctly. After a few fixes to the code, I present you the game.

You can see here that neither of the players are particularly good (Uhh!). The Halloween Gambit is usually employed by white in the Four Knights opening and it is one that I like simply because it looks cool:
1. e4 e5 2. Nf3 Nc6 3. Nc3 Nf6 4. Nxe5 *
If black doesn't know about it, it will be a shock - What the hell is he doing? - and at least psychologically it is a very good tool. Of course, exchanging a knight for a pawn is not the smartest of moves unless you have good reason. In this case, white gambles material for immediate attack opportunities.

and has 0 comments
I've read this article in Ars Technica and at each step was horrified by what has happened. This is one of those stories that need to be made a movie, with names and everything. But first, read it for yourselves: A pound of flesh: how Cisco's "unmitigated gall" derailed one man's life.

I've had the misfortune of working with Cisco devices a long time ago. Devices that you had to have bought from them in order to have rights of service or update downloads, with multiple versions of operating systems that would give you some of the complete features, but never all of them at the same time and with documentation that wasn't available unless you would have passed a periodical exam with them. It seems they have the same contempt for people in courts that they have in technical matters.

The main question here, though, is if a judge has ruled that all this was a perversion of justice, what will happen to Cisco? Where is the lawsuit against them? Where it the corporate responsibility in the US? And frankly (and amazingly) it frightens me to see that in the U.S. the hypocrisy that I am usually accusing Americans of is giving way to sheer acceptance of a terrible status-quo, in which free speech, protection of law and all of those wonderful words mean nothing when faced with a more powerful adversary.

When I was a kid, my grandfather taught me to play chess. I did play with him, with my father, with an aunt, with the game Chessmaster on my 386 computer. I was feeling very good at it at the time, even if no one was really teaching me the theory behind the game. Then I suddenly stopped, mainly for lack of people to play with.

But now I have found a new friend with a passion for chess and he reignited my original curiosity about this game. I've started to learn about the different openings, the theory behind them, the principles of chess and the way a person must prepare for really playing the game, end games and famous players and games. I still suck at chess, but at least I am better than most of my acquaintances and I think this is a little more than my usual one minute flames. I really am enjoying the academic side of the game and I believe the discipline required to truly play chess will transpire into other facets of my life, especially programming.

So, my plan is to learn more and share with you my findings. I am creating a new tag, chess, which will mark the entries discussing the game. I still have to learn how to embed chess tables in the entries and to learn enough to feel comfortable sharing my ideas with other people, so bear with me. If you are interested in the subject, please leave me a comment with your view on it.

So far I have looked for chess videos to teach me things. I find them most instructive while I am not yet used to reading a game as text and imagining it in my head (I doubt I ever will). Also a great resource is the game Chessmaster XI, the last version of the game I was playing against as a child. It features three academies, teaching the basics of the game as well as a natural language mentor that can analyse and explain some of the features of a game. Josh Waitzkin, the international Grand Master and the subject of Searching for Bobby Fischer, a fascinating man, is the guy that explains things in the first and most complete academy module. His book, The Art of Learning, seems really interesting and I will review it soon.

As chess resources go I've found these wonderful sites:
  • The Chess Website, the site of Kevin Butler, who is a very nice guy.
  • Chess Videos TV, where you may find great information in video format, but you must sift through the ones that have either bad audio quality or the presenter is too heavily accented.
  • JRobi Chess, where you can find an actual study plan, three daily chess puzzles and an embedded chess game in Java.
  • Chess.com is a site with reasonable resources, but it's strong point is the huge chess community and interesting forums. People from all over the world compete against each other and discuss the game
.

There are others, but less important. Bottom line: I am starting to blog about chess, too. I will leave you with a chess story that I really liked. It is about Bobby Fischer, the only American world champion at chess, with a very interesting and dramatic personal story. This one is about a chess opening called The King's Gambit. In 1961, Fischer writes an angry essay against this opening, called A Bust to the King's Gambit, allegedly annoyed by Boris Spassky who defeated him while using this opening. He publishes this article in the American Chess Quarterly, edited by one Larry Evans, also an international chess master. In 1963, Bobby Fischer is playing against Larry Evans, in the U.S. Chess Championship. He starts with the King's Gambit and wins. The moral of the story here, for me, was that chess is something that explodes off the board and into the real life. Competitive chess players mold their game strategy before they start the game, by preparing against the opponent as warriors would do before a battle, by analysing the flaws in previous games, in character, in personal history. In just three moves, Fischer told Evans "I am starting with an inferior opening. That is just how much I think of you!", striking a subtle blow even before starting to play.

Watch the analysis of the game as well, by Kevin Butler. Enjoy!

and has 0 comments
It's time for the list of TV series that are wasting my precious time. I only do this so you don't have to. I know, I know, you are so grateful, but that's me: a beacon of hope, goodness and humility.

Let me start with the shows that I've already talked about before:
  • Doctor Who has entered a darker era, with the arrival of The Silence, a race that has you forget about them the moment you don't see them anymore and that have lived on the Earth since forever and of The Flesh, a programmable biological material that can take any shape. Initially used as a way to build cheap avatars, it will become much more when infused with the memories and personalities of its users.
  • Torchwood has started again, season 4 now. The show was the more cliché of the Doctor Who spin-offs so it was bought by the American TV channel Starz. It now features big U.S. actors like Bill Pulman, Mekhi Phifer and Lauren Ambrose. It is still weird enough to enjoy, but the first two episodes were not very bright.
  • The Sarah Jane Adventures. It started for a while, time in which I noticed that the main character, played by Elisabeth Sladen, was a bit off, she was starting to look her age and a bit tired or confused. Later on I've learnt of her death to cancer. She was not in her fifties, I had guessed, but 65 years old. I do not know what the fate of the series is.
  • Eureka just started again, the second half of the fourth season. I haven't had the chance to watch any of the episodes, but it can't have changed much.
  • House MD got even stranger and harder to watch than before, but at least that annoying self righteous bitch was replaced by Thirteen again. As for the script, medically all characters are brain dead.
  • Criminal Minds has ended its sixth season and we're waiting for the seventh. It lost some of its oomf, but at least it still has potential. Suspect Behaviour, the spin-off, was rightfully cancelled.
  • Dexter hasn't started yet, but the hints and teasers are promising. Dex would return to his murderous roots and leave behind all that suburban emotional dad crap. Or will he?
  • Big Love has ended with its fifth season. While I did enjoy the first four, I still could not force myself to watch the fifth season, not one episode of it. I believe I will leave it to braver men than I to comment on its ending.
  • Fringe is undying. A lot of experimentation (pun not intended) with the show, including a partially animated episode. Still watchable at the end of a tiring day, but nothing else worth mentioning.
  • True Blood's fourth season has started in force, with panther people, witches, shapeshifters, an amnesic Eric, a Bill that is king of Louisiana and a Tara that is bisexual. It has lost a major part of its charm though and I am only watching it to see what else they invent.
  • Still waiting for Californication's sixth season. While it too lost a big chunk of its initial charm, it is still interesting in a lot of ways.
  • V was cancelled by ABC and fans are petitioning Warner Bros to continue it. I feel it was a failure and it needs no renewal. If you consider that it is I who is suggesting cancelling a sci-fi show, then you should know that there are serious reasons for it.
  • Men of a Certain Age second half of the second season has started and it's still great. Who would have thought that a lot of the police, fantasy and science fiction series would become family dramas while a show that has started as a drama would be interesting and educational, as well as fun?
  • Weeds' seventh season has started rather well. Hot Nancy is pardoned from jail because someone has killed Esteban and the state wants nothing to do with her, while her family returns from Denmark when they find out she is out. Transactions with grenades for Afghan kush and the usual craziness come next, but I think they dialed down a notch all the stupidity and the onslaught of pointless American culture. Just a notch.
  • The Good Wife is still a nice show, combining personal issues with court cases in a pleasant and intelligent way.
  • The Walking Dead has not had its second season start yet. I have high hopes, despite the rather boring first season.
  • Haven's second season has just started. I haven't seen any of it, though, which talks about my elevated interest about the show. It's a more localized and less sciency Fringe, so it falls into the same tired brain category.
  • Royal Pains has ended its second season and just started the third. I have no idea what is going on with it as I stopped watching it and not even the wife seems to want to.
  • Lost Girl, a sort of Canadian Sookie with more violent tendencies, has not started its second season yet.
  • Nikita latest season has not started either.
  • A Game of Thrones. Oh, this needed a section of its own. Short story: the first book of the series was turned into a 10 episode season. Why only ten? Make them at least 13, as it is customary. With only ten episodes a lot of the book was left out and when I say this, I don't mean the facts, but the interaction and relationships between characters. I know, you are thinking: Who is this guy? Where is Siderite? If he talks more about the relationships of characters in TV series I'm gonna switch blogs! The only comparison I can give that would give justice to the important part of the book that is missing from the series is Dune. There was a Lynch version of Dune, which had almost nothing to do with the book and there was a mini series version that followed the book line by line. I liked the Lynch version better. The feeling that you get reading the book you can't get from this series, which is, otherwise, very nice and well done.
  • Better With You was cancelled, thank you!
  • Falling Skies. I would call it a response to The Walking Dead. Earth has been attacked by aliens, defeated utterly, and the last remnants of humanity are fighting a resistance war. But practically there are a bunch of guys with a lot of attitude, trying to survive while being attacked by zombies aliens. I like it, but it is presenting the same idealistic people that fight "the good fight" while having ample opportunities to demonstrate how that is better than being evil and stupid. No real character development, no complex situations, only the good, the bad, and the stupid in between. Get it together, people!
  • Endgame was boring, stupid and had nothing to do with chess at all. It felt more like that ridiculous show about a guy that gets tomorrow's paper every day and then tries to change the headlines. I refuse to watch it when I have real chess videos around.
  • Southpark is going to a rough patch I think. The last episode ended in a very ambiguous way, with Stan's parents deciding to leave Southpark and Stan itself feeling distanced from his friends by the debilitating disease "being a cynical asshole". I still don't know what is going on.
  • Season four of Breaking Bad just started. Haven't started watching it, yet.


Still here? Hellllooo... lloooo... looooo... looooo? Time for the new TV shows:
  • King - Canadian show about a gloriously sexy woman that... solves police cases. She is actually a cop. Her name is King. The action was mellow enough, the episodes plot boring, even a tall red-head with beautiful legs could not make me watch it. It is the average cop TV show with a lead character, only slightly shifted towards women.
  • The Killing has received great reviews, but unfortunately I could not find the time to watch it.
  • Mortal Kombat Legacy. Remember about a year ago there was a trailer for a new Mortal Kombat movie, when Sub Zero was used by a cop to find Scorpion? It all looked realistic and reinvented and modern. That didn't go well. Instead they changed the theme a little and brought it as a web series. Is there any word that sounds more stupid than webisode? Well, they used those to present the characters. Some were good, some were bad, but overall I think it deserves a shot. Nothing fancy, mind you.
  • The Nine Lives of Chloe King and Teen Wolf are two idiotically tweeny series that try to capitalize on Twilight and the such. I've watched the pilot episodes groaning at each good looking gelled hair idiot teen that turns into a cat/wolf while bad people are after them. Vomit inducing.
  • Alphas is the new X-men series. Different powers, less cool, different professor, no X-es in his name, different bad guys. The pilot was not especially bad, considering you have Mutant-X as a reference, but nothing special either.
  • Switched at Birth had an intriguing synopsis: two baby girls are mixed up at birth and they find out about it only 16 years later. The interaction between the two families should have presented an interesting experiment of nature vs. nurture. The pilot was not bad, but it was too family oriented for me to enjoy. Also, I think I am becoming slightly allergic to bouts of teenage angst. I understand most teenagers are dumb and selfserving, but they are not all clichés!
  • Suits is the male equivalent of courtroom series. If The Good Wife is trying to attract more female audience by using a woman as the lead and presenting her in the midst of family issues, Suits shows cool bachelors finding all kinds of technical solutions to problems. I mean the boys are studs, one of them is a rookie that can remember anything he reads or sees, while the other is a cocky flashy lawyer that takes the noob under his wing. There are even technical discussions about race cars! It is not without flaw, but it produces an easy going feeling that I enjoy in my series.
  • Camelot. This was recommended by a friend, one that usually has good tastes in TV and movie matters. Well, he was wrong. This is the King Arthur version of Hercules. The only people that die are those who make it harder for the screenwriters to continue the story, Merlin is the guy from Flashforward, with magic issues instead of alcohol, the same irritating frown and self righteousness and with no hair. Arthur is an infant that played in Harry Potter and Twilight. The only good parts here are the women: Eva Green as Morgan, Tamsin Egerton as Guinevere (after a lot of rumours she was going to play in Game of Thrones) and Claire Forlani as queen Igraine. Claire, could you play some sexy and open minded person next role? Your beauty is wasted on stuck up obnoxious do gooders!
  • Wilfred is a new show stolen by the Americans from Australia. The story is that one guy sees the neighbour dog as a human being dressed in a dog suit, talking with Aussie accent and smoking bong all day. The dog teaches the wimpy human how to live. The show is both intriguing and annoying. I did watch it until now, but I am having conflicting feelings about it. I am curious about what will happen next and have no problem starting to watch an episode, but I always regret it afterwards. It's a kind of guilty pleasure, I suppose.


There is something to say about future projects, like Once Upon a Time which sounds promising, but I haven't really researched the future plans of TV networks yet.

Until the next time, have fun!

What a beautiful anime film this was. I rated Summer Wars a full 10 on Imdb and I just felt the need to also post my opinion on the blog. Imagine Myiakazi combined with Denou Coil and you will get a glimpse of what Summer Wars is. Brilliant!

The Sword of Uruk is the continuation of The Tower of Druaga - The Aegis of Uruk, itself a spawn of the The Tower of Druaga arcade game by Namco. I must confess I have not watched the first part before venturing to see the second, but as the story unfolded, it was pretty clear what had transpired before. The problem, thus, was not that I didn't "get it".

The animation itself is typically Japanese, but one of the styles that is found usually in children animations. I didn't really mind that so much either, except the lazy 3D CGI bits that seems to be the creation of some 90's computer. The script, though, was a combination of ridicule, then ridiculous. I liked some of the jaunts directed to some movies or other anime, but in the end, it was just a really childish story. Also, it seemed to go towards an RPG style feel, one of those weird Asian dress-up MMO games. I didn't like that at all.

The world in which the story unfolds is a combination of modern, old and RPG, something that continuously switches from serious to not. Or better said, from ridiculous to ludicrous.

Long story short, I couldn't finish watching it. It is at best a children animation, with nothing to be learned or admired, really.

The only thing I did notice and is worth mentioning is that it featured two audio tracks, one in Japanese and one in English. The English one had the text completely changed, the attitude of the voice actors was completely different and it made me realize how much people who only watch the dubbed versions miss out on Japanese animation. It was really fun to watch an episode with English dubbing and English subtitles, both very different from each other, as the subtitles were direct translations from Japanese.


As I was noting a few posts earlier, I recently watched the entire Star Trek Deep Space 9 series. This part of the franchise showed a lot of the Klingons as well as their choice of beverages: Bloodwine and Raktajino. The former is a strong alcoholic beverage which I will not get into, and the latter is a strong and spicy coffee that grew on the crew of the space station. As I knew that the Klingon culture spawned an entire real life current, including a complete language, I was curious if they also replicated (pun not intended :) ) their recipes. And I found that, indeed, there was at least one Raktajino recipe on the net: Klingon Raktajino Klah Version.

I was not satisfied, though. You see, Klingons are supposed to be mighty warriors. Why would they throw a bit of sweet chocolate, some cocoa and a bit of cinnamon and nutmeg into their drinks if it's not going to be effective in battle? So I started researching the different active ingredients in the recipe, as well as other possible sources for a stronger effect. Here is my research on it, the result and the effects on myself (as any mad scientist knows, you first experiment on helpless victims or yourself. I was fresh out of victims that day).

Let's first examine the main stuff: coffee. There are other energizing beverages in the world, like tea, or mate tea, or even stuff like Burn or Red Bull. I will not touch the chemical energizer drinks in this post because I couldn't possibly replicate one out of simple ingredients (or could I? Note to self: make a one hundred times stronger energizer drink than Red Bull. Get more helpless victims.). Something I've recently (to my shame) found out is that when people researched coffee, tea and mate they called the main active ingredient for each by the substance they started with: caffeine, theine and mateine. Later on, it was proven to be the exact same substance. So there would be no point of mixing these together, since they have the same effect.

However, there are other ingredients in the beverages described above, like catechins, which are found in white and green tea, mostly. Also, found in cocoa, so there might be something there for the Raktajino, after all. The effect of flavanols on health is mixed, but it is clear that it has a health benefit for heart conditions as well as an apparent anti-aging effect when combined with regular exercise. Nothing Klingons like more, by the way.

Ok, which of these contains the biggest concentration of flavanols: cocoa or white tea? It is irrelevant, as this is actually a class of substances and the flavanols in each (and in wine, btw) are different. So, let's mix them up for starters.

What other active ingredients does cocoa have, except the flavanols? Well, it seems it contains something called Theobromine. It can appear naturally in the body as a result of metabolising caffeine, btw, so it seems like a good choice for the acceleration or augmentation of the effect of coffee. Also, it has a slight aphrodisiac effect :)

So, we got a mix of cocoa and white tea, something that is good for the heart, slows ageing and also should accelerate the absorption of coffee. But the recipe also had Cinnamon in it. So let's see what it contains. Well, it is called Cinnamaldehyde which sports effects like antimicrobial and anticancer. But what cinnamon does most is increase the blood flow, so also the metabolism, so the absorption of all the substances in our magic mix.

Of, if we have already a substance that increases blood flow and metabolism, why not use one that is really hot: Capsaicin? Yes, you read that right, it's the active ingredient in chilli peppers and the thing that tricks the heat sensors in our body to react to lower temperatures, giving us the sensation of heat. It also increases blood circulation and regulates sugar levels.

The net recipe also showed a use of nutmeg. I suspect that is mostly for the aroma, as large quantities of nutmeg are toxic, even if it also has a deliriant effect. Also, the "recreational" properties of nutmeg can take about four hours to take effect, so we don't actually need the stuff.

Ok. We have the ingredients we need to add to our coffee: cinnamon, cocoa, white or green tea and chilly powder. I used 2 spoon of cinnamon, 2 of cocoa, enough green tea for 2 litres of strong tea and one tablespoon of chilly powder. Then I've added it in my coffee. I also drank it with hot water only. The best results were with coffee, some sugar to add to the burn, and a bit of milk to take the edge off the tongue.

The effects: I am not a big drinker of coffee, but ever since I've moved to this job where they had a coffee machine, I would drink one cup a day. Sometimes four. Anyway, after a while it didn't seem to have any effect, other than a deficiency of calcium (that's another story, just remember to add calcium and vitamin D to your diet if you are a coffee drinker). So, the day I used a small portion of my spice in my coffee, not only did it taste great! but it also gave me a jittery active state that I hadn't felt since the first days of drinking coffee, a state that lasted for... 6 hours straight!

So, to wrap it up, I can't give you a recipe for my version of Raktajino, as I am experimenting with various quantities, but mix a lot of cocoa and cinnamon with your coffee, then add some concentrated green tea and as much chilly powder as your stomach can stand: Raktajino, Siderite version!. (I used strong text there because it is so strong of a coffee, see?)

Do let me know if you drink it and tell me what effect it had on you. The excitement of the research may be responsible for the jittery effect, after all, although I doubt it.