• 19mar
    Categories: Blurbs Commenti disabilitati

    I ChingHere is a little application I made for android phones. It is a portable I Ching, the ancient divinatory method. It implements the three coins method to calculate an hexagram, it's changing lines and the transformed hexagram.
    Finally, it gives an explanation of the results, keeping an history.
    An hexagram browser is available. At the moment, the only language supported is english.
    Moreover, it's open source and the code is available on:


    This allows everybody to check the correctness of the computation. While somebody might object that using an android phone cannot guarantee a true randomness of the results, this would lead into discussing the casuality per se. Under the theory of deterministic chaos, it works as well as throwing three coins in the real world.


  • 11gen
    Categories: Programming Commenti disabilitati

    I recently bought an Android phone and now I wish to develop some mobile apps. This is why I took a look at Flex technology and discovered with disappoint that Adobe is 1) selling their IDE at a very high cost 2) not supporting Linux anymore.

    In any case, being FlashBuilder based on Eclipse Platform, it's possible to run its plugins on a clean eclipse installation. The only unavoidable limitation is the usage of Adobe AIR 2.6, the last release for Linux systems.

    Merging the Flex SDK with Adobe AIR

    Although any Flex SDK can be used in FlashBuilder-Eclipse, it's recommended to use version 4.5.1 that at the time of writing is the only one that features the Design Mode (EDIT: it seems there is no way to make Design Mode functional. The closest environment is this web tool: http://designview.sourceforge.net/). Flex SDK can be obtained at http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK, while Adobe AIR 2.6 for Linux should remain available at the following link: http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2. It's afterward necessary to copy AIR runtimes/ to SDK runtimes/ and substitute SDK bin/adl with AIR bin/adl [1]

    Install FlashBuilder over Eclipse

    First, download a new Eclipse and install it somewhere, for instance in /usr/share/flashbuilder and optionally rename the eclipse executable to flashbuilder. Then, follow instructions at http://code.google.com/p/fb4linux/wiki/HowToInstall to install the port of the Adobe Flash Builder 4.5 to Linux. Actually to me it was impossible to use the Eclipse p2 updater and I simply dragged the features/ and plugins/ directories from the downloaded archive over the Eclipse folder. From now on, it will be possible to update the IDE (including module updates from Adobe) using the p2 updater.


    A few problems arose at this time; this is an alpha software in any case.

    1) Resolve PermGen space errors during execution and updates

    FlashBuilder requires much more memory than eclipse, run it with command line parameters -vmargs -Xms768m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m to be sure it doesn't run out of memory. Those parameters could also be set directly in the eclipse.ini file [2]

    2) Sporadic crashes (for instance when choosing an external web browser):

    Investigating the crash dump revealed the xulrunner library was the cause of this issue. Further googling helped to find the solution [3]: add the -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-2/libxul.so parameter, to the command line execution, too.

    Eye candy

    To complete the integration with the desktop environment (Gnome Shell) I performed the steps that follows. Attached to this post, a zip file containing a Flash Builder icon and a splash screen: flashbuilder-eyecandy.zip

    1) Make flashbuilder a permanent entry to the dock

    Create a new file /usr/share/applications/flashbuilder.desktop with the following content, so that when FlashBuilder-Eclipse is run for the first time it will be possible to add it as favorite:

    [Desktop Entry]
    Name=Flash Builder
    GenericName=Adobe Flash Builder
    Comment=Eclipse IDE modified in order to use Adobe Flash Builder plugins
    Exec=/usr/share/flashbuilder/flashbuilder -vmargs -Xms768m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-2/libxul.so

    Note that the definition searches for a flashbuilder.* icon in the /usr/share/icons/ folder.

    2) Change FlashBuilder-Eclipse splash screen

    Follows the steps reported here [4] to change the Eclipse default splash screen


    [1] http://zoltanb.co.uk/how-to-set-up-flex-4-5-sdk-with-air-2-6-on-linux-using-fdt/

    [2] http://www.javaquery.com/2010/11/how-to-solve-permgen-space-error-in.html

    [3] http://kishalmi.net/cms/node/55

    [4] http://www.mkyong.com/java/how-to-change-eclipse-splash-welcome-screen-image/

    Tags: , ,
  • 20ott
    Categories: Programming Commenti disabilitati

    Reference: http://www.javakb.com/Uwe/ForumPost.aspx?article=java-setup:7069:1131419458.848897.223820%40z14g2000cwz.googlegroups.com

  • 15giu
    Categories: Programming Commenti disabilitati

    Althought development is in its initial stage and there are known bugs, the following completion scenarios are supported:

    • Package, classes and interfaces names from the project classpath
    • Engine scope Rhino object and function names
    • Fields, methods and constructors names of Rhino objects
    • Static methods invocation
    • Inline interface implementation
    • Methods signature with parameter type guessing
    Netbeans plugin: Rhino content assist

    Netbeans plugin: Rhino content assist

    Download from Netbeans plugins

    The plugin now allows to use a customized set of rules and even different ScriptEngine simply by class extension. This means that anybody can extend it to suit a Rhino interpreted language, which is the next thing I'm into.

  • 16apr
    Categories: Programming Commenti disabilitati

    This plugin allows to create a canvas and use mouse dragging (similar to iPhone/iPad scroll) to scroll every object queried by the scroller, providing a smooth scroll effect. The plugin allows customization of redraw function in order to cope with performance issues (eg.: to implement clipping of far away canvas items)

    See a live demo

  • 03mar
    Categories: Hardware & Software Commenti disabilitati

    A needed consideration is that testing by polygraph (also known as “truth machine”) has given rise to conflicting opinions about the scientificity of the method and regarding the validity of the outcoming results. Even if in some countries it is still used for formal questioning investigations, the idea of integrating this kind of system into a portable device best fits the social and recreative environment rather than covering any social or utility purposes.
    Goal of the project is building a device from a microcontroller and few electric components, so that it has a minimum amount of accuracy needed to works in the most generic cases. This paper will cover the steps that led me to its realization.

    A full view of the Arduino polygraph

    A full view of the Arduino polygraph, featuring a heartbeat and GSR sensors

    Polygraph project: perv_sys_proj_736581.zip

  • 13gen
    Categories: Hardware & Software Commenti disabilitati

    This little bash script prioritize the smooth view of a fullscreen application preventing screen shutdown, start of screensaver and suspends boinc projects untill the window goes out of fullscreen.
    It has to be put as a startup application (it must use a command like sh ~/fullscreen-daemon.sh) and runs as a daemon, under gnome desktop environment version 2 and 3.
    UPDATE 2011/05/29: The script is tested under gnome 3 but should work as it has always done under gnome 2
    File: fullscreen-daemon

    Furthermore, in case of a fullscreen video, if it is still choppy there might be a workaround to play smoothly fullscreen:

    sudo mkdir /etc/adobe
    echo "OverrideGPUValidation=true" >~/mms.cfg
    sudo mv ~/mms.cfg /etc/adobe/


  • 31ago
    Categories: Blurbs Commenti disabilitati

    I'm starting a new post today and I'll update it when I spot new weird or funny things that I think are worth reporting. Here goes the list:

    Let me google it for you
    This is a nice joke to post on forums where people ask for solution to problems intensively discussed (and resolved) somewhere else. You just put the question in the "q" param et voilà!

    Best Ever gnome theme
    Really unusual gnome theme offered from this page, which the author says to be the best gnome theme ever. According to the comments, those who tried it agree.

    Chrome Extension: Nothing
    This extension does nothing. I really liked the comments, though!

    The WTFPL licence
    Because you'll never be free enough when it comes to licencing your code

    The Daily WTF
    "Curious Perversions in Informatic Tecnology"

    HTML tables generator
    Just in case you really need a HTML table...

    Primate Programming Inc
    Never hire a man to do a monkey's job

    Church of Google
    Is Google God?

  • 31ago
    Categories: Blurbs Commenti disabilitati

    What's being discussed right now by major software companies with main Internet Services Providers of many countries is part of differentiated services. Which means: TCP packet traversal will be given different quality of service (bandwidth, speed, etc) according to specific service agreements.
    This is not so new after all, and was already applied by ISP to final customers. But now, by applying it to content providers (depending on how free those two contractors are left by the absence of democratic laws in this field), the new paradigm of two track broadband highway could undermine the principle by which every content of the net is served equally with respect to the others.

    Since internet diffusion, it was possible for small companies of skilled individuals to oppose to big corporations when it came to releasing a new service to the public just because they made a better job. Just think about Youtube for instance: it was born in a garage, and became so appealing that later Google bought it. Now, what if Google videos were intrinsically (by service agreement with your ISP) streaming faster than Youtube ones? Many probably would have prefered, despite of features and of content richness, the most suitable service... I'm not saying that any of the two was better than the other, I'm just saying both made the other better because they were - until a certain point - competitors.

    We are likely to go toward an unfair competition situation. It must be avoided to preserve neutrality of internet. Infact, this new shape of internet would even be penalizing for "inconvenient" third parties, which would be asked themselves to pay to remain suitable by the majority of the users.

    In one word: oligopoly.

  • 30ago
    Categories: Hardware & Software Commenti disabilitati

    UPDATE 2011/05/29 In gnome shell 3.0.0 there is no concept of tray applets, but still I like to make a single startup script in wich I execute all the background programs needed, instead of creating lists of entries in the autostart registry
    I use this little script, which run at startup, to make stuff available

      "perl .bg-shifter"
    startup () {
        echo [email protected] "starting..."
        eval [email protected] &
    for (( i = 0 ; i < ${#programs[*]}  ; i++ )) do
       startup ${programs[i]}

    Skype needs "Start in tray option" to behave.