Skip navigation

That’s my new year’s resolution this year.

No more working on the weekends or stressing about work when I’m not working. There’s a time for work and a time for play and I bet this separation is going to make them both more enjoyable and productive.

I might even be able to start squeezing back in some personal projects in my “play” time. Or should those go into the work allotted time slot… not sure yet. Future blog posts will tell how this resolution played out.


Why do I write?

I find it important to occasionally ask yourself why you do what you do… keeps ya grounded. So why do I bother maintaining a journal of mildly-significant tech-related achievements that mostly take place in my brain alone? Probably for the same reason I’m asking this question right now: To find out what I am up to and make sure it’s something worthwhile. So what are you working on, Vlad? Anything interesting lately? No? Why not?

It’s easy to get fixated on the things you have to get done and not leave any real room for things you would actually enjoy doing. Or beat yourself up too much with other people’s problems and be exhausted and under-motivated when it comes time to work on something personal.

This is somewhat related to the rubber duckie test. You are my rubber duckie, dear (statistically-likely non-existent) reader; I shall call you squishy. But instead of helping me solve software problems, you are helping me shift the focus in my life whenever I stray too far from what I care about.

I am not sure what I care about yet. I do care about finding out what it is though. I should work on that some more.

I’ve been reading various books and articles on artificial intelligence lately and contrasting it to what people’s common conception on the subject is. Also, to what the current direction of the field is, which (albeit having a vast array of potential practical applications) seems totally wrong to me considering that the ultimate goal is true (human-like) machine intelligence.

It’s important to understand what intelligence, emotions, consciousness etc. are before going around saying things like A man-made mechanical device could never <insert human trait of choice here>. You don’t know that. You don’t know that you are anything more than the sum of your parts. You don’t know that there’s never going to be someone who is going to discover a simple (or insanely complicated, but correct) step by step explanation of how creativity works and implement that into an algorithm. Man’s usual response to a yet-to-be-understood concept is “we can’t explain that” or “that’s just the way it is”. But that’s the same dense attitude as that of a mother telling her completely capable of rational thought 6 year old daughter not to play with her food “because I said so”. Why impose limits on what you can understand? Is it laziness? Is it the joy we get by thinking we’re special?. If it’s laziness, at least accept that there might be a possibility that there’s a scientific explanation for these concepts. Don’t just pass magic off as facts.


Actually, I think political commentator, Bill O’Reilly sums it up best:

bill oreilly dolar to soda

The point I am trying to make is this: If it is not magic, it can be understood. And if it can be understood, it can be engineered. Maybe not soon. Maybe not ever. It’s a question of possibility not probability, but I do believe we will eventually come to know and accept all the mysteries of our own minds. From then on, it’s just a matter of copying the same principles onto silicone.

AI’s approach to mimicking a human trait in a machine is simple. Scientists agree upon a theory of how the human brain implements that trait and then program the computer through various tricks to act as if possessing that trait. A human can be introspective by having thoughts about his own thoughts? No problem. Have the computer keep records of the sequence of operations it undertakes when trying to solve a problem. If it fails, have it study those records and figure out where it went wrong. If it succeeds, have it mark those records for further reference as “good” for that particular situation and Bam! The computer is self-conscious.

The computer is NOT self-conscious!

This approach is based on the old Turing behavior-based definition of intelligence. Some new theories now claim that intelligence can exist in the absence of behavior. In this case, it’s important to understand how the brain implements it’s processes not just the outcome of them.

There are a lot of cute anecdotes portraying a digital machine’s lack of continuousness, creativity or real understanding. One that I particularly enjoyed was John Searle’s Chinese Room Argument:

Suppose you have a room with a slot in one wall, and inside is an English-speaking person sitting at a desk. He has a big book of instructions and all the pencils and scratch paper he could ever need. Flipping through the book, he sees that the instructions, written in English, dictate ways to manipulate, sort, and compare Chinese characters. Mind you, the directions say nothing about the meanings of the Chinese characters; they only deal with how the characters are to be copied, erased, reordered, transcribed, and so forth.

Someone outside the room slips a piece of paper through the slot. On it is written a story and questions about the story, all in Chinese. The man inside doesn’t speak or read a word of Chinese, but he picks up the paper and goes to work with the rulebook. He toils and toils, rotely following the instructions in the book. At times the instructions tell him to write characters on scrap paper, and at other times to move and erase characters. Applying rule after rule, writing and erasing characters, the man works until the book’s instructions tell him he is done. When he is finished at last he has written a new page of characters, which unbeknownst to him are the answers to the questions. The book tells him to pass his paper back through the slot. He does it, and wonders what this whole tedious exercise has been about.

Outside, a Chinese speaker reads the page. The answers are all correct, she notes— even insightful. If she is asked whether those answers came from an intelligent mind that had understood the story, she will definitely say yes. But can she be right? Who understood the story? It wasn’t the fellow inside, certainly; he is ignorant of Chinese and has no idea what the story was about. It wasn’t the book which is just, well, a book, sitting inertly on the writing desk amid piles of paper. So where did the understanding occur?

Searle’s answer is that no understanding did occur. What went on was just a bunch of mindless page flippings and pencil scratchings. Now, the thing is, The Chinese Room is exactly analogous to a digital computer. The person is the CPU, mindlessly executing instructions, the book is the software program feeding instructions to the CPU, and the scratch paper is the memory. Thus, no matter how cleverly a computer is designed to simulate intelligence by producing the same behavior as a human, it has no understanding and it is not intelligent. (Searle made it clear he didn’t know what intelligence is; he was only saying that whatever it is, computers don’t have it.)

So what Would it take for understanding to have occurred? Well for one, the person inside the room would need to know Chinese. For our purposes, to know a language is simply to have memories of different objects, feelings and events that you can associate with words or symbols in that language. The person in the room would need to be able to, upon seeing a Chinese symbol or set of symbols, associate that with a past memory. This would present him with a collection of different ideas that he needs to be able to link together to form a coherent picture. There’s still a lot of human-and-not-machine-associated words in there, but we’re getting closer to the metal and you can see how this could go on provided the had the proper evidence of what is actually going on inside our heads in each of these situations.

Note: This story and part of it’s interpretation is taken from Jeff Hawkin’s book, On Intelligence, which I whole-heartedly recommend to anyone looking for some very interesting and easy to follow new ways of thinking about the human brain.

For me, it’s not so much the concepts of intelligence, understanding, creativity, emotions or any other involuntary characteristic/ability that makes us… us. Know what I mean? We are a creative animal, we have emotions, we possess intelligence (whatever that is). It requires no personal effort to be something or have something once you have it and I have no problem accepting a mechanical parallel to any of these. What does fascinate me however, is how we’ve come to have a sense of self. A continuousness. The notion that we can examine any of these traits of ours and have thoughts about them in a way that makes it all seem like we’re an individual… Anyway, I’m sure that also has a logical explanation.

Ok, so that’s the gist of why I don’t agree either with people that claim that a machine could never be intelligent OR with engineers who try to make intelligent machines by what I consider to be naive approaches. A solution that totally satisfies me has not yet been fully expressed but some scientists are working on a lot of interesting projects like neural nets and something called “Hierarchical Temporal Memory” algorithms, which seem promising. All really great stuff. I’m very much looking forward to see where all this research takes us and I’m going to be riding the wave all the way until we get there.

And I am not talking about the process of using wizards or other authoring mechanisms to create code on the fly. No, this is my own made up meaning of the phrase.

“When I use a word,” Humpty Dumpty said in rather a scornful tone, “it means just what I choose it to mean – neither more nor less.”

It’s good to know a bunch of programming languages. It’s also good to know an alphabet worth of technologies, be it .NET, C, PHP, J2EE, JSF, JAXB, XML, DBMS, JIT, OO, SVN, AJAX, DVCS, CMS, UJIX, FFTC. OK, the last two aren’t real. But my point stands: The more you cover this palette of nuggets of knowledge, the more prepared you are. When you’re up for a job which demands a certain flavor of the proverbial alphabet soup you just pick it up, dust it off and get to work. It’s good to know a certain technology the same way it’s good to know the business logic of a client or specifications of a project. But that is not the same as knowing how to program.

