Archive for March, 2005

The WordPress Affair

Matt MullenwegPoor chap Matt Mullenweg is being thoroughly grilled everywhere since he was caught in the act of playing dirty tricks with links hidden in the WordPress.org home page and pointing to pages of dubious morality, targeting high-paying keywords and whose only purpose was to gather money through AdSense ads.

It's not a pretty sight. I don't find anything wrong with using ads to raise some money that will be used, purportedly, to pay some of WordPress' development and hosting costs. What I don't like is the way this has been done.

I won't even go into how spamming search engines is evil, no less evil than spamming mailboxes or blog comments. That's quite obvious.

What's particularly sad however, is the complete lack of transparence. If you're a developer who has ever developed a plugin or contributed a bugfix to WordPress, wouldn't you feel betrayed?

Was the money promised by those slimy nachos so much that it couldn't have been raised by honest-to-god, relevant ads? I'm pretty sure Matt could have raised a decent amount of money using ads properly. With a website that ranks 4,207th, according to Alexa, in terms of traffic, you can probably earn a good income and keep it all for yourself instead of getting only a flat fee, even if the ads are not paying as much as for insurance, credit cards, debt consolidation or viagra.

Since Matt is almost exactly half my age, I don't want to be too harsh. Who's not done something terribly stupid in his youth? I'm sure he'll regret this and reform his ways. Unfortunately for him, the web, an Google in particular, have very good memory, so this episode won't be forgotten so easily.

Google prefetching

According to this: “On some searches, Google automatically instructs your browser to start downloading the top search result before you click on it. If you click on top result, the destination page will load faster than before.”

I've tried various searches but haven't seen the

<link rel=”prefetch” href=”/images/big.jpeg”>

tag so far. Has anyone seen it in the wild?

Where are you coming from?

In the last few hours, this site has seen a large percentage of hits to this page, say about one third of the total visits. What's perplexing me is that most of those visits don't show a referrer URL in the webserver logs. So I assume that the link has not been posted on a web page somewhere.

But some of those do have a referrer that is either a Gmail or Yahoo! mail page. This makes me think that someone has been sending out a newsletter to a large number of people with the URL of my page embedded inside. This is piquing my curiosity.

Dear reader, if you came here via the Comparable vs. equals() page, please leave a comment telling me where did you find it, thanks.

Later: I think it must have been Erik's Pulse, which many people probably get via mail.

Capturing the Upside

Clayton ChristensenThis morning I had to drive a couple of hours to go to a customer's place and come back, so I thought that I could get a taste of podcasting with my new iPod Shuffle. I downloaded this talk by Clayton Christensen, loaded it onto the iPod, connected the latter to the cheap but effective cassette adaptor I just bought and had an informative drive.

I must say this podcasting thing is great. You learn something instead of being bored by the usual chatter, dumb music and commercials that are typical of FM radio. However, since I fortunately don't drive frequently for long distances, I don't know when I'll be able to podcast again.

By the way, the talk is great. If you have 1h48m to spare, by all means listen to it! I have to take issue, however, with one specific point:

So, I’m not a software engineer or designer, but this is what I think Linux does, or MySQL or Apache, whatever it is, is that because of the open source character of it, the architecture is modular.

I don't think those products are modular just because of their being open source. You can have monolithic, proprietary and highly optimized open source products, just as you can have modular and open commercial products.

Anyway, where Christensen is right on the spot, however, is in his theory that companies doing business with open source can be successful by exploiting the “law of conservation of modularity”. By basing your architecture on open, modular components, you can optimize the tier, applications for example, where most profits can be made.

When I hear that Google, after having based its infrastructure on highly modular, commoditized and not-good-enough Linux PC's, is hiring one Mozilla developer after another, not to mention some ex-Microsoft browser developer, I cannot help thinking that by having one modular, standardized tier below and possibly one above, they are poised to reap the greatest benefits from their proprietary products.

Use your telephone with Skype

