21 May 2012

The Tech Reflector

 
Star Following

  Source Favicon
By Andrea Giammarchi of Web Reflection 8 months ago.
Email

... have you ever thought about it ? I did few times in my 11+ years of RIA centric career!

Even if it's like comparing potatoes with tomatoes I'd like to share my thoughts about it, would you mind ?

What we always laughed about OS

the blue/gray screen with an incomprehensible error message

the Message Box with some rant about some memory address failure

the unresponsive OS due some broken application able to make everything else stuck regardless the number of CPU and thread the OS can handle

webreflection.blogspot.com Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 8 months ago.
Email

Update If you have time follow the whole story in es-discuss mailing list while if you don't have time here the quick summary:

js-ctypes purpose is different from JS.next typed structs/arrays so it looks like it was my mistake to compare tomatoes and potatoes.

I bet everybody else in this world could have compared these two different beasts due identical name, look, and similar usage.

If ctypes are not used outside JS these are not JIT optimized in any case so …

webreflection.blogspot.com Read
  Source Favicon
Email

Andrea Giammarchi compares the different ways of loading javascript in a Web page and introduces a new minimalistic loader: yal.js . Andrea is a javascript ninja and you can trust him to produce state of the art solutions when tackling such problems.

If you want to read more tips or discuss the web with Louis-Rémi, he's available on Twitter as @Louis_Remi .

Rob Hawkes

Forever is a command line interface that lets you keep your …

hacks.mozilla.org Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 8 months ago.
Email

yeah, you read it correctly ... we all need another better programming language because everything we've done until now sucks.

What Sucks

the fact we don't learn by mistakes, which means all of us should instantly try to create a new " secretly open source programming language " so that the rest of the world can only endure it once it's out, rather than contribute to make it better/needed as it's happening since at least 5 years with JavaScript in all possible, and truly open, channels

webreflection.blogspot.com Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 9 months ago.
Email

Well, not only downloads on the fly , the data uri works for almost everything ( only iOS 5 beta does not want to work with inline data uri AUDIO sources .... but this is another story ... ) ... so ...

How To Simulate Script injection Let's say you want a test but you don't want to bother a server. However, you want to be sure the test is asynchronous and it simulates the server.

var

head = document.getElementsByTagName("head")[0],

script = document.createElement("script")

webreflection.blogspot.com Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 9 months ago.
Email

Do you remember my good old wru project ? It has been refactored , readapted for both client and server side environment such node.js and Rhino and, most important, it landed in github ;)

Please spend few minutes to read the documentation and you'll realize why I chose this title for this post.

Have fun with JavaScript Unit Tests!

Labels: essential , Framework , JavaScript , node.js , Rhino , Unit …

webreflection.blogspot.com Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 9 months ago.
Email

In all its " sillyness ", the CoffeeShit project gave me a hint about the possibilities of an overloaded in operator .

The Cross Language Ambiguity In JavaScript, the in operator checks if a property is present where the property is the name rather than its value .

"name" in {name:"WebReflection"}; // true

However, I bet at least once in our JS programming life we have done something like this, expecting a true rather than false .

webreflection.blogspot.com Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 9 months ago.
Email

this is a quick one I have implemented already in fuckn.es in the create angry memory button logic ...

The New Download Attribute Hopefully soon, most updated browser will implement the download attribute in hypertext links (aka: <a> tag)

The quick summary is this one:

The download attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource. The attribute may have a value; the value, if any, specifies the …

webreflection.blogspot.com Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 9 months ago.
Email

I have already described JSONH and now I also have the proof that it's as safe as native JSON is but on average 2X faster than native JSON operations with both small (10 objects), medium (100 objects), and massive (5000 objects and not a real world case, just a stress test to see how much JSONH scales) homogenous collections.

Wherever it's not faster it's just " as fast " but the best part is that it seems to be always faster on slower machines ( mobile ).

webreflection.blogspot.com Read
  Source Favicon
By Andrea Giammarchi of Web Reflection 9 months ago.
Email

Update created github repository with (currently) JavaScript, PHP5 and Python versions.

Update after quick chat on twitter with @ devongovett who pointed out there is a similar standard called JSONDB I have created a JSONH(Flat) version . It looks slightly faster on mobile so I may opt for this one rather than Array of keys at index 0.

The whole array is flat and it changes from [{a:"A"},{a:"B"}] to [1,"a","A","B"] …

webreflection.blogspot.com Read