What's the difference between undefined and null in javascript

Not a lot. The following statement is true:

undefined == null

So, there's no need to write:

if ( firstVar === undefined || firstVar === null)
  // your code

This works just the same:

firstVar === undefined || firstVar === null)

How to set up a ssh tunnel

First, setting up a tunnel is fairly easy. Second, for some reason I can never seem to get it right. Talking to other geek friends, even those smarter than me -- there seem to be quite a few, if you ask them -- it seems everyone has problems with it. So here's the shortcut:

Start by opening the tunnel. Specify the port locally, and the port to which you are going to connect:
ssh -L 3307:localhost:3306 dummy@www.inevergetitright.com

-L is the instruction to listen at port 3307

3307 is the port you have opened locally for the tunnel

localhost - that's you

3306 is the port opened at inevergetitgright

dummy is the user recognized on the inevergetitright server

Suppose you are doing this to set up a mysql connection on the remote server. All you do is open mysql in the normal way, but specify a port:

mysql -u asdfsd -p -P 3307 -h

Note that you have to specify "localhost" won't work!

Why does my browser crash when I debug doctrine entities in Symfony2?

Using a var_dump of a doctrine object is a fast track to disaster in Symfony2. According to the Doctrine Website documentation:
Lazy load proxies always contain an instance of Doctrine’s EntityManager and all its dependencies. Therefore a var_dump() will possibly dump a very large recursive structure which is impossible to render and read. You have to use Doctrine\Common\Util\Debug::dump() to restrict the dumping to a human readable level. Additionally you should be aware that dumping the EntityManager to a Browser may take several minutes, and the Debug::dump() method just ignores any occurrences of it in Proxy instances.
src: http://www.doctrine-project.org/docs/orm/2.1/en/tutorials/getting-started-xml-edition.html

Should I always return a value in javascript functions?

Yes and no.

If you don't return something, you will return undefined by default (note that you can't assume this to be true in all languages. Perl, for example, returns the last vivified value).

So, not returning something from a function is the same as returning undefined. Which leads to the inference that there's no need to return anything:

function x() {                   }
function y() { return;           }
function z() { return undefined; }

x() === y(); //  is true
x() === z(); //  is true"

Why Apple should allow Jailbreaking

The Electronic Frontier Foundation has just asked the U.S. Copyright Office to exempt jailbreaking of smart phones, tablets, etc from the Digital Millennium Copyright Act. Specifically, the exemptions are with respect to section 1201 of the DMCA, prohibiting circumvention of “a technological measure that effectively controls access to a work protected under this title.”

Before you call this a pipedream, it should be noted that the EFF was successful once before, in 2009.

Personally, I'm disappointed, but not surprised that Apple, or anyone else, is pulling a Music Industry move, because they are paranoid about losing profits or market control. In effect, they are trying to protect the forest from the trees.

There are several reasons why jailbreaking is a good thing for Apple:

Jailbreaking tends to introduce changes to the architecture and software that would have been otherwise missed. This has been proven over and over again from the hacker paradigm: a security systems gets hacked and consequently improved. In the case of jailbreaking, there is also evidence of this happening. A security fix will sometimes be developed by the jailbreakers because the corporation is either too slow to fix, or not fixing it at all.

Jailbreaking has led to improved usability. Jailbreakers, for example, were first to configure keyboards to wirelessly connect with the smartphone.

In particular, when jailbreakers innovate, it's usually in areas that the manufacturer is ignoring, usually due to corporate culture, or cognitive dissonance. Without jailbreakers, these innovation, like pulldown notification or wireless syncing, might not have occurred.

Jailbreakers have also broken new ground in privacy, such as introducing apps that will hide text messages from automatically appearing on the front screen for everyone to see.

Apple has a great opportunity to tap into a vibrant and incredibly creative community. It's amazing that they think they can suppress this creativity through draconian measures.

I'm hoping that the EFF can be successful, and maybe that Apple will open its eyes. If not, it won't take long for all the goodwill generated by such remarkably innovative products to evaporate. And then, they will replace Microsoft as the new Satan for the new millenium.

In which the author demonstrates that he is getting too old to identify ...

When I was young, if you needed a Gigabyte of memory, you had to sneak into every home in North America and steal if from all of the computers. Back then, we made do with 4K. If you were extravagant, or if you were a power user, you bought the 16K expandable memory slot. That was plenty for your needs. And  when you programmed, you wrote the line numbers first. We didn't have any of this fancy pants object oriented tomfoolery. We had gosubs. If we were lucky. Otherwise, goto had to suffice.

When I wrote my first lines of code in 1983, Agile programming meant that you had to be quick enough to duck the eraser being thrown at you by the cool kids across the hall. A scrum was still something reporters did, and a class map told you how to get to History 12 in time.

Back then, a closure was something you got after breaking up with your girlfriend, and you usually found it at the bottom of a bottle of beer. An event listener was someone who pressed their ears against the door while the parents argued downstairs. A delegation pattern was the way that your older brother always made you do his chores.

Back then, if you tried to right click a mouse, it bit you. 

The Kindle is on fire. Sorta.

The rumours of the iPad's death are premature, but not too ridiculous.

It's true that the iPad is still cock of the walk, but other tablet makers have been getting a little uppity lately. And I think it's because everyone sat up and took notice when the HP tablet poured gasoline all over itself, lit the match, and discontinued itself. But not before causing near hysteria as buyers flocked to the stores to pick up massively discounted tablets.

The lesson? Everyone wants an iPad. But, if they don't have $600 burning a hole in their pocket - and how does, these days - they want a table so bad that they are willing to buy a discounted, discontinued product if it's cheap.

It didn't take long for iPad competitors to fall in line. RIM dropped the price of their Playbook to a few hundred dollars and, suddenly, vendors couldn't keep them on the shelves.

And now,  Best Buy reports that their top selling tablet is no longer an iPad, but the Kindle Fire. No doubt, this is because the Kindle is selling for half the price of the iPad.

Finally, tablet makers realise that they can't compete with the iPad, head to head. Who wants a Playbook or a Galaxy or a Kindle if they can get an iPad for the same price? (Hint: No one)

But there's a second tier of tablets, the lower priced models. My guess: we're about to see a whole new ecosystem of low cost tablets, ranging from a high of $300 down to as low as $150. This is embarrassing news for HP, who might have been able to make a go of things if they didn't so fabulously flame out. And it's great news for RIM, who might actually get some traction with a lower priced tablet.

So true ...

Source: xkcd

The truth is, we're not actually looking to solve a problem for the user. We're looking to solve a riddle. That is all. We're generalizing for our own enjoyment. That is the developer's original sin. The same kind of hubris that leads to sporks:

demotivational posters - THE TIME IS NIGH
see more Very Demotivational

Symfony2 on the Mac - some php issues

If you are programming in an OSX environment with symfony, you will likely come across the following software error:
Fatal error: Call to undefined function Symfony\Component\Form\Extension\Core\DataTransformer\intl_is_failure()
As of PHP 5.3, intl is a core extension, but it doesn't ship with OSX. Symfony is supposed to account for this in a stub re-implementation, but there appears to be a bug in play. However, there is a workaround.
First, ensure your autoload.php file contains:

Then, you have to make sure that the stub/functions.php file is in play:
   require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';

That keeps you running on a Mac.

How to build an overlay

An overlay is quick, low cost perk that can easily add a higher level of credibility to your website. If there is any form of expected delay in loading or posting of information, you should give consideration to including an overlay. Fortunately, there are countless plugins available for them, or they are easy to put together. Here is an example.


 <title>Overlay Demo</title>
 <script type="text/javascript" src="https://playground.one45.com/sfweb/one45_dev.php/js/1edeb09_part_1_jquery-1.6.2.min_1.js"></script>


 display: none;
    background: #cccccc;
    opacity: 0.5;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    position: absolute;
    background: white;
    border: 2px solid black;
    padding: 0px;
    width: 500px;
    height: 100px;
    top: 50px;
    background: black;
    height: 25px;
    width: 494px;
    padding: 3px;
 float: left;
 color: white;
 width: 420px;
 width: 30px;
 height: 25px;
 cursor: pointer;


var overlay = function()
 // this keeps track of the
 // currently exposed div
 // allowing you to have multiple hidden divs
 // inside the overlay
 var visible_div;

  * Hide the overlay
  * Size it to cover the document
  * Position the content area of the overlay
 function initialize()
  // attach the close funtionality to the close button
  // you can do this by writing onclick directly into
  // the html, but this is cleaner
  $("#overlay_close").click( overlay.close );

  // don't assume the overlay is hidden
  // force hide it

  // set the position and height of the
  // overlay's content area, based on
  // the size of the browser
  var ctrl = $('#'+'overlay_display');
  var height = $(window).height() - ctrl.height();
  var left = $(window).width()/2  - ctrl.width()/2;
  ctrl.css( 'height',height+'px');
  ctrl.css( "left", left+"px");

 function closeOverlay()

  * Clear the contents of the specified div
 function flushDivContents(div_name)
  if (!div_name)
   div_name = visible_div;

  * Display the targeted div,
  * And Add a message to the top
  * message bar
 function showDiv(message, div_name)
  prepareLayer(message, div_name);
  var elem = $('#overlay_container');

  * Reset the styling of the overlay
  * Resize the overlay
 function prepareLayer(message, div_name)
  // stretch the overlay to cover
  // the entire document
  $('#overlay_container').height( $(document).height() );
  // hide all existing overlay content divs
  $(".overlay_content").each(function(i,el){ $(el).addClass('hidden'); });

  // expose the content div in which you are interested
  var target_div = div_name || 'main_overlay_content';
  var contents = $("#"+target_div);
  visible_div = target_div;

  // set the message in the top bar of the overlay content
  var text_el = $('#'+'overlay_message');
  text_el.html( message );

  // initialize the overlay, setting heights, etc
  // run automatically on page load
  init: function(){ initialize(); },

  // hide the overlay
  close: function(){ closeOverlay();  },

  // clear the overlay of content
  flush: function(div_name){ flushDivContents(div_name); },

  // show the overlay content
  show: function(message, div_name){ showDiv( message, div_name);},

  // append the overlay content with more data
  update: function(content, message, div_name){showDiv(message, div_name);$('#'+div_name).html( "<hr>"+message + "<br>" );  },

  // replace the overlay content with new data
  write: function(content,message,div_name){showDiv(message, div_name); $('#'+div_name).html( message + "<br>" );   }

$(document).ready( function(){overlay.init(); });
<a href='javascript:overlay.show("Here is the message")'>Click here to see the overlay</a>

<div id="overlay_container" class="hidden">
  <div id="overlay"></div>
  <div id="overlay_display">
     <div id="overlay_toolbar">
        <div id="overlay_message"></div>
        <div id="overlay_close">X</div>
     <div id="main_overlay_content" class="overlay_content ">
        This is the content in the main overlay div 
     <div id="second_overlay_content" class="overlay_content ">   
        This is the content in the second overlay div


Javascript scoping - creep creep crept

You may already know this, but it’s something that I once knew then forgot: Javascript variable scoping sucks:
  • Variables are automatically global, unless you declare them with the “var” keyword
  • If you create a variable WITHIN a function, it has scope everywhere, including inside other functions
function foo()
  var x =1; // invisible outside function
  y = 2; // NOT declared.  visible, 
         //and can be modified outside this function 
This is especially important when you are trying to pass variables into callback functions. To pass a variable to a callback, you have to define the function precisely at the callback:
function getSomeHtml()
param_one = “shizzangiggles”;
param_two = 3.14159;

function myCallbackFunction(xr, a, b)
    … your code

    function( response)

