OMG OMG Nielsen is wrong, let’s all, like, build responsive sites

  • Comments: 1

Two days ago Jakob Nielsen published a new Alertbox column: Mobile Site vs. Full Site, which seems to have caused some uproar in the web community, openly mocking his ideas:

Jakob Nielsen’s April Fools Day piece on mobile is HILARIOUS. So boneheadedly wrong. But why April 10? (@karenmcgrane)


Honestly, I’m not sure I see the contradiction between what Nielsen says and Responsive Design. He’s just stating that “well designed mobile specific sites” work better for the users. Is there anything to argue about that?

Now, some are trying to say, that this is also pushing the expensive option. But how is that a problem? If you can’t afford it – well, you don’t have it! And Responsive Web Design is the cheaper option, even if not as optimal as a completely separate site.

IMHO, RWD is purely a technical solution to achieve the same result – optimize the layout and content for mobile. It’s not like Nielsen is saying “Don’t use CSS – use font tags and tables for layout”. And that’s what media queries really are – just a simpler technical way of using different CSS for the same markup.

From the designers perspective (as in “graphical bit”) RWD is still about making multiple designs (especially if done in Photoshop). RWD only places an additional constraint – the content must be pretty much the same. However, the “design” itself, while consistent, is still different. IMHO RWD is more similar to Nielsen’s “two sites” idea, than different.

The only place where Nielsen is more wrong than not in that article is about the “<..> penalty imposed on desktop users when you give them a design that’s suboptimal for bigger screens” – but I believe that’s just the mis-interpretation of “mobile first”, because “mobile first” is not “mobile only”. Neither is responsive design.

Update: Jakob Nielsen responded to critique. I find this bit to be saying exactly what I tried to say with this post:

There are at least three different ways of implementing different user interfaces for different devices:

  1. Each version lives at a different URL.
  2. The same URL serves up different versions, depending on the device used to request the page.
  3. The same code is transmitted to all devices, and the client side transforms this into the different designs, using responsive design.

As long as each user sees the appropriate design, the choice between these implementation options should be an engineering decision and not a usability decision.

DublinJS August meetup kata

  • Comments: None

I’m doing a kata for this month’s meetup of Javascript Dublin group and my choice is Roman Numerals. It’s simple enough and it also demos some interesting transformations of the code during the whole TDD process (if you stick to the mantra of “write the simplest possible thing”). I found that I could also put some of the new ES5 features into practice: Object.keys(), Array.prototype.forEach() and Array.prototype.reduce().

The Coding Dojo page for this kata also has a video of it performed in Ruby. There’s also a link to a video of it in Excel, but as much as it sounds good, it’s just building a VB macro…

You can find my code on GitHub. I have also prepared a walk through on how I arrived at my solution (txt is the new ppt!)

The previous kata sessions used Jasmine – and it works just fine – but I chose to do things with YUI Test. If you feel like it – I prepared a skeleton for the project. Note that it loads YUI from Yahoo’s CDN, so make sure you’re online (or update the harness.html).

Opera Extensions: messaging example

  • Comments: None

I already vented out my frustration with examples that have flaws, so this one is more constructive and tries to actually explain and solve things. You’re welcome to skip all of that and just get the example code.

It may not be 100% correct, it may have it’s own flaws, and obviously it may soon become obsolete, as Opera 11 is still in alpha, but I did create a more reliable example of how to communicate between the user scripts and popup windows.

This article assumes you already grok the introductory information on Opera extension. In fact, knowledge of Chrome extension flows may also help.
(more…)

Just how much does performance matter?

  • Comments: None

I have recently moved my dedicated server to a new provider. I mostly did this for pricing reasons, but there’s also the benefit of network speed, as most of my visitors and now – the server itself – are in Europe. This move, coupled with a few optimizations, has opened my eyes towards some data – the impact of page load time on “pages per visit” metric. While the general theory behind the relationship of the two is clear to everyone, the actual numbers did shock me.
(more…)

Benchmark: HTML outlining/TOC scripts

  • Comments: None

A bit over a week ago Chris Heilmann published a post on table of contents generators, where he listed a couple of JavaScript methods to do that. It’s been always in the plans to optimize the performance of my own implementation of the HTML5 outlining routine – and what better way to measure it, than to compare it with some other approaches while I’m at it. To no surprise, I lost. Big time.
(more…)

ASP.NET MVC generates invalid ClientIDs

  • Comments: None

This week I had a joy of spending several hours trying to solve and intermitently happening bug. In short, some 2 times out of 3 the YUI selector utility failed to lookup elements in an XHR loaded HTML fragment. After digging quite deep into the YUI code, I found that it was actually the fault of the way ASP.NET MVC treats partial views.

Summary

  • ASP.NET MVC allows use of ASCX as “partial views”
  • It correctly assumes, that uniqueness of ClientID should be preserved
  • It incorrectly does not prepend an alpha-character to automatically generated GUID based IDs
  • User agents and selector libraries may correctly ignore such invalid IDs
  • Solution: override ViewUserControl.UniqueID

(more…)

Hello world!

  • Comments: None

There is no long story. My blog in Lithuanian will have a second birthday in 5 days. Here’s my present to myself.

  1. I write, you read and comment
  2. ???
  3. PROFIT!

Oh, and yes, you’re right – now that I have a blog, I will not update it frequently.