Posts

Showing posts from June, 2009

Bing Round Table - Tomorrow

Tomorrow I am going to # meetbing to talk about Bing ( :P ) and its present/future. The event has been better described by Phil Leggetter and as He did, I would like to know if there is any tech question you would like me to bring there. So far, I kinda like what Bing API offers, and I am planning to use it soon, but my only concern is about requests limits over a single IP. Thinking about firewalled/natted/DHCPped infrastructure, 7 different people could not use a generic Bing gadget in the same moment ... anything else?

ES5 arguments and callee, I was wrong!

JavaScript is not JavaScript, I am not crazy, it is just a consideration between the language itself and what is behind it: another programming language with lower level rules and logic ... sounds silly and obvious, but please keep reading to understand what I mean. No Results Yet, But I've Already Lost My Battle I spread comments, I wrote post after posts to defend ECMAScript 5 arguments.callee decision with "use strict", but I have to admit I have never investigate the internal behavior of callee, an arguments property which is not what we think is ... Discovering In Core The Callee Property What I was thinking was something hilarious for a C or C++ programmer: an inherited property for a mutable instance. // JavaScript should have a "secret" Arguments class // and for each function, something like this function Test(){}; // we have declared the function Test // internally there should be a secret operation like this: Test._createArguments = function(args){...

A-GINN

Since it seems the post with this link is lost in the nether-reaches... here is the link to download our upcoming LP http://www.sendspace.com/file/ncx5da Jean Genet's 3 Saintly Virtues: Homosexuality Theft Betrayal

Do Not Remove arguments.callee - Part II

Few days ago kangax demystified named function expressions , underling the importance of the read only function name property and how messy is Internet Explorer JScript engine with named function and their scope. Before that post, I wrote one about ECMAScript 5 decision to remove arguments.callee when "use strict"; is present (note in the link: it is not deprecated right now, it is an arguments property) How These Two Things Are Related While kangax post was more focused about possible leaks and unexpected functions definitions, I would like to grab more attention about what this problem will cause in tomorrow libraries and JavaScript usage. Removing arguments.callee, our code size, apparently faster in core thanks to this missed variable, will increase drastically and a big part of the beauty of JavaScript language will disappear with this callee decision. The Classic Configuration Object Problem How many libraries base constructors via configuration objects? jQuery Ajax ? ...

TONIGHT

So, we are playing Death By Audio tonight... we are terrible at promoting, but show starts at 9, we play 3rd, if anyone is planning on coming... i don't have the address. i think its on south 2nd sorry for the bogus information. we suck. come anyway and tell us that.

JavaScript arguments Weirdness!

