Oliver Schmidt

Cassette tapes, a pseudo degree, and open source software: an interview with Andrea Giammarchi

2020-11-08

Andrea Giammarchi aka WebReflection (Medium, Twitter) is a very prolific open source creator. Even if you don’t know him or one of his projects (yet), you might have used some of his work. His document-register-element polyfill is being used by Google AMP HTML, and his virtual DOM alternative called hyperHTML by W3C’s ReSpec, for example.

Andrea Giammarchi

If you look at his Github, you might wonder how he finds time for anything else but creating software. Yet, he was kind enough to answer a few questions that I sent him.

Hey Andrea, thanks a lot for taking the time for this! How are you doing lately, during these rather “interesting” times? I suppose you’ve also been working from home a lot?

Hi Oliver, before answering these questions, I’d like to thank you for this opportunity to talk a bit about myself. Hoping somebody else is also interested :-)

These are rather interesting times indeed. But as I’ve been working remotely for the last 2 years and a half, I’ve been lucky enough to not feel or perceive too many changes in my daily routine. One thing I’m missing is traveling, ‘cause I do love traveling. But during 2020 it obviously hasn’t been possible with the same freedom and tranquillity I used to have. Accordingly, I’m doing just fine, and luckily enough my family, friends, and relatives are also fine. But I can’t wait for things to go back to as normal as possible, for me and everyone else, too!

So, to go back all to the way to the beginning: what was your first contact with computers (including things like gaming consoles)?

If you like a bit of time traveling: I was born in 1978, and what we call consoles nowadays were fully programmable computers with a keyboard and optionally a joystick. My first “console” was an MSX, which was programmed in a specialized version of BASIC. And instead of a hard disk and/or an optical drive, it was running games through cassette tapes. And that with an analog quality so unpredictable, that most of the time I had to wait for absurd noises playing for minutes, just to have nothing on the screen in the end. Imagine a missed semicolon in a huge JS project, which is able to break everything. Now imagine all bytes being passed along through tape… Yeah, that’s how old I am, and that was my first experience with computers.

Thanks gosh, not so long after, I had a “proper” 386SX PC. And yet I was super envious about the quality of Amiga games.

Was it already this initial contact that led to you being interested in programming, or how/when/why did you get started with it?

My first attempt at writing software in BASIC was close to an epic fail: I spent almost 2 hours just to make the “teapot” program run. And that only to realize that once successfully compiled, those dozen lines of code were there only to play a teapot-like sound instead of showing a teapot on the screen. Well, it sucks when you are like 12 and feel like you just wasted 2 hours for a bleep. It made literally no sense. But I still blame myself for never trying harder between back then and 1998, when my interest in programming reappeared. That was because of the internet, which became kinda usable in Italy. And, of course, since I discovered the internet, I’ve mostly been focused on web and networking-related software.

Did you then get an education in computer science/information technology? If so what/where exactly?

This is a funny part of my history. Technically I do have a B.Sc. degree in Computer Science. But practically I never finished my studies. I studied Software Engineering at my local hometown University in Italy, but its program was already “centuries-old” compared to what I could study or learn online. And the web was not part of any university program. It has been valuable to learn basics about the C programming language and Java, understand databases and the file system. But I was already working full time as a Certified Zend Engineer PHP developer, also using MySQL and XSLT/XHTML. So, working and studying in parallel didn’t really end up well. But I also wasn’t learning anything new or useful at university, due to its outdated software engineering program.

However, when I’ve got my H1-B visa to work in California, my 12+ years of experience were validated as the equivalent of a B.Sc. degree in Computer Science by the Baruch College, City University of New York (CUNY). So, that’s how I’ve got my pseudo-degree after studying at two different universities, without ever completing my studies there (I’m still learning daily though).

And how did you end up working primarily with frontend technologies?

Ahh, this is a kinda common assumption about me, and I tell you why it’s inaccurate: I’ve been doing mostly backend, tooling, database, or Linux-related development way more than I’ve done frontend. And I’m also currently working on a specialized core technology that rarely sees the light of the known frontend. However, if there’s one thing I’ve learned since 1998, it’s that any great backend means nothing without a great frontend able to consume it. Which is why I’ve learned ActionScript 1/2/3, XSLT/XHTML/HTML/CSS, and last but not least, JS, in order to be able to offer any possible backend to consumers. In 2009, for example, I’ve worked on the core engine that was fueling Nokia HTML5 mobile maps. But before that, I was doing mostly PHP, Java, or C#, plus frontend on top. And right now I’m doing 99% of JavaScript, without touching the HTML/CSS side of the web equation. However, not only have I fun working with web technologies, I’ve been doing what today is known as full stack development for about forever. And I think everyone else should also try to play around with the whole stack, including Linux bits and bobs, instead of sticking only with the frontend. Because the potentials unleashed by knowing more about the stack are unimaginable!

You have a host of projects on Github. Where does all the inspiration come from, or what is your main motivation? Do you read specs a lot (I think I saw you commenting on some threads regarding ES standards)?

More than an inspired developer, I tend to be a problem solver. And here’s my usual thinking: I need X, let’s see if anyone did X before… OK, tons of Y, but really, nobody wrote X… Here we go, I’ve published X.

It might look like I have some NIH syndrome, but the truth is that I tend to need essential stuff, while many projects out there often provide too much.

I also usually have close to 100% code coverage, which results in close to 0 bugs on my projects. But that’s not always the case for software already out there… So, that’s me: minimalistic requirements and needs well addressed by a plethora of tiny libraries that share most of the core code but do one thing only. And to reach these results, I gotta read specs, of course. Otherwise, I end up with the feeling that I’m using some library or technology of which I don’t really understand how it works behind the scenes. And that’s a no-go for me in general.

