Just like everyone else, I am the best software programmer that has ever lived on earth. My code is perfect even before I start writing it. In fact, when I look at a computer, it starts programming itself out of fear. The only thing that ever bothers me is that sometimes I have to deal with other, lowly programmers' code.

Maybe I exagerrated a little. In fact, my code is perfect only before I start writing it and I can't scare a computer to program itself. Certainly there are many programmers better than me, but, and that's really a pain, I can't remember dealing with one's code in my work, ever.

I have no delusions: I make mistakes, and some of them are quite stupid. Some even embarassingly stupid. Unit and integration tests do help, but even with them in place sometimes I just want to bang my head against the wall and scream WTF when looking at my code from the other day.

Yesterday however, when trying to hunt down a bug in an internal application in my work I came across this beauty:

if (d == null) {
log.error("Invalid device: " + d.getSerialNumber());
return;
}

which left me amused for the rest of the day. I might not be the smartest programmer on earth, but at least I know how to throw an exception when I want to, and how to do it explicitly.

One of the advantages of having a domain entirely for myself is that I can have a catch-all e-mail address and receive e-mail sent to any address in this domain, and give different addresses to different people or firms. If such an invented address gets spammed, I know who shouldn't have been trusted to keep my details to themselves. And, more importantly, I can blacklist this individual address so it's not spammed anymore.

I am doing this all the time: at Amazon I am registered with e-mail amazon@MYDOMAIN, at Apple with appledev@MYDOMAIN and so on. So, when I was buying the Macheist bundle, I used the address macheistbundle@MYDOMAIN.

Most of the spam I get is sent to one of the addresses I used on the Usenet years ago, or to addresses that may be easily harvested from WHOIS databases, and, to date, all the addresses given to firms like Apple, Amazon or Macheist were not spammed.

No more. The address I have given Macheist got spammed, which obviously means they'd leaked or sold it. That is, they cannot be trusted to keep an e-mail address to themselves.

They, or their affiliates. OK, I'm a grown-up and I expected to receive ads to this address when I was buying this really cheap software bundle, but I also expected those ads to be related to Mac software and not my bodily hardware. I have been receiving those ads ever since and this was OK, I have even bought one of the programs advertised.

Now it's not OK. I'm still able to have sex without drugs advertised, thank you. And if I ever need any drugs, I won't be buying from spammers, thank you very much as well.

And Macheist? Yes, they are cheap. But I don't trust them anymore, so I'm blacklisting this address and I don't think I'm ever buying from them again.

Not really, but it's a start. For now it's not a legitimate plugin and must be installed completely by hand, but it has what I wanted the most: Comment Toolbar-like quoting of selected text from other people's comments. And, again like Comment Toolbar, if no text is selected, it will quote the entire comment text.

Of course, it's undocumented and untested, but it at least seems to work with Firefox and Safari.

To test it, or just use it, get this file: quote.js, put it into your site's root and add this line to your HTML HEAD template, just after the other script is referenced:

<script type="text/javascript" src="<$mt:BlogURL$>quote.js"></script>

Then, find this template tag in your Comments template:

| <$mt:CommentReplyToLink$>

and append this to it:

| <$mt:CommentReplyToLink label="Quote" onclick="mtReplyQuoteCommentOnClick(%d, '%s')"$>

Then republish your site. That should do the trick.

For now it's just like this, but I intend to turn it into a nice Movable Type plugin, and maybe add some features, as soon as I learn how to write those plugins. Which may not be so soon - got plenty of other things to do.

 

I felt I was right and I desperately wanted to be wrong. It was very frustrating, and now it is just more frustrating to see it confirmed that I was right. No, I don't want to bullshit I was the Only One to See. Many other people identified the danger just as well, I wasn't first, or last, or loudest, or smartest to point that out. In fact, I just agreed with someone that did.

It was about the dangers of the ASP loophole in GPL2 and that, if it were left open in GPL3, it would allow to create applications that use GPLed code, are used by thousands or millions of users around the world but, since noone gets any executable code of them, noone is entitled to get the source either. It was the exact situation under the GPL2. 

And so is it now, because the FSF chose not to close the loophole.

Just as predicted, the world is moving towards the SaaS model (or is it now called cloud computing?). Web application writers can use all the GPLed code available and freely ignore the spirit of the copyleft. The license allows it, after all.

They can't be blamed either, it was not something the FSF hadn't known about. Quite the opposite, the FSF deliberately chose to favor businesses that would not be able to use the loophole any longer over the rights and the freedom of users.

I don't know whether the GPL viral clause is good for humanity, but I do know that earlier versions of the license were created to promote freedom of users, to enable them to learn from, use and copy others' code under its conditions. I also believed that this was the exact spirit of the GPL subsequent versions were to preserve. Only it was not.