Actiontec: “Instead of being restricted to unwieldy headsets or small microphones in front of the computer, now you can make Internet calls from anywhere with a cordless or regular phone. You'll still be using the Skype service and an Internet connection for these calls, the only difference is that everything will be channeled through the phone instead of the computer speakers.”

If only it didn't require Windows …

Mac OS X 'Tiger' Available for Pre-Order

OS X Tigewr.jpgMac OS X 'Tiger' Available for Pre-Order : Gizmodo: “Amazon has a pre-order page for Apple’s next revision of OS X, 10.4, or ‘Tiger.’ While there’s no release date, the $35 mail-in rebate shows a ‘postmark by’ date of May 31st, so I would expect it to arrive reasonably soon before then. There have been rumors that Tiger would be released on April 1st, but who knows.”

Here's hoping the April 1st date is not this year's first April's Fool joke. And hoping this release will include JDK 1.5 (a.k.a. Java5). In the last few days there have been a number of releases that promise much better support for Java5:

I'd really like to start testing the new Java features, like annotations, with my favorite frameworks.

'Facts and Fallacies of Software Engineering' Review

Here's another short book (195 pages) that cannot be missing from a good software engineer's personal library. Robert L. Glass condenses in 55 facts and 10 fallacies — some of them well known, others more controversial — his vast knowledge of the field.
ffse.jpg

The 55 facts are subdivided into four main sections:

  1. About management
  2. About the Life Cycle
  3. About Quality
  4. About Research

The ten fallacies are instead grouped as follows:

  1. About Management
  2. About the Life Cycle
  3. About Education

This organization could provide a hint as to what sections of the book you'd better read first if you are managing programmers rather than if you're more involved in coding. But in any case, I suggest that whatever your positions, you will be better served by reading it all.

Glass, a member of the “old guard” of software engineering, having been a practitioner of the field since its very beginnings, is a bit wary of espousing the latest trends in software, like eXtreme Programming. Some of his facts and fallacies fly right in the face of some XP principles and practices. See for instance fallacy nr. 3:

Programming can and should be egoless.

How can you reconcile this with collective code ownership and pair programming?. In other instances, he shares some of XP's convictions. See for instance fact 28:

Design is a complex, iterative process. Initial design solutions are usually wrong and certainly not optimal.

In the end, no matter what development process you like best, you're bound to find some controversial statements inside this book. If this makes you think about what you're doing and how successful you're being at it, I think the book will have fulfilled its purpose. By being apparently dogmatic in its format (what sounds more dogmatic than a list of asserted “facts”?) Glass manages to teach us that what you should be avoiding mostly is indeed dogma. In the current climate, dogma typically takes the form of a new development methodology that promises to end all debates on methodology. To fight this, everyone should memorize fallacy 5:

Software needs more methodologies.

Highly recommended!

Facts and Fallacies of Software Engineering by Robert L. Glass, Addison-Wesley Professional; 1st edition (October 28, 2002), ISBN: 0321117425

Transparent Screen

Why use semi-transparent windows when you can have a transparent screen?

Transparent screens

Who needs Windows anymore?

PassBNL.gifA couple days ago my bank gave me a small blue gizmo with a button and an LCD display. Every time I press the button, a six digit number, always different, is displayed. They tell me it's a One Time Password generator.

Why this matters to me is that with this gizmo I can access my bank account online without using the stupid, clumsy and Windows-only cryptographic software I was forced to use before.

What it all comes down to is the fact that I have no use for Windows anymore, since this was the only Windows application I couldn't absolutely do without. My Intel PC is now sitting idly on my desktop, but it could be more useful as a doorstop. That's what it'll end up being as soon as I can put a brand new iMac G5 on my desktop.

Mexico here we come!

Chichén Itzá pyramidsThis seems to be the day for announcing future travel plans. After Stuttgart in July, it's going to be Mexico in August-September. I just booked a two-week trip to Yucatan for the family, starting August 23rd. By booking so early, I was able to get a substantial discount on the cost of the holiday. Being somewhat of an archaeology buff, I have been wanting to see the Mayan ruins for a long time, so I finally decided to take the chance this year. I'm sure it's going to be great.

