Black magic, singularities, and genies

December 13th, 2004 § Comments Off on Black magic, singularities, and genies § permalink

“On two occasions, I have been asked [by members of Parliament], ‘Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?’ I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question.”

Charles Babbage (1791-1871)

This is one of my favorite quotations in the field of computing. In the course of my career in IT, I had many opportunities to see similar situations happen. In fact, there are entire sites dedicated to collect real histories about incidents caused by this kind of perception, this cognitive dissonance between common sense and computer use.

The funny thing about such incidents is that IT professionals tend to blame users for most of them, even knowing they are as liable to fall in this kind of trap as people who only use a computer occasionally. After all, we, IT professionals, are still users, albeit of a different order of applications.

This reminds me of cargo cults. To those who are not aware of the term, it comes from the aboriginal religions that became common in the South Pacific after World War II. During World War II, the Allies established many bases in the Pacific islands. The necessary transport of large amounts of industrialized goods to those bases changed dramatically the lifestyle of the islanders, who benefited enormously from the contact.

After war, the soldiers moved on and the bases were abandoned. The cargo stopped coming, and many of the islanders started to imitate the procedures established by the soldiers in an attempt to bring the cargo back. They built new airstrips, and carved control towers, planes, and headphones from wood. They sat on the control towers they had built and waved landing signals in the airstrips, thinking that would attract the “favor” of the new gods. Of course, it brought them nothing.

In programming, there is also a kind of cargo cult where certain tools and techniques are concerned. Sometimes, the interface to a library is so esoteric and complicated that domain over it is never achieved, and programmers try to guess the parameters needed to result in certain responses. The fragility of the resulting code always leads to problems and hard to trace bugs.

Another example is the practice of trying to fix bugs by randomly changing parameters and code until the program works. There’s no attempt to understand the problem, only to solve it. The use of some functions and methods becomes a ritual, motivated only by the knowledge of what worked before.

Arthur C. Clarke, the famous science fiction writer, once said that any sufficiently advanced technology is indistinguishable from magic. It’s interesting to realize that many times programming is compared to magic, due to the arcane nature of some techniques.

The Jargon File defines some terms of this nature. For example, we have voodoo programming, which is the use of advanced programming recipes that not completely understood by their users, but that can be followed without the knowledge of their operating details. The use of Apache’s mod_rewrite is frequently mentioned as an example of this kind of programming since mod_rewrite incredibly complex but it’s also possible to find abundant examples to implemented almost anything a site administrator will need.

We have also black magic, which are techniques that work but nobody understands how or why. Black magic is a less evolved form of black art, which are theoretical techniques that nobody understands except their creators, and have not been implemented in code yet. As black art becomes practical, it stops being black art and turns into black magic. With time, it may become just heavy wizardry. There is also deep magic, which is more practical, but still not as accessible to common programmers. It’s interesting to see how Clarke’s law applies here. For example, comparatively few programmers understand how a TCP/IP stack works, but most of them can use one.

That also reminds me of the Singularity, the feared technological convergence that will cause the transcendence of some kind of intelligence to a level above the comprehension of our normal intelligence. Sometimes I think the Singularity is just a reformulation of Clarke’s law applied to a fast, exponential technological growth. The proliferation of technology, which tends to prevent generalization, would cause the emergence of more and more black boxes whose interfaces can be intuited but not fully understood. As those black boxes “learn” to replicate themselves and build even more sophisticated black boxes, full of Clarke’s black magic, the Singularity would arrive.

So we are back to the beginning. To the common user, those black boxes seem like magic wands, genies who are able to implicitly understand their masters’ desires and make them happen even if those masters can’t formulate their desires meaningfully. This explains the confusion Babbage perceived.

I think most of the success of languages like Ruby and Python (and also Smalltalk) is due to the clarity and readability those languages bring to the programming process. (Indirectly, it also explains why professionals who know arcane languages are valued.) Few languages are able to offer the kind of systemic vision present in both, which results in simplified development and learning, preventing the emergence of cargo cult programmers so common in languages like Java and C#. The interfaces to systems created using Ruby, Python, and similar languages are more explicit and easily understood.

