Read my book

I wrote books about Webpack and React. Check them out!

Wednesday, December 9, 2015

Afterthoughts - Web on the Edge

The venue was dark. Just the way geeks like it.
Finland is a nice place in sense that we get a cool free technical event every once in a while. Of course there's some cost as you need to endure sponsored talks, but that's not too bad. Web on the Edge, sponsored by Microsoft, fits this category. They managed to get a keynote (or two actually) from Christian Heilmann so the event was difficult to resist.

Overall I enjoyed the event. It was nice to meet some of my readers (cheers Velmu and Tatu!) and discuss through technology. I missed the HelsinkiJS part of the event as it was simply too crowded and you couldn't hear a thing from the back. Regardless, here are my notes on the main portion.

Christian Heilmann - The State of the Web

Christian at the stage. Like a rock star.
Christian started the day by discussing the state of the web (slides). He has an interesting background as he has been in the scene for a long time and has seen its progression from the vanguard.

He has Mozilla roots and works as a developer evangelist for Microsoft these days. In short, he gets to speak about web related topics around the world while getting paid for it. Not bad. :)

Hacks Upon Hacks

In the early days it was just hacks upon hacks. Web developers had to work around browser quirks rather than focusing on real problems. Over time we learned to deal with this a little better and started encapsulating the hacks better. This is the reason why we ended up with solutions like jQuery.

The idea is that we hide the problems behind abstractions and forget they exist. Ideally we'll get rid of the hacks, but according to Christian that rarely happens. We just follow the lowest denominator. The problem is that all of these hacks we build add up.

As a result an average web site takes whopping fifteen seconds to load fully. We get something to interact with after five seconds (median), but that's still pretty bad. In addition, we are forcing our users to load massive amounts of data (2MB median) while failing to benefit even from basic image optimization techniques.

Even Big Vendors Fail

Even big vendors, like Apple, fail at this. I agree with Christian that it's an endemic problem. The big question is, what to do about it? We can try to patch it in the user end through ad blocking for example. Or we can repackage the heavy content into a lighter format (Facebook Instant Articles, Google Accelerated Mobile Pages, Apple News). The problem with this approach is that you end up with a gatekeeper. In short, it goes against the ideals of the open web.

Fix Fundamentals Instead of Patching

Rather than trying to make complex and broken sites simpler through technological means perhaps it's better to do it right in the first place? Our current culture of developing for the web doesn't lead to this direction. Instead we struggle under deadlines and "fix later". The problem is that later never comes. Rather than facing the real problems we just rely on kludges that allow us to move fast.

It's simply amazing how much happens in JavaScript scene these days. New tooling, libraries, and frameworks come out all the time. Technology cycles tend to be quite short. Just consider the transition from Grunt to Gulp to Browserify/Webpack (complements task runners), or the way JavaScript frameworks have progressed. It all just adds to the complexity.

Microsoft Edge

Microsoft Edge is interesting in that it tries to push us towards a better direction. Ideally it helps to establish a new baseline for web development. Browsers like IE6 or IE8 have set us back enough so maybe this is their chance for a redemption.

The problem is that they couldn't let go of the legacy just like that. In fact, they had to find ways to support all the quirks the web relies upon. The browsers simply cannot deprecate features as that would break the web. We can push people towards better directions, but we cannot force them to drop their hacks. I can only imagine how frustrating that is for the browser vendors.

Even though there are standards, even standards can be broken by design. They are created by people after all. As Christian mentioned, all of this goes back to feedback loops. Web developers should communicate their needs to browsers vendors actively while browser vendors should push feedback to standard committees.


Christian proposes that rather than building hacks upon hacks and hiding the issues we simply start dropping support for old browsers. This means using feature detection and providing decreased user experience rather than trying to hack around. Over time this allows us to drop those things that make the web slow. Instead of patching the web with JavaScript, we need to be smarter. I think this means striving for simplicity and dropping old gunk that haunts us.

