and has 0 comments
I don't pretend to know much about mathematics, but that should make it really easy to follow this article, because if I understood it, then so should you. I was watching this four episode show called Story of Maths. Its first episode was pretty nice and I started watching the second. The guy presented what he called the Chinese Remainder Theorem, something that was created and solved centuries before Europeans even knew what math was. It's a modular arithmetic problem. Anyway, here is the problem:

A woman selling eggs at the market has a number of eggs, but doesn't know exactly how many. All she knows is that if she arranges the eggs in rows of 3 eggs, she is left with one egg on the last row, if she uses rows of 5, she is left with 2 eggs, while if she uses rows of 7, 3 eggs are left on the last row. What is the (minimum) number of eggs that she can have?
You might want to try to solve it yourself before readind the following.

Here is how you solve it:

Let's call the number of eggs X. We know that X 1(mod 3) 2(mod 5) 3(mod 7). That means that there are three integer numbers a, b and c so that X = 3a+1 = 5b+2 = 7c+3.

3a = 5b+1 from the first two equalitites.
We switch to modular notation again: 3a 1(mod 5). Now we need to know what a is modulo 5 and we do this by looking at a division table or by finding the lowest number that satisfies the equation 3a = 5b+1 and that is 2. 3*2 = 5*1+1.

So 3a 1(mod 5) => a 2(mod 5).

Therefore there is an integer number m so that a = 5m+2 and 3a+1 = 7c+3. We do a substitution and we get 15m+7 = 7c+3.

In modular that means 15m+7 3(mod 7) or (7*2)m+7+m 3(mod 7). So m 3(mod 7) so there is an integer n that satisfies this equation: m = 7n+3. Therefore X = 15m+7 = 15(7n+3)+7 = 105n+52

And that gives us the solution: X 52(mod 105). The smallest number of eggs the woman had was 52. I have to wonder how the Chinese actually performed this calculation.

Let me summarize:
X 1(mod 3) 2(mod 5) 3(mod 7) =>
X = 3a+1 = 5b+2 = 7c+3 =>
3a 1(mod 5) =>
a 2(mod 5)=>
a = 5m+2 =>
X = 15m+7 = 7c+3 =>
15m+7 3(mod 7) =>
m 3(mod 7) =>
m = 7n+3 =>
X = 15(7n+3)+7 = 105n+52 =>
X 52(mod 105)
.

For me, what seemed the most hard to understand issue was how does 3a 1(mod 5) turn into a 2(mod 5). But we are in modulo 5 country here, so if 3a equals 1(mod 5), then it also equals 6(mod 5) and 11 and 16 and 21 and so on. And if 3a equals 6(mod 5), then a is 2(mod 5). If 3a equals 21(mod 5), then a equals 7(mod 5) which is 2(mod 5) all over again.


Well, this is a time of great change in my life. First I had to give my cat away, due to medical reasons. I had him for more than 5 years and I really liked him. Now he is living in the countryside, with my parents in law, trying to get some pussy (sorry, couldn't help it :) ) and getting beat up for it by sturdy country female cats.

A few months after I got the cat, I also got a new job, prompting me to write my first blog entry. I was saying then that I am starting my first real software developer job in an Italian company. Now, after almost five years, I am giving away my cat and also changing jobs.

My new company is (hopefully) a place where I can accelerate the rate of my learning and professional development and I will be working there on a Windows desktop WPF+WCF+WF+Entity Framework application. So expect a lot of blog entries about new (for me) technologies. I will be starting work there on the first of June.

On the other hand I don't know if it would be permitted (or I would have the time) to stay available for chat on the blog, so if I don't answer, it's probably because I can't.

Wish me luck, everybody!

and has 0 comments
Here is a fun little site called Wordle. It allows the graphic creation of a compact word cloud. Unfortunately it doesn't seem to take into account the counts for the words.

and has 0 comments
After a very long wait, one destined to only increase expectations on this movie, the second adolescent Naruto movie, Bonds, reached me. Well, as with any high expectations they were destined to breed disappointment, but I think beyond that, this movie was bad in an objective way.

I mean, yeah, Sasuke and Naruto meet once again in the face of the most pathetic enemy yet. They didn't even try with this one. After a sneak Pearl Harbour attack from some weird ninjas, a four people team kicks their asses completely. Meanwhile, Naruto is fighting with Reibi, the 0-tails (I know Japanese are masters of zero-based numbering and logic, but this is ridiculous) and the master of Dark chakra. Guess what? He kicks their asses. But it was so ridiculously easy. Was Sasuke even required?

On the emotional level, it was like an atom bomb. I feel I can do anything, so I do it. And that's it. Big bang, no subtlety whatsoever. Not that Naruto is known for subtlety, but there are limits.

And on the animation... it all seemed so mechanical, unchiseled.

Bottom line: bad movie. Even worse since I waited so long for it. I can imagine a two episode mini arch in the series doing the same job, but better. It's not unwatchable, just disappointing. :(

You know how difficult is to test a web site on the many (conflicting) versions of Internet Explorer browsers that were created. While most of us don't even bother to test for anything lower than IE 6.0, there are major differences between IE6, 7 and 8. I used to use something called MultipleIEs before that contained IE versions up to 6, but now I found something that looks even better: IE Collection, boasting IE versions up to and including Internet Explorer 8.0.

I have installed it and so far I had no major issues with it. It does seem to change some part of the default IE configuration, so take a look there after you finish installing it.

A while ago I wrote a little post about pandemics. I was saying then how little we know about them and how little we are taught about disease outbreaks as opposed to, say, war. This post, however, it about the reverse of the coin: mediatization of pandemic fears.

I was watching the news and there was this news about a swine flu pandemic in Mexico. Thousands were infected, more than 100 people dead and the disease had already spread in the entire world and it was impossible to contain. Gee, serious trouble, yes? I had to stay informed and safe. (see the twisted order on which my brain works?)

So I went directly to the World Health Organization site and subscribed to their disease outbreak RSS feed. And what do I read? 27 cases of infections and 9 dead. Come again? They said 150 dead on the news. The news can't possibly lie! It must be either a) a US site where they only list US citizens b) a machination so that people don't panic when the situation is so obviously blown. [... a week passed ...] I watch the news and what do I see? The reported death toll from the swine influenza strain has dropped to about 15 people. False alarm, people, the rest of those 150 people actually died of other unrelated stuff. So the WHO site was right after all, maybe it having to do with the fact that they work with data, not viewer rates. Hmm.

The moral of the story? My decision to stop watching TV is a good one. Get the real genuine source of information and "feed" from it. I am now subscribed to the new disease outbreaks feed and the earthquake feed and I feel quite content in that particular regard.

That doesn't mean the "Swine" flu is something to be taken lightly. As of today, there are almost 1000 cases of infection world wide and, even if the flu development has reached a descendant curve, this might change. The 1918 epidemic actually had four outbreaks, two consecutive years, in the spring and autumn.

On a more personal note, my wife has (and probably myself, too) something called toxoplasmosis, a disease that you take from a cat. I only heard about it two times, one from a colleague and one from Trainspotting. It a strange disease, one that is mostly asymptomatic, doesn't have a real cure, causes behavioral changes in mice and has been linked to a certain type of schizophrenia. Wikiing it, I got that there are about 30% to 65% of the world population that have it and that the drug used to treat it is actually a malaria drug. Is toxoplasmosis the malaria of the developed world? A lot of us have it, but we bear with it?

Stuff like that shows how fragile is both our understanding of as well as our defense from the microscopic world. Could it be that, with all the medical advances from the last century, we are still in the Dark Ages?

and has 0 comments
A friend of mine asked me about what a tea was based only on pictures of the Japanese writing on the tea bag. How can I do that? I knew it was Kanji, or the Chinese style of writing, but I had no idea what to do. Looked for online Kanji character recognition, Kanji character list, etc. Nothing really worked. Until I accidentally (half through painstaking translation) bumped into nciku! Why, of course, you idiot! If they are Chinese style characters, wouldn't you be able to find an online dictionary for Chinese, not Japanese characters?

Well, nciku has a nice feature called "Handwrite Characters" which pretty much allowed me to translate the rest of the text. But the trick is to take the recognized character, then go to... Wikipedia! Because you don't really need the Chinese translation, but the Japanese one. You get the translation and the use and other useful things.

So, use nciku for online Japanese Kanji/Chinese character recognition. Yatta! :)

and has 2 comments
I have hidden the private chat [that's the blue one] by default. In order to access it, you need to click on the "Show private chat" link in the top-left. I did that because I would like people to help each other rather than talk only with me, so I recommend using the Jabbify chat [the slightly annoying orange pop-up one]. Also, when entering your name, use a real looking name or nickname. I will not even answer anymore to people called "asfdd", "sfd", "hi" and "can you help me". People with correct names that start conversations with "adsdfs" will also be ignored.

I have also added a small piece of code to remove unwanted spam comments. If you feel that your comment was not spam and it was flagged as spam, let me know in the chat (or another comment :) ) and I will fix the issue.

I urge you again to tell me if there is anything that is bothering you about the blog in order to facilitate positive change.

Have fun, keep trying and good luck!

Update: I have fixed an issue with the layout and IE making the text disappear, especially when scrolling. Also I added a little something on the left that you can copy paste to your blog. So, if you want to help me spread the knowledge put it into your blogs. I am not making any money out if this, so make Siderite famous!! :)


Gödel, Escher, Bach by Douglas Hofstadter has won a Pulitzer Prize and I believe it is the only thing that ever made me want to read other Pulitzer Prize books. I have to thank Meaflux for pointing me to this book and if he ever writes anything in his blog, you can find it here. Anyway, here is my humble review:

I have just finished reading the book and, in its self-referential spirit, I am also starting reading it. A strange loop of sorts, when starting to read a book follows finishing it. It is not an easy read, but it is certainly worth it. I was instantly both in awe and full of envy on this Hofstadter guy that I have never even heard about before.

What is the book about? I believe the most basic answer is it is about the roots of consciousness, and before you run away thinking this is some sort of new age pseudo (or fully) religious crap, let me assure you it is not. The title itself shows the perspective one gains by reading it: look at the same thing from the viewpoints of a mathematician (meta-mathematician, at that), an abstract painter and a great music composer. It's a definition of abstract thought by intersecting the works of three great abstract thinkers. But it is more than that.

The most intriguing part of the book it is how self referential it is. There are portions in the book that are modeled after Bach fugues while paraphrasing Escher drawings in order to illustrate a mathematical idea of Gödel. It talks about artificial intelligence, consciousness, the workings of the brain, formal systems, computer programming, music, art, science, mathematics, quantum mechanics, biology, genetics and does so in a way that links all these things together in a reasonably easy to understand way. It does not feel like a book made out of separate chapters, but one master-single-piece linked to itself in the most imaginative and twisted ways.

I urge you to buy the book, if you find it. I have read a text OCR version of it and I know I missed a lot. If you can't afford it, there it a torrent on the net with the PDF scanned version as well as the music, paintings and other media the book talks about.

The bottom line is that it is an amazing book. For someone like me, a software programmer dreaming of AI, it was a shame I didn't read it before. I almost believe that you will see me in buses like those old ladies reading the Bible, only with GEB in hand. I can't imagine anyone over 15 years of age that shouldn't read this book. I doubt anyone under 15 can truly comprehend it and, as Frank Herbert's Dune, it must be read every 10 years or less, just to see how much more you can understand from it.

Update: I found on the Internet a full length movie based on Hofstadter's ideas. Interesting, in a geeky/goofy kind of way. Here it is: Victim of the Brain.

