(or how one must lose all assumptions while starting to use JavaScript)

For the past 8 years I’ve worked most of my time on a large ERP system. It was a lot of work and it’s a real system, a system used each day by thousands of people. Yet it is quickly becoming un-sell-able. One would think after almost 4k fixed bugs and years of improvements, the system works pretty well, it might be right, yet this argument fails in front of marketing arguments. The interface technology (flex) is a very, very bad marketing argument. Why? Ask one of the potential clients why and it will probably tell you this is the sentiment in the industry, and I got propagated up to the non-technical decision staff. I won’t start debating this again.

So in the last months I started to work choosing a “HTML5” interface replacement and after already feeling the fatigue I decided to make a prototype using Aurelia. To be honest I like Aurelia, it’s clear, predictable and I managed to make some good progress.

So last Monday, after having finished my prototype and being content I decided to switch to the newly released Aurelia 1.0 and their new Aurelia cli.

At first when I consider writing this article I though to give some technical examples of why this tragically failed, without even being Aurelia’s fault, but in the end I decided to also go with a “feeling” article. Arguments are overrated anyway.

Let’s just say I managed to spend a 14h/day week just to nearly go back where I started. And the main reason for this is that, after a lot of years of programming and working with various languages and environments I had some assumptions which I thought to be right.

First wrong assumption I had was that any mainstream language would have a reasonably good and standard way to define and load modules and libraries. I fact link editing, is a basis of compiler and linkers, or …?

Drop this assumption now if you want to remain sane in JS world. The language has nothing and there are several systems for doing this (systemjs, requirejs, etc.) yet not all libraries work or are compatible with these systems. Remember the time you tried to install a RedHat binary on Debian and you ended up, 2-3 days later with a bunch of custom .so files in LD_PRELOAD just to avoid a SIGSEGV? This is JS all over again and it really explains the enormous number of projects and gits which in appearance do the same thing. It’s easier to fork a code into your project then use a library since there is no standardized way to define and load a library. So forget something a simple as searching for jar which does your job and putting in the lib folder, it might just not be usable in your project (with a reasonable effort).

Second wrong assumption I had was that I could be safe by using a high level JS derivate language like typescript. While this might work in your isolated corner you will again soon run into trouble with the existing code, and there is a lot of that.

Third wrong assumption I had was that a build system is a build system. You have a declarative description on how to compile your program which will work if you update your tools. An ant xml or a maven script is still like an autoconf or makefile, right?) Welcome to the world of gulp and grunt and the likes where the makefile is js(ts) code. Update the project, get new code, merge it. And who doesn’t like merging code he barely understands? Yes, I barely understand js code, yet I fixed bugs in new languages I barely understood because they followed the same assumptions.

Forth assumption I made was that not many things can change in 1-2 months right? Versions might evolve but one of the rule is to keep things backward compatible, right? Completely completely wrong. I wonder what the shelf life of the new interface can be. Can it last 8 years?

In conclusion, I think I like Aurelia even more now, considering paying for support just to contribute to keep them floating, making something recognizable in this JS world is terrifyingly frustrating, unless you make no assumption about a world learning from previous experiences and you start completely empty (and dumb)…