Be careful when you do this. If you declare param_one and param_two above ( “var param_one”), your callback will error out, because these two variables are now inside the scope of the function in which they were originally declared. The callback actually fires OUTSIDE this function, so scope is lost.

Here is a sample script to show all the elements you should be aware of. The () brackets after the function mean that I am immediately executing the function.
var one = 1;
var two = 2;

var a = function changeOneAndTwo()
   one = "1.0"; // changes global variable
   var two = "2.0"; // this stays local

alert( "one="+one+", two="+two);  // one=1.0, two=2

three = 3
four = 4

var b = function changeThreeAndFour()
  var three = "3.0"; // remains local
  four = "4.0" // global

alert( "three="+three+", four="+four); // three=3, 4=4.0

var c = function setFiveAndSix()
  var five = 5;
  six = 6; // this is GLOBAL

var d = function changeFiveAndSix()
   five = "5.0"; // this is GLOBAL
   var six = "6.0"; //this is local

var f = function displayFiveAndSix()
 alert("five="+five) // five=5.0
 alert("six="+six);  // six=6

How do I get an application back to my main window?

I just discovered an annoying Microsoft bug:

If you disconnect your second monitor, before moving the visible applications back to the primary monitor, Windows will continue to launch them off screen. And then you're in for a world of hurt, because it's not obvious how to get them back.

I don't know why Windows will launch applications off screen if there is no second monitor detected. Even worse, I don't know why they don't make it easy to get the application visible again. But they don't and here's how you do it:
  1. Use ALT+TAB to switch to the off-screen application.
  2. Press ALT-SPACE to launch the system menu (you won't see: it;s off screen)
  3. Press R to select the "Restore" menu option which ensures the windows isn't is maximized (a maximized app can't be moved)
  4. Press ALT-SPACE ,
  5. Press M to select the "Move" menu option.
  6. Press any arrow key to transfer focus
  7. Now just use the mouse to place the window where you want (or just hold down the arrow key to slowly bring it in to view)
This method is, of course, preferable to a reset button which moves the application back to the main monitor. Count on Microsoft for finding the easiest way to accomplish something, then not doing it that way.

Honeypot captchase

The Honeypot Captcha: It's so simple! Place an input on the form that isn't visible to the human user, but is visible to a bot that isn't scrutinizing css stylings. When the form submits, you know that a bot has filled out the form is the honeyput input contains data.

The big question: why did it take so long for people to think this up? The next big question: why are we still using capchas? The final question: why is it that Google's capchas are the worst damned capchas I've very had the misfortune to use?

Brace yourself: there's an argument coming

I'm a great believer in In House coding standards, especially anal coding standards, because they serve a valuable purpose: they give us a weapon with which to whip the juniors.

But sometimes, things go a little too far. Like our enforced coding standards: I am now resident in an insane asylym where the coding standard is to have every brace on its own line.

Instead of:

if ($x) { doX();}
else{ doY();}

you must write:

if ( $x )

This, I am told, increases readability, carrying the direct implication that the former decreases readability. This assertion is like the assertion that raising corporate taxes will cause economic ruin. It sounds right, but it's never been put to the test.

Likewise, I have yet to see any evidence that either one isn't readable. Really, are we all children? If we don't see the braces on their own line, do we panic and spill our coffee over the keyboard? Has either one been the source of bugs in any program?

Manager: You've been working at your desk nonstop 16 hours. What's going on?
Coder: I'm trying to debug this program, but there are too many braces on the same line. I keep getting confused. And it gets worse! There are all these braces that are on their own line. I don't understand why they are there.
Manager: A program with braces on the same line as the function AND braces on their own line. (picks up phone) Ted, you better wake up the President.

The real reason we have these arguments isn't based in rationality. There is no correct answer. The real reason we have these arguments is that most coders are autistic to some degree. Putting function braces on their own line is more than just a preference for them. It's how they live their lives. In the same way that the Rain Man absolutely had to watch Judge Wapner every day, developers absolutely have to code in the specifically prescribed manner.

And now, by extension, so do I.

How to install mysql on ubuntu

Granted, installing mysql on any Linux box these days is a no brainer. But installing mysql on ubuntu isn't an exception. It's a couple of steps. Nothing more:

Open a terminal window, and type:

sudo apt-get install mysql-server

That's the only gotcha! Typing "sudo apt-get install mysql" doesn't work. It needs to be" mysql-server".

Also, if you are running PHP - and you almost certainly are - you may also need to install the php module for mysql 5:

sudo apt-get install php5-mysql

There endeth the lesson!

WTF Facebook?

Are you ready for Facebookageddon?

Have you battened down your online hatches? Have you updated your status one last time? Have you Liked all you can Like?

Tomorrow is D-Day for Facebook, or have you forgotten the dire warning by the hacker group Anonymous last summer? November 5 would be the day that they brought Facebook down. Why? Because fuck you, that's why.

Take heart. Even if they can clog the internet arteries enough to turn Facebook into FellOnItsFacebook, it will likely only be for a few minutes. And then, immediately after that, you can all get back on and update your status to tell the world where you were when the lights went out.

The Burning Man in five minutes

This is one hell of a time-lapse: it documents the rise and fall the Burning Man temporary city that springs up in the Black Rock Desert every year.

Langton Laboratories set up a camera on a nearby mountainside and let it run for five weeks and then condensed the snaps into a five minute reel.

This was actually quite a technological challenge: to power a camera continuously over five weeks and also upload gigabytes of images wirelessly.

The burn itself begins just after 3:45.

Someone is a little toolbar crazy

The web debugger's song

(sung to the tune of 99 Bottles of Beer on the Wall)

99 bugs in the programming code,
99 programming bugs,
Rewrite the code
Refresh and reload,
100 bugs in the programming code

Steve Jobs - the Internet has voted