and has 1 comment
A while ago I bought this LaCie 500Gb external hard drive and I was rather satisfied with it. With the occasion of the horrible Easter holidays I finally turned off my computer (after weeks of it working continuously). So imagine my dismay when I came back home, turned the LaCie on, then the computer and all I had to show for it was an USB mass storage controller error in the Hardware Manager.

After trying a few things (and noticing that the hard drive would not actually turn on, instead a tick-tock sound was heard from inside) I decided to open up the drive box, proudly written on it "Designed by F. A. Porsche". Well, fuck you, Porsche! I had to almost destroy the box to open it, then the insides had so many "one installation, no after service" components that I felt like walking on broken glass.

Anyway, inside the LaCie there is a small USB controller and an SATA Seagate Barracuda 7200.10 hard drive. I installed the hard drive as an internal drive and... nothing! Windows XP blue screen 0x0000007B. The computer wouldn't even recognize the drive in the boot up screen.

Well, after looking for drivers and stuff like that, I was resolved that the hard drive was defective and all my music, movies and books were lost. But shutting the computer down I noticed that the drive was actually spinning in its internal setup configuration. So, desperately, I tried to use the power from the internal computer power source and the rest of the drive in its USB setup... and IT WORKED!

Now I am going to buy another drive and get all data from this one, but still, if you are desperate that your USB hard drive is lost, try to open it up and power the internal drive with a normal computer power chord.

As for why the internal drive did not work directly on the computer? I have almost no idea. The Seagate site says clearly that SATA drives do not require drivers, but the various SATA controllers do! Since I already have a SATA internal drive, I think that that is not the issue. Rather, the people at LaCie used another drive firmware! The Seagate drive also provides with some downloadable firmware so it is clearly possible. As a completely desperate option to recover your lost data, I guess trying to rewrite the hard drive firmware could work, but I don't recommend it and I wonder how it is possible, considering it wouldn't allow me to boot Windows.

I hope this helps somebody. And Happy Easter everybody!

Update September 2012: after three years and a half, the drive (powered by both USB and internal computer power) started to develop bad sectors. It still works, mind you, I just removed it because I didn't need it as much. Thus ends the saga of the mutant harddrive in the computer that never sleeps and never dies [creepy music in the background] :)

and has 0 comments
Today Internet Explorer 8 appeared to me in the Automatic Updates list. I have been using IE8 for months now and so I was glad that the official release finally came out. So I downloaded and installed IE8.

The installation process has several steps. First is the removal of any previous version of IE, then a reboot, then several small steps of the setup program: Downloading IE8, Downloading IE8 updates, Installing IE8, Installing updates, Finishing installation. Well, for me, at the Installing updates step it threw an error that said the installation cannot complete because the station is shutting down, then my computer restarted.

I did have Internet Explorer available, though, so I tried a few pages. After the pages loaded, I was invariably getting an error and IE closed. "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience.". Well, so was I!

I was trying the installation of IE the third time now and suddenly a Java update traybar icon appeared. I updated Java, then I was amazed to see that IE was no longer crashing! So, my solution for Microsoft IE errors: update Sun Java! :)

Well, the Java update probably completed some steps that the installer failed to. But still :)

And interesting link I found regarding any IE error that causes the browser to excuse itself and leave is on Sandi's Site

The finale of what seemed to become my favourite sci-fi series ever (at its beginning) left me with a bitter taste in my mouth. Not only it makes no sense, but it is overall incredibly idiotic. If you haven't watched the end of the series, don't read further, because this is the mother of all ranty spoilers ever.

What makes it so emotional for me is not only that I really liked the show, but that this was not a show that was ended because of lack of planning or budget or the economical crisis, so nothing was rushed or changed. This was "meant to happen". And it sucked! Sucked worse that a vampire caught in the event horizon of a black hole that is falling into another black hole!

Not only did it not explain anything in a manner that would make sense to me, but instead it went completely overboard on all the things that I hated in the show. God exists, he somehow planned all this (oh, yeah, real modesty here, mr. Moore!), the model 6 in Gaiuses head was an angel, so was Kara Thrace, in the end they all reach Earth (this Earth) and decide to leave all technology behind (they throw the ships in the sun!!!) in the hope that starting anew would make them "break the cycle" and Hera became the chromosomal mother of all future humans. I guess leaving all that technology behind wasn't a good survival strategy for the rest of the 38000 people left alive, was it?!