By abstract programming, or simply programming, I mean expressing an idea in a sequential and logical manner, independent of any language. Of course, you can not *express* an idea without using a language and I am not suggesting that you can. I, myself, have some experience working in C++, C#, Visual FoxPro and maybe a little Java. As such, when I think about designing a piece of functionality I tend to go to one of these languages, but never focus on syntax. My mind is set on structuring the code in a way that will accomplish no more than two objectives: fully conveying my intentions and making it readable to any minimally technical-minded human being.

Say I wanted to describe the implementation of a timeout loop.

total_tries           = 10
seconds_between_tries = 1
times_tried_so_far    = 0
try_was_successful    = false

loop while ((!try_was_successful) && (times_tried_so_far < total_tries))
	times_tried_so_far + 1

	if (function_being_tested())
		try_was_successul = true

Sure, there’s a lot of language specific stuff in there, but also lines that look wrong from a compiler’s perspective. This is pseudocode. No denying that. This is also what I understand by “abstract programming” and is where IMHO the art of the craft lies.

I find this thinking to apply best to design patterns where the flow of instructions has a clear path and can be easily expressed in natural language. But no code block, however specialized, can be excused from lacking this property.

The proud lazy man blames the pen for his spelling mistake.

So call me proud and lazy but I think VFP should humbly bow its fuzzy orange head and muster an apology for this behavior:

[Sensitive information has been concealed.]

And coffee-dipped donuts, mmm.

mmm, donut

But I digress… I’ve lately started messing around with a few open source projects and that’s what I wanna talk about today. Not going to reveal any tips or secrets on getting involved in such projects. Probably nothing useful for that matter. In fact, you would probably walk away more stupid than you came in, were you to finish reading this article. Seriously, close this page right now and go watch youtube or something; do something productive.

Okay, so, now that there’s just me and Homer in here, we can talk.


I use this IRC client at my job, where I work. Well, sort of. I work from home and I use it to chat with the people I work with. Aaaaanyway, saw it was an open source application and thought I’d go for it. This is their website btw: See? “Community”. Says so right there in the top right. Also, “Developers” somewhere near the middle. Yep, open source.

Now what do I do.

Well, the developer page has some step by step instructions on getting the source and building the code on your local box. Nothing a trained chimp couldn’t handle. Actually, that page says the code is not available unless you sign up and beg for it, but I saw on the news feed on the home page that the code had since become openly available. OK, so the dev page isn’t that up to date. The important thing is we have this: Now I can go pop that into TortoiseSVN and do a checkout of the source tree.

The next step is to check the dev page for any needed prerequisites or configurations of your environment so the project will build. Who has time for that? Loaded the solution into Visual Studio 2008 and tried to build it. Naturally I got a bunch of errors which I simply didn’t feel like sorting out, so that was the end of that attempt.

I’m not usually this sloppy. I do get things done. I like finding answers, wrapping my head around things I don’t understand. I’m a software developer, that’s what we do. But that day… I just didn’t feel like it.


Brace yourself, this one’s another dead end.

Going to jump over the boring stuff like I love google, wanna be a part of their magical realm of fairies, koala bums and so on. I headed over to and started reading everything they had to impart. After the last crash and burn I thought I’d take some extra caution.

It worked. Yeah, it took a lot of time but I finally got everything to build and run. The problem here was that I had spent very much time on getting everything tied down and working that by the time I was happily tracing through the code in the debugger I was less than excited. I spent maybe 10, 15 minutes working my way through its inner bowels and I was bored.

Truly depressing.


Next week I started hacking my way through my next OS project. OK, so maybe that wasn’t so depressing.

