Bemoaning Large Software

I’ve been doing professional software development for 35 years. For the last 25 years of that, software development has had a serious issue. It is always exceeding the bounds of the customer’s hardware. If it were the case that customers actually needed or at least had their lives substantially enhanced by the bloated software, I wouldn’t complain. But consider these cases:

  • Has office software needs changed enough since 1995 to justify an order of magnitude extra software driving it? (I think the popularity of Google Docs shows the answer to be a clear no.)
  • Given the current state of battery life and processors, is there any justification for putting a verson of Android on your wrist?
  • The current desktop version of Windows needs 6 gigbytes (6,000,000,000 bytes) to install. Windows out of the box really doesn’t do much of anything at all… notepad, calc, dir, paint. What could they possibly be using that space for?
  • And my main topic for this post: Web Frameworks. I thought that even a fairly small Dart program taking in excess of 500K of JavaScript was an anomaly… but it’s becoming ubiquitous. WinJS and Polymer, for example, have hefty overheads.

I am pleased to see that some developers are seeing the problem and engaging in push-back. Some examples:

  • The popularity of MarkDown. Even many professional writers are using it.
  • Micro-frameworks like Backbone rival even Angular in popularity.
  • Wearables like Fitbits, use limited, cut down software and interfaces to deliver good battery life, despite the need for 24-hour monitoring.
  • The Go programming language epitomizes forward thinking in features, while maintaining the ability to write programs that are resource-friendly. Yes, it’s a little less efficent than C, but hardware has capabilities, 4 orders of magnitude beyond what they were when C was created.

Looking at the bloat of Web Frameworks

I specialize in Single Page Web Apps, intended for Desktop and Tablet usage. I don’t really consider a web framework unless it provides me with a modern set of UI components.

Today, your best bets for web frameworks for Desktop SPAs are: Bootstrap (requires jQuery and some sort of event/binding supplement.) or Angular + Angular Bootstrap UI.

Looking towards the future: Angular + Material Design, Polymer + Paper, and WinJS (Microsoft).

So let’s assume that a hypothetical medium-sized desktop web app uses roughly the capability of Bootstrap (which is largely true). Below, none of the sizes includes fonts or icons as that makes it even harder to compare. It does include the JavaScript and CSS necessary to provide the component functionality.

Package Size (min in K)
BootStrap
(+ 150K for jQuery and plumbing)
320
Angular + Angular Bootstrap UI 315
Angular + reqs + Angular Material
(Estimated, missing parts, current 306K)
~350
Polymer + Core + Paper
Incredibly difficult to measure minimized size
(will be hard to minimize period)
(also, is still missing parts, estimate is likely low)
~1,200
WinJS 1,315

So, looking at the state of the art, it looks like it takes less than 350K of JS and CSS to make a decent component set. If you made a set specifically aimed at the Desktop SPA (you get to assume most of ES5/HTML5/CSS3), that number is probably more like 250K.

Now Polymer and WinJS get to make the ES5/HTML5/CSS3 assumption. How are they something like 4 times or more bigger?

This is a very serious question. Supposedly WinJS and Polymer are fully ready for mobile. It takes about 2 seconds to parse one megabyte of JavaScript on a low-end phone. That’s just parse time, not the substantial dynamic instantiation of components that has to occur. (This is especially bad in Polymer where everything is dynamic.) And you don’t even want to think about the amount of time it will take if you’re loading the app over 3G.

How did two large companies like Google and Microsoft get here?
They surely know that doesn’t work, right?
What’s really weird is that if they would just finish their HTML5 (for example, there is a menu element in HTML5… no one has implemented it.) and made the default styling not suck… most of these components sets wouldn’t be needed at all. JavaScript (like all dynamic languages) is great at being glue… using it to retool the OS with a new set of components, every time an app starts, is just plain silly.