Console++ - enhance your console

I need a logger for GhostDriver but I’m too lazy to figure out how to use a nice, proper logging library. Plus I’m a BIG fun of old-school-debugging: I just substituted all the printf() calls with console.log. So I decide to make every JavaScript developer shiver in disgust and wrote a small library that enhances the global console object. This tiny library is called Console++ and works with NodeJS, PhantomJS and any decent JavaScript runtime. ...

February 18, 2013 Â· 1 min Â· 139 words

My Rhinoceros likes WebSocket, not leafs

Last week I started implementing W3C Sockets API into a Rhino based JavaScript runtime. It seems like plumbing API from one environment to another is one of the activity I do the most. And if you dare doing a joke about my Italian-ness and Super Mario… you will be pointed in the direction of the door. Here I want to share a couple of findings. Rhino is not bad at all Yes, I said it. And who has worked in the past with me, knows how my opinion are hard to change. But they do sometimes, fortunately. ...

February 14, 2012 Â· 2 min Â· 399 words

Scope 'this', and scope 'that'

As a guy that tries to live his professional life in the middle of the dichotomy “C/C++ - JavaScript”, I often find myself discussing the discrepancies, differences and implementation details of the latter (an half-assed prototypal language) using the former. The other day I was chatting with Luca (@lucabox) about scope in JS, and we were describing the different situations you can end up with… and how we work our way out of those culprits. ...

February 12, 2012 Â· 8 min Â· 1541 words

NodeJS Conf Italy: my notes

I’m just back from a very good conference. And for once, I can proudly say, it was organized by Italians! The host were WEBdeBS, a web company based in lovely Brescia, and the topic was… very hot: Node.JS. Node.JS Conference (@nodejsconfit) (on joind.in) has been hosted in the Centro Paolo VI, where talks well complemented by lovely Italian food. What else can you ask? A great addition to my collection of “hackshirts” ...

October 5, 2011 Â· 7 min Â· 1403 words

Coffee-Shit

I had it. I’m sick and tired of this nonsense. People, Devs in the specific, should pull their head out of their ass right now and act like adults. What am I on about? I’m about re-factored, recompiled languages. Stuff like CoffeShit (yeah, Coffee-SHIT - so what?). Who the fuck cares? Come on people, are we really saying that the grammar of a language makes you a better/smarter/faster developer? This is BULLSHIT! Grammar has nothing to do with the quality of your code or with your development speed. NOTHING! ...

June 2, 2011 Â· 5 min Â· 1049 words

Thinking out aloud: a JavaScript based console?

In the last month or two I started contributing to PhantomJS: PhantomJS logo PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG. PhantomJS is an optimal solution for headless testing of web-based applications, site scraping, pages capture, SVG renderer, PDF converter and many other use cases. The project is really interesting and we are seeing a steady growth in terms of: ...

May 5, 2011 Â· 4 min Â· 679 words

How to handle Proxy PAC configuration with Qt

This article was originally written on another blog. That blog was never officially published, and it will probably never be. It was written on the 3rd of June 2010, but is still “somewhat important” and relevant. Since the post was published, Richard Moore <rich @linux…fpb.site> has done a commit in the Qt examples directory that resamples very closely my code below. So, I decided to repost it here. Qt and Proxy Configuration What’s great of Qt, is that it comes with a very rich set of libraries to cover almost everything you can think of. As a Qt developer, you should always double check the Documentation first, to see if “it’s already there”, before jumping into coding. It saves tons of time. ...

March 20, 2011 Â· 6 min Â· 1068 words

Full Frontal 2010 - My transcript

Last friday I have attended Full Frontal 2010, a one day JavaScript conference organised by Left Logic. This has been the second time the conference ran: the first was last year. Full Frontal 2010 It was a very inspiring and stimulating day, with a very very nice line of speakers, all coming from different, but yet connected, areas of the Front End Development scene. Left Logic is run by Remy Sharp, that made an very good job, together with his wife (sorry, I don’t recall her name right now), to organise, publicise and sell-out all the tickets, months before the conference. I guess next year the only problem for them will be to try to find a bigger venue: Duke of York’s Picturehouse in Brighton was a nice and cosy one, but the absence of decent WiFi connectivity, and the size of the cinema, will probably become a limit as this event gets more and more popular. ...

November 14, 2010 Â· 10 min Â· 2068 words

Job's (a bit) wrong

This is a set of commets to some of the asserts made by Steve Jobs in his Thoughts on Flash. Safari has just ~5.5% of web users share […] Apple even creates open standards for the web. For example, Apple began with a small open source project and created WebKit, a complete open-source HTML5 rendering engine that is the heart of the Safari web browser used in all our products. WebKit has been widely adopted. Google uses it for Android’s browser, Palm uses it, Nokia uses it, and RIM (Blackberry) has announced they will use it too. Almost every smartphone web browser other than Microsoft’s uses WebKit. By making its WebKit technology open, Apple has set the standard for mobile web browsers. […] Ehm, what about Netscape Gecko? It’s not just Firefox and it’s share of web users, much larger than the one of Safari, but also the fact that the Mozilla Foundation is very much involved in building (W3C) standards like HTML5 et similia. I can see that you used the word “Almost”, but that’s not a good start: Steve, let’s try to be more fair here. ...

May 2, 2010 Â· 5 min Â· 1043 words

3 o'clock javascript

I was writing some code to react at a textarea.onKeyUp. I take the size of the current textarea.val().length, update an element and do some other stuff. yawn The first version of the code looked like: 1 2 3 4 $('#message').keyup(function(e){ $('#chars_num').html( new_len ); $('#sms_num').html( Math.floor($('#message').val().length / 161) +1) ); }); Working good, but was clearly slow: every keystroke was “giving back the cursor” too slowly for a fast typer like me. I went to take a look at twitter, and their text box was WAY FASTER. ...

March 28, 2010 Â· 1 min Â· 201 words