As you know, arguments is a "magic undeclared variable" with a local scope present in each function body. This variable is an Object, with an Array like structure. checkArgs(1, 2, 3); function checkArgs(){ // even if we do not declare // arguments, this one will // be present with a length property // equal to 3 and respective // 1, 2, and 3 values at index // 0, 1, and 2 arguments.length; // 3 arguments[0]; // 1 Array.prototype.join.call(arguments,"-"); // will produce 1-2-3 }; Nothing new so far, but I bet not everybody knew some arguments "feature" which is browser dependent or somehow re-usable. The Common "For In" Behavior There is a particular behavior about arguments variable, it does not expose properties in a "for in" loop . checkArgs(1, 2, 3); function checkArgs(){ for(var key in arguments) alert(key); // nothing happened ... }; How can be possible? Simple enough, 0, 1, a...

The One With Microsoft Paying Users

You probably do not know what's happened today at about UTC lunch time. It has been just a quick twit from John Resig , that at least every follower instantly noticed the next Microsoft campaign pro Internet Explorer 8. The Fact Microsoft Australia launched a sort of " competition ", called Ten Grand . Apparently, starting from Friday 19th, a twit will be released each N hours, creating a sort of one day investigation to discover where the price is (in my opinion somewhere in the same page where the contest begins, assumption created by my idea about M$ "fantasy"). The Problem That Web Page literally insults other web browsers, even discarding, probably on purpose, Opera one. In few words, that game is only for Internet Explorer 8 Users . OK, OK, they are apparently desperate enough to pay users in order to have more market share, fair enough, but what is all this "fun" about others? You'll never find it using old Firefox You'll never find it ...

some blood

we are playing death by audio on Monday June 22nd with our friends, the Gaza Striptease... come. tour is almost booked - more details soon lp is almost here - more details soon

Opera Unite ... or better, Server Widgets!

My plan to conquer the World was so close that I could not believe it: the power of my old Centrino 1.6 based Laptop, nowadays less powerful than latest Netbook, plus my fantastic USB pen to surf constantly switching between GPRS, HSDPA, and 56Kb with constant lags of service, and finally a magic Web Server directly inside a good browser! WOW, It's Done! What Blocked My Plans ... not the hardware, neither the connection, just the idea! First of all, I cannot understand (or maybe I can ...) that much why everybody should be excited by something like Opera Unite: the idea is not new the implementation is not that friendly there are hundreds of limitations Nothing New Somebody already complained about the un-innovative service or the browser integrated web-server, I would like to add the good old no-ip service to the list: install a Web Server, whatever it is, and as long as you are connected, no-ip will redirect a static url into your dynamic IP address. Easy? Moreover, you'll ...

On David Fearon PC Pro GWT Article

I do not even know why somebody like me should buy PC Pro, maybe it was simply reminding me 12 years ago when I started fixing Hardware and Software problems as Computer Shop Technician? Maybe I was flying to Italy alone? It does not matter, nice enough I found, after years without reading it, an updated magazine which decided a while ago to talk about IT and Web as well, rather than only Hardware and few desktop applications. Don't be afraid about Google latest web revolution this is the title of the article, and the subject is not wave but GWT . JavaScript, the hideous language saved by browsers? If you do not know a language, or you cannot spot its beauty, 'cause you only know a different one, in David case Java, you should not categorize JavaScript that bad. First of all, unlike David, I deeply know JavaScript, and I worked with both Java language and Java Developers, so I know what I am talking about, secondly, comparing a strongly typed programming language, Java, with o...

Wait A Moment, JavaScript Does Support Multiple Inheritance!

... we are just doing it wrong! Classical Inheritance? We Have Something Better! The main limit about multiple inheritance in JavaScript is the presence of " instanceof " operator. In a prototypal based inheritance objects simply inherits from objects, and class keyword is almost meaningless. // generic constructor function B(){}; // remember the prototype var B1proto = B.prototype; // B instance var b1 = new B; // prototype reassignment B.prototype = { constructor:B }; // remember new prototype var B2proto = B.prototype; // B instance var b2 = new B; alert(b2 instanceof B); // true alert(b1 instanceof B); // false Above snippet demonstrates how inheritance and instanceof are related to the current prototype, rather than the function/constructor itself. In few words, the function is the implicit init method for the current prototype object. The relation, as we could spot with FireFox, is with the prototype and not the used constructor. // FireFox exposes __proto__ // wil...

ExtJS And The Bloody TreePanel Arrow

First of all I am sorry for choose title, but I kinda lost dunno how many minutes to figure out what was wrong , and it was not me ! Please let me try to explain what was the requirement, and how I had to force ExtJS to act as I want, version 2.2.1 or 3.0RC2 , it does not matter. The Problem ... The reason you or your company choose ExtJS is most likely because of its Office $uite / Window$ look and feel, closer than many others to a proper Desktop Application, perfect under Adobe Air, and one step forward about stability, performances, and documentation, even with the old enemy: Internet Explorer 6 . Fair enough, it's a good library but, there is always a but, at the same time it does not replicate 100% same Window$ behaviors. As example, try to click Start and Run a prompt command, explorer . This is the typical Window$ file browser, something we deal with since ages, something still a user habit. ... In Details How does it work? It is really simple, we have a representation of o...

MySQL UPDATE DELAYED - Just My Solution

The Problem MySQL supports DELAYED option as INSERT statement but, for some obscure reason nobody got so far, it does not support UPDATE DELAYED or DELETE DELAYED. Why DELAYED Is Necessary As quick summary, INSERT DELAYED is something truly useful when we would like to let MySQL decide when it is time to perform that insert without blocking tables and users. This is a problem almost specific for engines like MyISAM, MEMORY, ARCHIVE, and BLACKHOLE. This post is not about " why not InnoDB ", this is about DELAYED with these engines, specially with MyISAM one. To better understand a common case where an UPDATE DELAYED could be extremely useful, just think about a counter, how many users visited that id. Is such information that useful to be not approximated and to possibly block every other select because of an update that nobody will verify with a microscope? In my opinion, such information is "just a plus" and if the page execution could be faster without blocking...

input.focus() ... something really annoying!

new libraries, new add-on s , new engines, new browsers, but still the bloody focus event directly in the onload one ... any chance we will go a step forward? What is wrong with focus The main usage of this strategy is to force via JavaScript the focus of the main input field and it is usually on the top of the page. It could be a search input, a la Google, or it could be a generic log-in. It could be a blog post title, or it could be a comment ... whatever it is, it should NOT act like this! Try to imagine you have a slow connection (I am still with mobile usb pen) or try to imagine you are using your A Grade browser mobile phone with still, a not that fast connection (I am still using my Android, iPhone is the same). Since these magic-focused fields are usually at the beginning of the page and since the page will take more time to be downloaded, 90% of the time this automatic feature messes up my user and password or my searched keyword. Too often I have to correct or change back th...