Just weeks after his death, and Steve Jobs is still leaving a wake from his passing. In just 12 hours after he died, the Twittosphere was filled with 2.5 million tweets. Then came over 6,000 blogs and news articles, the vast majority testifying to his greatness.

And then came the inevitable backlash, on reddit, on imgur, on facebook, that Steve Jobs was, after all, just a man, just a capitalist, and his lasting legacy is a bunch of electronic toys.

So which is it? According to the Internet, it's not even close. If you Google for matching results, you find a massive disparity:

Search termMatching pages
Steve Jobs rules238,000,000
Steve Jobs drools4,800,000
Steve Jobs sucks7,260,000
Steve Jobs is evil79,000,000
Steve Jobs is kind228,000,000
Steve Jobs created183,000,000
Steve Jobs destroyed13,000,000
Steve Jobs was a woman277,000,000
Steve Jobs was a man515,000,000
Steve Jobs was a monster4,000,000
Steve Jobs was a god195,000,000

Why should I use a tab width of four spaces?

There is only one reason I can think of:
var foo = 'duh',
    fee = 'der',
    fuu = 'dur';
You'll note this only applies to javascript ...

The iBoob is here!

Source: http://bp3.blogger.com/_pNJFZtinpKY/R2fShG--cDI/AAAAAAAACgc/BsuNJkU2Tko/s1600-h/iBoob.jpg

as told by: FakeSteve.blogspot.com

Groupon just keeps getting it heaped on

Some think we're in the sunset phase of the online coupon industry. But I think it's the sunrise phase. Meaning that everyone is waking up to the notion that it's all too good to be true.

First, we're all getting a little tired of 55% off coupons for manicures. There seems to be a bit of  dearth of deals that have actual value.

Second, we're starting to find out that these deals aren't such great deals after all. In fact, a study has come out to show that at least 11% of Groupon coupons are crap.

It turns out that in local services, there is a high incidence of deals offered through Groupon that turn out to be more expensive than services offered by their competitors. In other words, the vendor jacks up his rates, then discounts them to appear like he's giving a great deal. But the user of the coupon could have easily got an equal or better deal by simply checking the prices of local competitors.

Although it's not surprising that you would eventually see this kind of false advertising by vendors who realize they can get away with it, it's disappointing that Groupon doesn't warn us about it. It's not illegal, but it at least has the appearance of being unethical.

Groupon is starting to look a bit like Netflix. They both have big guns. They both have the squarely aimed at their own feet.

A chronicle of the types of bugs found in programming

The Beatle: a bug found by the CEO. Therefore, it's bigger than Jesus.

Bugfoot: a bug that cannot be reproduced and has only been sighted by a single person.

Counterbug: A defensive move useful for code reviews. If someone reviewing your code presents you with a bug that’s your fault, you counter with a counterbug: a bug caused by the reviewer.

Dinkrement: A counter placed in the middle of complex code, with no explanation of what it is or why it is there. All it does is increment itself. And you have no idea what to do with it.

Heisenbug: The Heisenbug Uncertainty Principle states that the more you know where a bug is to be found, the less you know about how to fix it. The more you know about how to fix a bug, he less you know about where it occurs.

Hindenbug: A catastrophic bug that causes the entire database to burst into flame and crash to the earth

Shrug Report: A bug ticket filed by an idiot who notes that something is broken, but doesn't say how to duplicate the issue, doesn't fully describe what went wrong, and doesn't describe the expected behavior. Also know as a Bug Dicket. Usually contains the phrase "doesn’t work."

Around the world in 62 seconds

The magic of time lapse photography takes you on a flight around the world in the International Space Station as it orbits our planet at night. This movie begins over the Pacific Ocean and continues down past Vancouver Island to Antarctica.

Where do all my deleted characters go?

QUESTION: When I delete words on my Word document, where do they go?

ANSWER: There is a debate in the scientific and religious community over this.

Some maintain that all words must be judged. Good words go to heaven and bad words go to hell. Pronouns and adjectives go to limbo where they must be used in sentences about puppies and rainbows before they are admitted to heaven.

Some maintain that there is no afterlife for deleted words. Instead, they are returned back to this world rearranged as new words. Depending on how virtuous the sentence is, they will either appear as lines for characters in Broadway musicals, or as captions for the dirty pictures in fuck books. Numbers, if they are used in mathematically correct equations, will return as higher prime numbers, while those in incorrect equations are returned as price tags at Wal Mart.

Atheists, on the other hand, claim that words simply disappear. They believe that words only exists as long as they are visible on the screen and, once deleted, stop existing.

Agnostics are unsure and unwilling to commit to one belief or another. Every so often, however, they will check the trash, just in case.

Steve Jobs leaves a fashion legacy

Everyone hold tight and prepare the flood of hip programmers and web designers sporting black turtlenecks.

The same shirt that Steve Jobs always seemed to wear has now become a very hot item. The maker of the turtleneck, can't keep them in the stores any more. In fact, they Minnesota based company reports that their sales have doubled since the death of Jobs.

The turtleneck retails for $175. A black shirt. $175. Nerd fashion at its highest.

A primer for some obscure computer technology terms

Camelcase: Anything referencing an animal is intrinsically humorous. But this one is a double threat because it's ominously close to being vulgar, and can be a crackup when someone misspeaks at a team meeting. I worked with a developer once who could barely contain himself in conversation when someone dropped the C bomb.
Fred: I think we should be less careless about all lower case vs Camelcase variables.
Him: Heh. Camelcase.
Fred: Camelcase. Yes. Camelcase.
Him: Heh.
Fred: It's not the same thing asCameltoe.
Him: Heh. You said Cameltoe.
Closure: what you will never get with a javascript programmer who argues that it is going to be the future of the Internet. See also dotNetheads.

Delegation Pattern: the tendency to ask the junior developer to do the work instead
Destructor: far less fun than it sounds

Autocorrect: Doesn't.

GUI: What your computer becomes after you spill your coffee on it.

