On the 9th of February I basically held the same talk I did at Impact Hub, only I did better, and this time presented to the ADCES group. Unbeknownst to me, my colleague there Andrei Rînea also held a similar presentation with the same organization, more than two years ago, and it is quite difficult to assume that I was not inspired by it when one notices how similar they really were :) Anyway, that means there is no way people can say they didn't get it, now! Here is his blog entry about that presentation: Bing it on, Reactive Extensions! – story, code and slides

The code, as well as a RevealJS slideshow that I didn't use the first time, can be found at Github. I also added a Javascript implementation of the same concept, using a Wikipedia service instead - since DictService doesn't support JSON.

and has 0 comments
Japanese culture is certainly special. The music, the drawing style, the writing, the cinematography, they are all easily recognizable and usually of high quality. Yet I think it is even cooler when artists are able to blend Japanese feeling with Western cultural artifacts. Check out this Japanese traditional sound... made metal: Akatsuki no Ito (The Thread of Dawn?)

Today I was the third presenter in the ReactiveX in Action event, held at Impact Hub, Bucharest. The presentation did not go as well as planned, but was relatively OK. I have to say that probably, after a while, giving talks to so many people turns from terrifying to exciting and then to addictive. Also, you really learn things better when you are preparing to teach them later, rather than just perusing them.

I will be holding the exact same presentation, hopefully with a better performance, on the 9th of February, at ADCES.

For those interested in what I did, it was a code only demo of a dictionary lookup WPF application written in .NET C#. In the ideal code that you can download from Github, there are three projects that do the exact same thing:
  1. The first project is a "classic" program that follows the requirements.
  2. The second is a Reactive Extensions implementation.
  3. The third is a Reactive Extensions implementation written in the MVVM style.

The application has a text field and a listbox. When changing the text of the field, a web service is called to return a list of all words starting with the typed text and list them in the listbox, on the UI thread. It has to catch exceptions, throttle the input, so that you can write a text and only access the web service when you stop typing, implement a timeout if the call takes too long, make sure that no two subsequent calls are being made with the same text argument, retry three times the network call if it fails for any of the uncaught exceptions. There is a "debug" listbox as well as a button that should also result in a web service query.

Unfortunately, the code that you are downloading is the final version, not the simple one that I am writing live during the presentation. In effect, that means you don't understand the massive size reduction and simplification of the code, because of all the extra debugging code. Join me at the ADCES presentation (and together we can rule the galaxy) for the full demo.

Also, I intend to add something to the demo if I have the time and that is unit testing, showing the power of the scheduler paradigm in Reactive Extensions. Wish me luck!

and has 0 comments
This book was recommended by Jeff Atwood, of Coding Horror and Stack Overflow fame. He liked it, I wasn't impressed. In The Last Policeman, Ben H. Winters attempts to describe a world that is powerlessly waiting for the arrival and impact of a 7km wide asteroid. While smaller than the one that killed the dinosaurs off, it would still pretty much end human civilization and most of the life on Earth. As a result, people are killing themselves in depression, quit jobs to "go bucket list", nothing is working, nothing gets repaired, etc. In all of this, a detective is trying to solve a case that looks like just another suicide, but he feels it's not. It is an interesting concept and it was well written by Winters, but I had difficulty believing in the world he was describing. More than that, except rumors of something Iran is planning there is no mention of any other country. I believe that in this situation a lot of people would inertially and routinely continue what they were doing until they figured out that it doesn't make sense (and that probably it didn't make sense to begin with), but there would certainly be more aggressive social changes that the author completely ignores. Plus that "going bucket list" would certainly become frustrating once you can't go on a cruise because no one is sailing the thing or you can't enjoy your favorite food because the restaurant got closed.

Worse than that, at the end of the book I was pretty satisfied with it. It was short, to the point and while not perfect, it was enjoyable. And then I learn that it is part of a trilogy. This automatically diminishes the act of reading it somehow and the book entire by the fact that I can't convince myself to read the other two books. So yeah, bottom line: I thought it was kind of average.

Write Right! is a monster. It goes through every step of writing a book, including the one that the author, Kendal Haven, considers the most important: editing. Then, in its second half, it contains exercises for improving writing. The intended audience of this book is teachers of creative writing, not just beginner writers, so that makes it even more valuable.