By the way, given the proximity of Easter, I'm afraid blogging will be light until tuesday, unless something really interesting turns out in the meantime.

ApacheCon here we come!

apachecon_logo_135x41.gifGot this in the mail this morning:

Thank you for your recent session proposals for ApacheCon Europe 2005.

The following sessions have been selected and
scheduled:

(1244) 'Developing Enterprise Web Applications with Cocoon and Spring'

So it looks like I'll be heading down to Stuttgart next July, great! The proposal I submitted is for the same presentation I did at the Cocoon GetTogether 2004, but given Carsten's recent work on the itegration between Cocoon and Spring, I'll have to update it quite a bit.

Apache Cocoon 2.1.7 Released

cocoon.gif

The Apache Cocoon Community is proud to announce the new release
of Apache Cocoon. This release is licensed under the Apache License,
Version 2.0, and builds/run under JDK 5.0.

Apache Cocoon is a web development framework built around the concept
of separation of concerns (that is: allowing people to do their job
without having to step on each other toes) and component-oriented web
RAD.

Cocoon implements these concepts around the notion of 'component
pipelines' modelled after the 'process chain' concept where each
worker specializes on a particular operation. This makes it possible
to use a Lego(tm)-like approach in building web solutions where
these components can be hooked together into pipelines without
requiring further programming.

We like to think at Cocoon as “web glue” for your web application
development needs. But most important, a glue that can keep
concerns separate and allow parallel evolution of the two sides,
improving development pace and reducing the chance of conflicts.

The latest version is downloadable from
http://cocoon.apache.org/mirror.cgi
(Please use the mirrors to download the release - it might take
a little bit more time until the latest release is available on
all mirrors, so give the mirrors some time - approx. 24h to update.)

For more information about Apache Cocoon 2.1.7, please go to
http://cocoon.apache.org.

The Apache Cocoon Project

Terroir Doesn't Exist

Vinography: a wine blog: Terroir Doesn't Exist and Parker Is Pricey: “This will be dismissed, perhaps rightly, as highly contentious and flawed research. Anyone who has drunk enough wine, and in particular, tasted barrel samples from different regions of a vineyard will know that different soils and microclimates, even within a vineyard, will produce wines that can taste wildly different, even given identical winemaking techniques.”

Just like everybody knows that children raised in the same environment will have wildly different personalities, according to their birth sign, right? Well, wrong!

To be clear, I'm not saying that terroir does not exist. I'm not competent enough to tell. What I'm saying is that assertions like the above look very much like a case of communal reinforcement:


Communal reinforcement is the process by which a claim becomes a strong belief through repeated assertion by members of a community. The process is independent of whether the claim has been properly researched or is supported by empirical data significant enough to warrant belief by reasonable people. Often, the mass media contribute to the process by uncritically supporting the claims. More often, however, the mass media provide tacit support for untested and unsupported claims by saying nothing skeptical about even the most outlandish of claims.


Communal reinforcement explains how entire nations can pass on ineffable gibberish from generation to generation. It also explains how testimonials reinforced by other testimonials within the community of therapists, sociologists, psychologists, theologians, politicians, talk show hosts, etc., can supplant and be more powerful than scientific studies or accurate gathering of data by disinterested parties.

So, I'd advise more caution before dismissing the results of a scientific study. It takes more than “anyone will know”.

Comparable vs. equals()

I just spent a few hours debugging a strange bug, whereby I couldn't add some elements to a Set even though no element already contained in the Set, when compared for equality to the element to be added, resulted to be equal. In other words, I could not add an element to a Set, even though the Set did not actually contain the element.

After having printed all the involved variables before insertion, a couple of JUnit runs confirmed that this was indeed the case, while I had spent the previous three hours chasing a bug in my persistence code that was not there, and not even in Hibernate.

Turns out the Set was actually a TreeSet, and the objects contained in the Set implemented the Comparable interface. Looking at the Java docs, I came upon this:

Comparable (Java 2 Platform SE v1.4.2):