If everything was God's plan, then there was no cycle except in its brain!! Forgetting mistakes is NOT a step towards not repeating them. Leaving behind technology is just as stupid! And ending the show with a couple of angels walking on Earth now and making bets on if we repeat the mistakes again or not, with background videos of the latest developments in robotics was.... there is no word in the English language for it. It is dumber than creationist! And the last half of the last episode was all about people saying goodbye to one another then going to live alone (read DIE!!) somewhere!

There is a glimmer of hope left though. The centurions were given their freedom and the last baseship. I will be looking at the sky hoping for them to return, nuke Moore and then air an all Cylon TV show about how they didn't repeat any mistake and just carried on!! Gods, this was frakking retarded!

And, of course, there is one more good thing in the series, and that is the Bear McCreary's remix of Bob Dylan's/Jimmi Hendrix's All Along the Watchtower. I am embedding the video with the cool transition from simple piano to all the instruments. Pretty cool!.

Guess what? F***ing YouTube removed the video because of a copyright infringement. What? One minute and a half of a movie scene? Geez! Couldn't find the same scene, so I am embedding All Along The Watchtower.

[youtube:qMo7WybtTWI]

The sound bit of the scene, sans the scene, can be found here. You can also see the live performance of the song here. You might also want to try Bob Dylan's original song.

Update: check out this Google event with McCreary playing the BSG theme with Raya Yarbrough as the vocalist.

and has 0 comments
This is how Dexter, the animated character in Dexter's Laboratory, begins his days. His enthusiasm for his work is amazing and inspirational, but real people rarely feel this way. Today is one of those great days for me! I woke up late, I took a long shower, I've eaten some good food, I've watched one of my favourite anime shows while getting dressed and I came to work in a beautiful sunny spring morning.

What amazing energy and how great a feeling! I feel I can do anything! Throw your legacy ASP applications at me, make me do stupid changes in even dumber web CRMs, give me the most menial degrading tasks you can think of, I will eat them whole and spit out gold! I am unstoppable!

and has 0 comments
The new spring heat seems to have brought not only flies out of hibernation, but also some cats! Their behaviour is strangely similar to that of the flies, though, hmm :)

and has 0 comments

I haven't been writing for a while, but that is because I was working! Amazingly so, as I am not known for my willingness to work. But that also has its boons, you know, as I will not only gain material wealth for my wife's shoes, but also material for the blog! :) You will have to wait a bit for that, though.

Instead, I will talk about three little gems I found while browsing ShellCity. In case you don't know, ShellCity is a blog dedicated to the tools, not the result. Every day four free utilities are being presented in this retro looking site. Anyway, without further ado:

Fences. This allows you to organize your many desktop icons by grouping them into labeled transparent folder like structures. Not only does it make your desktop look better and feel better, but when you change your desktop resolution, it also remembers the location of these groups so that when you revert, you get them in the same position! Great thing to have and my favourite in this post.

MSVDM, or the Microsoft Virtual Desktop Manager. This is pretty old stuff, but I've only recently discovered it. It is NOT an exe file and it will not be installed in the Start menu! Instead it is a taskbar toolbar. It shows four buttons which allow you to switch between four different desktops. The desktop icons remain on all of the desktops, but you can define a different background for each and the opened windows are different from desktop to desktop. So, what you use it for is to open a group of utilities based on context. As an example, open a Visual Studio and some browser windows regarding a certain project, then open another Visual Studio and some other browser windows for another project that you work on simultaneously.

WizMouse. This one is not something you immediately go Wow! about. It sits in the traybar and does only one thing: it scrolls windows when you move the scrollwheel. But it doesn't scroll the active window, but the window directly under the mouse pointer! A lot of annoyance is saved by this.

Hope it helps you all. Till next time!