The mystery for me was how can someone write about captivating and engaging writing in a book as dry as Creative Writing Using Storytelling Techniques. I understand it is mostly a manual, but it was really difficult to go through it, as it was full of information start to finish. Now I must reread it at speed and make a summary of the techniques in order to even begin to absorb the huge amount of very useful information in the work. Not to mention actually doing the exercises at the end.

What I really liked about this book is that it is very algorithmic. At every page I was considering - and still am - how I might codify this into a software to help me evaluate a piece of literature and maybe even suggest improvements automatically. If I am to extract an essential idea of the work it would be "editing is very important". The author acknowledges the need to write fast, from your gut, to lay the words out there, not even considering spelling or grammar, just vomit your thoughts onto the page, but then he submits that the process of evaluating each scene, each chapter and the book for structure, wording, verb uses, sense involvement, specificity of language, action, dialogue, sequels (not book sequels, but that thing that details what characters think and feel about what just happened), etc. is perhaps the most important in translating that story that you have into an interesting book to read. And after getting a final version you are happy about, he makes you eliminate 15% of the words. Ruthless! :)

Let me make this clear, though: writing is damn tough. It consists of two parts: observing the world and describing the world. In a recent post I was complaining at how bad I am at the former, but this book makes it clear how complex is the latter. Making the written word express what is in your brain at the moment of creation is extremely difficult and complicated. This book helps in defining exactly what that is and give you tools to do it and improve on doing it. A great tool!

To sum it up: This is not light reading. It is a manual for writing teachers (what the hell are those? I wish I had some in school). It helps tremendously if you are self-taught, also. It requires multiple readings or at least a summarizing effort at the end, to structure it in a way that makes it easy using it as a reference. And then, of course, are the exercises for improving writing which take the second half of the book