This decision strikes back. The FSF and the GPLv3 are falling into irrelevance as the SaaS becomes more and more ubiquitous, and all that despite dramatic warnings from Stallman.

Maybe it was inevitable. More and more open source libraries are licensed without copyleft anyway. But it still is to FSF that they could try and minimise the dangers they now warn about. Instead, they furthered them.

Censor me hard!

| No Comments | No TrackBacks

One of the most common forms of Internet activism today is the so-called network blackout. The activists darken their webpages to protest against what they call censorship and what usually is some technical measures to restrict file trading, TOR-like anonymizing and/or force data retention policy on ISPs.

Censorship seems too big a word and it certainly has too broad meaning to accurately describe what is being proposed. It certainly is good for propaganda, as it builds an association with former communist and other totalitarian regimes. It should be remembered however that, under those regimes, publishers were required to obtain censors' approval before they've published anything. This former practice is very far removed from what is now being proposed for the Internet.

I don't either believe those to be an assault on citizens' right, simply because I don't believe there ever were any rights they would make an assault on.

File trading certainly is not a right of its own and while some countries made provisions of fair use to ensure that people are able to legally share copyrighted works they own copies of with their friends and acquaintances, it appears that everywhere it was an exception to the more general rule that sharing such material is prohibited. Sharing copyrighted files with persons one never met or even talked with is not fair use.

There is no right to remain anonymous. In fact, services like TOR are an unintended byproduct of the way the Internet was created years ago when noone could imagine the consequences. If they could, there'd be no TOR or similar services at all.

The protesters argue that no such measure will ever be effective, but it's just not true. If they were as ineffective as they claim, those protests would make no practical sense. Yes, those filters will never be technically 100% effective. Yes, they may be fairly easy to bypass. It's that most people just won't, and while complete effectiveness is not attainable, 95% effectiveness is.

While I will not darken my site, nor will I support those protests in any other way, I do think they have a role to play. The proposed measures are sometimes too harsh, there isn't so far any universally accepted procedure for a site to contest being added to a filter or for a user to contest having their access cut off. Those things have to be decided, mostly in negotiations with NGOs and right groups, and to some extent in courts. And they will.

What I don't really like in those protests is a "all or nothing" attitude protesters usually have. The anarchy of the Internet that we're accustomed to is coming to an end, laws and regulations will be enacted. The rights groups should work hard to ensure that no essential rights are taken away from people. Refusing to negotiate and trying to contain any change whatsoever will not help. If they continue to assert their "all or nothing" position, they may win some time, but in the end, they will just achieve nothing.

Literary masterpiece

| No Comments | No TrackBacks

Plaintiff's attorneys are wolves who seek to separate the young from their parents so that they can feed, and seek to use isolation and poison tongues to maximize division and discord within the family just as the divorce lawyers did.

This is a little excerpt from an official letter filed with a court by a man who has killed his wife, thus separating the two children they had from their mother forever.

He then maximixed division and discord within the family by first burying her body in an unmarked grave and then insisting for two years that she had escaped and left the children behind.

Not being so good at misleading the police as he was at hiding dead bodies, he sought to use isolation and poison tongue to avoid responsibility and though he was offered a light sentence in exchange for sparing the children the torment of testifying at their father's trial, he declined.

Hans Reiser.

His poison tongue was not enough to convince the jury, or, better to say, it helped them convict him for murder one, which was later reduced to murder two in exchange for the victim's body. Yet it was enough to lie once more, at the sentencing and say he was sorry for what he did when all he was sorry for was that he hadn't been able to get away with it.

Now, when he cannot comment his employees' code anymore, he's trying his literary talents writing motions to the court handling the lawsuit brought against him on behalf of the children, yielding deep thoughts like the one quoted.

Those literary masterpieces however are quite unlikely to win his last court case for him, so maybe he'd rather focus on learning how to flush the toilet.

The best GTD app

| No Comments | No TrackBacks

To date, I have been using Thinking Rock for GTD. It's an excellent application, I believe it's the most advanced and, at the same time, the most intuitive software tool for GTD. Unfortunately, it has a big problem: it's a desktop application, there is no support for using it on multiple computers at all.

I have been trying to work around this problem for months: first, by keeping its data file on a USB stick, then by using Dropbox. It kinda worked, but I had to remember to shut Thinking Rock down before putting the computer to sleep; otherwise, when the computer was waked, it worked on its in-memory data and after a while saved it thus overwriting changed made on other computers. Dropbox keeps old revision of the files it manages for 30 days, so it was all too easy to recover those changes, but so was it frustrating.

This made me look for a new tool. It had to be either a webapp, or a desktop app able to run on Windows and Mac, and with synchronization support.

The first shot, Chandler, I dismissed almost at once. It felt almost like an old school PIM, not a simple app for GTD. On the other hand, it has its own synchronization protocol and a free server for online data, so it might be worth a try for some.

Then came RememberTheMilk. Looks nice, but authors seemed to be a little carried away with adding locations (we use Google Maps, we're trendy), tags and other Web2.0 stuff, much less proper GTD stuff like projects, goals, visions, not even contexts (which I believe are expected to be simulated with locations and/or tags).

I've also read about Nirvana. Looks promising, but that's it for now. I wish they launched so I could try their services.

Then I found gtd-php. A simple, open source webapp whose authors seem to have read and understood the book. I migrated my current data and it is really nice to use it. There are some disadvantages: it requires MySQL, though SQLite would do just fine, it requires a webserver and it has no security features, not even user login. It might also be quite hard to install for a non-geek. Otherwise, I really like it. (They also have an online demo. Too bad, no security features means the demo was all too easy to spam. However, I still think it's worth playing with.)

First, it's simple. Add inbox item, add action, add next action, add project and that's all (it's sometimes quite counter-intuitive, e.g. to add an action to a project you have to click "Actions" link looking like a section header). But it isn't too simple. There is still support for contexts, goals, projects and so on.

There's a very nice screen "Weekly review" which might be of great help to GTD beginners, and not just beginners. It lists every step that one should take during a review, and, if something is missing, like the next action for a project, it's also listed there. Although I have been practising GTD for three years now, I'm glad there's this list and I will surely use it. (And yes, I'm gonna add those missing next actions as soon as I'm finished with this post.)

When I bought my Mac, I wanted to use Thunderbird for e-mail, just like I did (and still do) on Windows. It had, however, a very annoying mac-specific bug: the dock icon showed wrong number of unread messages. I could try to ignore it, but I decided to switch to Mail.app.

I have a policy of leaving no mail in the inbox: everything must be moved or deleted. (It's probably called inbox zero.) Thus, messages get removed from the inbox all the time. And I think it's something Mail.app doesn't like very much:

That's a little less tha 4 billion 300 million messages, and it tells me there's a little nasty integer overflow in Apple's code.

It's quite easy to get rid of this absurd number, but no method I was able to google fixes it permanently. The correct number returns, but as soon as a few dozen mails get removed from the inbox (and that means hours), there are again over 4 billion.

Yes, it may not be serious but it is really annoying, at least for me.

I don't use this number-on-the-dock-icon thing anymore, so it looks like it's time for Thunderbird again.

Once I had spent a few hours trying to make LaTeX (package float) put captions inside float boxes, and not below them. I ended up with a very ugly hack, using \captionof instead of \caption to fool the float package.

I never liked the hack, but it worked, I failed to come up with something better and I figured I'd rather write the text (my diploma thesis) than waste any more time trying to fix what didn't break.

It worked until I installed TeXLive2008 on my new computer.

I wanted to downgrade to 2007 immediately, but I decided to try once more and fix it. One minute googling the web, I found floatrow - a replacement for the old float environment, new package in TeXLive 2008.

\floatsetup{BOXED} and that's all.

No more ugly \captionof, it just works as I always wanted it to. Now I will have to clean up those \captionof some day, or maybe not, floatrow displays them correctly as well. Yes, it's one regexp replace. And yes, sometimes I'm that lazy.

Wolfram|Fail

| No Comments | No TrackBacks

It's been five days already since the "computational knowledge engine" called Wolfram|Alpha had launched, and many people had already laughed at it. Of course, there are many fails, some of them even quite funny, so there is something to laugh at.

I'll try to be a little more serious.

Free Image Hosting at www.ImageShack.us

This, for example, is almost entire information about the World War II that this Next Big Thing knows, or wants to show.

The list of countries involved is just amazing. First, try and tell me how they are ordered because I can't tell. Is it Allies first, Axis last? Possibly, if you ignore that Third French Republic at the end. Or is it just random?

Of course, it's also incomplete: what about Denmark, Norway, Belgium, Netherlands, Yugoslavia or Greece to name just a few that were involved, but their involvement seems just too insignificant to be computed in.

The list is also inaccurate: Italy, Hungary and Bulgaria were monarchies at the time, but they are listed as republics. Why? Wolfram only knows.

People involved? Alpha lists politicians from some countries, and most of them were in fact involved, but hey, it was a war. You know, where armies fight. Armies have commanders. Yet, the only military people listed by Alpha are Goering, Tojo and de Gaulle. Eisenhower or Zhukov probably never existed.

Now for the biggest fail: try and make Alpha tell you how the war ended, who had prevailed and who was defeated. No? Wolfram|Alpha isn't sure what to do with your input? Mine neither.

Almost all "search results", even when, by some miracle, they refer to exactly what Alpha was asked about are similarly useless.

So what it's this entire Alpha about? Yes, it can show you your current geoIP location, put some funny things from Douglas Adams or Monty Python and even quote a tongue twister, but what real work could anyone use it for?

Wolfram|Alpha isn't sure.