<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7057088794786608870</id><updated>2012-01-20T15:59:28.066+01:00</updated><category term='ruby'/><category term='arm'/><category term='articles'/><category term='fuffa'/><category term='rmi'/><category term='optware'/><category term='rsync'/><category term='books'/><category term='development'/><category term='grizzly'/><category term='xunit'/><category term='mock'/><category term='politica'/><category term='jersey'/><category term='integration-test'/><category term='viaggi'/><category term='http'/><category term='vacanze'/><category term='software development'/><category term='arte'/><category term='test'/><category term='mario bros'/><category term='foto'/><category term='agile'/><category term='shell'/><category term='python'/><category term='rails'/><category term='tdd'/><category term='trash-cli'/><category term='c++'/><category term='italiano'/><category term='backup'/><category term='linux'/><category term='treno'/><category term='screen'/><category term='casa'/><category term='#codingdojo'/><category term='tech'/><category term='legacy-code'/><category term='pixels'/><category term='java'/><category term='english'/><category term='jug'/><category term='sourceforge'/><category term='ssh'/><category term='games'/><category term='xpug'/><category term='amici'/><category term='speaker'/><category term='bash'/><category term='automatic-test'/><category term='netbeans'/><category term='rest'/><category term='io'/><category term='biennale'/><category term='software'/><category term='unix'/><category term='usabilità'/><category term='zsh'/><category term='design'/><category term='anime'/><category term='waterfall'/><category term='fun'/><category term='dublino'/><category term='jug-milano'/><category term='subversion'/><title type='text'>Andrea Francia's Blog</title><subtitle type='html'>Di tutto, serve più a me scriverlo che a te leggerlo.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>94</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7849871463455808212</id><published>2012-01-09T00:13:00.000+01:00</published><updated>2012-01-09T09:34:02.202+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arm'/><category scheme='http://www.blogger.com/atom/ns#' term='optware'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>Hacking di un Hard disk di rete</title><content type='html'>&lt;h2&gt;
Problema&lt;/h2&gt;
In questi giorni sono tornato a smanettare con il mio My Book World Edition.&lt;br /&gt;
Lo vendono come "Harddisk di rete", in realtà è un NAS (Network Attached 
Storage) cioè un computer con un grosso disco, una scheda di rete e tutto il 
software necessario per condividere il proprio disco con gli altri PC della 
LAN.  Questo NAS, come molti altri dispositivi con computer integrato, 
nasconde al suo interno un sistema operativo Linux  processore ARM.&lt;br /&gt;
La distribuzione Linux usata è una versione proprietaria e soprattutto 
minimale.  Mancano comandi quasi indispensabili come &lt;code&gt;screen&lt;/code&gt;, le utility di base sono 
limitate (ad esempio &lt;code&gt;rm&lt;/code&gt; non ha l'opzione &lt;code&gt;-v&lt;/code&gt;), manca il Vim e in 
generale non è possibile aggiungere nuovo software.&lt;br /&gt;
Per queste distribuzioni senza un proprio package manager e che girano su ARM 
il modo più semplice per installare software è quello di usare &lt;strong&gt;optware&lt;/strong&gt;.&lt;br /&gt;
In teoria dopo aver seguito le istruzioni di installazione esso dovrebbe permettere di installare i nuovi pacchetti con:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;ipkg install &amp;lt;nome-pachetto&amp;gt;&lt;/code&gt;&lt;/pre&gt;
Per installare optware basta seguire la guida su &lt;a href="http://mybookworld.wikidot.com/first-steps-with-mbwe" target="_blank"&gt;mybookworld.wikidot.com&lt;/a&gt;&amp;nbsp;dove è anche spiegato come accedere alla shell del NAS tramite SSH. 
Qui finisce la teoria e inizia la pratica perché a casa mia c'é&amp;nbsp;un problema che non mi permettere di sfruttare questo utile programma: il NAS non può accedere ad Internet! Di conseguenza&amp;nbsp;&lt;b&gt;ipkg&lt;/b&gt; non potrebbe 
scaricare nessun pacchetto! Infatti a casa non ho l'ADSL e l'unico modo che 
ho per accedere alla Rete è la chiavetta Internet :-(&lt;br /&gt;
Improbabili cablaggi e riconfigurazioni della tabella di routing sono fuori 
discussione. Si tratta di un problema soft, il mio portatile può accedere ad 
Internet e può accedere al NAS, quindi la soluzione deve essere soft.&lt;br /&gt;
&lt;h1&gt;
Soluzione&lt;/h1&gt;
La soluzione soft si basa sui web proxy e sui tunnel SSH e si compone di due 
passi:
 1. installo sul mio portatile un web proxy
 2. faccio in modo che ipkg usi il web proxy del portatile&lt;br /&gt;
Ho deciso di installare &lt;code&gt;polipo&lt;/code&gt;, un web proxy mono-thread che sembra più 
semplice del pidi &lt;code&gt;squid&lt;/code&gt;::&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;(portatile) $ brew install polipo
(portatile) $ polipo
Established listening socket on port 8123.
...
&lt;/code&gt;&lt;/pre&gt;
Ora il proxy si trova in ascolto sulla porta 8123 del mio portatile; con il 
port-forwarding di SSH posso fare in modo che sia accessibile anche dal mio NAS::&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;(portatile) $ ssh -R8123:localhost:8123 nas.local
&lt;/code&gt;&lt;/pre&gt;
Però non so come configurare ipkg in modo che usi il proxy giusto. Fa niente, 
lo posso scoprire con un avvio di prova::&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;(nas) ~ # ipkg install nano     
Installing nano (2.2.6-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable/nano_2.2.6-1_arm.ipk
Nothing to be done
An error ocurred, return value: 22.
Collected errors:
ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;-q -P /opt/ipkg-ZFXnou http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable/nano_2.2.6-1_arm.ipk'
Failed to download nano. Perhaps you need to run 'ipkg update'?
&lt;/code&gt;&lt;/pre&gt;
Dal messaggio di errore appare chiaro che &lt;b&gt;ipkg&lt;/b&gt; usi &lt;code&gt;&lt;b&gt;wget&lt;/b&gt;&lt;/code&gt; come backend per il download, quindi mi dovrebbe bastare configurare quello:: &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;(nas) ~ # cat &amp;gt;&amp;gt; ~/.wgetrc &amp;lt;&amp;lt; EOF
http_proxy = http://localhost:8123/
use_proxy = on
EOF
&lt;/code&gt;&lt;/pre&gt;
E in effetti funziona::&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;~ # ipkg install nano
Installing nano (2.2.6-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable/nano_2.2.6-1_arm.ipk
Configuring nano
Successfully terminated.&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7849871463455808212?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7849871463455808212/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7849871463455808212' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7849871463455808212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7849871463455808212'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2012/01/hacking-di-un-hard-disk-di-rete.html' title='Hacking di un Hard disk di rete'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-1825916540104487684</id><published>2011-11-09T20:27:00.003+01:00</published><updated>2011-11-09T20:28:04.411+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='zsh'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>Moving to ZSH</title><content type='html'>In those days I decided to adopt &lt;b&gt;Zsh&lt;/b&gt; as my working shell instead of Bash.
I don't know yet whether Zsh will be a better shell for my purposes but I decided to give it a try.&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/-W-8NJ8OlIOo/TrpJCZVV68I/AAAAAAAAEMA/VdOxpWBP-g8/s1600/zsh-main-manpage.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="136" src="http://3.bp.blogspot.com/-W-8NJ8OlIOo/TrpJCZVV68I/AAAAAAAAEMA/VdOxpWBP-g8/s200/zsh-main-manpage.png" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;
Up to now I found these interesting things:&lt;br /&gt;
&lt;b&gt;Better man pages:&lt;/b&gt;&lt;div&gt;
&lt;a href="http://2.bp.blogspot.com/-cLyAhYlkYF8/TrpJB_IxwmI/AAAAAAAAEL4/eDzIi_pSeo4/s1600/zsh-colorized-completion.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="136" src="http://2.bp.blogspot.com/-cLyAhYlkYF8/TrpJB_IxwmI/AAAAAAAAEL4/eDzIi_pSeo4/s200/zsh-colorized-completion.png" width="200" /&gt;&lt;/a&gt;Bash has a big single man page that explains every facet of the shell.&amp;nbsp;Zsh man pages are split out in a few pages, each one of a more&amp;nbsp;manageable&amp;nbsp;size.&amp;nbsp;The bash(1) man page uses a very prescriptive tone in describing the behaviour of the program, reading the bash man page is more like reading a technical specification than a user manual.&amp;nbsp;The zsh man pages are more geared towards the final user.&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://3.bp.blogspot.com/-BtDgMMz5Oqw/TrpJCgOQINI/AAAAAAAAEMI/JsCYYbOaT4k/s1600/zsh-right-prompt.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="136" src="http://3.bp.blogspot.com/-BtDgMMz5Oqw/TrpJCgOQINI/AAAAAAAAEMI/JsCYYbOaT4k/s200/zsh-right-prompt.png" width="200" /&gt;&lt;/a&gt;&lt;ul&gt;&lt;ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;b&gt;Support for colors even in completion suggestions&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
Command completion is the thing I always loved in Bash. Zsh goes one step further, it supports completion and even&amp;nbsp;colors in completion.&lt;br /&gt;&lt;ul&gt;&lt;ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;b&gt;More support for the prompt&amp;nbsp;customization&lt;/b&gt;&lt;br /&gt;Zsh provides out-of-the-box some features than in Bash can be only emulated, for example you can define also a right-side prompt that will be drawn along side the normal prompt on the left.&lt;br /&gt;&lt;ul&gt;&lt;ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;b&gt;Configuration wizard for new users&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;

&lt;/ul&gt;
New users can use the configuration wizard that will create the configuration file (.zshrc) according with their preferences.&lt;ul&gt;&lt;ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-1825916540104487684?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/1825916540104487684/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=1825916540104487684' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1825916540104487684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1825916540104487684'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2011/11/moving-to-zsh.html' title='Moving to ZSH'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-W-8NJ8OlIOo/TrpJCZVV68I/AAAAAAAAEMA/VdOxpWBP-g8/s72-c/zsh-main-manpage.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-446141451107121770</id><published>2011-10-04T23:00:00.000+02:00</published><updated>2011-10-04T23:00:03.775+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><title type='text'>svn-repair-move</title><content type='html'>Subversion does not detect moves as other version control system does. This could be a problem when you rename or move a file not using the appropriate subversion command.&lt;br /&gt;
For example, if you rename a file named "foo" to "bar" without using the Subversion command, it shows "foo" as "missing"and bar as "non-versioned":&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ svn status
?       bar
!       foo
&lt;/code&gt;&lt;/pre&gt;
While TortoiseSVN has it's own "Repair move..." &lt;a href="http://tortoisesvn.net/repairmoves.html"&gt;feature&lt;/a&gt;, from the command line perspective I had had to fix this&amp;nbsp;manually until I wrote a &lt;a href="https://github.com/andreafrancia/dot-files/blob/master/bin/svn-repair-move"&gt;simple script&lt;/a&gt; that handles this situation.&lt;br /&gt;
It works like that:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ svn-repair-move foo bar
$ svn status
D       foo
A  +    bar
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-446141451107121770?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/446141451107121770/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=446141451107121770' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/446141451107121770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/446141451107121770'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2011/10/svn-repair-move.html' title='svn-repair-move'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-5142572259434616522</id><published>2011-07-26T22:00:00.000+02:00</published><updated>2011-07-26T22:00:01.002+02:00</updated><title type='text'>Come aggiungere un custom task a setup.py</title><content type='html'>Per avere questo comportamento:&lt;br /&gt;
&lt;pre name="code" class="bash:nogutter:nocontrols"&gt; $ python setup.py foo
 running foo
 foo ... foo ... foo!
&lt;/pre&gt;Si fa così:&lt;br /&gt;
&lt;pre name="code" class="python:nogutter:nocontrols"&gt;from setuptools import setup, Command                                          
                                                                               
def main():                                                                    
    setup(                                                                     
        cmdclass={'foo':FooCommand}                                            
    )                                                                          
                                                                               
class FooCommand(Command):                                                                                                                                                    
    description="Does foo-ish things."                                         
    user_options=[]                                                            
    def initialize_options(self): pass                                         
    def finalize_options(self): pass                                           
    def run(self): print("foo ... foo ... foo!")                               
                                                                               
main()                                                                         
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-5142572259434616522?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/5142572259434616522/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=5142572259434616522' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5142572259434616522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5142572259434616522'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2011/07/come-aggiungere-un-custom-task-setuppy.html' title='Come aggiungere un custom task a setup.py'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3135797252917753323</id><published>2011-07-21T13:43:00.001+02:00</published><updated>2011-07-21T13:43:29.033+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='xpug'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Writing a Crawler with Python and TDD (slide disponibili)</title><content type='html'>Ieri ho partecipato al meeting XPUG di Milano dove ho presentato il mio ultimo lavoro.&lt;br /&gt;
Su&amp;nbsp;&lt;a href="http://www.slideshare.net/andreafrancia/writing-a-crawler-with-python-and-tdd"&gt;slideshare&lt;/a&gt;&amp;nbsp;trovate le diapositive che ho usato.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3135797252917753323?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3135797252917753323/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3135797252917753323' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3135797252917753323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3135797252917753323'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2011/07/writing-crawler-with-python-and-tdd.html' title='Writing a Crawler with Python and TDD (slide disponibili)'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7913437126578245465</id><published>2011-05-10T22:09:00.001+02:00</published><updated>2011-05-11T09:54:42.554+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mock'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Mock Object in Python</title><content type='html'>Uno dei problemi che ho quando sviluppo in Python e' che non ho ancora
trovato una libreria di mocking che mi soddisfi. Non che non ci sia scelta, ci
sono almeno tre librerie, peccato che ognuna abbia qualcosa che non mi va.
Ieri, mentre stavo scrivendo dei test per trash-cli, ho scritto una classe
&lt;cite&gt;Mock&lt;/cite&gt; ex-novo adatta alle mie esigenze. L'esempio di utilizzo e' il
seguente: &lt;br /&gt;
&lt;pre class="python:nogutter:nocontrols" name="code"&gt;from double import Double

fs=Double('fs')
fs.on_method('volume_of').will_reply('/')
fs.on_method('exists').with_args('/.Trash').will_reply(True)
fs.on_method('has_sticky_bit').with_args('/.Trash').will_reply(True)
&lt;/pre&gt;
La classe è questa:&lt;br /&gt;
&lt;pre class="python:nogutter:nocontrols" name="code"&gt;class Double:
    def __init__(self, name):
        self.name = name
        self.expectations = {}
        self.expectations_with_args = {}
    def __getattr__(self, name):
        if name in self.expectations:
            def fake_method(*args, **kwargs):
                return self.expectations[name]
            return fake_method
        else:
            def fake_method(*args, **kwargs):
                if (name, args) in self.expectations_with_args.keys():
                    return self.expectations_with_args[(name,args)]
                self._report_unexpected_call(name, *args, **kwargs)
            return fake_method
    def __call__(self, *args, **kwargs):
        self._report_unexpected_call(self.name, args, kwargs)
    def on_method(self,name):
        class Expectation:
            def will_reply(_, return_value):
                self.expectations[name] = return_value
            def with_args(_,*args):
                class Expectation2:
                    def will_reply(_, return_value):
                        self.expectations_with_args[(name,args)] = return_value
                return Expectation2()
        return Expectation()
    def _report_unexpected_call(self, method_name, *args, **kwargs):
        assert False, ("Unexpected call: %s(%s,%s)" % ( method_name,
                     ','.join(repr(arg) for arg in args),
                     ','.join('%s=%s' %(key,value) for key, value in
                         kwargs))
                     + "Calls expected:%s and %s " %
                     (self.expectations,
                         self.expectations_with_args))
&lt;/pre&gt;
Si tratta di una soluzione quick and dirty, molto dirty. Nonostante sia dirty
ha un suo valore. Scrivendola ho imparato che scrivere una classe di Mock non
richiede molto tempo e ora so che potrebbe volerci meno
tempo a scrivere un Mock in Python rispetto a trovare la libreria di mocking
giusta tra quelle disponibili in rete.&lt;br /&gt;
Credo che questo dipenda essenzialmente dal fatto che Python e' un linguaggio
dinamico e che di conseguenza offre costrutti molto piu' semplici per fare
metaprogramming rispetto ad altri linguaggi con tipizzazione piu' statica.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7913437126578245465?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7913437126578245465/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7913437126578245465' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7913437126578245465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7913437126578245465'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2011/05/mock-object-in-python.html' title='Mock Object in Python'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-2317941527818313654</id><published>2010-09-04T15:14:00.000+02:00</published><updated>2010-09-04T15:14:09.013+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='tdd'/><category scheme='http://www.blogger.com/atom/ns#' term='english'/><title type='text'>Submit an HTML form using POST method via Java</title><content type='html'>In the recent days I'm studying how to implement HTTP/REST architecture in Java.&lt;br /&gt;
I decided to work without any REST framework, so nothing like &lt;a href="https://jersey.dev.java.net/"&gt;Jersey&lt;/a&gt; or &lt;a href="http://www.restlet.org/"&gt;restlet&lt;/a&gt;.&amp;nbsp;Instead I decided to exploit the good old Servlet API which seems to use an faithful model on how the HTTP works.&lt;br /&gt;
&lt;br /&gt;
And also I decided to starts from study how to design Web applications in a way that&amp;nbsp;uses correctly the HTTP protocol.&lt;br /&gt;
&lt;br /&gt;
During my study I didn't find a HTTP client which fit my requirements so I'm writing some client functionalities from scratch. This is the way I implemented the posting of a form with only one parameter:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;private static InputStream postForm(final String url,
     final String paramName,
     final String paramValue) throws IOException
    {
 return new Object() {

     public InputStream postForm() throws IOException {
  prepareConnectionToServer();
  packageFormValuesInAMessage();
  submitTheMessage();
  return theServerReply();
     }

     private void prepareConnectionToServer() throws IOException {
  connection = new URL(url).openConnection();
  connection.setDoInput(true);
  connection.setDoOutput(true);
  connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
     }

     private URLConnection connection;

     private void packageFormValuesInAMessage() throws UnsupportedEncodingException {
  message = String.format("%s=%s", paramName, URLEncoder.encode(paramValue, "UTF-8"));
     }

     private String message;

     private void submitTheMessage() throws IOException {
  OutputStream output = connection.getOutputStream();
  output.write(message.getBytes("UTF-8"));
  output.close();
     }

     private InputStream theServerReply() throws IOException {
  return connection.getInputStream();
     }

 }.postForm();
    }
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-2317941527818313654?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/2317941527818313654/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=2317941527818313654' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2317941527818313654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2317941527818313654'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/09/submit-html-form-using-post-method-via.html' title='Submit an HTML form using POST method via Java'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-2139404761671492261</id><published>2010-08-25T19:53:00.000+02:00</published><updated>2010-08-25T19:53:16.671+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='waterfall'/><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='software development'/><title type='text'>Povero modello a cascata</title><content type='html'>&lt;a href="http://www.cartoonstock.com/newscartoons/cartoonists/bgr/lowres/bgrn848l.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://www.cartoonstock.com/newscartoons/cartoonists/bgr/lowres/bgrn848l.jpg" width="256" /&gt;&lt;/a&gt;Tutti se la prendono con il modello di sviluppo software a cascata.&lt;br /&gt;
&lt;br /&gt;
Da un certo punto di vista fanno bene perché è una soluzione che ha diversi difetti, come ad esempio il fatto che non consente di utilizzare la esperienza e la conoscenze acquisite nel corso del progetto.&lt;br /&gt;
&lt;br /&gt;
Però, nonostante questo, &amp;nbsp;ci sono dei pregi che gli vanno riconosciuti. Non tanto perché lui si offenda (è un modello non può offendersi!) ma il rischio è sempre quello di gettare via il bambino con l'acqua sporca.&lt;br /&gt;
&lt;br /&gt;
Sono stato quindi contento di leggere questo &lt;a href="http://www.scrum-breakfast.com/2010/07/in-praise-of-waterfall.html"&gt;post&lt;/a&gt;&amp;nbsp;dove Peter Stevens ne sottolinea i principi (cito letteralmente):&lt;br /&gt;
&lt;blockquote&gt;Waterfall says:&lt;br /&gt;
1. Figure out the business requirements first&lt;br /&gt;
2. Don't change your requirements while you are implementing&lt;br /&gt;
3. Test your code to ensure that it works&lt;/blockquote&gt;&lt;div&gt;Se ci pensate bene sono gli stessi principi (che dovrebbero essere) applicati quando si usa Scrum, &amp;nbsp;XP, o TDD, l'unica (grande) differenza è la scala temporale.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-2139404761671492261?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/2139404761671492261/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=2139404761671492261' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2139404761671492261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2139404761671492261'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/08/povero-modello-cascata.html' title='Povero modello a cascata'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7922976318468561174</id><published>2010-07-03T15:28:00.002+02:00</published><updated>2010-07-03T15:28:53.323+02:00</updated><title type='text'>Il Mac OS X</title><content type='html'>Il Mac OS X è unico ed avvicente.&lt;br /&gt;
&lt;br /&gt;
Unisce in modo unico i difetti di Windows a con quelli di Linux e, non contento, aggiunge qualcosa di speciale che fa solo lui. Il magico effetto mac!&lt;br /&gt;
&lt;br /&gt;
Risultato? Non c'e' il taglia e incolla dei file. Non puoi fare copia path della cartella che stai visualizzando. Il cestino non si ricorda la data di cancellazione e la posizione originale. Non c'e' un sistema a pacchetti unico. È possibile avere tre diverse versioni di Ruby (o Python) e non saperlo (macruby, ruby su macports, ruby su fink).&lt;br /&gt;
&lt;br /&gt;
Il mac aiuta ad esercitare la mente. Su linux è quasi banale usare 'ls --color', 'ls --sort=time'. Gli utenti mac hanno più memoria ed usano 'ls -G' e 'ls -t'. Sapete come risponde il mac alla frase 'ls --help'? Così:&lt;br /&gt;
&lt;br /&gt;
[andreafrancia@deneb ~]$ ls --help&lt;br /&gt;
/bin/ls: illegal option -- -&lt;br /&gt;
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]&lt;br /&gt;
&lt;br /&gt;
Sono proprio belle le utility BSD!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7922976318468561174?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7922976318468561174/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7922976318468561174' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7922976318468561174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7922976318468561174'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/07/il-mac-os-x.html' title='Il Mac OS X'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7728952938365226322</id><published>2010-06-19T10:27:00.001+02:00</published><updated>2010-06-19T10:31:05.872+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='#codingdojo'/><title type='text'>Gabriele Lana sui Code Kata al #codingdojo</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://4.bp.blogspot.com/_bikdOOm3kpc/TByAN5b6GkI/AAAAAAAAEGI/4ptPugnc_fU/s1600/Photo+on+2010-06-19+at+10.29.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="150" src="http://4.bp.blogspot.com/_bikdOOm3kpc/TByAN5b6GkI/AAAAAAAAEGI/4ptPugnc_fU/s200/Photo+on+2010-06-19+at+10.29.jpg" width="200" /&gt;&lt;/a&gt;Il quick &amp;amp; dirty è "quick" perché è "dirty"?&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Secondo Gabriele Il "quick" é quick perché siamo abituato a farlo.&lt;/div&gt;Da dove viene il talento? Viene dalla genetica o dall'ambiente?&amp;nbsp;Cos'è la pratica profonda?&lt;br /&gt;
Cosa sono i code kata?&lt;br /&gt;
&lt;br /&gt;
Gabriele illustra come si è scoperto che la pratica profonda sia il vero e unico fattore comune tra le persone riconosciute di talento e spiega come applicare questa "scoperta" alla nostre performance nello sviluppo software.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7728952938365226322?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7728952938365226322/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7728952938365226322' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7728952938365226322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7728952938365226322'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/06/gabriele-lana-sui-code-kata-al.html' title='Gabriele Lana sui Code Kata al #codingdojo'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_bikdOOm3kpc/TByAN5b6GkI/AAAAAAAAEGI/4ptPugnc_fU/s72-c/Photo+on+2010-06-19+at+10.29.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-2429918918839451530</id><published>2010-06-11T23:26:00.000+02:00</published><updated>2010-06-11T23:26:14.456+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='integration-test'/><category scheme='http://www.blogger.com/atom/ns#' term='automatic-test'/><category scheme='http://www.blogger.com/atom/ns#' term='test'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Writing automatic tests using bash</title><content type='html'>This may be not well know but the bash shell could also be used to write automatic test. These tests could be also used with Hudson which recognizes if they are failed or not.&lt;br /&gt;
&lt;br /&gt;
This is a little integration test for a legacy application:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="literal-block" style="margin-left: 2em; margin-right: 2em;"&gt;set -o errexit     # this tell bash to stop on any error
set -o xtrace      # this tell bash to print any command before execution

# setup the database
mysql -u root test-database &amp;lt;&amp;lt; EOF
    DELETE FROM orders_to_be_exported;
    INSERT INTO orders_to_be_exported(id) VALUES('1235');
    DELETE FROM order;
    INSERT INTO order(customer_name, amount) VALUES('andrea', '1234');
EOF

# clean up filesystem
rm /tmp/orders/exported-*.order -f

# start up the application
mvn jetty:run

curl -X POST http://localhost:8080/application/export-orders

test -f /tmp/exported-1235.order  # this check if the file exists

# the following checks the contents of the file
diff /tmp/exported-1235.order - &amp;lt;&amp;lt; EOF
Customer: Andrea
Amount: 1234 eur
EOF&lt;/pre&gt;&lt;br /&gt;
Whenever this script fail in any of its operation it stops with an non zero exit code. This is because the&amp;nbsp;&lt;tt class="docutils literal"&gt;set&amp;nbsp;&lt;span class="pre" style="white-space: pre;"&gt;-o&lt;/span&gt;&amp;nbsp;errexit&lt;/tt&gt;&amp;nbsp;instruction. As you may known a non zero exit status often means that an error has been occured. Also Hudson knows this and when this happen it marks the build as broken.&lt;br /&gt;
The&amp;nbsp;&lt;tt class="docutils literal"&gt;set&amp;nbsp;&lt;span class="pre" style="white-space: pre;"&gt;-o&lt;/span&gt;&amp;nbsp;xtrace&lt;/tt&gt;&amp;nbsp;instructions tell to bash to write each command before executing it.&lt;br /&gt;
&lt;dl class="docutils"&gt;&lt;dt&gt;This script demonstrate clearly how powerfull could be the shell, you can&lt;/dt&gt;
&lt;dd style="margin-bottom: 0.5em;"&gt;&lt;ul class="first last simple" style="margin-bottom: 1em; margin-top: 0px !important;"&gt;&lt;li&gt;invoke ReST web services (with&amp;nbsp;&lt;tt class="docutils literal"&gt;curl&lt;/tt&gt;)&lt;/li&gt;
&lt;li&gt;inspect the contents of a file (with&amp;nbsp;&lt;tt class="docutils literal"&gt;diff&lt;/tt&gt;)&lt;/li&gt;
&lt;li&gt;test for the existence of a file (with&amp;nbsp;&lt;tt class="docutils literal"&gt;test&amp;nbsp;&lt;span class="pre" style="white-space: pre;"&gt;-f&lt;/span&gt;&lt;/tt&gt;), a directory (&lt;tt class="docutils literal"&gt;test&amp;nbsp;&lt;span class="pre" style="white-space: pre;"&gt;-d&lt;/span&gt;&lt;/tt&gt;), and many others facts about your filesystem&lt;/li&gt;
&lt;li&gt;interact with the database&lt;/li&gt;
&lt;/ul&gt;&lt;/dd&gt;&lt;/dl&gt;As you know these kind of test (integration tests) are slow and when they fails is difficult to know which component is broken. Nevertheless they are a essential to know if yours unit are playing well together.&lt;br /&gt;
They may be also useful when you work with legacy code. You may want to put some part of the system under unit test but can't do that before of many refactoring. You could create an integration test, refactor the code toward a better modularity and then place the unit test and, maybe, delete the integration test.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-2429918918839451530?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/2429918918839451530/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=2429918918839451530' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2429918918839451530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2429918918839451530'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/06/writing-automatic-tests-using-bash.html' title='Writing automatic tests using bash'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8763033445869827945</id><published>2010-04-29T21:20:00.001+02:00</published><updated>2010-04-29T21:20:23.865+02:00</updated><title type='text'>How to download from jars from mavencentral with Ant without Ivy</title><content type='html'>&lt;div&gt;For my Ant projects I want download the dependencies from the maven repository without converting it to maven.&lt;/div&gt; I solved putting this &amp;quot;build.xml&amp;quot; in the &amp;quot;lib&amp;quot; directory:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;project name=&amp;quot;lib&amp;quot; default=&amp;quot;download-libs&amp;quot; 
         xmlns:artifact=&amp;quot;urn:maven-artifact-ant&amp;quot;&amp;gt;

  &amp;lt;property name=&amp;quot;maven.ant.tasks.jar&amp;quot; value=&amp;quot;maven-ant-tasks-2.1.0.jar&amp;quot; /&amp;gt;

  &amp;lt;target name=&amp;quot;download-libs&amp;quot; depends=&amp;quot;-init-maven-task&amp;quot;&amp;gt;
    &amp;lt;artifact:dependencies pathId=&amp;quot;dependencies.classpath&amp;quot;&amp;gt;
      &amp;lt;dependency groupId=&amp;quot;org.codehaus.groovy&amp;quot; 
                      artifactId=&amp;quot;groovy&amp;quot; version=&amp;quot;1.7.2&amp;quot; /&amp;gt; 
      &amp;lt;dependency groupId=&amp;quot;org.ccil.cowan.tagsoup&amp;quot; 
                      artifactId=&amp;quot;tagsoup&amp;quot; version=&amp;quot;1.2&amp;quot; /&amp;gt;

      &amp;lt;remoteRepository id=&amp;quot;maven-central&amp;quot; 
                      url=&amp;quot;http://repo1.maven.org/maven2/&amp;quot; /&amp;gt;
    &amp;lt;/artifact:dependencies&amp;gt;

    &amp;lt;move todir=&amp;quot;.&amp;quot;&amp;gt;
      &amp;lt;path refid=&amp;quot;dependencies.classpath&amp;quot;/&amp;gt;
    &amp;lt;/move&amp;gt;
  &amp;lt;/target&amp;gt;

  &amp;lt;target name=&amp;quot;-init-maven-task&amp;quot; depends=&amp;quot;-obtain-maven-task-jar&amp;quot;&amp;gt;
    &amp;lt;available property=&amp;quot;maven.ant.tasks.jar.exists&amp;quot; 
               file=&amp;quot;${maven.ant.tasks.jar}&amp;quot; /&amp;gt;
    &amp;lt;typedef resource=&amp;quot;org/apache/maven/artifact/ant/antlib.xml&amp;quot; 
             uri=&amp;quot;urn:maven-artifact-ant&amp;quot; classpath=&amp;quot;${maven.ant.tasks.jar}&amp;quot; /&amp;gt; 
  &amp;lt;/target&amp;gt;

  &amp;lt;target name=&amp;quot;-obtain-maven-task-jar&amp;quot;&amp;gt;
    &amp;lt;available property=&amp;quot;maven.ant.tasks.jar.exists&amp;quot; 
               file=&amp;quot;${maven.ant.tasks.jar}&amp;quot; /&amp;gt;
    &amp;lt;antcall target=&amp;quot;download-maven-jar&amp;quot;/&amp;gt;
  &amp;lt;/target&amp;gt;

  &amp;lt;target name=&amp;quot;download-maven-jar&amp;quot; unless=&amp;quot;maven.ant.tasks.jar.exists&amp;quot;&amp;gt;
    &amp;lt;property name=&amp;quot;maven.ant.tasks.url&amp;quot; 
              value=&amp;quot;http://www.apache.org/dist/maven/binaries/${maven.ant.tasks.jar}&amp;quot; /&amp;gt;
    &amp;lt;get src=&amp;quot;${maven.ant.tasks.url}&amp;quot; dest=&amp;quot;${maven.ant.tasks.jar}&amp;quot; /&amp;gt;
  &amp;lt;/target&amp;gt;

&amp;lt;/project&amp;gt;
&lt;/pre&gt;&lt;br&gt;&lt;div&gt;To download libs just type:&lt;/div&gt;&lt;div&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;$ cd lib&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;$ ant&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="&amp;#39;courier new&amp;#39;"&gt;...&lt;/font&gt;&lt;/div&gt;&lt;br&gt;and all dependencies will be downloaded.&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8763033445869827945?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8763033445869827945/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8763033445869827945' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8763033445869827945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8763033445869827945'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/04/how-to-download-from-jars-from.html' title='How to download from jars from mavencentral with Ant without Ivy'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3170503710866449090</id><published>2010-04-15T01:32:00.004+02:00</published><updated>2010-04-15T01:50:04.463+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xunit'/><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='speaker'/><title type='text'>Presentazione su Google C++ Testing Framework e Visual Studio 2008 all'XPUG di Milano</title><content type='html'>Sono appena tornato dal meeting XPUG di Milano dove ho presentato come usare &lt;a href="http://code.google.com/p/googletest/"&gt;Google Test&lt;/a&gt; in Visual Studio 2008.

Le slides usate sono già disponibile su &lt;a href="http://www.slideshare.net/andreafrancia/google-c-testing-framework-in-visual-studio-2008"&gt;slideshare&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3170503710866449090?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3170503710866449090/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3170503710866449090' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3170503710866449090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3170503710866449090'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/04/presentazione-su-google-c-testing.html' title='Presentazione su Google C++ Testing Framework e Visual Studio 2008 all&apos;XPUG di Milano'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-908135037156079269</id><published>2010-04-01T20:56:00.001+02:00</published><updated>2010-04-01T20:56:24.040+02:00</updated><title type='text'>Tutorial Google Test</title><content type='html'>&lt;div&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Google Test è un framework di test per C++. In questa miniguida spi&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;ego come &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;usarlo in Visual Studio&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; 2008&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; Per seguire la guida non avete bisogno di conoscere Visual Studio 2008, dovete però avere un idea di cosa sia un framework xUnit, e dovete conoscere C o C++.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style="margin:12pt 0pt 3pt"&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt;Scaricare e installare Google Test&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Scarichiamo dal sito ufficiale l&amp;#39;ultima release, ad oggi il file &lt;/font&gt;&lt;/span&gt;&lt;a href="http://googletest.googlecode.com/files/gtest-1.4.0.zip"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;u&gt;&lt;font size="3"&gt;gtest-1.4.0.zip&lt;/font&gt;&lt;/u&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;e lo decompriamo&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;, per esempio&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; in c:\gtest-1.4.0.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Google Test &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;supporta diversi compilatori tra cui &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;fortunatamene &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Visual Studio&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; 2008. &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;I progetti di Visual&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; Studio si chiamano “Soluzioni”, d&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;entro la cartella &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;C:\gtest-1.4.0\msvc&lt;/font&gt;&lt;/span&gt; &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;ci sono due soluzioni&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:Symbol"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;/span&gt;       &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;gtest.sln&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; (da usare se volete linkare staticamente la libreria gtest&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;,&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;come .LIB&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:Symbol"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;/span&gt;       &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;gtest-md.sln&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; (da usare se volete linkare dinamicamente la libreria&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;, come DLL&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;).&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Potete scegliere di usare sia uno che l’altro, io per &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;semplicità io scelgo di usare la libreria statica&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Prima di aprire la soluzione togliete &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;però l’eventuale &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;flag &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;“&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;read only&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;”&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; da tutti i file dentro msvc. &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Se non lo fate ve ne pentirete &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:Wingdings"&gt;&lt;font size="3"&gt;J&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;. Quando &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;gtest.sln&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; con Visual Studio&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; 2008 &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;vi chiederà di aggiornare la soluzione al nuovo formato, ditegli di sì con il solito Avanti, Avanti, Avanti. Se non avete tolto il readonly il Visual Studio si lamenterà.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Una volta apete provvede alla build di tutta la soluzione con F7 (Build &amp;gt; Build Solution).&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Se tutto va bene dovrebbe crearvi i file &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;gtest_maind.lib&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; e &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;gtestd.lib&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; in &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;C:\gtest-1.4.0\msvc\gtest\Debug&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style="margin:12pt 0pt 3pt"&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt;Il primo progetto Visual Studio&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Se siete pratici di Visual Studio saltate pure al prossimo paragrafo. Se come me non siete pratici seguitelo.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Creiamo&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; il primo progetto di test&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;,  da&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Visual Studio scegliamo:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;i&gt;&lt;font size="3"&gt;File &amp;gt; New &amp;gt; New Project &lt;/font&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;e &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;scegliamo &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;“&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Win32 Console Application&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;”.&lt;/font&gt;&lt;/span&gt; &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Diamo al progetto un nome qualsiasi, &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;io ho usato &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;&amp;quot;LearningGoogleTest&amp;quot;.&lt;/font&gt;&lt;/span&gt; &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Se il wizard ve lo chiede, sappiate che le &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;&amp;quot;Precompiled Header&amp;quot; non &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;vi &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;servono.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Il risultato dovrebbe essere simile a questo:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 13.5pt"&gt;&lt;img src="http://docs.google.com/File?id=dcwhf6k8_909gz4vcdt_b" width="249" height="217" alt="" style="border:none"&gt;&lt;/img&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;I &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;file stdafx.h, stdafx.cpp, targetver.h &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;sono &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;creati &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;gratuitamente &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;dal Visual Studio &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;e per i miei scopi non &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;valgono lo spazio che occupano&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;, quindi io li cancello.&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Dato che non sono pratico di Visual Studio prima &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;di procedere oltre &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;provo con un Hello World&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; main(&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; argc, &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;char&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; * argv[]) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;    printf(&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;quot;Hello world!\n&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; 0;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 0pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;br&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Con &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;CTRL+F5 (Debug &amp;gt; Start Without Debugging) &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;possiamo ammirare la nostra creazione:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt; text-align:center"&gt;&lt;img src="http://docs.google.com/File?id=dcwhf6k8_91g7b3v8hd_b" width="373" height="127" alt="" style="border:none"&gt;&lt;/img&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Notate quanto sia gentile Visual Studio&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; 2008&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; a chiedervi di schiaccciare un tast&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;o prima di chiudere la finestra, Visual Studio 6.0 non era così simpatico.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style="margin:12pt 0pt 3pt"&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt;Aggiungiamo la libreria&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt; Google Test &lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt;al &lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt;nostro progetto&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Le librerie C/C++ sono una scocciatura perché per poterle usare devi sistemare due cose:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:Symbol"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;/span&gt;       &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;i path dei file header (.h)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:Symbol"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;/span&gt;       &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;i path dei file di libreria (.dll o .lib)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Io preferisco affrontare questi problemi uno alla volta.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style="margin:12pt 0pt 3pt"&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt;Sistemare i path degli headers&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Includiamo&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; l&amp;#39;header di gtest&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; in &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;“&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;LearningGoogleTest.cpp”&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;table cellspacing="0" cellpadding="0" style=" margin-left:0pt" class="zeroBorder"&gt;&lt;tr&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; main(&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; argc, &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;char&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; * argv[]) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;    printf(&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;quot;Hello world!\n&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; 0;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="background-color:#ffff00; color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="background-color:#ffff00; color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;gtest/gtest.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; main(&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; argc, &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;char&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; * argv[]) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;    printf(&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;quot;Hello world!\n&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;    &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; 0;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Compiliamo (F7) &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;e notiamo&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; l’errore:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;learninggoogletest.cpp(4) : warning C4627: &amp;#39;#include &amp;lt;gtest/gtest.h&amp;gt;&amp;#39;: skipped when looking for precompiled header use&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Risolviamo aggiungendo &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;in&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;i&gt;&lt;font size="3"&gt;Project Settings &amp;gt; Configuration Properties &amp;gt; C/C++ &amp;gt; Additional Include Directories&lt;/font&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;il path (completo) di &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;gtest-1.4.0\include&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Tentiamo di nuovo ed ora abbiamo un errore durante la fase di linking:&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#000000; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="4"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;img src="http://docs.google.com/File?id=dcwhf6k8_92hnhkstrk_b" width="554" height="181" alt="" style="border:none"&gt;&lt;/img&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Risolviamo &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;aggiungendo &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;in &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;i&gt;&lt;font size="3"&gt;Project Settings &amp;gt; Configuration Properties &amp;gt; Linker &amp;gt; Input &amp;gt; Additional Dependencies &lt;/font&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;i &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;path di queste due librerie&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:Symbol"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;/span&gt;       &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;&amp;quot;c:\gtest-1.4.0\msvc\gtest\Debug\gtest_maind.lib&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:Symbol"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;/span&gt;       &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;&amp;quot;c:\gtest-1.4.0\msvc\gtest\Debug\gtestd.lib&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Mi raccomando di usare i doppi apici (&amp;quot;) se ci sono spazi &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;nei path!&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;In teoria farlo ora dovrebbe funzionare &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;ma in pratica no! Se anche voi avete errori del genere:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;img src="http://docs.google.com/File?id=dcwhf6k8_93hrv59n4v_b" width="482" height="109" alt="" style="border:none"&gt;&lt;/img&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;allora vuol dire che lo switch &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;Runtime Library&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; usato per il progetto gtest.sln e quello del vostro progetto non coincidono.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Per risolvere andate in&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#000000; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="4"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="color:#000000; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;i&gt;&lt;font size="4"&gt;Project Settings &amp;gt; Configuration Properties &amp;gt; C/C++ &amp;gt; Code Generation &amp;gt; Runtime Library&lt;/font&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style="color:#000000; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;i&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;E assicuratevi che ci sia&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Multi-threaded Debug (/MTd)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;A questo punto la build dovrebbe andare a buon fine.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style="margin:12pt 0pt 3pt"&gt;&lt;span style="font-family:Arial"&gt;&lt;b&gt;&lt;i&gt;&lt;font size="4"&gt;Eseguire i test&lt;/font&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;A questo punto dovremmo avere a disposizione tutto l’occorrente per scrivere, compilare ed eseguire i test.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Riprendiamo il file &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; e togliamo la funzione main()&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;table cellspacing="0" cellpadding="0" style=" margin-left:0pt" class="zeroBorder"&gt;&lt;tr&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;gtest/gtest.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;TEST(foo,bar) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;FAIL();&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt; main(&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;int&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt; argc, &lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;char&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt; * argv[]) {&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;    printf(&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;&amp;quot;Hello world!\n&amp;quot;&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;    &lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;return&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt; 0;&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;strike&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;gtest/gtest.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;TEST(foo,bar) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;FAIL();&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="color:#000000; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;In questo modo il linker andrà a prendere la &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;main()&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; da &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="3"&gt;gtest_maind.lib&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; la quale &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;fa &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;esattamente quello che ci serve:&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; e&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;s&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;egue &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;tutti i test.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Premendo CTRL+F5 il programma si avvia e vengono eseguiti tutti i test. Il risultato dovrebbe essere questo:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;img src="http://docs.google.com/File?id=dcwhf6k8_94fxgv46f2_b" width="525" height="271" alt="" style="border:none"&gt;&lt;/img&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Abbiamo &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;un solo test e questo non passa ... per forza 0 non è uguale a 1!&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Facciamo passare il test:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;table cellspacing="0" cellpadding="0" style=" margin-left:0pt" class="zeroBorder"&gt;&lt;tr&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;gtest/gtest.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;TEST(foo,bar) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;ASSERT_EQ(&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color:#ffff00; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;b&gt;&lt;font size="2"&gt;0&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;,1);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;gtest/gtest.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;TEST(foo,bar) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;ASSERT_EQ(1,1);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;E con CTRL+F5 otteniamo la prima barra verde&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;img src="http://docs.google.com/File?id=dcwhf6k8_95fzrvndcz_b" width="477" height="211" alt="" style="border:none"&gt;&lt;/img&gt;&lt;/p&gt;&lt;h1 style="margin:5pt 0pt"&gt;&lt;span style="color:#000000; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;b&gt;&lt;font size="5"&gt;Integrazione in Visual C++&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;I messaggi di &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;FAIL &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;di gtest sono Visual Studio friendly.&lt;/font&gt;&lt;/span&gt; &lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Ora vediamo come sfruttare quest&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;a feature&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="color:#000000; font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="4"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Con il Post-Build Event diciamo Visual Studio di &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;avviare i test dopo ogni build.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;P&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;er farlo &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;impostiamo &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;in&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt 36pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;i&gt;&lt;font size="3"&gt;Project Settings &amp;gt; Configuration Properties &amp;gt; Build Events &amp;gt; Post-Build Event &amp;gt; Command Line&lt;/font&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;il valore:&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;quot;$(TargetDir)\$(TargetName).exe&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Ora, se avviamo la build (F7) dovrebbe ritrovarci i risultati dei test nella finestra &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;O&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;utput.&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; Ma non è finita qui. Simuliamo un fallimento nel nostro test:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;table cellspacing="0" cellpadding="0" style=" margin-left:0pt" class="zeroBorder"&gt;&lt;tr&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;gtest/gtest.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;TEST(foo,bar) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;ASSERT_EQ(&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color:#ffff00; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;b&gt;&lt;font size="2"&gt;1&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;,1);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=" vertical-align:top; width:221.4pt"&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;// LearningGoogleTest.cpp&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#008000; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#0000ff; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;#include&lt;/font&gt;&lt;/span&gt; &lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;&amp;lt;gtest/gtest.h&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="color:#a31515; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;TEST(foo,bar) {&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;              &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;ASSERT_EQ(&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color:#ffff00; font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;b&gt;&lt;font size="2"&gt;0&lt;/font&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;,1);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt"&gt;&lt;span style="font-family:&amp;#39;Courier New&amp;#39;"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Avviamo la build (F7) e otteniamo qualcosa del tipo:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;img src="http://docs.google.com/File?id=dcwhf6k8_96qtvrxvfn_b" width="576" height="214" alt="" style="border:none"&gt;&lt;/img&gt;&lt;/p&gt;&lt;p style="margin:0pt 0pt 12pt"&gt;&lt;span style="font-family:&amp;#39;Times New Roman&amp;#39;"&gt;&lt;font size="3"&gt;Cliccando sul messaggio di errore il Visual Studio ci porta alla linea che l’ha provocato.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-908135037156079269?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/908135037156079269/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=908135037156079269' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/908135037156079269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/908135037156079269'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/04/tutorial-google-test_01.html' title='Tutorial Google Test'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-1783358012131101823</id><published>2010-03-06T18:05:00.003+01:00</published><updated>2010-03-06T18:07:57.946+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='rsync'/><category scheme='http://www.blogger.com/atom/ns#' term='english'/><title type='text'>Understanding the output of rsync --itemize-changes</title><content type='html'>&lt;p&gt;As you may know the rsync's &lt;code&gt;--delete&lt;/code&gt; options if misused could make 
severe damage.&lt;/p&gt;

&lt;p&gt;To prevent this you can use the &lt;code&gt;--itemize-change&lt;/code&gt; and the 
&lt;code&gt;--dry-run&lt;/code&gt; options to figure out how the command will behave before 
launching the real one.&lt;/p&gt;

&lt;p&gt;The output will be something like that:
&lt;pre&gt;
.d..t..g... ./
.f...p.g... Something.pdf
.f.....g... md5sum-2010-02-21.txt
.f...p.g... prova.rb
.d.....g... .metadata/
.f...p.g... .metadata/.lock
.f...p.g... .metadata/.log
.f...p.g... .metadata/version.ini
&gt;f+++++++++ Parameter_Usage.txt
&lt;/pre&gt;

Where the first field of each line tell what rsync would do to each file.&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;
I wrote this little schema that helped me to understand this output format and 
I'm publishing hoping it will be useful for others.

&lt;pre&gt;
YXcstpoguax  path/to/file
|||||||||||
`----------- the type of update being done::
 ||||||||||   &lt;: file is being transferred to the remote host (sent).
 ||||||||||   &gt;: file is being transferred to the local host (received).
 ||||||||||   c: local change/creation for the item, such as:
 ||||||||||      - the creation of a directory
 ||||||||||      - the changing of a symlink,
 ||||||||||      - etc.
 ||||||||||   h: the item is a hard link to another item (requires --hard-links).
 ||||||||||   .: the item is not being updated (though it might have attributes that are being modified).
 ||||||||||   *: means that the rest of the itemized-output area contains a message (e.g. "deleting").
 ||||||||||
 `---------- the file type:
  |||||||||   f for a file,
  |||||||||   d for a directory,
  |||||||||   L for a symlink,
  |||||||||   D for a device,
  |||||||||   S for a special file (e.g. named sockets and fifos).
  |||||||||
  `--------- c: different checksum (for regular files)
   ||||||||     changed value (for symlink, device, and special file)
   `-------- s: Size is different
    `------- t: Modification time is different
     `------ p: Permission are different
      `----- o: Owner is different
       `---- g: Group is different
        `--- u: The u slot is reserved for future use.
         `-- a: The ACL information changed
&lt;/pre&gt;

This schema is based on the contents of the 
&lt;a href="http://www.samba.org/ftp/rsync/rsync.html"&gt;rsync manual&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-1783358012131101823?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/1783358012131101823/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=1783358012131101823' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1783358012131101823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1783358012131101823'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/03/as-you-may-know-rsyncs-delete-options.html' title='Understanding the output of rsync --itemize-changes'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3839259215413003173</id><published>2010-02-27T21:25:00.007+01:00</published><updated>2010-02-28T11:58:35.084+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='speaker'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Presentazione sul Single Responsibility Principle</title><content type='html'>&lt;p&gt;Oggi sono stato in svizzera all'&lt;a href="http://barcamp.org/AgileCamp"&gt;AgileCamp&lt;/a&gt; ospitato da &lt;a href="http://www.sketchin.ch/"&gt;sketchin&lt;/a&gt;. Ho trovato tutti gli interventi interessanti, e ... ho presentato anch'io!&lt;/p&gt;

&lt;p&gt;L'argomento che ho trattato è il "Single Responsibility Principle", la S di &lt;a href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod"&gt;SOLID&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Le slide sono già su &lt;a href="http://www.slideshare.net/andreafrancia/single-responsibility-principle/"&gt;slideshare&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3839259215413003173?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3839259215413003173/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3839259215413003173' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3839259215413003173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3839259215413003173'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/02/presentazioe-sul-single-responsibility.html' title='Presentazione sul Single Responsibility Principle'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-2122295538218710519</id><published>2010-02-10T21:00:00.001+01:00</published><updated>2010-02-10T21:00:02.535+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='grizzly'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='jersey'/><category scheme='http://www.blogger.com/atom/ns#' term='italiano'/><title type='text'>Applicazioni REST standalone (senza Tomcat o Glasshfish)</title><content type='html'>&lt;p&gt;Ho cercato di capire come sia possibile avviare 
&lt;a href="https://jersey.dev.java.net/"&gt;Jersey&lt;/a&gt; in modalità standalone, cioè 
senza dover ricorrere ad inutili (per ora) complessità, come:&lt;ul&gt;
  &lt;li&gt;application servers (e.g. &lt;a href="https://glassfish.dev.java.net"&gt;Glasshfish&lt;/a&gt;)
  &lt;li&gt;web containers (e.g. &lt;a href="http://tomcat.apache.org"&gt;Tomcat&lt;/a&gt;)
  &lt;li&gt;sistemi di build lenti e complicati (e.g.&lt;a href="http://maven.apache.org/"&gt;maven&lt;/a&gt;)
&lt;/ul&gt;
Inoltre non volevo avere tra i piedi un file "web.xml".&lt;/p&gt;
&lt;p&gt;Ho scoperto che è possibile! La documentazione non è facile da 
trovare, sembra quasi che Oracle (ex Sun) spinga per complicarti la vita.&lt;/p&gt;
&lt;p&gt;Se volete provare anche voi dovete prima di tutto procurarvi le librerie 
necessarie:&lt;ul&gt;
 &lt;li&gt;&lt;a href="http://download.java.net/maven/2/com/sun/grizzly/grizzly-http-webserver/1.9.18-e/grizzly-http-webserver-1.9.18-e.jar"&gt;grizzly-servlet-webserver-1.9.18-e.jar&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;asm-3.1.jar&lt;/li&gt;
 &lt;li&gt;jersey-core-1.1.5.jar&lt;/li&gt;
 &lt;li&gt;jersey-server-1.1.5.jar&lt;/li&gt;
 &lt;li&gt;jsr311-api-1.1.1.jar&lt;/li&gt;
&lt;/ul&gt;

La prima contiene &lt;a href="https://grizzly.dev.java.net/"&gt;Grizzly&lt;/a&gt; (un 
embeddeddable web server), le restanti fanno parte della distribuzione di jersey
e sono scaricabili in un unica soluzione: 
&lt;a href="http://download.java.net/maven/2/com/sun/jersey/jersey-archive/1.1.5/jersey-archive-1.1.5.zip"&gt;jersey-archive-1.1.5.zip&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Una volta aggiunte le librerie al progetto potete passare alla creazione 
della risorsa di esempio:

&lt;pre&gt;
// file Hello.java
package learn.jersey.grizzly;
import javax.ws.rs.*;

@Path("/hello")
public class Hello {
    @GET @Produces("text/plain")
    public String sayHello() {
        return "Hello World!";
    }
}
&lt;/pre&gt;
&lt;/p&gt;&lt;p&gt;E infine il main (che è cortissimo!):

&lt;pre&gt;
// Main.java
package learn.jersey.grizzly;

import com.sun.grizzly.tcp.Adapter;
import com.sun.jersey.api.container.ContainerFactory;
import com.sun.jersey.api.container.grizzly.GrizzlyServerFactory;
import java.io.IOException;

public class Main {

    public static void main(String[] args) throws IOException {
        Adapter adapter = ContainerFactory.createContainer(Adapter.class, Hello.class);
        GrizzlyServerFactory.create("http://localhost/", adapter);
    }

}
&lt;/pre&gt;

Dopo aver avviato verificatene il funzionamento seguendo 
&lt;a href="http://localhost/hello"&gt;http://localhost/hello&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;Che bella la semplicità!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-2122295538218710519?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/2122295538218710519/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=2122295538218710519' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2122295538218710519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2122295538218710519'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/02/applicazioni-rest-standalone-senza.html' title='Applicazioni REST standalone (senza Tomcat o Glasshfish)'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-537270117643680173</id><published>2010-02-04T20:47:00.003+01:00</published><updated>2010-02-04T20:49:37.042+01:00</updated><title type='text'>Semplificare le espressioni regolari</title><content type='html'>&lt;div&gt;Sono convinto che le espressioni regolari siano uno strumento potente per esprimere in modo compatto per esprimere patterns.&lt;/div&gt;&lt;div&gt;Sono però sono anche convinto che per molti problemi siano troppo potenti e che, proprio per il fatto che sono il loro linguaggio e molto compatto, possano essere poco leggibili.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Inoltre quando usate in un linguaggio di programmazione sono un linguaggio nel linguaggio con tutti i problemi che ne derivano. Se per esempio le state usando in Java per fare il matching delle string che iniziano con &amp;quot;C:\&amp;quot; bisogna scrivere qualcosa del tipo:&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;        assertTrue(path.matches(&amp;quot;C:\\\\.*&amp;quot;));&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;C&amp;#39;e&amp;#39; un modo per semplificare le cose? Io ho provato creando un piccolo DSL.&lt;/div&gt;&lt;div&gt;Si usa così:&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;        String output = &amp;quot;Killing process 1624...done\n&amp;quot;;&lt;/div&gt;&lt;div&gt;        assertThat(output, looksLike(&amp;quot;Killing process NNNN...done\n&amp;quot;)&lt;/div&gt;&lt;div&gt;                                     .where(&amp;quot;NNNN&amp;quot;).isA(anyNumber()));&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;In questo caso il matching è soddisfatto per ogni stringa dove al posto del termine &amp;quot;NNNN&amp;quot; appare un qualsiasi numero.&lt;/div&gt;&lt;div&gt;Questo è  un&amp;#39;altro esempio:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;        String path = &amp;quot;C:\\Program Files&amp;quot;;&lt;/div&gt;  &lt;div&gt;&lt;div&gt;        assertThat(path, looksLike(&amp;quot;C:\\&amp;lt;path&amp;gt;&amp;quot;)&lt;/div&gt;&lt;div&gt;                                     .where(&amp;quot;&amp;lt;path&amp;gt;&amp;quot;).isA(anyString()));&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;In questo caso mi sono inventato il termine &amp;quot;&amp;lt;path&amp;gt;&amp;quot;, il bello è che non ci sono vincoli sul nome del termine.&lt;/div&gt;  &lt;div&gt;La libreria è poco più di una proof of concept e non gestisce ancora il caso in cui il termine è ripetuto più di una volta. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Però è funzionante e testata, e presto la metterò online.&lt;/div&gt;  &lt;br&gt;&lt;/div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-537270117643680173?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/537270117643680173/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=537270117643680173' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/537270117643680173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/537270117643680173'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/02/semplificare-le-espressioni-regolari.html' title='Semplificare le espressioni regolari'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-2655236907304218900</id><published>2010-01-21T23:03:00.001+01:00</published><updated>2010-01-21T23:10:14.390+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Installare Ruby on Rails su Cygwin</title><content type='html'>&lt;pre&gt;
In questi giorni sto imparando ad usare Ruby on Rails, un famoso framework per 
scrivere applicazioni web. In queste note descrivo i passi necessari 
all'installazione delle dipendenze.

Prima di tutto avete bisogno di `gem` il comando per scaricare i pacchetti ruby.
Andate sulla pagina http://rubyforge.org/frs/?group_id=126 e individuate 
l'ultima tarball.

Scaricate e installate con::

    wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
    tar xvfz rubygems-1.3.5.tgz
    cd rubygems-1.3.5
    ruby setup.rb install

Ora installare rails è un gioco da ragazzi, basta fare::

    gem install rails

Però non è finita, qui, perché avrete bisogno di sqlite per fare le vostre 
prove. A meno che non vogliate imbarcarvi nell'uso di mysql.

Per poter usare sqlite dovrete sia installare sqlite vero e proprio sia i 
bindings ruby. Per installare sqlite3 usate::

    apt-cyg install libsqlite3_0  libsqlite3-devel
    
se non avete apt-cyg potete installarlo con i comandi:

    wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg -O/bin/apt-cyg
    chmod u+x /bin/apt-cyg

Ora installiamo i bindings::
    
    gem install sqlite3-ruby

Ora abbiamo quasi finito e possiamo usare rails::

    rails nome-dell-applicazione
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-2655236907304218900?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/2655236907304218900/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=2655236907304218900' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2655236907304218900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2655236907304218900'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2010/01/installare-ruby-on-rails.html' title='Installare Ruby on Rails su Cygwin'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3313262082825878489</id><published>2009-12-10T23:27:00.002+01:00</published><updated>2009-12-10T23:34:51.712+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jug'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='jug-milano'/><title type='text'>Presentazione all JUG</title><content type='html'>Domani terrò una &lt;a href="http://www.jugmilano.it/vqwiki/jsp/Wiki?Meeting11Dicembre2009"&gt;presentazione&lt;/a&gt; sull'uso di subversion al jug di milano.

Le slide che userò sono su &lt;a href="http://www.slideshare.net/andreafrancia/subversion-jug-milano-11-dic-2009"&gt;slideshare&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3313262082825878489?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3313262082825878489/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3313262082825878489' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3313262082825878489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3313262082825878489'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/12/presentazione-all-jug.html' title='Presentazione all JUG'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-1560851591256972709</id><published>2009-12-03T23:01:00.002+01:00</published><updated>2009-12-03T23:02:37.676+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='agile'/><category scheme='http://www.blogger.com/atom/ns#' term='software development'/><category scheme='http://www.blogger.com/atom/ns#' term='legacy-code'/><title type='text'>Presentazione alll'XPUG</title><content type='html'>Ieri ho fatto la mia prima presentazione all'&lt;a id="f1vf" href="http://milano-xpug.pbworks.com/" title="XPUG di Milano"&gt;XPUG di Milano&lt;/a&gt;.&amp;nbsp;&lt;div&gt;Ho presentato quello che ho capito del libro "&lt;a id="j9:o" href="http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052" title="Working Effectively with Legacy Code"&gt;Working Effectively with Legacy Code&lt;/a&gt;" di M. Feathers.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;La cosa più bella è che la mia fidanzata è venuta a vedermi presentare ed ha avuto pure la pazienza di restare per la cena che abbiamo fatto dopo. Chissà quanto si è stufata? Continuavamo a parlare di programmazione ;)&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-1560851591256972709?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/1560851591256972709/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=1560851591256972709' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1560851591256972709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1560851591256972709'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/12/presentazione-alll.html' title='Presentazione alll&amp;#39;XPUG'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4625468946974424353</id><published>2009-11-22T22:51:00.002+01:00</published><updated>2009-11-25T19:27:06.081+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='legacy-code'/><title type='text'>Cos'è il codice legacy (secondo Feathers)?</title><content type='html'>&lt;div&gt;Come vi ho detto ho appena letto questo &lt;a id="bbna" href="http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052" title="Working Effectively with Legacy Code"&gt;libro&lt;/a&gt; e una delle cose più interessanti che vi ho trovato è la definizione di software legacy data usata dall'&lt;a id="heax" href="http://www.michaelfeathers.com/" title="Michael Feathers"&gt;autore&lt;/a&gt;. Infatti secondo Feathers l'aspetto caratterizzante del codice legacy è l'assenza dei test di unità automatici.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;A prima vista sembra questa affermazione non abbia senso. A noi sembra che il problema dei software legacy è semplicemente che sono progettati (e scritti) male.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Come sappiamo questo potrebbe non essere un gran problema se solo potessimo migliorare il design esistente, magari riscrivendo qualche porzione. Questo tipo di modifiche ha pure un nome, si chiama &lt;b&gt;&lt;a id="b_pc" href="http://en.wikipedia.org/wiki/Refactoring" title="Refactoring"&gt;Refactoring&lt;/a&gt;&lt;/b&gt; e consiste nel cambiare la struttura interna di un programma mantenendone intatto il comportamento esterno.&lt;/div&gt;&lt;div style="text-align: auto;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: auto;"&gt;Il refactoring comporta la modifica del codice esistente e quindi, come tutte le modifiche, se fatta in assenza del feedback di test automatici rischia di "rompere" il comportamento esistente.&lt;/div&gt;&lt;div style="text-align: auto;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: auto;"&gt;Senza test è così facile introdurre bachi durante il refactoring che presto i programmatori e managers sviluppano una grande avversione alle modifiche del codice esistente.&lt;/div&gt;&lt;div style="text-align: auto;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: auto;"&gt;Le conseguenze di questa "paura del refactoring" l'instaurarsi un circolo vizioso secondo il quale il nuovo codice non può essere scritto bene perché il codice esistente è scritto male. Quindi modifica dopo modifica il codice non migliora e, spesso, peggiora.&lt;/div&gt;&lt;div style="text-align: auto;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: auto;"&gt;Questi sono i ragionamenti che portano a pensare che la caratteristica principale del codice legacy sia l'assenza di test di unità automatici.&lt;/div&gt;&lt;div style="text-align: auto;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: auto;"&gt;A questo punto è facile capire quale sia la soluzione per interrompere il ciclo vizioso: è necessario mettere sotto test automatici le parti di applicazione che si intende modificare. Gran parte del libro è dedicata all'aggiunta dei test automatici al software legacy per abilitarne il refactoring e renderlo sempre di più un po' meno legacy.&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4625468946974424353?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4625468946974424353/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4625468946974424353' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4625468946974424353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4625468946974424353'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/11/cos-il-codice-legacy.html' title='Cos&amp;#39;è il codice legacy (secondo Feathers)?'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-45416042391293541</id><published>2009-11-16T23:19:00.004+01:00</published><updated>2009-11-25T19:27:25.529+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='legacy-code'/><title type='text'>Cos'è il software legacy</title><content type='html'>&lt;div&gt;
  &lt;img id="uykh" src="http://docs.google.com/a/andreafrancia.it/File?id=dgbjhsb4_161dn2p7jg9_b" style="WIDTH:240px; HEIGHT:240px; FLOAT:right; MARGIN-LEFT:1em; MARGIN-RIGHT:0px"&gt;Ho recentemente finito di studiare &lt;a href="http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052" id="i942" title="Working Effectively with Legacy Code"&gt;Working Effectively with Legacy Code&lt;/a&gt; di Michael Feathers.&amp;nbsp;&lt;br&gt;
  &lt;br&gt;
  Come immaginerete il libro parla di codice legacy. Noi abbiamo tutti un'idea di cosa sia il codice legacy.&amp;nbsp;&lt;br&gt;
  Tutti noi ne abbiamo avuto a che fare, a volte lo abbiamo creato e forse lo stiamo pure creando. Feathers nel suo libro utilizza una definizione tutta particolare ed interessante per definirlo ma in questo post vorrei invece ragionare sulla definizione di senso comune di codice legacy.&lt;br&gt;
  &lt;br&gt;
  Secondo me, e penso secondo altri, il software legacy è qualcosa che possiede le seguenti caratteristiche:&lt;br&gt;
  &lt;ul&gt;
    &lt;li&gt;
      &lt;b&gt;è utile:&lt;/b&gt;&lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;
        cioé serve alla azienda, crea valore.
      &lt;/li&gt;
    &lt;/ul&gt;
    &lt;li&gt;
      &lt;b&gt;è difficile capirne il funzionamento:&lt;/b&gt;
    &lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;
        a volte ci sono delle incosistenze,&amp;nbsp;
      &lt;/li&gt;
      &lt;li&gt;
        l'interfaccia d'uso non è lineare e contiene refusi ed errori storici&amp;nbsp;
      &lt;/li&gt;
    &lt;/ul&gt;
    &lt;li&gt;
      &lt;b&gt;è fragile:&lt;/b&gt;
    &lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;
        ogni modifica può comportare un malfunzionamento, per esempio ti chiedono di modificare la formattazione dell'output e poi scopri che non salva più sul database!
      &lt;/li&gt;
    &lt;/ul&gt;
    &lt;li&gt;
      &lt;b&gt;è difficile da modificare:&lt;/b&gt;
    &lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;
        a volte una "piccola" modifica ai requisiti richiede di rivedere grandi porzioni di programma, pensarci su, discutere e alla fine si riduce al cambiare una riga di codice in un certo punto magico
      &lt;/li&gt;
      &lt;li&gt;
        a volte invece una "piccola" modifica ai requisiti richiede di fare delle modifiche in tanti diversi posti e devi ricordarti tutti i posti in cui lo devi modificare
      &lt;/li&gt;
    &lt;/ul&gt;
    &lt;li&gt;
      (a volte) &lt;b&gt;è stato scritto da altre persone/enti:&lt;/b&gt;
    &lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;
        questo sarebbe il vero significato del termine legacy (cioè retaggio). Però nell'uso comune della parola in ambito software gli altri aspetti sono considerati più caratterizzanti. Infatti a volte si parla anche di software legacy riferendosi a software scritto da noi stessi (intesi come persona o azienda).
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/ul&gt;
  &lt;br&gt;
  La caratteristica che ritengo più importante di questo tipo di software è la prima. Cioé&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;
  &lt;blockquote&gt;
    &lt;b&gt;&lt;font size="2"&gt;si tratta di un software utile e che crea utile!&lt;/font&gt;&lt;/b&gt;
  &lt;/blockquote&gt;
  Secondo me questo punto è veramente importante.&amp;nbsp;&lt;br&gt;
  &lt;br&gt;
  Il fatto che il programma, anche se brutto, crei valore è il motivo per cui i nostri capi ci chiedono di lavorarci.&amp;nbsp;&lt;br&gt;
  E' il motivo per cui dobbiamo impegnarci per manutenere il programma e rendendolo migliore, o almeno ... non peggiore.&lt;br&gt;
  &lt;br&gt;
&lt;/div&gt;
&lt;div&gt;
  Però non è come dirlo. Non è facile. Ci vuole tecnica e impegno.&lt;br&gt;
  &lt;br&gt;
  Riguardo all'&lt;b&gt;impegno&lt;/b&gt; considero politiche del tipo "cerchiamo di toccarlo il meno possibile", "moltiplichiamo per 3.14 le stime prima di darle al management", "opponiamoci ad ogni richiesta di modifica" semplicemente non professionali.&lt;br&gt;
  &lt;br&gt;
  Riguardo alla &lt;b&gt;tecnica&lt;/b&gt;&amp;nbsp;questa si è raccontata in questo libro e si acquisce studiandoloe applicandone gli insegnamenti.&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-45416042391293541?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/45416042391293541/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=45416042391293541' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/45416042391293541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/45416042391293541'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/11/cos-il-software-legacy_16.html' title='Cos&amp;#39;è il software legacy'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8048322045202481220</id><published>2009-10-12T21:53:00.000+02:00</published><updated>2009-10-12T21:53:28.816+02:00</updated><title type='text'>Creare un menu popup</title><content type='html'>Oggi ho imparato a creare popup menu...&lt;br /&gt;
&lt;br /&gt;
&lt;pre name="code" class="java:nogutter"&gt;import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class PopupMenuExamle {

    public static void main(String[] args) {
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        frame.setVisible(true);
        frame.setSize(100, 100);

        final JPopupMenu popup = new JPopupMenu() {{

            add(new JMenuItem("aaa"));
            add(new JMenuItem("bbb"));
            add(new JMenuItem("ccc"));
        }};

        addPopupMenuTo(popup, frame);

    }

    private static void addPopupMenuTo(final JPopupMenu popup, Container dest) {
        dest.addMouseListener(new MouseAdapter() {

            @Override
            public void mousePressed(MouseEvent e) {
                maybeShowPopup(e);
            }

            @Override
            public void mouseReleased(MouseEvent e) {
                maybeShowPopup(e);
            }

            private void maybeShowPopup(MouseEvent e) {
                if (e.isPopupTrigger()) {
                    popup.show(e.getComponent(),
                            e.getX(), e.getY());
                }
            }
        });
    }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8048322045202481220?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8048322045202481220/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8048322045202481220' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8048322045202481220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8048322045202481220'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/10/creare-un-menu-popup.html' title='Creare un menu popup'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-820401973867485239</id><published>2009-10-12T21:50:00.000+02:00</published><updated>2009-10-12T21:50:05.293+02:00</updated><title type='text'>Creare una finestra trascinabile in Java</title><content type='html'>Oggi ho fatto un po' di esercizio con Swing di Java. Swing è uno dei GUI toolkit di Java ed è utile conoscerlo perché è compreso nella piattaforma Java. Swing non è l'unica scelta, ne esistono altre, sul web ci sono &lt;a href="http://stackoverflow.com/questions/138722/which-gui-library-is-the-best-in-java"&gt;alcune&lt;/a&gt; &lt;a href="http://www.ibm.com/developerworks/java/library/os-swingswt/index.html"&gt;risorse&lt;/a&gt; che vi possono aiutare nella scelta.&lt;br /&gt;
&lt;br /&gt;
Pero' io ho provato con Swing. Volevo provare una draggable window, una finestra senza bordi che si può spostare trascinandola con il mouse. Ecco il risultato:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="java:nogutter" name="code"&gt;import java.awt.Container;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JWindow;

public class DraggableBorderlessWindow {

    public static void main(String[] args) {
        final JWindow win = new JWindow();

        makeDraggable(win);

        win.setSize(100, 100);
        win.setVisible(true);
        win.setLocation(100, 100);
    }

    private static void makeDraggable(final Container window) {
        MouseAdapter dragger = new Dragger(window);
        window.addMouseMotionListener(dragger);
        window.addMouseListener(dragger);
    }

    private static class Dragger extends MouseAdapter {

        private int offsetX;
        private int offsetY;
        private final Container window;

        public Dragger(Container window) {
            this.window = window;
        }

        @Override
        public void mousePressed(MouseEvent e) {
            offsetX = window.getX() - e.getXOnScreen();
            offsetY = window.getY() - e.getYOnScreen();
        }

        @Override
        public void mouseDragged(MouseEvent e) {
            window.setLocation(e.getXOnScreen() + offsetX,
                               e.getYOnScreen() + offsetY);
        }

    }
}

&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-820401973867485239?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/820401973867485239/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=820401973867485239' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/820401973867485239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/820401973867485239'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/10/creare-una-finestra-trascinabile-in.html' title='Creare una finestra trascinabile in Java'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-218306804683282001</id><published>2009-10-06T21:01:00.001+02:00</published><updated>2009-10-06T21:03:26.099+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='fuffa'/><title type='text'>Fuffa</title><content type='html'>Sapreste spiegare cosa fa il vostro prodotto in modo conciso e chiaro in modo da invogliare i potenziali clienti? Oppure vi vergognate tanto di dire cosa realmente fa il vostro prodotto da &lt;br /&gt;
sembrarvi riduttivo dirlo e ci girate intorno?&lt;br /&gt;
&lt;br /&gt;
Facciamo un esempio preso dalla pagina ufficiale di un prodotto a caso.&lt;br /&gt;
Il target di questo prodotto sono sviluppatori Java. Il nome del prodotto è stato nascosto sotto delle anonime XXXXX. (Non voglio problemi e quindi cancellerò qualsiasi commento che dica il nome vero del prodotto) &lt;br /&gt;
&lt;br /&gt;
Ecco l'esempio:&lt;br /&gt;
&lt;blockquote&gt;XXXXX is an award-winning productivity tool for Java EE development. It enables your team to complete more features, fix more bugs, and release quality software on schedule and under budget by eliminating time-wasting build and redeploy phases. Your whole team can use the free 30-day evaluation.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
In tutto ci sono 296 caratteri, vediamo quanti di questi sono utili.&lt;br /&gt;
I primi sei caratteri (contando lo spazio) sono utili, dicono il nome del prodotto.&lt;br /&gt;
Analizziamo il resto.&lt;br /&gt;
&lt;br /&gt;
&lt;emphasis&gt;"is an award-winning productivity tool "&lt;/emphasis&gt;. &lt;br /&gt;
&lt;blockquote&gt;Bene. Si tratta un prodotto che ha vinto premi (tipo l'oscar immagino) ed un productivity tool. Probabilmente un tool che "aumenta la produttività" ... di solito i tool si comprano pensando che la produttività aumenti. Insomma 38 caratteri di fuffa.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;emphasis&gt;"for Java EE development. "&lt;/emphasis&gt;. &lt;br /&gt;
&lt;blockquote&gt;Ahh sappiamo almeno il campo di applicazione! Caratteri utili: 25. &lt;br /&gt;
Totale parziale: 31 utili, 38 fuffa.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;emphasis&gt;"It enables your team to complete more features, fix more bugs, and release quality software on schedule and under budget "&lt;/emphasis&gt;. &lt;br /&gt;
&lt;blockquote&gt;Wow! Ma che cosa è una nuova metodologia di sviluppo? &lt;br /&gt;
E' una sfera di cristallo che legge nella mente del committente?&lt;br /&gt;
E' una sorta di tempo liofilizzato da usare quando si arriva la scadenza?&lt;br /&gt;
O sono le solite balle, un po' come quando ci ha detto che è un tool che aumenta la produttività? Insomma: 121 caratteri sprecati.&lt;br /&gt;
Totale parziale: 31 utili, 159 fuffa.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;emphasis&gt;by eliminating time-wasting build and redeploy phases. "&lt;/emphasis&gt;&lt;br /&gt;
&lt;blockquote&gt;Ahh, finalmente. Qualcosa si capisce. Ha a che fare con la fase di build e redeploy.&lt;br /&gt;
Non ho ancora capito a cosa serve ma un idea ce l'ho.&lt;br /&gt;
Caratteri utili: 55&lt;br /&gt;
Totale parziale: 86 utili, 159 fuffa.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;emphasis&gt;"Your whole team can use the free 30-day evaluation. "&lt;/emphasis&gt;&lt;br /&gt;
&lt;blockquote&gt;Questa è un informazione sul periodo di prova, è utile ma non entra nel conteggio, ne in bene ne in male.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Tirando le somme abbiamo:&lt;br /&gt;
Caratteri utili: 86&lt;br /&gt;
Caratteri fuffa: 159&lt;br /&gt;
Percentuale fuffa: 86/159 = 54%&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Adesso miglioriamolo&lt;/h3&gt;Le parti utili sono:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;XXXXX is a tool &lt;/li&gt;
&lt;li&gt;for Java EE development&lt;/li&gt;
&lt;li&gt;eliminating time-wasting build and redeploy phases.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Facciamo una prova:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;XXXXX is a tool that eliminates the build and redeploy phases in Java EE development.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
E' ancora oscuro ma è molto meno rumoroso. Possiamo fare di meglio. Studiamo cosa fa realmente e magari facciamoci aiutare da wikipedia.&lt;br /&gt;
&lt;blockquote&gt;XXXXX is a plugin for the Java Virtual Machine that enables on-the-fly reloading of changes made to Java class files.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Mettiamo tutto assieme:&lt;br /&gt;
&lt;blockquote&gt;XXXXX is a plugin for the Java Virtual Machine that enables on-the-fly reloading of changes made to Java class files. This is great because you can actually change source code when debugging and, more importantly, works also with Java EE applications servers.&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Conteggio fuffa:&lt;ul&gt;&lt;li&gt;"XXXXX is a plugin for the Java Virtual Machine that enables on-the-fly reloading of changes made to Java class files. " -&amp;gt; 118 utili&lt;/li&gt;
&lt;li&gt;"This is great because " -&amp;gt; 22 fuffa&lt;/li&gt;
&lt;li&gt;"you can actually change source code when debugging and, " -&gt; 56 utili&lt;/li&gt;
&lt;li&gt;"more importantly, " -&amp;gt; 18 fuffa &lt;/li&gt;
&lt;li&gt;"works also with Java EE applications servers." -gt; 45 utili&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Caratteri utili: 118+56+45 = 219&lt;br /&gt;
Caratteri fuffa: 22+18 = 40&lt;br /&gt;
Percentuale fuffa: 40/219 = 18%&lt;br /&gt;
&lt;br /&gt;
PS: Se pensate che ho sbagliato qualche conto probabilmente avete ragione&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-218306804683282001?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/218306804683282001/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=218306804683282001' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/218306804683282001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/218306804683282001'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/10/fuffa.html' title='Fuffa'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-721484980896483867</id><published>2009-10-04T23:47:00.000+02:00</published><updated>2009-10-04T23:47:34.586+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xunit'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='tdd'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><title type='text'>Utilities for managing svn:ignore properties</title><content type='html'>I've just created a few commands for simplifying the usage of svn:ignore property of Subversion from command line. You can download, and see the sources on the &lt;a href="http://code.google.com/p/svn-ignore/"&gt;project page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The usage is simple, typing:&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: black;"&gt;&lt;span style="color: white;"&gt;svn-ignore-add path/to/file-to-ignore&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family: inherit;"&gt;will append to the current &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;svn:ignore&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; property of "&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;path/to&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;" the string "&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;file-to-ignore&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;".&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The project was written in Bash with TDD.&lt;br /&gt;
The xUnit framework used is an modified version of shunit2 that I hacked sometime ago for the trash-cli project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-721484980896483867?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://code.google.com/p/svn-ignore/' title='Utilities for managing svn:ignore properties'/><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/721484980896483867/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=721484980896483867' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/721484980896483867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/721484980896483867'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/10/utilities-for-managing-svnignore.html' title='Utilities for managing svn:ignore properties'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3655784165206244312</id><published>2009-10-03T10:08:00.001+02:00</published><updated>2009-10-03T10:50:50.341+02:00</updated><title type='text'>My Small Software Pomodoro Timer</title><content type='html'>I've just created my own home made software Pomodoro Timer.&amp;nbsp;
&lt;div&gt;Unlike other timers has a very simple interface.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Features/bugs:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Left time always visible.&lt;/li&gt;&lt;li&gt;You can drag the window where you want.&lt;/li&gt;&lt;li&gt;The interface is minimalist (less features, simpler interface)&lt;/li&gt;&lt;li&gt;The window waste less than 3k pixel of your screen.&lt;/li&gt;&lt;li&gt;Only three actions: start, stop, close&lt;/li&gt;&lt;li&gt;No Sounds&lt;/li&gt;&lt;li&gt;Works on Windows Only&lt;/li&gt;&lt;li&gt;Sources &lt;a id="soyw" href="http://code.google.com/p/franciapomo/" title="available"&gt;available&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Free &lt;a id="sl6x" href="http://code.google.com/p/franciapomo/downloads" title="download"&gt;download&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Screenshots:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Start!&lt;/li&gt;&lt;/ul&gt;&lt;blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none"&gt;&lt;blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none"&gt;&lt;img src="http://docs.google.com/a/andreafrancia.it/File?id=dgbjhsb4_133kwgnbcg8_b" style="width: 94px; height: 26px"&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Running:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none"&gt;&lt;blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none"&gt;&lt;img src="http://docs.google.com/a/andreafrancia.it/File?id=dgbjhsb4_132ccmmfgfz_b" style="width: 94px; height: 26px"&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3655784165206244312?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3655784165206244312/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3655784165206244312' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3655784165206244312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3655784165206244312'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/10/my-small-software-pomodoro-timer.html' title='My Small Software Pomodoro Timer'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3639811883822839924</id><published>2009-09-14T00:26:00.001+02:00</published><updated>2009-09-14T00:26:56.618+02:00</updated><title type='text'>How Compare Word Documents in TortoiseHG using TortoiseSVN</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;&lt;div&gt;TortoiseSVN is a mature and complete product that provides some useful features like comparison of non text based files like Word, PowerPoint, Excels and images files.&lt;/div&gt;&lt;div&gt;The TortoiseHg hasn't this feature so you can't, for example, visual compare Word files. Nevertheless we can configure TortoiseHg in a way that it can use the comparison features &amp;nbsp;of TortoiseSVN. In this post I will choose you how to do such configuration.&lt;/div&gt;&lt;h4&gt;Create an the invoke-tortoisesvn-diff.cmd&lt;/h4&gt;&lt;div&gt;First of all we create a command that will invoke TortoiseSVN Diff.&lt;/div&gt;&lt;div&gt;Create a file named &lt;font class="Apple-style-span" face="'Courier New'"&gt;invoke-tortoisesvn-diff.cmd&lt;/font&gt; with the code:&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;font class="Apple-style-span" face="'Courier New'"&gt;SET LEFT=%1&lt;br&gt;SET RIGHT=%2&lt;br&gt;SET PROC=C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe&lt;br&gt;"%PROC%" /command:diff /path:%LEFT% /path2:%RIGHT%&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;Place it when you want, for example in &lt;font class="Apple-style-span" face="'Courier New'"&gt;C:\Program Files\TortoiseHg&lt;/font&gt;.&lt;/div&gt;&lt;div&gt;Before continuing test the command, for example comparing two word files:&lt;/div&gt;&lt;blockquote&gt;&lt;font class="Apple-style-span" face="'Courier New'"&gt;&lt;font size="2"&gt;invoke-tortoisesvn-diff.cmd C:\path\to\left\document.doc C:\path\to\right\document.doc&lt;/font&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;div&gt;Using absolutes path is essential.&lt;/div&gt;&lt;h4&gt;Integrate invoke-tortoisesvn-diff in TortoiseHg&lt;/h4&gt;&lt;div&gt;Next we tells to TortoiseHg to use this command editing the mercurial.ini.&lt;/div&gt;&lt;div&gt;Placed in &lt;font class="Apple-style-span" face="'Courier New'"&gt;C:\Documents and Settings\&amp;lt;user&amp;gt;\mercurial.ini&lt;/font&gt;.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;And add the followings::&lt;/div&gt;&lt;blockquote&gt;[extdiff]&lt;br&gt;cmd.tortoise_svn_diff = C:\Program Files\TortoiseHg\invoke-tortoisesvn-diff.cmd&lt;/blockquote&gt;&lt;div&gt;Now we can test the integration with TortoiseHG. From a mercurial working directory do right click &amp;gt; &lt;i&gt;TortoiseHG...&lt;/i&gt; &amp;gt; &lt;i&gt;Visual Diff &lt;/i&gt;and the usual&amp;nbsp;&lt;b&gt;"Visual Diffs"&lt;/b&gt;&amp;nbsp;window should be displayed.&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: center" id="d6b1"&gt;&lt;img src="http://docs.google.com/a/andreafrancia.it/File?id=dgbjhsb4_119f9jc2bg4_b" style="width: 418px; height: 223px"&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;From the tools dropdown list choose&amp;nbsp;&lt;i&gt;tortoise_svn_diff &lt;span style="font-style: normal;"&gt;and then&amp;nbsp;&lt;/span&gt;&lt;span style="font-style: normal"&gt;double click the document name and the differences should be shown in a new word document.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3639811883822839924?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3639811883822839924/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3639811883822839924' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3639811883822839924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3639811883822839924'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/09/how-compare-word-documents-in.html' title='How Compare Word Documents in TortoiseHG using TortoiseSVN'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-5977783896720508835</id><published>2009-09-03T22:22:00.002+02:00</published><updated>2009-09-03T22:31:55.918+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='games'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Duke Nukem Forever</title><content type='html'>Oggi in rete ho scoperto la storia di un videogioco chiamato &lt;a id="n.vp" href="http://en.wikipedia.org/wiki/Duke_Nukem_Forever" title="Duke Nukem Forever"&gt;Duke Nukem Forever&lt;/a&gt;.&lt;br&gt;Si tratta di un videogioco che potrebbe essere considerato il simbolo dello sviluppo software mal gestito: lo sviluppo è iniziato 12 anni fa e non è ancora terminato!&lt;div&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;I motivi del ritardo non li conosciamo ma si possono intuire leggendo la storia dello sviluppo su wikipedia (per esempio si legge che hanno cambiato tecnologia più di una volta, che hanno riscritto da zero alcuni componenti al posto di usare quelli già fatti, e che hanno cambiato spesso il personale).&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;La cosa che mi lascia sconcertato è come fa un progetto a durare così tanto senza morire? Quanti soldi avranno speso? Chi ne ha spesi così tanti e chi ha continuato a spenderli non vedendo risultati?&lt;br&gt;Incredibile.&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-5977783896720508835?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/5977783896720508835/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=5977783896720508835' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5977783896720508835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5977783896720508835'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/09/duke-nukem-forever.html' title='Duke Nukem Forever'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-13077880895381530</id><published>2009-07-21T21:54:00.001+02:00</published><updated>2009-07-21T21:54:48.830+02:00</updated><title type='text'>Il protocollo di Subversion si rinnova</title><content type='html'>&lt;div&gt;&lt;div&gt;Avete presente il protocollo HTTP di Subversion? Lo stanno migliorando e studiare come gestiscono questa miglioria mi aiuta a capire come gestire i progetti software.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Subversion supporta diversi protocolli (svn, http, e svn+ssh). Il protocollo che poggia su HTTP è forse il più comodo da usare come client perché usa solo la porta 80 (buono per i firewall e proxy trasparenti), e permette il browsing del repository con un semplice browser. Lato server il protocollo over HTTP fornisce una serie di goodies ereditate da Apache come la possibilità di usare l&amp;#39;autenticazione LDAP, e le stessi strumenti di logging usati per Apache. Fino ad ora questa comodità si pagava in termini di prestazioni. Come ammette lo stesso &lt;a href="http://svnbook.red-bean.com/en/1.5/svn.serverconfig.choosing.html#svn.serverconfig.choosing.apache"&gt;manuale&lt;/a&gt; di Subversion il protocollo over HTTP è più lento degli altri due.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Oltre alla velocità ci sono questioni di semplicità e di leggibilità che riguardano il protocollo. Se ho capito bene &lt;a href="http://blog.red-bean.com/sussman/?p=139"&gt;questo post&lt;/a&gt; che lo letto il problema sta nel fatto che il protocollo Subversion over HTTP è stato su una specifica over-ingegnerizzata: &lt;a href="http://www.ietf.org/rfc/rfc3253.txt"&gt;l&amp;#39;estensione di versioning di WebDAV&lt;/a&gt;.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Ora si è deciso di cambiare! La modifica è stata definita in una &lt;a href="http://svn.collab.net/repos/svn/trunk/notes/http-protocol-v2.txt"&gt;nuova specifica&lt;/a&gt;. In questo nuovo protocollo sono state rimosse tutte le complicazioni non necessarie. La parte interessante (per me) è vedere come la modifica è gestita!&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Le specifiche sono scritte in un documento testo semplice messo sotto controllo di versione e automaticamente messe a disposizione su HTTP (grazie all&amp;#39;uso di Subversion over HTTP tra l&amp;#39;altro).&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;All&amp;#39;inizio c&amp;#39;e&amp;#39; una introduzione che contestualizza le modifiche e di seguito le specifiche sono dettagliate in senso top down. Lo stesso documento funge da report sullo stato del lavoro. Scendendo nel documento si trovano infatti gli elenchi di cose da implementare taggati con la scritta [DONE] o [STARTED]. Scorrendo indietro nella storia si potrebbe addirittura vedere la storia del documento e come si è evoluto il design e lo stato di implementazione.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Molto istruttivo.&lt;/div&gt;&lt;div&gt;-- &lt;br&gt;Andrea Francia&lt;br&gt;&lt;a href="http://andreafrancia.blogspot.com/"&gt;http://andreafrancia.blogspot.com/&lt;/a&gt;&lt;br&gt; &lt;/div&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-13077880895381530?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/13077880895381530/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=13077880895381530' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/13077880895381530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/13077880895381530'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/07/il-protocollo-di-subversion-si-rinnova.html' title='Il protocollo di Subversion si rinnova'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4333931755790993856</id><published>2009-07-02T00:48:00.003+02:00</published><updated>2010-02-17T17:16:20.167+01:00</updated><title type='text'>Confronti numerici con ndiff</title><content type='html'>&lt;pre&gt;
Ndiff permette di confrontare i file numericamente.
E' molto comodo se si vogliono confrontar gli output di programmi di calcolo numerico trascurando le differenze di formato di rappresentazione dei numeri.

 Io lo installo così:

mkdir --parent .local/{bin,src,man/man1}

cd  .local/src
wget http://ftp.math.utah.edu/pub//misc/ndiff-2.00.tar.gz
 tar xvfz ndiff-2.00.tar.gz

cd ndiff-2.00
./configure --prefix ~/.local
make install

echo 'export PATH=~/.local/bin:"$PATH"' &amp;gt;&amp;gt; ~/.bashrc
echo 'export MANPATH=~/.local/man:"$MANPATH"' &amp;gt;&amp;gt; ~/.bashrc
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4333931755790993856?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4333931755790993856/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4333931755790993856' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4333931755790993856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4333931755790993856'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/07/confronti-numerici-con-ndiff.html' title='Confronti numerici con ndiff'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8998605125646003077</id><published>2009-06-24T00:14:00.001+02:00</published><updated>2009-06-24T00:14:56.683+02:00</updated><title type='text'>Mission Impossible</title><content type='html'>Oggi dovevo recarmi a Roma per lavoro. Alla fine ce l&amp;#39;ho fatta ma è stata un&amp;#39;impresa!&lt;br&gt;&lt;br&gt;Sono partito da casa alle 7.40, ho preso il Freccia Rossa di trenitalia.&lt;br&gt;Prima di salire alla stazione avevo letto sul tabellone: &amp;quot;possibili ritardi di 20 minuti dei treni da e verso Roma&amp;quot;.&lt;br&gt; &lt;br&gt;A Bologna mi hanno soppresso il treno. Nessun avviso prima di Bologna. E&amp;#39; venuto il capotreno in carrozza a gridare: &amp;quot;questo treno è sopresso! andate a prendere quello al binario 10&amp;quot;.&lt;br&gt;Il nuovo treno conteneva la gente di tre treni diversi. I posti non bastavano. Ho gentilmente offerto il mio ad una suora.&lt;br&gt; &lt;br&gt;il treno è arrivato a Roma con un ritardo mostruoso. Circa 160 minuti.&lt;br&gt;&lt;br&gt;Arrivato a Termini mi dirigo verso la metro. Lì scopro che la linea B di Roma è inutilizzabile: Guasto elettrico!&lt;br&gt;Prendo due autobus strapieni e arrivo al lavoro.&lt;br&gt; &lt;br&gt;Arrivo sul posto di lavoro con circa 3 ore di ritardo e non sono ancora passato dall&amp;#39;albergo a lasciare la valigia.&lt;br&gt;Lavoro per il poco tempo che rimane alla chiusura dell&amp;#39;azienda e mi dirigo verso il BnB.&lt;br&gt; &lt;br&gt;Il BnB sembra non esistere e sembra un tentativo di truffa o qualcosa di simile.&lt;br&gt;&lt;br&gt;Chiedo alla fidanzata di trovarmi il numero di un hotel che ho già usato in passato.&lt;br&gt;Chiamo questo hotel e la receptionist mi propone un prezzo che è il 30% più alto di quello scritto su Internet.&lt;br&gt; &lt;br&gt;Contratto il prezzo è ottengo che sia solo 2 euro più alto di quello rilevato dalla mia fidanzata su Internet.&lt;br&gt;&lt;br&gt;Che giornata!&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8998605125646003077?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8998605125646003077/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8998605125646003077' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8998605125646003077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8998605125646003077'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/06/mission-impossible.html' title='Mission Impossible'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3954311999310193685</id><published>2009-06-17T23:34:00.001+02:00</published><updated>2009-06-17T23:34:08.017+02:00</updated><title type='text'>Mio papà è un grande</title><content type='html'>Ieri dopo il lavoro mi sono diretto verso la Città per incontrare alcuni amici.&lt;br&gt;&lt;br&gt;Ho preso l&amp;#39;autostrada e dopo qualche kilometro la macchina ha cominciato a perdere potenza!!!! Panico!&lt;br&gt;Ma che gli è successo! Chiamo mio padre al cellulare: &amp;quot;Papà! La macchina è strana ha perso potenza! ... non va oltre i 2000 giri ... pero&amp;#39; va&amp;#39; ... sto andando avanti con le quattro frecce ... se riesco esco al prossimo casello altrimenti mi tocca fare venire il carroattrezzi e pagare un sacco per la chiamata&amp;quot;.&lt;br&gt; &lt;br&gt;Andando a 40 km/h arrivo fino al casello più vicino esco dall&amp;#39;autostrada e aspetto mio padre.&lt;br&gt;&lt;br&gt;Lui arriva, sente il rumore del motore e capisce qualcosa, poi mi chiede &amp;quot;accellera un po&amp;#39;&amp;quot; sente il rumore e capisce qualcosa...&lt;br&gt; Guarda il motore e capisce qualcosa e dice: &amp;quot;Mmmh ... forse la cinghia ... mi ci vorrebbe una chiave del 13 ... &amp;quot;&lt;br&gt;&lt;br&gt;Poi mi dice: &amp;quot;Vai pure alla Città a trovare i tuoi amici con la mia macchina, io torno a casa con la tua e cerco di capire cos&amp;#39;ha&amp;quot;.&lt;br&gt; &lt;br&gt;&amp;quot;Grazie!&amp;quot; è la mia risposta.&lt;br&gt;&lt;br&gt;Riprendo il viaggio e dopo 10 minuti il cellulare squilla ... è mio padre! cavolo! si sarà fermata la macchina? Rispondo. &lt;br&gt;Mio padre: &amp;quot;Andrea! Ho incontrato un signore che mi ha gentilmente una chiave del 13. Adesso la macchina va che è una meraviglia! Comunque adesso la porto a casa e la stringo bene&amp;quot;&lt;br&gt; &lt;br&gt;Certo che è bravo!&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3954311999310193685?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3954311999310193685/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3954311999310193685' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3954311999310193685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3954311999310193685'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/06/mio-papa-e-un-grande.html' title='Mio papà è un grande'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7746911328320552025</id><published>2009-06-03T22:48:00.004+02:00</published><updated>2009-06-03T22:59:02.094+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='viaggi'/><category scheme='http://www.blogger.com/atom/ns#' term='treno'/><title type='text'>Chiedere dei (pseudo) rimborsi a Trenitalia</title><content type='html'>Per gli utenti dei treni a lunga percorrenza come me ecco il mio consiglio.

Non so se lo sapete ma se il treno arriva in ritardo potete chiedere un bonus (non è un vero rimborso, è un bonus) con il quale vi sconteranno il prossimo biglietto. Dato che ogni mese faccio circa un 2Mm (due megametri = 2000km :) in treno mi porto sempre dietro una copia del modulo di rimborso e lo compilo appena il treno arriva.

Il modulo lo trovate nelle stazioni. Quando riesco lo lascio direttamente in stazione al mio arrivo così non devo neanche spedirlo per posta.

Questo &lt;a href="http://blog.moduli.it/2008/02/02/treni-ritardi-cancellazioni-e-mancato-funzionamento-dellimpianto-di-climatizzazione/"&gt;post&lt;/a&gt; spiega i dettagli ma le informazioni ufficiali le trovate sul sito di &lt;a href="http://www.trenitalia.com/cms/v/index.jsp?vgnextoid=ef0b82b0368ea110VgnVCM1000003f16f90aRCRD"&gt;trenitalia&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7746911328320552025?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7746911328320552025/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7746911328320552025' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7746911328320552025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7746911328320552025'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/06/chiedere-dei-pseudo-rimborsi-trenitalia.html' title='Chiedere dei (pseudo) rimborsi a Trenitalia'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6794027867210103764</id><published>2009-05-14T12:00:00.001+02:00</published><updated>2009-05-14T12:01:33.327+02:00</updated><title type='text'>Milano XPUG 13/5/09: Deep Dynamics and Lean Startups</title><content type='html'>Ieri sono andato ad meeting su XP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6794027867210103764?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://milano-xpug.pbworks.com/Report20090513' title='Milano XPUG 13/5/09: Deep Dynamics and Lean Startups'/><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6794027867210103764/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6794027867210103764' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6794027867210103764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6794027867210103764'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/05/milano-xpug-13509-deep-dynamics-and.html' title='Milano XPUG 13/5/09: Deep Dynamics and Lean Startups'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6762121817206211278</id><published>2009-03-09T21:23:00.002+01:00</published><updated>2009-03-09T21:38:18.748+01:00</updated><title type='text'>Come vedere i film sul Nintendo DS</title><content type='html'>&lt;pre&gt;
==================================
Come vedere i film sul Nintendo DS
==================================

Lo sapevate che si possono vedere intermi film sul Nintendo DS? Sapevatelo.

I filmati si possono vedere usando MoonShell, un media player per Nintendo DS.

Date le limitazione hardware del dispositivo non è possibile visualizzare i 
video nel formato originale, essi vanno ridotti a livelli di bitrate che il 
Nintendo DS sia in grado si sopportare. Il formato di questi video a bitrate 
ridotto si chiama DPG.

Questo post spiega come convertire un video in formato .AVI in formato .DPG in 
modo che possano essere visti sul Nintendo DS. 
La guida è basata su Ubuntu 8.10 ma probabilmente sono sufficienti piccole 
modifiche per applicarla ad altri sistemi GNU/Linux.

Installazione
=============
Il software si chiama `dpgconv` ed è uno script python che richiede altri 
due software:

 - mplayer (e mencoder)
 - mpeg_stat
 
Installazione di mplayer e mencoder
-----------------------------------
Questi due software si installano semplicemente con::

  sudo apt-get install mplayer mencoder

Installazione di mpeg_stat
--------------------------
Il software `mpeg_stat` sembra che non abbia più una sua homepage, per 
scaricarlo dovete cercare e trovare qualche mirror che ne abbia ancora una 
copia. Io l'ho trovato qui: 
ftp://ftp.riken.go.jp/pub/FreeBSD/distfiles/mpeg_stat-2.2b-src.tar.gz e l'ho 
installato con i seguenti comandi::

  cd ~/.local/src
  wget ftp://ftp.riken.go.jp/pub/FreeBSD/distfiles/mpeg_stat-2.2b-src.tar.gz
  mkdir mpeg_stat-2.2b
  cd mpeg_stat-2.2b
  tar xvfz ../mpeg_stat-2.2b-src.tar.gz
  cd mpeg_stat
  make
  cd ~/.local/bin
  ln -s ../src/mpeg_stat-2.2b/mpeg_stat

Installazione di dpgconv
------------------------
Dato che si tratta di un semplice script la procedura di installazione 
consiste solo nello scaricare questo script e renderlo eseguibile.

Io ho fatto così::

  wget http://theli.ho.com.ua/dpgconv/dpgconv-8.py
  chmod u+x dpgconv-8.py

Una volta installato verifichiamo che dpkgconv rilevi tutti i programmi che 
servono digitando::

  ./dpgconv-8.py

Dovrebbe dire qualcosa di simile a::

   mpeg_stat -- MPEG Analyzer for MPEG I video streams (version 2.2b)
   MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team
   MEncoder 2:1.0~rc2-0ubuntu17 (C) 2000-2007 MPlayer Team
   It seems we found all programs :)...continuing
   ______________________________________________

Conversione dei filmati
=======================
La conversione è semplicissima, per convertire il video `esempio.avi` si usa
il comando::

  ./dpgconv-8.py esempio.avi

La conversione potrebbe durare un po', specialmente su macchine lente. Il 
risultato della conversione è un file con lo stesso basename ma con estensione 
.dpg (nel nostro caso `esempio.dpg`), naturalmente questo file è quello che 
deve essere copiato sulla vostra flash card e visualizzato sul Nintendo DS.

Qualità video/audio
===================
Non aspettatevi un'alta qualità video, il Nintendo DS non è stato progettato è 
limitato e non è stato progettato per questo. Se avete bisogno di una 
qualità alta forse avete bisogno di qualcos'altro, come la PSP. 

References
==========
 - Home page di dpgconv: http://theli.is-a-geek.org/blog/static/dpgconv
 - MoonShell on Wikipedia: http://en.wikipedia.org/wiki/MoonShell
 - DPG on Wikipedia: http://en.wikipedia.org/wiki/NDs-mPeG
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6762121817206211278?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6762121817206211278/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6762121817206211278' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6762121817206211278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6762121817206211278'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/03/come-vedere-i-film-sul-nintendo-ds.html' title='Come vedere i film sul Nintendo DS'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-9139971244372638302</id><published>2009-02-04T20:20:00.003+01:00</published><updated>2009-02-04T21:13:48.373+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='english'/><title type='text'>Building Chandler on an am64 Ubuntu</title><content type='html'>After many days of tries finally I managed to run &lt;a href="http://chandlerproject.org/"&gt;Chandler Desktop&lt;/a&gt; on my Ubuntu.
I had tried the binary installation but it didn't work, running chandler the following problem is reported:

&lt;pre name="code" class="shell:nogutter:nocontrol"&gt;
$ chandler
...
ImportError: /home/andrea/.python-eggs/PyICU-0.8-py2.5-linux-i686.egg-tmp/_PyICU.so: wrong ELF class: ELFCLASS32
&lt;/pre&gt;
Fortunately you can always build it from sources. Unfortunately downloading the sources and compiling take much time and is not so easy know which packages you need to build it.

To install all(? surely I missed someone) the needed packages do:
&lt;pre name="code" class="shell:nogutter:nocontrol"&gt;
sudo apt-get install libicu-dev
sudo apt-get install libssl-dev
sudo apt-get install python-gdata
sudo apt-get install ant
sudo apt-get install default-jdk
sudo apt-get install lib32icu38
sudo apt-get install curl
&lt;/pre&gt;
To get the sources and build them:
&lt;pre name="code" class="shell:nogutter:nocontrol"&gt;
svn checkout http://svn.osafoundation.org/chandler/trunk chandler
cd chandler
cd external
export BUILD_ROOT=$(pwd)
make world # wait ... wait ... wait
&lt;/pre&gt;
Now, if the build succeed you can run chandler with:
&lt;pre name="code" class="shell:nogutter:nocontrol"&gt;
cd ../chandler
./chandler
&lt;/pre&gt;
If the build fails you, probably, need to install some package that I missed. To discover which package you can use google. For example if you got this error:
&lt;pre name="code" class="shell:nogutter:nocontrol"&gt;
SWIG/_m2crypto.i:23: Error: Unable to find 'openssl/opensslv.h'
&lt;/pre&gt;

You should search on google these words &lt;a href="http://www.google.it/search?q=openssl%2Fopensslv.h+Ubuntu+filelist"&gt;"openssl/opensslv.h Ubuntu filelist"&lt;/a&gt;, the first results should be the page of missing package, in this case is

&lt;quote&gt;
&lt;span style="font-style: italic;"&gt;  http://packages.ubuntu.com/feisty/amd64/&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;libssl-dev&lt;/span&gt;&lt;span style="font-style: italic;"&gt;/filelist&lt;/span&gt;
&lt;/quote&gt;

So it's simple add the needed package:
&lt;pre name="code" class="shell:nogutter:nocontrol"&gt;
apt-get install libssl-dev
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-9139971244372638302?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/9139971244372638302/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=9139971244372638302' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9139971244372638302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9139971244372638302'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/02/building-chandler-on-am64-ubuntu.html' title='Building Chandler on an am64 Ubuntu'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3541453420560079511</id><published>2009-01-19T20:58:00.002+01:00</published><updated>2010-02-16T09:19:40.865+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='screen'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='italiano'/><title type='text'>Utility screen</title><content type='html'>&lt;pre&gt;
Come usare screen
=================
Questo articolo introduce l'utilizzo dell'utility screen. L'articolo è scritto
per la mia fidanzata, ciò nonostante, l'articolo potrebbe risultare utile 
anche ad altre persone.

La mia fidanzata deve utilizzare PuTTY per collegarsi ai computer del lavoro 
sui quali avvia programmi di calcolo scientifico. L'esecuzione di questi 
programmi dura spesso parecchie ore. Il problema è che, durante l'esecuzione di 
questi programmi, la connessione potrebbe cadere con il risultato di terminare 
prematuramente l'esecuzione del programma. 

Dato che questa scocciatura capita spesso alla mia fidanzata e dato che le 
voglio bene le spiegherò come evitare questo problema.

Nel mondo unix e linux esistono due soluzioni a questo problema e si tratta 
delle utility `nohup` e `screen`. In questo articolo spiegherò come usare 
`screen`. 

Cos'è screen
------------
`screen` è un utility che permette di creare terminali virtuali che rimangono
attivi anche dopo aver fatto il log out dal sistema o dopo che la connessione è
interrotta.

Esempio di utilizzo
-------------------
Dopo esserci collegati al server con PuTTY avviamo `screen`:

 $ screen

Apparirà una schermata che riporta qualche informazioni riguardanti il copyright
e la licenza di utilizzo. Usiamo RETURN per chiudere questa schermata.
 
A questo punto saremo entrati nel terminale virtuale di screen.
Adesso possiamo avviare il programma di calcolo la cui durata è molto lunga. 
Dato che io non ho tale programma ne simulerò l'esecuzione usando il comando

 $ yes &gt; /dev/null

che ha durata indefinita.

Ora simuliamo l'interruzione del collegamento chiudendo la finestra di PuTTY.
Ricolleghiamoci al server (sempre con PuTTY) e scriviamo:

 $ screen -r 

e magicamente recuperiamo la sessione precedente dove il comando `yes` (o il 
programma di calcolo) sta ancora girando.

Adesso supponiamo che il comando non abbia ancora terminato ma vogliamo comunque
tornare in possesso della shell. Per uscire da screen usiamo
la combinazione di tasti "CTRL+A, D". Questo dovrebbe farci ritornare alla shell
iniziale.

    $ screen -r
    [detached]
    $

Lo screen è passato allo stato "Detached", cioé è ancora attivo ma non è più 
associato a nessun terminale.

Per recuperare questo screen è sufficente scrivere:

 $ screen -r

Infine, per terminare uno screen è sufficiente terminare la shell caricata da 
esso, quindi (quasi per tutte le shell) si tratta di usare il comando exit.

 $ exit

Avviare molti screen
--------------------
E' possibile tenere in esecuzione più di uno screen alla volta. Per avviare un 
secondo screen è sufficiente scrivere il comando screen, anche da un terminale 
screen.
Con il comando "screen -ls" invece è possibile elencare gli screen attualmente 
in esecuzione, ad esempio 

 $ screen -ls
 There are screens on:
        2893.pts-0.ubuntu       (01/18/2009 07:40:56 PM)        (Attached)
        2854.pts-3.ubuntu       (01/18/2009 07:37:57 PM)        (Attached)
        2727.pts-0.ubuntu       (01/18/2009 07:35:23 PM)        (Detached)
 3 Sockets in /var/run/screen/S-andrea.

L'output nell'esempio mostra che ci tre "screen" attivi. Due screen sono nello 
stato "Attached" (cioè attualmente visualizzato su un terminale), mentre un 
terzo si trova nello stato "Detached" (cioé in esecuzione in background, quindi
non visibile su nessun terminale).

Per ogni "screen" è inoltre indicato un numero identificativo. Il numero 
identificativo è utile per specificare su quale istanza si vuole eseguire un 
comando, per esempio è possibile scrivere:

 $ screen -r 2727
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3541453420560079511?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3541453420560079511/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3541453420560079511' title='3 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3541453420560079511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3541453420560079511'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/01/utility-screen.html' title='Utility screen'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-950289825542265713</id><published>2009-01-07T19:50:00.002+01:00</published><updated>2009-01-07T21:34:11.226+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fun'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='italiano'/><title type='text'>Scrivania</title><content type='html'>Avete presente la Scrivania del computer? 
Come no, mah sì quella cosa che c'e' dietro tutte le finestre, quella dove ci puoi mettere lo sfondo... come? Voi la chiamate "Desktop"? ... Sì in effetti anch'io ho sempre fatto così, ... chissà poi che cosa si sono fumati i traduttori della versione italiana di Gnome? 

Avete un installazione di GNU/Linux con Gnome con lingua di sistema italiana? Provate un po' a vedere in che modo improponibile hanno chiamato la cartella che dovrebbe essere "/home/andrea/Desktop" ... l'hanno chiamata "/home/andrea/Scrivania" !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-950289825542265713?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/950289825542265713/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=950289825542265713' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/950289825542265713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/950289825542265713'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2009/01/scrivania.html' title='Scrivania'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7679778792555160409</id><published>2008-12-30T21:20:00.004+01:00</published><updated>2008-12-30T21:50:23.553+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='articles'/><title type='text'>Creare un repository personale svn+ssh://</title><content type='html'>&lt;span style="font-size:180%;"&gt;Ingredienti (requisiti):&lt;/span&gt;
&lt;ul&gt;&lt;li&gt;Un server unix (o unix-like) accessibile da internet
&lt;/li&gt;&lt;li&gt;Subversion installato sul server unix&lt;/li&gt;&lt;li&gt;Una macchina Windows che fa da client
&lt;/li&gt;&lt;li&gt;TortoiseSVN e PuTTY installati sulla macchina Windows&lt;/li&gt;&lt;li&gt;Una file .ppk con la propria chiave SSH
&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:180%;"&gt;Procedimento:&lt;/span&gt;

Accedere al server unix e creare il repository, con  i comandi:
&lt;code&gt;
mkdir ~/svn-repo
svnadmin create  ~/svn-repo
&lt;/code&gt;
Installare la propria chiave pubblica sul server unix:

&lt;code&gt;mkdir ~/.ssh
chmod 700 ~/.ssh
echo "echo &amp;lt;my-rsa-key&amp;gt; &lt;/code&gt;&lt;code&gt;&amp;gt;&lt;/code&gt;&lt;code&gt;&amp;gt; &lt;/code&gt;&lt;code&gt;.ssh/authorized_keys"&lt;/code&gt;

Per conoscere la propria chiave pubblica aprite il vostro file .ppk con PuTTYgen. Se non avete un file .ppk createlo (sempre con PuTTYgen).

Usate Pageant per caricare la chiave .ppk.

Verificate che quando vi collegate con PuTTY che l'autenticazione avvenga senza dover immettere la password.

A questo punto provate a collegarvi al server con TortoiseSVN usando il seguente url of repository:
&lt;code&gt;
svn+ssh://username@server-unix.com/home/username/svn-repo/
&lt;/code&gt;
E' importante che l'url contenga anche la specifica dello username (la parte "serenity@") altrimenti TortoiseSVN te lo chiederebbe e ciò sarebbe noioso.

Se non conoscete il path assoluto usate il comando "pwd" dalla shell del server unix.

&lt;span style="font-size:180%;"&gt;Commenti:&lt;/span&gt;
&lt;ul&gt;&lt;li&gt;L'utilizzo di Pageant e dell'autenticazione basata su chiave pubblica è consigliato perché altrimenti  altrimenti dovresti  riscrivere più e più volte la password durante anche una singola operazione.&lt;/li&gt;&lt;li&gt;Il server svn+ssh:// è comodo perché è più facile da installare che il corrispondente servizio http:// ma ha una serie di svantaggi, questi sono descritti nel libro &lt;a href="http://svnbook.red-bean.com/en/1.5/svn.serverconfig.choosing.html#svn.serverconfig.choosing.svn-ssh"&gt;svnbook&lt;/a&gt;.
&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7679778792555160409?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7679778792555160409/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7679778792555160409' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7679778792555160409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7679778792555160409'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/12/creare-un-repository-personale-svnssh.html' title='Creare un repository personale svn+ssh://'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4170973609336328265</id><published>2008-12-26T21:08:00.003+01:00</published><updated>2010-02-18T13:13:11.844+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pixels'/><category scheme='http://www.blogger.com/atom/ns#' term='mario bros'/><title type='text'>Pixel nostalgia</title><content type='html'>Per i nostalgici, per quelli che dicono "non fanno più i giochi di una volta", per quelli che si ricordano quando si riusciva a contare i pixel degli sprites e che magari hanno provato pure a riprodurre i personaggi  su carta millimetrata ... per tutti voi questo &lt;a href="http://www.spritestitch.com/"&gt;sito&lt;/a&gt; fa per voi.

&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.spritestitch.com/wp-content/uploads/2008/09/epicmariodone.jpg"&gt;&lt;img style="cursor: pointer; width: 500px; height: 141px;" src="http://www.spritestitch.com/wp-content/uploads/2008/09/epicmariodone.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.spritestitch.com/wp-content/uploads/2008/08/mariopowerups.jpg"&gt;&lt;img style="cursor: pointer; width: 120px; height: 150px;" src="http://www.spritestitch.com/wp-content/uploads/2008/08/mariopowerups.jpg" alt="" border="0" /&gt;&lt;/a&gt;

&lt;br/&gt;
Se volete farmi un regalo, avete tempo e sapete ricamare prendete pure spunto dal sito in questione. Anche le torte fatte a quadratini vanno bene.
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.spritestitch.com/wp-content/uploads/2008/08/marioafghan.jpg"&gt;&lt;img style="cursor: pointer; width: 450px; height: 338px;" src="http://www.spritestitch.com/wp-content/uploads/2008/08/marioafghan.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4170973609336328265?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4170973609336328265/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4170973609336328265' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4170973609336328265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4170973609336328265'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/12/pixel-nostalgia.html' title='Pixel nostalgia'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6991740963975983790</id><published>2008-12-11T21:50:00.002+01:00</published><updated>2008-12-11T22:23:04.979+01:00</updated><title type='text'>Installare setuptools per python 2.6</title><content type='html'>&lt;div&gt;   &lt;div&gt;     &lt;div&gt;       Lo sapete che Python è produttivo, vero?

&lt;i style="color: rgb(0, 0, 0);"&gt;E' così produttivo che c'e' una libreria per fare gli enum. &lt;/i&gt;
Già inclusa nell'installazione ? No, te la devi scaricare ...
&lt;i style="color: rgb(0, 0, 0);"&gt;Come? Semplice! Python è produttivo, basta usare il comando easy_install! Basta fare &lt;/i&gt;
&lt;pre class="literal-block"&gt;&lt;span&gt;    &lt;/span&gt;easy_install enum&lt;/pre&gt;       Ok! Bello! Ma non va. Come mai?
&lt;span style="color: rgb(0, 0, 0);"&gt;Perché prima ti devi installare easy_install! Basta andare sulla pagina ufficiale di &lt;/span&gt;&lt;a style="color: rgb(0, 0, 0);" href="http://pypi.python.org/pypi/setuptools#downloads"&gt;setuptools&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; per farlo.&lt;/span&gt;
Pero' ...
&lt;ul&gt;&lt;li&gt;io ho Windows         &lt;/li&gt;&lt;li&gt;           io l'ultima versione (stabile) di Python la 2.6.1
        &lt;/li&gt;&lt;li&gt;           sulla pagina di Download di setuptools non c'e' l'installer per la 2.6.1!         &lt;/li&gt;&lt;/ul&gt;      
Va bene allora cosa posso fare? Ci sono tante possibilità (certo python è produttivo), tutte elencate nella pagina , eccole:
      &lt;ul&gt;&lt;li&gt; Posso sempre installarlo con easy_install ... -_- ... certo posso installare il programma che non ho con il programma che non ho! &lt;/li&gt;&lt;li&gt;           Posso installarlo usando il mio comando sh, con
          &lt;pre class="literal-block"&gt;sh setuptools-0.6c9-py2.6.egg&lt;/pre&gt;         &lt;/li&gt;&lt;/ul&gt;       &lt;div style="margin-left: 40px;"&gt; peccato che funziona con tutto (cygwin, linux, unix, ...) ma non con Windows ... per forza non c'e' la bash in Windows (o per lo meno non ce ne sono molte).
      &lt;/div&gt;      
    &lt;/div&gt;   &lt;/div&gt;   La soluzione comunque c'e', ma non si trova sulla graziosa pagina di setuptools, &lt;a href="http://mail.python.org/pipermail/distutils-sig/2008-November/010502.html" id="x9gh" title="ma si trova con google"&gt;ma si trova con google&lt;/a&gt; ed è questa.
 
  &lt;ul&gt;&lt;li&gt;       Ti scarichi il file &lt;span style="white-space: nowrap;"&gt;&lt;a href="http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c9.tar.gz#md5=3864c01d9c719c8924c455714492295e"&gt;setuptools-0.6c9.tar.gz&lt;/a&gt; &lt;/span&gt;dalla pagina di &lt;a href="http://pypi.python.org/pypi/setuptools#downloads" id="ez6d" title="setuptools"&gt;setuptools&lt;/a&gt;      &lt;/li&gt;&lt;li&gt;       Lo decomprimi (con 7-Zip per esempio)     &lt;/li&gt;&lt;li&gt;       E crei da solo la distribuzione per Windows     &lt;/li&gt;&lt;/ul&gt;   &lt;pre class="literal-block" style="margin-left: 40px; font-family: Courier New;"&gt;cd setuptools-0.6c9

python setup.py bdist_exe

&lt;/pre&gt;   &lt;ul&gt;&lt;li&gt;       Si dovresti ottenere un file setuptools-0.6c9.win32.zip, che contiene le cartelle
           &lt;/li&gt;&lt;ul&gt;&lt;li&gt;         Python26       &lt;/li&gt;&lt;ul&gt;&lt;li&gt;           Libs         &lt;/li&gt;&lt;li&gt;           Scripts         &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;/div&gt;
&lt;ul&gt;&lt;li&gt;     Le cartelle Libs e Script vanno messe sotto C:\Python26   &lt;/li&gt;&lt;li&gt;     La cartella C:\Python26\Scripts va aggiunta al PATH.   &lt;/li&gt;&lt;/ul&gt;
A questo punto dovreste essere in grado di usare easy_install...

&lt;div style="margin-left: 40px;"&gt;&lt;span style="font-family: Courier New;"&gt;C:\Documents and Settings\Andrea&gt;easy_install enum&lt;/span&gt;
&lt;span style="font-family: Courier New;"&gt;Searching for enum&lt;/span&gt;
&lt;span style="font-family: Courier New;"&gt;Reading http://pypi.python.org/simple/enum/&lt;/span&gt;
&lt;span style="font-family: Courier New;"&gt;Best match: enum 0.4.3&lt;/span&gt;
&lt;span style="font-family: Courier New;"&gt;...&lt;/span&gt;
&lt;/div&gt;
Finalmente posso usare gli enum ... in Java erano già dentro il linguaggio ... alla faccia della produttività.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6991740963975983790?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6991740963975983790/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6991740963975983790' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6991740963975983790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6991740963975983790'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/12/installare-setuptools-per-python-26.html' title='Installare setuptools per python 2.6'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3803795367411237639</id><published>2008-11-16T18:56:00.005+01:00</published><updated>2010-02-18T13:11:30.292+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='italiano'/><title type='text'>Python è produttivo?</title><content type='html'>&lt;span style="font-size:180%;"&gt;Introduzione&lt;/span&gt;
In giro per la rete si dice che "Python è più produttivo di Java".
Uno degli articoli che ne parla è http://www.ferg.org/projects/python_java_side-by-side.html. La tesi di base dell'articolo può essere riassunta con la seguente frase: "Dato che i programmi in Python sono più corti dei programmi in Java allora si fa prima a scrivere un programma in Python".
&lt;br/&gt;
Questa affermazione non mi ha mai convinto più di tanto ma sembra che sia entrata nella cultura popolare dei programmatori, almeno della parte che usa Python.
&lt;br/&gt;
Io mi sto trovando male con Python, e non mi sento più produttivo, di seguito vi racconto una delle mie ultime esperienze con Python e che dovrebbe farvi capire quali sono le mie perplessità riguardo a questa teoria della maggiore produttività.
&lt;br/&gt;
Sono conscio del fatto che potrei non essere produttivo perché non lo conosco abbastanza bene, oppure perché conosco troppo bene il Java. Il problema è: quanto studio prima di diventare "produttivi" in Python?
&lt;br/&gt;
&lt;span style="font-size:180%;"&gt;Personalizzare la classe OptionParser.
&lt;/span&gt;La classe optparse.OptionParser della libreria standard di python aiuta ad
implementare in maniera semplice un'interfaccia a linea di comando.
&lt;br/&gt;
La documentazione su http://www.python.org/doc/2.5.2/lib/module-optparse.html
spiega come utilizzare la classe nel caso più semplice.
&lt;br/&gt;
&lt;pre name="code" class="python:nogutter:nocontrols"&gt;
from optparse import OptionParser

parser = OptionParser()
parser.add_option("-f", "--file", dest="filename",
                  help="write report to FILE", metavar="FILE")
parser.add_option("-q", "--quiet",
                  action="store_false", dest="verbose", default=True,
                  help="don't print status messages to stdout")

(options, args) = parser.parse_args()
&lt;/pre&gt;
&lt;br/&gt;
OptionParser è configurabile. Per esempio è possibile specificare un oggetto 
formatter diverso da quello di default per avere maggiore controllo sul 
formato del messaggio di help.
&lt;br/&gt;
La signature del costruttore di OptionFormatter è la seguente:
&lt;br/&gt;
&lt;pre name="code" class="python:nogutter:nocontrols"&gt;
class OptionParser (OptionContainer):
    def __init__(self,
                 usage=None,
                 option_list=None,
                 option_class=Option,
                 version=None,
                 conflict_handler="error",
                 description=None,
                 formatter=None,
                 add_help_option=True,
                 prog=None,
                 epilog=None):
&lt;/pre&gt;
&lt;br/&gt;
Per cui per utilizzare un oggetto formatter diverso da quello predefinito 
basterebbe fare:
&lt;br/&gt;
&lt;pre name="code" class="python:nogutter:nocontrols"&gt;
from optparse import OptionParser

parser = OptionParser(formatter=MyFormatter())
parser.add_option("-f", "--file", dest="filename",
                  help="write report to FILE", metavar="FILE")
parser.add_option("-q", "--quiet",
                  action="store_false", dest="verbose", default=True,
                  help="don't print status messages to stdout")

(options, args) = parser.parse_args()
&lt;/pre&gt;

Ma rimane il problema: come costruisco la classe MyFormatter? Quali metodi 
deve implementare? La documentazione del costruttore di OptionParser non ci 
aiuta: non c'è! La signature del metodo non ci aiuta: in Python non è richiesto 
e non si usa specificare l'interfaccia che un oggetto in input deve 
implementare. Come faccio a disegnare la mia implementazione di Formatter se non 
esiste una specifica dell'interfaccia?
&lt;br/&gt;
Perché dicono che il python è più produttivo? Dicono che Python è più 
produttivo "perché scrivi meno codice". E' questo il codice che si risparmia 
di scrivere? Lo scrittore di OptionParser ha risparmiato due secondi ha 
scrivere il nome dell'interfaccia nella signature del metodo, bene. Io quanto 
tempo devo perdere per capire quali sono i metodi che devo implementare per 
scrivere un Formatter? Per andarmi a rivedere il codice sorgente della classe 
OptionParser e le altre classi del modulo optparse?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3803795367411237639?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3803795367411237639/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3803795367411237639' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3803795367411237639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3803795367411237639'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/11/python-produttivo.html' title='Python è produttivo?'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6821360176917670460</id><published>2008-11-11T00:18:00.001+01:00</published><updated>2008-11-11T00:20:01.750+01:00</updated><title type='text'>Pronti ad iscrivervi al Registro degli Operatori di Comunicazione?</title><content type='html'>Ecco la notizia:
&lt;a href="http://punto-informatico.it/2468674/PI/News/camera-manda-avanti-ddl-anti-blog.aspx"&gt;http://punto-informatico.it/2468674/PI/News/camera-manda-avanti-ddl-anti-blog.aspx&lt;/a&gt;

Vado a letto, la commenterò un'altra volta.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6821360176917670460?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6821360176917670460/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6821360176917670460' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6821360176917670460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6821360176917670460'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/11/pronti-ad-iscrivervi-al-registro-degli.html' title='Pronti ad iscrivervi al Registro degli Operatori di Comunicazione?'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6774482462702422350</id><published>2008-10-20T23:04:00.008+02:00</published><updated>2008-10-22T10:35:14.775+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vacanze'/><category scheme='http://www.blogger.com/atom/ns#' term='viaggi'/><title type='text'>Gita Grazzano Visconti</title><content type='html'>&lt;a style="" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_bikdOOm3kpc/SP0ALtgXmcI/AAAAAAAABeo/WVRpDgIr6zE/s1600-h/100_2883-1.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_bikdOOm3kpc/SP0ALtgXmcI/AAAAAAAABeo/WVRpDgIr6zE/s200/100_2883-1.JPG" alt="" id="BLOGGER_PHOTO_ID_5259360141032528322" border="0" /&gt;&lt;/a&gt;
Sabato scorso io e la mia fidanzata (che amo tantissimo) siamo andati a visitare Grazzano Visconti.

L'idea è stata di Elisa, io guardavo con sospetto l'idea di visitare un paese medievale ricostruito. Nonostante questo ho scoperto che un certo fascino nostalgico questo posto ce l'ha soprattutto per la sua storia. Ma cominciamo dall'inizio...

Cos'è Grazzano Visconti? E' un paese dall'aspetto e storia particolare. Lo chiamano Villaggio Medievale, in realtà si tratta di una ricostruzione neo-mediovale che hai giorni nostri assomiglia più che altro ad un parco a tema.

Sebbene sia facile obiettare che non si tratta affatto del tipico villaggio medievale (a quei tempi le case erano piu' che altro di legno non di muratura) dopo uno sguardo più attento ci si accorge del suo vera essenza: il tentativo di preservare una serie di stili e costumi che all'inizio del secolo stavano per andare perduti.

Le case del borgo sono state costruite riprendendo gli stili e in certi casi copiando edifici storici destinati alla distruzione per fare posto a edifici più moderni. L'artefice di tutto questo era il facoltoso &lt;a href="http://it.wikipedia.org/wiki/Giuseppe_Visconti"&gt;Giuseppe Visconti&lt;/a&gt; che in pieno spirito romantico voleva preservare il piu' possibile il mondo che stava scomparendo sotto i suoi occhi.

Il borgo fu anche sede di un esperimento di socialismo utopico da parte dello stesso Visconti. L'idea era quella di costruire una società ideale che si auto-preservasse nel tempo. L'economia del borgo si sarebbe basata sulle botteghe d'arte gestite dai suoi abitanti. Per avviare quest'idea Giuseppe istituì una scuola d'arte presso il paese e predispose che le case fossero costruite per ospitare le botteghe.

Ogni casa era a due piani. Al primo piano vi sarebbe dovuta essere la bottega al secondo l'abitazione. In questo modo la città sarebbe rimasta sempre attiva perché la gente avrebbe abitato e lavorato nello stesso luogo e il paese non sarebbe diventato deserto di sera.

Secondo la visione socialista di Giusppe tutti dovevano perlomeno apparire uguali nonostante le differenze di status sociale. Fu istituito il costume ufficiale del paese (in stile medievale) che tutti (dal più povero al più ricco) usavano.

Adesso l'esperimento non so dire se l'esperimento abbia funzionato o meno. Magari ha funzionato in parte. Credo che oggi l'economia del borgo si basi essenzialmente sul turismo e oggi non si usano più gli abiti ufficiali. Il paese pero' è rimasto e le case che implementano gli stili che Giuseppe voleva preservare ci sono ancora e probabilmente il turismo aiuterà a preservarle.

&lt;span style="font-weight: bold;font-size:100%;" &gt;Update 2008-10-22 &lt;/span&gt;
Ecco le foto:
&lt;embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="144" height="96" flashvars="host=picasaweb.google.com&amp;captions=1&amp;RGB=0x000000&amp;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fandrea.francia%2Falbumid%2F5259357678008382737%3Fkind%3Dphoto%26alt%3Drss%26authkey%3DV6Img539XMc" pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6774482462702422350?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6774482462702422350/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6774482462702422350' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6774482462702422350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6774482462702422350'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/10/gita-grazzano-visconti.html' title='Gita Grazzano Visconti'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_bikdOOm3kpc/SP0ALtgXmcI/AAAAAAAABeo/WVRpDgIr6zE/s72-c/100_2883-1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-237062521293939749</id><published>2008-10-16T23:06:00.005+02:00</published><updated>2008-10-21T23:53:33.260+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='usabilità'/><title type='text'>To change this template, choose Tools | Templates</title><content type='html'>Every time I create a new class in Netbeans it creates a file with this text an the top of the .java file:&lt;pre name="code" class="java:nogutter"&gt;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
&lt;/pre&gt;What is this? I dont want it? How to remove it? I try to follow the instructions.

I select from the menu Tools &gt; Template and the Template Manager appears.
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_bikdOOm3kpc/SPeuiZaCruI/AAAAAAAABbs/xZVJnx2Qg6s/s1600-h/Template+Manager.jpg"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_bikdOOm3kpc/SPeuiZaCruI/AAAAAAAABbs/xZVJnx2Qg6s/s400/Template+Manager.jpg" alt="" id="BLOGGER_PHOTO_ID_5257862995937242850" border="0" /&gt;&lt;/a&gt;

Now. Where I should go?
I asked this to myself for a lot of time...
Now I discovered the solution, I should choose

   License &gt; Default Licenses

then click Open in Editor. This will open the Default License file that you can easily customize:&lt;pre name="code" class="text:nogutter"&gt;
&lt;#if licenseFirst??&gt;
${licenseFirst}
&lt;!--#if--&gt;
${licensePrefix}To change this template, choose Tools | Templates
${licensePrefix}and open the template in the editor.
&lt;#if licenseLast??&gt;
${licenseLast}
&lt;!--#if--&gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-237062521293939749?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/237062521293939749/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=237062521293939749' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/237062521293939749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/237062521293939749'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/10/to-change-this-template-choose-tools.html' title='To change this template, choose Tools | Templates'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_bikdOOm3kpc/SPeuiZaCruI/AAAAAAAABbs/xZVJnx2Qg6s/s72-c/Template+Manager.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6361249926176258411</id><published>2008-08-05T22:45:00.003+02:00</published><updated>2008-08-06T17:27:35.631+02:00</updated><title type='text'>Cosa succede l'8 Agosto?</title><content type='html'>Alle ore 8.08PM (ora di Pechino) del 8 agosto 2008 inizieranno le Olimpiadi di Pechino.
Da noi dovrebbero essere le 12:08 AM, almeno &lt;a href="http://it.answers.yahoo.com/question/index?qid=20080725034901AAwKoxw"&gt;così dicono&lt;/a&gt;.

Invece alle 02:45 AM saranno 31 anni da quando sono nato.
Alle 02:45 del 8 agosto 1977 emettevo il mio primo vagito. Era il mio primo tentativo di comunicare, per far sapere che c'ero e che mi sarebbe dispiaciuto essere coccolato un po'.

Il post di oggi non è tanto diverso da quel mio primo messaggio, solo un po' piu' sofisticato nella forma e nel mezzo. Quindi se mentre guardate la televisione, o ascoltate la radio, sentite che stanno iniziando le olimpiadi, se vi ricordate di questo post, e se vi va mandatemi gli auguri che mi faranno piacere.

Update 2008-08-06: ho modificato il post per renderlo meno patetico.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6361249926176258411?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6361249926176258411/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6361249926176258411' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6361249926176258411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6361249926176258411'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/08/cosa-succede-l8-agosto.html' title='Cosa succede l&apos;8 Agosto?'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4995531342043220604</id><published>2008-08-04T23:08:00.005+02:00</published><updated>2008-08-04T23:47:44.381+02:00</updated><title type='text'>Mediaset ha detto "Basta!"</title><content type='html'>Come sapete Mediaset &lt;a href="http://www.mediaset.it/corporate/salastampa/2008/comunicatostampa_4550_it.shtml"&gt;ha depositato &lt;/a&gt;un atto di citazione contro YouTube e Google per illecita diffusione e sfruttamento commerciale di file audio-video di proprietà delle società del Gruppo.

Hanno chiesto &lt;a href="http://www.google.it/search?hl=it&amp;amp;safe=off&amp;amp;q=quanto+%C3%A8+500000000+eur+in+eur%3F&amp;amp;btnG=Cerca&amp;amp;meta="&gt;500 fantamilioni di dobloni spaziali&lt;/a&gt; come risarcimento.

Sulla blogosfera un sacco di gente si schiera dalla parte di YouTube. Io mi chiedo: Perchè?

Io non so se YouTube deve dare tutti questi spaziodollari a Mediaset, ma mi chiedo: "Perché no?". Io sono sicuro che YouTube guadagna molti soldi grazie ai video di cui non si pone neanche il problema di avere il diritto di ridistribuire. Altrimenti la Google non l'avrebbe comprata.

Quello che mi fa ridere e pensare che YouTube potrebbe semplicemente difenderci dicendo: "Ma non li ho messi io! Li hanno messi gli utenti ... vai a chiedere i soldi a loro..." Mi fa ridere pensare che questi utenti siano le stesse persone che difenderebbero YouTube.

Cari utenti YouTube avete &lt;a href="http://www.youtube.com/watch?v=jWg-xN9JvH4"&gt;toppato&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4995531342043220604?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4995531342043220604/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4995531342043220604' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4995531342043220604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4995531342043220604'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/08/mediaset-ha-detto-basta.html' title='Mediaset ha detto &quot;Basta!&quot;'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8177988761000797813</id><published>2008-07-30T10:57:00.004+02:00</published><updated>2008-07-30T11:29:26.036+02:00</updated><title type='text'>Print the stack trace in bash</title><content type='html'>Ieri ho partorito una semplice funzione che trovo molto comoda per debuggare gli scritp shell, si chiama print_stack_trace.

print_stack_trace andrebbe invocata quando si incontra una condizione di errore e si vuole risalire a qual'e' stato il flusso delle chiamate che l'ha provocata.

Un esempio di utilizzo è il seguente:
&lt;pre&gt;save_to_file() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;local filename="$1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if [[ -e $filename ]]; then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo "File already exists: $filename" &gt;2
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print_stack_trace
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi

... # scrittura su file
}
&lt;/pre&gt;Quando per qualsiasi motivo la funzione save_to_file() è invocata con un argomento non valido stampa un messaggio di errore seguito dall'elenco delle chiamate a funzione che hanno portato all'errore. Per esempio:

&lt;pre&gt;
File already exists: test-file
Stack trace:
save_to_file(./print-stack-trace.bash:13)
function_three(./print-stack-trace.bash:22)
function_two(./print-stack-trace.bash:26)
function_one(./print-stack-trace.bash:30)
main(./print-stack-trace.bash:33)
&lt;/pre&gt;

La funzione print_stack_trace è la seguente:
&lt;pre&gt;
# print_stack_trace: print the stack trace in bash
#
# Copyright (C) 2008 Andrea Francia Trivolzio(PV) Italy
# See also: http://andreafrancia.it/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see &lt;http: org="" licenses=""&gt;.
#
print_stack_trace() {
echo "Stack trace:"
for (( i=1; i&lt;${#FUNCNAME[@]}; i++)); do      echo " ${FUNCNAME[$i]}(${BASH_SOURCE[$i]}:${BASH_LINENO[$i-1]})"   done } &lt;/http:&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8177988761000797813?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8177988761000797813/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8177988761000797813' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8177988761000797813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8177988761000797813'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/07/print-stack-trace-in-bash.html' title='Print the stack trace in bash'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-735027899026578836</id><published>2008-07-24T21:27:00.005+02:00</published><updated>2008-07-24T22:01:15.234+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>coLinux - Linux dentro Windows</title><content type='html'>In questi giorni ho reinstallato coLinux.
Sapete cos'è?
E la manna dal cielo per quelli che come me hanno deciso di tenere tutto su Windows ma hanno ancora bisogno di usare Linux. E' un software che consente di avviare il kernel di Linux all'interno di Windows.

Una volta avviato coLinux è possibile accedervi sia attraverso la console (virtuale) oppure via rete (attraverso una scheda di rete virtuale).

Io lo uso per continuare a sviluppare il mio programma per linux senza dover riavviare il computer. Quando ne ho bisogno mi ci collego in ssh attraverso putty e faccio quello che devo fare.

Sul mio sito su google sites ho creato una &lt;a href="http://sites.google.com/site/andreafrancia/articles/colinux"&gt;pagina&lt;/a&gt; che riporta un po' di appunti riguardo coLinux.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-735027899026578836?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/735027899026578836/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=735027899026578836' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/735027899026578836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/735027899026578836'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/07/colinux-linux-dentro-windows.html' title='coLinux - Linux dentro Windows'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4289597072936739790</id><published>2008-07-17T20:30:00.003+02:00</published><updated>2008-07-17T20:36:44.776+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='amici'/><title type='text'>Un nuovo dottore</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://images4.wikia.nocookie.net/en.futurama/images/thumb/e/e6/Clamps.jpg/200px-Clamps.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 148px; height: 168px;" src="http://images4.wikia.nocookie.net/en.futurama/images/thumb/e/e6/Clamps.jpg/200px-Clamps.jpg" alt="" border="0" /&gt;&lt;/a&gt;Da oggi abbiamo un nuovo &lt;span style="font-size:78%;"&gt;ingegnereedilebarra&lt;/span&gt;Architetto.
Complimenti Ingegnere!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4289597072936739790?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4289597072936739790/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4289597072936739790' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4289597072936739790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4289597072936739790'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/07/un-nuovo-dottore.html' title='Un nuovo dottore'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4959584636539364467</id><published>2008-07-17T01:05:00.002+02:00</published><updated>2008-07-17T01:14:10.530+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trash-cli'/><title type='text'>trash-cli incluso in Ubuntu e in Debian</title><content type='html'>Cercando su internet ho scoperto con mia grande sorpresa che il mio software è stato aggiunto sia a Ubuntu che a Debian:
&lt;ul&gt;&lt;li&gt;&lt;a href="http://packages.ubuntu.com/trash-cli"&gt;http://packages.ubuntu.com/trash-cli&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://packages.debian.com/trash-cli"&gt;http://packages.debian.com/trash-cli&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Credo che per installarlo basti fare:
    apt-get install trash-cli

Però dovrebbe funzionare solo sulle versioni intrepid di Ubuntu e unstable di Debian.

Provate e fatemi sapere.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4959584636539364467?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4959584636539364467/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4959584636539364467' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4959584636539364467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4959584636539364467'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/07/trash-cli-incluso-in-ubuntu-e-in-debian.html' title='trash-cli incluso in Ubuntu e in Debian'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6643006484454509889</id><published>2008-07-11T13:21:00.003+02:00</published><updated>2008-07-11T13:28:25.197+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Differenze tra AWT, Swing e SWT</title><content type='html'>Per Java sono disponibili tre diversi gui toolkit: awt, Swing,swt.

Perché esistono tre diverse soluzioni per lo stesso problema? Perché non esiste (ancora) una soluzione che va bene in tutti casi. Quest'&lt;a href="http://www.ibm.com/developerworks/grid/library/os-swingswt/"&gt;articolo&lt;/a&gt; che è stato recentemente segnalato su &lt;a href="news://it.comp.java"&gt;it.comp.java &lt;/a&gt;spiega i pregi, i difetti, e le particolarità di ognuna di queste tecnologie.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6643006484454509889?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6643006484454509889/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6643006484454509889' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6643006484454509889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6643006484454509889'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/07/differenze-tra-awt-swing-e-swt.html' title='Differenze tra AWT, Swing e SWT'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4604425894908075039</id><published>2008-07-01T00:03:00.006+02:00</published><updated>2009-01-11T23:52:59.917+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>L'ideona del loggingDecorator</title><content type='html'>Oggi ho partorito l'ideona del loggingDecorator.
Anche se sono sicuro che è già venuta a mille altre persone ve la dico lo stesso.

Fate finta che vi serve aggiungere ad ogni metodo dei messaggi di debug del tipo "sono entrato nel metodo", "sto uscendo dal metodo" o simili.

Uno con poca fantasia farebbe così:
&lt;pre name="code" class="java:nogutter"&gt;public void someMethod() {
  logger.debug("Begin of someMethod()");

  ... // corpo del metodo

  logger.debug("End of someMethod()");
}
&lt;/pre&gt;Io pero' dovevo debbuggare le chiamate a una classe che aveva molti metodi e non volevo usare il copia incolla. Ho preferito scomodare il design pattern decorator e la Java Reflection.

Ho usato:
&lt;pre name="code" class="java:nogutter"&gt;    EntityManager em = ...
  em  = LoggingDecorators.loggingDecorator(em, EntityManager.class)
&lt;/pre&gt;Avendo definito
&lt;pre name="code" class="java:nogutter"&gt;public class LoggingDecorators {
  private static final Logger logger =
          Logger.getLogger(LoggingDecorators.class.getName());

  public static &amp;lt;T&amp;gt; T loggingDecorator(
              final T target,
              final Class&amp;lt;T&amp;gt; targetClass) {
      return (T) Proxy.newProxyInstance(targetClass.getClassLoader(),
              new Class[] { targetClass}, new InvocationHandler() {

          public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
              logger.info("Begin of " + method);
              try {
                  return method.invoke(target, args);
              } catch(InvocationTargetException ex) {
                  throw ex.getCause();
              } finally {
                  logger.info("End of " + method);
              }
          }
      });
  }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4604425894908075039?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4604425894908075039/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4604425894908075039' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4604425894908075039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4604425894908075039'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/07/lideona-del-loggingdecorator.html' title='L&apos;ideona del loggingDecorator'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7182519887642783175</id><published>2008-06-23T22:04:00.003+02:00</published><updated>2008-06-23T22:11:33.627+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='viaggi'/><title type='text'>Foto del viaggio a Londra</title><content type='html'>La mia dolce metà (Elisa) ha messo su picasa le &lt;a href="http://picasaweb.google.it/princess.of.scotland/Londra2008061317?authkey=VGW0LPNlGlk"&gt;foto&lt;/a&gt; che abbiamo fatto a Londra durante il nostro ultimo viaggio. Guardatele se vi va.
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh3.ggpht.com/princess.of.scotland/SGAAwF0u2EI/AAAAAAAAAT0/ZWgFLaT5H8s/100_2617.JPG?imgdl=1"&gt;&lt;img style="cursor: pointer; width: 250px; height: 187px;" src="http://lh3.ggpht.com/princess.of.scotland/SGAAwF0u2EI/AAAAAAAAAT0/ZWgFLaT5H8s/100_2617.JPG?imgdl=1" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7182519887642783175?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7182519887642783175/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7182519887642783175' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7182519887642783175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7182519887642783175'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/06/foto-del-viaggio-londra.html' title='Foto del viaggio a Londra'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/princess.of.scotland/SGAAwF0u2EI/AAAAAAAAAT0/ZWgFLaT5H8s/s72-c/100_2617.JPG?imgdl=1' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-5904530694461446484</id><published>2008-06-21T16:26:00.002+02:00</published><updated>2008-06-21T16:30:35.741+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trash-cli'/><title type='text'>Su Linux.com esce un articolo riguardo a trash-cli</title><content type='html'>Ho scoperto che su linux.com è uscito un &lt;a href="http://www.linux.com/feature/138331"&gt;articolo&lt;/a&gt; che parla del mio progetto opensource.
Non vi dico quanto mi faccia piacere questa cosa.
Adesso ho capito perché il 17 giugno 2008 il mio sito ha ricevuto così tante visite.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-5904530694461446484?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/5904530694461446484/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=5904530694461446484' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5904530694461446484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5904530694461446484'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/06/su-linuxcom-esce-un-articolo-riguardo.html' title='Su Linux.com esce un articolo riguardo a trash-cli'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6062762229198453100</id><published>2008-06-20T21:35:00.007+02:00</published><updated>2008-06-20T22:03:59.376+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Relazioni molti a molti con JPA</title><content type='html'>Oggi ho imparato a fare le relazioni molti a molti con JPA.

E' abbastanza semplice. Ve lo spiego con un esempio.
Abbiamo due entità
&lt;ol&gt;&lt;li&gt;Book
&lt;/li&gt;&lt;li&gt;Author&lt;/li&gt;&lt;/ol&gt;Un libro puo' essere stato scritto da uno o piu' autori.
Un autore può aver scritto uno o piu' libri.

Per rendere la relazione basta usare @ManyToMany, nel nostro caso:

Book.java:
&lt;pre name="code" class="java:nogutter"&gt;
public class Book implements Serializable {
private Long id;
private List&amp;lt;Author&amp;gt; authors = new ArrayList&amp;lt;Author&amp;gt;();
protected String title;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="id")
public Long getId() {
    return id;
}

@ManyToMany(cascade=CascadeType.PERSIST)
public List&amp;lt;Author&amp;gt; getAuthors() {
    return authors;
}

public String getTitle() {
    return title;
}

public void setTitle(String title) {
    this.title = title;
}

public void setId(Long id) {
    this.id = id;
}

public void setAuthors(List&amp;lt;Author&amp;gt; authors) {
    this.authors = authors;
}

}
&lt;/pre&gt;
Author.java
&lt;pre name="code" class="java:nogutter"&gt;
@Entity
@Table(name="Autores")
public class Author implements Serializable {
private Long id;
protected String name;
private List&amp;lt;Book&amp;gt; books;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="id")
public Long getId() {
    return id;
}

@ManyToMany(mappedBy = "authors")
public List&amp;lt;Book&amp;gt; getBooks() {
    return books;
}

public String getName() {
    return name;
}

public void setId(Long id) {
    this.id = id;
}

public void setName(String name) {
    this.name = name;
}

public void setBooks(List&amp;lt;Book&amp;gt; books) {
    this.books = books;
}

}
&lt;/pre&gt;

Esempio di utilizzo:
&lt;pre name="code" class="java:nogutter"&gt;
EntityManager em = ...

Author author1 = new Author();
Author author2 = new Author();
Author author3 = new Author();

author1.setName("Pippo");
author1.setName("Pluto");
author1.setName("Paperino");

Book book1 = new Book();
book1.setTitle("Vivere a topolinia");
book1.getAuthors().add(author1);
book1.getAuthors().add(author2);
book1.getAuthors().add(author3);

Book book2 = new Book();
book2.setTitle("Vivere a Paperopoli");
book2.getAuthors().add(author3);

em.persist(book1);
em.persist(book2);
&lt;/pre&gt;&lt;span style="font-size:180%;"&gt;Nota sul mapping&lt;/span&gt;
Le relazioni molti a molti non possono essere espresse direttamente sui database relazionali, è infatti necessario introdurre una tabella che faccia da ponte. Nei casi semplici è possibile ignorare questi dettagli perché sono gestiti dal provider JPA.

Però nel caso la struttura del database sia già definita e necessario istruire JPA in modo che utilizzi la tabella ponte giusta. Questo si fa usando l'annotazione @JoinTable.

Per esempio nel caso la tabella ponte sia definita come:
&lt;pre name="code" class="sql:nogutter"&gt;CREATE TABLE "LIBROS_AUTORES" (
  "libros_id" BIGINT NOT NULL,
  "autores_id" BIGINT NOT NULL);
&lt;/pre&gt;Useremo annoteremo getAuthors nel seguente modo:
&lt;pre name="code" class="java:nogutter"&gt; @JoinTable(
    name="LIBROS_AUTORES",
    joinColumns=@JoinColumn(name="libros_id", referencedColumnName="id"),
    inverseJoinColumns=@JoinColumn(name="autores_id",referencedColumnName="id")
)
public List&amp;lt;Author&amp;gt; getAuthors() {
    return authors;
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6062762229198453100?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6062762229198453100/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6062762229198453100' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6062762229198453100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6062762229198453100'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/06/relazioni-molti-molti-con-jpa.html' title='Relazioni molti a molti con JPA'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3764294911796230055</id><published>2008-06-11T23:21:00.008+02:00</published><updated>2010-03-06T19:59:37.450+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='italiano'/><title type='text'>Dov'è il preprocessore di Java?</title><content type='html'>&lt;p&gt;
In C e C++ c'e' il preprocessore, e in Java?
In Java non c'è.
Solitamente il preprocessore in C o C++ si usa per fare una delle seguenti cose:
&lt;ol&gt;&lt;li&gt;definire costanti (vedi nota sotto)&lt;/li&gt;&lt;li&gt;mettere funzioni inline  (vedi nota sotto)
&lt;/li&gt;&lt;li&gt;gestire l'inclusione multipla degli header &lt;/li&gt;&lt;li&gt;includere selettivamente una parte machine dependent &lt;/li&gt;&lt;li&gt;attivare o disattivare il debug
&lt;/li&gt;&lt;/ol&gt;In Java queste necessità sono generalmente risolte in maniera diversa oppure non sono risolte perché non sono così sentite.&lt;/p&gt;

&lt;p&gt;Vediamole una per una.&lt;/p&gt;

&lt;h2&gt;1) Definire costanti&lt;/h2&gt;
Le costanti si definiscono con la parola chiave final, esempio:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
public static final double PI = 3,14;
&lt;/pre&gt;&lt;span style="font-size:180%;"&gt;2) Mettere funzioni inline&lt;/span&gt;
Le funzioni inline non si possono mettere in Java. In Java di solito queste ottimizzazioni di basso livello sono lasciate al compilatore e al compilatore JIT. L'unica cosa che si può fare è dichiarare una funzione final.
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;public static final int sum(int a, int b) {
return a+b;
}
&lt;/pre&gt;Se il compilatore vuole potrebbe decidere di mettere questa funzione inline, ma non è garantito.

&lt;br/&gt;
&lt;span style="font-size:180%;"&gt;3) Gestire l'inclusione multipla degli header&lt;/span&gt;
Questo problema in Java non esiste in quanto non ci sono header files.

&lt;br/&gt;
&lt;span style="font-size:180%;"&gt;4) Includere selettivamente una parte machine dependent&lt;/span&gt;
Il codice machine dependent in Java solitamente viene affrontato nel seguente modo.
Si crea una classe astratta neutrale che va bene per tutti i sistemi operativi ma che di fatto evita di implementare i metodi specifici dalla piattoforma.
In seguito si crea per ogni piattaforma supportata una classe concreta che estende la classe astratta.

&lt;br/&gt;
A volte al posto di usare una classe astratta come ancestor comune si utilizza un interfaccia, ma la filosofia è sempre la stessa.

&lt;br/&gt;
Alcuni esempi di utilizzo di questo pattern sono le classi &lt;a href="http://java.sun.com/javase/6/docs/api/java/lang/Process.html"&gt;java.lang.Process&lt;/a&gt; e &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/File.html"&gt;java.io.File&lt;/a&gt; della libreria standard.

&lt;br/&gt;
&lt;h2&gt;5) Attivare o disattivare il debug.&lt;/h2&gt;
L'abilitazione/disabilitazione del debug dipende dal framework di logging che si utilizza.
I più famosi sono due:
&lt;ul&gt;&lt;li&gt;Java Logging framework&lt;/li&gt;&lt;li&gt;Log4J
&lt;/li&gt;&lt;/ul&gt;Entrambi permettono di attivare/disattivare il logging del debug sia attraverso i file di configurazione oppure per via programmatica.

&lt;br/&gt;
&lt;h2&gt;Quello che non si può fare in Java&lt;/h2&gt;
Come si è visto i problemi affrontati con il preprocessore in C/C++ sono in Java sono risolti in altra maniera.
Questo non vuol dire che le soluzioni sono equivalenti.
Ad esempio in Java non è possibile escludere una parte del codice dalla compilazione.
Non è neanche possibile definire macro.

&lt;br/&gt;
In genere la mancanza di queste caratteristiche non si sente.
Se si sente questo potrebbe indicare che Java potrebbe non essere il linguaggio giusto per il problema in esame.

&lt;br/&gt;
Se uno non può proprio fare a meno del preprocessore in rete ci sono progetti che estendono il linguaggio aggiungendo funzionalità simili.
L'adozione di questi strumenti dovrebbe essere fatta responsabilmente perché può portare a dover mantenere codice scritto in un linguaggio Java modificato che quindi diventa meno accessibile perché meno conosciuto.

&lt;br/&gt;
&lt;h2&gt;Nota: costanti e funzioni inline&lt;/h2&gt;
Anche se in molti progetti scritti in C o C++ capita che il preprocessore sia usato per definire costanti o funzioni inline questo non vuol dire che sia una buona pratica. In questi casi la cosa migliore e fare uso delle parole chiave &lt;span style="font-weight: bold;"&gt;const&lt;/span&gt; e &lt;span style="font-weight: bold;"&gt;inline&lt;/span&gt;&lt;span&gt; entrambe disponibili sia in C che in C++.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3764294911796230055?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3764294911796230055/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3764294911796230055' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3764294911796230055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3764294911796230055'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/06/dov-il-preprocessore-di-java.html' title='Dov&apos;è il preprocessore di Java?'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-5113894636426900022</id><published>2008-06-03T22:16:00.005+02:00</published><updated>2008-06-03T23:27:29.123+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='anime'/><title type='text'>Macross Frontier</title><content type='html'>Vi ricordate Macross? Sicuramente no. In Italia è uscita la serie ultra rieditata dagli americani chiamata Robotech, era in onda su Rete 4 anni fa e, nonostante fosse un cartone di culto, è stato trasmesso per poco tempo.

Comunque vi spiego tutto io. Nel lontano &lt;a href="http://it.wikipedia.org/wiki/1982"&gt;millenovecentoambaradam&lt;/a&gt; in giappone creano una serie tv chiamata &lt;small&gt;&lt;i&gt;Chō Jikū Yōsai Makurosu&lt;/i&gt;&lt;/small&gt;. Qualche tempo dopo (nel &lt;a href="http://it.wikipedia.org/wiki/1985"&gt;millenovecentoambaradampiùenne&lt;/a&gt;) in America la &lt;a href="http://en.wikipedia.org/wiki/Harmony_Gold_USA" title="Harmony Gold USA"&gt;Harmony Gold&lt;/a&gt; dice: "Che figata! La voglio anch'io.", però invece di fare semplicemente il doppiaggio decide di rieditare tutta la serie.

Gli &lt;a href="http://upload.wikimedia.org/wikipedia/commons/f/f1/Monkey-typing.jpg"&gt;sceneggiatori&lt;/a&gt; dell'Harmony Gold, che pare avessero appena scoperto il copia e incolla, decidono di tagliare alcune scene, spostarne altre e di riscrivere totalmente i dialoghi. Risultato&lt;a href="http://it.wikipedia.org/wiki/Robotech" title="Robotech"&gt;: Robotech&lt;/a&gt;, un prodotto che mantiene gli stessi robottoni della serie orginale ma dove gli aspetti più trascinanti della storia sono snaturati.

La serie sbarca in Italia assieme a Beautiful, il Tenente Colombo e tutte le altre serie che importiamo dagli stati uniti.

Così a noi ci è giunta la serie scrausa americana. Dopo un po' i fan rompono gli zebedei e ci è arrivata pure la serie doppiata dall'originale giapponese.

A questo punto in giappone han visto che la serie tirava e han pensato bene di farne dei seguiti per capitalizzare sul nome conquistato dal prodotto. Fioriscono i seguenti titoli:
&lt;ul&gt;&lt;li&gt;The Super Dimension Fortress Macross: Do You Remember Love?&lt;/li&gt;&lt;li&gt;The Super Dimension Fortress Macross: Flash Back 2012&lt;/li&gt;&lt;li&gt;The Super Dimension Fortress Macross II: Lovers, Again&lt;/li&gt;&lt;li&gt;Macross Plus&lt;/li&gt;&lt;li&gt;Macross 7&lt;/li&gt;&lt;li&gt;...&lt;/li&gt;&lt;li&gt;e altri ennemila altri titoli che neanche &lt;a href="http://en.wikipedia.org/wiki/Studio_Nue" title="Studio Nue"&gt;quelli che li hanno prodotti&lt;/a&gt; si ricordano bene quali sono.&lt;/li&gt;&lt;/ul&gt;L'ultimo titolo è &lt;a href="http://en.wikipedia.org/wiki/Macross_Frontier"&gt;Macross Frontier&lt;/a&gt; è quello che sto guardando adesso, ho visto solo fino alla quarta puntata.
Fine della storia.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-5113894636426900022?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/5113894636426900022/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=5113894636426900022' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5113894636426900022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5113894636426900022'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/06/macross-frontier.html' title='Macross Frontier'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6052999991583314087</id><published>2008-05-31T22:31:00.007+02:00</published><updated>2008-06-03T23:55:47.810+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rmi'/><title type='text'>Schermare le RemoteException</title><content type='html'>Consideriamo un'applicazione architettura client server basata su RMI.
Il client deve accedere dialoga con il server usando l'interfaccia remota di quest'ultimo. Per fissare le idee supponiamo che il server abbia la seguente interfaccia:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
public interface League extends Remote {
    void addTeam(String name) throws RemoteException;
    void removeTeam(String name) throws RemoteException;
    List&amp;lt;String&amp;gt; getTeamList() throws RemoteException;
    int getTeamsCount() throws RemoteException;
}&lt;/pre&gt;
Come richiesto da RMI, per ogni metodo è specificato che può sollevare una RemoteException. Le RemoteException dovrebbero essere gestita dal client, ovvero le chiamate dei metodi dovrebbero essere racchiuse in un blocco try/catch come il seguente:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
    TeamManager manager = ...;
    try {
        n = manager.getTeamsCount();
    } catch(RemoteException ex) {
        // gestione dell'eccezione
    }
&lt;/pre&gt;
Se le chiamate al server sono sparse in varie parti del codice del client la gestione delle eccezioni potrebbe diventare tediosa e ripetitiva.
Utilizzando la tecnica descritta di seguito è possibile concentrare la gestione delle RemoteException in un unico punto.
L'idea è quella di interfacciare il codice client con interfaccia simile a quella remota che però non richieda la gestione delle RemoteException, nel nostro caso:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
public interface LocalLeague {
    void addTeam(String name);
    void removeTeam(String name);
    List&amp;lt;String&amp;gt; getTeamList();
    int getTeamsCount();
}&lt;/pre&gt;
La soluzione si basa sul concetto di adapter.
Creiamo un oggetto 'adapter' che implementa l'interfaccia locale e  delega le chiamate al server remoto. La gestione delle RemoteException  e gestita dall'adapter che di fatto le intercetta prima che possano  arrivare al client.
La situazione che si vuole ottenere e schematizzata in figura.
&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_bikdOOm3kpc/SEG3zW6n8aI/AAAAAAAABac/uz8bI66fTSw/s1600-h/Main.png"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_bikdOOm3kpc/SEG3zW6n8aI/AAAAAAAABac/uz8bI66fTSw/s400/Main.png" alt="" id="BLOGGER_PHOTO_ID_5206644737169682850" border="0" /&gt;&lt;/a&gt;
&lt;/div&gt;Il client utilizza l'interfaccia semplificata (senza RemoteException).
L'adapter inoltra le chiamate al server, e nel caso gestisce la  RemoteException catturandola prima che arrivi al client. Dato che il  client richiede comunque una risposta nel caso di un'eccezione  l'adapter interroga un oggetto fallback che fornisce il valore da  restiuire in questi casi.
Nel nostro caso l'oggetto di fallback è il seguetne:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
LocalLeague fallback = new LocalLeague() {

    public void addTeam(String name) {
        // nothing
    }

    public void removeTeam(String name) {
        // nothing
    }

    public List&amp;lt;String&amp;gt; getTeamList() {
        return Collections.emptyList();
    }

    public int getTeamsCount() {
        return 0;
    }
};
&lt;/pre&gt;
In oltre l'adapter è in grado di segnalare le eccezioni  interfacciandosi con un oggetto ExceptionListener. L'interfaccia  ExceptionListener è definita nel package java.beans nel seguente modo:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
public interface ExceptionListener {
    void exceptionThrown(Exception e);
}
&lt;/pre&gt;
Fornedo la propria implementazione di ExceptionListener il client può gestire tutte le RemoteException in un unico punto.
La creazione dell'oggetto adapter avviene nel seguente modo:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
LocalLeague adapter = AdapterFactory.adapt(LocalLeague.class,
                                           remoteServer,
                                           fallback,
                                           exceptionListener);
&lt;/pre&gt;
Potete scaricare la libreria che contiene queste funzionalità da &lt;a href="http://code.google.com/p/andreafrancia-util/"&gt;http://code.google.com/p/andreafrancia-util/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6052999991583314087?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6052999991583314087/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6052999991583314087' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6052999991583314087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6052999991583314087'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/schermare-le-remoteexception.html' title='Schermare le RemoteException'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_bikdOOm3kpc/SEG3zW6n8aI/AAAAAAAABac/uz8bI66fTSw/s72-c/Main.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-2539813714569610283</id><published>2008-05-27T00:38:00.009+02:00</published><updated>2008-11-16T19:11:06.160+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Syntax Highlighter</title><content type='html'>Ho installato un plugin sul mio blog che dovrebbe effettuare l'highlight syntax del codice che scrivo nel blog.

Proviamo.
Scrivendo:

&amp;lt;pre name="code" class="java:nogutter:nocontrols"&amp;gt;
  /* Commento */
  int variabile = pinkElephant.getNumberOfFoot();
  assert variabile == 4;&lt;/span&gt;
  System.out.println("Bella lì");
&amp;lt;/pre&amp;gt;

&lt;/span&gt;Ottengo:
&lt;pre name="code" class="java:nogutter:nocontrols"&gt;
/* Commento */
int variabile = pinkElephant.getNumberOfFoot();
assert variabile == 4;
System.out.println("Bella lì");
&lt;/pre&gt;
I rigraziamenti vanno ai signori che hanno scritto la libreria &lt;a href="http://code.google.com/p/syntaxhighlighter/wiki/Overview"&gt;SyntaxHighlighter&lt;/a&gt; e al signore che si è preso la briga di creare il corrispondente &lt;a href="http://fazibear.blogspot.com/2007/09/blogger-syntax-higlighter.html"&gt;plugin&lt;/a&gt; per Blogger .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-2539813714569610283?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/2539813714569610283/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=2539813714569610283' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2539813714569610283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2539813714569610283'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/syntax-highlighter.html' title='Syntax Highlighter'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7751514327041097459</id><published>2008-05-26T02:35:00.003+02:00</published><updated>2008-05-26T02:41:29.860+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Java Web Start</title><content type='html'>Java Web Start è una tecnologia per la distribuire di applicazioni Java.
Usando Web Start l'installazione si riduce al cliccare su un link o su un bottone in una pagina web.
In questo &lt;a href="http://andreafrancia.it/articoli/webstart/"&gt;articolo &lt;/a&gt;spiego come si usa questa tecnologia.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7751514327041097459?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7751514327041097459/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7751514327041097459' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7751514327041097459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7751514327041097459'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/java-web-start.html' title='Java Web Start'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6904866498802793017</id><published>2008-05-22T14:12:00.004+02:00</published><updated>2010-01-28T17:14:15.821+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sourceforge'/><category scheme='http://www.blogger.com/atom/ns#' term='usabilità'/><title type='text'>Usabilità di Sourceforge</title><content type='html'>&lt;pre&gt;
C'e' un gestore dei task associato al progetto. Bene.

Il mio progetto è piccolo, voglio aggiungere pochi task.

Posso aggiungerli? No!
Devo prima creare un subproject? Perch&amp;eacute;?

Creo il subproject.
Ci ripenso, voglio cambiare il nome, posso? No!
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6904866498802793017?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6904866498802793017/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6904866498802793017' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6904866498802793017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6904866498802793017'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/usabilit-di-sourceforge.html' title='Usabilità di Sourceforge'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4115388189596309073</id><published>2008-05-20T23:38:00.011+02:00</published><updated>2010-01-28T17:12:02.650+01:00</updated><title type='text'>Quanto è  complicato pubblicare una release su Sourceforge e su Google Code</title><content type='html'>&lt;pre&gt;
Ho due progettini opensource, uno si chiama bluetrash e sta su Sourceforge, l'altro si chiama remoted-list e sta su Google Code.

Per farvi capire la differenza di usabilità tra i due siti vi spiego come si rilascia un nuovo pacchetto su entrambi i sistemi.

&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Caso Google: remoted-list.&lt;/span&gt;&lt;/span&gt;
- faccio login su google code
- vado sulla pagina download del mio progetto
- clicco "new download"
- clicco Browse
- seleziono il file remoted-lists-0.0.2.jar dal mio disco
- clicco su submit file
- fine
&lt;br/&gt;
&lt;span style="font-weight: bold;font-size:130%;" &gt;Caso Sourceforge: bluetrash.&lt;/span&gt;
- vado sulla pagina download.
- cerco il bottone "aggiungi nuova release"
- non lo trovo
- cerco meglio
- trovo File Releases tra una delle  20 voci del menu Admin
- lo clicco
- Appare la pagine File Release System, quasi ci sono
- hai definito un package? se non l'hai definito non puoi proseguire!
- ok lo definisco
- attento se cambi idea il package una volta aggiunto non puoi rimuoverlo, puoi solo marcarlo hidden!
- va be' fa niente, alla fine ne ho due bluetrash (errore marcato hidden) e trash (giusto)
- C'e' un link Add Release per ogni package (anche per quello hidden).
- Scelgo "trash" quindi devo cliccare il link Add release di trash.
- appare un paginone composto da quattro capitoli "Step 1", 2 , 3 e 4.
- Allo step 1 mi chiede il nome della release, ok lo inserisco trash-0.1.8
- mi chiede ancora "Of which package" con scelta predefinitta "trash". Ma se te lo detto prima!
- mi chiede il changelog, e il Release note, io non ce li ho, non li ho fatti e non li metto
- clicco i l bottone update
- Vado più sotto nel documento  a leggere allo Step 2
- Mi dice che devo fare l'upload del file file. Ok dov'e il bottone browse per scegliere il mio file sul file system? Non c'e'.
- C'e' scritto che posso caricare il file con SFTP, webdav o rsync. Per me uno vale l'altro, a che mi serve scegliere?
- Decido che lo faccio con SFTP.
- Penso dimmi quelle quattro cose che mi servono l'indirizzo (hostname, path, username e password). Le avranno scritte qui... no! non ci sono. bisogna cliccare il link.
- clicco il link che apre la pagina di help.
- Scopro hostname, path, username e password.
- faccio l'upload del primo dei tre file.
- Pero' io non voglio mettere sempre la password, posso installare la mia chiave pubblica ssh? No! non si puo'! vabbe'.
- Ripeto per gli altri due file mettendo la password a mano e rinunciando al pensiero di automare un giorno la cosa con qualche script.
- Torno sulla pagina, naturalmente non è aggiornata. Devo cliccare il bottone "Add Files and/or refresh view".... che cosa fa questo bottone? Aggiunge file oppure o anche aggiorna?
- Lo clicco
- appaiono i nomi dei file che caricato: &lt;span style=""&gt;trash-0.1.8-1.noarch.rpm, &lt;/span&gt;&lt;span style=""&gt;trash_0.1.8-2_all.deb, &lt;/span&gt;&lt;span style=""&gt;trash-0.1.8.tar.gz.
- finito? no!
- bisogna spuntare ognuno dei file e poi cliccare di nuovo il bottone omnicomprensivo : &lt;/span&gt;"Add Files and/or refresh view"
- Lo step 4 si popola di 3 righe, una per ogni file.
- Per ogni riga devo scegliere tipo di processore, data di rilascio, tipo di file.
- Ok li scelgo tutti poi schiaccio uno dei bottoni "update/refresh" (anche in questo caso i bottoni fanno piu' di un lavoro).
- Scopro che mi ha tenuto solo le scelte del file per cui ho premuto il bottone e le altre scelte sono andate perse.
- Ok ho capito devo modificarne e fare l'update/refresh di un file alla vota.
- finalmente
- finito.
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4115388189596309073?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4115388189596309073/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4115388189596309073' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4115388189596309073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4115388189596309073'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/quanto-complicato-pubblicare-una.html' title='Quanto è  complicato pubblicare una release su Sourceforge e su Google Code'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-5287265344901536892</id><published>2008-05-17T15:30:00.001+02:00</published><updated>2008-05-17T15:31:52.078+02:00</updated><title type='text'>http://www.visual.paginegialle.it/on_the_road/pavia</title><content type='html'>Avete visto &lt;span style="font-weight: bold;"&gt;On the road&lt;/span&gt; di pagine gialle?
Impressionante.
&lt;a href="http://www.visual.paginegialle.it/on_the_road/pavia"&gt;http://www.visual.paginegialle.it/on_the_road/pavia&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-5287265344901536892?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/5287265344901536892/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=5287265344901536892' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5287265344901536892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5287265344901536892'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/httpwwwvisualpaginegialleitontheroadpav.html' title='http://www.visual.paginegialle.it/on_the_road/pavia'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4181473340718663621</id><published>2008-05-14T22:11:00.016+02:00</published><updated>2008-05-15T23:37:13.266+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>RemotedList</title><content type='html'>I want to create a library to solve a problem which happens to me very often working with RMI and JPA.

Consider having a remote server object with an interface like this:
&lt;pre&gt;public Server implements Remote{
    List&amp;lt;Foo&amp;gt; getFoos() throws RemoteException;
}
&lt;/pre&gt;According to the the RMI specification calling this method will cause that the resulting List is serialized and passed back over the network to the client.
Consider the case when the resulting list is huge and you don't want pass such a big thing over the network or consider the case when the list is not serializable.

My remoted-list library will address these problems replacing a the actual list with a remoted version that lazily load the elements.

The usage of remote-list is simple. Consider the getFoos() implementation:
&lt;pre&gt;List&amp;lt;Foo&amp;gt; getFoos() {
   List&amp;lt;Foo&amp;gt; actualList = ... // create or get a list according your business logic
   List&amp;lt;Foo&amp;gt; remotedList = RemotedList.remotize(actualList);

   return remotedList;
}
&lt;/pre&gt;Instead to returning the &lt;code&gt;actualList&lt;/code&gt; the method returns a &lt;code&gt;remotedList&lt;/code&gt; which reflects the contents of the actualList mantaining a remote reference to &lt;code&gt;actualList&lt;/code&gt;.
The remoteList is also Serializable and ligth to serialize because it contains only a remote reference to the &lt;code&gt;actualList&lt;/code&gt; instead to contains all reference of all elements.

Now consider the client which retrieve the remotedList from the remote object.&lt;pre&gt;remotedList = server.getFoos();
...
element = remoteList.get(index);
&lt;/pre&gt;When the client call &lt;code&gt;remoteList.get(index)&lt;/code&gt; the &lt;code&gt;remoteList&lt;/code&gt; acts like a proxy and call through RMI the &lt;code&gt;get(index)&lt;/code&gt; method on the &lt;code&gt;actualList&lt;/code&gt; which was left on the server JVM.

This is the idea. Soon I will prepare the library and I will release it for you all!

&lt;span style="font-weight: bold;"&gt;UPATE 2008-05-15&lt;/span&gt;
I wrote the code and I put it online throuh Google Code.
The project is hosted at &lt;a href="http://code.google.com/p/remoted-list/"&gt;http://code.google.com/p/remoted-list/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4181473340718663621?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4181473340718663621/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4181473340718663621' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4181473340718663621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4181473340718663621'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/remotedlist.html' title='RemotedList'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8527576301320457721</id><published>2008-05-11T00:48:00.004+02:00</published><updated>2008-05-11T10:58:29.992+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='foto'/><category scheme='http://www.blogger.com/atom/ns#' term='viaggi'/><title type='text'>Visit to Agliè Castle</title><content type='html'>&lt;span style="font-weight: bold;"&gt;English (short):&lt;/span&gt;
Today, I and my friend Elisa went to Agliè Castle in Piedmont which is also known because is one of the location of the Italian fiction "Elisa di Rivombrosa".
The foto we take are availables on my picasa space: &lt;a href="http://picasaweb.google.it/andrea.francia/20080511CastelloDiAgliConElisa"&gt;http://picasaweb.google.it/andrea.francia/20080511CastelloDiAgliConElisa&lt;/a&gt;

&lt;span style="font-weight: bold;"&gt;Italiano (completo):&lt;/span&gt;
Oggi, io ed la mia amica Elisa siamo andati al Castello di Agliè in Piemonte conosciuto anche per essere una delle location di "Elisa di Rivombrosa".
Il castello è interessante, peccato che l'80% delle sale non si poteva vedere perché lo stavano restaurando. Stavano restaurando tutto! Anche nelle sale che si poteva visitare capitava che la guida dicesse: "In questa sala c'era un mobile bellissimo che però oggi non potete vedere perché lo stanno restaurando". Eh vabbe'.

Ho messo le foto che abbiamo fatto sul picasa:
&lt;a href="http://picasaweb.google.it/andrea.francia/20080511CastelloDiAgliConElisa"&gt;http://picasaweb.google.it/andrea.francia/20080511CastelloDiAgliConElisa&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8527576301320457721?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8527576301320457721/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8527576301320457721' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8527576301320457721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8527576301320457721'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/visit-to-agli-castle.html' title='Visit to Agliè Castle'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4916649600089482854</id><published>2008-05-06T23:33:00.004+02:00</published><updated>2008-05-07T00:01:40.342+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Libreria per il parsing della linea di comando (args4j)</title><content type='html'>L'altro giorno ho trovato finalmente una libreria che aiuta a fare il parsing della linea di comando.

La libreria a cui mi riferisco è &lt;a href="https://args4j.dev.java.net/"&gt;arg4j&lt;/a&gt;.
È una libreria open source (&lt;a href="http://www.opensource.org/licenses/mit-license.php"&gt;MIT License&lt;/a&gt;), creata da &lt;a href="http://weblogs.java.net/blog/kohsuke/"&gt;Kohsuke Kawaguchi&lt;/a&gt;che tra l'altro è il creatore di &lt;a href="https://hudson.dev.java.net/"&gt;Hudson &lt;/a&gt;(il sistema di continous integration che usiamo attualmente in azienda).

Funziona sia con le opzioni corte (es. -R) che con quelle lunghe (--recursive).
Non usa lo stile GNU delle opzioni, quindi non potete usarlo per fare il parsing di qualcosa come
&lt;code&gt;rm -Rfv&lt;/code&gt;
Ma riesce solo a fare il parsing di cose come:
&lt;code&gt;rm -R -f -v&lt;/code&gt;

Oltre a fare il parsing genera il messaggio di help per l'utilizzo delle opzioni direttamente dalla definizione delle opzioni.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4916649600089482854?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4916649600089482854/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4916649600089482854' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4916649600089482854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4916649600089482854'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/libreria-per-il-parsing-della-linea-di.html' title='Libreria per il parsing della linea di comando (args4j)'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-5505625996808056355</id><published>2008-05-04T19:02:00.003+02:00</published><updated>2008-05-04T19:34:15.582+02:00</updated><title type='text'>Builder with fluent interface in Java</title><content type='html'>Ho creato una libreria che semplifica la creazione Fluent Builders.
La libreria su un &lt;a href="http://stephan.reposita.org/archives/2007/10/10/fluent-interface-and-reflection-for-object-building-in-java/" id="qlxk" title="idea"&gt;idea&lt;/a&gt; di &lt;a href="http://stephan.reposita.org/" id="ga-y" title="Stephan Schmidt"&gt;Stephan Schmidt&lt;/a&gt; che ho ampliato e modificato.

La libreria permette di creare un builder con interfaccia fluent senza scrivere codice ripetitivo.

La libreria permette di riscrivere il codice seguente:
&lt;pre&gt;Person person = new Person();
person.setFirstName("John");
person.setLastName("Smith");
person.getLovedThings().add("pizza");
person.getLovedThings().add("soccer");
person.getLovedThings().add("jogging");
person.setAge(30);
&lt;/pre&gt;nel seguente modo:
&lt;pre&gt;Person person2 = Person.builder()
       .withFirstName("John")
       .withLastName("Smith")
       .withLovedThings("pizza", "soccer", "jogging")
       .withAge(30)
       .build();
&lt;/pre&gt;

Maggiori dettagli li trovati sul mio sito: &lt;a href="http://www.andreafrancia.it/articoli/fluent-builder"&gt;Fluent Builder Library&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-5505625996808056355?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/5505625996808056355/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=5505625996808056355' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5505625996808056355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5505625996808056355'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/05/ho-creato-una-libreria-che-semplifica.html' title='Builder with fluent interface in Java'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8034280182680996795</id><published>2008-04-16T23:26:00.005+02:00</published><updated>2008-05-04T17:09:08.754+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Large File Viewer</title><content type='html'>Ho scritto un articolo su come creare in Java un visualizzatore di grandi file di testo, cioé di dimensioni superiori al gigabyte.
Lo messo qua: &lt;a href="http://www.andreafrancia.it/articoli/large-file-viewer.html"&gt;http://www.andreafrancia.it/articoli/large-file-viewer.html&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8034280182680996795?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.andreafrancia.it/articoli/large-file-viewer/large-file-viewer.html' title='Large File Viewer'/><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8034280182680996795/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8034280182680996795' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8034280182680996795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8034280182680996795'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/04/large-file-viewer.html' title='Large File Viewer'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-1863641914491454457</id><published>2008-02-23T15:47:00.002+01:00</published><updated>2008-02-23T16:05:00.682+01:00</updated><title type='text'>Nanà supergirl</title><content type='html'>Ve la ricordate? Pian piano mi sto rivedendo tutta la serie.
Gli episodi non sono tanti, si tratta di solo 39 puntate.
Il cartone è molto ben fatto, lo stile del disegno è molto bello.
Le storie sono semplici, alla portata di un pubblico non adulto, ma non eccessivamente infantili.
Gli episodi sono sceneggiati bene e la comicità è immediata.
Insomma una bel cartone, di qualità e adatto ai più piccoli.
Sapevate che Nanà è creato dallo stesso gruppo che ha creato Pollon?
&lt;object height="373" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/TezLxilbe8Y&amp;amp;rel=0&amp;amp;color1=0xd6d6d6&amp;amp;color2=0xf0f0f0&amp;amp;border=1"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/TezLxilbe8Y&amp;amp;rel=0&amp;amp;color1=0xd6d6d6&amp;amp;color2=0xf0f0f0&amp;amp;border=1" type="application/x-shockwave-flash" wmode="transparent" height="373" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-1863641914491454457?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/1863641914491454457/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=1863641914491454457' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1863641914491454457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1863641914491454457'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/02/nan-supergirl.html' title='Nanà supergirl'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4641347384269397471</id><published>2008-02-13T10:04:00.000+01:00</published><updated>2008-02-13T10:06:10.056+01:00</updated><title type='text'>Crop Circles</title><content type='html'>Gli alieni esistono e ci hanno lasciato un &lt;a href="http://maps.google.it/maps?f=q&amp;amp;hl=it&amp;amp;geocode=&amp;amp;q=Strada+dei+Campi+%4045.910108,+13.507212&amp;amp;ie=UTF8&amp;amp;om=0&amp;amp;t=h&amp;amp;ll=45.910615,13.506972&amp;amp;spn=0.003755,0.00928&amp;amp;z=17"&gt;messaggio&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4641347384269397471?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4641347384269397471/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4641347384269397471' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4641347384269397471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4641347384269397471'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/02/crop-circles.html' title='Crop Circles'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8554392375965431959</id><published>2008-01-26T19:14:00.001+01:00</published><updated>2008-01-26T19:19:58.278+01:00</updated><title type='text'>Basta fare il pendolare!</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Da gennaio la mia azienda si è trasferita a Pavia.
Questo vuol dire che non farò più il pendolare per andare al lavoro. Basta ritardi dei treni e basta multe perché mi dimentico di fare l'abbonamento.
Questa è la strada che devo fare ogni mattina :)


&lt;iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.it/maps?f=d&amp;amp;hl=en&amp;amp;geocode=&amp;amp;time=&amp;amp;date=&amp;amp;ttype=&amp;amp;saddr=Via+lovati,+20,+pavia&amp;amp;daddr=via+ferrata+1+pavia&amp;amp;sll=45.189724,9.148105&amp;amp;sspn=0.020022,0.080338&amp;amp;ie=UTF8&amp;amp;om=0&amp;amp;s=AARTsJoFbqIhamHAQpqeZrEzAaem6rd6qg&amp;amp;ll=45.198369,9.139252&amp;amp;spn=0.018144,0.025749&amp;amp;z=14&amp;amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.it/maps?f=d&amp;amp;hl=en&amp;amp;geocode=&amp;amp;time=&amp;amp;date=&amp;amp;ttype=&amp;amp;saddr=Via+lovati,+20,+pavia&amp;amp;daddr=via+ferrata+1+pavia&amp;amp;sll=45.189724,9.148105&amp;amp;sspn=0.020022,0.080338&amp;amp;ie=UTF8&amp;amp;om=0&amp;amp;ll=45.198369,9.139252&amp;amp;spn=0.018144,0.025749&amp;amp;z=14&amp;amp;source=embed" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;

&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8554392375965431959?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8554392375965431959/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8554392375965431959' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8554392375965431959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8554392375965431959'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2008/01/basta-fare-il-pendolare.html' title='Basta fare il pendolare!'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-1640884277656217954</id><published>2007-12-18T13:50:00.000+01:00</published><updated>2007-12-18T19:34:10.114+01:00</updated><title type='text'>L'ADSL se ne è andata</title><content type='html'>Il giorno  12 dicembre 2007 è arrivata l'ADSL.
Il giorno 17 dicembre 2007 l'ADSL ha smesso di funzionare.

Che record!
Ben (ironico) 5 giorni di funzionamento prima del primo inconveniente tecnico.
Ho chiamato l'assistenza, mi dicono che "Ci sono problemi sulla linea.".

Aspetto speranzoso che vengano risolti.

PS alle 19.33: Stasera quando sono tornato si è rimessa a funzionare!
L'allora l'assistenza serve a qualcosa ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-1640884277656217954?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/1640884277656217954/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=1640884277656217954' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1640884277656217954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1640884277656217954'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/12/ladsl-se-ne-andata.html' title='L&apos;ADSL se ne è andata'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-2916969965925684220</id><published>2007-12-12T14:32:00.000+01:00</published><updated>2007-12-12T14:38:46.483+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='casa'/><title type='text'>E' arrivata l'ADSL</title><content type='html'>Finalmente è arrivata l'ADSL a casa.
Sono finiti i tempi bui, adesso sarò connesso 24 su 24.
Ho preso una ADSL flat a 4 mega di Wind. Ho scelto Wind perché era la più economica.
Mi hanno dato anche la linea fissa.

Stamattina mi è arrivata la notifica via mail di Wind che l'ADSL è attiva , oggi sono andato a comprare il modem e il filtro. Stasera appena torno a casa sarò connesso.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-2916969965925684220?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/2916969965925684220/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=2916969965925684220' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2916969965925684220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/2916969965925684220'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/12/e-arrivata-ladsl.html' title='E&apos; arrivata l&apos;ADSL'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3665851484349618490</id><published>2007-11-06T13:42:00.000+01:00</published><updated>2007-11-06T13:51:17.080+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vacanze'/><category scheme='http://www.blogger.com/atom/ns#' term='dublino'/><title type='text'>Foto di Dublino</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_bikdOOm3kpc/RzBjODwT-wI/AAAAAAAAA_8/dsSllcbRR9E/s1600-h/100_1536.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp1.blogger.com/_bikdOOm3kpc/RzBjODwT-wI/AAAAAAAAA_8/dsSllcbRR9E/s200/100_1536.JPG" alt="" id="BLOGGER_PHOTO_ID_5129709068752255746" border="0" /&gt;&lt;/a&gt;
Ho messo online le foto di Dublino.
Le trovate all'indirizzo &lt;a href="http://picasaweb.google.it/andrea.francia/Dublin2007"&gt;http://picasaweb.google.it/andrea.francia/Dublin2007&lt;/a&gt;
Non ho messo on-line tutte le foto che ho fatto, ho cercato di ridurle per non annoiarvi troppo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3665851484349618490?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3665851484349618490/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3665851484349618490' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3665851484349618490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3665851484349618490'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/11/foto-di-dublino.html' title='Foto di Dublino'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_bikdOOm3kpc/RzBjODwT-wI/AAAAAAAAA_8/dsSllcbRR9E/s72-c/100_1536.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-6687721053740544720</id><published>2007-10-29T16:46:00.000+01:00</published><updated>2007-10-29T17:00:54.467+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vacanze'/><category scheme='http://www.blogger.com/atom/ns#' term='dublino'/><title type='text'>Dublino</title><content type='html'>Oggi posto direttamente da Dublino.
Nonostante quello che qualcuno voleva farmi credere la città è molto bella. 
Apprezzo soprattutto la possibilità di incontrare gente (e soprattutto ragazze) di tutte le nazionalità ... tra argentini, italiani, brasiliani e polacchi, abbiamo trovato anche qualche irlandese. 

La città è ospitale, i prezzi non sono cosi alti come mi aspettavo e ci sono parecchie cose da vedere. 

Lo stile architetturale del centro mi piace molto, le case piccole con le porte di ingresso colorate con le colonne ai lati mi piacciono tantissimo. 

Anche la cucina è ottima.
 
La vita notturna inizia e finisce presto a Dublino, una buona cosa per i "vecchi" come me a cui non piace dover aspettare fino alle 24.00 per trovare qualcuno in discoteca. Qui le discoteche aprono alle 10 e chiudono alle 2.30. Se vuoi iniziare ancora prima puoi trovarti alle 6 pm per una birra in un pub e tirare fino a notte. 
Purtroppo non sembra che ci siano dei buoni posti per ballare la salsa, pochi posti e affollati. 

Il tempo all'internet cafè sta scadendo ... ciao a tutti.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-6687721053740544720?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/6687721053740544720/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=6687721053740544720' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6687721053740544720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/6687721053740544720'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/10/dublino_29.html' title='Dublino'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3974189883568705819</id><published>2007-10-22T13:48:00.001+02:00</published><updated>2007-10-22T13:48:24.280+02:00</updated><title type='text'>Dublino</title><content type='html'>&lt;img src="http://www.venetolowcost.com/voli/dublino-saint-patricks-cathedral.JPG" style="margin: 0pt 0pt 10px 10px; float: right;" title="" alt="" /&gt;Tra poco vado in vacanza :)
Venerdì questo (26 ottobre) parto per &lt;a href="http://it.wikipedia.org/wiki/Dublino"&gt;Dublino&lt;/a&gt; ci starò 10 giorni, fino a domenica 4 novrembre 2007!

Ciao a tutti :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3974189883568705819?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3974189883568705819/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3974189883568705819' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3974189883568705819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3974189883568705819'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/10/dublino.html' title='Dublino'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-1498664698689941756</id><published>2007-08-26T16:36:00.001+02:00</published><updated>2007-08-26T16:36:59.562+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='foto'/><category scheme='http://www.blogger.com/atom/ns#' term='biennale'/><category scheme='http://www.blogger.com/atom/ns#' term='arte'/><title type='text'>Foto della Biennale</title><content type='html'>&lt;a href="http://picasaweb.google.it/andrea.francia/BiennaleDiVenezia2007"&gt;&lt;img style="margin: 10px 10px 0pt 0pt; float: left;" alt="" title="" src="http://lh5.google.it/andrea.francia/RtGKIvYRn7I/AAAAAAAAAzE/o6YN-_1fA-I/s144/100_1459.JPG" /&gt;&lt;/a&gt;Ho messo online le foto che ho fatto ieri alla Biennale di venezia.
Eccole:
&lt;a href="http://picasaweb.google.it/andrea.francia/BiennaleDiVenezia2007"&gt;http://picasaweb.google.it/andrea.francia/BiennaleDiVenezia2007&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-1498664698689941756?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/1498664698689941756/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=1498664698689941756' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1498664698689941756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/1498664698689941756'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/08/foto-della-biennale.html' title='Foto della Biennale'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-8329834413535023133</id><published>2007-08-23T22:32:00.001+02:00</published><updated>2007-08-23T22:32:21.224+02:00</updated><title type='text'>Sabato alla Biennale</title><content type='html'>&lt;img src="http://www.labiennale.org/62/76917.jpg" style="margin: 0pt 0pt 10px 10px; float: right;" title="Biennale" /&gt;Questo sabato (25 agosto 2007) vado alla &lt;a href="http://www.labiennale.org/it/arte/"&gt;Biennale&lt;/a&gt;, quella di Venezia naturalmente.
Per ora siamo in due che vengono sicuro e un'altra persona che mi deve ancora dire se viene o meno.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-8329834413535023133?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/8329834413535023133/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=8329834413535023133' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8329834413535023133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/8329834413535023133'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/08/sabato-alla-biennale.html' title='Sabato alla Biennale'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-934512091964755268</id><published>2007-08-06T23:57:00.000+02:00</published><updated>2007-08-07T00:02:07.903+02:00</updated><title type='text'>Foto a tradimento</title><content type='html'>&lt;a href="http://www.flickr.com/photos/webmatch/265977348/in/set-72157594321411708/"&gt;&lt;img src="http://static.flickr.com/102/265977348_ad6c3cc0d5_s.jpg" alt="webmatch @smau" border="0"/&gt;&lt;/a&gt;

Ecco mi hanno fatto una foto mentre facevo una domanda stupida allo SMAU dell'anno scorso (era il 9 novembre 2006).

La domanda non era stupida, in realtà ero troppo avanti rispetto ai tempi, era all'avanguardia e gli altri erano rimasti ancora allo studio della prospettiva.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-934512091964755268?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/934512091964755268/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=934512091964755268' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/934512091964755268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/934512091964755268'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/08/foto-tradimento.html' title='Foto a tradimento'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3598052152692247591</id><published>2007-07-30T17:46:00.001+02:00</published><updated>2007-07-30T17:46:40.383+02:00</updated><title type='text'>Foto della Festa Hawaiana</title><content type='html'>Ho messo online le foto della Festa Hawaiana.&lt;br&gt;&lt;a href="http://picasaweb.google.it/andrea.francia/20070719FestaHawaiana/"&gt;http://picasaweb.google.it/andrea.francia/20070719FestaHawaiana/&lt;/a&gt;&lt;br&gt;Devo darvi il codice per vederle, chiedetemelo su messenger&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3598052152692247591?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3598052152692247591/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3598052152692247591' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3598052152692247591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3598052152692247591'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/foto-della-festa-hawaiana.html' title='Foto della Festa Hawaiana'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4802432889061976292</id><published>2007-07-24T21:45:00.000+02:00</published><updated>2007-07-24T22:24:09.214+02:00</updated><title type='text'>Recycle Bin per Linux</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_bikdOOm3kpc/RqZfqoq0eAI/AAAAAAAAAMI/kJuZxWuyVQE/s1600-h/David.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://bp2.blogger.com/_bikdOOm3kpc/RqZfqoq0eAI/AAAAAAAAAMI/kJuZxWuyVQE/s200/David.jpg" alt="" id="BLOGGER_PHOTO_ID_5090861614865086466" border="0" /&gt;&lt;/a&gt;Ole! Finalmente l'ho finito!
Un cestino a linea di comando per Linux.
Si ricorda da dove hai cancellato il file e quando.

E' interoperabile con il cestino di KDE, cioé se butti un file con questo programma poi lo ritrovi nel cestino di KDE.

Download from &lt;a href="http://bluetrash.sourceforge.net/"&gt;http://bluetrash.sourceforge.net/.&lt;/a&gt;

La foto non c'entra, ma è carina.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4802432889061976292?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4802432889061976292/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4802432889061976292' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4802432889061976292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4802432889061976292'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/recycle-bin-per-linux.html' title='Recycle Bin per Linux'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_bikdOOm3kpc/RqZfqoq0eAI/AAAAAAAAAMI/kJuZxWuyVQE/s72-c/David.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-9186637545055531356</id><published>2007-07-21T15:26:00.000+02:00</published><updated>2007-07-21T15:29:03.557+02:00</updated><title type='text'>Google Pages</title><content type='html'>Ho provato Google Pages.
Comodo. 
Ecco il mio sforzo creativo: &lt;a href="http://andrea.francia.googlepages.com/moorelawrevisited"&gt;Moore Law Revisited&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-9186637545055531356?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/9186637545055531356/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=9186637545055531356' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9186637545055531356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9186637545055531356'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/google-pages.html' title='Google Pages'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7551534049314591323</id><published>2007-07-18T23:17:00.000+02:00</published><updated>2007-07-18T23:19:07.974+02:00</updated><title type='text'>Toilet a Palazzo Reale</title><content type='html'>&lt;a href="http://bp1.blogger.com/_bikdOOm3kpc/Rp6DytLjc0I/AAAAAAAAAAU/KDaKUUUx44w/s1600-h/100_1024.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_" style="CLEAR: both; FLOAT: left; MARGIN: 0px 10px 10px 0px" alt="" src="http://bp1.blogger.com/_bikdOOm3kpc/Rp6DytLjc0I/AAAAAAAAAAU/KDaKUUUx44w/s320/100_1024.JPG" border="0" /&gt;&lt;/a&gt;A sinistra potete ammirare le splendide toilette artistiche davanti a Palazzo Reale.
Se ve lo state chiedendo ... Sì dentro sono come tutte gli altri bagni portatili.&lt;div style='clear:both; text-align:LEFT'&gt;&lt;a href='http://picasa.google.com/blogger/' target='ext'&gt;&lt;img src='http://photos1.blogger.com/pbp.gif' alt='Posted by Picasa' style='border: 0px none ; padding: 0px; background: transparent none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;' align='middle' border='0' /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7551534049314591323?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7551534049314591323/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7551534049314591323' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7551534049314591323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7551534049314591323'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/toilet-palazzo-reale.html' title='Toilet a Palazzo Reale'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_bikdOOm3kpc/Rp6DytLjc0I/AAAAAAAAAAU/KDaKUUUx44w/s72-c/100_1024.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-9174825448537767906</id><published>2007-07-16T16:50:00.000+02:00</published><updated>2007-07-17T11:35:32.214+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Chiuso fuori!</title><content type='html'>OSSEC è un HIDS, un Host-based Intrusion Detection System ...

Lo installi, lo avvi e lui comincia a controllare i log e altri file sulla macchina e capisce se qualcuno ti sta attaccando ...

L'ho provato ...
Funziona ! ... Troppo pero' ...

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm1.static.flickr.com/148/422909673_67eb05b19e.jpg?v=0"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 130px; height: 97px;" src="http://farm1.static.flickr.com/148/422909673_67eb05b19e.jpg?v=0" alt="" border="0" /&gt;&lt;/a&gt;Appena l'ho avviato ha deciso di bannare il mio IP ... penso che confonda il mio accesso a Subversion via HTTP con qualche attacco e di conseguenza aggiunge una regola al firewall che mi chiude fuori, qualcosa del tipo
&lt;tt&gt; -A IL.MIO.IP.ADD -J DROP&lt;/tt&gt;

Ehi!! ti sei chiuso dentro!!

All'inizio avevo dato la colpa a Snort un IDS che stavo provando assieme a OSSEC.

Adesso ho scoperto come mettere la mia macchina nella white list e OSSEC non mi lascia piu' sulla porta.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-9174825448537767906?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/9174825448537767906/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=9174825448537767906' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9174825448537767906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9174825448537767906'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/snort.html' title='Chiuso fuori!'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-9027072782305293949</id><published>2007-07-13T17:43:00.000+02:00</published><updated>2007-07-13T18:03:48.680+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='io'/><title type='text'>Andando in Piazza</title><content type='html'>Era un po' che avevo cominciato "ad andare in piazza"
A Cesare Ragazzi non ci crede piu' nessuno ...

Ma la soluzione c'e' ! Far finta che l'hai deciso tu ... e rasare tutto.
Comunque si vede che non avrei potuto scegliere  ...

Pero' così sto meglio :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-9027072782305293949?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/9027072782305293949/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=9027072782305293949' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9027072782305293949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/9027072782305293949'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/andando-in-piazza.html' title='Andando in Piazza'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-3539401449025233985</id><published>2007-07-11T22:55:00.000+02:00</published><updated>2007-07-11T23:02:28.829+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>WinMerge</title><content type='html'>Licenza: GPL
Ambiente: Windows

Confronta due file di testo. Come il comando diff sotto Unix, solo che il confronto è visuale.
Come WinDiff di Visual Studio solo che funziona meglio.

Supporta l'highlight syntax per un molti linguaggi.
Confronta directory in modo ricorsivo.
Si può configurare per ingnorare i file ausiliari di CVS e Subversion.
Permette di modificare i file che si stanno confrontando.

Utilissimo per lo sviluppatore.

&lt;a href="http://winmerge.org/"&gt;http://winmerge.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-3539401449025233985?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/3539401449025233985/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=3539401449025233985' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3539401449025233985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/3539401449025233985'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/winmerge.html' title='WinMerge'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4446334581706250800</id><published>2007-07-11T22:42:00.000+02:00</published><updated>2007-07-11T22:50:52.695+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>FilZip</title><content type='html'>Basta usare WinZip!

Non potete usarlo senza pagare la licenza, anche se funziona lo stesso.

E poi cosa lo usate a fare che da Windows XP i file .zip ve li apre Explorer? Sì, ok è lentissimo.
WinRar e WinAce? Anche loro a pagamento.

Se volete continuare ad aprire gli archivi e essere in regola senza pagare usate FilZip che è gratuito.
Estrae anche gli archivi  RAR .

&lt;a href="http://www.filzip.com/"&gt;http://www.filzip.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4446334581706250800?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4446334581706250800/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4446334581706250800' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4446334581706250800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4446334581706250800'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/filzip.html' title='FilZip'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-5228206894980938486</id><published>2007-07-11T14:09:00.000+02:00</published><updated>2007-07-11T14:21:44.860+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='politica'/><title type='text'>Referendum sulla legge elettorale</title><content type='html'>Avete presente la "porcata" di Calderoli.
Mi riferisco alla legge elettorale votata alla fine dell'ultima legislatura.

Sembra che a molti questa legge non piaccia e c'e' chi vorrebbe cambiarla.

Da un po' si stanno raccogliendo le firme per il referendum. Io me ne sono accorto solo adesso perché sono lento a seguire la Politica.

Io non ho ancora chiaro che cosa voterò se e quando ci sarà il referendum.  Però penso che andrò a firmare per il referendum.

Se volete firmare per il referendum dovete rivolgervi al vostro comune di residenza. Va bene anche un altro comune ma è meglio quello di residenza, firmando in un altro comune si rischia che la vostra firma non sia registrata in tempo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-5228206894980938486?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/5228206894980938486/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=5228206894980938486' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5228206894980938486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/5228206894980938486'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/referendum-sulla-legge-elettorale.html' title='Referendum sulla legge elettorale'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7754517389822099434</id><published>2007-07-10T21:09:00.000+02:00</published><updated>2007-07-10T21:33:40.383+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='books'/><title type='text'>Il Libro delle Antiche Invezioni</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.deastore.com/covers_13/978/883/441/batch2/9788834413500.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 112px; height: 144px;" src="http://www.deastore.com/covers_13/978/883/441/batch2/9788834413500.jpg" alt="" border="0" /&gt;&lt;/a&gt;Ho appena finito di leggere questo libro, mi è piaciuto molto.
Sono 670 pagine !

Non vi siete mai chiesti "Ma come facevano a chiamarsi quando non esisteva il cellulare?"
Beh questo libro va un po' oltre.

Dopo averlo letto ti rendi conto di quanto fosse simile la nostra vita quotidiana a quella degli antichi. Ti rendi conto di quanto i nostri antenati fossero intelligenti, che trovavano soluzioni a problemi che oggi crediamo che non siano risolvibili senza un computer, la plastica, o la catena di montaggio.

&lt;a href="http://www.deastore.com/product.asp?productid=IE776905&amp;cookie%5Ftest=1"&gt;http://www.deastore.com/product.asp?productid=IE776905&amp;amp;cookie%5Ftest=1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7754517389822099434?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7754517389822099434/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7754517389822099434' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7754517389822099434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7754517389822099434'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/il-libro-delle-antiche-invezioni.html' title='Il Libro delle Antiche Invezioni'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-7835271748933080601</id><published>2007-07-10T20:57:00.001+02:00</published><updated>2007-07-10T21:06:10.832+02:00</updated><title type='text'>Mostra su Botero a Milano</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.turismo.comune.milano.it/pls/milano/src?lang=2&amp;obj=52493"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 91px; height: 85px;" src="http://www.turismo.comune.milano.it/pls/milano/src?lang=2&amp;obj=52493" alt="" border="0" /&gt;&lt;/a&gt;
Avete presente quei quadri con i personaggi grassi grassi grassi?

Li fa un signore che si chiama Botero e che abita a Pietrasanta (Toscana)
&lt;a href="http://www.turismo.comune.milano.it/pls/milano/%21dettaglio?lang=2&amp;amp;evento_id=285511"&gt;http://www.turismo.comune.milano.it/pls/milano/!dettaglio?lang=2&amp;amp;evento_id=285511&lt;/a&gt;

Io probabilmente ci vado giovedì sera...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-7835271748933080601?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/7835271748933080601/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=7835271748933080601' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7835271748933080601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/7835271748933080601'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/mostra-su-botero-milano.html' title='Mostra su Botero a Milano'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7057088794786608870.post-4201783682387143301</id><published>2007-07-10T20:13:00.000+02:00</published><updated>2007-07-10T20:42:40.914+02:00</updated><title type='text'>Hello World</title><content type='html'>Ecco il primo post di un programmatore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7057088794786608870-4201783682387143301?l=andreafrancia.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andreafrancia.blogspot.com/feeds/4201783682387143301/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7057088794786608870&amp;postID=4201783682387143301' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4201783682387143301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7057088794786608870/posts/default/4201783682387143301'/><link rel='alternate' type='text/html' href='http://andreafrancia.blogspot.com/2007/07/hello-world.html' title='Hello World'/><author><name>Andrea Francia</name><uri>http://www.blogger.com/profile/16706534930714066247</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_bikdOOm3kpc/SyqqBHeZ4kI/AAAAAAAAD8g/5F_1lKSrbdM/S220/AndreaFrancia.jpg'/></author><thr:total>0</thr:total></entry></feed>
