When I was a child I watched with huge eyes movies like Hackers, enjoying the shenanigans of computer rebels fighting the stupid law enforcement and the "evil" hackers. Of course, there was also Angelina Jolie. Even then I knew that my pleasure was a guilty one: no way could the police be that stupid, no way it would be that easy to penetrate all kinds of systems and produce effects so flashy. A while after that I watched Skeet Ulrich in the movie Operation Takedown, which was a more realistic hacker movie (and one I think Skeet did a great job in). It depicted how Kevin Mitnick has been apprehended by the authorities. I really loved that movie, although it had a lot of eye rolling moments.



Fast forward to now, reading Ghost in the Wires, Kevin Mitnick's book about himself, practically a hacking autobiography, and I loved this book every bit as much as I liked those movies as a kid. Not only I couldn't leave the book out of my hands once I started reading it, but was shocked to see that reality is not that far away from what was depicted in hacking movies. It was also interesting to read how the script of Operation Takedown came to be, which Kevin considers defamatory and mostly untrue.



Long story short, Mitnick is a smart kid with a great memory, an absent father and no real friends. He starts dabbling with radio and telephones and manages to get access to phone systems way before computers where personal or connected to each other. He's a kid, though, and he gets caught a few times. Nobody seems to understand he does it just for the fun of it and he can't seem to understand why nobody gets him. In the end, pushed by the desire to challenge himself, but also by authorities baiting him all the time, he becomes a life long hacker and eventually gets caught.



A shocking part of the book is how easy it is to penetrate any system, not by whatever technical wizardry, but by simply tricking people into giving you information and access. Called "social engineering" it was Mitnick's strongest point and at several times in the book, when the technology would not allow him to enter one system or another, he would just abandon the tech stuff and go with tricking people. Already having knowledge on how to manipulate phone systems made that a lot easier, as well.



Another, less shocking, but utterly disappointing part is about authorities. Just as they are now about file sharing and whatever "crisis" they are in, law enforcement agencies are basing their entire existence on pure power of coercion, ignoring the rules that they themselves are enforcing and being motivated only by keeping that power in their hands. Technical morons, they only seem to be getting into the action when their pride is affected. In this book Kevin Mitnick dances around security personnel, local cops, FBI, NSA several steps ahead of them, but they only seem to really mind when newspapers start publishing articles that makes law enforcement look bad. And once they have him, caught only with the help of other hackers, they are using all the dirty tricks in the book to bring Mitnick to his knees. Nothing has changed from then to now, just look at cases like Gary McKinnon's. Intimidation is a bully's greatest strength. That's sad.



I would have to say that the most unexpected thing was the tone of the book, which is almost exuberant. Mitnick has not become a bitter and paranoid man after countless personal betrayals and authority abuse and he is not angry at all. If anything, the guy is happy to have lived as the lead actor in the "Myth of Kevin Mitnick", which has grown way bigger than the real person. There is a scene when he gets outside of a building and there are hundreds of fans there, shouting, and he looks behind to see if there is a celebrity around.



Bottom line: this is a book you can't miss. It is easy to read to the point of instantly addictive, it is well written with enough juicy technical details to keep one interested and, most of all, makes you feel good, even in the horrible moments of his detention. It makes one wonder, did Mitnick socially engineer himself into remaining an open and cool guy in the face of adversity? Or is it he had this strength all along and that is his most powerful "magic"?

and has 1 comment
I've always felt that a lot of movies and books lack realism, that when the hero survives and gets the girl, while the villains get their rightful punishment the whole story becomes null and void. Therefore I believed that the opposite of this - a character centric plot, a realistic story, unexpected outcomes - would spell a good story and wonderful books/movies. Such is the tale in A Song of Ice and Fire, the seven (until now) book saga that I am currently reading, in which A Dance with Dragons is the fifth book.