All that makes me curious about the future of programming languages. I wonder if we will ever have a truly natural programming languages, and what would happen if we developed one. Programming would come close to the genie nature of black magic, where it would be able to process concepts instead of commands. I don’t know what would happen, but I’d certainly like to see it. Until then, I will keep having fun at the expense of my own mistakes, cargo cultism, and light wizardry.

This thing with names…

December 10th, 2004 § Comments Off on This thing with names… § permalink

I don’t think my name is that complicated, but that doesn’t prevent people from misspelling or mispronouncing it. A heritage, I think, from the way the history began.

My name has a funny history behind it. My mother had this boyfriend whose name was Ronaldo. The guy wasn’t the man she dreamt of and their affair was rather brief and, according to her, very unpleasant at the end. Anyway, when I was born, a few years later, she told my father when he went to name me legally: “You can name him anything you want, except Ronaldo.”

Inevitably, Ronaldo I am. My father, to this day, can’t explain what happened.

Maybe because the way the whole thing started, I’m fated to have people mixing up my name every time I was introduced to them. I am often forced to repeat my name endlessly as people don’t seem to remember it after a few minutes.

Once, when I went camping with a large group of people from various churches related to mine, I started the four-day camp being called Ronaldo. In less then twelve hours, my name had been changed to Reinaldo. From Reinaldo, it became Renoldo, via an American who wasn’t able to pronounce it correctly. From there, things went downhill. In two days, my name got changed again to Rodolfo. If it could change so much, I wasn’t surprised when it finally morphed to Adolfo. After the four days, that became my de facto name for most of the people there. People thought I was joking when I said my name was Ronaldo. (For the skeptic readers, this is a true story.)

I can understand the change from Ronaldo to Reinaldo. Both are forms of the Germanic Reginold (which means he who rules by the advice of others). From Renoldo (which is similar to Reginold in a certain way) to Rodolfo, however, the distance is much bigger. But if it can bridge this gap, it can surely change further. Rodolfo (famous wolf) is not that different from Adolfo (noble wolf).

Among foreigners, Renoldo is my most common name. But there is also Rolando, which tends to morph into Orlando. Since they are forms of the same name (meaning famous land), it’s easy to understand why. But I’m not an errant knight, and I’m neither Rinaldo nor the Furioso.

Nicknames are trick too. When I was a teenager, Ronaldinho was at his best, young and fast, still playing in Brazil. Predictably, people used the same nickname for me. Considering that I more liable to kick legs than the ball when I’m playing soccer, people probably were dropping subtle hints about my appearance with this nickname.

Ronaldão, the superlative form of my name, came after marriage. I have this nagging feeling that it may have something to do with the constant growth of the circumference of my belly.

That’s why my son’s name doesn’t start with an r.

Of rubies and tracks

December 9th, 2004 § 5 comments § permalink

As I said I would do some time ago, I started to use Ruby to develop some of my Web applications, with Rails as the framework. I confess I’m more and more in love both with the language and the framework. Like Python, they don’t get in the way of programmers, which results in much more productivity and enjoyment. It’s a pity Ruby hackers like so much underscores in their method names. I could easily do without them.

Anyway, for Web applications, Rails is the best framework I’ve ever used. Things are always simple and intuitive, and I rarely need to resort to the documentation to understand how something is done. I had an epiphany when I saw how easily I could add authentication to an application that was already working.

Now it’s my friends who must bear with me as I preach to them the virtues of Ruby and Rails in our instant messaging sessions. But, seeing how Rails reduces the time needed to code a Web application, I can’t help myself. A friend of mine, for example, was complaining to me about how long it takes — and how tedious it is — to create simple forms in PHP, with the same boring authentication and validation rules. In Rails, this task can be accomplished with a single method invocation and a couple rules in another method. The framework takes care of the rest.

Is there anything simpler than that?


December 7th, 2004 § Comments Off on Fatherhood § permalink

When I got married, almost four years ago, having a child was the last thing on my mind with regards to married life. In fact, if somebody asked us about this, both my wife and I would answer with an emphatic “no” to the possibility.

We really had no plans for a child — we didn’t even think we would change our mind so we didn’t worry about it. I was neither the kind of guy who hates kids around nor the kind of guy who welcomes them. My attitude in those years can be described as one of indifference.

You can imagine my surprise when my stance on the subject changed radically from one day to another — literally. One day, I woke up and knew I wanted to be a father. Immediately. My wife was flabbergasted.