This is the reason why I believe basic technology, like static site generators, is still valid even today. You don't need to use the newest and flashiest technology always. It always comes with some cost. Perhaps this is something we are failing to notice at the moment.

Christian Heilmann - A call to JS Developers - Let’s stop trying to impress each other and start building

His second talk of the day. Finns like to get what they pay for.
Christian's second talk (slides) tied back to the first topic. According to Moore's law computers get faster, better, and cheaper every two years. May's law states that software efficiency halves every 18 months. In short, we're good at spending those hardware improvements.

The Latest and the Newest

Of course developers love to use the latest and newest technology. Our connectivity is great. We get paid well and we get to use amazing browsers. This breeds complacency. There is always something missing and we want to do more with less. It is no surprise there is a lot of hype and some promising new technology that will solve it all.

Real users don't care for the hype. They just want something that works. Optimizing for developer experience in favor of user experience might not be so wise after all. Though you could claim happy developers have more time to focus on user experience. Maybe it's not so black and white.

Web as a Platform

Perhaps the most amazing thing about the web is that it brings the cost of publication close to zero. You can get something out there with a minimal effort. Anybody with access to web can publish and consume content. This is something unprecedented. Earlier the market was governed by publishers. Now the situation is completely different.

Of course, these two viewpoints are in conflict. You still have many companies clinging to their old business models trying to adapt. You can see this even in app stores. It is a walled garden by a definition. There is a middleman providing the distribution. The web eschews that. You may still need some middlemen to deal with the legislation, but that's a different dimension altogether.

The Growth Potential of Asia and Africa

As Christian stated, a lot of the web's growth will happen in Asia and Africa. This means we'll need to prepare for lower-end hardware and proxy browsers. This will be a great challenge if we focus only for the bleeding edge. In business terms it's a clear proposition, though. If you want to grow, you'll need to address these growing markets.

Asked to Do the Impossible

The developers are often asked to do impossible things. The site must look the same everywhere, it needs to be easy to maintain while we want to control everything, accessibility must be taken into account due to the laws, we shouldn't spend too much time on it, and of course we must know how people are using our sites through analytics. Combining these aspects together is challenging. Often JavaScript is the answer.

According to Christian JavaScript is too powerful for its own good. If something is wrong, we can fix it with JavaScript. This has lead to the popularity of libraries and frameworks. We just put bricks together until we have something that works without thinking about the consequences.

Just consider how much code something simple like a tweet button requires. It has been designed to work in every possible scenario while it's doing some special things to assure good UX. Of course this means the widget itself is very bloated. This in part helps to explain the current state of the web. When even simple things are complicated, complicated things are even more so.

In order to help with this, the developers at Microsoft have developed a tool to scan your site for potential issues. There is an open source version available as well.

Developer Experience over User Experience?

There is a massive amount of innovation going on at the moment. The cost to developers is great. Rather than optimizing user experience, you spend a lot of time trying to keep up. Often we don't think of the consequences of gluing things together. npm has helped a lot in this regard. You simply pull the dependencies you need, but at what cost?

The more we bloat our applications, the greater the cost to our users. Again, this goes back to the current state of the web. Often we are looking at things from the wrong angle. We optimize for business requirements and convenience while forgetting the person that matters, the user.

Christian made an interesting point about replacing default behavior with something that provides the developer more control. I agree with him. Built-ins are like that for a reason. As web developers we cannot anticipate how our applications are going to be used so it's not a particularly smart idea to do such assumptions.

It feels like a lot what's going on at the moment has to do with developer convenience. The problem is that we might be forgetting something important in the process. I don't see good developer experience and user experience as something opposite, though. Perhaps it's possible to reach both with some conscious effort.

The Evolution of JavaScript

Learning JavaScript has always been interesting. I think I picked it up bit by bit myself. You just learn what you need as you go. Of course there are great books and videos that can aid in the process, but it's challenging regardless.

This year (2015) was perhaps the biggest leap JavaScript has seen so far. We are back on track development-wise and the language is moving forward at last. Of course you can argue about the direction. I would rather have a small language that does what it does particularly well. JavaScript seems to be growing, though, as it needs to cover different niches. It's not possible to remove something from a language once you add it there. This means it can only get bigger. Significant rewrites come with a major risk of splitting the community.

ES2015 (ES6) has given us a clean slate. I see it as a revolutionary step myself. Browsers are gaining better support as we go. Bundlers will be required for now. I won't get into details. It's definitely worth it to get on board, though.

Perttu Tolvanen - Customer Perspective to Web Technology Choices

Watch out Perttu.
Perttu Tolvanen is known as the "CMS guy" of Finland. If you need to know something about CMSs, he is our go-to guy. I don't understand CMSs that well myself so it was an interesting talk.

According to Perttu there are multiple factors you must take into account when choosing a CMS for your project. These depend on the perspective. He listed end-user, business owner, technical flexibility, and ownership perspectives.

For example, a startup might value flexibility over other concerns given their business is still so volatile. For a big, established business it doesn't matter that much and ownership and business owner perspectives may be more crucial.

Perttu mentioned API only CMSs, such as contentful. The idea is that you will develop a custom front-end on top of one. This will give you a great deal of flexibility at the cost of user experience. In some ways it's a step back. WordPress and such provide us great user experience but may be more difficult to customize.

Another key point was that big business favors stability over anything else. This is in interesting contrast to the pace of innovation. This is something that established platforms provide. They might not be technically bleeding edge, but they'll get there eventually.

Sami Häkkinen - WordPress and Corporate Sites

WordPress. Not going to say anything I would regret later.
Sami's talk was perhaps the low point of the event for me. I am not that interested in WordPress myself, and that's what the talk was about. He went through various sites his company has implemented using it. In some ways it complemented Perttu's talk, but it was just too commercial for my tastes. You can achieve commercial goals in a far more subtle way.

Mikko Kasanen - The Story of Azure for Web Developers

Yes. There was WordPress bit again.
Even though Mikko's talk was another sponsored one, at least included nice demos. It was cool to see what Azure offers and how to achieve certain things with it. Especially the machine learning demo he went through was kind of neat. It reminded me of graph based systems I've worked with in the past. Graphs are cool, you tend to hit limits with them quite fast.

I am not that excited about Azure myself, but I suppose it's good to have some competition around. Overall it was a good talk/demo even if it was a little long.

Anna Helminen - From User Journeys and Moodboards to Implementations

Four D's. Learn them by heart.
Anna's talk went out of the overall theme of the conference. It had some commercial feel to it, but not too badly. It was an interesting talk, though, given I don't really do any UX work, consciously at least. The basic models she presented rang a bell. Just consider below:
  • Understand, Ideate, Iterate
  • Discover, Define, Develop, Deliver
These sound like business development processes to me. In fact, this is how I work intuitively. They've just spelled it out into process level.

It was cool to see how they tested out their designs in practice. This allowed them to understand how specific parts of a user journey map to user experience. They measured the user mood at each part to gain further understanding. Just having something usable isn't enough, it's better if it's pleasurable and nice to use. It is very easy to forget this point as a developer.


The bar was alright.
We moved out of the main venue for the last portion of the day. It wasn't as spacious so I missed the talks. There simply wasn't enough room. Instead I ended up chatting with some old friends and trying to make some new ones. Perhaps it would have been a good idea to have the talks in the same venue as well. There were likely logistical reasons for this.


I think the trip was a success overall. Especially Christian's talks gave something to talk about. Striving towards simplicity is a worthwhile goal. Just providing enhanced experience for modern browsers is enough.

There's no need to cater old browsers at least in the work I'm doing. This allows me to rely on modern APIs while keeping my code simpler and avoiding the bloat the web is suffering from.

If something like this comes up again, I'll be sure to go. Even with the sponsored content, it's good. Though I would gladly pay a bit to eliminate at least some of it. Of course in a country as small as Finland it might be hard to find enough people that are willing to do that.

Blue mood shot.