Skip navigation

Monthly Archives: September 2008

i was trying to bring prototype into a non-prototype page and this error happened:

element is null

on page load.


How come its not loading?

Well it turns out I’m so in love with prototype that I had already defined:

function $(a)
  return document.getElementById( a ) ;

as you recognize as a commonly used prototype convenience function. once that function decl is deleted, prototype now integrates beautifully into my already javascript-caked page.

if you run a tech group and you have a web developer, PLEASE, PLEASE GET HIM A DESIGNER TO WORK WITH.

The problem with leaving a programmer to do the design as well is PROGRAMMERS AREN’T ARTISTS (usually).


A programmer that thinks he’s a capable artist but really isn’t will waste HOURS of your companies time trying to get the “design” aspect down right. He’ll kludge, he’ll photoshop, he’ll mishmash things around and in the end you’ll have something that still looks like a draft.

While in HALF the time a real designer could come up with final polished product that you could actually use.

Why don’t you just leave the programmer to do the programming, and hire a designer to do the design?? holy crap.

new hard disk not recognized, windows xp

so, i recently bought 2x500GB hdd’s, you know, the hitachi ones for $69.97. Great price! When a TigerDirect price ends in .97, then that’s how you know its a killer deal.

Now then, I got those and physically installed them into my computer, but they wouldn’t turn up in file explorer! they didn’t seem to be working.

SO, long story short, the way you get it working is this:

Start->Administrative Tools->Computer Management

IF you DON’T SEE “Administrative Tools” on your start menu, then you might need to add it:


Right click your taskbar and pick “Properties”:

You should be here:

Next, click the “Start Menu” TAB, then click the CUSTOMIZE button:

Click the ADVANCED TAB, then SCROLL TO THE BOTTOM OF THE LIST and pick “Display on the All Programs Menu and the Start Menu” for the Administrative Tools option.

It’ll now be on your start menu.


Now that you’ve got the computer management dialog open, you should see something like this:

NOTICE the two hard disks that are installed and detected, but not yet “allocated”, and not yet “initialized”? Well, that’s what we have to do here.

All you do is right click one of them, then choose “Initialize Disk…”

You get this dialog, heck just do them both at once:

Then after that you have to create a partition..

It can be annoying to keep having to use the alert() function when trying to get debug messages out to yourself.

You might resort to dumping the data to the browser window itself, in html, OR:

  • In FireFox:

  • In Opera:

    • use the opera.postError(‘message’); function

This is a bit of a weird problem, but say you’re trying to convert over to being all nice and OOP in your php code. Suddenly though, you notice some weird things. You can’t seem to access your global variables from within member functions!

For instance, say you have this include file called ‘names.php’ which has a huge global array in it called $names.

Attempt #1

in file names.php
$names = array(
  'bob', 'john', 'bobo', 'bobobobo'
require_once( 'names.php' );

class User
  private $name;
  function __construct()
    $this->name = $names[ 0 ] ; # php can't access $names array,
    # even though its a global variable in 'names.php'!

Attempt #2

require_once( 'names.php' );
global $names; # a good step, but still not enough

class User
  private $name;
  function __construct()
    $this->name = $names[ 0 ] ; # php STILL can't access $names array,
    # even though its a global variable in 'names.php'!

Attempt #3

require_once( 'names.php' );
global $names; # a good step, but still not enough

class User
  private $name;
  function __construct()
    global $names; # the second piece of the puzzle.
    $this->name = $names[ 0 ] ; # ah, finally it works!
    # we had to have the global declaration in TWO places!

In fact in PHP, the same goes for regular (non-object) functions as well. Need to declare global $variableName both after include AND inside function that uses the global.

c# makes it easy… GetStdHandle() anyone?

wow. i just wasted 3 hours on this bug that wasn’t even a bug. it was prototype using a common language word (in this case, ‘request’) somehow internally so that I couldn’t use it as a POST parameter.

observe the following:

function submitIt()
      alert('completed successfully');

<form id="theform" method="post" action="ajaxEngine.php">
  <input name="request" type="hidden" value="set_prefs" />
  <input name="username" type="text" />
  ... some more inputs here ...

  <!-- use formElement.request() to submit the form using ajax -->
  <input type="button" onclick=" submitIt(); " />

The seemingly innocuous <input name=”request” />, will, simply put,

fuck everything up


It was quite annoying for me. If prototype wants to use regular english words as reserved words, they should make like php and use something like __request, not a common word, like request, and further, not a common word that is likely to be used by a web programmer (request!!). jeez.

you know how sometimes a small little thing in your life changes a whole lot of big things?

going to that outing where you met that girl who you ended up marrying and spending the rest of your life with. and you weren’t going to go.

visiting that doctor who had just one too many x-rays ordered for your tmj joint. a year later you have brain cancer and are dying. which cell was it that mutated and multiplied uncontrollably?

dental specialists in ontario at least are now handing out these ‘privacy forms’ when you first visit them.

i don’t recall this being the case previously, but it may have, its just i didn’t know, i seldom visited specialists as an adult.

the deal is they ask you to sign a form that says the dentist is allows to openly communicate your information.

They have all these promises that they won’t sell your information to third parties or whatever, but that’s not something I really believe. The legal form BASICALLY says “i hereby sign that i fully trust this doctor to communicate about my medical history to others as he sees fit.”

What I want is a carbon copy of every communication that doctors send to each other regarding me. Honestly.

Doctors today behave like bad parents. they hide information from you and discuss your case as if you are their child; but they won’t disclose to you the full details about what they’ve said unless you wrest it from their hands by paying something like $50 to the government agency that keeps your health records.

Well, the diablo 3 trailer gave me an electric sensation of awesome.

The flavor — indian / arabic / somehow it always plays on ancient religion.

While the older Diablo installments seemed to play mostly on Christian tradition, it appears that Diablo 3 will have a middle eastern / indian / more exotic flavour.

Excited to see it

I’m looking at google maps of northern ontario with all these places i’ve never been.

goderich. dungannon. belgrave. fordwich. wroxeter. north perth. atwood. ethel. seaforth. egmondville.

how old are these cities? what are the sorts of people that live in them?

what is life like for them?

is there just one doctor and one school for each city?

how do they get on? are they happy…?