Keyboard: Standard tool used to generate computer errors.

Mouse: Advanced input device to allow more rapid generation of computer errors.

Magic Numbers: So named because if you run into one of these whilst debugging, POOF, there goes the rest of the morning.
OOP: What you will eventually say (OOPs, shouldn't have hired him) if you hire anyone whose resume scatters this acronym liberally on their r

State-of-the-art: Someone else's computer.

Obsolete: Your computer

Microsecond - The time it takes for your state-of-the-art computer to become obsolete.

System Update - An automated method of to allow the trashing of all of your software at once

YAGNI and LACY: You Ain't Gonna Need It, and Losers Always Criticize You

Key First World Problem: the banning of anonymous Trolls

All hail Gayle Flakenthal, who has put a voice to what we have all been thinking: something has to be done about those damned trolls. Especially the nerds.

In a Washington Times, “Internet trolls, Anonymity and the First Amendment,” she says that “the time has come to limit the ability of people to remain anonymous” online. The reason: anonymous identities allow trolls to act with impunity, and clog up comments with annoying comments. Commenters have polluted the Internet “with false accusations and name-calling attacks.” For that reason, newspapers should ban anonymous comments.

I say, bravo. It's about time someone said that name calling is a terrible perversion of the first amendment.

I know what the bleeding hearts may say[1]:”This argument is not only inaccurate, it's also dangerous: online anonymity, while allowing trolls to act with impunity, also protects a range of people, from Syrian dissidents to small-town LGBT activists and plenty of others in between.”

What a load of tripe. Did Gandhi make his protests under the user name britishOutOfIndia? Of course not[2]. Did Socrates pose his questions as an anonymous user of a public forum? I think not[3]. They faced down their critics with a steely glare.

This is the first world. We don’t need the protection of anonymity any more. We have lawyers. And we know they work because they sure charge a lot for their services. Why should the civility of online comments be corrupted all for the sake of cowtowing to the odd third-world citizen in a basement, calling his government silly names? And how do we even know he isn’t just trolling himself? It’s just too risky.

Luckily, many newspapers have already banned anonymous comments, and "civility" is often cited as  the justification in discussions. So there is some light at the end of the tunnel. I agree that there may be a small-town schoolteacher who fears persecution for her political views to her local community but wants to give a voice online. But freedom of speech means that you have an obligation to stand up and state your name. The same goes for the the gay teenager who wants to talk about it online but isn’t quite ready to come out. Too bad: the first amendment wasn’t put there to help you stay in the closet. It was there to allow us to have civil comments at the end of articles.

Some may argue[4], “The First Amendment guarantees freedom of speech, and anonymity, and the Supreme Court has made these same arguments about safety and anonymity for decades. In 1960, the Court explicitly upheld a speaker’s right to remain anonymous.”

My response to that is: Really? Would you want a cell  phone that was seven years old? Then why do you want to your opinion on free speech to be based on a court ruling that is fifty years old? Those judges are now dead. They probably weren’t taking into account that they were giving vocal power to nerds.

Of course, there may be other ways to deal with trolls that don’t go as far as banning anonymous users. I have heard that there has been some experimentation with “moderating” comments. This cutting edge technology involves a editor or some appointed person who is responsible for monitoring comments in a forum. That person would then be allowed to “review” comments and then “remove” comments that are inflammatory or libelous.

While that may work for many savvy Internet sites, there are many who are not used to such newfangled technology. Better we should just shut everything down.

[1] And they did, actually. Specifically, the Electronic Frontier Foundation. But I think they may be trolls.
[2] There was no Internet
[3] Again, same reason.
[4] And they did. Those Electronic Frontier Foundation just don’t give up, do they?

Happy birthday google, You're not evil. Yet.

13 years old this month. Just old enough to be a teenager. In fact, you are not only a precocious teenager, you're a hipster teenager:

  • You're convinced you know everything,

  • When we tell you we need something, you suggest we need something else,

  • iPhones are too mainstream for you, and you won't use them,

  • You don't use Facebook. You have your own social network. We've probably never heard of it.

  • You have the appetite of a teenager and gobble up everything in site.

  • Your ads are obsessed with we what to wear, what to read, and how fat we are.

On the other hand, Apple is more like the parent of a teenager:

  • We can only use apps that they approve of,

  • As long as we're under their roof, we live by their rules,

  • Developers have to watch their language or they will get sent to their room.,

My hatred of sans serif

There is enough evidence out there of the approaching apocalypse. I don't  need to add more fuel to the fire. But I can't help myself: this is an issue that has gone unadressed too long.

Everyone using sans serif fonts. Stop. Please stop. God may forgive you, eventually. I won't.

Pay attention: sans serif is for headlines and callouts. It's not for body text. What is wrong with you people?

Somewhere along the way, we all drank the Koolaid and started using sans serifs, like Arial and Helvetica, as the font for our body text. Not having any real reason to do it, we simply accepted it and then promoted its use like it was the Gospels. Even my trusty blogspot, owned by Google, the last bastion of Internet Freedom, those saints whose motto is 'Do No Evil' , even they have imposed this scourge on us. There is no way to change their font unless you manually edit the html.

There is a simple reason why you use serif fonts for the body text: it's more readable. Study after study has shown that people read text faster and with greater comprehension when the font is NOT sans serif. Apparently the little hooky things and flourishes on each letter in a serif font serve a purpose: they help the brain assemble the letters into words faster.

Still, no one seems to care. They continue printing everything in a font that was designed to be used in headlines only. Why? Because the graphic designers have somehow taken over the asylum. It's as if the head of the Science Faculty is Oral Roberts and now we are all presenting evolution as 'this other possible alternative to Seven Days'.

I know my lamentations will fall on deaf ears. But maybe there is one single designer out there who has half a clue. Maybe just one website art director who understands that content needs to be understood, not just pretty. But I doubt it. Web Designers are to the Internet what the Pharisees were to the Jews. Put that in your hat and eat it.

Austin police to go knocking on doors of people with open wifi

Earlier this week, officers at the Austin Texas police department announced a plan to search out everyone running open wifi connections in town, in order to "warn" them about potential dangers of running an unprotected network. These dangers included exceeding the number of connections permitted by the ISP, or inadvertently allowing someone to piggyback on the wifi and conduct illegal operations. No word on whether it was legal to spy on residents in order to find out whether or not they had unsecured wifi networks.

I have to wonder: if it's not illegal to have an open wifi network, why is the police department wasting resources advising people on what is mostly a civil matter (violating the terms of agreement with an ISP, or copyright infringement)?

More important, what about the benefits of open wifi networks? The Electronic Frontier Foundation puts it best:
Missing from the [police department's action] is any recognition of potential benefits to be gained from publicly sharing one’s wireless access point. Lately, the virtues of contributing to any shared commons tends to be overshadowed by fears of bad actors (both real and imagined).

The speed of light got broken. Big deal.

It seems the world of physics was rocked this week when a team of European scientists announced that they clocked neutrinos going over the official galactic speed limit. While all the world reels and rends their shirts, and says, 'whither Albert Einstein?', I say, meh. And so are a lot of other people.

The tried and true reason to refrain panic is that everything is preliminary. These are anomalous results of an experiment, and nothing more. Other scientists have to verify the results, other scientists have to duplicate the effect, and only then can everyone panic.

Even then, there is no reason to panic for one simple reason: Einstein's theory of relativity never actually said that particles can't go faster than the speed of light. Rather, the mathematics dealt with the behavior of bodies as they approached the speed of light. And even then, it dealt only with the observable behavior of bodies approaching the speed of light.

The notion that nothing can go faster than the speed of light is an inferred result of the theory, not an implied one. The theory only implies that we can't observe anything accelerate past the speed of light.

What happens if it's verified that neutrinos do indeed travel faster than the speed of light? It's hard to predict. The second postulate of relativity (the speed of light is a fundamental constant, independent of the observer) would have to be revisited and assessed again. But perhaps they will find that the speed of a neutrino is itself a fundamental constant, and we have an adjusted postulate that abandons the speed of light altogether.

But, more likely, nothing is going to come of this. Anyone remember Cold Fusion? Anyone remember how the world of physics was turned on its ear when researches in Utah announced fusion at room temperature? Everyone was doing backflips over the implications, right up until no one else could duplicate the results, and the experiment turned out to be a flawed ball of cattle crap.

My money's on cattle crap.

Netflix Netflux up

Just when you think a company is well managed, they start spilling their coffee on their pants. And so it is with Netflix.

Remember how a few weeks back, Netflix was the king of the New World? They were trading at $300 per share, they were the masters of their domain, and it looked like the sky was the limit.

Today, they are trading at $130 per share, and suddenly Netflix is the fat kid in grade eight who just let out a loud fart int class. No one wants to sit next to Netflix. And everyone is scratching their head, wondering what happened to the Golden Boy? The thing is, no one thing happened. A bunch of things happened.

They lost content.  Starz provides much of Netflix's most up-to-date streaming content, and that deal is set to expire, leaving a hole in their offering. That comes on the heels of competitors entering into the streaming movie space. But fear not. With a shrinking content base and increasing competition, they did the only logical thing ...

They raised their prices like pimps at a Shriners convention. No one likes a hike of 60%. Sure, their subscription rate remains fairly reasonable, but the hike was sudden, sharp and reeked of arrogance. It was like throwing a bucket of cold water on a rocking dance floor. Total buzz kill. That's when the real bleeding began. Their Facebook pages filled with flaming comments. Their subscriber base shrank. Their core users began to get very pissed off. So, they did the only logical thing ...

They 'Apologized'. Really. If the CEO had been a little bolder, he would have wiggled his fingers as he air quoted the word 'sorry'.  The apology was so "heartfelt" and "sincere" that it took up multiple pages, and more than 10 paragraphs. Sensing that he was losing his credibility, in the middle of his apology, the CEO did the only logical thing ...

They announced Qwikster in the middle of the apology, as if the apology was the minor bookkeeping chore to get out of the way, and Qwikster was the real reason people should be paying attention. But Qwikster is nothing more than the original business concept of mail-around DVDs. But now if you wanted to use both services, you had to pay almost twice as much, and you have to go to two different sites, with two separate rating systems. But Netflix knew it was important to make this announcement, so they did the only logical thing ...

They gave a name that reeked Dotcom crash and Also Ran websites. Maybe it was forward thinking. Maybe they knew that the service was headed to the same graveyard as Napster and Friendster. With that in mind, they did the next logical thing ...

They announced it at the height of No One Is Paying Attention Season. August is perhaps the worst time to announce a new commercial venture: everyone is on holiday. The only other time would be immediately after Christmas, when everyone is broke. But, fear not, for Qwikster is so new and unique that it is going to be a marketing slam dunk, according to the geniuses that must have done countless minutes of homework, crossing the i's and dotting the t's because, of course, then followed the only logical thing ...

They forgot to secure the Qwikster Twitter account. Somewhere, in the bowels of the Netflix marketing department, there is a project manager with his head in his hands. He had only one job. Get the Twitter feed going. But @Qwikster was already taken, by Jason Castillo who appears to be somewhat of a slacker. This is one of his recent tweets:
Dang nothing to eat tf lls :P ima ask my dad for money for I can go buy somthing

Words fail me. This is now the Twitterland face of Netflix's DVD subscription service. It's enough to make you wonder if the grand plan is to actually kill of the mail order side of the Netflix business.

Which browser sucks?

Although I agree this is an obvious question, the real question is: by how much does a browser suck?

The only way I can objectively measure the suckability is by getting a consensus from the crowd. The table below shows the number of pages found on the Internet for each browser and how much it sucks.

The results are surprising.

Opera sucks 17,200,000
Firefox sucks 14,300,000
Chrome Sucks11,900,000
IE Sucks6,400,000
Safari Sucks 6,350,000

So there you have it. Opera rates highest on the suckability index, while Safari just barely beats out Explorer for least suckiness.

Which just goes to show you how much you can trust Google ...

Since when did we get discipline?

I was at the liquor store today and I noticed that they didn't have any more of the little airplane sized bottles of booze any more. The man at the counter told me they weren't selling them any more. What is up with that? Doesn't anybody drink at work any more?

Which programming language rules the internet?

Rather than arguing about which language is the greatest, let's look at some statistics about which language has the most popularity on the Internet. Below is a list of the number of pages found for each language, through a Google search. I've included markups as well, just for shits and giggles.

Visual Basic123,000,000
Objective C38,000,000

HTML and PHP have the same number of found pages. That implies to me that Google has some arbitrary rating system that approximates certain large numbers to a common number.

My server is from the future

My server is running ten minutes fast. I was going to adjust it, then I realized that it could be my talisman. So I will rephrase:

My server is from the future. Ten minutes in the future. I have a second server that pings it every minute. It is my reality heartbeat monitor. Any time the second server gets no response from the server in the future, it sends me an email and a SMS text, warning me that the apocalypse may happen within the next ten minutes. Then I casually move away from any glass windows.

The winds of change blow and sometimes suck back

Did anyone notice the earth begin to shift under their feet month ago, when Nokia and Microsoft announced their partnership? Probably not.

Likewise, no one is paying much attention to the changing wind. In particular, what omens are being blown in with the announcement by Samsung that it will carry Microsoft Windows on its tablets, in addition to Android? For Google and Apple, these are ill omens. For people considering an investment, this is an opportunity.

Everyone who has discounted Microsoft has stopped thinking of the long game: what is the world going to be like in five years? Let me draw you a picture of the future:

In the future, you are going to carry your computer in a holster. When you walk in to work, your desk is going to be clear except for a wireless keyboard and a flatscreen monitor. But no tower computer. Not even a laptop.

In the future, when you sit at your desk in the morning, the first thing you will do is take your smart phone from your hip and plug it into a small docking station. This will connect you immediately to the monitor and keyboard. And now you have your computer.

Just a few years from now, your phone will have sufficient computing power and sufficient memory to act as a full-fledged desktop computer replacement. You will store all your files and data in two places: on the cloud for backup, and on your hip for immediate local access.

This isn't a big prediction. It's not a stretch of the imagination. But its implications are monumental, because everything that was previously on your desktop will now be on your phone, including all of your business applications.

That's right. Within the next few years, your phone will not only contain your spreadsheets and documents, but it will contain your word processing and spreadsheet software. Your email client. Your text editors. Everything.

And where do you think they're going to get this software? What one company is best positioned to provide full powered software programs to the next generation of phones and tables.

You guessed it: Microsoft.

Microsoft is going to be the butterfly of this decade. It's had the snot kicked out of it by pundits and hipsters alike, every since it missed the boat with smart phones. Those who are wiser than other in the ways of the mobile revolution have completely written MSFT off.  I suspect they are going to be eat crow soon.

Two bots act like typical Internet asses

It had to happen eventually: once you get a smart enough chatbot, you want to get it talking to itself and see what happens. What follows shouldn't be any surprise, for two reasons:

1. The developers of the chatbot are attempting to simulate human conversation, and human conversation is clogged up with ego.

2. The developers of the chatbot are basing their learning database on real conversations on the Internet, and the Internet is clogged with assholes.

So it shouldn't be a surprise when the conversation descends rapidly into bickering.

This is not artificial intelligence, although this is what people are trying to pass as artificial intelligence. This is only artificial learning, where programmers optimize search algorithms to pull suitable answers from a massive database.

True artificial intelligence is situational. The bot responds based on the context of the discussion rather than on correlations with stored contexts. The difference is subtle but distinct.

Google Maps gets dicked around

Someone has taken rebellion a step further than anyone expected, and painted a crude dick on the lens of a Google Maps camera.

Or maybe it's the outline of Bert from Sesame Street.

The password conundrum

There are many things that bother me about the Internet. One of them is administrative arrogance, and I can think of no better example than the nazis at GoDaddy.com.

Not only do they mandate minimum limits to their password, which is understandable, but they won't allow any password that doesn't contain a combination of uppercase and lowercase and doesn't contain numbers.

In their zealous efforts to protect us from ourselves, GoDaddy has decided that we have to invent complicated passwords that we are more likely to forget. This means that we have to write the password down somewhere, which automatically defeats the purpose. Ironically, GoDaddy's attempt to make our passwords more secure makes them less secure.

The best solution to the password problem is a private algorithm that constructs the password for you. The algorithm should result in a long password, but one that is so random to outsiders that it can't be cracked. Here's an algorithm I no longer use, one that was unforgettable:

1. Take the domain name of the website into which you are logging.
2. Take your middle name
3. Pick a "favorite" number - one that you've decided is the number you will always use (eg 314)
4. Sub out every vowel for the number 1.
5. End it with the domain

My password for GoDaddy would become: g1d1dd1c1ll1314.com

There is no password cracker in the world that could guess that password. At the same time, because it's based on things that are obvious only to me, I will never fail to enter in the correct password, regardless of how many different sites I have logins and passwords for.

Code Fail - The naming of classes

At my place of work, I am mired up to my ass in the alligators of legacy code. The system is like steep side of a river bank, with layer upon layer of sedimentary code deposits. Homebrew framework on top of homebrew framework.

At times, I feel I have wandered into the cyclomatic graveyard: the place where old code goes to die. Just recently, I stumbled upon the deeply hidden class. I think the developer had much bigger plans for it. Perhaps the earth was hit by an asteroid and he perished in the great Code Freeze:

class bigClass2
   var $inClassArr;
   function bigClass2()
      $this->inClassArr = array();

   function dynamicSort($sortorder)
      usort ($this->inClassArr, $sortorder);

I am afraid to go hunting for the original bigClass, which obviously wasn't big enough.

Demographics are changing, and its the old geezers making progress

If you thought that kids these days are embracing new technology at the fastest rate, you would be wrong. A recent study by Neilson found that old folks are finally coming round.

According to Neilson,  usage of tablets has among the elderly has almost doubled in less than a year. The number one users of e-readers are people over 55.

What's even more surprising is that use of techno-gadgets among kids is actually shrinking.

It appears you can teach an old dog new tricks after all.

Amazon figures the tablet market out

Why has it taken so long for people to figure out they can't square off against the iPad and win?

Why did the Playbook and TouchPad crash and burn? Because they came in at the same price as the iPad.This is a strategy that failed against the iPod and the iPhone, so why did they think it would succeed against the iPad.

 I have to assume it was because HP and RIM were living with their heads squarely up their own butts, arrogantly assuming that the power of their own brand was enough to compete with the Apple brand.

But now Amazon is about to move in to the market, and take on the iPad with their own tablet. And they'll probably win, if winning means taking a bite out of iPads current monopoly. Why will they win? Because they're going to price themselves at half the price of the iPad.

Such a positioning move implicitly acknowledges the dominant position of Apple, which is something neither HP or RIM were willing to do, and now it is contributing to their ultimate demise. But Amazon doesn't lose any face by admitting that Apple is better. After all, few people see Amazon and Apple being in the same space. One retails products. One makes retail products. It's like comparing Wal Mart to Sony.

Hopefully, Amazon stays with this strategy, because it will be a winner. I will gladly buy their tablet, if it's under $300.

And, secretly, I hope it makes Apple drop their iPad price to under $300. Because I'd rather buy one of them ...

Sometimes an earthquake is all a company needs

It's not often that I get to lord my Blackberry over other people, so I will do it every single chance I get.

At times I feel like a heretic living in the middle of the Bible Belt: iPhone users are not content to love their iPhone in private. They are not content to relish their newfound position of hip, hop happeningness. They are only content if they can convert the unwashed heathen. That's me. That's especially me.

I could have escaped their condescension and patronization if I used Android. But no, I have a Blackberry, and I have not yet heard the end of it.

I shouldn't be surprised that my high tech geek friends have such an irrational hate on for RIM. For the longest time, the Crackberry was the holy grail, but it was mostly the business type, the commerce students, and the middle management yuppies that had them. For the longest time, the tech geek was on the outside looking in. 

All that changed when the iPhone burst on the scene, and the developer community embraced it like it was covered in cocaine.

And those of us who had Blackberries soldiered on or, even worse, took a small chance on a company that had brought such innovation in the past. In the end, the Blackberry is not as good as the iPhone. But it's not a bad phone, and it certainly doesn't deserve the dragging through the mud it gets.

 So when I hear something good about RIM, please allow me to be smug for a bit.

The 5.9 magnitude earthquake that shook the East Coast Tuesday exposed a major strength or RIM. After the quake, the giant spike in call volume meant massive service interruptions for users of AT&T, Verizon, Sprint and T-Mobile. But not so for Blackberry users. BlackBerry Messenger service can run on both a phone’s data connection or local Wi-Fi; once more, RIM showed why it has gained a reputation for reliability and security.

 The same effect was found in the Chilean earthquake of 2010; immediately after of 9/11 in New York: BBM was the only service left standing; and in London, BBM was unfortunately too reliable and secure. Rioters used it as the main vector to communicate.

Likely this will only slow the Apple and Android juggernauts. But there is a chance that RIM's reputation will be remembered. There is just a small chance that RIM's fortunes might start to turn around, on the backs of its rock solid security. And if it does, maybe my RIM stocks will start to be worth something again ...

Steve, oh Steve, we hardly knew ye

The news that Steve Jobs is resigning as Apple CEO is not surprising, but still a little shocking. Given the state of his health in the past, we suspected that this day would come. It makes it no less bitter.

As a developer, I have strong opinions about Apple and their Lockdown approach to managing apps. For years, we lauded Apple and excoriated Microsoft as the grand Satan. Now that Bill Gates has retired and his company has been reduced to the next IBM,. the red horns and pitchfork are being passed off to the next great evil empire, Apple.
Single handedly, Steve Jobs defined how the second
decade of the 21st century will be shaped
But, despite this resentment of Apple procedures and controls, I couldn't help but hold a great admiration for Steve Jobs. No one in the past 20 years has so affected the world. No one has so changed the course of popular culture, technology, and the path our future is now wandering.

It was only a little more than a decade that Apple was the footnote of high tech history, with no seeming ability to move beyond being a niche product for designers and geeks.

Then came the iPod. Then came the iTunes. Then came the iPhone. Then came the iPad. Every single on a game-changer. Every single one so immensely successful that they changed the paradigms to suit themselves. Single handedly, Steve Jobs defined how the second decade of the 21st century will be shaped. There are few corners of our lives now untouched by Apple.

I am sad to see him step down; just when you thought you understood how society was unfolding, he introduced a new product that changed it all before your eyes. I guess it will be nice to see the world get back on an even keel for a while.

Google Man Is Coming For Your Mail

I confess I am a hardcore GMail junkie, but Microsoft has his one out of the park with this spoof ad:

Try and Google 'irony'

In case you missed the techno-thingies on top of the car, that's a Google driverless car prototype, in a rear end collision with a drivered car. Hah hah hah, go the techno luddites. Google was a little too self-satisfied over their whiz bang technology. Maybe they will cop a mea culpa and go back to relying a little more on the ability of mankind. Ooops, not so fast. As it turns out, the car was being piloted by a human at the time of the collision. Have another irony supplement, shut up and drink your coffee ...