Geolocation, JSON and Simple Design – This Week’s Reading

Adding HTML5 Geolocation to your web applications

One of the interesting and useful addition to the HTML5 specification is the Geolocation API. The Geolocation API allows users to share their location with web applications so that they can enjoy the benefits of various location-aware services.

Geolocation enables you as a developer or website owner to figure out where a particular user is located on the planet. This can be helpful in various web applications; for example in social networking, where you can find out where your various friends are currently located or in advertising where you can display targeted ads based on the users location.

The Rise Of JSON

JSON’s untyped nature flows with how the web itself works.  The web does not seem like typing; it doesn’t like schemas; it doesn’t like things to be rigid or too structured. Just look at the failure of XHTML.  A beautiful idea for the purists,  but for the web, its lack of adoption underscores its platonic ideals.

The 4 rules of simple design

A colleague of mine told me a bit ago that Red-Green instead of Red-Green-Refactor was becoming an issue: many commits were made just when the green bar was reached. A reason for this behavior was the fear of over designing the system and code for tomorrow instead of today: XP stresses the concept of just solving today’s problem instead of anticipating future issues incorrectly and design for the wrong change.

At the same time, code which design is not improved after the green bar is prone to not be clean and sustainable, unless you are very keen in the process of design *during* the red phase (with a clean definition of Mocks and Stubs).

These four famous rules are what will force you to write clean code during TDD instead of stopping at a green bar.

Lance Cameron Kidwell

24 May 2011

Posted in Coding

In lieu of comments, please talk about this post with smart people at Hacker News Hacker News or, if you're the twittering sort, click this handsome button:

Prove Me Wrong: