Posts filed under 'Musing'

Programming podcasts

Podcasts are a great way to get educated and entertained. As a developer we are lucky to have a choice of some fine podcasts from industry leaders. If you commute, jog, travel, you can easily use that time away from the computer to get better informed and reflect about our field.

Continue Reading 1 comment September 7th, 2011

WPF and Silverlight: it will take a while…

technology01.pngDecoupling the User Interface from the underlying code has been one of the holy grails of application development. Layers of indirection and new patterns have been invented over time to try to separate what the user does from the back-end data. It’s been a long and difficult journey but WPF is the last attempt at completely separating the user interface from the gut of an application, leaving graphic designer do what they do best and programmers do what they do best.
I think this disconnect has actually hindered the adoption of WPF to a great extent.
I also believe that Silverlight, while showing great promises, is going to take a long time to get off the ground.

SilverlightGood graphic designers who work on User Interfaces are too few and far between, and large organisations will take time to get staff with a sufficient level of expertise to be useful in developing meaningful WPF/Silverlight applications.
Until now, the bulk of the development effort was done by developers. Most ISV only have developers onboard.

As far as I can tell, it seems that main reason behind this slow adoption is that WPF/Silverlight has only been noticed by developers and they don’t know what to make with it.
WPF/Silverlight are not really developer-friendly: the development infrastructure is there but we’re left with a blank canvas and nothing to drag and drop onto it.

There will be a great gap, probably lasting a few years, before there are enough experiments in these new user interfaces that some useful lowest common denominator can be exploited by non-designers.
We’ll have to wait for tool vendors to provide the bulk of user interface blocks and for a few new patterns to appear before all the designer-challenged developers like me can make decent interfaces without requiring a professional graphic designer in their midst.
In the mean time, we’ll probably have useless, but pretty, applications, some useful, but ugly ones and a lot of people scratching their head trying to couple the designers and the developers in a working relationship.

2 comments February 10th, 2008

People, mind your dates… plz?

technology02.pngWhat does 04/05/01 mean to you?
Let’s make it easy: is that date in 2001 or 2004?
And if I write it like 04/05/2001, is it really better? are we in April or May?
And the answer is…

Chinese Calendar If you are from North America and a handful other countries 04/05/01 would mean 5th of April 2001.
If you’re in Asia or some eastern countries, if could be 1st of May 2004.
For the rest of the world, it would look like 4th of May 2001.

We cannot ignore any longer the importance of writing dates in a format that is understandable by everyone.
Still too often, web sites -even big companies– with a global audience state dates in a format that is probably obvious where they live but not consistently so to everyone else.

Developers are sometimes guilty of this sin, as can be seen in the format chosen to specify dates in Microsoft Access SQL, which requires that hard-coded dates be formatted in the US rather than the more neutral ISO8601 format.
I wonder how many bugs that little egocentric feature caused in business applications that where developed by foreign coders
I know it also happened to me at least once…

Russian CalendarThe worst thing is that when you write 04/05/06, you may very well have thought about the rest of the world and meant DD/MM/YY; alas, unless the context grants us some clarification or the actual date is unequivocal, there is sometimes no way for a lot of us to know for sure what you really meant.

We should ban the use of the short date format in communications that may be read by more than 3 people, in today’s world, that’s pretty much all communication.

Instead a simple format such as 05MAY2006 is clear an unequivocal: it’s easy to read and understand, regardless of where you live.
You’re free to add spaces, dashes, dots, comas or slashes to it if you want, you can use 2006MAY05 if you prefer or even MAY05,2006, whatever pleases you: it still remains readable.

The rule is simple:write the year in full and never write the month as a two-digit number, that’s reserved for the day

The point is that you, me and the rest of the world can read it and understand exactly what was meant; it’s an easy problem to solve.
Surely that means something to you?


5 comments December 15th, 2007

Thank you spammers…

security01.pngI’ve been tired of spam on my websites. The few hundreds messages spammers leave everyday are a bit of a nuisance. Now though, I’ve decided to make them work harder to get their messages ignored.
Last week, reCAPTCHA came online. It’s an effort inspired by none other than Luis Von Ahn, so you know it’s good.

If you don’t know him then he’s the mastermind being similar projects that centre around a simple premise: make humans do the work that computers can’t do.
One of his on-going projects is the ESP Game where 2 online players are trying to come up with a common description of a random picture. It’s apparently an addictive game and it helps solve a problem that computers are terrible at today: describing accurately the content of photographs.
Google is using his research to make image search more useful by returning content more relevant to your queries.

So, what’s the relevance with the CAPCTHA?
CAPTCHASs were invented to resolve a simple problem: stopping computers from automatically filling-in web forms to create accounts on popular free services that they would use to send spam from.
They are a visual version of the Turing Test, elaborated by the WWII genius cryptanalyst Alan Turing as a way to test how far machines could behave like humans: not knowing who she was interacting with, if a person could not tell the difference between a human and a machine, then the machine passes the test. It’s a measure of the success -or lack of- of artificial intelligence and the idea spawned many others, including CAPTCHAs.

CAPTCHAs simply require that small problem be solved before a web form can be submitted. Typical problems include blurry and distorted images of text or numbers that would be very hard for computers alone to decipher, but that our brain has no problem solving.
There are an estimated 60 millions of CAPTCHAs being solved by human beings every single day. That’s a huge amount of lost brain power as nothing really useful comes out of it (apart from preventing spam, of course).

reCAPTCHA‘s genius idea is to use that brain power to solve a problem that we would actually like computers to solve: digitizing books.
There are millions of books that were printed in the days before computers became ubiquitous, and there exist no electronic version of them except scanned images of their pages.
Optical Character Recognition software is getting very good, but when the scan is of poor quality or the book is old, many words cannot be automatically recognised.
Humans on the other hand are quite good at reading words, even if they are badly distorted and barely recognisable.
Instead of making up a distorted image that you would have to recognise, reCaptcha simply presents you with 2 words: one it knows and one it doesn’t and you’re asked to guess both.
Every unknown word is checked multiple times by different people and you thus end-up with a very accurate interpretation of the word that can be fed back into the electronic version of the book being scanned.

CAPTCHA do not entirely solve the problem of spamming, but they are an financial issue to spammers: automated electronic system cannot solve good CAPTCHAs, so some spammer rely on low-paid humans to do the dirty work for them.

It’s fine by me: poor people are getting paid to do something useful (help digitise books) and spammers are wasting their money doing so. In my case, they lose even more, because I use moderation to read comments before they are visible and Askimet to detect spam, which means that however hard they try, their spam never gets anywhere anyway.

In the fight against spammers, it makes me happy to know I’m costing them something for a change…


2 comments May 31st, 2007

Chosing a development platform

technology02.pngLAMP, Zend, .Net, Struts, Ruby on Rails, Catalyst, and a hundred other development platforms all compete for you attention, all pretending to be the only thing you’ll ever need to satisfy your every needs in web or UI development.
Making a decision is really hard: you want the best for your new project and want to make the right decision. In most cases, that means not cursing yourself down the line for a choice that didn’t turn out as expected.

When you start looking into all these platforms you can be blown away by the ease of implementation and elegance of some; your head spins at all the features and claims being made and it becomes hard to achieve a rational decision.

I’ve been faced with that very issue recently and it sucks. Actually, the time spent investigating all these possibilities is really what is being sucked away.
Of course, learning about new technologies is not just fun, it’s also essential: you have to keep on top of what’s new and decide if you want to join in on the fun or just stay comfortably where you are.

I also realized that you need to get away from the coolness factor of each these much touted technologies and actually try to be objective.
During my investigation, I tried to decide what were the really important factors that I should consider to make a rational choice.

I came up with the list of the following 10 questions that I think everyone should ask themselves when choosing a platform for an important project.

1- Is the platform wide enough?

New technologies that can show amazing productivity get all the buzz. After all, that’s what we developer want: enough with the nuts & bolts! Give us a toolbox with all new shinny power tools! The problem is that often these technologies are impressive, but looking beyond the sample projects into what actual users get confronted to, you start noticing discussion threads that should obviously signal that the platform is not wide enough.
Choosing a technology that hasn’t achieved its goals can be a huge problem down the line: you implement 80% of your project in record time, only to realise that the platform you chose doesn’t support proper cross-browser detection, or that its implementation of security is way too lax, or that it only support XML for data storage and now you actually need a real database for performance reasons…
In those cases, you can of course develop those areas yourself and contribute to the project, but doing so supposes that you planed it all along and you factored that in your schedule, both in time and in cost.

2- Is it popular?

In other words: are other professional people actually using that platform in real life? I’m not talking about Joe Developer using it for his local community church website. I’m talking about businesses or large organisations actually using that software platform successfully.
If all you need is a simple 3 page website, then professional popularity amongst the Top 500 business companies is probably not that important. On the other hand, if you plan to build a large project, or you know that your project could grow large in the future, then you probably want to ensure that others have taken it there before you.

3- Is it mature?

Has the platform existed for long enough that it went through enough abuse to withstand almost anything you can throw at it?
A technology that is only a couple year old may be too young to have evolved to the point where it actually can solve most common and not-so-common problems. Technology evolves through iterations: each one is a good long hard look at what didn’t work and tries to fix, improve and extend.
A young technology may be more cutting-edge and exciting, but when you need to commit to it for a big project, its age may quickly come as an issue; its shinny surface may blind you to the black holes waiting below…

4- Are local developers available?

Always think about the future. When you’re gone from the project, who is going to look after it? Getting a web project entirely in Rebol may be cool and fun, but how many people in your city actually use that thing anyway?
Aren’t you creating a liability if you’re dead-set on choosing a platform that cannot be maintained?

5- Is it scalable?

Most projects start small but dream of ending-up big.
It’s usually fine at the beginning when the number of users and visitors is manageable, but what happens when you start to be successful?
After all, that’s why we craft our projects: we want them to succeed, we want the world to see them. When the world starts coming though, will the terrific platform we’ve chosen break at the seams?
How much overhead does the platform create? It is flexible in its database support? Is there a way to implement clustering or persisting sessions accross multiple servers?
What’s the cost in memory and CPU resources? How many simultaneous connections can you get? What are the bottlenecks? What do you need to do to compensate for them? How much would it cost?

6- Do you have control?

Some frameworks work hard for you and can make you really productive. Sometime though, they try too hard and hide too much from you.
When a feature doesn’t exactly work the way you want you have to dig deep into the entrails of the beast to make sense of it and change its behaviour.
A platform that was all nice and pretty can get very dirty and complex inside, making it difficult to adapt to your needs.
A platform should do most of the hard work but still allow you to redefine its default behaviour without much hassle. It should be built with extensibility in mind, making easy thing easy and difficult things possible.
A case in point are 4G development platforms: they usually have a fairly narrow field of expertise and tend to use graphics and nice simple paradigms to quickly build complex tasks but when you are faced with a specific issue that hasn’t been solved by the platform, you often have to resort to ugly hacks to get around their limitations.

7- Does it satisfies the essential constraints for your project?

When being blinded by something cool, we often become skewed in our judgement and guilty of lowering the importance of constraints that are actually critical for our project.
In all honesty, I really wanted to use Ruby on Rail, and I liked the principle and elegance of it so much that I came to seriously consider it, that is, until I came to my senses and looked into something that is critical to my project: support for complex Asian languages.
Ruby is being developed in Japan, so you could think that it should be able to handle complex ideographic characters well.
Turns out that the Japanese are not terribly fond of Unicode and, unless I’m mistaken, prefer to use Code Pages instead. The result is that Ruby doesn’t have great support for Unicode, and that sucks.
That’s why Unicode was created: to attempt to simplify all this patchwork of implementations that are not compatible with each other.
Because I needed to be able to handle English, Mandarin, Cantonese and probably any other language out there, Unicode is the only viable option to abstract the issue of language enough that it becomes manageable.
So because of Ruby’s poor support for Unicode, it would not be rational to use Ruby on Rails for my particular project as it would probably greatly increase the complexity and hacks necessary to manage complex Asian languages in a unified and simple way.

