Archives for Monday, November 10, 2014

November 2014 (2)
SMTWTFS
« Oct Dec »
1
2345678
9101112131415
16171819202122
23242526272829
30

Like this Archive Calendar widget? Download it here.


Another chapter from the “Don’t be clever” coding style

A short and quick example of some baffling coding today. It so happens this past weekend I was updating some HTML and CSS and JavaScript on this site. One of the JavaScript source files (luckily not written by me) had this: function $$(id) { if (id.substring(1, 0) != "#" ) id = "#" + id; return $(id)[0]; } Start Well Your Day - Whut? So, in other words, it takes an element id, makes sure it starts with a ‘#’, calls jQuery to return the elements with that id (of which there should...

READ MORE