The natural ordering for a class C is said to be consistent with equals if and only if (e1.compareTo((Object)e2) == 0) has the same boolean value as e1.equals((Object)e2) for every e1 and e2 of class C. Note that null is not an instance of any class, and e.compareTo(null) should throw a NullPointerException even though e.equals(null) returns false.


It is strongly recommended (though not required) that natural orderings be consistent with equals. This is so because sorted sets (and sorted maps) without explicit comparators behave 'strangely' when they are used with elements (or keys) whose natural ordering is inconsistent with equals. In particular, such a sorted set (or sorted map) violates the general contract for set (or map), which is defined in terms of the equals method.


For example, if one adds two keys a and b such that (!a.equals((Object)b) && a.compareTo((Object)b) == 0) to a sorted set that does not use an explicit comparator, the second add operation returns false (and the size of the sorted set does not increase) because a and b are equivalent from the sorted set's perspective.”

I incorrectly assumed that Set.add checked for equality via the Object.equals method! My compareTo method, on the other hand, used only a subset of the fields used by equals, since the other fields did not matter, as far as sorting was concerned. Well, according to Java, this is wrong.

I should also have remembered Item 11 from Joshua Bloch's Effective Java: “A class whose compareTo method imposes an order that is inconsistent with equals will still work, but sorted collections containing elements of the class may not obey the general contract of the appropriate collection interfaces (Collection, Set or Map).”

You'll never stop learning!

Ajax for Dummies

Gianugo is smelling hype around Ajax. Looks like we're going pretty fast along the classical technology hype cycle. We are currently at the Peak of Inflated Expectation. Is the Trough of Disillusionment nearby?

Elzeviro - Ajax smells hype: “Let me stress this first: I'm very interested in Ajax, and I definitely like the final result and the impressive UI improvements it brings. However, I can definitely smell a lot of hype around it: two different (instant?) books, (pseudo) libraries showing up, countless blog posts, coffee machine discussions, third place in a google search for the term 'ajax', all that is somewhat worrysome.”

I agree with Gianugo that we should use it in very specific scenarios. At the moment, I see Ajax as a useful complement to web applications. Limit yourself to adding some amount of interactivity to forms and navigations, and you won't run too many risks. Try to use it as the foundation for a web application that is supposed to compete with traditional GUI applications and — unless you are Google — you'd better be prepared for failure.

Well, you'd better be prepared for failure even if you are Google.

Anyway, the hype around Ajax is real, but not to the point of having already two instant books at the presses. The two you've seen here and here are fakes ;). But wait! I have just landed a contract to write an Ajax book for real. I have actually been working on it for a few months and am presently able to show you the cover page: “Ajax for Dummies” will hit the shelves of Amazon.com and Barnes&Noble later this spring. Grab your credit card and place an advance order or you'll risk having to wait while the first copies are sold out!

Ajax For Dummies book cover

Effective Enterprise Ajax

On the heels of Ajax in Action, here's another new book on the technology that is taking the Web development world by storm: Ajax.

Book cover

Effective Enterprise Ajax provides you with 75 easily digestible tips that will help you master Ajax development on a systemic and architectural level. Its panoramic look at the good, the bad, and the ugly aspects of Ajax development will address your most pressing concerns. Learn how to design your Ajax systems so they adapt to future demands. Improve the efficiency of your code without compromising its correctness. Discover how to implement sophisticated functionality that is not directly supported by the language or platform. After reading Effective Enterprise Ajax, you will know how to design and implement better, more scalable enterprise-scope Ajax software systems.

Danese Cooper Leaving Sun

DaneseCooper.jpgNew DivaBlog: Leaving Sun: “After the flurry of stories on Friday and over the weekend (my favorites being Jim Grisanzio's lovely farewell, Matt Asay's surprising testimonial and the original blog written by David Berlind), it will come to no surprise that I'm leaving Sun. I'm off to see if I can have any influence at Intel, a company which has benefitted hugely from the increased popularity of Free and Open Source software around the world. I'm quite sad to leave the many good friends I've made over the years at Sun. Change it always hard.”

I remember meeting Danese at OSCOM 4 last September, where she gave a talk on blogging at Sun, telling the story of how they got Tim Bray and Dave Johnson on board.

The question that's on my mind now is: Will she retain the “Open Source Diva” title she had printed on her business card?

“The Secrets of Consulting” review

The Secrets of Consulting
The Secrets of Consulting - A Guide to Giving & Getting Advice Successfully, Gerald M. Weinberg, Dorset House Publishing.

I picked up this book when I was thinking of becoming a full-time, free-lance consultant. Even though consulting clients will probably occupy only part of my time in the near future, I still find this book very useful.

Being a successful consultant, according to Weinberg, essentially means learning to deal with a couple of inescapable elements of every business: irrationality and change.

Consulting is hard because clients are not acting rationally. They will have a problem but will never admit it, and the problem is always a people problem, no matter how technical it might seem at first. These two facts are so well established that Weinberg labels them as The First — and respectively, The Second — Law of Consulting.

This is one of the features of the book: lots of hard-learned facts are distilled into succinct — and at times pithy — laws, principles and rules. In order to make it easy to remember them, they are given fanciful names like Rudy’s Rutabaga Rule or The Titanic Effect.

Weinberg’s advice is not to try to be rational at all costs, and don’t force clients to admit their problems and fears. Consultants should be reasonable rather rational, cultivate a paradoxical frame of mind and help clients solve their problems by themselves.

Consulting is also mainly about change: A consultant will be called in either to foster or to prevent change. Clients will typically be stuck in a troublesome situation and will need someone to jiggle them in order to become unstuck. A good consultant will need to learn how to amplify his own impact in order to act effectively on a client’s organization, which is much bigger than him and with much more inertia.

The last part of the book deals with marketing one’s own services and putting a price on one’s head. In my opinion, the best advice on this matter is The Principle of Least Regret:


Set the price so you won’t regret it either way.

This basically means that you should not set the price so low, in order to get the assignment, that you’ll regret it if you obtain it. And you should not set it so high that you’ll regret it when the client is unable to pay it. Rather, you should set it so that you’ll feel about the same whatever happens. You shouldn’t feel too bad if you’re turned down and you shouldn’t feel too bad if you’re accepted, either.

The book is highly readable, the format is entertaining and the number of useful tips per page is very high. It’s also quite short, which is a virtue. No matter what your job is, if you’re dealing with people, you should be reading it now!

What more can I say? Highly recommended.

Is Feng Shui bullshit?

Just found this great skeptic blog: Skeptico. One of the posts there talks about debunking Feng Shui:

Skeptico: Featured DVD – Penn & Teller: “They certainly get their message across. For example, in the segment on feng shui, they call in three feng shui experts to rearrange furniture in the same Californian house. No one who sees this program will forget how each of the three feng shui experts comes up with completely different arrangements of furniture - each expert supposedly using the same feng shui ‘science’. Especially telling was how the first feng shui expert said that the red sofa was bad for the family – she mentioned several health problems that would result. Then the second one said the red color was ‘absolutely perfect’. What a hoot. Does this prove that feng shui is bullshit? Well no, of course not. To do that you would need a much bigger experiment. But it’s not the job of Penn & Teller or anyone else to prove that feng shui is nonsense; if feng shui experts want us to believe in it, it is up to them to provide evidence that it does work. What P&T do is demonstrate the general idea of how things should be tested. And they make it pretty clear that they think feng shui failed the test.”

Sigh, I was starting to convince myself that an iMac G5 in my office room would have raised its Feng Shui quotient … I'll have to think again ;)

(Via Seth.)

Milano - Sanremo

Milano-Sanremo.jpg

As is customary every year, on the next-to-last March Saturday, the Milano-Sanremo cycling race passes right in front of our house. I took a few pictures but none was very good.

Anyway, being a nice, warm day, I was inspired to go for a short bike ride with my friends. Only about 50km, but not bad for one of the first exits of the season.

Update: the race was won by my favorite: Alessandro Petacchi. Go, Alessandro!

Alessandro Petacchi triumphs in Sanremo