CSI: Miami
October 30, 2007I must admit that I watch CSI: Miami. I know, I know, but what can I say… For those who don’t know CSI: Miami, here’s how every single episode goes.
- Pop song of the week is playing
- Hot chicks in bikinis and fit dudes in shorts do an activity
- Someone gets murdered
- A girl may scream
- Cut to when the police are there
- A police officer explains the situation to Horatio Caine
- Horatio puts his glasses on, puts his hands on his waist and says some witty remark
- The CSIs do their job way too thoroughly and also do the cops’ job
- They interrogate 3-4 suspects, they all turn out to have alibis
- The investigation is stuck
- Somebody says something that has nothing to do with anything
- Somebody else gets an idea
- Everybody starts working hard
- You notice that all the females who work at the Miami-Dale crime labs are babes
- You also notice that their computer equipment is unlike anything you’ve seen: everything’s in 3D and half transparent, every action is followed by a techno sound, things that should take milliseconds such as a lookup in a database takes 2 minutes, things that should take 10 hours take 3 seconds.
- They bring back one of the suspects
- Turns out he/she was the killer
- Hard ass comment from the killer
- Hard ass response from Horatio
- The End
Programming simplicity
October 30, 2007Le Camarade wrote an interesting and very provocative article regarding simplicity in programming. His argument is that if something is simple, it’s correct; if something isn’t simple, it’s wrong. If you read the entire thing, you’ll see that when he says that a programming construct must be simple, he means it from an interface point of view, not an implementation point of view. In this way, he advocates the MIT approach over New Jersey which basically says that “it is more important for the interface to be simple than the implementation.”
He gives the example of reading a file and printing its content. Here is his Ruby code (comments removed) vs. his C code:
# Ruby
open('/etc/passwd') do |file|
puts file.read # Print the file contents.
end
/* C */
FILE * fichier = fopen("/etc/passwd", "r");
if(fichier) /* ALWAYS DO THIS! I WILL REVIEW YOUR CODE! REPEAT YOURSELF!*/
{
while(! feof(fichier))
fputc(fgetc(fichier), stdout);
fputc('\n', stdout);
fclose(fichier); /* ALWAYS REPEAT YOURSELF, OR ELSE!*/
}
He argues that because Ruby has closures, it is possible to hide the grunt-work from the user and present a simpler interface, whereas in C, the programmer is expected to make sure the file was properly opened, and is also responsible for closing the file when he is done. We can probably expect the code for C’s fopen() to be simpler than Ruby’s code for open(). Therefore, I submit that the simplicity of an interface is inversely proportional to the simplicity of its implementation.
Either I suck at reading or people suck at writing
October 29, 2007I hate when I read a blog post or an article and I still don’t know what the author wants to say after a few paragraphs. Is it just me? Am I too impatient, do I have a too small attention span or should people who write long posts make sure I know after one minute of reading what they’re talking about or if I just want to get the heck out of there?
Programmatic HTML generation
October 29, 2007The recent release of Seaside 2.8 got me thinking about one particular feature of Seaside that is less often mentioned than its continuation-based flow: programmatic HTML generation. As far as I know, Seaside is one of the only frameworks to work like this (I’m pretty sure the framework in Factor works similarly, and the wee framework for Ruby.) Most frameworks include some sort of template language that you embed directly into your HTML instead.
I don’t know how the people who use Seaside work, so programmatic HTML generation may be fine for them, but from my own experience it sure would be a bad idea.
We use Django at work, and our work flow goes like this: I do the back end code (URLs, model and view), I write a simple template to display the data the client wants to see and commit it into Subversion. Afterwards, the designer takes my bare bone template and begins to work his magic. That usually means that he writes a lot of CSS.
You may ask “why couldn’t a designer use CSS with Seaside?” They can, and they do, but like I said, I give him a very simple template, I do not know the tags and/or the names of the classes he wants to use to make his design, so he modifies the HTML code quite a bit.
I am fortunate that my designer is also a pretty good developer, but that may not always be the case. The Django authors have often stated that they wanted to keep the Django template language simple so that the designers aren’t sacred away. And the designers can use all their usual tools if they wish.
With Seaside’s method, a designer would need to either (1) learn a little Smalltalk to add class names, id names and change tags, or (2) ask the programmer to do the changes for him. I don’t think (1) is practical at all, programmers don’t even want to learn Smalltalk, why would designers. And (2), well as a programmer, I could make the changes, but it would quickly become annoying and unproductive if the designer always depended on me to make the smallest changes. Whatsmore, I have other, more important things to do like comment on Reddit or read raganwald’s blog.
Email is communication too
October 25, 2007A friend and I were discussing email communication this morning and how it has become a pervasive and important part of business. Yes, email is great, it allows everyone to reach quickly and cheaply millions of other people. It seems, however, that a large majority of people have no idea how to use email; I don’t mean that they don’t know how to compose a new message and send it, they just seem to lack any basic understanding of communication between human beings.
In normal conversation, two people communicate by exchanging verbal and gestural messages and they indicate to the other party that they got the message by sending messages of their own. For example, if I asked you “would you like to have dinner Friday night?”, if you answer “yes”, if you nod, if you give me a thumb up, if you say “I would love to”, I know that we will be having dinner together. If you say “no thanks”, “I can’t”, if you shake your head or do anything else to indicate that you can’t (or don’t want to), I’ll know too.
This happens not just in normal conversation, but also over the phone or in an IM conversation. There’s an exchange of messages between the two parties, that’s the main point.
My friend was complaining that people don’t apply this simple and natural behavior to email conversation. If I send you an email asking if you would like to have dinner and that I get no response, I absolutely cannot assume that you will show up. I also cannot assume that you don’t want to. I can’t even assume that you haven’t read it, because you might have read it, but needed to check up some things first. In spite of this, in his experience, and in mine too, people assume that if they get no response, you have read and agreed to the subject of the email.
This is something that would not happen in normal conversation. “Vincent, we have a meeting Thursday at 1PM, can you be present?” If don’t say anything, if I don’t make any gesture to indicate whether I can or cannot, if I don’t even do anything to indicate that I heard you or am aware of your presence, what do you do? You ask again, maybe with a louder voice, you might tap me on the shoulder to get my attention, etc. You would not assume that my complete lack of response means that I’ll be at your meeting, you press me until you get me to give you an explicit answer.
Please do the same with email. If you ask someone to a meeting and get no response, email again and ask for a reading receipt; pick up the phone; if possible, walk up to the person you’re trying to reach; try to get a hold of a colleague to tell you if the recipient of your message is around. Do something.
Email is asynchronous communication, but the same rules apply as in any other type of communication; you need to get feedback.
Top 10 ways to get traffic on your site
October 15, 2007- Make a top 10 list
- Make a top 5 list
- Make a top 8 list
- Make a top 20 list
- Make a top 3 list
- Make a top 12 list
- Make a top 15 list
- Make a top 7 list
- Make a top 50 list
- Make a top \d+ list
My take on “An Open Letter to the Ron Paul Faithful”
October 12, 2007So there was our after-debate poll. The numbers grew … 7,000-plus votes after a couple of hours … and Ron Paul was at 75%.
Now Paul is a fine gentleman with some substantial backing and, by the way, was a dynamic presence throughout the debate , but I haven’t seen him pull those kind of numbers in any “legit” poll. Our poll was either hacked or the target of a campaign. So we took the poll down.
It can’t possibly be that the kind of people who vote in Internet polls have not been brainwashed by the mainstream media who only seems to consider Romney and Giuliani as potential presidential candidates. People on the Internet like Ron Paul, it’s as simple as that, and if the mainstream medias are not ready to recognize that, it’s no wonder nobody trusts them anymore.
Partage d’émissions sur Internet
October 11, 2007Un article paru ce matin dans La Presse du 11 octobre 2007 discute du téléchargement d’émissions de télévision québecoises. Les gens qui me connaissent savent très bien quelle est ma position sur ce sujet, mais je vais tout de même la répéter. La capture d’émissions de télévision n’a rien de nouveau, ça existe depuis au moins 20 ans. Il est fort possible que ce soit encore plus vieux que ça, mais ma mémoire s’arrête pas mal à quand j’avais quatre ans et que mes parents avaient un Beta Max qu’ils pouvaient utiliser pour enregistrer des émissions. Dès cette époque, les publicités pouvaient être sautées et l’émission regardée au moment le plus propice pour l’utilisateur. Le partage d’émissions a pratiquement le même âge: quelqu’un enregistre une émission et prête la cassette à un ami ou un collègue de travail.
L’avènement de l’Internet et des réseaux P2P a vraiment mis le partage d’émissions “sur la map” comme on dit en bon québecois. Soudainement, au lieu de demander à un groupe restreint de personnes — par exemples les collègues de travail — si quelqu’un avait enregistré le dernier épisode du “Négociateur”, la personne désirant regarder ladite émission demande à un réseau spécialisé et beaucoup plus vaste pour l’épisode. Offre et demande.
Des personnes qui pratiquent le droit affirment que sans l’autorisation des ayants droit, ce partage est illégal. À mon simple avis, c’est un service rendu par des gens qui aiment les émissions de télévision québecoises et qui veulent les faire connaître à d’autres personnes. On doit se rappeler que la majorité des émissions sur ces sites de torrents sont diffusées sur des réseaux qui ne nécessitent pas Bell ExpressVu ou le câble pour les visionner, seulement une bonne vieille antenne.
Ce qu’on doit se rappeler selon les autorités, c’est que le partage c’est mal. J’imagine que dans leurs familles, les enfants n’ont pas le droit de se partager leur jouet et que si Simon veut jouer avec les G.I. Joe de Mathieu, il doit obtenir une autorisation écrite de Mathieu, signée par un avocat.
Je vous laisse sur cette note: les ondes des diffuseurs nous passent à travers le corps en tout temps. On pourrait pas choisir ce qu’on fait de ce bombardement de signal sur notre personne? ;)
On not consulting users
October 5, 2007The hot sports news today in Montreal is regarding the new NHL jerseys. These new jerseys (and also the socks the players wear) were designed by CCM-Reebok. The company hailed them as an important breakthrough in the sport, claiming that they were lighter than regular jerseys. The players, however, all seem to dislike the new gear: the jerseys and socks are impermeable, so instead of absorbing the water and sweat, it drips down into the skates and gloves of the players. Montreal Canadien player, Mike Komisarek, told Montreal newspapers that he needed to change gloves twice per period and socks between every period. You’d think that CCM-Reebok would’ve asked players what they think of the new gear before getting the NHL to impose it.
As a programmer, it’s not rare to hear stories about how management decided to replace one software by another without consulting the users who will use the new software. It’s comforting to know that we’re not the only discipline where this sort of clueless, unilateral actions occur.
Posted by gnuvince
Posted by gnuvince
Posted by gnuvince