Tag Archives: web

From Metrics to Meaning

OK, I’ll admit it. I may be carrying around a little more weight than I should. The idea of an elegant dinner out sounds far better than a sweaty afternoon at the gym. But I’m not worried–technology is coming to my rescue!

After all, there are fitness bands that relay all my activity to an intelligent program. There are apps that will track my intake and exercise and help me monitor those metrics. But there’s a key element missing: the meaning.

We’ve all become fond of metrics, perhaps instigated by the lore of W. Edward Deming, who was thought to have said “You can’t manage what you can’t measure.” (Except he didn’t, actually, say that. In fact, his philosophy was quite inclusive, allowing (and even encouraging) people to make decisions that they knew to be right, even if they were unmeasurable.)

But anyway, back to the fitness path. So I get a band, or a device, or an app. Suddenly, I’m getting all of these metrics. I know how much I’m ingesting and how much I’m walking. Why isn’t my behavior changing?

Some might say willpower, some might say that last order of gyoza. But I suspect a leading contributor is the gap between metrics and meaning. There’s a step missing: okay, I know these are my stats, and something’s not working. But how do I get from point A to point B? What do the data mean?

This is not only a health issue, but a larger design one. Every time we show information to a user–every time–we should ask: what’s the context? What does the user need to make meaning of this data bit?

Think about breadcrumbs, as another example. Knowing what page you’re on in a complex website is useful. Knowing where that page fits into the site and your path within it is orientational. It changes one’s experience of navigation.

This is true on the analytics side, too — measuring clicks or session time is a good start. But what is the story that data is telling? Where do you go from here?

Over the last few years, we’ve seen an explosion of the amount of data available. We can measure more than ever before. But it’s not going to really transform us in the most profound way until we get just as good at providing meaning as we are at providing metrics.

In the meantime, it’s almost lunch…

Finally! finally in PHP 5.5

PHP 5.5.0 was released yesterday, and there are a handful of helpful new features. Among them, there is one that looks the best to me — the try-catch block has the finally block added. After all, if you’re doing exception handling in your code with try-catch (and if you’re not, you really should be), there are often scenarios in which you want to execute some arbitrary code at the end of the block, regardless of whether an error got thrown or not.

In some cases, you can put it outside the try-catch block (at the end, of course), but there are at least two circumstances where that’s less-than-optimal. First, if the program flow is altered in the try or catch, yet you want to tack on some code at the end, you’re in luck. But in our case, most of the time, it’s a readability issue. We try to group code conceptually when we write, much as we do when writing in English. That means we use sentences and paragraphs. Well, when coding, we do the same thing. And the addition of the finally block will make that even easier.

Another nifty functional help is the addition of the list form in foreach structures.If you work with nested arrays, you can now unpack them in the foreach construct, exposing the underlying variables much more easily. Like the finally block addition, it’s not as though you couldn’t code around this limitation, but when you don’t have to, code gets more readable.

In a deja-vu moment for C programmers, you can now dereference arrays and string literals to access specific items and characters. So in PHP 5.5, ‘Square’[1] equates to ‘q’. Not too shabby.

You can now pass a function call to empty() to evaluate it, which is another keystroke-saver when coding. So if you have a function foo() that may return data or may return, say, false, you can evaluate empty(foo()) and see if false came back. Again, a minor assist, but an assist nonetheless.

There are other features in this release, too, including a new Zend optimization caching extension, some enhancements to the GD graphics library, a new yield keyword that allows you to do simple iteration without using as much memory, a class function that gives you the unqualified class name, and more.

It’s good to see PHP continuing to evolve and grow — it has come a long way since I first used it fifteen years ago!

The Evolution of HTML5 (and the Browser)

The grandly-named “Global Developer Survey” was released recently, sponsored by Kendo UI (makers of an HTML5 framework). As you might imagine, it focuses entirely on HTML5, and presents a fairly rosy picture.

They surveyed 5,000 or so developers from around the world and asked them about their use of HTML5 — what kinds of apps they build with it, which parts they use the most, what kinds of platforms they target, etc. Given the sponsor, it’s no surprise that more than two-thirds of respondents believed that HTML5 is important for ALL developers. Color me a little skeptical at that, but we’ll move right along.

But one part of the results that stood out to me was the focus of app development efforts by the surveyed developers: 60% were targeting desktop apps, while 26% were targeting mobile and 14% tablets. When asked what kind of software specifically the devs were building this year with HTML5, a whopping 87% said desktop websites/web apps, while only about half said mobile websites.

This generally tracks web traffic by platform (as of May 2013, in North America, only about 12% of web traffic was from a mobile device), which may make this more ho-hum. But it’s that ho-humness that is surprising. It has only been in the last version or two of most major browsers that HTML5 support has gotten more robust. The majority browser on the desktop, IE, still doesn’t support over a third of the spec! Meanwhile, support on mobile platforms has been more robust for quite a while.

Perhaps this gives hope that with so many HTML5 developers working on the desktop, the desktop browsing environment will get better for HTML5 — and, one hopes, more nimble in general, with the pace of adopting newer standards (3D Canvas graphics with WebGL, anyone?). And there are some signs that this is happening, albeit glacially. Chrome is poised to be the biggest browser on the web in North America any minute now (it’s almost tied with IE as of May 2013′s statistics), although the recent jump in browser share has been so sudden that it’s hard to know if it’s an anomaly.

Kudos to Kendo UI for sponsoring such an extensive survey, even if the participant selection was skewed. It would be interesting to get a more generalizable swath and see if the same desktop/mobile dichotomy holds true in other technologies (e.g., Java, Objective-C) as well.