typescript

Knowledge Hardwork Attitide Coincidence or Not

You have almost certainly seen this often-regurgitated “motivational” quote. It goes like this (and is often pictured on an erasable board to make it look more like it has gushed forth from a beautiful mind)… Coincidence or Not If A,B,C,D,E,F,G,­H,I,J,K,L,M,N,­O,P,Q,R,S,T,U,­V,W,X,Y,Z   Equals 1,2,3,4,5,6,7,­8,9,10,11,12,13,14,­15,16,17,18,19,20,21,­22,23,24,25,26   Then K – N – O – W – L – […]

Hide Away Your Units

If you have an object in your code, and that object has some kind of measurement, you might well have done this: class Desk { constructor( public width: number, public depth: number, public height: number ) {} } But this will almost certainly lead to some issues… for example, you store your values as centimeters […]