Lately i have become a big fan of javascript for its flexibility and expressiveness. It is fragile(depends heavily on the programmer) but a very expressive language. And halfway down the product i have come to realise that its expressiveness and flexibility makes reading of someone else's code difficult. But in a team, the team has to follow similar set of conventions so that everyone else's code doesnt look odd to each other in the team. And this is very important in a very small team, where this can lead to altercations. To avoid such a situation, we have adopted our own set of coding conventions inspired from Java Coding conventions and the one from Douglas Crokford.
The main inspirer had been the YUI library, though one looking at their code closely could find out that there are subtle differences but at a higher level they all look the same. At YUI library they spend a lot of time(i guess) to make the code look fabulous and elegant. Any code starts with looking elegant but later becomes very ugly and unmaintainable, but no one can avoid such a situation. At that point of time someone has to step-in and say, the code has to look elegant and maintainable and refactor the code. This does take time but is very useful in the long run when the product matures its maintainability becomes more important or the other alternative will be to rewrite the whole product from scratch(This happens in most companies). With a very short product deadlines it becomes very difficult to do so, but we will have to set ourselves some time for looking back at what we did and correct the things we would have knowingly or unknowingly done the wrong way.
Tags |- sun | pvs
|