Stephen Toub wrote this document, as he calls it, but that is so full of useful information that it can be considered a reference book. A 118 pages PDF, Patterns for Parallel Programming taught me a lot of things about .NET parallel programming (although most of them I should have known already :-().

Toub is a program manager lead on the Parallel Computing Platform team at Microsoft, the smart people that gave us Task<T>, Parallel, but also await/async. The team was formed in 2006 and it had the responsibility of helping Microsoft get ready for the shift to multicore and many-core. They had broad responsibility around the company but were centered in the Developer Division because they believed the impact of this fundamental shift in how programming is done was mostly going to be on software developers.

It is important to understand that this document was last updated in 2010 and still some of the stuff there was new to me. However, some of the concepts detailed in there are timeless, like what is important to share and distribute in a parallel programming scenario. The end of the document is filled with advanced code that I would have trouble understanding even after reading this, that is why I believe you should keep this PDF somewhere close, in order to reread relevant parts when doing parallel programming. The document is free to download from Microsoft and I highly recommend it to all .NET developers out there.

Date Published: 7/16/2010 File Size: 1.5 MB

and has 0 comments

"Take us to your master and have him give us food!"

This book opened my eyes on multiple levels. First of all it went right through my Dunning–Kruger effect that made me hope that writing would be easy. Second, it showed me how to see the world as a writer, which is hugely valuable.

Writing Vivid Settings is also a value packed reference book. Rayne Hall doesn't go artificially raising your expectation level - you know the type: "in this book I will show you how to eliminate hunger and solve poverty, but before that...", he instead just goes right into it. In fact the transition to actual useful information was so abrupt that I found myself feeling grateful before I could even understand what the book was about. Then, when I did, it hit me even harder, because I understood not only what I was missing in my writing, but also what I was missing in my every day perception.

If I were to summarize the book, it is all about consciously describing from the point of view of your characters, in a way that makes the reader connect emotionally and subconsciously to the character and scene. In Hall's view there is no such thing as objective scenes, they are defined more than anything else by the character that observes them. The book advises to describe through the senses: smells, sounds, the lighting of the room, the way things feel to the touch, etc, then go towards what the character would most likely notice, based on their own personality and background, making sure to use similes so that the memory of the scene becomes anchored in the reader's mind in the same way it would in the mind of the observer in the book. Yes, it does sound weird, doesn't it? Make the reader feel as the person who doesn't really exist except in the writer's head.

Each chapter in the book explains elements on how to describe the surroundings, when to use them, how to use them, what to avoid, professional examples from other books and some assignments to make you get right to it. And there is where it becomes interesting. When I told my wife about it, she immediately recognized exercises for "grounding", something that is used in mindfulness and gestalt psychology. As an example: describe the smells in the room, then the way the light enters it and how it changes the colors, then some background sounds, all by using verbs that are very specific and indicative of the character's mood and similes that would be indicative of the character's background. I kind of mixed several chapters in this, so you can get the point. Well, when is the last time you ever did something like that in your life? When were you last conscious of the sounds and smells around you and what they evoke? When did you last compare the light in a place to a living thing, with a mind of its own, just because you can? It is all about bringing all those vague perceptions to a form that can be communicated, to others and to yourself.

That is the trick to good writing, for sure, but also a way of observing the world around you. Suddenly, I felt like a little child that doesn't see the world around because he doesn't know how. I found myself going places and trying to describe the scene as instructed in the book - many of the assignments in it suggest doing right that, anyway - and it was hard. It was more than hard, it felt impossible. Like living your life on a psychologist's bench, always asking you "what does that mean?" and "how does it make you feel?" and "what will that lead to?". But how alive the world seemed while doing that! Aware of my own senses, feelings and their roots, I could suddenly understand people who enjoy life for its own sake. The book's description is "Do you want your readers to feel like they're really there—in the place where the story happens?" After reading it, it seemed that I was never there in the first place.

It probably doesn't say things differently from other writing books, but it certainly opened my eyes. I also absolutely loved how it didn't start with marketing bullshit and got right into it, with theory, examples and exercises. It can be used as a reference, before and after writing, since it has exercises on improving already existing work. I think this is a great book.

and has 0 comments
I've decided to read some of the stuff that takes place in the Star Trek universe, for research purposes. I was particularly interested in Starfleet Academy and, since Next Generation was clearly the best Star Trek series yet, I went with that one. So here I am reviewing the first three in a fourteen book series called Star Trek The Next Generation: Starfleet Academy Book Series, all written by Peter David. And, boy, am I disappointed!

It's not that I expected some high end drama, but in reality each one of these books is a booklet that one can read in about 2 hours. All three of them together are barely a novel. And the thing is that this is exactly what I was looking for: a history of the crew of the Enterprise from when they were cadets. What am I disappointed for? It is a "written by numbers" book. It is one of those "write a novel in nine days" thing, only each is probably written in five. The characters are shallow, undeveloped, details are missing and there is no real science fiction in there. I mean the real stuff, the one that takes into account centuries of cultural and technological evolution in which we had eugenic wars and a third World War, in which we encountered a myriad of alien species that are very different from us. There is no social commentary, no psychological evolution, no high technology and no real personal drama. And I understand. Just take a look at the bibliography of Peter David, it needs its own page. The man is a writing monster. However, it is clearly a quantity vs quality thing.

Anyway, I will review all three books as a single story, which in fact it is. All about Worf at the Academy, Worf's First Adventure is about proving himself in a simulated battle against the Romulans, while Line of Fire and Survival are about him taking command of a diplomatic mission on a joint Federation-Klingon colony.

From the first pages we get that Worf has a conflicted personality, stuck somewhere between the strict tenets of the Klingon culture and the Human education from his parents, unclear if he is more Klingon or more Human. His parents are proud of him and his adoptive brother as they embark for the Starfleet Academy, but from then on, for three "books" of adventure, we don't hear anything about those parents anymore. In fact, the first book is there merely to prove Worf's superiority over his human brother who is forced to leave the Academy as soon as the story ends. Afterward, we don't read anything about him, either. There are more pages dedicated to grumpy and violent behavior than it is to what the Academy entails, what are the courses, or how disjointed lectures can form a cadet into an officer in a four year standard program. It is not explained why some are engineers and some are in security, even when they are taking the same classes. Nor is it made obvious how the teaching methods in the twentyfourth century differ from the ones in 1980. Worf simply floats from one sequence to the other, like in a dream, without the need for continuity or context or even common sense.

To summarize: Worf comes to the Academy, learns nothing new and his innate values and abilities help him go through the challenges posed by a Starfleet training. I mean, really, there is a part there about how Worf was taught to be in a certain way and not helping a team member when in need was simply not conceivable. So basically... he remains unchanged. True, Worf is one of the most stubborn and difficult to change characters in Star Trek, but still, a good story needs some sort of development, some sort of life changing challenge, any kind of challenge at all.

In truth, this level of writing makes me more confident on my prospects of writing books myself, but I don't want to read stuff like this.

and has 0 comments
I have always been bad mouthing the Sci-Fi Channel, later, after 17 years, renamed to SyFy, as if they wanted to distance themselves from the genre they were supposed to promote. Why? Because I was born in Romania, a place of rancid communism and cultural isolation. After the Revolution, Romanian television stations were scarce in showing SF, and when they did it was always if there was nothing "better" to show, like sports or stupid peasant comedy shows. I grew up with science fiction books and a thirst for sci-fi movies and series. All this time I was dreaming of these foreign channels that I've been hearing about. Amazing to think that there was a SciFi Channel out there, where they were showing sci-fi all day long!

Of course, the reality of it is that science fiction only recently started to pay off. While I was dreaming of a channel that was all Star Trek, Babylon 5, Farscape, BSG, even Blake's 7, showing all new SF movies in the interim, the truth was less than stellar. They were showing crappy, mass produced, cheap programs that was all they could afford. Many of them were reality TV. I wasn't actually able to ever watch the SciFi Channel as a television station, anyway. But I have had contact with other similar ones and I was not impressed. So I judged them by their productions, stuff like Sharknado.

Lately though, I feel like I have to swallow my disdain, after they started doing really interesting stuff like Z Nation, which may be low budget, but well written: exactly what I have been waiting for from the Internet, but failed to materialize. Since writing should be the smallest effort in a show, I expected it to far outweigh production values, but until now, I have rarely seen stuff like that. After loving Z-Nation, now they started with a TV adaptation of The Expanse book series and it is amazing!

A well thought out universe in the near future, where the Solar System has been colonized and the three political entities are Earth, the Asteroid Belt and Mars, locked in an awkward standoff of military and economical influences. The show has really good effects and its attention to details, no doubt coming from the book, but well translated to TV, is great! The African ethnic influences on the Belter culture, the East-Asian preponderance in Earth leadership and the weird mixes of cultures all over, are really cool, but what I appreciate to no end is the realism of the space technology. There is a little inadvertence between script and reality, of course, but most of the stuff in the first 4 episodes is really believable (meaning it is achievable within the science and resources that we know today). The characters are deep and interesting, their interactions weaving together and apart in a very well coordinated dance.

But what I like about The Expanse more than all the production values, great writing and complex characterization is that it is a courageous enterprise. While I was watching it with my wife she was constantly pestering me with questions about stuff that she didn't understand. This, for once, is not a lowest denominator kind of show, it is hard sci-fi for hardcore sci-fi fans! And well done enough so that even on and off fans like my wife would be able to appreciate!

To summarize: watch The Expanse. I have high hopes for it!

This book itself was written in two days and it shows. Fortunately for Steve Windsor, the author, it is also a damn useful book, concise and mostly to the point. Full disclosure: I've decided to study writing and hopefully write a novel. This is the first book I have read about the subject.

Meant as a reference, Nine Day Novel: Writing Fiction: How to Use Story Structure and Write Your Fiction Novel Faster is going for covering structure and speed, identifying a commonly used template for fiction and applying it for creating the structure of the book. Windsor then prepares the future author for a nine day schedule in which to write a 100000 word novel - which is at the lower end spectrum of what is considered one, but still technically a novel - even indicating ways to gain the time without making huge changes to your way of life. You know, stuff like not watching TV series (damn you, Steve!!).

He names the template 4PSS (four part story structure) which looks kind of like this:
  1. SETUP
    • Opening scenes
    • Killer Hook Event
    • Establish setting, scene (location), stakes of hero
    • Foreshadow coming events
    • Set up the inciting incident
    • First plot point - inciting incident
  2. REACTION – retreat, regroup, run
    • Reaction to first plot point
    • First pinch point - allude to evil force – Physical middle of Part 2
    • Reaction to pinch point
    • Lead up to midpoint
    • Midpoint of the story
    • Revelation - figure out what you are up against – Physical middle of your Novel
  3. PROACTION - Doomed attempt to take action
    • Reaction to midpoint
    • Second pinch point - allude to evil force again
    • Reaction to second pinch point
    • Pre second plot point lull - give the reader a tidbit of info – take a breath
    • Lead up to second plot point
    • Second plot point - the world changes again
    • Start the Ticking Clock
  4. RESOLUTION
    • Hero accepts reality of the situation
    • Climax battle scene
    • Final Resolution
    • New equilibrium/cliffhanger if writing a series
Actually, it looks exactly like this. I've downloaded it from his web site. He even goes the extra mile to create a story with us and point out famous books that used this structure.

Bottom line: as a reference, it is a great little thing. It is actually part of a Nine Day Novel series that covers outlining, writing, self editing, self publishing, etc. It's too bad he plugs the Scrivener book writing software tool, which only seems to work on Mac. I've tried installing the Windows version and it is a crappy Java bull that never went past the start of the installer. That may indicate that the book is slightly dated, but it's not, it has been published in January 2015, at least on Amazon.

and has 0 comments
It pays to see how celebrities got to where they are. It is a continuous chain of events that feeds off their talent (or lack thereof). Just like with Angelina, here is a video with Bjork, age 11, reading a nativity story in her native language.

Here is a nice video about the Dawn mission. It is hosted by the Planetary Society and very accessible for most levels of understanding of science and astronomy. Check it out, it is a fascinating mission.

Sarmale is a dish that is traditionally eaten around Christmas in Romania, although you can make them all year round and some Romanians do. This type of food probably has Turkish origins, since the word "sarmak" means "roll" in Turkish and "leh" is a common Turkish pluralization. Not that I know Turkish, but part of Romania was conquered by them, so some things remain. Sarmale is one of the good ones, but it is a time consuming dish to prepare so I never cooked it myself. That's what parents are for, right? However, recently when I was abroad, I found myself wanting to cook some for my foreign friends. Unfortunately I couldn't do it then, but the idea to cook some tasty sarmale remained.

Today me and the wife set off to do just that. She knows how to make them, unfortunately. That means that my giddiness was uncalled for, since I expected numerous improvements on the recipe, but instead I was coerced to follow "the law". Even worst, due to differences in taste and digestive systems as well as a lack of some more exotic ingredients, the recipe we agreed on is some of the simplest possible. No onion, no garlic, no paprika, no parsley in the mix, nor bacon or tomato sauce - only outside. However, I am sure that even so they will be extremely tasty and the simplicity of this recipe means even people that don't know how sarmale should taste like can do them at home and then experiment with their national ingredients.

Without further ado:

  1. mix pork and veal chopped meat with some rice and pepper (and optionally thyme)
  2. wrap mixture in pickled cabbage leaves to get the sarma rolls
  3. put rolls in a large pot in the following fashion
    • first a layer of simple chopped pickled cabbage
    • a layer of sarmale, put one next to the other, but with some small space left, since they will grow
    • put a layer of chopped pickled cabbage and some bacon and a bit of smoked meat (like ribs), more thyme, maybe a little hot paprika
    • repeat the previous two steps until the pot is full
  4. add water to fill the space
  5. place in oven at 150C (300F) and cook for at least three hours


The time consuming part if the making of the rolls, which not only requires manual labor for each roll, but also needs good cabbage leaves, cut in the correct way. Plus the long cooking time. In Romania we eat them with polenta, sometimes with cream or yogurt, while biting from raw chilly peppers. Some prefer them hot, some like them cold. I especially like the cold ones, because you can just pick them up and eat them.

Now, the dish called sarma is done differently in each country. If you google "sarma" you get recipes from the former Yugoslavia (see this, as an example), but if you google "sarmale" you get the Romanian ones (Here is a decent one). The types of leaves used, the mixture, the cooking style may very drastically. I, for one, want bacon,onion and garlic in the dish. I would also add some tomato sauce and hot paprika in the mix on principle. I wanted to experiment with different types of meat, coriander, cumin, Indian spices and so on. There are also different types of leaves, but I would say that the pickling of the cabbage is one of the main reasons why the sarmale are so good. Perhaps other types of leaves could also be pickled, but that means I either have to do it myself or use the standard ones that you can find already pickled at the market. Perhaps one of the things that makes my mouth water the most is to add some mutton sausage mix in the meat, moving more towards the Arabic style of meat dishes, or just add sheep fat over the sarmale when they are cooking.

But why stop there? If you look at the various recipes, some of them start off by frying the garlic, onion and rice. Some of them add egg to hold the mixture, or celery, or parsley or other things. I know vegetarian people that don't put meat in the mix, or people like my wife who don't want fried onion in their food. There are fish cabbage rolls, there are chicken ones, some people use fine cut potato with or instead the rice. The leaves are usually either grape leaves or cabbage, although some don't use pickled leaves and any large leaf can be used (or even small ones if you are a clock maker with OCD). One example that I've heard about and doesn't appear in the Wikipedia article is using linden leaves. And the leaf type really really affects the taste. The grape leaf sarmale are eaten with yogurt, for example, while the cabbage one rarely so, but are eaten with hot paprika or chilly peppers. In other words, one can create any type of roll using any type of leaf with any type of content, as long as it absorbs the water and fat that carry the taste of the leaf and the other ingredients.

So, do you feel a little inspired by this or not? It is one of the most common Romanian slow cooking dishes and a delight to eat.

and has 0 comments
The first thing to notice about Robin Hobb's writing is that it's good. Characters are well written and well embedded in the scenes, scenes are well described, albeit sometimes too well, the world is well defined and the story feels both original and familiar, so it wasn't difficult to enjoy reading the three books in the Farseer series. Sure, there were issues with the story that I felt frustrated about, and I am afraid to say that it comes from the female perspective of the writer, more than not, but overall it was really difficult to put down once I started reading it.

The main character of the story is the bastard of a royal prince, next in line to the throne, that is being brought by the maternal father to the prince's doorstep. It's yours, you take care of him, that sort of thing. The poor mother had nothing to say in the matter, although why that stayed like this for the rest of the story is unclear. Immediately the existence of this child leads to major changes: his father doesn't come to see it or recognizes him in any way, but abdicates from his royal position and retires to the country, where he is subsequently murdered. The child is raised by the prince's most loyal man, a stableman that is tasked to the boy's care by the prince himself before his death. The old king takes a fancy to the boy and keeps him at the castle if he agrees to become a King's loyal man and become the apprentice of the royal assassin. Several other things happen that see him trained in fine writing, royal intrigue, sword fighting and so on.

Another important aspect of the story is the magic. The Farseer royal line, meaning the king and his sons, are strong in the Skill, something that gives them mostly power over other people or the ability to see or communicate at great distance. There is another type of magic that comes from the mountain folk called the Wit, which is the ability to communicate and even bond to animals. The latter is seen as disgusting and sometimes criminal and many a person was put on trial and killed for having a talent in this type of magic. Guess what? The bastard has both talents.

So it starts like the normal fantasy young adult plot, where the main character is a hapless child that discovers he has superpowers, but Hobb makes this as an unpleasant experience as possible for him: lost friends, jealous uncles that see him as next in line for the throne if ever recognized by royalty, a tragic attraction for a childhood friend, the moral dilemmas associated with being an assassin, deceit, torture, and so on. I will not spoil the book for you, so I will stop here.

The thing that annoyed me the most about the book was the inconsistency in some matters. One moment he is a berserker brawler attacking with a big ax and killing dozens, the next he is traveling everywhere carrying swords or staffs and having fear of two or three people. At one moment he is a trained assassin, the next he can't figure out how to kill people. At one time he blows a powder in someone's face and they immediately die, the next he doesn't know how to kill people that he routinely gets close to, one moment the love of his life is the most important thing, the next he ignores her for a few months while he does stuff for the king. Also, he is loyal to a fault, while everybody else, including his wife and his so called teachers, treat him as a child and keep essential information and training from him. This gets worse and worse as you get closer to the end of the story. The first book was wonderful, the second gets more inconsistent and the decisions of the characters are really weird and the third is filled with WTF moments. The most annoying thing of all is the ending, which features some spectacular sacrifices that are completely invalidated a few pages later on.

Bottom line: the kid is much more effective, smart and logical when he is a child. As he goes through puberty he gets worse and worse until his only skill seems to be listening to what others say and obeying for no good reason. If you don't like the books too much, be happy that the story ends satisfactorily with the three books, if you do like the writing and the world Hobb describes, there are many other books set in the Elderlings world, including a sequel trilogy to the Farseer one called Fitz and the Fool.