Stefano Costa

There's more than potsherds out here

Faccio l’archeologo e vivo a Genova

Categoria: Technology

  • I deleted my Keybase account

    Keybase was acquired by Zoom, the videoconferencing company. In case you never heard of Keybase, it’s a service providing “identity” proofs tied to cryprographic keys, pulling together the various digital identities that many of us have online.

    My Keybase account was deleted. None of the proofs exists anymore, even those that I had published on a few websites that I don’t even use anymore (like Twitter). I had never used it except for that vanity ‘look at my identities’ feeling. And to think that in the beginning many respected FOSS leaders jumped in like it was an amazing solution to GPG usability issues… Now it’s filled with fake accounts eager for cryptocurrency.

    As many have noted, Keybase was bound to be sold from the beginning since it was based on venture capital funding. It may be difficult to put it in practice, but my resolution is to never create new accounts on web services provided by VC funded startups. And even without the VC, the Keybase server and infrastructure always was a proprietary black box ‒ you have no way of running your our Keybase server. Clever marketing had this centralization pictured as the best solution to the wide fragmentation that makes many possible uses of cryptographic keys difficult for most people.

    Of course I had never uploaded my private keys to Keybase, despite this being strongly encouraged by the official documentation. But there’s a good chance that some people did that, and it doesn’t sound too good.

    I don’t think I will look for a replacement, even though a few alternatives have already been announced (keys.pub, openpgp proofs). My current GPG key is found at keys.openpgp.org and many email clients can retrieve it on the fly thanks to WKD.

  • Towards a better website

    For a few months now, this website, the one that shows my personal blog and other pages about my activities and interests, has been improved. You should see no difference however.

    First of all, it still runs on WordPress. I have removed many tools and plugins though, in order to collect less data about my readers and put less of my content in the hands of large internet corporations. In short I have taken several steps to give you more privacy. This is much more and much better than sticking a cookie banner on the home page.

    It’s still common among the tech crowd to think that the best website is a static website, and I agree with the philosophy when I look at inspiring examples like the Low-Tech Magazine. But when I look at all those static websites hosted at GitHub Pages (owned by Microsoft), and most of them load many MBs of external Javascript dependencies just to show a dynamic menu, not to count Disqus comments and Google fonts etc. my general reaction is a big no-no. Not to mention the resources that are consumed when offloading site generation to a third party server. In the future, I want to explore how this website could run on a low-energy self-hosted device but for now I’m following the road to optimization with WordPress.

    I removed the Jetpack plugin, a stifling and pervasive do-it-all offer from WordPress.com that includes, among other features, site monitoring and visitor statistics (of course I never used Google Analytics). It’s all been wiped. I don’t have any numbers about most visited pages or posts and it’s a very good thing. I don’t write to reach mass audiences. I have better feelings towards my blog since I removed Jetpack.

    I had already removed the AMP plugin, a silly act of surrender to the Google monopoly. Will this give me less page views? I don’t really care, since I’m not selling anything here and all I have to offer is good content. But AMP is fast I hear you say! Sure, AMP is fast if you’re under the Google surveillance lens. Instead, my website is offered in HTML to everyone. And RSS/Atom, of course.

    I also removed all external dependencies, and now even fonts are loaded from the same domain steko.iosa.it thanks to the OMGF plugin. This makes the website load faster, despite the race to have everything on a CDN.

    If you run your blog on WordPress, I can only recommend you try for yourself the same steps!

    I also added some niceties, such as the ActivityPub plugin that lets you follow the blog from any Fediverse account (you can also comment without even visiting the website!). Of course you can follow my other native Fediverse account at https://octodon.social/@steko

    The website is faster and consumes less resources because I moved to a new server and I’m now running the latest version of PHP, that improves performance in a significant way. The server is in Nuremberg and is hosted by Hetzner.

    Of course, the best thing I can offer on this website is to continue publishing interesting content. Thank you for reading.

  • Migrating a database from FileMaker Pro to SQLite

    FileMaker Pro is almost certainly one of the least interoperable cases of proprietary database management software. As such, it is the worst choice you could make to manage your data as far as digital preservation goes. Period.

    There is data to be salvaged out there. If you find data that you care about, you’ll want to migrate content from FileMaker Pro to another database.

    Things are not necessarily easy. If you work primarily on GNU/Linux (Debian in my case) it may be even more difficult. It can be done, but not without proprietary software.

    Installing FileMaker Pro

    You can get a 30-days free trial of FileMaker Pro (FMP): you may need to register on their website with your e-mail address. It is a regular .exe installer.

    Please note that, while other shareware programs exist to extract data from a FileMaker Pro database, there is absolutely no way to do it using free and open source software, and as far as I know nobody has ever done any reverse engineering on the format. Do not waste your time trying to open the file with another program: the FileMaker Pro trial is your best choice. Also, do not waste your time and money buying another proprietary software to “convert” or “export” your data: FileMaker Pro can be used to extract all of your data, including any images that were stored in the database file, and the trial comes at no cost if you already have one of the supported operating systems. After all, it is proprietary so it is appropriate to use the native proprietary program to open it.

    Extracting data

    Alphanumeric data are rather simple to extract, and result in CSV files that can easily be manipulated and imported by any program. Be aware however that you have no way to export your database schema, that is the relationships between the various tables. If you only have one table, you should not have used a database in the first place, but that’s another story.

    Make sure FMP is installed correctly. Open the database file.

    1. Go to the menu and choose FileExport records
    2. Give a name for the exported file and make sure you have selected Comma-separated values (CSV) as export format
    3. A dialog will appear asking you to select which fields you want to export.
      • Make sure that “UTF-8” is selected at the bottom
      • On the left you see the available fields, on the right the ones you have chosen
      • Click Move all ‒ you should now see the fields listed at the bottom right. If you get an error complaining about Container fields, do not worry, we are going to rescue your images later (see below)
      • Export and your file is saved.
    4. Take a look at the CSV file you just saved. It should open in Notepad or any other basic text editor. A spreadsheet will work as well and may help checking for errors in the file, especially encoding errors (accented letters, special characters, newlines inside text fields, etc.)
    5. Repeat the above steps for each table. You can choose the table to export from using the drop-down list in the upper left of the export dialog.

    Extracting images from a Container Field in FileMaker Pro

    If, for some unfortunate reason, image files have been stored in the same database file using a Container Field, the normal export procedure will not work and you will need to follow a slightly more complex procedure:

     Go to Record/Request/Page [First]
     Loop
          * Set Variable [$filePath; Value: Get ( DesktopPath ) MyPics::Description & ".jpg"]
        ** Export Field Contents [MyPics::Picture; “$filePath”]  
            Go to Record/Request/Page [Next; Exit after last]
    End Loop
    *Set Variable Options: Name: $filePath
     Value: Use one of the following formulas
    Mac: Get ( DesktopPath ) & MyPics::Description & ".jpg"
    
     Windows: "filewin:"& Get ( DesktopPath ) & MyPics::Description & ".jpg"
    
     Mac and Windows: Choose ( Abs ( Get ( SystemPlatform ) ) -1 ;
         /*MAC OS X*/
          Get ( DesktopPath ) & MyPics::Description & ".jpg"
     ;
          /*WINDOWS*/
          "filewin:"& Get ( DesktopPath ) & MyPics::Description & ".jpg"
     )
    
     Repetition: 1
    
     **Export Field Contents Options:
     Specify target field: Picture
     Specify output File: $filePath

    Migrating to SQLite

    SQLite is a lightweight, file-based real database (i.e. based on actual SQL). You can import CSV data in SQLite very easily, if your starting data are “clean”. If not, you may want to look for alternatives.

    Appendix: if you are on GNU/Linux

    If you are on GNU/Linux, there is no way to perform the above procedure, and you will need a working copy of Microsoft Windows. The best solution is to use VirtualBox. In my case, I obtained a copy of Microsoft Windows XP and a legal serial number from my university IT department. The advantage of using VirtualBox is that you can erase FileMaker Pro and Windows once you’re done with the migration, and stay clear of proprietary software.

    Let’s see how to obtain a working virtual environment:

    1. Install VirtualBox. On Debian it’s a matter of sudo apt-get install virtualbox virtualbox-guest-additions-iso
    2. Start VirtualBox and create a new machine. You will probably need to do sudo modprobe vboxdrv (in a terminal) if you get an error message at this stage
    3. Install Windows in your VirtualBox. This is the standard Windows XP install and it will take some time. Go grab some tea.
    4. … some (virtual!) reboots later …
    5. Once Windows is installed, make sure you install the VirtualBox Guest Additions from the Devices menu of the main window. Guest Additions are needed to transfer data between your regular directories and the virtual install.
    6. Install the FMP trial and reboot again as needed. Then you can open the database file you need to convert and follow the steps described above
  • I tracciati ICCD con la shell Unix e Python

    Il trasferimento delle schede di catalogo ICCD avviene usando file di testo chiamati tracciati. Può essere utile sapere come trattare questi tracciati con gli strumenti più semplici a disposizione in un ambiente Unix.

    L’argomento non è particolarmente eccitante e fortunatamente sembra destinato a diventare presto obsoleto con l’introduzione di un formato XML (peraltro, già obsoleto), ma qualche appunto tecnico può essere utile. I comandi della shell Unix permettono di ricavare informazioni di base e poi possiamo procedere con passaggi più elaborati in Python.

    Nel caso di un singolo file di tracciato, per contare il numero di schede contenute possiamo fare riferimento al paragrafo CD, obbligatorio, che introduce ogni scheda:

    $ cat tracciato.trc | grep -c -e "^CD:"
    1527

    La parte principale del comando è l’espressione regolare ^CD: che unita all’opzione -c di grep permette di contare il numero di schede (nel nostro caso, 1527). L’espressione regolare è necessaria per evitare di includere nei risultati anche altre parti del tracciato, inclusi altri campi (ad esempio DSCD), come mostrato nell’esempio successivo:

    $ cat tracciato.trc | grep -c "CD:"
    2680

    Ricaviamo un elenco dei numeri NCTN delle schede, usando un’espressione regolare analoga e il comando cut, indicando lo spazio come carattere delimitatore e selezionando solo il secondo campo:

    cat tracciato.trc | grep -e "^NCTN:" | 
    cut -d " " -f 2

    La lista prodotta dal comando sarà piuttosto lunga ed è meglio salvarla in un file a parte, usando una semplice pipe:

    cat tracciato.trc | grep -e "^NCTN:" | cut -d " " -f 2 > nctn.txt

    È importante controllare la correttezza dei dati. Secondo la normativa ICCD (sia la vecchia versione 2.00 del 1992, sia la nuova versione 3.00) il campo NCTN deve essere composto da 8 cifre, quindi al numero vero e proprio devono essere aggiunti zeri. In questo modo il numero 13887 diventa nel campo NCTN 00013887 e così via.

    Di fatto, dal punto di vista informatico, 00013887 non è un numero intero (che sarebbe invariabilmente memorizzato come 13887) ma una stringa di 8 caratteri in cui i singoli caratteri sono numerici (una considerazione analoga vale, ad esempio, per i CAP). Purtroppo spesso accade che questa prescrizione rimanga disattesa, perché il campo NCTN viene erroneamente interpretato come un campo numerico, ad esempio nella creazione di un database.

    Nel caso a cui stavo lavorando nei giorni scorsi effettivamente abbiamo un po’ di tutto: 5 cifre, 7 cifre, 8 cifre.

    Nella seconda parte di questo post ci trasferiamo in una sessione IPyhon (in inglese) dove vediamo come elaborare ulteriormente i dati che abbiamo salvato nel file nctn.txt per ottenere un elenco leggibile dei numeri NCTN: prosegui la lettura su nbviewer.

    Ricordo infine che una introduzione molto leggibile alla catalogazione ICCD è quella di Diego Gnesi Bartolani, che si può scaricare in PDF dal suo sito web.

     

  • The Dunning-Kruger paradox

    The Dunning–Kruger effect is

    a cognitive bias in which unskilled individuals suffer from illusory superiority, mistakenly rating their ability much higher than average.

    (Wikipedia)

    The Dunning–Kruger paradox is the illusory superiority of those who know of the Dunning–Kruger effect, mistakenly rating their knowledge higher than those who do not know it.

    Further recursion steps are not allowed.

  • DRM: buoni e cattivi

    Il DRM è quell’insieme di tecnologie che impediscono di copiare liberamente un contenuto digitale: una traccia audio, un libro, un filmato. Il DRM serve a “bloccare la pirateria” ma in realtà non blocca proprio niente ed è solo una seccatura.

    Di recente ho acquistato 3 libri digitali dalle seguenti case editrici:

    Minimum Fax e Ultima Books non usano DRM. Il file EPUB che viene fornito dopo l’acquisto contiene il nome dell’acquirente per scoraggiarne la diffusione, ma è finita lì. Mettiamo il caso che volessi prestare il libro alla mia fidanzata, posso farlo tranquillamente, come farei con un libro normale. Inoltre, posso scaricare il file EPUB con il mio browser e trasferirlo sul lettore usando Calibre o semplicemente copiandolo nella memoria. Con qualunque sistema operativo, per capirci, incluso quello che uso io cioè Debian.

    Mondadori usa DRM. Dopo l’acquisto posso scaricare un file .acsm che andrà caricato in uno specifico programma (Adobe Digital Editions), ovviamente disponibile solo per certi sistemi operativi. E a quel punto sempre di certi sistemi operativi avrei bisogno per caricare il file sul mio lettore. Ma come dicevo prima il DRM è solo una seccatura e non blocca proprio niente: si rimuove facilmente e il file EPUB può essere tranquillamente copiato sul mio lettore. O me ne posso fare un backup, oppure prestarlo a qualcuno. Tutte cose che il DRM non mi permette di fare. La lista delle case editrici italiane che usano DRM è lunga (es. Adelphi, che pure ha in catalogo libri molto desiderabili) e non mi sembra un caso che le piccole case editrici ne stiano alla larga, visto che il DRM è un sistema di monopolio. Non spendiamo nemmeno un minuto su Amazon, dove al DRM si aggiunge anche un bel formato proprietario, tanto per rimanere in tema di monopoli.

    Essere trattato da “pirata cattivo” dopo aver comprato qualcosa è talmente sgradevole che non ho nessuna intenzione di ripetere l’esperienza. È utopico pensare che tante altre persone scelgano di fare altrettanto, ma almeno è altrettanto utopico che si smetta di rimuovere il DRM dai libri.

  • New GPG key

    I’ve had a GPG key since 2001 (laughing at my e-mail address at that time is allowed, but not encouraged). My current GPG key was created in 2004, and the keysize is 1024 bits. While not urgent, it is a good idea to upgrade to a safer key.

    I followed the how-to by Ana Guerrero, and I created my new GPG key with ID 3073EEC0DE1CCC58. It is important to sign your new key with your old key. The old key will be revoked at some point in the future.

    If you have a GPG key that is still 1024 bits, it might be good to create a new one in the near future. If you don’t have a GPG key yet, the best thing is probably to download Enigmail or another similar program, and start using it right now.

  • satelliti geostazionari e filo interdentale

    Se decidiamo di creare una fondazione per lo sviluppo e la promozione di software e dati liberi nell’ambito geospaziale, perché non chiamarla GFLOSS?

    Semplice: perché il suo nome ricorda quello del filo interdentale.

    Comunque, il vero nome è GFOSS. Dovrebbe uscire fuori una ONLUS, o qualcosa del genere. Giusto a conferma del fatto che io sono un terzosettorista…

    Ultimamente sui blog ICT non si fa altro che parlare di Web 2.0. Forse molti nemmeno sanno cosa sia. Forse molti nemmeno si ricordano cosa fosse il Web 1.0, nessuno si ricorda di quale fosse l’utilità di Internet senza Google, senza webmail AJAX, senza blog, senza messaggistica immediata. Di recente Nature ha stabilito in una indagine che Wikipedia non è meno affidabile della ben più blasonata Encyclopædia Britannica, suscitando lo scalpore dei puritani. In effetti, stiamo assistendo alla crescita di un vero luogo di incontro. C’è una espressione, che è passata di moda ancora prima di avere un senso, ed è villaggio globale. Oggi stiamo vedendo l’alba di questo villaggio, che passa necessariamente attraverso le strane sigle i18n e l10n. Nessuno se ne rende conto, ma il 90% di quello che leggiamo sulla rete è scritto in inglese. E nonostante il nostro sistema scolastico faccia schifo per definizione, noi riusciamo a capire. Ci sono altre persone meno fortunate di noi, che l’inglese non lo sanno. E c’è chi sta lavorando per dare una chiave d’ingresso per il villaggio globale a tutte queste persone. Non c’è alternativa a Linux, se volete sapere come la penso. BSD, forse.

    gqbwiki
    Quanto sia possibile stuprare un wiki per plasmarlo ad immagine e somiglianza della propria mente, è qualcosa di cui mi sto convincendo a fondo. E siccome non sono da solo a pensarlo, sarà ben difficile fermarmi, suppongo. (Come al solito poi sarò io ad autodistruggermi nella mia vacuità).

    Alla domanda: se partissi per un’isola deserta, quale software vorresti portare con te?, la mia risposta è: Mozilla Firefox. E non dite che è l’uovo di Colombo.

    Le belle cose dell’Unione Europea: ha lanciato il sistema GALILEO che concettualmente è simile al GPS ma è estemamente più potente e preciso, e soprattutto nasce per scopi primariamente civili e non militari. Per di più, è già attualmente disponibile al pubblico il sistema EGNOS per la correzione in tempo reale dei dati GPS. In questo vedo una irragiungibile superiorità rispetto agli USA, dove il motore dell’economia è costituito dall’industria bellica.

    Le cose brutte dell’Unione Europea: a giugno se tutto procede come previsto verrà approvata la direttiva INSPIRE che sancisce il copyright di stato sui dati geografici pubblici, costringendo in breve a pagare due volte per avere qualcosa che è stato prodotto con le vostre tasse. Bello, no? In questo vedo un segno innegabile della eterna inferiorità dell’Europa nei confronti dell’America, dove i geodati e tutto ciò che viene prodotto dalle agenzie nazionali sono di pubblico dominio (secondo voi è un caso che il free software sia nato negli USA?) da sempre.

    Part of the inhumanity of the computer is that, once it is competently programmed and working smoothly, it is completely honest. – Isaac Asimov