But surely enough, the open source community is the biggest source of inspiration to me. And indeed, all I am trying to do with my libraries and software is to pay back what open source gave me since the beginning of my journey. I feel indebted to it. I try to respect credits, sponsor open source projects, and use as much Open Source as I can, providing helpers whenever there’s a tiny gap to fill, even in the ArchLinux community.

What was the most fun project to work on and why? Or, alternatively, which is your favorite project, and why?

As tech requirements and capabilities change at “light speed” in the web industry, this question is very hard to answer. As a problem solver, and from time to time also as a pioneer of new ideas, I don’t have absolute favorite projects. I just have projects that have been my favorite during the time I worked on or needed those projects. For example, the Canvas-based HTML5 map in 2009 was my favorite challenge. But so was the twemoji library I’ve written in 2014, and then hyperHTML in 2017, and now uhtml, uce, and uce-template.

But then again, I’ve recently investigated a bit if there was any IoT-based intranet solution to collect all the pictures and videos I record during my trips. And after some underwhelming search results, I’ve created myself a software called Life Diary. It works even on my older Raspberry Pi laying around my flat, providing EXIF manipulation, data correlation, and more, to my own personal media without changing quality or metadata. It’s also visualizing a handy map per each place I visited.

That project also raised a requirement, an offline geo location search and reverse geocode, but since nothing was available out there, I’ve created the geo2city module, which does just that and nothing else. And it still performs well on the previously mentioned Raspberry Pi, hence it’s suitable for any other web-based service, too.

That’s it: my favorite project is usually the one I’m working on right now. Either at work or as a side project, as long as it satisfies my requirements and it didn’t exist before me trying to find a solution. But I can eventually list successful favorite projects from my past, including that HTML5 map I’ve already mentioned, twemoji, flatted the successor of CircularJSON, everything based on string literals I’ve worked on ‘till now, and all the ArchLinux/ARM installers and helpers I’ve created to date. Or NodeJS projects such as electroff, usable even via the Hardware Accelerated WPEWebKit.

If I’m not mistaken, you have voiced some frustration over the fact that a lot of developers seem to favor certain “custom solutions” over leveraging standards. “The DOM is not slow, your abstraction is” is one article in which you touched upon this. Could you further elaborate on the whole topic?

That’s quite an old post of mine, but it often comes up for one reason or another. So, thanks for asking! The whole point of that post is that way too often developers pick the latest greatest fuzzed solution, believing it’s a must use. Even for tasks that are probably covered by it but are likely 1/10th of the things such a solution can do… Remember me being minimalistic about software? That’s my point. If you use a library that does a hundred things, but all you have to do is to quickly update a generic table, like the one used in the good ole DBMonster benchmark case, are you sure you’re using the right tool for the job? Developers rarely complain about the library they chose, but are far too easy in blaming the underlying technology. But if you really know the underlying technology, why aren’t you using it in the first place to obtain the best performance for a specific task? And if you don’t fully know or understand this underlying layer, how can you blame it for being slow? Or how is your library of choice bypassing such “slowness”?

In a few words, I was a bit tired of reading DOM-related rants on Twitter, when literally every library based on the Web platform uses the DOM. So, claiming that library X is faster than the DOM has always been nonsense to me. Learn “vanilla JS” first, find where a library can help according to the task at hand, and use such library instead of picking some famous one even just to simply display content that any static HTML could’ve served, you know what I mean?

Speaking of which: what are some of the most underused standards/technologies/tools in your opinion? And in turn, what are some of the most overused ones?

IMHO, the most underused technology these days are standards in general. It looks like everyone is trying hard to avoid what the platform has to offer natively, which is awesome already, bypassing it through some shiny tool, library, or indirection, that hides that power behind the scenes. And please don’t get me wrong, I love the plethora of helpers, libraries, frameworks, and solutions to every possible task that the open source community offers these days, web-related or not. But I just wish more developers would pick smaller and less bloated solutions before using, like, 200kb to bootstrap a static page. Pick the right tool for the job, and feel free to do some refactoring if requirements or complexity change, as opposed to picking something that solves everything, even for the most basic task.

Since you have such broad and deep knowledge, did you never consider becoming more of an educator? Like offering courses on Udemy or Egghead, or even outside of these platforms, like quite a few people are doing now (and pretty successfully so, it seems). Or maybe creating a business around one or multiple of your projects (the other day I read that Tailwind UI has become a multi-million dollar business, for example)?

Well, during 2015 I’ve tried to be a freelancer, mostly focused on technical web training in London. But besides London being a super competitive city, I can tell you without shame that I’ve failed at that. I had a few customers, and as far as I know, they were all happy with my training. I’ve also written a tiny book that was probably targeting the wrong audience. And yet, not only couldn’t I promote myself enough to reach more customers, ‘cause I suck at marketing in general, but I do love creating, solving, and writing code. And teaching requires a huge amount of work that could very easily backfire in terms of time investment vs. results.

That being said, I might try again to start some more concrete training online. But I think the market is already saturated. So, I’m not sure my current skills would be as useful in that field, as compared to producing new ideas or software, as I’ve been doing to date.

There are also many speakers better than me. I think I’ve learned that knowledge or experience doesn’t easily or necessarily translate into good teaching, ‘cause there are too many factors to consider… Although, I also rarely give up on something. So, who knows ;-)