Imagine my surprise in discovering that the other extreme is just as bad. In ASOIAF, there is no real main character. A lot of heroes and villains to choose from, but, completely unexpected, heroes suffer and die, while villain prevail. Maybe it's the other way around. Maybe nobody truly prevails. Certainly they all suffer. So what is wrong with this picture? George R. R. Martin went too far. His tale is now more of an alternative history than a true story. Maybe the sixth book will be different, but how can it be and still remain faithful to the first five? How can it continue the way the story went so far without a pointless struggle, where random things happen to random people? I mean, if I like this, I should start reading history books. My father would be pleased, I am sure :)



A Dance with Dragons takes place in a period in time that mostly overlaps the fourth book. The author acknowledged that there were too many characters doing too much in that short amount of time and, rather than split the storyline in the middle and create the "left hanging" effect, he opted for a geographical (more or less) division of the plot.



I liked the book. It started with a lot of setup, and that is what most of the book is about, but it also got deeper into magic and Arya's assassin training and what Jon and Tyrion did. I would say they are my favourite characters so, in that respect, the fifth book is better than the fourth. Can't say more about it without ruining the fun, but I was not disappointed, only slightly annoyed to see that what I really wanted in a book I got and I was still not completely satisfied.



My theory is that the stern characters in the book represent Martin's own father, while Tyrion and Jon are reflections of his own persona. Sansa may be the clueless girl who broke his heart, while Arya would be his daughter or younger sibling. I am just theorizing here, as I have not read any bio information of the author. Perhaps he represented himself as Wun Wun :)



I am waiting for the sixth book to appear, but the second book in the saga appeared two years after the first, the third two years later, then five years, then six! At this rate the sixth book will be published in 2018, with Martin of 70 years of age and waiting for the seventh eight or nine years later.

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.

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!

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.

I've finally finished reading Pro ASP.Net MVC Framework by Steven Sanderson. The book is slightly dated, since it discusses the technology used in Visual Studio 2008 and without any mention of the new Razor engine, but these are details that are not important to the content of the book anyway. I can say that it is a very nice book and it was worth reading, especially the first part.

There are two parts to this, the first being a TDD ASP.Net MVC web shop application built step by step and explained line by line. It goes through some Domain Driven Design concepts as well, it does unit testing and mocking, even shows off a little dependency injection via Castle Windsor. What I liked most, though, is how painstakingly thorough Sanderson was explaining every single detail. He didn't assume anything as he documented every step of the way, down to what lambda expressions are and what .Net features he was using.

The second part of the book is a little less readable, as it goes through the classes and features of ASP.Net MVC, complete with methods, properties and small samples. I highly recommend reading this part while actually experimenting with the framework on the computer. Even if you do not, this part of the book remains a very valuable reference for when you do. In this section of the book you can learn about data entry, Ajax and partial updates, application security and deployment, even how to mix classic ASP.Net with MVC, though not really recommended.

The bottom line is that Pro ASP.Net MVC Framework is a must read for a developer learning ASP.Net MVC. There is an updated version of the book for VS2010 and .Net 4 that I think that I will also read (the book was so good). Here is the link for Pro ASP.NET MVC 2 Framework.

As I was blogging before, RedGate are assholes. They bought Reflector, promised to keep it free, then asked money for it. But every crisis can be turned into an opportunity. JetBrains promised a free decompiler tool and they have kept their word as they have released an early build. A total news to me, but not really a surprise, other software companies decided to build their own version in order to boost their visibility in the developer world. Telerik, for example, has just released JustDecompile, beta version.

It is no secret that JetBrains is a company that I respect a lot, as they made ReSharper, the coolest tool I've ever had the pleasure to work with, but I will try to be as unbiased as possible in comparing the options. I have tried dotPeek on WPF's PresentationFramework.dll from the .NET framework 4.0, as I often need to check the sources in order to understand functionality or bugs.

As a footnote, Reflector, just before it went commercial, could not decompile some of the code there. Not only it did not decompile it, but it presented empty methods like that was all there was in the code, with no warnings or errors or explicative comments. So, even if free, I bet Reflector would have sucked in the end, after getting into the money grabbing hands of RedGate.

dotPeek has seen and decompiled the code that Reflector did not. Also, I have to say that similar functionality like in ReSharper, finding usages, going to declaration, etc are making dotPeek a very nice tool to work with. What I did not quite like is that it doesn't have yet the functionality to save the sources to text files. But I am sure this is just a detail that was not implemented yet. Hopefully, they will provide a rich plugin model like old Reflector did.

Unfortunately, to download JustDecompile, they need you to have a Telerik login in order to download, which, as everyone knows, simply sucks. No one likes a registration form, folks! Especially one that presents you with wonderful prechecked checkboxes for permission for Telerik to send you all kind of stupid promotions and newsletters. Also, the download is of a .msi file. Most developers like to see what they are installing and preferably just copy it from a file archive. Running the .msi took forever, including the mandatory 100% CPU utilization bit that I will never understand in installation products. (coming from the .NET runtime optimization service, mscorsvw, called by ngen) But that's just the delivery system. Let's check out the actual thing.

JustDecompile starts reasonably fast and it also has a nice look, being build with Telerik controls and what not. The decompilation is a bit weird at first, since it shows only the method names and for a second there I thought it was as bad as Reflector was, but then I noticed the Expand All Members button. The context menu is not nearly as useful as dotPeek's, but there are a lot of options in the top toolbar and the navigation via links is fast and intuitive. It also has no text saving options yet.

As the decompiled sources were, I noticed these differences:
  • JustDecompiler places inline member declarations in constructors, dotPeek shows it inline. It might not seem an important thing, but an internal class gains a weird public constructor in order to place the declaration there, instead of using the only internal constructor that the class had. It looks strange too as its last line is base(); which is not even legal.
  • dotPeek seems to want to cast everything in the source code. For example List list = (List) null;
  • JustDecompiler shows a Dictionary TryGetValue method with a ref parameter, dotPeek shows the correct out.
  • dotPeek creates really simple names for local scope variables like listand list1, JustDecompiler seems to create more meaningful names like attachedAnnotations
  • JustDecompiler shows a class internal as dotPeek shows it as internal abstract.
  • JustDecompiler seems to fail to decompile correctly indexer access.
  • JustDecompiler doesn't seem to handle explicit interface implementations.
  • JustDecompiler doesn't seem to decompile readonly fields.
  • JustDecompiler transforms a piece of code into an if with a return in it and then some other code, dotPeek decompiles it into an if/else.
  • JustDecompiler doesn't seem to handle Unicode characters. dotPeek correctly encodes them in source like "\x001B".
  • dotPeek seems to join nested ifs in a single one, as opposed to JustDecompiler.
  • JustDecompiler uses base. in order to access members coming from base classes, while dotPeek uses this.


I will stop here. I am sure there are many other differences. My conclusion is that dotPeek could do with the naming algorithm JustDecompiler seems to use for local scope variables, but in most other ways is superior to JustDecompiler for now. As both programs are in beta, this could quickly change. I do hope that healthy competition between these two products (and, why not, shady developer meetings in bars over tons of beer and pizza, in order to compare ideas intercompanies) will result in great products. My only wish is that one of these products would become open source, but as both use proprietary bits from commercial products, I doubt it will happen.

Have fun, devs!

Update 23 Feb 2012:
Spurred by a comment from Telerik, I again tried a (quick and dirty, mind you) comparison of the two .Net decompilation tools: JetBrains dotPeek and Telerik JustDecompile. Here are my impressions:

First of all, the Telerik tool has a really cute installer. I am certainly annoyed with the default Windows one and its weird error codes and inexplicable crashes. Now, that doesn't mean the Telerik installer does better in the error section, since I had none, but how could it not? The problem with the installation of JustDecompile is that it also tried to install (option checkboxes set by default) JustCode and JustTrace. The checkboxes themselves were something really custom, graphically, so I almost let them checked, since they looked as part of the background picture. If it weren't for my brain spam detector which went all red lights and alarm bells when seeing a really beautiful installer for a free tool, I might have installed the two applications.

