Posts

Showing posts with the label style

About Felix's Style Guide

Image
Style guides are good as long as these are meaningful and a bit " open minded " because if one style is recognized as anti pattern then it must be possible to update/change it. The Felix's Node.js Style Guide is surely a meaningful one, but I hope it's open minded too. Why This Post Because I write node.js code as well sometimes and I would like to write code accepted by the community. Since developers may go too religious about guides I don't want explain all these points per each present or future node.js module I gonna write ... I post it once, I will eventually update it, but it's here and I can simply point at this any time. Style Guide Side Effect As happened before with the older one or the linter , a style guide may mislead developers and if they are too religious and unable to think about some point, the quality of the result code may be worse rather than better. I have talked about JSLint already too much in this blog so ... let's bring the top...

On My Vicious JavaScript Code

Disclaimer This post is a reply to kangax question : I’m sorry but why such vicious coding style? I'd like to explain my point of view about JavaScript code style so, if interested, please read until the end, thank you :) Some Background I study and use JavaScript since year 2000 and one of the most interesting thing about this language is that even if it is "that old" you never stop to learn something new (techniques, strategies, adapted patterns, etc). At the same time, the " biggest trouble " of this language is its weight in a page, which is the reason we all use minified and gzipped or packed versions of our application. Coming from a " 33Kb modem internet era " I always tried to pay attention about the size and I studied and created both a JavaScript minifier and a compressor . Compressors Rules Unless we are not using an " incremental " compressor, as GIF is, we should consider that packer algorithm, as gzip and deflate , are dicti...