Friday, April 15, 2011

Pi Is Still Wrong, And Math Is Still the Foundation of Computing

We recently celebrated Pi Day to commemorate that elusive number that cannot be fully expressed. Do you know why? Because it's an irrational number. Pi is remembered on March 14. Why? Because Pi is most commonly approximated as 3.14.

(Did you know, there's also Pi Approximation Day? Can you guess when? It's July 22. Can you guess why? Because 22/7 is a common approximation of Pi.)

Most of us working in the endlessly challenging field of information technology don't often get to deal directly with math during our daily working lives. Math is that unsung hero, quietly making it all possible.

It is, however, useful (and humbling) to remember occasionally that math is, in fact, the foundation of computing. And there are so many fascinating mathematical problems still waiting to be solved.

Therefore, without further ado, let me whet your appetite with this intriguing blog post by a young mathematician at MIT, explaining why Pi might actually be WRONG!

And if you're keen on further exploring this vast subject, I recommend Introduction to the Theory of Computation by Michael Sipser, a crisply (and simply) written expose on the math that forms the bedrock of computing.

Our computing community churns out new programming languages at a fairly healthy rate. Often these new languages hope to replace Java (1995) or C# (2001) as the new standard. But even when they don't achieve the pinnacle, one cannot help but marvel at the ingenuity that goes into writing a new language, often creating a new programming paradigm. Recent gifts to the computing community include Perl (1987), Python (1991), Visual Basic (1991), Ruby (1993), Delphi (1995), JavaScript (1995), PHP (1995), Scala (2003), Clojure (2007), Groovy (2007), Go (2009), and most recently Ceylon (2010). Sipser's book contains a wonderful "big picture" treatment of the topics one must understand in order to truly comprehend (or perhaps create) a programming language.

If you're interested (and are a glutton for punishment), here are some recommended links for further reading.

Enjoy, and don't forget to thank math for making computing possible!

Tuesday, April 12, 2011

When Should a Link Open a New Window?

I recently posted this question on Stack Exchange, a great family of websites for getting informed responses to meaningful questions. The answers I received indicate that there are broadly two use cases to consider.

  • One, it is clearly recommended to open a new browser instance/window/tab in certain situations. Such cases include where the link is a detour from the main workflow, e.g. print or help. In these circumstances, the new window contains no navigation. Also, the detour cannot be reproduced via use of the back button.
  • Two, when moving to a new domain, opinion is divided on whether to force a new window (target="_blank") or let the user decide (click for the same window, ctrl+click for a new window).
Thoughts? Click on the link above to view the detailed discussion on Stack Overflow.

Monday, April 11, 2011

Twitter Switches from Ruby on Rails to Java

Twitter has recently refactored its search module to replace a Ruby on Rails solution with a Java-based framework called Blender.

Thursday, April 7, 2011

Agile Is Not For Everyone

Consultants and process coaches need to consider carefully whether they're forcing Agile onto organizations even when the organization's cultural leanings suggest that Agile may not be a good fit. As this article points out, often organizations are looking for results not a wholesale change of culture.

Tuesday, April 5, 2011

Essential Reading on HTTP and REST

Okay, so it's a bit risky to refer to this giant of contemporary computer science as a horse. But, as the saying goes, this is straight from the horse's mouth. Trust me, it doesn't get any more authoritative than this!

Roy Fielding is co-author of the HTTP specification and the ubiquitous Apache Web Server. He created the Representational State Transfer (REST) paradigm as an architectural style for the Web. Since then REST has received much well-deserved attention.

His doctoral thesis (FREE PDF!) is a seminal work that contains an excellent discussion on the following.

  • Software architectures in general, well worth reading for the survey and rigor contained herein, especially given the lack of consensus on what entails an architecture definition
  • How network-based application architectures (e.g. the Web) are unique, an impressive discourse on the nature and function of the Internet
  • Why Fielding proposed the REST architectural style for distributed hypermedia systems.
  • Finally, Fielding uses the REST style as a mirror to illuminate areas of the Web that have gone rogue and require refactoring

System architectures are explained as follows.

  • An abstraction of the run-time elements of a software system, as distinct from software structures that describe the static code
  • Recursions of component/layer architectures down to the most basic system elements that cannot be further decomposed
  • One per operational phase of the system, e.g. start-up, initialization, normal processing, re-initialization, shutdown
  • A configuration of architectural elements (components, connectors, and data)
  • The realization of an architectural design, not the design itself or even the rationale behind the design
  • Compared in terms of the architectural properties or software qualities (relevant to the system domain) as induced by each architectural style (and the constraints therein)

Fielding defines architectural styles as named, coordinated sets of architectural constraints. He uses styles as a mechanism for categorizing architectures and for defining their common characteristics. Styles can be combined to form hybrid styles as long as their constraint don't conflict. Especially useful is Fielding's catalog of network-based architectural styles organized under the following categories.

  • Data-flow
  • Replication
  • Hierarchical
  • Mobile Code
  • Peer-to-Peer

It is generally felt that most post-graduate work produces theoretical results with limited practical applications. This is an example to be held up as both an exception and a model.

Finally, follow Roy Fielding on Twitter to receive a regular dose of his insights. (Thanks Alex!)