The most important thing is of course to find something that works for you. The other thing is that, as its creator Miško puts it, once you structure it in a particular way, and other people structure it the same way, it makes it easier for you to leap from one project to another.
Author Archives: lucia
jQuery Plugin: jquery-transformer
Since I constantly need to use jQuery together with TweenMax and since TweenMax already took care of all the parsing of various types of transformation strings as well as compatibility issues, I wrote a tiny jquery plugin here (more of a wrap up of gsap’s) that could directly access these values like this:
$('#ele').transform('rotationX') // returns 0
$('#ele').transform('x') // returns value of translate-x
Angular Best Practice: Naming Conventions
Summary: UpperCamelCase for Controllers and constructor Services, lowerCamelCase everywhere else.
Non-enumerable Properties
I was trying to figure out a way to enumerate through properties of Math object when I realise that I can’t access any. Whaaat? Why?
Organise Your Brain
A great tool I’ve recently started using intensely: WorkFlowy. I rarely recommend tools or products, certainly not todo list apps which flooded the globe, but in their case I do think these guys made a great product and therefore deserve more attention.
So, what’s so cool about it?
Aim Just A Little Bit Higher
The crucial point is, to try and do things just a tiny bit harder than you can manage right this moment.
Tongue Twisting This
Inside a function A, THIS always points to the scope outside the function A. Unless, it gets NEWed. Then THIS would point to the object NEWed out, all the THISes inside of that function A, inside of the function B that’s inside of the function A, and inside of the function C that’s inside of the function B that’s inside of the function A… Since the this inside of function A is the object, and all the functions inside of function A points to their outer scope, which is the THIS inside of function A.
Object.prototype.toString.call()?
This seems to be a standardised way to tell the type of a javascript object. Why?
A little tweak with Chrome Console
This strange behaviour with console is worth paying attention to: it updates the object when you expand it. Say we have: