It's time for search and replace

searchWeb browsers, like Firefox or Chrome, are no longer document viewers, but application platforms. I’d like to see browsers start to implement search and replace. Of course not modifying the page, just replacing the matching strings in forms.

I’m really surprised it’s not implemented yet. In the last two weeks I needed this feature about 5 times. It’s time for search and replace in web browsers already.

Reviewed by Daniel Magliola. Thank you!

Proper linking ettiquete

This has been mentioned thousands of times on the interwebs, but in case there’s at least one person reading this that didn’t know it, I’m explaining it again. Using hyperlinks in a piece of text doesn’t mean it has to stop being proper, readable English (or any other language). For example, imagine the phrase:

It was a nice movie, click here to read more about it.

Read it again. Now close your eyes and imagine someone reading it out loud. It doesn’t make any sense, does it?

Hyperlinks already carry the meaning that there’s more information behind them. No need to repeat it with “to read about it”. And they also carry the information about being clicked, so no need to say “click here”. And in some interfaces you don’t click, and I can think of already two cases:

  • People using the keyboard and only the keyboard to navigate. They are more than you think. I myself would be doing it much more if it wasn’t so hard on so many broken web sites.
  • People using a phone, like the iPhone. You don’t click, nothing clicks. It’s called tapping.

For computers “click here” doesn’t provide any proper meta-data. There are services that extract a lot of information about links. Google being one example. Let’s analyze what would happen to Google if you do it correctly, like:

It was a nice movie.

That was short, wasn’t it? Half the size and no-nonsense, but I digress. Google would index that link as a “nice movie” and that’s good because you are adding information to the web, you are expressing your opinion and when people search for “nice movie” they are more likely to find the movie you pointed to. Maybe you are the only one believing that’s a nice movie, but when lots of people link to it as a “nice movie”, Google will catch that.

Also, imagine that your page gets turned into plain text, or printed, or spoken, or whatever:

  • It was a nice movie, click here to read more about it.
  • It was a nice movie.

Which one makes more sense?

Now, we can take it a step further. Something else you can do to make your text more readable, more robust and nicer overall is to do more or less proper attribution. I’m not talking about academic proper attribution, I’m taking about simple things. I’ve recently found this sentence in the Stack Overflow article Advice for Computer Science College Students:

I’ve read an article from a few years ago

which I promptly edited, thanks to my karma earnings, to be:

I’ve read the article Advice for Computer Science College Students from Joel on Software a few years ago.

Aside from the proper period at the end of a sentence, do you see how and why my version is more readable, contains much more information (while being shorter on text on the screen) and can resist being turned into text, speech or braille? So, next time you write something, please, remember that even if you are using a computer, you are still writing a proper language.

Sometimes the links are so important that you want them to get to a text or spoken version. In that case, imagine how you would write it if you were speaking or writing with a pen on paper:

I really like Joel on Software, which you can read on

which you can then later enhance for the web:

I really like Joel on Software, which you can read on

Now there’s extra information in there. The URL is there three times, one in text, two in hyperlinks. But the text is not longer and it’s not harder to read (unless you pick up hyperlink colors badly) and it gives the user more places to link, machines that look for context information more to pick up from. It’s a win-win.

Reviewed by Daniel Magliola. Thank you!

It's not a theory!

“The car is not starting”, he said, “I have a theory, the tank must be empty.”. That’s not a theory! That’s a hypothesis.

A hypothesis is the first part of a theory, it’s how a theory begins and it’s what we have when we think we have an explanation for something. When we go and confirm that explanation (check the tank is actually empty), proving the hypothesis, then, we have a theory.

I’m tired of hearing the word theory when they mean hypothesis. In Start Trek they do it all the time. Captain Picard asks La Forge why the friking thing is not working and after thinking for 1.5 seconds, La Forge says: “I have a theory, maybe the…”. There are no maybes on a theory! That’s a hypothesis. I think I’ve heard the word hypothesis used correctly in Star Trek TNG twice. Somehow, my wife started to use it correctly. I’m surprised. I suppose she got tired of me shouting “that’s a hypothesis!” every time La Forge opens his mouth.

I leave you with the official definition of hypothesis:

