Obama’s acceptance speech
Posted by Saulo on November 7th, 2008 in News. No Comments
Thanks to my friend Gabx for sending me this great artwork by pluckylump from deviantArt.

I support Barack Obama. That is all.
Edit: Obama is the new elect-president! Congratulations!
Google Chrome, a new web browser
Posted by Saulo on September 1st, 2008 in Technology. 1 Comment
Google confirmed tomorrow’s launch of Google Chrome beta, a new open source web browser that borrows the rendering engine from Apple’s WebKit and components from Mozilla Firefox.
An important design aspect behind Google Chrome is that each tab will be assigned an entire process instead of a thread within a process. This means that if a particular website causes the page to hang, only its tab will have to be closed. In addition, a task manager will allow the user to see which page, plug-in or web application is consuming system resources, a feature available in all modern OSs.
Google has published a comic that explains in 38 pages their web browser project.
How will this affect the battle for market share between existing web browsers? Will Google Chrome be adopted by Firefox or IE users?
Update 1: added a screenshot (found at TechCrunch).
Update 2: The Google Chrome webpage is up.
Goodbye PensCMS, hello Wordpress!
Posted by Saulo on August 28th, 2008 in Site updates. 1 Comment
After realizing that I would never match the power of hundreds of developers behind Wordpress’ success, I decided to ditch my own custom, ad hoc content management system. PensCMS had been around for eight years, and I had just successfully solved the spam problem with reCAPTCHA (I know, I should have thought about that before!). The other thing that really bothered me with my own blogging software is that in order to add images to a post, I had to manually resize, upload via FTP and paste the code for them, which was a painful process to say the least.
I prefer to always include at least an image with my posts, so this was a big issue for me. As I thought about a solution, I had a sudden spark of humbleness: maybe it’s OK to use other people’s work instead of doing it all myself from the ground up.

Wordpress
After some research, I narrowed down to two options: Wordpress and Blogger. The reason why I chose the former is that I wanted to transfer all my posts and comments from my old blog. The easiest way of doing so (although a bit long and tedious) was to manually add them to the database. The other option was to convert all posts and comments to XML—which I did—but I was unable to import into Blogger. Besides, there is no way of creating the about and thoughts pages on the Google-maintained blogging system.
I spent the whole day yesterday moving posts and comments, customizing the Simpla theme and installing plug-ins. I left behind some posts that were either too old or too silly—I did keep the ones that were chronologically interesting such as the post on how Firebird (now “Firefox”) was good alternative to IE.
I am happy with the results and I will try to write more often now that I don’t have to open Paint.NET and FileZilla in order to post an article!
Applying the Chinese Remainder Theorem
Posted by Saulo on October 2nd, 2007 in How-Tos. 3 Comments
In public-key Cryptography, especially with the RSA algorithm, the Chinese Remainder Theorem is often used. Say you have a system of simultaneous congruences as follows
x
a1 mod m1
x
a3 mod m2
![]()
x
ak mod mk ,
where m1, m2, …, mk are coprime, i.e. gcd(m1, m2, …, mk) = 1. How can we solve for x? The solution is quite straight forward, but could involve a fair amount of calculations. I find that breaking down the method into smaller steps makes it easier to find and fix mistakes. By the Chinese Remainder Theorem, the solution to that system of equations is
x = (a1M1y1 + a2M2y2 + … + akMkyk) mod M ,
where Mi is the product of all m’s except for mi
,
yi is the multiplicative inverse of Mi modulo mi
yi
Mi-1 mod mi ,
and M = m1 * m2 * … * mk .
Let us try a numeric example. Here is a system of simultaneous congruences:
x
12 mod 25
x
9 mod 26
x
23 mod 27
We start by calculating M1 and y1:
M1 = m2 * m3 = 26 * 27 = 702
y1 = M1-1 mod m1 = 702-1 mod 25 .
We apply the Extended Euclidean Algorithm to find the multiplicative inverse of 702 relative to 25:
702 = 28 * 25 + 2 → 2 = 702 – 28 * 25
25 = 12 * 2 + 1 → 1 = 25 – 12 * 2
= 25 – 12 * (702 – 28 * 25)
= 337 * 25 – 12 * 702
Then y1 = 702-1 mod 25
-12
13.
The same calculations can be carried on to find M2 = 675, y2 = 25, M3 = 650 and y3 = 14. Now it is just a matter of plugging in the values into the equation:
x = (a1M1y1 + a2M2y2 + a3M3y3) mod M
= (12*702*13 + 9*675*25 + 23*650*14) mod 17550
470687
14387
To verify our answer we can plug that number back into the system:
470687 mod 25
12
470687 mod 26
9
470687 mod 27
23
Support peaceful protest by monks in Burma
Posted by Saulo on September 27th, 2007 in Personal. No Comments

Related links (constantly updated):
A bit of a headache with my webhost
Posted by Saulo on September 18th, 2007 in Site updates. No Comments
I was told that HostingIt365’s webserver was hit by a DoS attack and their DNS file got corrupted. I had to change servers twice in the past week; depending on your location, pensador.org could be pointing to three different copies of this website. I will wait until the DNS records get replicated worldwide and then I will try to synchronize the data between them.
Another kidney stone bites the dust
Posted by Saulo on August 29th, 2007 in Personal. 4 Comments

This Monday I had yet another renal calculus crisis—the second one in less than 12 months. There was I, in the emergency section of the local hospital contorting in pain from 18:30 to 22:30. By 23:00 the stone had moved from my ureter to my bladder, which reduced the pain, and by the next day it finally got expelled from my system. After a blood test and an x-ray, the doctor said I had to drink more water and reduce the salt in my diet. I am considering taking Herba Desmodii capsules, a natural diuretic, which a co-worker said does wonders to kidney stones.
A little Bossa and custom players on YouTube
Posted by Saulo on August 23rd, 2007 in Personal. No Comments
Here’s a little Bossa Nova for you to listen to when you get home from work. Just sit back and relax. I wanted to give YouTube’s custom players a try—I’ve put together this playlist with my favourite Bossa Nova videos.
How games negatively affected my life
Posted by Saulo on July 17th, 2007 in Personal. 22 Comments
A short but true story of someone who decided to quit World of Warcraft.
In the afternoon of November 23 of 2004, after my last class of the day, I headed to a computer store where I had reserved a copy of World of Warcraft Collector’s Edition. Three years later, I look back and I realize how I almost ruined my life with a computer game.
I am an undergraduate in Software Engineering. I feel kind of silly writing this, but I will share my true story with the intent of helping somebody who might be going through what I went through. I hope this will not bore you.
I was addicted to WoW during my first year of university. I seemed to be a pretty dedicated student; I did not miss any lectures and took detailed notes. However, my head would wander elsewhere—be it sketching my character, building its skills and planning the next quests. As an active member of a guild, I was the first to get a mount. Every day of my life led to the same—as soon as I got home, I would go straight to the computer and log in to WoW. My idea of having a good time was spending hours and hours in front of the screen completing quests, leveling up and earning gold at the auction house.
All was fun until I saw my first transcript: A+, C+, C+, C, C-, D+, D, D-, D- and D-.

With these results, I had a GPA of 1.96. In my institution, you need to keep it higher than 2.00, or else you get expelled. I decided to take a definite and concrete action. Not only did I uninstall WoW from my computer but also I completely eliminated games from my life. If I told you that I even removed the solitaire card game that comes with Windows, you would probably laugh, but I really wanted to stick with my resolution.
I also changed my studying habits. I stayed long hours at the university, reading lectures in advance, redoing exercises, rewriting notes—I pretty much lived at the library at that point. When I got my transcript I thought it was someone else’s: A, A, A, A-, B, B, B, B, B-, D+ and D-.

I knew that if I could stay focused and stick to my study routine, I would do even better. I was not mistaken. Here is my transcript for the third year: A+, A, A, A-, A-, A-, B+ and B-. Nothing below a B-grade, and now I have a cummulative GPA of 3.02.

That is only one side of my life that changed. Since I quit, I have met many interesting people, including a gorgeous and smart girl who is now my fiancée.
Some will say that it was not the game that influenced me but it was I who had problems in the first place; that might have been the case. I agree that games do not ruin lives, people ruin lives; all I can say is that I am a much more complete and happy person now.

