« February 2008 | Main | April 2008 »

March 19, 2008

Culturally Sensitive JavaScript

Listen to this articleListen to this article

JavaScript is a fantastic little language and with the likes of Prototype, Scriptaculous, and my newest favourite, lowpro, you can build some quite frankly, remarkable web applications.

One area where most web browsers fall down however is in their error-reporting, or lack thereof. A fact that has caused me to waste seemingly countless hours trying to find the source of some problem or other only to realise that a typo that had been staring me in the face the entire time was to blame!

Now, like just about any programming library I use these days, most JavaScript libraries use American english. initialize, capitalize, you know what I'm talking about.

For the most part the use of 'z' instead of 's' isn't too much of a problem but just recently I consistently tried to use lowpro's addBehaviour method, only there isn't one. It's called addBehavior (sans 'u').

So today after about 20 minutes cursing and swearing at the spelling Steve asked "is there anyway you could create an alias?" Being JavaScript the answer is of course "abso-bloody-lutely!":

Event.addBehaviour = Event.addBehavior

You can alias just about anything this way.

No more will my code silently fail due to differences in spelling :)

March 11, 2008

Cognescentised

Listen to this articleListen to this article

As of the first of this month (March, 2008) I've become a full-time employee of Cogent Consulting leading a product development arm of the business.

I've know all the cogent guys for some time now and over the years we've all become very good friends and colleagues. Many years ago while working together, Steve Hayes and I discussed starting something and whilst it sounded great in principle, my personal circumstances didn't allow for it. In the meantime, Steve and Marty Andrews got their hands dirty and laid the foundation for what is promising to be a great company based on a set of values almost unheard of in, well, any industry really.

RedHill will still be around for many years to come with Simian and Rails Plugins but my day to day software development will be well and truly under the Cogent banner.

So if you're in Melbourne (or anywhere in the world for that matter) and you've been looking for a someone to get your Ruby on Rails project up and out the door, we'd love to hear from you.

March 06, 2008

Git: Pushing with Every Commit is Flawed

Listen to this articleListen to this article

Yesterday, both James and Marty indicated that one thing they didn't like with Git is that not every commit is pushed to the server. Actually what they were complaining about wasn't that, it was that they couldn't see what I was working on until I pushed to the server. I complained that kinda defeated the purpose of Git—to push on every commit—but couldn't articulate why. I now can.

Last night I made a bunch of changes, a spike, to set me up for today. I dutifully pushed those changes to the server (as requested) and went to bed. Unknown to me at the time, though completely predictable, those changes (a spike remember) broke the app. Amusingly, only a day earlier, James had quipped that "we're doing agile. shouldn't the repository always reflect working software? what's with all the broken functionality?"

Git allows me to make micro changes, to spike stuff all day long, and eventually when I'm confident there's something for the world to see I can push those changes back to the origin. It gives me far greater control and flexibility over the nature and granularity of the changes I make. It means I can have greater trust that changes I make WONT affect other developers or "customers". These benefits are immediately negated when I push on every commit.

Why don't we have this problem with something like subversion? Good question. I think the answer is simple: because subversion forces me to work in a way that ensures that everything I commit is in full working order. It also means I tend to commit larger chunks and work a lot more on branches. I would argue that if that's what we want to do then using Git doesn't buy us much except "offline" mode which, by definition, doesn't satisfy the "transparency" issue anyway.

I'm not using Git as a subversion replacement. I'm using it precisely because it allows me to do "more" than subversion. With this comes cultural change. I respect the need for greater transparency but I don't believe that pushing (at least to the master branch) on every commit is the solution.

So perhaps flawed is too strong a word. Perhaps Ill-considered would be more appropriate.

Censorship

Listen to this articleListen to this article

After I posted the last entry, I thought I'd better go share my experience with the Apple community. Let those that have been experiencing the same problems know where I'd got to.

I replied to my own discussion forum post with the following text:

"So I've changed the country setting back from Australia to the default, New Zealand and magically it appears @ 5Ghz. WTF!?"

Which was then automatically translated into:

"So I've changed the country setting back from Australia to the default, New Zealand and magically it appears @ 5Ghz. ***!?"

Since when did we start treating acronyms as potentially offensive? Maybe I meant, "Why This Fixes it?" (Which of course I didn't but that's not the point.)

"ABC!?" would reflect quite accurately what came out of my mouth when the piece of hardware failed to work as expected but I'm betting wouldn't be censored.

TimePustule

Listen to this articleListen to this article

I bought an Apple TimeCapsule for backups *sniggers from the usual suspects*. The fact is I had perfectly good backups working with an external 500GB LaCie drive but being the glutton for punishment thought I'd give TC a whirl.

So I unpacked it, hooked it up, configured it and then mysteriously, I couldn't get it to work @ 5Ghz (a/n) which for me is an absolute must as my apartment building seems to have a at least one 2.4Ghz network for every apartment! By work I mean broadcast, be visible, locatable, whatever you want to call it. At 2.4Ghz, there it is. At 5Ghz, where did my TimeCapsule go?

The odd thing is that I made darn sure I had it configured identically to the AirportExtreme it was to replace which ran just dandy @ 5Ghz, even down to the passwords.

Having had it for 3 days with no joy and a couple of other users complaining of the same problem I decided it was time to take it back to the apple store today but before I do so, I thought I'd better erase the hard drive and reset to factory settings. For whatever reason (masochism?) I felt compelled to try giving it one more go, this time changing settings one at a time and restarting the capsule.

It starts off in 2.4Ghz g-mode so the first thing I changed was to have it run at 5Ghz n-mode leaving everything else at the factory default. Restart. There it is. I double check my network configuration (using the network utility). Yup, 5Ghz, 300Mbps. Ok. Change another setting. Restart. Still there.

Next, multicast rate. Chnage that from 6 to 24Mbps. Restart. Fine. Use wide-channels. Fine. Change country from the default New Zealand (go figure!) to Australia. Where did my wireless network go? WTF!?

Whatever changing the country does, it's not good! At first I thought it might change the channel (which seems hard-wired to 36 by default) but no, it still thinks it's broadcasting on channel 36. I can still connect to it via ethernet but it won't show up over WiFi at 5Ghz.

So it's now running quite happily (somewhere in NewZealand), locked up as tightly as the proverbial duck's bum, at 5Ghz. I'm honestly still not convinced it's as reliable as my AirportExtreme though and it seems to be slower than when I backed up to mac mini which, theoretically, should be slower as it had to make more network hops and compete with half-a-dozen CPU and Disk intensive application on it (including recording and playback of TV, movies, music, etc.)

Not happy Jan. How hard can it be to take an AirportExtreme and whack a bloody 1TB hard disk inside it!? Though what can I really expect of a one-dot-oh product from a vendor that seems to be slipping in quality as it's market share increases.