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

Need to ship your Qt app for Mac? Bundle it up!

I’m contributing some code and GCC-CPU-time to PhantomJS. It’s a brilliant idea and I hope it will grow, maybe with some help from me as well. I have recently spent some time working out how to go from a ā€œcompiled from sourceā€ version, to generate a shippable executable. For Mac, in my case. a ā€˜cute’ bundle I’ll explain how to bundle up your Qt based application, so that you can ship it. PhantomJS will be my reference example. ...

April 27, 2011 Ā· 4 min Ā· 732 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

11/02/2011 - It happened today

I’m impressed. Today a lot of important things just happened, and I think it’s work putting them down. Tahrir Square pushes Hosni Mubarak down After what he said yesterday night, I was not expecting this to happen so soon. Mubarak stepped down! In addition of being a great news for all my friends that are directly or indirectly related to Egypt, this is an INCREDIBLE news for something I tagged as ā€œlostā€: hope. ...

February 11, 2011 Ā· 4 min Ā· 846 words

"So Long, and Thanks for All the Fish"

I have been thinking of writing a post to ā€œmotivateā€ why this should have happened. My most tweeted rant is: Symbian is dead, long live S60 But today Nokia decided to do it out of the blue (not really). So now I just have to acknowledge that I’m late. :) What the heck am I talking about? Yes, I know, my ability to explain myself, sometimes, fails big time. But if you are here, I want to assume that you know who I’m and, more or less, where I come from. If you don’t, why the heck are you reading my intellectual blasphemy? Go home! ...

October 21, 2010 Ā· 5 min Ā· 1018 words

Binary Tree Rebuilder

Imagine you have a Binary Tree, with those characteristics: * Nodes do not respect any order relation - In other words: it's <strong>not</strong> a [Binary Search Tree](http://en.wikipedia.org/wiki/Binary_search_tree) of any kind * Every node appears <em>once and only once</em> within the tree A nice Binary Tree Then, your little brother passes by your desk and, to upset you, deletes the tree from your computer memory/HD (yeah, I know, I’m pathetic at inventing hypothetical situations :-P ). Fortunately though, you previously did a Pre-Order and an In-Order visit of your tree, and stored the result in an 2 nice array. Can you rebuild the original tree structure out of this 2 array? How are you going to rebuild it? Yes, you can! (Sorry, I couldn't resist). And it's quite easy as well. What you have to do, is the following: Take the first element of the PreOrder Array and use it as root of a new tree Find the position of this New Node in the InOrder Array, scanning it from 0 to n-1 (n is the number of Nodes) IF next element in the PreOrder Array is on the left of the New Node in the InOrder array: call RECURSIVELY this procedure, this time taking into account the portion of InOrder array that goes from 0 to the position of the New Node in the InOrder Array -1. IF next element in the PreOrder Array is on the right of the New Node in the InOrder array: call RECURSIVELY this procedure, this time taking into account the portion of InOrder array that goes from the position of the New Node in the InOrder Array +1 to n-1. Return the New Node By the way, this doesn’t work. To fix it we should be more generic, specifying things a little bit better. Things like: * Every recursive calls takes into account a portion of the InOrder array; in the case of the first call it's the entire array * There is going to be as much recursive calls as the number of elements in the PreOrder array Of course, is a tree what we are talking about here: recursion is a MUST. ...

February 5, 2010 Ā· 5 min Ā· 862 words

Serverless chat to reduce office distance

This idea comes out for an old university-time idea: to write a serverless chat application. Of course, I’m aware of the complications and the problems that using Broadcasting could create, so this problems would be took in consideration by design. But why now? I was thinking of a way to reduce the ā€œoffice distancesā€: making easy to connect with a person who works in your own office. I know, it sounds a bit ā€œcreepyā€ to depend on an application to do that. After all you could just stand up and go to the colleague’s desk. And that’s what I’d normally do: nothing impossible. ...

January 31, 2010 Ā· 3 min Ā· 470 words

QDetroBro: Experimenting with Qt on S60

The best way to learn a new language or a new framework is to find an idea and implement it. So I’m doing for Qt on S60. So I decided to implement a dummy browser that has some smart/attractive/peculiar/interesting/funny bits. QDetroBro Because I’m lazy to package and attach code, and because is always good the evolution of a project from the ground-up, I decided to post it on my GitHub account. You can find it at: http://github.com/detronizator/QDetroBro/tree/master. ...

August 13, 2009 Ā· 1 min Ā· 183 words

Snippet: fix Screen Orientation in a Qt/S60 app

I follow the Qt/S60 Mailing list, that is turning out to be a very interesting and active ML, and the Qt Labs blog, always full of very good code, written directly by the guys of Qt Software. I thought could be nice to start to post some of the stuff I’m learning. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include <eikenv.h> #include <eikappui.h> #include <aknenv.h> #include <aknappui.h> // ... // lock orientation CAknAppUi* appUi = static_cast<caknappui *>( CEikonEnv::Static()->AppUi() ); if ( appUi ) //< Actually, this will always pass. It's a "static_cast" after all... { appUi->SetOrientationL( CAknAppUi::EAppUiOrientationPortrait ); } // ... Today's source is: [Nokia Forum](http://discussion.forum.nokia.com/forum/showthread.php?t=164499).</caknappui></aknappui></aknenv></eikappui></eikenv>

August 11, 2009 Ā· 1 min Ā· 116 words

Nokia should Learn, not Teach

From Slashdot: Nokia Urges Linux Developers To Be Cool With DRM [superglaze](mailto:superglaze@hotmail.com) writes in to note that according to Nokia's software chief, its plans for open source include getting developers to [accept things like DRM, commercial IP rights, and SIM locks](http://www.businessweek.com/globalbiz/content/jun2008/gb20080612_288518.htm?chan=top+news_top+news+index_global+business). > Ā«[[Ari] Jaaksi](http://jaaksi.blogspot.com/) admitted that concepts like these "go against the open-source philosophy," but said they were necessary components of the current mobile industry. "Why do we need closed vehicles? We do," he said. "Some of these things harm the industry but they're here [as things stand]. These are touchy, emotional issues, but this dialogue is very much needed. As an industry, we plan to use open-source technologies, but we are not yet ready to play by the rules; but this needs to work the other way round too."Ā» So, Nokia wants to EAT using the knowledge and the software that the Open Source Community created… and, at the same time, change it’s culture and impose concepts that are COMPLETELY against the Open Source ā€œphilosophyā€ itself. Interesting… Instead of learning of the quality of what the Open Source community is capable of doing using a development model built around ā€œequality and qualityā€, they want to teach/impose? And to who? To the Trolltech employee? They are free to do so… but this does not mean that the rest of the Community will change its mind. QT? There is KDE that has a foundation to protect it PLUS there is always the Fork option ;-) . Think about XFree86 and X.org: nowdays they lost all the users… because of the stupid decision of changing the license. ...

June 15, 2008 Ā· 2 min Ā· 303 words