Joined February 2013
·

Jordan Klassen

Vancouver, BC
·
·

Posted to Gamer style Sublime Text Key Bindings over 1 year ago

I've actually wanted to write a sublime plugin that will, instead of indenting the current line with something like c-super-left/right, will move the current word around, like how your cursor will move while holding alt(mac)/ctrl(others), which would be especially useful for rearranging array/list elements, etc.

I'll add another endorsement of that book, it's pretty fantastic. Thanks for the reminder of it, I haven't gone through it "properly" and actually run the code samples; I'll be doing that over my winter vacation.

Posted to Fixing a corrupt local git repository over 1 year ago

@mmontag Does re-cloning work? There's definitely a lot of ways that git can get corrupted, and its error messages aren't the best. I can't really help any further without more information

I'd just like to emphasize that angular's built-in cacheFactory's simplicity is its greatest strength, not a weakness. It has a tiny footprint that keeps angular's code small. It's great! All it is is an object and a linked list. And angularCacheFactory is great too! It's there when you need more, and uses a more complex, but more flexible heap structure.

Good post. Thanks for your work.

Posted to Don't bother with `parseInt` over 1 year ago

@demianbrecht using a unary + prefix to coerce to number, !! to coerce to boolean, and ''+ to coerce to string are commonplace, so as long as it's in your project's style guide, readability shouldn't be a problem here, since it's re-using preexisting commonplace idioms. If, in your styleguide, you use Number(), Boolean(), and String(), then I would advocate continued usage of parseInt().

Posted to Don't bother with `parseInt` over 1 year ago

@fardjad @gnclmorais Whoops, that's one of the other advantages that I forgot to add. My first usage does have the radix, however. In fact, it was looking at others' code that didn't use the radix that made me think of this problem in the first place.

Posted to Be careful with setTimeout in loops over 1 year ago

Figuring out performance heuristics in JIT implementations is hard:
http://jsperf.com/anonymous-vs-named-settimeout-in-a-loop/2

(I'm a pythonista, so I prefer naming my functions anyways :P )

Posted to JavaScript unit testing framework!!! over 1 year ago

Better wrap that function call with a try/catch, or else you'll end up with a console.group that never ends!

Achievements
227 Karma
19,831 Total ProTip Views