The Serious case of how SVG sucks

SVG seems to be a vectorial graphical format, that seems to be a dialect in the form of a subset of SGML, maybe html-ized (tolerance to mistakes), that is very clear.

So clear I can modify, rotate, sclare, play with SVG without having ever read anything of it. I had a SVG file, I used a stoician text editor (vi) and made grocked everything.

I even did not understood why or how, I was already tweaking with HTML and javascript and was even knowing how to realize a nice zooming interface in full popup....

I already hear the SVG specialist mumbling, if you touched something out of SVG it is not SVG anymore, Baka !

I am gonna tell you the opinion of the experts is wrong ; an umbrella for instance can be described either by his shape (clothes tensed on top of a stick (the syntax), or the usage in context (like protecting from the rain).

The problem is not me, it is all of us. And the reason I am pissed at the SVG community is that SVG is not a graphical format anymore but a failed substitute to adobe flash.

I am  old enough to have known when we innocently looked at flash origins thinking it was a totally innocent piece of software.

SVG it is not truly your fault, but the fact it is clear for any newbies like me how to misuse it. It is partly due to one of the very quality as a language : it is clear.

You see ids, class, definition, tags with clear attributes.... It all make sense very fast, especially at the text editor level.

I still have no idea what SVG stands for, but it is amazingly easy to manipulate and have results with it, and integrate dynamically in an HTML with javascript.

It took me 10seconds to figure it out with the web inspector and console.log to spot the attributes I needed to change.

Of what a proof is it ?

That it is a tool that is best used in a dynamical web environment...

Like people might want to use it to ..... make picture of it .... and eventually print them ... it may be certifications ....

And people may want to have the same thing on the screen and on the paper....

And since it is a true story that nearly involved me running naked in the streets wondering where my sanity went, I am kind of biased on the topic.

I hate SVG because it is a nightmare in production. Not because of how it was intended to be used, but of how it is used, and I think it is because of SVG itself.

I will try to make a point I still know nothing of SVG, and I will restate clearly that I rant about the stuff inside the head of those using svg in IT and not the stuff inside the SVG tag.

If I would rant against SVG itself it would be longer and it would involve hardware forth, postscript.

I am talking about recruiter and IT specialist that are pro-expert of the web and UX think it is and how it falls in my plate of indigestible technologies.

SVG is the toolbox of creativity for the next wannabee artists in uber hallucinogenetic cross technical perversions.

So someone will want to put a layer of HTML on top of a SVG frame on a web page to have certifications, right ?

A CTO probably sold the templatization and customisation of the certification, right ?

A secretary who has secret talents of artist probably convinced her boss to buy her (or him) the whole collection of expensive drawing software except any that does vectorial format or SVG, right ?

So the secretary probably either do photoshop a layer as a background PSD and the development team will add has another z-index layered HTML layer templatized ...
OR ... he (or she) learned HTML/CSS recently and convinced the CTO all the customers should do it the CSS way on an ... additionnal layered z-index including all CSS non standard extensions.

Then, in fact the CTOs, and lead devs were all gone.

A team of 8 devs + 1 CTO was reduced to one : me, and a simple problem of printing a fucking SVG as everybody calls it !

BUT ! Since I had no time to do it, another coder was doing it, while I was probably looking at envoice and resumés while writing docs to document how to my job and writing a report to report my lack of progress in my job of coder for reasons that were beyond my comprehension.

And you have a fucking simple problem of printing a picture format. You have no time and have to evaluate the astounding proposition of 7000€ to develop and quite a lot of servers to deploy proposed by the contractors in less than 1 day.

you have python at hands and Linux and are totally opened for a prototype (PoC) opened to a command line tool called with a popen.

The reason being that on UNIX behind any cli there are software libraries that python can easily use directly (cffi for instance)

Picture conversion is easy you always try convert first. Yes, but the picture cannot render if .... you the HTML CSS are not interpreted. And CSS manipulation through JS is almost a standard now, since, it is almost what all so called reactive frameworks do. So I also need to interpret JS even if it is a static HTML and force the library to evaluate to the right user agent in the right size. Fuck I love my job of working with standards, accessibility, people with good intentions and buzzwords filling their brains.

If the SVG experts try to express that HTML CSS is not part of the SVG ecosystem, then I bite.

I don't give a damn of whatever you want do define as an umbrella and that people misunderstand what it is.

I do care that people expect me to praise a technology of umbrella (they might have misunderstood) that do not keep me protected of the rain. I CANNOT PRINT A FREAKING GRAPHICAL FORMAT EASILY

So let's play the joke fast.

I always evaluates the price of a contractor by going to fastest brutal way to solve the problem, then I iterate by trying to be more logical. It I have one day, first solution is half a day max, the 2 others for the rest of the day.

First option I saw CLI tools for conversion (image magick...) => fail
2nd option :  python libs, both C/pure => fail

Since SVG is used in webbrowser and specialized tools for presenting them why not see in their libs :)

Like the gnome or mozilla or chrome or inkscape libs ....

Lol, these libraries never took into account 3 layers of technical creativity from different actors in the ecosystem of web printing.

So ... you finish by putting in your DMZ a cluster of full fledged Graphical Interface in which you pilot software like inkscape

When you are a sysadmin you have an heart attack to have to install any library tainted by being to close to the X11 stack.

Fast forward, after not being able to justify why I had so much trouble focusing on my own code I had this exact same problem at hand and a bit more time (job less and doing my tools for statistical analysis).

Basically I borrowed a map from wikimedia, nicely drawn with all data, I used a tad of jquery to change the fill property of the svga stuff and made my own interactive map of job offers with SVG.

Not a manual harmed or touched, SVG is really easy to use.

But, now, my maps are nice, so I want to share them.

So I need to print them .... and I am something of an artist that also knows HTML, CSS and JS ... else I don't have a legend, a title, a scale on the map, and it becomes worthless.

And I don't have the power of a company for buying a cluster of inkscape and have 3 weeks to wait for a contractant to deliver a job of 1 week.

So I took a little time, more research on the history of the project, gnome, mozilla and others....

I noticed really no SVG libraries could render what any idiots will make of SVG.

So I have a less costly solution than my former company, I use selenium and snapshot the pages. Since it is a home project, I am less concerned by the security of the users.

That is the reason why, I hate SVG: it is an excessively printing adverse vectorial format.

And because of the success of SVG I cannot have access to any good map format in PostScript that is also easily scriptable and modifyable given the right tools and structure.

So what I hate might be much more the success of SVG. I see good in SVG, I see also bad points and fear the idea of a monoculture of format depending on libraries exclusively present in webbrowsers.

Me as a developer CTO or a sysadmin you are locking me in very heavy technologies. The web technologies that used to be synonym of lightweight compared to GUI (Tk, AWT, Qt, KDE, Gnome) and easily embeddable are on the verge of becoming the fattest client we ever invented when taking into account all the backend headhaches.

If SVG wants to win my heart, it has to provide me a standalone library suitable for embedded devices that can render any, freaking stuff people think SVG is.

So you want a good alternative ?

PostScript, dotseq, graphviz are my only guess for now.

No comments: