Show all feed information | Ping Blog Update
since the discussion about a better Function#bind will probably never end, and since a must have dependency would be the ES6 WeakMap which is in any existent shim leak prone due lack of control via ES5+, I have proposed another way to solve the problem. ObjectHandler IDL Like /** * interface …
There are a couple of things I have never liked that much about Function#bind and this post is about proposing a pattern hopefully better than common one. At The End Of The Function A common argument about parentheses around inline invoked functions is that developers can easily recognize them. …
It's time to summarize at least few mistakes or epic fails of the year, hoping the next one will try to follow a better direction. I won't mention anything related to war, politic, Berlusconi, or fashion related stuff, other more prepared than me will do via pictures or posts, all I gonna talk …
There are cases where JS coercion may be wanted/needed/necessary, at least logically speaking. A classic case is a list of primitives, e.g. strings, or numbers, and a check we would like to perform without creating a new function each time . // recycled function function alreadyThere(value) { // …
For those who don't know what __noSuchMethod__ is here the quick summary: it was a bloody handy non-standard method able to provide a fallback whenever we invoked an object method that did not exist. var o = {}; o.__noSuchMethod__(function (name, args) { alert(name); // "iDoNotExist" …
A very good and common practice with JS projects bigger than 100 lines of code is to split code in different files. Benefits are clear: smaller pieces of code to maintain swappable portions for experiments and/or improvements or new features, as example including for a build magic2.js and get it, …
Another active exchange with @getify about JSON comments and here my take because tweets are cool but sometimes is hard to tell everything you think in 140 bytes ... Kyle Facts JSON is used on daily basis for billion of things and configuration files are one, surely common, way to use JSON ( just …
When Array extras landed in JavaScript 1.6 I had, probably together with other developers, one of those HOORRAYYY moment ... What many libraries and frameworks out there still implement, is this sort of universal each method that supposes to be compatible with both Arrays and Objects. A Bit …
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 …
The freaking fast and bandwidth saver JSONH Project has finally a new schema argument added at the end of every method in order to make nested Homogeneous Collections automatically " packable ", here an example: var // nested objects b property // have same homogeneous collections // in …