Posts

Showing posts from March, 2010

NOMOS/THE MEN - Split CS on Vinyl Rites

This is now up for order over at the Vinyl Rites webstore! http://vinylrites.bigcartel.com/product/the-men-nomos-split-cassette We will absolutely also have them for our weekend stint with Nomos...so if you want to get it from us in person we will be in Albany, Boston, and Amherst from April 9th-11th... These tapes look great and we are excited! - Chris

new Constructor VS Object.create

just a quick post about ES5 Object.create performances. While in More ES5 Friendly Patterns paragraph I have described how to use new ES5 features to create instances in a better way, I have never tested directly performances against classic ES3 pattern. The Benchmark Logic Pretty simple, create a new object with a " privileged property " plus an inherited one. The test prototype looks like this object: var proto = {toString:function () { return this.name; }} The assumption is that somehow the object should be able to return it's name, which is not shared via prototype. ES3 Game I hope I don't have to explain this piece of code: function F(name) { this.name = name; } F.prototype = proto; To test above classical pattern, all we need is to confirm this behavior: var o = new F("instance"); alert(String(o) === "instance"); ES5 Game Using an updated browser, it should be possible to replicate ES3 behavior via this piece of code: var o = Object....

two trees

Image
Just got back from SXSW. We had a great time and got to hang out with rad friends and see great bands. Here is some up to date info on our happenings... NOMOS/THE MEN - Split CS (Vinyl Rites) - this should be out early April in time for our weekend stint with Nomos. Ltd. 250 copies (100 tour, green shell pro printed tapes, 150 mailorder, red shell pro printed tapes) Next Tuesday (3.30) we will be playing with our buds in Neon Blud who are on tour from Tampa right now destroying cities all around. It's at Death By Audio and White Suns and Weed Hounds are also playing, heres a flyer... After that show we have our Nomos weekend. After that we will be going into the studio with Ben Greenberg (Zs, Pygmy Shrews) @ Python Patrol to record what will comprise our 3rd LP... On the 23rd of April we will be playing our record release show for the Immaculada LP with Nomos, Pygmy Shrews, MLU, and Remnants. This show will be fun, and we can't wait to finally have the 2nd LP available to al...

Anonymous Style

When a function is to be invoked immediately, the entire invocation expression should be wrapped in parens so that it is clear that the value being produced is the result of the function and not the function itself. I have already commented the popular JavaScript Code Convention article, but latest cited sentence is probably the only one I have never been sure about. Why Bother Actually, I have always found the expression: var something = function(){ // do stuff // return something }(); // invoke kinda enough to invoke inline a function expression. Somebody argued that above style is ambiguous. Since an inline invoke could be performed against a massive function body, the point is that we may need to scroll 'till the end of the function expression to know if it has been executed or not. In my opinion, whenever there is a function expression, we should always check the end of this function or we'll never be sure about the assigned value. Fair enough, even if the fun...

This friday in Austin!

Image

CommonJS - A YAGNI Based "require"

I am very busy these days with my last (hopefully) moving into my new and completely empty rented flat ... and while I am building home utilities and preparing my last post about A Better JS Class , with some extra case where common libraries fail with their parent implementations, I would like to quickly share this require function I wrote days ago but just recently came back in front of my eyes. Why require In CommonJS we have different techniques and agreement about how developers should structure/organize their namespaces and libraries. The first common function adopted from CommonJS " followers " is the require one. This function aim is to load once, and runtime, a namespace, allowing scripts loaded via this function to define exported properties/variables or methods/functions. // file main.js var $ = require("jquery").$; // file jquery.js // let's imagine jQuery library has this piece of code inside if ( typeof exports != "undefined" ) { //...

FRIDAY MARCH 12

Image
(flyer by dan rossiter )

TONIGHT

Image