A notch above a monkey

Conference programs

We went hiking and exploring north of Spain after this year's EuroPython. Predictably this also involved a lot of frustrations with available WiFi connections. Mobile networks often worked better, but far from reliably so. It is amazing to see how poorly most websites and apps still work in such (common) scenarios with rare exception like Gmail Android app. Keeping all our devices powered required significant planning and spare batteries where possible.

I complained about this before and while it is sad to see how little has changed, this post is not about failing services. It is about web conferences which I believe contribute a lot to this sad state of affairs.

Beyond a talk or two on ServiceWorkers or PouchDB there seems to be little interest from conference organisers to help educate developers on how to develop services that continue to work well when connection is spotty and battery low.

It is certainly not because users wouldn't care. According to Google there are hundreds of battery apps, downloads of which go into 100+ millions. In my own field work I saw that when given choice mobile users will pick services that work better. By which I mean those that use less bandwidth, work more reliably and are easier on battery. I can only think of very few services that have network effects strong enough to be safe from removal, but even their use can be negatively impacted by users limiting or changing their use of the service.

My talk proposal on web's energy use has been widely rejected. It happens. But more disappointingly I failed to find other talks on this or similar topics. Every conference has a right to decide which topics it finds important, but when one is ignored by all of them, it may be correct to conclude that it simply does not matter to community.

If that is true and web developers expect to punt this problem to OS (Android and iOS), then that is a mistake. First, because this is our job that nobody else can do equally well. And second, because operating systems are getting better at pointing out problematic apps to users who are willing to remove them.

My hunch is that most developers are simply not aware of these issues. A good conference program for me is not just about what is currently pertinent, but also what should be. Maybe we could have fewer talks on web game development to find space for topics that affect billions of people every day.


I got a new travel computer this week and so far it is pretty much what I wanted. Nice enough to carry and use, but also faulty and affordable enough that I would not be too upset if something happened to it.

It came with Windows 10 which I have decided to keep so I can use Edge for testing. It is much nicer than abomination that was 8 and I also applaud Microsoft's accessibility work. Although, personally, ballooning whitespace and interface until everyone can read only one line of text at a time, be it on an actual screen or a screen reader, would not be one of my ways of reducing the experience difference in using the system.

I appreciate little touches such as marking connections as metered (and hence off limits for certain traffic) or workaround for updates installation. I still have no idea when updates sneak on me, but at least now I can choose a restart that ignores them.

On the other hand it is really difficult to find out where disk space went and almost impossible to reduce its use significantly. In theory it should be fine with 20GB, in practice I can't get it bellow 30. On top of this Windows defragmenter refuses to move certain used bits and condemns me to a much larger Windows partition than I would pick willingly.

I complain, and it really does bother me, but truthfully it is really not that bad. I think it is actually the best Windows so far that I will not use and certainly a lot better than versions I used long long, my god how long, time ago.

Web skills

While following news about Brexit developments and its impact on FTSE100, my wife and I wondered how many people work for companies that are included in that index. Wikipedia provides a list of FTSE100 companies including their employees numbers, but without the total that interested us.

I did not feel like summing them manually as it is tedious, slow and error prone. Luckily I do not have to as this is a nice example how we can use even limited web development skills to solve every day problems.

All I needed to do is select table cells in last column, transform their values to numbers that Javascript understands and sum them.

On a modern browser this can be accomplished by opening developer tools and executing two lines of code in its console:

var nodes = [].slice.call(document.querySelectorAll("#constituents tbody td:last-child"));
nodes.map((a) => parseInt(a.innerText.replace(/,/g, ''), 10)).reduce((a, b)=> a+b, 0);

What the first line does is select last table cell (td:last-child) in each company row of the table (#constituents tbody). [].slice.call is used to make the resulting list a Javascript array because it is easy to work with.

In second line we first transform the list of page elements to a list of cell values, by picking them with .innerText, removing comma separators (.replace(/,/g, '')) and changing them to numbers using parseInt. This is immediately followed with a call to reduce which sums all the values in our list.

Alternatively I could have also used jQuery library already included on Wikipedia pages and not much more code to get to the same result.

Turns out that according to Wikipedia there are 5,618,496 people working for FTSE100 companies out of 31.59m in total.