Now for the decompilation itself. I was trying to see what the VisualBasic Strings.FormatNumber method contained. The results:
  • dotPeek showed xml documentation comments, JustDecompile did not
  • dotPeek showed default values for method parameters, JustDecompile did not
  • JustDecompile could decompile the source in C#, VB and IL, dotPeek did only C#
  • JustDecompile showed the source closer to the original source (I can say this because it also shows VB, which is probably the language in which Microsoft.VisualBasic was written), dotPeek shows an equivalent source, but heavily optimized, with things like ternary operators, inversions of if blocks and even removals of else sections if the if block can directly return from the method
  • There are some decorative attributes that dotPeek shows, while JustDecompile does not (like MethodImplAttribute)
  • dotPeek has a tabbed interface that allows the opening of more than a single file, JustDecompile has only a code view window
  • dotPeek shows the code of a class in a window, in order to see a method, it scrolls to where the method is; JustDecompile shows a class as a stub, one needs to click on a method to see the implementation of only that method in the code window


My conclusion remains that dotPeek is a lot more usable than JustDecompile. As a Resharper user, I can accept that I am biased, but one of the major functionalities of a .Net decompiler is to show you usable code. While I can take individual methods or properties with JustDecompile and paste them in my code, I can take entire classes with dotPeek, which makes me choose dotPeek for the moment, no matter all the other points above. Of course, if any of the two tools would give me a button that would allow me to take a dll and see it as a Visual Studio project, it would quickly rise to the top of my choices.

Update 26 Apr 2013:
I've again compared the two .Net decompilers. JustDecompile 1.404.2 versus dotPeek EAP 1.1.1.511. You might ask why I am comparing with the Early Access Program version. It is because JustDecompile now has the option to export the assembly to a Visual Studio project (yay!), but dotPeek only has this in the EAP version so far.
I have this to report:
Telerik's JustDecompile:
  • the installer is just as cute as before, only it is for a suite called DevCraft, of which one of the products is JustDecompile
  • something that seemed a bit careless is the "trial" keyword appearing in both download page and installer. If installing just JD, it is not trial
  • again the checkboxes for JustCode and JustTrace are checked by default, but at least they are more visible in the list of products in the suite
  • a Help Improve the Telerik Installer Privacy Policy checkbox checked by default appeared and it is not that visible
  • the same need to have an account to Telerik in order to download JD
  • when installing JD, it also installs the Telerik Control Panel a single place to download and manage Telerik products, which is not obvious from the installer
  • the install takes about two minutes on my computer to a total size of 31MB, including the control panel
  • if a class is in a multipart namespace like Net.Dns, it uses folders named Net.Dns if there is no class in the Net namespace
  • not everything goes smoothly, sometimes the decompiler throws exceptions that are then logged in the code as comments, with the request to mail to JustDecompilePublicFeedback@telerik.com
  • it creates the AssemblyInfo.cs file in a Properties folder, just like when creating a project
  • resolves string concatenation with string.Concat, rather than using the '+' operator as in the original code
  • resolves foreach loops into while(true) loops with breaks when a condition is met
  • uses private static methods in a class with the qualified class name
  • resolves inline variables, leaving the code readable
  • overall it has a nicer decompiled code structure than dotPeek
  • adds explicit default constructors to classes
  • places generic class constraint at the end of constraints list, generating an exception
  • it doesn't catch all reference assemblies, sometimes you have to manually add them to the list
  • decompiles enum values to integer in method optional parameters default values, generating compilation errors
  • decompiles default(T) to null in method optional parameters default values, generating compilation errors
  • decompiles class destructors to Finalize methods which are not valid, generating compilation errors
  • types of parameters in calls to base constructors are sometimes wrong
  • places calls to base/this constructors at the end of constructor code blocks, which of course does not work, when you place more complex code in the calls
  • doesn't understand cast to ValueType (which is somewhat obscure, I agree)
  • really fucks up expressions trees like FluentNHibernate mapping classes, but I hate NHibernate anyway
  • resolves if blocks with return in them to goto/label sometimes
  • resolves readonly fields instantiated from a constructor to a mess that uses a local variable to set the field (which is not valid)
  • doesn't resolve corectly a class name if it conflicts with the name of a local method or field
  • inlines constants (although I don't think they can solve this)
  • switch/case statements on Enum values sometimes gain weird extra case blocks
  • sometimes it uses safe casting with value types (x as bool)

JetBrain's dotPeek:
  • the EAP version has a standalone executable version which doesn't need installation
  • the whole install is really fast and installs around 46MB
  • as I said above, it does not have the Export to Project option until version 1.1
  • the decompilation process is slower than JustDecompile's
  • if a class is in a multipart namespace like Net.Dns, it uses a folder structure like Net/Dns
  • sometimes things don't go well and it marks this with // ISSUE: comments, describing the problem. Note: these are not code exceptions, but issues with the decompiled code
  • it inlines a lot of local variables, making the code more compact and less readable
  • weird casting of items in string concatenations
  • a tendency to strong typed casting, making the code less readable and generating compilation errors at times
  • the AssemblyInfo.cs file is not created in a Properties folder
  • when there are more classes in a single file, it creates a file for each, named as the original file, but prefixed with a number, instead of using the name of the class
  • it has an option to create the solution for the project as well
  • it creates types for anonymous types, and creates files with weird names for them, which are not really valid, screwing the project.
  • it has problems with base constructor calls and constructor inheritance
  • it has problems with out parameters, it makes a complete mess of them
  • tries to create a type for Linq IQueryable results, badly
  • it has problems with class names that are the same as names of namespaces (this is an issue of ReSharper as well, when it doesn't present the option to choose between a class name and a namespace name)
  • resolves while(method) to invalid for loops
  • it doesn't resolve corectly a class name if it conflicts with the name of a local method or field
  • problems with explicit interface implementations: ISomething a=new Something(); a.Method(); (it declares a as Something, not ISomething)
  • problems with decompiling linq method chains
  • I found a situation where it resolved Decimal.op_Increment(d) for 1+d
  • indirectly used assemblies are not added to the reference list
  • it sometimes creates weird local variables like local_0, which are not declared, so not valid
  • adds a weird [assembly: Extension] in the AssemblyInfo file, which is not valid
  • a lot of messed up bool values resolved as (object) (bool) (value ? 1 : 0), which doesn't even work
  • inlines constants (although I don't think they can solve this)
  • __Null local1 = null; - really?

After decompiling, solving the issues and compiling again an assembly in the project I am working on I got these sizes:
JustDecompile: 409088
dotPeek: 395776
The original: 396288

Of course, this is not really a scientific comparison between the two. I was excited by the implementation of Export to Project in both products and I focused mainly on that. The navigation between types and methods is vastly improved in JustDecompile and, to my chagrin, I have to admit that it may be easier and safer to use than dotPeek at this time. Good job, Telerik! Oh, and no, they have NOT paid me to do this research :-)

and has 0 comments

A bit late to the party, I finally found out that there was a mass escape from a Khanadahar prison. Apparently, Taliban forces have dug a tunnel from outside the Afghan prison and liberated about 500 of their peers. This is a blow to the local government and their western allies, the news say. I, however, cannot help but root a little for the underdog and think of the classic The Great Escape. In that film, allied prisoners of war were digging a tunnel to escape Nazis. Will they do a similar film about the Talibans now? I would. It would probably be both funny and tragic, navigating through all the incompetence, corruption, shrewdness and tension. As for the "western allies"... I would be a little proud. "Look, ma! They have grown so much, our children! They are not blowing themselves up, they are organising, planning for months in advance and finally building something. It's just a tunnel now, but I am so proud!".

and has 0 comments
Somehow I have managed to read the tenth and final book in Steven Erikson's Malazan Book of the Fallen series: The Crippled God. Almost a year ago I was saying "I doubt the tenth book will be able to satisfyingly end the story." and I have to agree with myself :)

The book continues where Dust of Dreams ended, but introduces even more characters, all amassing towards a grand finale. But is it grand? And is it, or should it be, a finale? I dare say no, but first a little bit about the content of the book.

The adjunct Tavore does for the entire book things that not even the characters understand. More than that, they follow her, all the time acknowledging that they don't know why. While this may work for short periods of time, it gets annoying and breaks one of the tenets of book writing: allow the reader to sympathize with the characters. How can you, if you don't understand what they are doing? Combine that with Erikson's style of beginning chapters without disclosing who the characters are and having to wait for a few paragraphs before using any names, and you get a book that is hard to enjoy without giving it all your attention. And when you do, people start sobbing and having "raw feelings" and understanding a world of pain from a single word and what not.

To summarize, I believe Erikson finally succumbed to the writer curse of trying to force the reader to think like him. In the end, the pleasure of understanding the situation explain by the author and filling in the blanks with your own imagination is replaced with a vast blank instead.

Then there are the tactical situations. After a rather interesting campaign in Letheras in Dust of Dreams we get a long pointless march that makes no sense whatsoever, problems created for no reason and bad solutions for them. The enemy, the Forkrul Assail, are nothing more than glorified Nazis, running around and spreading their own brand of justice, but having small and clichéd thoughts and not much in the way of actual power. They draw extra power from the heart of the Crippled God in order to boost their grand Akhrast Korvalain magic, but when it is time to unleash it, it pretty much duds, making the reader wonder what the hell happened. Also the military strategy makes no sense whatsoever, down to the individual battles. That could have slipped if Erikson wouldn't have slipped of how Tavore is the greatest strategist of all time. I won't bore you with the details, let's just say that there is much more sobbing than thinking in this book.

And now to return to the grand finale. Not only did I not understand much of it (maybe I am too dumb, who knows?) but it fizzled in comparison to most of the previous books. The battle was not that grandiose, the scheming something only a god would understand, the characters rather bland, the sobbing (did I mention it?), even the Malazan marine was boring in this book. I did enjoy it, but it all felt rushed and soulless. A lot less than I have imagined the ending of this great series to be.

The last qualm I have is with another writer trap: the desire to finish up in a clean way. It has to end with Apsalar in her village and the two meddling Shadow gods like the first book began. It had to end a lot of the pieces of stories sprinkled throughout the books. It had to save people that suffered and have couples reunited. This could have worked for a romantic comedy with werewolves, for example, but not for a series of books that never wasted time on finding boring beginnings and useless endings for its many threads.

The ending of the book betrayed the eight preceding books and some of Ian Cameron's. Perhaps the many voices of the characters always whispering in Steven Erikson's ears for twenty years have finally driven him mad. Or maybe he just got bored.

and has 0 comments
A while ago I was reporting the release of theStart's latest album, Ciao Baby, and the disappointing direction of their singing. I've revisited them and noticed that Aimee Echo, Jamie Miller and Chelsea Davis started a new band called Normandie which sounds very much like the old theStart, at least from the songs they've published on their MySpace site. Here is a clip from YouTube as well:

and has 0 comments
I said to myself "I'll just read a few passages of the book, just to relax a little, as I have a lot to do". Yeah right! I've started reading and I didn't stop until it was done. Stonewielder is a classic Malazan Empire book, but also bearing Esslemont's personal touch. There is the catastrophic magic battling immense godly power, while the ordinary soldier (the book focuses on heavies) carries on lead by the tragic commander, there are the weird twists from a perspective to another, the switches from a storyline to another, typical of a Malazan book, but also a bit less epicness and a lot more human failing, more characteristic to Esslemont than to Steven Erikson.

I have to say that I find the title to be a little off. The part of Greymane is quite insignificant until close to the end. A great book, nevertheless, and a nice prelude to The Crippled God, the tenth book (and laaast! :( ) in Steven Erikson's Malazan Book of the Fallen series, that I intend to read as soon as possible.

and has 0 comments
You have to excuse me, I've found this blog that I like, Ars Technica, and I can't seem to stop linking to stories there. This one is just funny: UbiSoft released their newest Assassin Creed game and, in a deluxe version, they included a bunch of extras, including the complete soundtrack for the game. However, when looking closer to the ID3 tags for the songs, it was discovered they were pirated versions, distributed on torrents after being taken from the collector's edition of the game.


There is a "theory" that piracy is enhanced by the fact that it is so easy to use pirated content and so damn annoying using the official, paid, version. So easy, it appears, that UbiSoft people found it more efficient to download the pirated version than to go through inner channels to get the songs. They essentially pirated themselves! If that doesn't make you smile a little, you must not be a geek :)