I've stumbled upon this Windows port of a Linux application called HotBabe. What it does is show a transparent image of a girl over your applications that looks more naked as the CPU is used more. I wanted to use my own pictures and explore some of the concepts of desktop programming that are still a bit new to me, so I rewrote it from scratch.

The project is now up on Github and is functional. Please report any bugs or write any feature requests here or on the project page in order to make this even cooler.

Features:
  • Custom images responding to custom measurements
  • Custom measures (included are Cpu, Memory and Random, but an abstract class for custom monitor classes is included)
  • AutoRun, ClickThrough, Opacity control
  • Interface for custom images and custom monitors
  • XML config file


Update: After adding a lot of new features, I've also written a blog entry about the highlights from HotBabe.NET's development, a "making of", if you will. You can find it here: Things I've learned from HotBabe.NET.

Enjoy!

and has 0 comments
After the horrible dissappointment with the third book from the Dexter series by Jeff Lindsay, I even forgot there was a fourth book coming. Thanks to my friend Meaflux, who kindly remembered me to not miss on my education as a serial killer, I found out the fourth book, Dexter by Design, was out and, (thank you, Jeff!), without any of the fantasy monster crap that made Dexter in the Dark so bad.

Dexter by Design was a really nice book. It captured the dark humour only a geeky psychopath would have, caught in a world of emotional people, it added a lot of tension, it went cursively from start to end. The only problem I could possibly have with it is that it made Dexter look bad, easily surclasses by not one but three people on three separate ocasions.

The conclusion is that it was one of the best, if not THE best in the series. Not a lot of killing is done, though, not by Dexter in any case. And if you are wondering, it has no connection with the third season of the Dexter TV series, except for the ending :).

and has 0 comments
The last book (in story time) in the Deepgate Codex series, God of Clocks was a huge disappointment. It started nicely enough, preparing us for epic battles of wit and weirdness. Reading it, I was about to forget all about the slight drop in quality in the second book, Iron Angel, and was preparing for something grand. Then Mr. Campbell did what he never should have done: he altered the time space continuum. Before I knew it I was thinking at that old sci-fi movie where a ship boards another ship while in hyperspace and because of chaotical relativistic effects they all end up getting old, then young, then meeting themselves, fighting along their older grandsons, fighting the enemy with sticks and so on. For the love of God, I don't remember the name and I did Google it, but got only crap pages.

Anyway, Mr. Campbell, haven't you watched sci fi movies until now? Haven't you read a lot of SF books that make the same mistake, drowning in their own pool of possibilities. Time travel, unless it is the main subject, always messes up a story. And I was already confused with all the gods that were nothing more than angels with over inflated egos that anyone could capture and kill, the assassin that turned into mother-do-good, the boy demon who thought John Anchor was his father and that little child that is older and more powerful than him... so all this became very jumbled. No wonder a lot of the threads just remained hanging. What happened to Devon? Who the hell was the little girl? What did Carnival do? Everything just got negated by a race towards the beginning of time, when Ayen blocked the gates of Heaven. And then poof! A lot of fast scan scenes and the book ended. The fight never took place, or if it did, it was never described. And don't worry, if you preferred any other ending, there must be a broken timeline floating like a disolving icecube in a water glass that you can climb on and enjoy whatever reality you desire.

This book must be one of the most (if not THE most) WTF book I have ever read. In the end I was pacing, swearing and regretting my lost time. If the Deepgate Codex series would have been a video game, it would have never been released, with all the lack of documentation and obvious bugs.

My conclusion: what a nice beginning with Scar Night, but what a faltering fiasco up to and through God of Clocks. It did manage to make me think of a book where the main character would be Carnival, and all the rest would be just detail. I just loved her character and I feel so unfulfilled because it was never properly developed.

and has 0 comments
If you watched one of the episodes of Rescue Me you possibly have noticed that there is a cool song in the opening. It is Com'on Com'on by Von Bondies. Here is a live performance for Letterman's Show:

