Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Short SASS tutorial

If you learned CSS before, you should know that CSS is not a programming language. You can use it to design webpage style, but you cannot use it for programming, i.e, CSS is what designer uses, not what programmer uses. Programmer may think that CSS is very troublesome, it has no variables, no conditional statements, it just allows line-by-line description of HTML elementsLuckily, CSS preprocessor appear which makes CSS programmable. The general idea of CSS preprocessor is using a programming language to design the website style, and then convert it to CSS files.Among different CSS preprocesso...

9,193 0       CONDITION CSS COMMENT VARIABLE SASS PROGRAMMABLE


  var in JavaScript

Geoff published an article sometime ago--"How one missing var ruined our launch". This article described one case where MelonCard uses Node.js as their backend system, suddenly there was a small registration peak period--50-100 people registered concurrently, then the entire website stopped responding and many other strange problems showed up. When they were investigating the source of the problem, they found one missing var in the following code.app.all(‘/apps/:user_id/status’, function(req, res, next) {    // …    initial = extractVa...

3,335 0       JAVASCRIPT VARIABLE SCOPE


  Avoiding and exploiting JavaScript's warts

One's sentiment toward JavaScript flips betweenelegance and disgust without transitingintermediate states.The key to seeing JavaScript as elegant is understandingits warts, and knowing how to avoid, work around or even exploit them.I adopted this avoid/fix/exploit approach after readingDoug Crockford'sJavaScript: The Good Parts:Doug has a slightly different and more elaborate take on the bad partsand awful parts,so I'm sharing my perspective on the four issues that have caused me the most griefin the past:how to fix broken block scope with with;the four (not three!) meanings of this;promoting ...

2,593 0       JAVASCRIPT VARIABLE THIS WARTS EXPLOIT WITH


  How One Missing `var` Ruined our Launch

Well, that was a veritable shitstorm (sorry for the language).  Long story short, MelonCard was featured today on TechCrunch (along with other500Startups companies, also on VentureBeat, Forbes, …) and everything broke all at once.  Every. little. thing.  We had rolled out a huge change to MelonCard over the last few days to make our site a seamless “everything just updates” look-good / feel-good product using NodeJS long-polling with a slick KnockoutJS dynamic jQuery Templates front end.  We did our du...

7,443 2       JAVASCRIPT JQUERY NODEJS VARIABLE SCOPE GLOBAL