BOINC, or Berkeley Open Infrastructure for Network Computing, is this awesome project developed by some smart people over at the Berkeley University of California. In a nutshell, it allows research centers in need of tons of computing power to divvy up their work into small chunks of data and then send that data to volunteer computers to do the crunching for them. This system is called volunteer computing and it’s important because it enables scientific research that could not be done otherwise.

Plus it’s fun to donate your idle processor cycles to science. You get to actively participate in huge projects like SETI@home, where you analyze your own small piece of real radio telescope data in search of patterns that could indicate extraterrestrial life. Or help determine the 3-dimensional shapes of proteins in research that may ultimately lead to finding cures for some major human diseases by enlisting in projects like Rosetta@home. Or better yet, analyze data from the LHC over at CERN. Actually play a part in answering some of the most difficult questions about our Universe with LCH@home.

All good stuff, but I am in it for the code and so far it has all been surprisingly straight forward. Getting the source, building the modules that make up the BOINC system, digging through the code to understand how it was designed. Everything was a joy. Sure, there was the occasional rode-bump but that’s what makes the process fun.

I’m thinking of touching on the subject of volunteer computing and maybe trying to implement some personal code in BOINC for my bachelor’s degree this year. Fingers crossed for this project not to go the way of the Hydra and the Chromium.


Anyone who is using gmail and has stumbled upon this post is probably aware of the service’s ability to check multiple POP3 email accounts. I am also going to assume that you are equally annoyed as I am by the fact that gmail doesn’t check these other accounts nearly often enough and that there is no way of telling it to speed things up. As such, I am not going to get into a lot of detail on this problem and the solutions provided so far in different articles. I’m just to share my experience on the subject.

Looking for solutions

Naturally, my first attempt at overcoming gmail’s lazy probing, err.. exponential backoff algorithm was to enable this little Labs feature: Refresh POP accounts. Not good enough. I then tried a script written by this guy, Daniel Slaughter. Didn’t work, crashed my browser.

[Edit 09/16/2010: Looks like Daniel has put in a lot of hard work into his script and it’s feeling pretty stable now. You should totally try it out and donate if you like it.]

Decided I’d write a script

A PHP script that would send an email every few minutes to my account. I also had to set up a filter in Gmail to automatically delete it once in… I don’t need to explain the logic here. You have read many articles, are as frustrated as I am, remember? Ok, good.

I wrote this very very simple piece of code which I then uploaded to a personal website and ran it from the browser.


//Initializing variables blabla ...

while (true)
	mail($to, $subject, $message, $from);


Why did this go horribly wrong you ask? I had the frequency set to 10000 thinking that that would buy me 10 seconds before each mail() call. I was wrong. In about 3 minutes I got a call from my web-host telling me I had exceeded my email limit. Quickly, I deleted the script, which had by then managed to send somewhere near five thousand emails. Not sure what happened there but I never tried that again.

Time to get dirty

That’s right, code the solution in a desktop app.


Meet Auto Gmail Sender. I wrote this the next morning in C# and it works beautifully. Basically, it does pretty much the same as that php script. This is the brain of the animal:

MailMessage msg = new MailMessage(new MailAddress(this.fromAddress), new MailAddress(this.toAddress));
msg.Subject = this.subject;
msg.SubjectEncoding = System.Text.Encoding.UTF8;
msg.Body = this.body;
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = false;

SmtpClient client = new SmtpClient(, this.port);
client.Credentials = new NetworkCredential(this.userName, this.password);
client.EnableSsl = this.sslEnabled;

	this.DisplayMessage("Email succesfully sent!");
catch (SmtpException e)
	this.DisplayMessage("Error! " + e.Message + ' ' + e.StatusCode);

That, wrapped inside a loop, rolled into a nice simple UI gets you this:

Gmail check history

Download the exe
Download the C# project

Be sure to configure autogmail.ini according to your own needs. Currently, the app supports spamming only one email address at a time but I suppose you could always open up multiple instances of it for an ugly workaround…

Or get your hands in my code and turn it on it’s head!

Nuff said.

%d bloggers like this: