soledad penadés
repeat 4[fd 100 rt 90]

Archive for July, 2007

20070731 Libraries and frameworks

I often get asked for recommendations about libraries and frameworks, and I also find myself often in the middle of discussions between the opponents and the supporters of libraries and frameworks.

To be honest, those discussions/wars are pretty much stupid because nobody takes the time to understand properly what's going on, and from my point of view I just see ignorance in both sides.

There's not an absolute truth in what regards to libraries and frameworks, and I doubt there will ever be such thing. You can't proclaim yourself a "I do it all myself" man or woman because that's just plain ridiculous. Are you also programming your database server, and your web server, etc? And the people which absolutely encourage the use of ready-to-use libraries also look ridiculous to me. How are you going to deal with the situation when you need to extend feature A or change feature B, if you don't know how the library works?

At the end all gets reduced to just one advice: investigate. Get informed. Compare what options you have before making a decision. Dig into the code and find out how it is built. Is it easy to understand? Is it well documented? If you wanted to change something could you do it without having to spend a whole week on it?

I generally tend to prefer very decoupled libraries which can be easily replaced with another library or with my own code whenever I need, so in a way I use libraries as a prototype. If the library is not that decoupled, I always try to build a wrapper so if I replace the library I just have to rewrite parts of the wrapper, but my main code is left untouched.

So do whatever you want. Use a library, or do not use a library, but do not hassle people which choose a different path.

20070717 The perversion of popularity ranks

A couple of years ago, when digg was launched and wasn't anywhere as popular as now, it was quite interesting to have a look there. It was more or less like an assortment of random stuff, quite oriented towards technical matters, so was an easy way of reading different things without having to jump from one page to another.

Some time after, lots of people discovered about the site, it got popular, and people began to submit lots of content only for the sake of increasing traffic to their websites. It was when we began to get bombarded with the advice of so-called experts advising on how to title a blog post with the only purpose of inducing people to click it, bookmark it and all that, and so we ended with these symptoms.

More or less at the same time, del.icio.us discarded their old style front page (which used to show the recently added bookmarks) and chose to show the most popular posts. You could still look for the just-posted stuff but it wasn't that accessible. This led to people coming to del.icio.us, seeing the popular stuff (which usually was designed with the purpose of being bookmarked, see above) and bookmarking it again, which made it rank even higher.

Parallel to all this, bloggers with a desire to blog about fresh news kept using digg and del.icio.us as their main sources. This creates a feedback loop in which stuff which was already popular gets even more popular and can even manage to appear in more traditional websites such as Slashdot or The Register.

I thought that the trend would stop at digg but unfortunately it didn't. New websites flourished, based on the same pattern, such as dzone, a digg for developers. As expected, at the beginning it had very good content, and now I'm seeing more and more of those "50 must have tools for developers", "4 languages you need to know", "15 css tricks that increased my sex appeal" or "30 tutorials for free" on the front page one day and the next one as well.

At the end, mediocrity gets promoted to an unforeseen level of popularity, internet is polluted with crappy wannabe content, and I sorely have to lament the demise of yet another website which looked good.

How sad!

Hey, Technorati, are you going to fix this anytime soon?

Triplicated results in technorati! beat it!

… because this has been happening for a couple of years now and you don't even reply to my support tickets.

Check my triplicated search results by yourself!

I heard Google's blog search was a better search engine for blog stuff. What do you think?

Note: I very very rarely use Technorati, since its search results tend to be quite polluted with things like this one. But it is used by Wordpress to show you the latest links to your site and that's why I'm seeing those threesomes each time I log into my admin panel. And it's ridiculous!

20070716 Serene observations on php4 controversy

Since the PHP group announced they weren't going to support php4 any more when 2007 ends, I have been watching with amusement the reactions this fact has sparked. In general, it feels quite similar to previous public announcements of product discontinuing, such as Windows 98, or Firefox for windows 98, etc.

The most absurd reactions come from very angry people which not only demand support for that product to be extended indefinitely but also do not use the product at all or do not have any decision power about the use of that product in their organisation or environment. They can fill in pages and pages writing infuriating comments about how evil is vendor X for not supporting product Y, and how bad is it for everybody, without giving any solid reason usually.

And the rest of the blame is equally distributed amongst sys admins and developers. Sys admins say they can't upgrade to php5 because the applications running in their systems are not designed with php5 in mind. Developers say they can't develop for php5 because their sys admins do not offer support for php5.

I say stop blaming each other.

It's not that hard to migrate an application to php5, unless it's a complete disaster. For instance, I saw one which had some functions named public and private. Honest! Those functions were repeatedly called thorough the whole code base. Obviously when trying to run this with php5, it failed spectacularly. (Somebody tried to fix it replacing every public with pub and private with priv, and then it broke other parts of the application, but that's another story…)

Personally, I wished every host in Earth had moved to php5. I never use php4 in my projects and it's really annoying to have to downgrade the code for distributing it publicly. It also breaks my heart to have to emulate some php5 functions when working with legacy php4 code for php4-running servers, such as for example array_combine.

And at the end I wonder, can we take seriously a developer or a sys admin which have not learnt about php5 yet, even if it was released more than three years ago? I can't.

20070713 Thumbs up for FlashDevelop

Some weeks ago I said bye bye to php, html, css and all those pain inducing drugs for a while, and switched to work mainly with Flash. At the beginning I was using only the Flash IDE and external editors, as I had done since ActionScript2 appeared on stage (pun!!). But I still had a pending task in my to-do list: to have a look at FlashDevelop, specially since Zarate talks so much about it ;-)

I started using FlashDevelop a couple of days ago and I must say that it absolutely makes a difference, and what difference! Once configured, it detects my classes, methods and properties (showing an Outline panel) and helps me writing code with some autocompletion love each time I press the magical dot key, unfolding a list with available methods and properties for the active object.

I suddenly got back that I'm programming for a compiled language feeling. It was so cool! It felt like programming in Java again, but without Java annoyances.

There are some small details that I still haven't had time to tweak, like the sorting method in the outline (currently it seems to be listing everything in the same order than it was defined), or configure it to use Flex2 compiler and all that. But even if I'm just scratching the surface of what can be done with this program, I strongly recommend it. The autocomplete feature is worth a try by itself!

On a side note, I still don't get how Flash's IDE is so 1998 in what regards to the Code editor (the Actions panel). It looks as if it hasn't been given much attention, presumably because they dedicated more resources to Flex and its editor instead.