8- Documentation?

All framework have a more or less steep learning curve: you need to think differently to adapt to the particular framework’s frame of mind, so to speak.
Make sure that the framework has a lively community, that it has more documentation than you can swallow and that documentation is well organised.
Make sure also that there are samples, tutorials, webcasts, videos or whatever that cover the principle aspects of it.
A beautiful framework no-one talks about means that no-one will answer when you have a question. A beautiful framework without documentation is useless. A beautiful framework with lots of disorganised docs means that you’re going to waste a lot of time experimenting instead of building your project.

9- Support?

Here I mean support in the wide sense of the word: who is behind the framework. Are they likely to stay in business long after your project has been completed?
Are they commercial or Open Source? In either case there are issues for and against: a commercial venture backed by a small company may falter and disappear overnight. Similarly, an exciting open source project managed by only 2 people can suffer the same fate when they decide to move on. Support also includes what help is available to you when you encounter issues. Is there any guarantee that you could have your important technical questions answered?
If you encounter a large issue, is there someone to help you?
I would contend that the best and most serious projects should have professional help available: you can always fall back on paying someone to help you through, whether it’s the original developers, a paid-for support hotline or a third-party specialist, it’s important that you know you can get your answers when you’re stuck.
Developing for an important project without safety net is dangerous: you can waste a lot of time and effort, endangering the very project you are undertaking, if you stumble on a problem you cannot solve yourself.
Large frameworks like .Net or big Open Source projects usually have enough users and support groups and specialists that it’s likely any question you may have has already been answered somewhere or that you can pay someone to help you out when you need it most.

10- What do you know best?

Every framework is based around a particular data-management model. Every framework is built with a particular programming language in mind. Every framework demands that you learn something new. How comfortable are you with the requirements? how long is it going to take you to start to get really productive?
Like their real-world counterpart, it can take very little time to learn a new language’s words and syntax but it takes years to become proficient in it. A framework adds another layer of abstraction that you will need to get experienced at.
If you need to both learn a new language and a new framework, chances are that you are at best months away from being able to churn code without having to look into the documentation every 5 minutes.
Learning new languages and concepts is necessary, but again, if you chose that route you must be sure that your project has that learning curve built-in, otherwise you’re going to move at the pace of a turtle when in fact you chose that particular framework because you though you would be more productive and faster than a sparrow.
If you chose a new framework, make sure that you already possess most of the knowledge it requires: in my particular instance, I chose .Net and C# because I have already worked in that framework and I know it can tackle the project without me having to waste too much time on learning the platform rather than implementing the project.

We all should seize any opportunity to learn something new. Learning is often more exciting than doing the same old thing over and over again and it’s a necessary part of staying in business. Curiosity is an excellent quality that must be nurtured and indulged.
The issue is when to do it.

Choosing a new development framework is not easy. The best way to tackle the problem is to pose it as a risk analysis study.

The framework you chose should simply be the one that poses the least risk to you succeeding your project.

October 1st, 2006

The Importance of Conditions of Sales

BusinessIn a past life, working as a project manager for a manufacturer of railway equipment, I had to deal with detailed specifications and conditions of contract that would be big thick documents of hundred of pages each.

Continue Reading 2 comments June 3rd, 2006

You Aren’t Gonna Need It

technology02.pngRefactoring code is a necessary thing. Unless you work in some very specific environment where casual refactoring is not allowed (like in some safety-critical applications where the most minute change has to be pondered upon by teams and committees for weeks), you cannot code perfectly on the first shot. More often, you end-up reviewing code and making it clearer, merging parts that are too similar, removing what turned out not to be useful, cleaning up the names, moving things around, etc… there are dozen of refactoring cases that usually help remove the stink out of it.

Continue Reading June 1st, 2006

All sites won’t work with IE7

technology01.pngI installed a beta of IE7 last week and was quite pleased at the new interface and tabbed browsing, which has been available to Opera and Mozilla used and many other browsers for years. However, looking good and being slick and more standard-compliant hasn’t been enough to keep it on my machines.

Continue Reading May 31st, 2006

Most Recent Posts



Posts by Month