Archive for the 'The Internet' Category

Javascript Abuse #2,463,981: Centering Content

Another quick rant/post about the wonderful world of abusing javascript. Consider the following code: function moveScreen() { var myWidth = 0, myHeight = 0; if (typeof(window.innerWidth) == ‘number’) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { //IE 6+ in ‘standards compliant mode’ myWidth = document.documentElement.clientWidth; myHeight [...]

Thursday, September 24th, 2009

Programming Nuances, PHP and JavaScript

Two little snippets, some simple things that seem to be forgotten when writing code.  First, a general example using PHP; have you ever found yourself writing a loop that looks something like this? $i = 0; while ($row = mysql_fetch_assoc($result) { // … // maybe something about $i % 2 to determine even-from-odd rows ++$i; [...]

Wednesday, September 23rd, 2009

Smartphones Affected By Malware – Welcome To The Club

For years, as a P.C. and Windows user and developer, I’ve been forced to listen to inane claims about the superiority of Mac/Linux/BSD/Gameboys because they “don’t get viruses because they’re better products.”  Now, I usually try not to allow myself to be incited to anger, or shame, but come on.  That’s like saying that Malta [...]

Friday, July 31st, 2009

Why Isn’t Google Chrome In Widespread Use Yet?

In last Thursday’s article I ended up discussing browser market share and trends. As I wrote that article, I was using Firefox 3; As I write this article, however, I am using Google Chrome. This fact, actually, shocks even me, so I’ll share how it happened. A quick search of google reveals that many of [...]

Saturday, July 25th, 2009