an idea or explanation for something that is based on known facts but has not yet been proved:

Several hypotheses for global warming have been suggested.

And then we reach the conclusion that all that we talk about all the times are not theories or hypothesis, they are not formal; but somehow I’m OK with using those words informally. By the way, I’ve learned this on school. I can’t remember if it was in the last years of elementary school or on the first years of high school.

This is the first of a probably infinite series of post about my pet-peeves. Muhahaha.

Printing the class-path in Clojure

Let’s compare how we print the class-path in Clojure and how we do it on Java.

In Clojure:

(println (seq (.getURLs (java.lang.ClassLoader/getSystemClassLoader))))

In Java:


public class PrintClasspath {
    public static void main(String[] args) {
        //Get the System Classloader
        ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();

        //Get the URLs
        URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();

        for(int i=0; i< urls.length; i++)

To be fair, the output is not the same, but the effect is.

The need for a common language

This is just one small example of why we need a international common language.

In 1975, the World Health Organization refused:

  • U$S 148,200 for a better public health service in Bangladesh
  • U$S 83,000 to fight leprosy in Burma
  • U$S 26,000 for basic hygiene in Dominican Republic
  • U$S 0.50 per patient to cure trachoma, which has millions of victims and can cause blindness
  • and many other requests

Meanwhile, it accepted Chinese and Arabic as working languages increasing the expenses in in translations by U$S 5,000,000, every year. Continue reading “The need for a common language”

IBM, I'm getting a Dell

When I was young, the laptops were Toshiba. Toshiba Satellite to be specific. Latter on IBM took that title with its Thinkpad, and the first laptop I bought was a Thinkpad which worked quite good. Very good, it’s been working almost non stop for four yeras already. I upgraded the hard disk and I gave it to my wife. I’ve decided to buy a new one. Continue reading “IBM, I'm getting a Dell”

Who are Conor O'Brien and James McMahon?

Conor O’Brien of the Raglan Clinic and James McMahon of Hassett are the people that own me €1250, the deposit of the apartment I rented for more than a year in 4, Windermere, Gilford Road, Dublin 4, Ireland. That I returned in perfect condition and was accepted as such, more than a month ago.

Now that we got to the point, let me tell you the story. I’ll try not to sidetrack with issues like Conor arriving more than outrageously late when I had to handover the apartment and had very little time (moving to Zürich, where I live now) or that James published the apartment as having dishwasher and cable TV which it didn’t (nor was there hot water as well, or fire alarm, or the two set of keys, etc). Ooops, sidetracked. Or that when I went there with James and my wife to see the apartment, there was a guy taking a shower, in the apartment, that shouted “don’t come” and we had to return the day after. Ooops, sidetracked again. Continue reading “Who are Conor O'Brien and James McMahon?”

Typing Esperanto in Ubuntu (or any other X)

I’ve got tired of not being able to easily type in Esperanto in Linux. There are some articles out there explaining it how and the are always convoluted and I’ve never seen one that gets to the point of typing “ŭ”, the always try very hard to get “ĝ”.

There’s an Esperanto layout in Ubuntu and I suppose other X Window Systems as well, but there are two things I don’t like about it. One is having to find out where the keys are, I could re-label them, but then I would only be able to type in Esperanto (which might be educational but not what I want, at least for now). I also don’t like the fact that it is Qwerty, not Dvorak. And even if it was Dvorak, one should make the statistics about Esperanto to make a proper Esperanto Dvorak-style keyboard. Continue reading “Typing Esperanto in Ubuntu (or any other X)”

Sound in space

I wonder when we will start to see DVDs of space tv-shows, like Babylon 5 and Star Trek, where you can pick to watch them with no sounds on space. I’m really pissed off at the sounds of the Voyager on the presentation, they don’t even add to the scene, it only makes a beautiful presentation feel childish (stupid and ugly).

Pylons or Django?

I am trying to decide whether to use Pylons or Django. Both are frameworks for building Python web applications, but with opposing philosophies.

Django tries to be everything. It comes with its own ORM, its own template engine, its own everything. That gives you a nice developing experience because everything fits together and because very nice applications can be built on top of all those components, like the admin tool, which is amazing. Continue reading “Pylons or Django?”