and has 0 comments
Iron Angel starts where Scar Night left us. Even if the scope of the story now expands tremendously, doing credit to the author's imagination, I didn't feel so good reading it as I did Scar Night. Frankly, I don't know exactly why. It may have to do with the several character groups in the plot, which we follow separately for quite some time and that I know are bound to encounter each other or influence each others destinies. When that fails to happen for a long time, I get nervous. Also, while the description of hell was very nice, I found it difficult to swallow.

That doesn't mean it is not still a brilliant story, just that it seemed to falter a little in the middle. Now, almost close to the end of God of Clocks, I can say that the quality will improve, at least as measured from my own level of pleasure, although it doesn't get close to Scar Night yet.

I love that Alan Campbell really worked on his characters, making them very different to the formulas we are used to see in the field. Heroes are cowardly and impotent, women are strong, gods are flawed and some characters are simply likeable even if they don't see reason and exist for the sole purpose of physical revenge.

I can say that God of Clocks is at least intriguing, although I have to ask myself if the author didn't bite more than he can chew with the new concepts involved. Anyway, that is another post, coming soon on a blog near you.

and has 0 comments
A while ago I was writing of the ending of the anime series, well before the story in the manga, leaving me wanting more. Well, a new series has been started that continues the plot. The English translated first episode of Inuyasha Kanketsu-hen has been released on the 4th of October 2009.

Attached properties allow you to add new properties and functionality without changing one bit of the code of the affected classes. Attached properties are quite similar to Dependency properties, but they don't need an actual property in the affected object. You have probably worked with one when setting the Grid.Column property of controls inside a WPF Grid.

How does one implement it? Well, any class can have the static declaration of an Attached property for any other class. There are decorative attributes that indicate to which specific classes the property should appear in the Visual Studio property window. The caveat here is that if the namespace of the class has not been loaded by VS, the property will not appear, so it is better to place the class containining the property in the same namespace as the classes that the property is attached to.

Well, enough with the theory. Here is an example:

public static readonly DependencyProperty SizeModeProperty
= DependencyProperty.RegisterAttached(
"SizeMode",
typeof (ControlSize), typeof (MyEditor),
new FrameworkPropertyMetadata(
ControlSize.Custom,
FrameworkPropertyMetadataOptions.OverridesInheritanceBehavior,
sizeModeChanged)
);

[AttachedPropertyBrowsableForType(typeof (TextBox))]
public static ControlSize GetSizeMode(DependencyObject element)
{
if (element == null)
{
throw new ArgumentNullException("element");
}
return (ControlSize) element.GetValue(SizeModeProperty);
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public static void SetSizeMode(DependencyObject element, ControlSize value)
{
if (element == null)
{
throw new ArgumentNullException("element");
}
element.SetValue(SizeModeProperty, value);
}

In this piece of code I have just defined a SizeMode property for a class called MyEditor, the default value being ControlSize.Custom. To use it, I would write in the XAML something like MyEditor.SizeMode="Large" and it would attach to any DependencyObject. The FrameworkPropertyMetadataOptions flags are important, I will review them later on. This also declares a sizeModeChanged method that will be executed when the SizeMode changes.

The GetSizeMode and SetSizeMode methods are needed for the attached property to work. You might also notice this line: [AttachedPropertyBrowsableForType(typeof (TextBox))], decorating the getter, which tells Visual Studio to display SizeMode in the properties window of TextBox objects. Another possible attribute is [AttachedPropertyBrowsableForChildren(IncludeDescendants = true)] which tells Visual Studio to display the property for all the children of the control as well.

Now, how can this be useful? There are more ways it can.
One of them is to bind stuff to the property in Triggers or Templates like this: Binding="{Binding Path=(Controls:MyEditor.SizeMode), RelativeSource={RelativeSource Self}}". This is interesting because one can use in the visual UI properties that are not part of the actual code or ViewModel.
Another solution is to use the change method, but be careful that the method must consider all possible uses for the property and also it will not work for when you explicitly set the default value (as it doesn't actually change)! Let me detail with a piece of code:

private static void sizeModeChanged(DependencyObject d,
DependencyPropertyChangedEventArgs e)
{
FrameworkElement elem = d as FrameworkElement;
if (elem == null)
{
throw new ArgumentException(
"Size mode only works on FrameworkElement objects");
}
switch ((ControlSize) e.NewValue)
{
case ControlSize.Small:
elem.Width = 110;
break;
case ControlSize.Medium:
elem.Width = 200;
break;
case ControlSize.Large:
elem.Width = 290;
break;
case ControlSize.Custom:
break;
default:
throw new ArgumentOutOfRangeException("e",
" ControlSize not supported");
}
}


Here I am setting the Width of a control (provided it is a FrameworkElement) based on the change in SizeMode.

Ok, that is almost it. I wanted to shaed some extra light to the FrameworkPropertyMetadataOptions flags. One that is very important is Inherits. If set, the property will apply to all the children of the control that has the property defined. In the example above I first set FrameworkPropertyMetadataOptions.Inherits as a flag and I got an error, because it would try to set the Width to children controls that were not FrameworkElements like Border.

Another interesting page that is closely related to this is I’ve created an Attached Property, now how do I use it? where an Attached property is used in a Behavior, which is actually implemented by the Blend team and, as such it is still in the Expression assembly. Here are two other pages about this:
Using a Behavior to magnify your WPF applications
The Attached Behavior pattern.

and has 0 comments
I was reading this interview of the guy from The Wertzone blog, a Sci-fi and fantasy blog that I enjoy reading, and he recommended some movies and some games and some books. So, on his recommendation, I started reading Scar Night, by Alan Campbell, and I have no reason to regret my decision (other than the one I will not be able to read another technical book until I finish the saga).

The writing style is nice, although I wouldn't say it rocked my world, however the world the author has envisioned is really great. Imagine a large city built upon great chains of alien metal, suspended over hell itself, inhabited by people worshiping a version of the devil, their church defended by angels called archons and armies of assassins. There is more, but you just have to read the book. What I also enjoyed tremendously is that the characters are very different from one another, ranging from mad scientists to priests corrupted by their desire for the greater good, from good hearted assassins to undead gods and inept cowardly angels.

I can only recommend you read this book, the first from the Deepgate Codex trilogy. Funny enough, the writer, Alan Campbell, was one of the authors of the Grand Theft Auto game, so he is also a software developer. I am hooked.

Did I mention I love how this guy writes?



My world view is limited by the data that comes to me. I have my tiny slice of reality, a few friends, my work, then there are movies, news, documentaries, the Internet and so on. You will notice that I placed them in a certain order, it is the order that to me seems to go from more bullshit and less information to more information. I never believed the expression "Truth is stranger than fiction", so lets set the slice of reality aside. And, being first on my list... full of bullshit :)

Movies teach me a lot, but there is just as much untruth and deceit in them as there is stuff worth knowing. News are focused on a part of life that normally doesn't interest me, but they still have a higher percent of useful information. Then there are the documentaries, stuff from Discovery Channel and the likes. Well, I have mixed feelings about those. There are things that they teach me and they do it in a pleasant manner, yet, by the time they end, I feel like there is so much more that I wanted to know and that it all just stopped when it got interesting. On further analysis, it seems the quantum of information in an hour of film was something I could blog in two or three paragraphs.

And then there is the Internet. It is bursting with information, if only I knew where to look and only if I had the discipline of researching, summarising and storing that information. I am working on that, even this blog is used to store what I find, but I am still only an amateur. There is something that attracted me a while ago, something called Open Courseware. There were courses from the largest universities, freely available on the net. However, they left me feeling disappointed as they were mostly text, the few that were in media format were mostly audio and, in the end, they were only poor recordings of classroom courses, sounds of scribling on the blackboard included.

Enter The Teaching Company, a company that produces recordings of lectures by nationally top-ranked university professors as well as high-school teachers. The lectures are well done, they feature some guy or gal that present the information without having to write stuff on blackboards. If anything is to be shown, it will be a computer slide or animation, while the details on spoken information are added to the screen (for example the names of people). Wonderful stuff, only it is not free.

If you go to the official site you will find courses on just about anything, priced at around 35$ per download and 70$ per DVD if they are "on sale" and the rest of them going to about 250$, with a range of 20-40 lectures per course. Of course, there is the option of looking for "TTC torrent" on Google and see what you find there. For the people in Africa that just got an Internet cable installed, I mean.

I had the luck to start with linguistics (Understanding Linguistics: The Science of Language by John McWhorter), lucky not because linguistics is so interesting, but because John McWhorter was really charismatic and had a very well constructed set of lectures. And because linguistics is an interesting topic, at least at the introductory level of this course. It was funny, too, the guy is what I imagine a typical New Yorker to be. He is black with a Scottish name, he talks a lot of Broadway plays and old movies, he is socially astute; very cosmopolitan.

Then I went for astronomy (New Frontiers: Modern Perspectives on Our Solar System by Frank Summers). If you like those National Geographic documentaries about the solar system, you will love this. Towards the end it got detailed in a bad way, but only compared with the beginning of the course, which was really well done. The lectures are about the Solar System, from the standpoint of a modern astronomer, in light of all the recent discoveries. Also, a very well made point about why the structure of the solar system was revised and Pluto got demoted. At the end it talks of other star systems and what are the methods to detect and study them.

Not all the courses are so good, though. I had the misfortune of trying out Superstring Theory: The DNA of Reality by Sylvester James Gates, Jr. The guy is a black man in his late fifties who tries to explain Superstring theory without using any mathematics. He starts by repeating a lot of what he said in previous lectures and, indeed, in the same one earlier on, then goes asking these stupid questions that repeat what he said again. Something like "As I said in a previous lecture this and this and this happened. But why did this and this and this happen?". Ugh. If it was only about that, I would have finished watching the course, but it was something completely unstructured, boring and dragging. After 12 lectures out of 24 I knew nothing about string theory, except vague things like "if I imagine a ball that goes towards another ball and they shout at each other and the waves make other balls while the previous balls disappear but wait they appear again...". What I knew is that I had to stop watching. Sorry, Mr. Gates, lecturing... just not your thing. Stick to short appearances on Nova PBS shows.

Right now I am on Building Great Sentences: Exploring the Writer's Craft by Brooks Landon. It talks about constructing good sentences in order to improve one's writing. I have the feeling that the guy uses more detail than necessary. Like when he explains a concept he has to give at least 5 examples, when 2 or 3 would have been enough. But then again, maybe I am wrong. I will have to finish the course to give you a definite opinion.

Next on my list:
Quantum Mechanics: The Physics of the Microscopic World by Benjamin Schumacher
Understanding Genetics: DNA, Genes, and Their Real-World Applications by David Sadava
Introduction to Number Theory by Edward B. Burger
Understanding the Brain by Jeanette Norden

Does all this make me a very smart person? Not really. Remember that most of these are introductory courses. They do not contain exercises or books that you need to read, nor do they require a very high level of previous knowledge in order to understand them. They are, pure and simple, like those Discovery Channel shows, only they don't end when they get interesting and they are not so full of bullshit. After watching one of these courses (or, indeed, listening to them as podcasts while you are going to work) you will have an idea on where to go digging deeper for the topics that interest you.

Good learning!

and has 0 comments
Ugh! The fifth book of the Revelation Space series , The Prefect, is the worst so far. Not only is it standalone, but it is also a prequel, something that happends pre-plague. All the characters seem to have been lobotomized some time in the past (possibly in an operation that also mixed their brains around so that they all sound and act the same), including the bad guys, and the story is completely boring. Nothing in this novel makes any sense, nor does it make you feel anything special, quite the contrary, the scenes that were supposed to bring out feelings for the reader felt really forced and had the opposite effect.

The only good thing in the book was the ClockMaker, all 10 pages of it or whatever. Couldn't you start with the ClockMaker, continue with the ClockMaker and end with the ClockMaker and forget all about the stupid and randomly emotional people, mr Reynolds?

and has 0 comments

I didn't know about this, however, through a weird series of events, I have read about this in a book, then heard about it from a friend, then wiki'ed it and got really disgusted, then found it in the news, as the UK government finally issued an apology to one of the great men of computing.

Here is the government apology link and (apparently, the apology was too much for the Brits to leave on their web site for too long. Instead, you have to read the text from the historical archives of the government site hereanother link from a blog I am reading which says just about what I was going to say.

I have to say that governments scare the shit out of me. The things they can do are so horrendous that most people refuse to think about it. And as the sleep of reason produces monsters, they usually become monstrous. After all, what are they than a big clump of responsability that every citizen sheds in order to feel good about doing nothing?

So, sorry, Alan Turing, for being part of the species that did this to you! I truly feel ashamed.

Update 24 December 2013: The UK government issued a pardon for Alan Turing. Posthumous, a gesture that would be rather pointless if it weren't for the chronic inability of authority to admit to their mistakes (not to mention actually pay for them).

and has 0 comments
We all know that dogs are smart. They understand verbal commands and can make complex decisions in new situations. However, they can't speak. Well, there are some weird rare cases of dogs sort of snarling "mama", but it's not real speach.

Right now, though, I've had an epiphany: dogs WON'T SPEAK, because they simply are not equipped to. They are smart enough to try and learn from their failures. However, the dog that lives next to my office now howls to the same notes as the ambulances that pass by the building. Also there are numerous cases where dogs are howling in the tune of a song they hear.

Now this is my idea: what if dogs are able of speach, just not human one? What if a properly constructed highly vocal and high pitched language would work for dogs? WE could not speak dog then, but we are smart, we have devices and computers and stuff like that.

Update: Having thought a bit more about this I have come to a conclusion. It makes sense that dogs should be able to communicate by howling. Duh! They are descended from wolves. They are still, genetically speaking, wolves. What about the barking? Wolves bark when they are pups. Somehow, the domestication process makes canides retain some youthful characterstics. Therefore, it only makes sense that they should be able of communication at a higher level through howling rather than barking. Although, dogs being smart as they are, it is only one hypothesis that needs proof.

My friend, Meaflux, by his own description "an anthropology buff", reminded me of the other "smart animals", the Cetacea order, whales and dolphins and such. They sing, they use high pitched wails (whails? :D) to communicate. I agree, it makes sense underwater, but since they are descended from a wolf like ancestor and since fish don't use this communication system, I would say there is a strong connection.

So, in conclusion, it is possible that the pack communication method of wolf howling combined with the millenia old dog interaction with humans could result, with some training, in sone sort of meaningful conversation skills? If only people working with dogs and apes would read my blog...

Today I've updated my computer with the latest patches from Microsoft and then, starting a project, I noticed that it didn't look right in Internet Explorer 8. For example a table with an empty td of width 1px looked as if having 4px. Setting it to 2px or above made it look of having 2px or whatever value I had chosen. I have solved the situation by adding content to the td in question (a simple  ), but before today I have not had this problem.

Update: This blog post was previously called "Microsoft updates breaking changes?" but in the meanwhile I have determined what the problem was. It was the zoom! I had my IE set to 75% zoom. That caused the weird behaviours and appearance.

The solution is still working, but the problem should be rephrased as "Why do the widths of td elements behave strangely when setting smaller zoom in Internet Explorer?".

Just for kicks I tried duplicating the problem using the zoom:75% style setting on body and, even if it looked bad too, it was a completely different behaviour.

First time I've ever heard of cymatics and I am intrigued. basically you use some (physical) devices to visualize soundwaves. Here is a small TED presentation about it:



My question is simple: can this be used to "understand" sounds for deaf people or are the pattern transitions too complex? googling for cymatics I've found a lot of videos about water and cornstarch moved by sound and links to "sound healing" and even some technical papers that never seem to have left academia. I think this could be interesting enough to emulate on a computer, yet I have not found code for it yet.