Joined February 2013
·

Dominic Barker

Senior Developer at OpenXO
Senior Developer
OpenXO
·
Hitchin
·
·
·

Posted to jQuery ain't jQuery no more... over 1 year ago

@davidandrewsmit
Thanks! edited.

Posted to jQuery ain't jQuery no more... over 1 year ago

@jacaetevha I don't think the title is misleading at all. For me, jQuery has been primarily, an abstraction of browser inconsistencies. Specifically, old IE inconsistencies. Now that it (newest versions) doesn't support older versions of IE, for me, it's entire purpose has changed.

Posted to Why use CoffeeScript? over 1 year ago

@keaplogik

No need to apologise, it's always fun to talk. :)

Posted to Bower and Rails. Friends forever. over 1 year ago

@hauleth

There's quite a lot of debate in the nodejs community about whether or not to checkin dependencies, with the 'check'em in' side in the lead at the moment. See http://addyosmani.com/blog/checking-in-front-end-dependencies/ for more.

I have found git submodules to be a dismal alternative to proper package managers like bower, npm or rubygems.

Posted to Why use CoffeeScript? over 1 year ago

@keaplogik You don't need to, you just might prefer it like I did. Always worth giving things a go; you never know what you might be missing out on.

@dahjelle If you do have a crack at using the canvas to measure text I would be very much interested in knowing how you got on.

Re: storing strings for future lookup, we did something similar where we got the server to work out what the most commonly used words were and to measure them too. If the document was blank, we just included the 100 most common words in the language being used.

It's worth pointing out that this is an expensive calculation, as calling width() will cause a reflow. For the odd occasion that's not a problem, but if you are doing this a lot, then it can cause performance issues.

An alternative is to use this method to measure the individual widths of all the allowable characters on document load and store them in a dictionary. You can then determine the width of your string breaking it down into characters, and looking them up in your widths dictionary.

The alternative approach is not without it's problems - it's less accurate and slows down document load.

Posted to Why use CoffeeScript? over 1 year ago

Like I said, I thought something similar, it just so happens that I enjoyed writing in the new language more than the other one. You dont need to of course - but give it a go, you might like it. I did.

Posted to jQuery ain't jQuery no more... over 1 year ago

Yep, agree all round, it's definitely a good decision, just one that could trick people up if they don't realise that jQuery 2.0 isn't just another version.

Posted to Why use CoffeeScript? over 1 year ago

@jisaacks It was forgetting to put semicolons at the end of lines when going from Ruby to JS that did it for me...always going to get told off by Mr Crockford sooner or later :)

Achievements
485 Karma
63,725 Total ProTip Views