SlideShare una empresa de Scribd logo
1 de 148
Descargar para leer sin conexión
Tutti i miei sbagli

       Andrea Francia

        andrea@andreafrancia.it – http://andreafrancia.it




Saturday, March 24, 12                                      1
Tutti i miei sbagli
                         Errori di un wannabe Open Source Developer

                                      Andrea Francia




                                             2         @andreafrancia   #trash-cli
Saturday, March 24, 12                                                               2
Il progetto
                         Gli errori
           Contenuti     Qualcosa di giusto
                         Conclusioni
                         Applausi



                         3       @andreafrancia   #trash-cli
Saturday, March 24, 12                                         3
trash-cli

                         https://github.com/andreafrancia/trash-cli


                                             4       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                             4
Open Source

                             GPLv2


                               5     @andreafrancia   #trash-cli
Saturday, March 24, 12                                             5
Linux


                           6     @andreafrancia   #trash-cli
Saturday, March 24, 12                                         6
$ trash




                         7   @andreafrancia   #trash-cli
Saturday, March 24, 12                                     7
$ trash ./foo




                             8   @andreafrancia   #trash-cli
Saturday, March 24, 12                                         8
$ list-trash

            2012-03-02 19:43:44 /Users/andrea/foo




                               9      @andreafrancia   #trash-cli
Saturday, March 24, 12                                              9
$ trash a_dir/foo
             $ trash another_dir/foo




                           10   @andreafrancia   #trash-cli
Saturday, March 24, 12                                        10
$ list-trash
            2012-03-02 19:43:44 /home/andrea/foo
            2012-03-02 19:50:04 /home/andrea/a_dir/…
            2012-03-02 19:50:05 /home/andrea/anothe…




                               11     @andreafrancia   #trash-cli
Saturday, March 24, 12                                              11
$ restore-trash
         0 2012-03-02 19:43:44 /home/andrea/foo
         1 2012-03-02 19:50:04 /home/andrea/a_d…
         2 2012-03-02 19:50:05 /home/andrea/ano…
      File to restore? [0..2]:




                           12     @andreafrancia   #trash-cli
Saturday, March 24, 12                                          12
$ empty-trash




                         13   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      13
KDE                XFCE


                         Gnome
                            14   @andreafrancia   #trash-cli
Saturday, March 24, 12                                         14
Generic Naming Issue


                          15   @andreafrancia   #trash-cli
Saturday, March 24, 12                                       15
Protagonisti



                              16   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           16
I nomi dei comandi

               $ trash

               $ list-trash

               $ empty-trash

               $ restore-trash


                                 17   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              17
Come funziona Fedora




                                  18   @andreafrancia   #trash-cli
Saturday, March 24, 12                                               18
Un revisore
 di Fedora




                         19   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      19
Distribuzioni


                         Come funzionano?




                                        20   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                     20
Distribuzioni


                         Come funzionano?




                                        21   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                     21
2X Absolute AbulÉdu AgiliaLinux Alinex aLinux Alpine ALT Ankur Bangla AnNyung antiX APODIO aptosid
      Arch ArchBang ArcheOS AriOS Ark ArtistX Asianux Astaro AsteriskNOW Asturix Aurora AUSTRUMI AV
      Linux BackBox BackTrack Baltix Bardinux Bayanihan BeakOS Berry BigLinux Bio-Linux blackPanther BLAG
      BlankOn Bodhi BOSS BRLix Burapha CAELinux CAINE Caixa Mágica Calculate Canaima Caos Càtix CCux
      CDlinux CensorNet CentOS Chakra ClearOS Clonezilla Comfusion Commodore Connochaet Coyote CrunchBang
      CRUX CTKArch Debian DebXPde Deepin DEFT DesktopBSD Devil DigAnTel DoudouLinux Draco DragonFly Dragora
      Dreamlinux Dream Studio dyne:bolic EasyPeasy Edubuntu Ekaaty Elastix elementary Endian Epidemic Estrella
      Roja ESUN Evinux ExTiX Fedora Fermi Finnix Foresight FreeBSD FreeNAS Frenzy Frugalware Fuduntu
      FuguIta Funtoo Fusion GeeXboX Gentoo Gentoox GhostBSD Gibraltar GnackTrack GParted Greenie Grml
      Guadalinex Hacao Haiku Hanthana Helix IDMS Imagineos Inquisitor Insigne IPCop IPFire Jibbed JoLinux Joli
      OS K12Linux kademar KahelOS KANOTIX Karoshi Kiwi Knoppel KNOPPIX KnoSciences Kongoni Kororaa
      Kubuntu Kwort Leeenux Legacy LFS LinHES Linpus LinuxConsole Linux-EduCD linuX-gamers LinuxTLE Linvo
      Liquid Lemur Litrix LliureX LPS Lubuntu Lunar m0n0wall Macpup Madbox Mageia Magic Mandriva
      Mangaka Matriux MAX MEPIS MidnightBSD MiniNo MINIX Mint Miracle MirOS MoLinux Momonga
      Monomaxos moonOS Musix Myrinix Mythbuntu Nature's NetBSD Netrunner NetSecL Nexenta NexentaStor
      NST NuTyX Ojuba OLPC Omoikane O-Net OpenBSD Openfiler OpenIndiana openmamba OpenMediaVault
      openSUSE Openwall Open Xange Ophcrack Oracle Otakux Overclockix PAIPIX paldo PapugLinux Parabola
      Pardus Parsix Parted Magic PC-BSD PCLinuxOS Pear PelicanHPC Pentoo Peppermint pfSense Phayoune Pinguy
      Plamo PLD Plop Porteus Poseidon pQui Privatix Proxmox PUIAS Puppy Puredyne PureOS Qimo Qomo Quirky
      Red Flag Red Hat Redo redWall Resulinux RIPLinuX Rocks Cluster ROSA Runtu Sabayon Sabily SalineOS
      Salix SAMity Satux SchilliX Scientific Securepoint Semplice siduction Skolelinux Slackware SliTaz SME
      Ser ver SmoothWall SMS Snowlinux SoL Solaris Sorcerer Source Mage STD StressLinux SuliX SuperGamer
      Super OS SuperX Suriyan SUSE Swift Syllable SystemRescue T2 Tails Tango Studio TFM Thinstation Tiny
      Core TinyMe Toorox Toutou Trinity Trisquel trixbox Tuquito Turbolinux TurnKey UberStudent Ubuntu Ubuntu
      DP Ubuntu Rescue Ubuntu Studio UHU-Linux Ulteo Ultimate Unity Untangle UPR Userful UTUTO Vector
      VENENUX Vine Vinux VLOS VMKnoppix VortexBox Vyatta wattOS Webconverger Wifislax xPUD Xubuntu
      Yellow Dog Ylmf Yoper Zentyal Zenwalk Zeroshell ZevenOS Zorin


                  From                    of http://distrowatch.com/
                                                         22               @andreafrancia             #trash-cli
Saturday, March 24, 12                                                                                            22
2X Absolute AbulÉdu AgiliaLinux Alinex aLinux Alpine ALT Ankur Bangla AnNyung antiX APODIO aptosid
      Arch ArchBang ArcheOS AriOS Ark ArtistX Asianux Astaro AsteriskNOW Asturix Aurora AUSTRUMI AV
      Linux BackBox BackTrack Baltix Bardinux Bayanihan BeakOS Berry BigLinux Bio-Linux blackPanther BLAG
      BlankOn Bodhi BOSS BRLix Burapha CAELinux CAINE Caixa Mágica Calculate Canaima Caos Càtix CCux
      CDlinux CensorNet CentOS Chakra ClearOS Clonezilla Comfusion Commodore Connochaet Coyote CrunchBang
      CRUX CTKArch Debian DebXPde Deepin DEFT DesktopBSD Devil DigAnTel DoudouLinux Draco DragonFly Dragora
      Dreamlinux Dream Studio dyne:bolic EasyPeasy Edubuntu Ekaaty Elastix elementary Endian Epidemic Estrella
      Roja ESUN Evinux ExTiX Fedora Fermi Finnix Foresight FreeBSD FreeNAS Frenzy Frugalware Fuduntu
      FuguIta Funtoo Fusion GeeXboX Gentoo Gentoox GhostBSD Gibraltar GnackTrack GParted Greenie Grml
      Guadalinex Hacao Haiku Hanthana Helix IDMS Imagineos Inquisitor Insigne IPCop IPFire Jibbed JoLinux Joli
      OS K12Linux kademar KahelOS KANOTIX Karoshi Kiwi Knoppel KNOPPIX KnoSciences Kongoni Kororaa
      Kubuntu Kwort Leeenux Legacy LFS LinHES Linpus LinuxConsole Linux-EduCD linuX-gamers LinuxTLE Linvo
      Liquid Lemur Litrix LliureX LPS Lubuntu Lunar m0n0wall Macpup Madbox Mageia Magic Mandriva
      Mangaka Matriux MAX MEPIS MidnightBSD MiniNo MINIX Mint Miracle MirOS MoLinux Momonga
      Monomaxos moonOS Musix Myrinix Mythbuntu Nature's NetBSD Netrunner NetSecL Nexenta NexentaStor
      NST NuTyX Ojuba OLPC Omoikane O-Net OpenBSD Openfiler OpenIndiana openmamba OpenMediaVault
      openSUSE Openwall Open Xange Ophcrack Oracle Otakux Overclockix PAIPIX paldo PapugLinux Parabola
      Pardus Parsix Parted Magic PC-BSD PCLinuxOS Pear PelicanHPC Pentoo Peppermint pfSense Phayoune Pinguy
      Plamo PLD Plop Porteus Poseidon pQui Privatix Proxmox PUIAS Puppy Puredyne PureOS Qimo Qomo Quirky
      Red Flag Red Hat Redo redWall Resulinux RIPLinuX Rocks Cluster ROSA Runtu Sabayon Sabily SalineOS
      Salix SAMity Satux SchilliX Scientific Securepoint Semplice siduction Skolelinux Slackware SliTaz SME
      Ser ver SmoothWall SMS Snowlinux SoL Solaris Sorcerer Source Mage STD StressLinux SuliX SuperGamer
      Super OS SuperX Suriyan SUSE Swift Syllable SystemRescue T2 Tails Tango Studio TFM Thinstation Tiny
      Core TinyMe Toorox Toutou Trinity Trisquel trixbox Tuquito Turbolinux TurnKey UberStudent Ubuntu Ubuntu
      DP Ubuntu Rescue Ubuntu Studio UHU-Linux Ulteo Ultimate Unity Untangle UPR Userful UTUTO Vector
      VENENUX Vine Vinux VLOS VMKnoppix VortexBox Vyatta wattOS Webconverger Wifislax xPUD Xubuntu
      Yellow Dog Ylmf Yoper Zentyal Zenwalk Zeroshell ZevenOS Zorin


                    See                   on http://distrowatch.com/
                                                         23               @andreafrancia             #trash-cli
Saturday, March 24, 12                                                                                            23
Debian
                                       Fedora

                                  24    @andreafrancia   #trash-cli
Saturday, March 24, 12                                                24
Debian


                           25     @andreafrancia   #trash-cli
Saturday, March 24, 12                                          25
26   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      26
27   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      27
28   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      28
Fedora


                           29     @andreafrancia   #trash-cli
Saturday, March 24, 12                                          29
Fedora




                           30     @andreafrancia   #trash-cli
Saturday, March 24, 12                                          30
Nota


                         A quei tempi il progetto si chiamava solo
                         “trash” (come il comando)




                                           31      @andreafrancia   #trash-cli
Saturday, March 24, 12                                                           31
Reviewer

“            The name of this package is also a bit
             too generic, though not that much.




Saturday, March 24, 12
                               32     @andreafrancia
                                                       ”
                                                       #trash-cli
                                                                    32
Reviewer

“            Could upstream change it to be less
             generic?




       https:/

Saturday, March 24, 12
                                33
                                                          ”
              /bugzilla.redhat.com/show_bug.cgi?id=448122#c1
                                         @andreafrancia   #trash-cli
                                                                       33
Developer

“            Ok I’ll change to trash-cli.




Saturday, March 24, 12
                                34      @andreafrancia
                                                         ”
                                                         #trash-cli
                                                                      34
Reviewer

“            [Ok...but...] The name of the
             command should also be trash-
             cli.




    https:/
Saturday, March 24, 12
                              35
                                                        ”
           /bugzilla.redhat.com/show_bug.cgi?id=448122#c6
                                       @andreafrancia   #trash-cli
                                                                     35
Developer

“            The name of the main command is
             'trash' without "-cli".




Saturday, March 24, 12
                              36    @andreafrancia
                                                     ”
                                                     #trash-cli
                                                                  36
Developer

“
        The command is used is this way:
       $ trash this-file
      That means: "trash this-file in the
      trashcan", there is no reason to append the
      "-cli" suffix to the main command.




Saturday, March 24, 12
                             37   @andreafrancia
                                                   ”
                                                   #trash-cli
                                                                37
Developer

“            You are already using the
             Command Line Interface.




Saturday, March 24, 12
                             38   @andreafrancia
                                                   ”
                                                   #trash-cli
                                                                38
Developer

“            In my opinion each command name
             should reflect what the command
             does.




Saturday, March 24, 12
                             39   @andreafrancia
                                                   ”
                                                   #trash-cli
                                                                39
Reviewer

“            As far as possible.




Saturday, March 24, 12
                            40     @andreafrancia
                                                    ”
                                                    #trash-cli
                                                                 40
Developer (and others)

“            There are other programs with
             generic names already
             included!!




Saturday, March 24, 12
                                   41   @andreafrancia
                                                         ”
                                                         #trash-cli
                                                                      41
samba-common

                         net
                         profiles
                         rpcclient
                         testparm

                                     42   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                  42
Postgresql

                         createdb
                         createlang
                         createuser        droplang
                         dropdb            dropuser

                                      43    @andreafrancia   #trash-cli
Saturday, March 24, 12                                                    43
The Player Project
       Free Software tools for robot and sensor applications




            $ repoquery -f /usr/bin/player
            player-0:2.1.1-5.fc10.i386


                                                  44           @andreafrancia   #trash-cli
Saturday, March 24, 12                                                                       44
Reviewer & others

“            Precedent mistakes are not a
             good reason to let other
             generic names enter the
             distro.


     https:/

     http:/
                    October/msg00223.html
Saturday, March 24, 12
                              45       @andreafrancia
                                                       ”
            /bugzilla.redhat.com/show_bug.cgi?id=448122#c17

           /www.redhat.com/archives/fedora-devel-list/2008-
                                                       #trash-cli
                                                                    45
... after some months
                    and discussions ...


                           46   @andreafrancia   #trash-cli
Saturday, March 24, 12                                        46
Developer

“                           .... OK




Saturday, March 24, 12
                              47      @andreafrancia
                                                       ”
                                                       #trash-cli
                                                                    47
Command names changed

                    trash                trash-put
                    list-trash
                    restore-trash
                    empty-trash


                                    48     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                   48
Command names changed

                    trash                trash-put
                    list-trash           trash-list
                    restore-trash        trash-restore
                    empty-trash          trash-empty


                                    49     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                   49
Results


                         Debian --> vecchi nomi
                         Upstream --> nomi nuovi




                                          50       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                           50
Adesso ...
                         lo includono?

                               51   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            51
No!


                          52   @andreafrancia   #trash-cli
Saturday, March 24, 12                                       52
Il packager s’era
                              stufato!

                                 53   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              53
Results

                         Debian --> vecchi nomi
                         Upstream --> nomi nuovi
                         Fedora --> niente!



                                              54   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                           54
La beffa ...


                              55   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           55
Dopo qualche mese ...


                              56   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           56
... un altro packager...


                            57   @andreafrancia   #trash-cli
Saturday, March 24, 12                                         57
... ri-propone trash-
                 cli (con i vecchi nomi),
                            e ...

                            58   @andreafrancia   #trash-cli
Saturday, March 24, 12                                         58
... un altro revisore ...


                              59   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           59
... Accetta!


                              60   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           60
Lessons Learned

                         Non cambiare mai il nome dei comandi
                         Non cedere alle pressioni dei revisori
                         (tanto cambiano)


   More at: https://github.com/andreafrancia/trash-cli/blob/
       master/docs/about-the-generic-naming-issue.txt
                                           61       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                            61
Acceptance Tests


                                62   @andreafrancia   #trash-cli
Saturday, March 24, 12                                             62
Acceptance Test


                         È un test che verifica
                         una feature.

                                   63   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                63
Developer Test
                         È un test che serve allo
                         sviluppatore.



                                    64   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                 64
Usi dei Developer Test
                         validare il codice
                         supporto al design (con TDD)
                         rilevare regressioni
                         imparare una libreria
                         documentare l’uso di una libreria
                         ....

                                            65        @andreafrancia   #trash-cli
Saturday, March 24, 12                                                              65
Developer Tests


                         A volte sono chiamati: Unit Tests




                                          66       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                           66
67   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      67
Come ho affrontato
                            il problema

                                 68   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              68
“                        Avere i test é bello...



                                                            ”
                                    69     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                   69
“                        Come li scrivo?



                                                       ”
                                70    @andreafrancia   #trash-cli
Saturday, March 24, 12                                              70
“              Developer Test --> in python



                                                   ”
                             71   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          71
“                  Acceptance Test --> ?????



                                                      ”
                               72    @andreafrancia   #trash-cli
Saturday, March 24, 12                                             72
“             devo testare a livello utente



                                                   ”
                            73    @andreafrancia   #trash-cli
Saturday, March 24, 12                                          73
“                        l’utente usa la Bash



                                                         ”
                                   74   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                74
“              gli script in Bash sono facili



                                                     ”
                              75    @andreafrancia   #trash-cli
Saturday, March 24, 12                                            75
“                 esiste già un framework di
                         test per Bash


                                                     ”
                               76   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            76
shunit




                            77    @andreafrancia   #trash-cli
Saturday, March 24, 12                                          77
“                               IDEA:
                         li scrivo in Bash!


                                                         ”
                                  78    @andreafrancia   #trash-cli
Saturday, March 24, 12                                                78
Era un buona idea?


                                 79   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              79
80   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      80
Risultati


                             81   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          81
Bash Tests are
                            slooow!

                               82   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            82
Little information in
                    failure messages

                            83   @andreafrancia   #trash-cli
Saturday, March 24, 12                                         83
Complex set-up


                               84   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            84
Complex test set-up (1)

                •$PATH tricks


                                    85   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                 85
Complex test set-up (2)

                •Test volume creation



                               86   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            86
Two test suites


                         accetance test (in bash)
                         developer test (python)



                                      87     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                     87
Lessons Learned


                                88   @andreafrancia   #trash-cli
Saturday, March 24, 12                                             88
Test

                         Se sono lenti
                         Allora non li usi
                                 89   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              89
Test

                         Se
                         allora non li usi
                                 90   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              90
Test

                         Se
                         Allora li usi
                               91    @andreafrancia   #trash-cli
Saturday, March 24, 12                                             91
Quindi

                           Meglio se tutti
                         omogenei (e.g. tutto
                              python)
                                  92     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                 92
Bash Tests?
                         Ok, ma pochi.

                               93   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            93
shUnit non serve a
                               niente
                             Si può fare tutto in bash



                                       94        @andreafrancia   #trash-cli
Saturday, March 24, 12                                                         94
Testing with Bash


                                 95   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              95
#!/bin/bash
                  set,-o,errexit



                           96   @andreafrancia   #trash-cli
Saturday, March 24, 12                                        96
#!/bin/bash
            set,-o,errexit,
            set,-o,nounset



                         97   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      97
it_should_delete_the_argument.bash

              #!/bin/bash
              set,-o,errexit
              set,-o,nounset

              #,given,a,file,named,foo
              touch,foo

              #,when,I,put,the,file,in,the,trash
              trash-put,foo

              #,then,the,file,should,have,been,gone
              test,!,-f,foo
                                  98      @andreafrancia   #trash-cli
Saturday, March 24, 12                                                  98
Checking output of a
                              command
     #,comparing,output,of,a,command

     diff,<(trash-list),-,<<,EXPECTED_OUTPUT
     2012-03-02,19:43:44,/Users/andrea/foo
     2012-03-02,19:44:04,/Users/andrea/foo
     EXPECTED_OUTPUT



                                  99   @andreafrancia   #trash-cli
Saturday, March 24, 12                                               99
Licenza


                            100   @andreafrancia   #trash-cli
Saturday, March 24, 12                                      100
“                        Quale licenza?



                                                       ”
                                101   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          101
“                        GPL


                                                 ”
                          102   @andreafrancia   #trash-cli
Saturday, March 24, 12                                    102
GPL v2+
            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; either version 2 of
            the License, or (at your option) any
            later version.




                                103     @andreafrancia   #trash-cli
Saturday, March 24, 12                                            103
or (at your option) any later
       version.




                         104   @andreafrancia   #trash-cli
Saturday, March 24, 12                                   104
Lessons Learned



                                105   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          105
Licenze già fatte?

                         Comode ma vanno capite.


                                   106   @andreafrancia   #trash-cli
Saturday, March 24, 12                                             106
Il papiro all’inizio del file é
                    una rottura



                                   107   @andreafrancia   #trash-cli
Saturday, March 24, 12                                             107
Papiro della GPL
     #!/usr/bin/python
     # list-trash: list trashed files
     #
     # Copyright (C) 2007,2008 Andrea Francia Trivolzio(PV) Italy
     #
     # 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; either version 2
     # of the License, or (at your option) any later version.
     #
     # 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, write to the Free Software
     # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     # 02110-1301, USA.

     from libtrash import TrashDirectory

     for trashed_file in TrashDirectory.trashed_files() :
         print "%s %s" % (trashed_file.deletion_date, trashed_file.path)




                                               108            @andreafrancia   #trash-cli
Saturday, March 24, 12                                                                  108
Esistono licenze più semplici!



                               109   @andreafrancia   #trash-cli
Saturday, March 24, 12                                         109
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.




                          http://sam.zoy.org/wtfpl/
                                      110       @andreafrancia   #trash-cli
 Saturday, March 24, 12                                                   110
Code Hosting
                           Services

                              111   @andreafrancia   #trash-cli
Saturday, March 24, 12                                        111
sourceforge.net


                                112   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          112
Lessons Learned




                                113   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          113
Lessons Learned
                         Il ser vizo di release é importante




                                           113      @andreafrancia   #trash-cli
Saturday, March 24, 12                                                        113
Lessons Learned
                         Il ser vizo di release é importante
                         Feedback barrier




                                            113     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                        113
Lessons Learned
                         Il ser vizo di release é importante
                         Feedback barrier
                         Si può sempre cambiare




                                            113     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                        113
Lessons Learned
                          Il ser vizo di release é importante
                          Feedback barrier
                          Si può sempre cambiare


                         sf.net



                                             113     @andreafrancia   #trash-cli
Saturday, March 24, 12                                                         113
Lessons Learned
                          Il ser vizo di release é importante
                          Feedback barrier
                          Si può sempre cambiare


                         sf.net       google
                                       code


                                               113   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                         113
Lessons Learned
                          Il ser vizo di release é importante
                          Feedback barrier
                          Si può sempre cambiare
                                                     bitbucket
                         sf.net       google
                                       code


                                               113       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                             113
Lessons Learned
                          Il ser vizo di release é importante
                          Feedback barrier
                          Si può sempre cambiare
                                                     bitbucket
                         sf.net       google
                                       code


                                               113       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                             113
Lessons Learned
                          Il ser vizo di release é importante
                          Feedback barrier
                          Si può sempre cambiare
                                                     bitbucket
                         sf.net       google
                                       code               GitHub

                                               113       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                             113
Lessons Learned
                          Il ser vizo di release é importante
                          Feedback barrier
                          Si può sempre cambiare
                                                     bitbucket
                         sf.net       google
                                       code                               ?
                                                          GitHub

                                               113       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                             113
Una scelta
                         azzeccata: Python

                                 114   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           114
Internals : TrashDir


                                  115   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            115
TrashDir: dove sono
                         nascosti i file cestinati



                                     116   @andreafrancia   #trash-cli
Saturday, March 24, 12                                               116
How it works



                              117   @andreafrancia   #trash-cli
Saturday, March 24, 12                                        117
Gnome
                            KDE


                                  TrashDir


                trash-cli
                                               XFCE

                                       118   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                 118
How it works
      $,trash-put,pippo.txt




      ~/.local/share/Trash/,,,,,,,,,,,,+---------------------------------+
      ,,,,info/,,,,,,,,,,,,,,,,,,,-----|,[Trash,Info],,,,,,,,,,,,,,,,,,,,|
      ,,,,,,,,pippo.txt.trashinfo,,,,,,|,Path=/tmp/pippo.txt,,,,,,,,,,,,,|
      ,,,,files/,,,,,,,,,,,,,,,,,,,,,,,|,DeletionDate=2012-02-29T00:13:54|
      ,,,,,,,,pippo.txt,,,,,,,,,,,,,,,,+---------------------------------+
      ,,,,,,,,,,,,,,,,,`.
      ,,,,,,,,,,,,,,,,,,,`-,original,file,moved,here




                                        119         @andreafrancia    #trash-cli
Saturday, March 24, 12                                                         119
How it works
      $,touch,pippo.txt;,trash-put,pippo.txt,,,,,#,again
      $,touch,pippo.txt;,trash-put,pippo.txt,,,,,#,again
      $,touch,pippo.txt;,trash-put,pippo.txt,,,,,#,again

      ~/.local/share/Trash/,
      ,,,,info/,,,,,,,,,,,,,,,,,,
      ,,,,,,,,pippo.txt.trashinfo
      ,,,,,,,,pippo_1.txt.trashinfo
      ,,,,,,,,pippo_2.txt.trashinfo
      ,,,,,,,,pippo_3.txt.trashinfo
      ,,,,files/,,,,,,,,,,,,,,,,,
      ,,,,,,,,pippo.txt,,,,,,,,,,
      ,,,,,,,,pippo_1.txt,,,,,,,,,,
      ,,,,,,,,pippo_2.txt,,,,,,,,,,
      ,,,,,,,,pippo_3.txt,,,,,,,,,,




                                          120         @andreafrancia   #trash-cli
Saturday, March 24, 12                                                          120
Gnome
                          KDE


                                TrashDir


                         cli
                                                XFCE
                                     121   @andreafrancia   #trash-cli
Saturday, March 24, 12                                               121
122   @andreafrancia   #trash-cli
Saturday, March 24, 12                                   122
pippo.txt
                               pippo.txt




                         123        @andreafrancia   #trash-cli
Saturday, March 24, 12                                        123
open(3)
      #include,<sys/stat.h>,,,,,,,,,,,,,,,,,,,,,,,,,,,
      #include,<fcntl.h>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
      ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
      int,open(const,char,*path,,int,oflag,,...,);,,,,
      ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,^,,,,,,,,,,,,,,
      ,,,,,,,,,,,,,,,O_EXCL,|,O_CREAT,-’,




                             124     @andreafrancia   #trash-cli
Saturday, March 24, 12                                         124
os.open
      import,os

      fd,=,os.open(dest,,os.O_RDWR,,|,
      ,,,,,,,,,,,,,,,,,,,os.O_CREAT,|
      ,,,,,,,,,,,,,,,,,,,os.O_EXCL,,0600)
      ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
      os.write(fd,,content)
      os.close(fd)
      logger.trashinfo_created_as(dest)

      return,(dest,,trash_id)


                                125   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          125
Conclusioni


                              126   @andreafrancia   #trash-cli
Saturday, March 24, 12                                        126
Come lo farei ora?


                                 127   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           127
Beer/Pizza License



                                 128   @andreafrancia   #trash-cli
Saturday, March 24, 12                                           128
Git



                         129   @andreafrancia   #trash-cli
Saturday, March 24, 12                                   129
GitHub



                           130    @andreafrancia   #trash-cli
Saturday, March 24, 12                                      130
No Wiki, solo .txt nei i
                              sorgenti



                                    131   @andreafrancia   #trash-cli
Saturday, March 24, 12                                              131
No mailing list.



                                132   @andreafrancia   #trash-cli
Saturday, March 24, 12                                          132
Nessuno sforzo per
                     l’inclusione in distribuzioni



                                  133   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            133
Ma qualcuno lo usa?


                                  134   @andreafrancia   #trash-cli
Saturday, March 24, 12                                            134
Distribuzioni
                         Debian (e Ubuntu)
                         Fedora
                         Arch Linux
                         Foresight Linux
                         OpenSuse
                         ... forse altri

                                             135   @andreafrancia   #trash-cli
Saturday, March 24, 12                                                       135
Altri progetti

               LXDE usa trash-cli come libreria



                    (*) LXDE: Light weight X11 Desktop Environment


                                            136       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                          136
http://qa.debian.org/popcon-graph.php?packages=trash-cli
                                  137       @andreafrancia   #trash-cli
Saturday, March 24, 12                                                137
Grazie
                              Andrea Francia
                          http://andreafrancia.it
                         andrea@andreafrancia.it




                                    139
                                    138      @andreafrancia   #trash-cli
Saturday, March 24, 12                                                 138
Grazie
                              Andrea Francia
                          http://andreafrancia.it
                         andrea@andreafrancia.it

                         Libero da settembre 2012




                                     139      @andreafrancia   #trash-cli
Saturday, March 24, 12                                                  139

Más contenido relacionado

Más de Andrea Francia

User Stories - Andrea Francia @ WeDev 7 novembre 2018
User Stories - Andrea Francia @ WeDev 7 novembre 2018User Stories - Andrea Francia @ WeDev 7 novembre 2018
User Stories - Andrea Francia @ WeDev 7 novembre 2018Andrea Francia
 
Le pratiche ingegneristiche di eXtreme Programming
Le pratiche ingegneristiche di eXtreme ProgrammingLe pratiche ingegneristiche di eXtreme Programming
Le pratiche ingegneristiche di eXtreme ProgrammingAndrea Francia
 
Test-Driven Development su Codice Esistente
Test-Driven Development su Codice EsistenteTest-Driven Development su Codice Esistente
Test-Driven Development su Codice EsistenteAndrea Francia
 
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)Andrea Francia
 
Introduzione a eXtreme Programming
Introduzione a eXtreme ProgrammingIntroduzione a eXtreme Programming
Introduzione a eXtreme ProgrammingAndrea Francia
 
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG miTutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG miAndrea Francia
 
Writing a Crawler with Python and TDD
Writing a Crawler with Python and TDDWriting a Crawler with Python and TDD
Writing a Crawler with Python and TDDAndrea Francia
 
Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008Andrea Francia
 
Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Andrea Francia
 
Working Effectively with Legacy Code (draft)
Working Effectively with Legacy Code (draft)Working Effectively with Legacy Code (draft)
Working Effectively with Legacy Code (draft)Andrea Francia
 

Más de Andrea Francia (14)

User Stories - Andrea Francia @ WeDev 7 novembre 2018
User Stories - Andrea Francia @ WeDev 7 novembre 2018User Stories - Andrea Francia @ WeDev 7 novembre 2018
User Stories - Andrea Francia @ WeDev 7 novembre 2018
 
Le pratiche ingegneristiche di eXtreme Programming
Le pratiche ingegneristiche di eXtreme ProgrammingLe pratiche ingegneristiche di eXtreme Programming
Le pratiche ingegneristiche di eXtreme Programming
 
Test-Driven Development su Codice Esistente
Test-Driven Development su Codice EsistenteTest-Driven Development su Codice Esistente
Test-Driven Development su Codice Esistente
 
Come si applica l'OCP
Come si applica l'OCPCome si applica l'OCP
Come si applica l'OCP
 
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)
Le 12 pratiche - Un introduzione a XP (Mini Italian Agile Day)
 
Introduzione a eXtreme Programming
Introduzione a eXtreme ProgrammingIntroduzione a eXtreme Programming
Introduzione a eXtreme Programming
 
Bash-Only Deployment
Bash-Only DeploymentBash-Only Deployment
Bash-Only Deployment
 
TDD anche su iOS
TDD anche su iOSTDD anche su iOS
TDD anche su iOS
 
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG miTutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
Tutti i miei sbagli, versione 7 Marzo 2012 al XPUG mi
 
Writing a Crawler with Python and TDD
Writing a Crawler with Python and TDDWriting a Crawler with Python and TDD
Writing a Crawler with Python and TDD
 
Introduzione al TDD
Introduzione al TDDIntroduzione al TDD
Introduzione al TDD
 
Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008Google C++ Testing Framework in Visual Studio 2008
Google C++ Testing Framework in Visual Studio 2008
 
Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009Subversion @ JUG Milano 11 dic 2009
Subversion @ JUG Milano 11 dic 2009
 
Working Effectively with Legacy Code (draft)
Working Effectively with Legacy Code (draft)Working Effectively with Legacy Code (draft)
Working Effectively with Legacy Code (draft)
 

Último

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Último (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Tutti i miei sbagli (Errori di un wannabe Open Source Developer)

  • 1. Tutti i miei sbagli Andrea Francia andrea@andreafrancia.it – http://andreafrancia.it Saturday, March 24, 12 1
  • 2. Tutti i miei sbagli Errori di un wannabe Open Source Developer Andrea Francia 2 @andreafrancia #trash-cli Saturday, March 24, 12 2
  • 3. Il progetto Gli errori Contenuti Qualcosa di giusto Conclusioni Applausi 3 @andreafrancia #trash-cli Saturday, March 24, 12 3
  • 4. trash-cli https://github.com/andreafrancia/trash-cli 4 @andreafrancia #trash-cli Saturday, March 24, 12 4
  • 5. Open Source GPLv2 5 @andreafrancia #trash-cli Saturday, March 24, 12 5
  • 6. Linux 6 @andreafrancia #trash-cli Saturday, March 24, 12 6
  • 7. $ trash 7 @andreafrancia #trash-cli Saturday, March 24, 12 7
  • 8. $ trash ./foo 8 @andreafrancia #trash-cli Saturday, March 24, 12 8
  • 9. $ list-trash 2012-03-02 19:43:44 /Users/andrea/foo 9 @andreafrancia #trash-cli Saturday, March 24, 12 9
  • 10. $ trash a_dir/foo $ trash another_dir/foo 10 @andreafrancia #trash-cli Saturday, March 24, 12 10
  • 11. $ list-trash 2012-03-02 19:43:44 /home/andrea/foo 2012-03-02 19:50:04 /home/andrea/a_dir/… 2012-03-02 19:50:05 /home/andrea/anothe… 11 @andreafrancia #trash-cli Saturday, March 24, 12 11
  • 12. $ restore-trash 0 2012-03-02 19:43:44 /home/andrea/foo 1 2012-03-02 19:50:04 /home/andrea/a_d… 2 2012-03-02 19:50:05 /home/andrea/ano… File to restore? [0..2]: 12 @andreafrancia #trash-cli Saturday, March 24, 12 12
  • 13. $ empty-trash 13 @andreafrancia #trash-cli Saturday, March 24, 12 13
  • 14. KDE XFCE Gnome 14 @andreafrancia #trash-cli Saturday, March 24, 12 14
  • 15. Generic Naming Issue 15 @andreafrancia #trash-cli Saturday, March 24, 12 15
  • 16. Protagonisti 16 @andreafrancia #trash-cli Saturday, March 24, 12 16
  • 17. I nomi dei comandi $ trash $ list-trash $ empty-trash $ restore-trash 17 @andreafrancia #trash-cli Saturday, March 24, 12 17
  • 18. Come funziona Fedora 18 @andreafrancia #trash-cli Saturday, March 24, 12 18
  • 19. Un revisore di Fedora 19 @andreafrancia #trash-cli Saturday, March 24, 12 19
  • 20. Distribuzioni Come funzionano? 20 @andreafrancia #trash-cli Saturday, March 24, 12 20
  • 21. Distribuzioni Come funzionano? 21 @andreafrancia #trash-cli Saturday, March 24, 12 21
  • 22. 2X Absolute AbulÉdu AgiliaLinux Alinex aLinux Alpine ALT Ankur Bangla AnNyung antiX APODIO aptosid Arch ArchBang ArcheOS AriOS Ark ArtistX Asianux Astaro AsteriskNOW Asturix Aurora AUSTRUMI AV Linux BackBox BackTrack Baltix Bardinux Bayanihan BeakOS Berry BigLinux Bio-Linux blackPanther BLAG BlankOn Bodhi BOSS BRLix Burapha CAELinux CAINE Caixa Mágica Calculate Canaima Caos Càtix CCux CDlinux CensorNet CentOS Chakra ClearOS Clonezilla Comfusion Commodore Connochaet Coyote CrunchBang CRUX CTKArch Debian DebXPde Deepin DEFT DesktopBSD Devil DigAnTel DoudouLinux Draco DragonFly Dragora Dreamlinux Dream Studio dyne:bolic EasyPeasy Edubuntu Ekaaty Elastix elementary Endian Epidemic Estrella Roja ESUN Evinux ExTiX Fedora Fermi Finnix Foresight FreeBSD FreeNAS Frenzy Frugalware Fuduntu FuguIta Funtoo Fusion GeeXboX Gentoo Gentoox GhostBSD Gibraltar GnackTrack GParted Greenie Grml Guadalinex Hacao Haiku Hanthana Helix IDMS Imagineos Inquisitor Insigne IPCop IPFire Jibbed JoLinux Joli OS K12Linux kademar KahelOS KANOTIX Karoshi Kiwi Knoppel KNOPPIX KnoSciences Kongoni Kororaa Kubuntu Kwort Leeenux Legacy LFS LinHES Linpus LinuxConsole Linux-EduCD linuX-gamers LinuxTLE Linvo Liquid Lemur Litrix LliureX LPS Lubuntu Lunar m0n0wall Macpup Madbox Mageia Magic Mandriva Mangaka Matriux MAX MEPIS MidnightBSD MiniNo MINIX Mint Miracle MirOS MoLinux Momonga Monomaxos moonOS Musix Myrinix Mythbuntu Nature's NetBSD Netrunner NetSecL Nexenta NexentaStor NST NuTyX Ojuba OLPC Omoikane O-Net OpenBSD Openfiler OpenIndiana openmamba OpenMediaVault openSUSE Openwall Open Xange Ophcrack Oracle Otakux Overclockix PAIPIX paldo PapugLinux Parabola Pardus Parsix Parted Magic PC-BSD PCLinuxOS Pear PelicanHPC Pentoo Peppermint pfSense Phayoune Pinguy Plamo PLD Plop Porteus Poseidon pQui Privatix Proxmox PUIAS Puppy Puredyne PureOS Qimo Qomo Quirky Red Flag Red Hat Redo redWall Resulinux RIPLinuX Rocks Cluster ROSA Runtu Sabayon Sabily SalineOS Salix SAMity Satux SchilliX Scientific Securepoint Semplice siduction Skolelinux Slackware SliTaz SME Ser ver SmoothWall SMS Snowlinux SoL Solaris Sorcerer Source Mage STD StressLinux SuliX SuperGamer Super OS SuperX Suriyan SUSE Swift Syllable SystemRescue T2 Tails Tango Studio TFM Thinstation Tiny Core TinyMe Toorox Toutou Trinity Trisquel trixbox Tuquito Turbolinux TurnKey UberStudent Ubuntu Ubuntu DP Ubuntu Rescue Ubuntu Studio UHU-Linux Ulteo Ultimate Unity Untangle UPR Userful UTUTO Vector VENENUX Vine Vinux VLOS VMKnoppix VortexBox Vyatta wattOS Webconverger Wifislax xPUD Xubuntu Yellow Dog Ylmf Yoper Zentyal Zenwalk Zeroshell ZevenOS Zorin From of http://distrowatch.com/ 22 @andreafrancia #trash-cli Saturday, March 24, 12 22
  • 23. 2X Absolute AbulÉdu AgiliaLinux Alinex aLinux Alpine ALT Ankur Bangla AnNyung antiX APODIO aptosid Arch ArchBang ArcheOS AriOS Ark ArtistX Asianux Astaro AsteriskNOW Asturix Aurora AUSTRUMI AV Linux BackBox BackTrack Baltix Bardinux Bayanihan BeakOS Berry BigLinux Bio-Linux blackPanther BLAG BlankOn Bodhi BOSS BRLix Burapha CAELinux CAINE Caixa Mágica Calculate Canaima Caos Càtix CCux CDlinux CensorNet CentOS Chakra ClearOS Clonezilla Comfusion Commodore Connochaet Coyote CrunchBang CRUX CTKArch Debian DebXPde Deepin DEFT DesktopBSD Devil DigAnTel DoudouLinux Draco DragonFly Dragora Dreamlinux Dream Studio dyne:bolic EasyPeasy Edubuntu Ekaaty Elastix elementary Endian Epidemic Estrella Roja ESUN Evinux ExTiX Fedora Fermi Finnix Foresight FreeBSD FreeNAS Frenzy Frugalware Fuduntu FuguIta Funtoo Fusion GeeXboX Gentoo Gentoox GhostBSD Gibraltar GnackTrack GParted Greenie Grml Guadalinex Hacao Haiku Hanthana Helix IDMS Imagineos Inquisitor Insigne IPCop IPFire Jibbed JoLinux Joli OS K12Linux kademar KahelOS KANOTIX Karoshi Kiwi Knoppel KNOPPIX KnoSciences Kongoni Kororaa Kubuntu Kwort Leeenux Legacy LFS LinHES Linpus LinuxConsole Linux-EduCD linuX-gamers LinuxTLE Linvo Liquid Lemur Litrix LliureX LPS Lubuntu Lunar m0n0wall Macpup Madbox Mageia Magic Mandriva Mangaka Matriux MAX MEPIS MidnightBSD MiniNo MINIX Mint Miracle MirOS MoLinux Momonga Monomaxos moonOS Musix Myrinix Mythbuntu Nature's NetBSD Netrunner NetSecL Nexenta NexentaStor NST NuTyX Ojuba OLPC Omoikane O-Net OpenBSD Openfiler OpenIndiana openmamba OpenMediaVault openSUSE Openwall Open Xange Ophcrack Oracle Otakux Overclockix PAIPIX paldo PapugLinux Parabola Pardus Parsix Parted Magic PC-BSD PCLinuxOS Pear PelicanHPC Pentoo Peppermint pfSense Phayoune Pinguy Plamo PLD Plop Porteus Poseidon pQui Privatix Proxmox PUIAS Puppy Puredyne PureOS Qimo Qomo Quirky Red Flag Red Hat Redo redWall Resulinux RIPLinuX Rocks Cluster ROSA Runtu Sabayon Sabily SalineOS Salix SAMity Satux SchilliX Scientific Securepoint Semplice siduction Skolelinux Slackware SliTaz SME Ser ver SmoothWall SMS Snowlinux SoL Solaris Sorcerer Source Mage STD StressLinux SuliX SuperGamer Super OS SuperX Suriyan SUSE Swift Syllable SystemRescue T2 Tails Tango Studio TFM Thinstation Tiny Core TinyMe Toorox Toutou Trinity Trisquel trixbox Tuquito Turbolinux TurnKey UberStudent Ubuntu Ubuntu DP Ubuntu Rescue Ubuntu Studio UHU-Linux Ulteo Ultimate Unity Untangle UPR Userful UTUTO Vector VENENUX Vine Vinux VLOS VMKnoppix VortexBox Vyatta wattOS Webconverger Wifislax xPUD Xubuntu Yellow Dog Ylmf Yoper Zentyal Zenwalk Zeroshell ZevenOS Zorin See on http://distrowatch.com/ 23 @andreafrancia #trash-cli Saturday, March 24, 12 23
  • 24. Debian Fedora 24 @andreafrancia #trash-cli Saturday, March 24, 12 24
  • 25. Debian 25 @andreafrancia #trash-cli Saturday, March 24, 12 25
  • 26. 26 @andreafrancia #trash-cli Saturday, March 24, 12 26
  • 27. 27 @andreafrancia #trash-cli Saturday, March 24, 12 27
  • 28. 28 @andreafrancia #trash-cli Saturday, March 24, 12 28
  • 29. Fedora 29 @andreafrancia #trash-cli Saturday, March 24, 12 29
  • 30. Fedora 30 @andreafrancia #trash-cli Saturday, March 24, 12 30
  • 31. Nota A quei tempi il progetto si chiamava solo “trash” (come il comando) 31 @andreafrancia #trash-cli Saturday, March 24, 12 31
  • 32. Reviewer “ The name of this package is also a bit too generic, though not that much. Saturday, March 24, 12 32 @andreafrancia ” #trash-cli 32
  • 33. Reviewer “ Could upstream change it to be less generic? https:/ Saturday, March 24, 12 33 ” /bugzilla.redhat.com/show_bug.cgi?id=448122#c1 @andreafrancia #trash-cli 33
  • 34. Developer “ Ok I’ll change to trash-cli. Saturday, March 24, 12 34 @andreafrancia ” #trash-cli 34
  • 35. Reviewer “ [Ok...but...] The name of the command should also be trash- cli. https:/ Saturday, March 24, 12 35 ” /bugzilla.redhat.com/show_bug.cgi?id=448122#c6 @andreafrancia #trash-cli 35
  • 36. Developer “ The name of the main command is 'trash' without "-cli". Saturday, March 24, 12 36 @andreafrancia ” #trash-cli 36
  • 37. Developer “ The command is used is this way: $ trash this-file That means: "trash this-file in the trashcan", there is no reason to append the "-cli" suffix to the main command. Saturday, March 24, 12 37 @andreafrancia ” #trash-cli 37
  • 38. Developer “ You are already using the Command Line Interface. Saturday, March 24, 12 38 @andreafrancia ” #trash-cli 38
  • 39. Developer “ In my opinion each command name should reflect what the command does. Saturday, March 24, 12 39 @andreafrancia ” #trash-cli 39
  • 40. Reviewer “ As far as possible. Saturday, March 24, 12 40 @andreafrancia ” #trash-cli 40
  • 41. Developer (and others) “ There are other programs with generic names already included!! Saturday, March 24, 12 41 @andreafrancia ” #trash-cli 41
  • 42. samba-common net profiles rpcclient testparm 42 @andreafrancia #trash-cli Saturday, March 24, 12 42
  • 43. Postgresql createdb createlang createuser droplang dropdb dropuser 43 @andreafrancia #trash-cli Saturday, March 24, 12 43
  • 44. The Player Project Free Software tools for robot and sensor applications $ repoquery -f /usr/bin/player player-0:2.1.1-5.fc10.i386 44 @andreafrancia #trash-cli Saturday, March 24, 12 44
  • 45. Reviewer & others “ Precedent mistakes are not a good reason to let other generic names enter the distro. https:/ http:/ October/msg00223.html Saturday, March 24, 12 45 @andreafrancia ” /bugzilla.redhat.com/show_bug.cgi?id=448122#c17 /www.redhat.com/archives/fedora-devel-list/2008- #trash-cli 45
  • 46. ... after some months and discussions ... 46 @andreafrancia #trash-cli Saturday, March 24, 12 46
  • 47. Developer “ .... OK Saturday, March 24, 12 47 @andreafrancia ” #trash-cli 47
  • 48. Command names changed trash trash-put list-trash restore-trash empty-trash 48 @andreafrancia #trash-cli Saturday, March 24, 12 48
  • 49. Command names changed trash trash-put list-trash trash-list restore-trash trash-restore empty-trash trash-empty 49 @andreafrancia #trash-cli Saturday, March 24, 12 49
  • 50. Results Debian --> vecchi nomi Upstream --> nomi nuovi 50 @andreafrancia #trash-cli Saturday, March 24, 12 50
  • 51. Adesso ... lo includono? 51 @andreafrancia #trash-cli Saturday, March 24, 12 51
  • 52. No! 52 @andreafrancia #trash-cli Saturday, March 24, 12 52
  • 53. Il packager s’era stufato! 53 @andreafrancia #trash-cli Saturday, March 24, 12 53
  • 54. Results Debian --> vecchi nomi Upstream --> nomi nuovi Fedora --> niente! 54 @andreafrancia #trash-cli Saturday, March 24, 12 54
  • 55. La beffa ... 55 @andreafrancia #trash-cli Saturday, March 24, 12 55
  • 56. Dopo qualche mese ... 56 @andreafrancia #trash-cli Saturday, March 24, 12 56
  • 57. ... un altro packager... 57 @andreafrancia #trash-cli Saturday, March 24, 12 57
  • 58. ... ri-propone trash- cli (con i vecchi nomi), e ... 58 @andreafrancia #trash-cli Saturday, March 24, 12 58
  • 59. ... un altro revisore ... 59 @andreafrancia #trash-cli Saturday, March 24, 12 59
  • 60. ... Accetta! 60 @andreafrancia #trash-cli Saturday, March 24, 12 60
  • 61. Lessons Learned Non cambiare mai il nome dei comandi Non cedere alle pressioni dei revisori (tanto cambiano) More at: https://github.com/andreafrancia/trash-cli/blob/ master/docs/about-the-generic-naming-issue.txt 61 @andreafrancia #trash-cli Saturday, March 24, 12 61
  • 62. Acceptance Tests 62 @andreafrancia #trash-cli Saturday, March 24, 12 62
  • 63. Acceptance Test È un test che verifica una feature. 63 @andreafrancia #trash-cli Saturday, March 24, 12 63
  • 64. Developer Test È un test che serve allo sviluppatore. 64 @andreafrancia #trash-cli Saturday, March 24, 12 64
  • 65. Usi dei Developer Test validare il codice supporto al design (con TDD) rilevare regressioni imparare una libreria documentare l’uso di una libreria .... 65 @andreafrancia #trash-cli Saturday, March 24, 12 65
  • 66. Developer Tests A volte sono chiamati: Unit Tests 66 @andreafrancia #trash-cli Saturday, March 24, 12 66
  • 67. 67 @andreafrancia #trash-cli Saturday, March 24, 12 67
  • 68. Come ho affrontato il problema 68 @andreafrancia #trash-cli Saturday, March 24, 12 68
  • 69. Avere i test é bello... ” 69 @andreafrancia #trash-cli Saturday, March 24, 12 69
  • 70. Come li scrivo? ” 70 @andreafrancia #trash-cli Saturday, March 24, 12 70
  • 71. Developer Test --> in python ” 71 @andreafrancia #trash-cli Saturday, March 24, 12 71
  • 72. Acceptance Test --> ????? ” 72 @andreafrancia #trash-cli Saturday, March 24, 12 72
  • 73. devo testare a livello utente ” 73 @andreafrancia #trash-cli Saturday, March 24, 12 73
  • 74. l’utente usa la Bash ” 74 @andreafrancia #trash-cli Saturday, March 24, 12 74
  • 75. gli script in Bash sono facili ” 75 @andreafrancia #trash-cli Saturday, March 24, 12 75
  • 76. esiste già un framework di test per Bash ” 76 @andreafrancia #trash-cli Saturday, March 24, 12 76
  • 77. shunit 77 @andreafrancia #trash-cli Saturday, March 24, 12 77
  • 78. IDEA: li scrivo in Bash! ” 78 @andreafrancia #trash-cli Saturday, March 24, 12 78
  • 79. Era un buona idea? 79 @andreafrancia #trash-cli Saturday, March 24, 12 79
  • 80. 80 @andreafrancia #trash-cli Saturday, March 24, 12 80
  • 81. Risultati 81 @andreafrancia #trash-cli Saturday, March 24, 12 81
  • 82. Bash Tests are slooow! 82 @andreafrancia #trash-cli Saturday, March 24, 12 82
  • 83. Little information in failure messages 83 @andreafrancia #trash-cli Saturday, March 24, 12 83
  • 84. Complex set-up 84 @andreafrancia #trash-cli Saturday, March 24, 12 84
  • 85. Complex test set-up (1) •$PATH tricks 85 @andreafrancia #trash-cli Saturday, March 24, 12 85
  • 86. Complex test set-up (2) •Test volume creation 86 @andreafrancia #trash-cli Saturday, March 24, 12 86
  • 87. Two test suites accetance test (in bash) developer test (python) 87 @andreafrancia #trash-cli Saturday, March 24, 12 87
  • 88. Lessons Learned 88 @andreafrancia #trash-cli Saturday, March 24, 12 88
  • 89. Test Se sono lenti Allora non li usi 89 @andreafrancia #trash-cli Saturday, March 24, 12 89
  • 90. Test Se allora non li usi 90 @andreafrancia #trash-cli Saturday, March 24, 12 90
  • 91. Test Se Allora li usi 91 @andreafrancia #trash-cli Saturday, March 24, 12 91
  • 92. Quindi Meglio se tutti omogenei (e.g. tutto python) 92 @andreafrancia #trash-cli Saturday, March 24, 12 92
  • 93. Bash Tests? Ok, ma pochi. 93 @andreafrancia #trash-cli Saturday, March 24, 12 93
  • 94. shUnit non serve a niente Si può fare tutto in bash 94 @andreafrancia #trash-cli Saturday, March 24, 12 94
  • 95. Testing with Bash 95 @andreafrancia #trash-cli Saturday, March 24, 12 95
  • 96. #!/bin/bash set,-o,errexit 96 @andreafrancia #trash-cli Saturday, March 24, 12 96
  • 97. #!/bin/bash set,-o,errexit, set,-o,nounset 97 @andreafrancia #trash-cli Saturday, March 24, 12 97
  • 98. it_should_delete_the_argument.bash #!/bin/bash set,-o,errexit set,-o,nounset #,given,a,file,named,foo touch,foo #,when,I,put,the,file,in,the,trash trash-put,foo #,then,the,file,should,have,been,gone test,!,-f,foo 98 @andreafrancia #trash-cli Saturday, March 24, 12 98
  • 99. Checking output of a command #,comparing,output,of,a,command diff,<(trash-list),-,<<,EXPECTED_OUTPUT 2012-03-02,19:43:44,/Users/andrea/foo 2012-03-02,19:44:04,/Users/andrea/foo EXPECTED_OUTPUT 99 @andreafrancia #trash-cli Saturday, March 24, 12 99
  • 100. Licenza 100 @andreafrancia #trash-cli Saturday, March 24, 12 100
  • 101. Quale licenza? ” 101 @andreafrancia #trash-cli Saturday, March 24, 12 101
  • 102. GPL ” 102 @andreafrancia #trash-cli Saturday, March 24, 12 102
  • 103. GPL v2+ 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; either version 2 of the License, or (at your option) any later version. 103 @andreafrancia #trash-cli Saturday, March 24, 12 103
  • 104. or (at your option) any later version. 104 @andreafrancia #trash-cli Saturday, March 24, 12 104
  • 105. Lessons Learned 105 @andreafrancia #trash-cli Saturday, March 24, 12 105
  • 106. Licenze già fatte? Comode ma vanno capite. 106 @andreafrancia #trash-cli Saturday, March 24, 12 106
  • 107. Il papiro all’inizio del file é una rottura 107 @andreafrancia #trash-cli Saturday, March 24, 12 107
  • 108. Papiro della GPL #!/usr/bin/python # list-trash: list trashed files # # Copyright (C) 2007,2008 Andrea Francia Trivolzio(PV) Italy # # 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; either version 2 # of the License, or (at your option) any later version. # # 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. from libtrash import TrashDirectory for trashed_file in TrashDirectory.trashed_files() :     print "%s %s" % (trashed_file.deletion_date, trashed_file.path) 108 @andreafrancia #trash-cli Saturday, March 24, 12 108
  • 109. Esistono licenze più semplici! 109 @andreafrancia #trash-cli Saturday, March 24, 12 109
  • 111. Code Hosting Services 111 @andreafrancia #trash-cli Saturday, March 24, 12 111
  • 112. sourceforge.net 112 @andreafrancia #trash-cli Saturday, March 24, 12 112
  • 113. Lessons Learned 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 114. Lessons Learned Il ser vizo di release é importante 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 115. Lessons Learned Il ser vizo di release é importante Feedback barrier 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 116. Lessons Learned Il ser vizo di release é importante Feedback barrier Si può sempre cambiare 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 117. Lessons Learned Il ser vizo di release é importante Feedback barrier Si può sempre cambiare sf.net 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 118. Lessons Learned Il ser vizo di release é importante Feedback barrier Si può sempre cambiare sf.net google code 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 119. Lessons Learned Il ser vizo di release é importante Feedback barrier Si può sempre cambiare bitbucket sf.net google code 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 120. Lessons Learned Il ser vizo di release é importante Feedback barrier Si può sempre cambiare bitbucket sf.net google code 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 121. Lessons Learned Il ser vizo di release é importante Feedback barrier Si può sempre cambiare bitbucket sf.net google code GitHub 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 122. Lessons Learned Il ser vizo di release é importante Feedback barrier Si può sempre cambiare bitbucket sf.net google code ? GitHub 113 @andreafrancia #trash-cli Saturday, March 24, 12 113
  • 123. Una scelta azzeccata: Python 114 @andreafrancia #trash-cli Saturday, March 24, 12 114
  • 124. Internals : TrashDir 115 @andreafrancia #trash-cli Saturday, March 24, 12 115
  • 125. TrashDir: dove sono nascosti i file cestinati 116 @andreafrancia #trash-cli Saturday, March 24, 12 116
  • 126. How it works 117 @andreafrancia #trash-cli Saturday, March 24, 12 117
  • 127. Gnome KDE TrashDir trash-cli XFCE 118 @andreafrancia #trash-cli Saturday, March 24, 12 118
  • 128. How it works $,trash-put,pippo.txt ~/.local/share/Trash/,,,,,,,,,,,,+---------------------------------+ ,,,,info/,,,,,,,,,,,,,,,,,,,-----|,[Trash,Info],,,,,,,,,,,,,,,,,,,,| ,,,,,,,,pippo.txt.trashinfo,,,,,,|,Path=/tmp/pippo.txt,,,,,,,,,,,,,| ,,,,files/,,,,,,,,,,,,,,,,,,,,,,,|,DeletionDate=2012-02-29T00:13:54| ,,,,,,,,pippo.txt,,,,,,,,,,,,,,,,+---------------------------------+ ,,,,,,,,,,,,,,,,,`. ,,,,,,,,,,,,,,,,,,,`-,original,file,moved,here 119 @andreafrancia #trash-cli Saturday, March 24, 12 119
  • 129. How it works $,touch,pippo.txt;,trash-put,pippo.txt,,,,,#,again $,touch,pippo.txt;,trash-put,pippo.txt,,,,,#,again $,touch,pippo.txt;,trash-put,pippo.txt,,,,,#,again ~/.local/share/Trash/, ,,,,info/,,,,,,,,,,,,,,,,,, ,,,,,,,,pippo.txt.trashinfo ,,,,,,,,pippo_1.txt.trashinfo ,,,,,,,,pippo_2.txt.trashinfo ,,,,,,,,pippo_3.txt.trashinfo ,,,,files/,,,,,,,,,,,,,,,,, ,,,,,,,,pippo.txt,,,,,,,,,, ,,,,,,,,pippo_1.txt,,,,,,,,,, ,,,,,,,,pippo_2.txt,,,,,,,,,, ,,,,,,,,pippo_3.txt,,,,,,,,,, 120 @andreafrancia #trash-cli Saturday, March 24, 12 120
  • 130. Gnome KDE TrashDir cli XFCE 121 @andreafrancia #trash-cli Saturday, March 24, 12 121
  • 131. 122 @andreafrancia #trash-cli Saturday, March 24, 12 122
  • 132. pippo.txt pippo.txt 123 @andreafrancia #trash-cli Saturday, March 24, 12 123
  • 133. open(3) #include,<sys/stat.h>,,,,,,,,,,,,,,,,,,,,,,,,,,, #include,<fcntl.h>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, int,open(const,char,*path,,int,oflag,,...,);,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,^,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,O_EXCL,|,O_CREAT,-’, 124 @andreafrancia #trash-cli Saturday, March 24, 12 124
  • 134. os.open import,os fd,=,os.open(dest,,os.O_RDWR,,|, ,,,,,,,,,,,,,,,,,,,os.O_CREAT,| ,,,,,,,,,,,,,,,,,,,os.O_EXCL,,0600) ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, os.write(fd,,content) os.close(fd) logger.trashinfo_created_as(dest) return,(dest,,trash_id) 125 @andreafrancia #trash-cli Saturday, March 24, 12 125
  • 135. Conclusioni 126 @andreafrancia #trash-cli Saturday, March 24, 12 126
  • 136. Come lo farei ora? 127 @andreafrancia #trash-cli Saturday, March 24, 12 127
  • 137. Beer/Pizza License 128 @andreafrancia #trash-cli Saturday, March 24, 12 128
  • 138. Git 129 @andreafrancia #trash-cli Saturday, March 24, 12 129
  • 139. GitHub 130 @andreafrancia #trash-cli Saturday, March 24, 12 130
  • 140. No Wiki, solo .txt nei i sorgenti 131 @andreafrancia #trash-cli Saturday, March 24, 12 131
  • 141. No mailing list. 132 @andreafrancia #trash-cli Saturday, March 24, 12 132
  • 142. Nessuno sforzo per l’inclusione in distribuzioni 133 @andreafrancia #trash-cli Saturday, March 24, 12 133
  • 143. Ma qualcuno lo usa? 134 @andreafrancia #trash-cli Saturday, March 24, 12 134
  • 144. Distribuzioni Debian (e Ubuntu) Fedora Arch Linux Foresight Linux OpenSuse ... forse altri 135 @andreafrancia #trash-cli Saturday, March 24, 12 135
  • 145. Altri progetti LXDE usa trash-cli come libreria (*) LXDE: Light weight X11 Desktop Environment 136 @andreafrancia #trash-cli Saturday, March 24, 12 136
  • 146. http://qa.debian.org/popcon-graph.php?packages=trash-cli 137 @andreafrancia #trash-cli Saturday, March 24, 12 137
  • 147. Grazie Andrea Francia http://andreafrancia.it andrea@andreafrancia.it 139 138 @andreafrancia #trash-cli Saturday, March 24, 12 138
  • 148. Grazie Andrea Francia http://andreafrancia.it andrea@andreafrancia.it Libero da settembre 2012 139 @andreafrancia #trash-cli Saturday, March 24, 12 139