Of course, things like this can’t be rushed. We took some months to plan. Then we had to try for a few months more before we succeeded in our attempts. Last Friday, our “pacotinho” completed his first five months of life in our little blue world. It’s been two years already since that fateful day, and I can’t imagine a different life for me. As a friend of mine said: “If I knew that being a father was that good, I would have become one earlier”.

Today, I was lying on the bed when I noticed my wife getting up to feed the baby. I went back to sleep, trying to make the most of my last hour of sleep before work. I was almost asleep when I felt something brush my back. I turned slowly, knowing the baby was in the bed with me, opened my eyes, and saw him touching me. He had managed to turn himself in my direction, and when he saw he had succeeded in calling my attention, he flashed me this gorgeous toothless smile and stretched his plump hands towards me, wanting me to pick him up. I never felt so happy in my life.

I don’t understand what made me change my mind about being a father, but I know I will never regret it.

Canon A85

December 6th, 2004 § Comments Off on Canon A85 § permalink

Thanks to everybody who wrote or commented here with good advice about buying a digital camera. I just bought a Canon A85, which I believe is perfectly adequate for my needs; it also was nicely priced too. Can’t wait to play with it — the manual is a very, very thick book. :-)


December 5th, 2004 § Comments Off on Graphviz § permalink

Graphviz is a graph generation library with a simple and intuitive interface. I wish I had heard about it sometime ago when I was building a similar functionality in an application I was developing at the time.

Perdido Street Station

December 3rd, 2004 § Comments Off on Perdido Street Station § permalink

Some books leave such a lasting impression on the reader that he or she can’t help but think about them for days afterwards. Perdido Street Station, by China Miéville, is one of the books that caused this effect on me. I finished reading it a few weeks ago but I’m still thinking occasionally about the situations, characters, and possibilities described or suggest by the book.

Any attempt to fit Perdido Street Station into a specific genre is bound to be difficult. The author himself categorizes it as weird fantasy, but I think this is an almost meaningless label. All fantasy (and, by extension, all fantastical literature) must be weird in my opinion. It must instigate a sense of wonder in the readers, leaving them spellbound to the world created by the author and taking them to unexplored frontiers. Weird fantasy doesn’t describe the richness of such books. Whatever category Miéville’s book does fit in, however, one thing is sure: it takes it to the most extreme genre boundaries, presenting readers with one of the best fantastical worlds ever created, populated with wonderful and complex creatures whose lives and journeys compel the readers to keep turning the pages, attracted and repelled by them at the same time. » Read the rest of this entry «

Digital Camera

December 2nd, 2004 § 7 comments § permalink

I’m in the market for a digital camera, but I’m completely at loss about which to buy. My old camere is on its last legs, and I’d prefer to buy a digital camera this time. I read some reviews, looked at some models, but I’m still undecided since I never owned one of them.

There are many sites with good and detailed reviews of various models, recommending some models or brands, but there’s always something in the review that prevents me from making a decision. Also, since the models I can find here in Brazil are usually behind the models in North America or Europe, reviews about them are harder to find. The only thing I know so far is that I want optical zoom too and a video mode with sound support.

Any suggestions would be greatly appreciated.

Dynamic (interactive) RSS

December 1st, 2004 § Comments Off on Dynamic (interactive) RSS § permalink

The questions my friend asked me about SCORM continued to bother me after I posted my answers here. As I indicated in the post, I thought my answers were not quite satisfactory. That being so, I started to think about alternative viable solutions for the context in which the questions were asked.

After thinking about the issue, I turned myself to what she had mentioned about blogs. That, in turn, lead me (kind of obviously) to RSS. So I decided to try a little experiment.

In the context the question was asked, there is a need to minimize costs and complexity while retaining at the same time the ability to provide a rich interactive experience and aggregate data. Obviously, the best way to do that is to leverage existing infrastructure. RSS offers the oportunity to make this happen in very simple ways.

The experiment, then, was the creation of an interactive RSS feed, able to react to options made by its subscribers and to behave in a way that approximates that of a course executed under a LMS. As I will comment further down, RSS offers possibilites just as interesting as the existing standards in the area. » Read the rest of this entry «

Where am I?

You are currently viewing the archives for December, 2004 at Reflective Surface.