<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Colas.Nahaboo.net - code</title>
    <subtitle>Colas Nahaboo personal site, with discussions about programming code, web and computing topics, surfing and SUPing, and various musings.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://colas.nahaboo.net/tags/code/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://colas.nahaboo.net"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-04-13T00:00:00+00:00</updated>
    <id>https://colas.nahaboo.net/tags/code/atom.xml</id>
    <entry xml:lang="en">
        <title>Save these Firefox tabs for later</title>
        <published>2026-04-13T00:00:00+00:00</published>
        <updated>2026-04-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/save-these-firefox-tabs-for-later/"/>
        <id>https://colas.nahaboo.net/code/save-these-firefox-tabs-for-later/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/save-these-firefox-tabs-for-later/">&lt;p&gt;I often look for some concept out of curiority, and end up with tens of browser tabs opened on the subject, and realize that I have no time now to pursue this rabbit into his hole, end up with tons of Firefox windows with tens of tabs gathering dust (and eating RAM) on my desktop. Up to now I just created Foswiki pages or Trello tasks as reminders to tackle these projects later on, but it required enough manual work to often postpone doing it and either losing the info or be swamped in thousands of tabs. And saving them as Firefox bookmarks was cumbersome and required lots of manual management.&lt;&#x2F;p&gt;
&lt;p&gt;What I decided to do is a simple way to save all these tabs offline, and be able to re-open the window simply. I bundle them into what I call &lt;strong&gt;.ffst files&lt;&#x2F;strong&gt; (for FireFox Saved Tabs), simple text files of one url per line, into a &lt;code&gt;~&#x2F;firefox-savedtabs&#x2F;&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Saving a set of tabs&lt;&#x2F;strong&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Select the tabs (click on the first one, shift-click on the last one)&lt;&#x2F;li&gt;
&lt;li&gt;Open the right-mouse-button menu on a tab, and select &lt;code&gt;Copy URLs&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Create a new file (e.g: &lt;code&gt;some-name.ffst&lt;&#x2F;code&gt;) in the &lt;code&gt;~&#x2F;firefox-savedtabs&#x2F;&lt;&#x2F;code&gt; directory with your favorite editor,&lt;&#x2F;li&gt;
&lt;li&gt;Paste the tabs into it,&lt;&#x2F;li&gt;
&lt;li&gt;Save.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Restoring the tabs into a new window:&lt;&#x2F;strong&gt; either by:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;running the script below &lt;code&gt;firefox-savedtabs-restore&lt;&#x2F;code&gt; without arguments, and choosing which file to restore.&lt;&#x2F;li&gt;
&lt;li&gt;running the script with the ffst file as argument:&lt;br &#x2F;&gt;
&lt;code&gt;firefox-savedtabs-restore some-name.ffst&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Browsing the directory  &lt;code&gt;~&#x2F;firefox-savedtabs&#x2F;&lt;&#x2F;code&gt; in a file explorer window, and choosing to open the .ffst file with &lt;code&gt;Firefox SavedTabs restore&lt;&#x2F;code&gt; once you have created the &lt;code&gt;~&#x2F;.local&#x2F;share&#x2F;applications&#x2F;firefox-savedtabs.desktop&lt;&#x2F;code&gt; file below&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I can thus just mention the .ffstr file in my various &quot;todo&quot; places (TODO lists, TODO files, pinboard, wikis, trello, ...)&lt;&#x2F;p&gt;
&lt;p&gt;Note that you can adapt this to any browser, and choose whatever directory name and file extension you want.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Updating&lt;&#x2F;strong&gt; the tabs is just re-copying the urls and re-pasting in the file.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-two-scripts-are&quot;&gt;The two scripts are:&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-two-scripts-are&quot; aria-label=&quot;Anchor link for: the-two-scripts-are&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;usr-local-bin-firefox-savedtabs-restore&quot;&gt;&#x2F;usr&#x2F;local&#x2F;bin&#x2F;firefox-savedtabs-restore&lt;a class=&quot;zola-anchor&quot; href=&quot;#usr-local-bin-firefox-savedtabs-restore&quot; aria-label=&quot;Anchor link for: usr-local-bin-firefox-savedtabs-restore&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Note that you can modify in it the &lt;code&gt;restore&lt;&#x2F;code&gt; function to use with another browser.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #EA76CB;font-style: italic;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;# shellcheck disable=SC1090,SC2155,SC2046 # source files, declare&amp;amp;assign&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;# restore saved tabs bundles (text files of urls, one per line)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&#x2F;firefox-savedtabs&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;restore&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;(){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;    mapfile&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; -t urls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt;$1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;    firefox&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; --new-window &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;${urls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D20F39;font-style: italic;&quot;&gt;    exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; [[&lt;&#x2F;span&gt;&lt;span&gt; $#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; ]];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    # Without args, list the saves, most recent first, and prompt to restore&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D20F39;font-style: italic;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;In ~&#x2F;.firefox-savedtabs&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D20F39;font-style: italic;&quot;&gt;    cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; ||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D20F39;font-style: italic;&quot;&gt; exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    select&lt;&#x2F;span&gt;&lt;span&gt; i in &lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; . -type f -name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt; \*&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;.ffst&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;                    -printf &amp;#39;%TY-%Tm-%Td.%THh%TM:%TS %h&#x2F;%f\n&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;                   sed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; -e &amp;#39;s| [.]&#x2F;|_|&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt; sort&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; -r&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;                   sed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; -re &amp;#39;s&#x2F;:[0-9]{2}[.][0-9]*&#x2F;&#x2F;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;        restore&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;${i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;#*&lt;&#x2F;span&gt;&lt;span&gt;_}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    done&lt;&#x2F;span&gt;&lt;span&gt;            &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;    # with a file name or path, restore the window&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E64553;font-style: italic;&quot;&gt;$1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; [[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; ]];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;        restore&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    elif&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; !&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; [[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; ]] &amp;amp;&amp;amp; [[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;$file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt; ]];&lt;&#x2F;span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;$file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;font-style: italic;&quot;&gt;        restore&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D20F39;font-style: italic;&quot;&gt;        echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;***Error: file not found: &lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #EA76CB;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; in &lt;&#x2F;span&gt;&lt;span&gt;$dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D20F39;font-style: italic;&quot;&gt;        exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FE640B;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;    fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;local-share-applications-firefox-savedtabs-desktop&quot;&gt;~&#x2F;.local&#x2F;share&#x2F;applications&#x2F;firefox-savedtabs.desktop&lt;a class=&quot;zola-anchor&quot; href=&quot;#local-share-applications-firefox-savedtabs-desktop&quot; aria-label=&quot;Anchor link for: local-share-applications-firefox-savedtabs-desktop&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;ini&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DF8E1D;&quot;&gt;Desktop Entry&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;Name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;Firefox SavedTabs restore&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;# update-desktop-database ~&#x2F;.local&#x2F;share&#x2F;applications&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;Exec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;usr&#x2F;local&#x2F;bin&#x2F;firefox-savedtabs-restore %u&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;Application&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;Terminal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;MimeType&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;x-scheme-handler&#x2F;x-firefox-savedtabs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;font-style: italic;&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Converting Zola pages from TOML to YAML</title>
        <published>2026-04-07T00:00:00+00:00</published>
        <updated>2026-04-07T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/converting-zola-pages-from-toml-to-yaml/"/>
        <id>https://colas.nahaboo.net/code/converting-zola-pages-from-toml-to-yaml/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/converting-zola-pages-from-toml-to-yaml/">&lt;p&gt;Since &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;&quot;&gt;Zola&lt;&#x2F;a&gt; now supports frontmatter in its markdown pages in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;yaml.org&#x2F;&quot;&gt;YAML&lt;&#x2F;a&gt; format in addition to the original &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;toml.io&#x2F;&quot;&gt;TOML&lt;&#x2F;a&gt;, I decided to migrate all my pages to YAML, as it is both easier to read and write for humans, and natively understood by a majority of tools (Emacs, marktext, obsidian, vs-code, typos, zettlt...)&lt;&#x2F;p&gt;
&lt;p&gt;So I wrote a small bash script for the conversion, &lt;code&gt;site-toml2yaml&lt;&#x2F;code&gt; (all my personal site management tools start with the prefix &lt;code&gt;site-&lt;&#x2F;code&gt; for taking advantage of the tab-completion).
It should run on any Linux or Unix system, and it requires &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;TomWright&#x2F;dasel&quot;&gt;dasel&lt;&#x2F;a&gt; and the usual gang: grep, sed, head...&lt;&#x2F;p&gt;
&lt;p&gt;Note that you could also use &lt;strong&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;gohugo.io&#x2F;commands&#x2F;hugo_convert&#x2F;&quot;&gt;hugo convert&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt;, but I haven&#x27;t tested it.&lt;&#x2F;p&gt;
&lt;p&gt;You can grab it at my &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;colas-zola-tools&quot;&gt;zola-tools repository&lt;&#x2F;a&gt;. This repository is quite empty for now, but I will use it to publish the various small tools I use to maintain this public site.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;a class=&quot;zola-anchor&quot; href=&quot;#usage&quot; aria-label=&quot;Anchor link for: usage&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;site-toml2yaml&lt;&#x2F;strong&gt; &lt;em&gt;md-files or directories...&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Converts in place the frontmatter of Markdown files from TOML to YAML.&lt;br &#x2F;&gt;
It recurses in directories, but looking only for &lt;code&gt;*.md&lt;&#x2F;code&gt; files and sub-dirs.&lt;br &#x2F;&gt;
Without argument, run on &lt;code&gt;${ZOLA_ROOT}&#x2F;content&#x2F;&lt;&#x2F;code&gt; &lt;br &#x2F;&gt;
Should work on any Markdown files with TOML frontmatter.&lt;&#x2F;p&gt;
&lt;p&gt;You should only run it on your content&#x2F; dir normally. For instance running it
on your themes&#x2F; dir will risk messing your imported themes&lt;&#x2F;p&gt;
&lt;p&gt;WARNING: it modifies the files in place, so MAKE A BACKUP before running it!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-converting-to-yaml&quot;&gt;Why converting to YAML?&lt;a class=&quot;zola-anchor&quot; href=&quot;#why-converting-to-yaml&quot; aria-label=&quot;Anchor link for: why-converting-to-yaml&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;TOML is arguably a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;npf.io&#x2F;2014&#x2F;08&#x2F;intro-to-toml&#x2F;&quot;&gt;better configuration file format&lt;&#x2F;a&gt; than YAML, but only if you want to use it as a simpler JSON, i.e. a well-specified, unambiguous way to represent any data.&lt;&#x2F;p&gt;
&lt;p&gt;However, I feel that for the simple and limited use case of Zola pages frontmatter, it is overkill and thus a real pain to read and edit by hand. Let&#x27;s take an example:&lt;&#x2F;p&gt;
&lt;div class=&#x27;tables-horiz meta&#x27;&gt;
&lt;div&gt;
&lt;h3&gt;TOML&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;table1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    foo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;bar&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;    [&lt;&#x2F;span&gt;&lt;span&gt;table1.nested_table&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        baz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;bat&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[[&lt;&#x2F;span&gt;&lt;span&gt;comments&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;]]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;author&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;Nate&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;Great Article!&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;[[&lt;&#x2F;span&gt;&lt;span&gt;comments&lt;&#x2F;span&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;]]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;author&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;Anonymous&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; &amp;quot;Love it!&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;div&gt;
&lt;div&gt;
&lt;h3&gt;YAML&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;comments&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt; author&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; Nate&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;    text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; Great Article!&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7C7F93;&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt; author&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; Anonymous&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;    text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; Love it!&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;table1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;  foo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; bar&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;  nested_table&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;    baz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt; bat&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;See? Especially for people like me with a Unix culture, the YAML format seems both more natural (resembling the format of email or HTTP headers, the use of indentation à la Python), and TOML has a repulsive Windows flavor. Add to this that most of the tools I use understand natively YAML frontmatter but not TOML, and the decision is easy.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Explicit Action Pattern keeps you in the flow</title>
        <published>2026-04-05T00:00:00+00:00</published>
        <updated>2026-04-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/explicit-action-pattern-keeps-you-in-the-flow/"/>
        <id>https://colas.nahaboo.net/code/explicit-action-pattern-keeps-you-in-the-flow/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/explicit-action-pattern-keeps-you-in-the-flow/">&lt;p&gt;When designing interfaces for tools for my personal use, I have been using what I call an &lt;strong&gt;Explicit Action Pattern&lt;&#x2F;strong&gt;, the opposite of modal design. Due to the general trend towards minimalism of modern UI practice, it is not used a lot, but I think it should, and here is why.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;examples&quot;&gt;Examples&lt;a class=&quot;zola-anchor&quot; href=&quot;#examples&quot; aria-label=&quot;Anchor link for: examples&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;

&lt;table style=&#x27;background-color: #f0f7ff;&#x27;&gt;
  &lt;tr&gt;
    &lt;th&gt;Explicit Action Pattern&lt;&#x2F;th&gt;&lt;th&gt;Modal Design&lt;&#x2F;th&gt;
  &lt;&#x2F;tr&gt;
  &lt;tr&gt;
    &lt;td style=&#x27;padding-right:2em;&#x27;&gt;
      &lt;div&gt;&lt;b&gt;Initial Search&lt;&#x2F;b&gt;&lt;&#x2F;div&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search value=&quot;&quot; size=24&gt;
          &lt;input type=submit value=&#x27;SEARCH ALL&#x27; style=&#x27;font-weight:bold&#x27;&gt;
      &lt;&#x2F;form&gt;
      &lt;br&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search value=&quot;&quot; size=24&gt;
        &lt;input type=submit value=&#x27;Search Movie&#x27;&gt;
      &lt;&#x2F;form&gt;
      &lt;br&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search value=&quot;&quot; size=24&gt;
        &lt;input type=submit value=&#x27;Search Music&#x27;&gt;
      &lt;&#x2F;form&gt;
      &lt;br&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search value=&quot;Alan Cooper&quot; size=24&gt;
        &lt;input type=submit value=&#x27;Search EBook&#x27;&gt;
      &lt;&#x2F;form&gt;
    &lt;&#x2F;td&gt;
    &lt;td&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search value=&quot;Alan Cooper&quot; size=24&gt;
        &lt;input type=submit value=&#x27;Search&#x27;&gt;
        &lt;br&gt;
        &lt;input type=&quot;radio&quot; id=&quot;0&quot; name=&quot;movie&quot; value=&quot;all&quot; &#x2F;&gt;
        &lt;label for=&quot;0&quot;&gt;&lt;b&gt;All&lt;&#x2F;b&gt;&lt;&#x2F;label&gt;
        &lt;input type=&quot;radio&quot; id=&quot;1&quot; name=&quot;movie&quot; value=&quot;movie&quot; &#x2F;&gt;
        &lt;label for=&quot;1&quot;&gt;movie&lt;&#x2F;label&gt;
        &lt;input type=&quot;radio&quot; id=&quot;2&quot; name=&quot;movie&quot; value=&quot;music&quot; &#x2F;&gt;
        &lt;label for=&quot;2&quot;&gt;music&lt;&#x2F;label&gt;
        &lt;input type=&quot;radio&quot; id=&quot;3&quot; name=&quot;movie&quot; value=&quot;ebook&quot; checked &#x2F;&gt;
        &lt;label for=&quot;3&quot;&gt;ebook&lt;&#x2F;label&gt;
      &lt;&#x2F;form&gt;
    &lt;&#x2F;td&gt;
  &lt;&#x2F;tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;div&gt;&lt;b&gt;Search results...&lt;&#x2F;b&gt;&lt;&#x2F;div&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search size=24 value=&quot;&quot;&gt;
        &lt;input type=submit value=Search&gt;
      &lt;&#x2F;form&gt;
      &lt;br&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search value=&quot;Alan Cooper&quot; size=24&gt;
        &lt;input type=submit value=&quot;Re Search&quot;&gt;
      &lt;&#x2F;form&gt;
    &lt;&#x2F;td&gt;
    &lt;td&gt;
      &lt;form style=&#x27;display:inline&#x27;&gt;
        &lt;input name=search value=&quot;Alan Cooper&quot; size=24&gt;
        &lt;input type=submit value=&#x27;Search&#x27;&gt;
        &lt;input type=submit value=&#x27;Clear&#x27;&gt;
        &lt;br&gt;
        &lt;input type=&quot;radio&quot; id=&quot;0&quot; name=&quot;movie&quot; value=&quot;all&quot; &#x2F;&gt;
        &lt;label for=&quot;0&quot;&gt;&lt;b&gt;All&lt;&#x2F;b&gt;&lt;&#x2F;label&gt;
        &lt;input type=&quot;radio&quot; id=&quot;1&quot; name=&quot;movie&quot; value=&quot;movie&quot; &#x2F;&gt;
        &lt;label for=&quot;1&quot;&gt;movie&lt;&#x2F;label&gt;
        &lt;input type=&quot;radio&quot; id=&quot;2&quot; name=&quot;movie&quot; value=&quot;music&quot; &#x2F;&gt;
        &lt;label for=&quot;2&quot;&gt;music&lt;&#x2F;label&gt;
        &lt;input type=&quot;radio&quot; id=&quot;3&quot; name=&quot;movie&quot; value=&quot;ebook&quot; checked &#x2F;&gt;
        &lt;label for=&quot;3&quot;&gt;ebook&lt;&#x2F;label&gt;
      &lt;&#x2F;form&gt;
    &lt;&#x2F;td&gt;
  &lt;&#x2F;tr&gt;
&lt;&#x2F;table&gt;

&lt;p&gt;As you can see in the top row, for searching an ebook, I will &quot;flow&quot; through the form from left to right, filling the relevant field and hitting the return key, or pressing the &quot;Search EBook&quot; button. But with the traditional modal design, choosing the radio button &quot;ebook&quot; breaks my flow of entry.&lt;&#x2F;p&gt;
&lt;p&gt;On the second row, you can see how I use this design for providing a &quot;search again&quot; form, where I can choose to enter a new search, or edit the previous one by selecting the relevant search box. It treats the search interface like a REPL (Read-Eval-Print Loop) rather than a static webpage. Whereas in the traditional way, I would have to break my flow to go hit the &quot;Clear&quot; button to empty the field.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;interaction-flow&quot;&gt;Interaction flow&lt;a class=&quot;zola-anchor&quot; href=&quot;#interaction-flow&quot; aria-label=&quot;Anchor link for: interaction-flow&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;So, rather than breaking the flow of the interactions to set modes, you just flow seamlessly into branches of the decision tree. If we take a car driving analogy, you just choose a direction when encountering a fork in the road, rather than having to get out of the car to move a barrier before resuming your ride.&lt;&#x2F;p&gt;
&lt;script src=https:&#x2F;&#x2F;colas.nahaboo.net&#x2F;js&#x2F;mermaid.js&gt;&lt;&#x2F;script&gt;

&lt;pre class=&quot;mermaid&quot;&gt;
  

graph TD;
    User((User Interaction));

    %% LEFT SIDE: Explicit Pattern (Parallel)
    subgraph Explicit [&quot;Explicit Action Pattern (Parallel)&quot;];
        FormB[Dedicated Form: Search Books];
        InputB[&#x2F;Input Field: Books&#x2F;];
        FormM[Dedicated Form: Search Movies];
        InputM[&#x2F;Input Field: Movies&#x2F;];
    end;

    %% RIGHT SIDE: Modal Pattern (Sequential)
    subgraph Modal [&quot;Modal     Design (Sequential)&quot;];
        FormS[Single Search Form];
        %% The Vertical Spine (invisible link to keep things straight)
        FormS ~~~ InputS[&#x2F;Generic Input Field&#x2F;];
        %% The &quot;Hook&quot; - Positioned to the side
        Mode{{Mode Selection: Books vs Movies}};
    end;

    %% Explicit Connections (Direct Flow)
    User --&gt; FormB;
    User --&gt; FormM;
    FormB --&gt; InputB;
    FormM --&gt; InputM;
    InputB --&gt; Submit((Submit));
    InputM --&gt; Submit;

    %% Modal Connections (The Hook Flow)
    User --&gt; FormS;
    FormS --&gt; Mode;
    Mode --&gt; InputS;
    InputS --&gt; Submit;

    %% Styling from original source
    style FormB fill:#f9f,stroke:#333;
    style FormM fill:#f9f,stroke:#333;
    style InputB fill:#ccf,stroke:#333;
    style InputM fill:#ccf,stroke:#333;
    style Modal fill:#f5f5f5,stroke:#999,stroke-dasharray: 5 5;
    style FormS fill:#eee,stroke:#999;
    style Mode fill:#fff,stroke:#333,stroke-width:2px;
&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;benefits&quot;&gt;Benefits&lt;a class=&quot;zola-anchor&quot; href=&quot;#benefits&quot; aria-label=&quot;Anchor link for: benefits&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;This Explicit Action Pattern has many benefits for power users:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Distributed Entry:&lt;&#x2F;strong&gt; Breaking one complex task into multiple simple, dedicated entry points.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Parallel UI:&lt;&#x2F;strong&gt; Presenting all options simultaneously rather than hiding them behind a selection step.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Non-Modal Interaction:&lt;&#x2F;strong&gt; Avoiding the &quot;mode&quot; where you have to set a state (e.g., clicking a radio button) before you can perform the actual action.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;For the examples above:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Feature&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Separate Dedicated Fields&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Single Field + mode switches&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Cognitive Load&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Higher initial load&lt;&#x2F;strong&gt; (more to look at), unless you are already used to this UI.&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Lower initial load&lt;&#x2F;strong&gt; (cleaner look), especially for novices.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Physical Effort&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Lower&lt;&#x2F;strong&gt; (Click bar → Type → Enter).&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Higher&lt;&#x2F;strong&gt; (Click radio → Click bar → Type → Enter).&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Intent Clarity&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Absolute from the moment you click.&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Ambiguous until the modifier is set.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;strong&gt;Screen Space&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&quot;Expensive&quot;; requires more vertical&#x2F;grid space.&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Efficient; fits in a header.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;This is essentially applying &lt;strong&gt;Functional Programming&lt;&#x2F;strong&gt; and &lt;strong&gt;CLI philosophy&lt;&#x2F;strong&gt; to a GUI.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Immutability:&lt;&#x2F;strong&gt; The pre-filled field is the &quot;original state.&quot;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Pure Functions:&lt;&#x2F;strong&gt; Each input field has a single, predictable output.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;No Side Effects:&lt;&#x2F;strong&gt; Clearing one field doesn&#x27;t break your ability to see the other.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;In a nutshell, &lt;strong&gt;Directness over Modality&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;for-power-users&quot;&gt;For power users&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-power-users&quot; aria-label=&quot;Anchor link for: for-power-users&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If you are used to CLI environments, or using mostly keyboards shortcuts in interfaces, or editors like Emacs or vi, your brain likely functions on &quot;Command-Action&quot; pairs. And Explicit Action Patterns offers you:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Muscle Memory:&lt;&#x2F;strong&gt; You can bind a specific field to a specific mental &quot;slot.&quot; You don&#x27;t have to check the state of a radio button before hitting enter; you &lt;em&gt;know&lt;&#x2F;em&gt; which field you are in. It transforms a two-click &quot;hunt and peck&quot; task into a single-click muscle memory task. You don&#x27;t have to wait for an animation or look for a label; you just hit the coordinate on the screen you already know.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;No &quot;Context Switch&quot; Tax:&lt;&#x2F;strong&gt; Selecting a radio button is a &quot;mode switch.&quot; It requires you to stop thinking about your search query for a second to handle the UI mechanics. Separate fields eliminate that tax.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Visual Affordance:&lt;&#x2F;strong&gt; The label &quot;Search Movies&quot; is context-free, an immediate call to action. A generic &quot;Search&quot; box is a mystery until you look at the surrounding buttons.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;in-the-real-world&quot;&gt;In the real world&lt;a class=&quot;zola-anchor&quot; href=&quot;#in-the-real-world&quot; aria-label=&quot;Anchor link for: in-the-real-world&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;While interfaces have moved toward the &quot;Google-style&quot; of Modal Design to flatten the learning curve for the general public, many expert-level interfaces still rely on the Explicit Action Pattern. You can find it in library catalogs, Bloomberg or Reuters terminals, and high-end enterprise software.&lt;&#x2F;p&gt;
&lt;p&gt;You can also see this approach in media editing software. Instead of a single &quot;Save...&quot; dialog that asks for a format later, you often have explicit menu entries: &quot;Save,&quot; &quot;Export as PNG,&quot; &quot;Export as JPG,&quot; or &quot;Export as MP3.&quot;&lt;&#x2F;p&gt;
&lt;p&gt;And one can consider that the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Unix_philosophy&quot;&gt;Unix philosophy&lt;&#x2F;a&gt; of having one tool per function, instead of mega-commands with tons of options is also an embodiment of the  Explicit Action Pattern.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;dive-deeper&quot;&gt;Dive deeper&lt;a class=&quot;zola-anchor&quot; href=&quot;#dive-deeper&quot; aria-label=&quot;Anchor link for: dive-deeper&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;This approach is highly &quot;discoverable.&quot; You don&#x27;t need to learn &quot;how the search bar works&quot;; the interface tells you exactly what it can do by simply existing. This is what ihas been advocated by many Usability experts, that I consider mandatory reads:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The boss: Alan Cooper books, especially &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;thedesignbooks.com&#x2F;books&#x2F;about-face-the-essentials-of-interaction-design&quot;&gt;About Face: The Essentials of Interaction Design&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;The enjoyable &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;sensible.com&#x2F;dont-make-me-think&#x2F;&quot;&gt;Don&#x27;t make me think&lt;&#x2F;a&gt; by Steve Krug.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.cs.umd.edu&#x2F;users&#x2F;ben&#x2F;papers&#x2F;Shneiderman1983Direct.pdf&quot;&gt;Direct Manipulation&lt;&#x2F;a&gt; by Ben Shneiderman&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.edwardtufte.com&#x2F;notes-sketches&#x2F;?msg_id=0000Jr&quot;&gt;Data Density&lt;&#x2F;a&gt; the examples above being described by him as &quot;Parallel Input&quot;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Humane_Interface&quot;&gt;The human Interface&lt;&#x2F;a&gt; by Jef Raskin, especially his &quot;Monotonicity&quot;: the idea that a specific goal should always be achieved by a specific, unchanging set of actions.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Foswiki update script</title>
        <published>2026-03-26T00:00:00+00:00</published>
        <updated>2026-03-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/foswiki-update-script/"/>
        <id>https://colas.nahaboo.net/code/foswiki-update-script/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/foswiki-update-script/">&lt;p&gt;Although I have &lt;a href=&quot;&#x2F;blog&#x2F;a-new-version-of-the-site-for-2026-in-zola&quot;&gt;migrated my public site to zola&lt;&#x2F;a&gt; which was on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;foswiki.org&quot;&gt;Foswiki&lt;&#x2F;a&gt;, I have decided for now to keep my private family wiki on Foswiki for now.&lt;&#x2F;p&gt;
&lt;p&gt;So I needed to upgrade it to 2.1.11, it was still in 2.1.6, and since the upgrade is not exactly intuitive, I made a bash script to automatise the upgrade.&lt;&#x2F;p&gt;
&lt;p&gt;You can find it &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;foswiki-upgrade&quot;&gt;on GitHub&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;See also its publication on the Foswiki site, with a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;foswiki.org&#x2F;Support&#x2F;BestPracticeTip35#comment1.1774606339&quot;&gt;reminder of the standard upgrade method&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-the-script-works&quot;&gt;How the Script Works&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-the-script-works&quot; aria-label=&quot;Anchor link for: how-the-script-works&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;This script supposes a modern version of Foswiki (v2+): it blindly overwrites the files that should not have been modified, so when customizing your wiki be sure to never directly modify distributed files.&lt;&#x2F;p&gt;
&lt;p&gt;The script however will not overwrite blindly any topic file that has been edited via Foswiki itself, by checking the author metadata. It will perform a 3-way merge, as automated as possible.&lt;&#x2F;p&gt;
&lt;p&gt;It also works only on a local copy of the site. You will have to download yourself a copy of your site, upgrade, and then re-upload it in place. This keeps the script simpler and safer.&lt;&#x2F;p&gt;
&lt;p&gt;It works on linux, but should work in linux-like layers on top of other OSes, such as cygwin, WSL, Homebrew, ...&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-staying-on-foswiki&quot;&gt;Why staying on Foswiki?&lt;a class=&quot;zola-anchor&quot; href=&quot;#why-staying-on-foswiki&quot; aria-label=&quot;Anchor link for: why-staying-on-foswiki&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;My private wiki is used by me, but also my wife, who is not really fluent in wiki or markdown  editing, so an excellent WYSIWYG is a must. And personnaly, I hate databases and strive for stability and simple architecture. Foswiki has all these qualities... and I would have a lot of content to convert.&lt;&#x2F;p&gt;
&lt;p&gt;But I will probably switch to an open source markdown-based wiki with a very good WYSIWYG editor and flat file storage, and easy to maintain. For now I see 3 potential candidates:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;silverbullet.md&#x2F;&quot;&gt;SilverBullet&lt;&#x2F;a&gt;, still evolving but very promising&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;otterwiki.com&#x2F;&quot;&gt;OtterWiki&lt;&#x2F;a&gt;, minimal but seems powerful enough&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;js.wiki&#x2F;&quot;&gt;Wiki.js&lt;&#x2F;a&gt; the current leader, but I will wait for the v3 as the v2 to v3 migration do not seem automatic, and the development &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;selfhosted&#x2F;comments&#x2F;1mebp67&#x2F;is_wikijs_3_dead&#x2F;&quot;&gt;seems to have slowed greatly&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Suntimes, a small shell utility</title>
        <published>2022-03-03T00:00:00+00:00</published>
        <updated>2022-03-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/suntimes-a-small-shell-utility/"/>
        <id>https://colas.nahaboo.net/code/suntimes-a-small-shell-utility/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/suntimes-a-small-shell-utility/">&lt;p&gt;I just made a small command-line utility to display the sunrise and sunset times at a location. It can be quite useful in shell scripts.&lt;&#x2F;p&gt;
&lt;p&gt;It is a minimal Go wrapper around the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nathan-osman&#x2F;go-sunrise&quot;&gt;nathan-osman&#x2F;go-sunrise library&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;You can find it at my repository: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;suntimes&quot;&gt;GitHub - ColasNahaboo&#x2F;suntimes&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>One year retired</title>
        <published>2022-02-24T00:00:00+00:00</published>
        <updated>2022-02-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/one-year-retired/"/>
        <id>https://colas.nahaboo.net/blog/one-year-retired/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/one-year-retired/">&lt;p&gt;I have been retired for one year now, and what happened? Well...&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;I basically stopped coding and reading about anything computer-related for eight months. I didn&#x27;t expect it, I was thinking I would start coding at once, going through my huge todo list of various projects.&lt;&#x2F;li&gt;
&lt;li&gt;I enjoyed being able to go SUP surfing at will, but I ended up actually less on the water than before, simply because i didn&#x27;t feel pressured into going on the water if the conditions were not enjoyable: I have now all the time in the world, I can wait for better conditions.&lt;&#x2F;li&gt;
&lt;li&gt;I started what I should have done years ago: Stretching at least 30 minutes daily, and warming up a full 10 minutes before going surfing. Work and play for me were mainly sitting in front of a computer, and I had become awfully stiff. I will detail my routine in later posts, it is worth it.&lt;&#x2F;li&gt;
&lt;li&gt;I dived deep in modern physics: astrophysics, cosmology and quantum mechanics. This also will warrant a full separate post.&lt;&#x2F;li&gt;
&lt;li&gt;I started re-coding in the last four months:
&lt;ul&gt;
&lt;li&gt;The first month I began working on various bits of code (shell scripts), progressively getting back to speed, and also deciding to learn the language Go. I was looking for a very longtime for an efficient language to replace lisp or C as compliment to scripting (I never liked Java), and was hesitating between Rust and Go. A discussion with &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.arsac.org&#x2F;olivier&#x2F;&quot;&gt;Olivier Arsac&lt;&#x2F;a&gt; convinced me to try Go.&lt;&#x2F;li&gt;
&lt;li&gt;I switched to git (I was using mercurial) for version control, and &lt;a href=&quot;&#x2F;code&#x2F;moving-to-github&#x2F;&quot;&gt;moved&lt;&#x2F;a&gt; my publicly available source codes from my personal web site to my &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&quot;&gt;GitHub&lt;&#x2F;a&gt;. It may sound ridiculous, but at now 61, setting things up so they do not disappear when I do is becoming an important consideration. I will thus progressively stop using self-hosted sites to publish on places that will survive me, as nobody in my family is tech-savvy enough to maintain a web site.&lt;&#x2F;li&gt;
&lt;li&gt;Then in December I stumbled upon the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;adventofcode.com&#x2F;&quot;&gt;Advent of Code&lt;&#x2F;a&gt; challenge that I decided to do in bash for the challenge, and it was unexpectedly productive? I learned more in these 25 puzzles than in my last 10 years of professional bash scripting. You can see my solutions in my post &lt;a href=&quot;&#x2F;code&#x2F;bash-lessons-learned-with-aoc-2021&quot;&gt;Bash lessons learned with AoC 2021&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Thus, after finishing the Go tutorial, I decided to do the previous AoC years in Go. And I just &lt;a href=&quot;&#x2F;code&#x2F;completed-the-2015-advent-of-code-challenge-in-go&quot;&gt;finished the AoC 2015 in Go&lt;&#x2F;a&gt;. This definitively made me a Go enthusiast, I realized that the designers of Go had exactly the same opinion of what should be a general programming language: They worshiped readability, simplicity, performance and maintainability while hating inheritance and the feature creep of most modern languages.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;That was my first year. And now, embarking for the next one!&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Completed the 2015 Advent of Code challenge in GO</title>
        <published>2022-02-24T00:00:00+00:00</published>
        <updated>2022-02-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/completed-the-2015-advent-of-code-challenge-in-go/"/>
        <id>https://colas.nahaboo.net/code/completed-the-2015-advent-of-code-challenge-in-go/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/completed-the-2015-advent-of-code-challenge-in-go/">&lt;p&gt;And I completed the 2015 challenge! (see my &lt;a href=&quot;&#x2F;code&#x2F;starting-the-2015-advent-of-code-challenge-in-go&quot;&gt;previous post&lt;&#x2F;a&gt;). You can read my notes on it on my  &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;advent-of-code-my-solutions&#x2F;tree&#x2F;main&#x2F;go&#x2F;2015&quot;&gt;GitHub&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;This was quite interesting, and I thing a great way to learn a language just after completing its tutorial, as this challenge as a feel of &quot;real life&quot; situations, and allow for a variety of solutions, so that you can put different approaches to the test.&lt;&#x2F;p&gt;
&lt;p&gt;I forced myself to not look at the solutions available on the net, except for two cases:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Using working code to generate more data to test against (random inputs + expected result number). I just ran the code of other solutions, without reading their source. I often used  solutions by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;devjobe&#x2F;advent-of-code-2015-golang&quot;&gt;devjobe&lt;&#x2F;a&gt; and &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;schwern&#x2F;adventofcode.go&quot;&gt;schwern&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Once I had a working solution, browsing the source code of other solutions to compare with mine and see where I could improve, and discover cool tricks. I mostly used the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;wiki&#x2F;solution_megathreads&#x2F;#wiki_december_2015&quot;&gt;reddit megathread&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I also tried to use only the standard Go packages, and not the ones available on the web. I am sure I will end up using 3rd party packages to replace the standard ones (the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;pkg.go.dev&#x2F;flag&quot;&gt;flag package &lt;&#x2F;a&gt;  to parse options for instance is really too primitive). And I also didn&#x27;t create a separate module or package for my library of common useful functions. I will surely do it in the future, but I feel I should have more experience first.&lt;&#x2F;p&gt;
&lt;p&gt;Anyways, it has confirmed that Go was the language I have been waiting for all these years. On the one hand, I have a bit of regret not having jumped on it sooner, but on the other hand it was easier to just wait for my retirement (one year ago) to free myself from any work politics and constraints to be able to fully explore the programming language landscape with no strings attached.&lt;&#x2F;p&gt;
&lt;p&gt;I can see myself using 4 languages in the future:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;bash&lt;&#x2F;strong&gt; for any &quot;glue&quot; tooling and scripts.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;go&lt;&#x2F;strong&gt; for my main do-it-all language, and web backend.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;javascript&lt;&#x2F;strong&gt; (and&#x2F;or WebAssembly) for my web frontend, with pure modern HTML and CSS, but no framework, à la  &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;vanilla-js.com&#x2F;&quot;&gt;Vanilla JS&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;and maybe a higher performance, specialized language, if I encounter such needs: E.g: &lt;strong&gt;zig&lt;&#x2F;strong&gt; as a replacement of C for tasks where Go could be unsuited (if I encounter any), or &lt;strong&gt;julia&lt;&#x2F;strong&gt; for math-specific things, etc...&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Edit: I see that Neil Henning also enjoyed discovering a new language via AoC: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.duskborn.com&#x2F;posts&#x2F;2021-aoc-zig&#x2F;&quot;&gt;A Review of the Zig Programming Language (using Advent of Code 2021)&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Starting the 2015 Advent of Code challenge in GO</title>
        <published>2022-02-09T00:00:00+00:00</published>
        <updated>2022-02-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/starting-the-2015-advent-of-code-challenge-in-go/"/>
        <id>https://colas.nahaboo.net/code/starting-the-2015-advent-of-code-challenge-in-go/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/starting-the-2015-advent-of-code-challenge-in-go/">&lt;p&gt;I discovered the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;adventofcode.com&#x2F;&quot;&gt;advent of code&lt;&#x2F;a&gt; in 2021, and did it in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;advent-of-code-my-solutions&#x2F;tree&#x2F;main&#x2F;bash&quot;&gt;bash&lt;&#x2F;a&gt; for the challenge. But since I started learning GO, I decided to code the previous AoC years in GO as a mean to practice it. So, although my bash code can be useful to see some tricks of a seasoned bash programmer, these GO solutions must be considered as &quot;student code&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;So I started coding the 2015 year of AoC in GO, available on my GitHub: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;advent-of-code-my-solutions&#x2F;blob&#x2F;main&#x2F;go&#x2F;2015&quot;&gt;advent-of-code-my-solutions&#x2F;go&#x2F;2015&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The code is in GO, with some housekeeping scripts in bash.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>My bash library on Github</title>
        <published>2022-02-05T00:00:00+00:00</published>
        <updated>2022-02-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/my-bash-library-on-github/"/>
        <id>https://colas.nahaboo.net/code/my-bash-library-on-github/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/my-bash-library-on-github/">&lt;p&gt;I have started to publish on Github, at &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;colas-bash-lib&quot;&gt;colas-bash-lib&lt;&#x2F;a&gt;, my collection of various &lt;strong&gt;bash functions&lt;&#x2F;strong&gt; I reuse often in my bash scripts.&lt;&#x2F;p&gt;
&lt;p&gt;Fell free to copy and use in any of your projects or compilation of bash tools.&lt;&#x2F;p&gt;
&lt;p&gt;I have tried to make them the &lt;strong&gt;fastest&lt;&#x2F;strong&gt; possible, by avoiding forking sub-shells or external commands, and
benchmarking extensively to compare the possible way of coding them. Of course, I will gladly accept suggestions or code to make them faster.
But it means that error checking is often terse and minimal, and readability of the code was not a priority.&lt;&#x2F;p&gt;
&lt;p&gt;I have a kind of «anti-npm» approach, in that I &lt;strong&gt;copy&lt;&#x2F;strong&gt; these functions into my scripts rather that using hem as a true external library that I would load at runtime. It thus avoid installation issues, and the ependency problems that may arise from automated upgrades.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Bash lessons learned with AoC 2021</title>
        <published>2022-01-11T00:00:00+00:00</published>
        <updated>2022-01-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/bash-lessons-learned-with-aoc-2021/"/>
        <id>https://colas.nahaboo.net/code/bash-lessons-learned-with-aoc-2021/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/bash-lessons-learned-with-aoc-2021/">&lt;p&gt;I completed all the exercises of the Advent of Code 2021 in bash! (see &lt;a href=&quot;&#x2F;code&#x2F;advent-of-code-2021&quot;&gt;my previous post&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;
&lt;p&gt;You can find my solutions with comments in my GitHub repository at https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;advent-of-code-my-solutions&#x2F;tree&#x2F;main&#x2F;bash&#x2F;2021&lt;&#x2F;p&gt;
&lt;p&gt;I must say I &quot;cheated&quot; a bit. My  solution for the Day 24 was too slow in bash, and as I was a bit out of  steam, I did not try to find a smart algorithm. I just noticed that I  solved it by building a bash arithmetic expression (of 1 million  characters...) that I then evaluated in bash, and since its syntax was  exactly the one for C... I just made the bash script compile the bash  expression in C and execute it, using the C compiler as a bash  arithmetic just-in-time compiler :-)&lt;&#x2F;p&gt;
&lt;p&gt;I just discovered AoC this year, and I am impressed. Challenging, fun,  and a great way to progress. I am going to do the previous years, too,  but in &quot;real&quot; languages this time. At least ones with data structures... I will start with Go.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-i-learned&quot;&gt;What I learned:&lt;a class=&quot;zola-anchor&quot; href=&quot;#what-i-learned&quot; aria-label=&quot;Anchor link for: what-i-learned&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Coding in bash is not so bad, even if it can border on insanity at times :-).&lt;&#x2F;li&gt;
&lt;li&gt;Modern bash features are often overlooked but very useful.&lt;&#x2F;li&gt;
&lt;li&gt;Passing shellcheck should be a mandatory goal for each bash programmer. I resented it at first since I thought it was adding unecessary syntaxic sugar to my code until I realized that it was a symptom that my coding style was the problem.&lt;&#x2F;li&gt;
&lt;li&gt;Use &lt;code&gt;[[...]]&lt;&#x2F;code&gt; for strings and &lt;code&gt;((...))&lt;&#x2F;code&gt; for integers other any of the legacy constructs like &lt;code&gt;[...]&lt;&#x2F;code&gt;, &lt;code&gt;test&lt;&#x2F;code&gt;, etc... The code is then much cleaner and safer (and a tad faster), as you do not have to quote as much. E.g: &lt;code&gt;[[ -z foo ]]&lt;&#x2F;code&gt; instead of &lt;code&gt;[ -z &quot;$foo&quot; ]&lt;&#x2F;code&gt;, or even &lt;code&gt;((i=j))&lt;&#x2F;code&gt; instead of &lt;code&gt;i=&quot;$j&quot;&lt;&#x2F;code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;but&lt;&#x2F;strong&gt;, this makes traditional debugging with &lt;code&gt;set -x&lt;&#x2F;code&gt; less useful as the values of variables are not displayed anymore. E.g if j is 2, the tracing of &lt;code&gt;i=&quot;$j&quot;&lt;&#x2F;code&gt; shows &lt;code&gt;i=2&lt;&#x2F;code&gt; whereas the tracing of &lt;code&gt;((i=j))&lt;&#x2F;code&gt; only shows &lt;code&gt;((i=j))&lt;&#x2F;code&gt;. This could be where a bash debugger would be useful, but I know only one, &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;bashdb.sourceforge.net&#x2F;bashdb.html&quot;&gt;bashdb&lt;&#x2F;a&gt;, and it does not seem updated anymore, and I could not find a version working with bash 5.1. The &lt;code&gt;trap DEBUG&lt;&#x2F;code&gt; trick can be useful, though.&lt;&#x2F;li&gt;
&lt;li&gt;So, I tend to write now &lt;code&gt;i=$((j+k))&lt;&#x2F;code&gt; while developing code, and maybe later for production switch to the a bit more efficient &lt;code&gt;((i = j+k))&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;I avoided arrays in bash because I found out they were abysmally slow when first introduced, to the point that managing data in files with grep, sed, ... was actually faster than using arrays. But not anymore! Bash arrays should now be used as much as possible.&lt;&#x2F;li&gt;
&lt;li&gt;A lot of bash functions can &quot;map&quot; on arrays. For instance &lt;code&gt;${tab[@]&#x2F;&#x2F;x&#x2F;y}&lt;&#x2F;code&gt; will string-replace x by y in all the elements of the array tab, and is super fast.&lt;&#x2F;li&gt;
&lt;li&gt;Use arrays rather than the classic way to represent lists in bash by space-separated (or tab-separated) substrings in a  string.&lt;&#x2F;li&gt;
&lt;li&gt;Bash can have typed variables: integer ones via &lt;code&gt;declare -i&lt;&#x2F;code&gt; or &lt;code&gt;local -i&lt;&#x2F;code&gt;, and using them makes your code safer.&lt;&#x2F;li&gt;
&lt;li&gt;Bash functions can be passed variables by name, useful for efficiency to avoid copying big arrays or strings, and to provide multiple return values by modifying passed variables. But it cannot recurse as it is not a passing by reference, but by name.&lt;&#x2F;li&gt;
&lt;li&gt;Working with arrays makes using &lt;code&gt;$(...)&lt;&#x2F;code&gt; impractical, as commands are executed in a subshell and cannot access arrays anymore to update them in the parent shell. So I tend to pass the return value(s) into global variables of the same name of a function. E.g. instead of &lt;code&gt;x=$(foo)&lt;&#x2F;code&gt;, I write &lt;code&gt;foo; x=&quot;$foo&quot;&lt;&#x2F;code&gt;. Or pass variables by name to set them if I want to return multiple results.&lt;&#x2F;li&gt;
&lt;li&gt;To parse a space-separated string, the fastest is using &lt;code&gt;set&lt;&#x2F;code&gt; to map the elements in the positional parameters &lt;code&gt;$1&lt;&#x2F;code&gt;, &lt;code&gt;$2&lt;&#x2F;code&gt;, ... then the &lt;code&gt;${string#* }&lt;&#x2F;code&gt; and &lt;code&gt;${string% *}&lt;&#x2F;code&gt; operators are the fastest, closely followed by a read, the full &lt;code&gt;[[ $string =~ ([-[:digit:]]+)[[:space:]]... ]]&lt;&#x2F;code&gt; being 3 times slower. And if possible, using indexes is even faster: &lt;code&gt;${string:i:j}&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Use the faster &lt;code&gt;$(&amp;lt; filename)&lt;&#x2F;code&gt; instead of &lt;code&gt;$(cat filename)&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;To copy an associative array A1 to A2 in bash 4.4+, do:
&lt;code&gt;A1_def=$(declare -p A1) &amp;amp;&amp;amp; declare -A A2=&quot;${A1_def#*=}&quot;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;To access more than 9 parameters in a function: use braces: &lt;code&gt;$10&lt;&#x2F;code&gt; wont work, but &lt;code&gt;${10}&lt;&#x2F;code&gt; does.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Moving to Github</title>
        <published>2021-12-10T00:00:00+00:00</published>
        <updated>2021-12-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/moving-to-github/"/>
        <id>https://colas.nahaboo.net/code/moving-to-github/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/moving-to-github/">&lt;p&gt;&lt;strong&gt;Warning:&lt;&#x2F;strong&gt; I will move all the sources I maintained on my own &lt;strong&gt;mercurial&lt;&#x2F;strong&gt; web instance in &lt;code&gt;hg.colas.nahaboo.net&lt;&#x2F;code&gt;  to my GitHub repositories: https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;&lt;&#x2F;p&gt;
&lt;p&gt;I have thus redirected the non-functional &lt;code&gt;hg.colas.nahaboo.net&lt;&#x2F;code&gt; to this page.&lt;&#x2F;p&gt;
&lt;p&gt;The move will be gradual, I started with &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;rsync-incr&quot;&gt;rsync-incr&lt;&#x2F;a&gt;, and I hope to have finished before the end of 2021. Please ask me is you do not see yet your favorite source there.&lt;&#x2F;p&gt;
&lt;p&gt;The reason is that Debian has phased out most of what the web tools for mercurial rely on (python2, wsgi, ...), and thus my web hg repository was broken. And since I wanted anyways to move it to GitHub, it is not worth repairing it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-move-mercurial-hg-directories-to-github&quot;&gt;How to move mercurial (hg) directories to GitHub&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-to-move-mercurial-hg-directories-to-github&quot; aria-label=&quot;Anchor link for: how-to-move-mercurial-hg-directories-to-github&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;As my hg repositories were very simple (no branches, I tend to use cloned repos than branches), what I do to migrate a repository &lt;code&gt;foo&lt;&#x2F;code&gt; to github:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;I used &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;repo.or.cz&#x2F;fast-export.git&quot;&gt;hg-fast-export&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;I converted the hg repo of &lt;code&gt;foo&lt;&#x2F;code&gt; to a local git repository of the same name, with the main hg branch mapped to github default &lt;code&gt;main&lt;&#x2F;code&gt; instead of the script default of &lt;code&gt;master&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;I created an &lt;strong&gt;empty&lt;&#x2F;strong&gt; repository &lt;code&gt;foo&lt;&#x2F;code&gt; on github (no files such as README.md, LICENSE, ...)&lt;&#x2F;li&gt;
&lt;li&gt;I added it as origin to my local git repo&lt;&#x2F;li&gt;
&lt;li&gt;I deleted my hg repo, and git-pushed my local git repo (which became my working repo) to github. Plus I redirected the old hgweb repo urls to the new github repo adress.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I.e. as actual bash commands:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;repo=foo                        # the name of the repo to convert&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;hg=~&#x2F;hg                         # where are my local hg repos&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;git=~&#x2F;git                       # where are my local git repos&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;hfe=&#x2F;opt&#x2F;fast-export            # where is my copy of hg-fast-export.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ghn=ColasNahaboo                # my name on github&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkdir $git&#x2F;$repo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cd $git&#x2F;$repo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;git init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$hfe&#x2F;hg-fast-export.sh -r &amp;quot;$hg&#x2F;$repo&amp;quot; -M main -n &amp;quot;$git&#x2F;$repo&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;git branch -M main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;git checkout main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;git remote add origin git@github.com:$ghn&#x2F;$repo.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Warning: for this last step, the github repo must exist and be empty&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;git push -u origin main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Advent of Code 2021</title>
        <published>2021-12-07T00:00:00+00:00</published>
        <updated>2021-12-07T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/advent-of-code-2021/"/>
        <id>https://colas.nahaboo.net/code/advent-of-code-2021/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/advent-of-code-2021/">&lt;p&gt;I just discovered the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;adventofcode.com&#x2F;&quot;&gt;Advent of code&lt;&#x2F;a&gt; coding challenge. It exists since 2015, and seems really interesting in that it is language-agnostic.&lt;&#x2F;p&gt;
&lt;p&gt;Each day a problem is described, with input files consisting of numeric values for the problem. You must submit the answer which is a number by whatever means you want.&lt;&#x2F;p&gt;
&lt;p&gt;I started to do the current 2021 challenge, in &lt;strong&gt;bash&lt;&#x2F;strong&gt; to force myself to code in a more modern style that pass &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.shellcheck.net&#x2F;&quot;&gt;shellcheck&lt;&#x2F;a&gt;. And later, i will probably do the other years in &lt;strong&gt;Go&lt;&#x2F;strong&gt; to learn it.&lt;&#x2F;p&gt;
&lt;p&gt;I publish my solutions as I code them on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ColasNahaboo&#x2F;advent-of-code-my-solutions&#x2F;tree&#x2F;main&#x2F;bash&#x2F;2021&quot;&gt;my github&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;More info:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;adventofcode.com&#x2F;&quot;&gt;advent of code&lt;&#x2F;a&gt; (aka AOC) site&lt;&#x2F;li&gt;
&lt;li&gt;The sub-reddit  &lt;a href=&quot;&#x2F;r&#x2F;adventofcode&quot;&gt;&#x2F;r&#x2F;adventofcode&lt;&#x2F;a&gt; to discuss AOC&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Pinboard pricing model</title>
        <published>2021-03-01T00:00:00+00:00</published>
        <updated>2021-03-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/pinboard-pricing-model/"/>
        <id>https://colas.nahaboo.net/blog/pinboard-pricing-model/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/pinboard-pricing-model/">&lt;p&gt;I am a knowledge addict, and always has been. I was reading as many books as possible, and the advent of the web has been a marvelous gift for me. But I soon realized that I needed some tools to manage this knowledge and supplement my memory. It started with pen and papers, then I used a lot the PDAs (Personal Digital Assistants) such as the fabulous Psion &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Psion_Series_3&quot;&gt;Series 3&lt;&#x2F;a&gt; and &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Psion_Series_5&quot;&gt;Series 5&lt;&#x2F;a&gt;, the various smartphones, and finally the bookmarks-in-the-cloud service &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Delicious_(website)&quot;&gt;Delicious&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;But as Delicious closed, I searched a replacement, and found &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;pinboard.in&#x2F;tour&#x2F;&quot;&gt;Pinboard&lt;&#x2F;a&gt;, and was hooked. Not only it offered the same functionalities as Delicious (and more), but if was fast and sleek, with a minimal no-nonsense design that I favor.&lt;&#x2F;p&gt;
&lt;p&gt;It also had an original pricing system: you paid a one-time fee of $0.001 per the number of current users to get access for life. E.g $9.26 if there was already 9263 paying users and you wanted to become the 9264th. The goal was to entice people to register now rather than waiting, even though it may not have scaled. (see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leftovertakeout.com&#x2F;post&#x2F;3783798631&#x2F;pinboardin-pricing-model-fixing-their-math&quot;&gt;Pinboard.in Pricing Model: Fixing Their Math&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;Alas, it could not be sustained, so in 2015 it adopted a more mainstream yearly fee scheme: $11 &#x2F; year. &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;blog.pinboard.in&#x2F;2014&#x2F;12&#x2F;new_pricing_policy&#x2F;&quot;&gt;New Pricing Policy (Pinboard Blog)&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;But we, old timers, kept our lifetime access we bought before the change. We were basically free-riding the new wave of customers...&lt;&#x2F;p&gt;
&lt;p&gt;Of course it could not go on, so last week, Maciej, the Pinboard author, suggested we voluntarily switch to the yearly fee scheme. And I did it gladly, Pinboard is for me a model of what web sites should be: sleek, fast, and efficient (and not re-selling your private data). At the opposite of the bloated monstrosities that a lot of sites tend to be nowadays.&lt;&#x2F;p&gt;
&lt;p&gt;Long live Pinboard!&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>A New version of the site for 2021</title>
        <published>2020-12-27T00:00:00+00:00</published>
        <updated>2020-12-27T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/a-new-version-of-the-site-for-2021/"/>
        <id>https://colas.nahaboo.net/blog/a-new-version-of-the-site-for-2021/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/a-new-version-of-the-site-for-2021/">&lt;p&gt;A big change is planned for this site in 2021: I am going to abandon the Foswiki engine for it, to pursue my recent goal of going back to the web roots. Basically, it a quest that relies more on:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fast rendering&lt;&#x2F;strong&gt; by no rendering at all: pre-compiling the site pages into static HTML+CSS+JS pages: the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;jamstack.org&#x2F;&quot;&gt;JAMstack&lt;&#x2F;a&gt; approach.&lt;&#x2F;li&gt;
&lt;li&gt;What I call a &lt;strong&gt;LAUW&lt;&#x2F;strong&gt; approach (&lt;strong&gt;L&lt;&#x2F;strong&gt;inux &lt;strong&gt;A&lt;&#x2F;strong&gt;pache &lt;strong&gt;U&lt;&#x2F;strong&gt;nix-utilities &lt;strong&gt;W&lt;&#x2F;strong&gt;eb Standards) instead of the traditional &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;LAMP_(software_bundle)&quot;&gt;LAMP&lt;&#x2F;a&gt;. Using the full strengths of Linux, Apache, the GNU Unix utilities, and the modern web standards (HTML5, CSS4, JS ES6) now that Internet Explorer is at last dead. This means not using software libraries (e.g: JQuery) and processors (e.g: Saas) that were designed to remedy to the poor state of some browsers.&lt;&#x2F;li&gt;
&lt;li&gt;Using &lt;strong&gt;Markdown&lt;&#x2F;strong&gt; for text editing&lt;&#x2F;li&gt;
&lt;li&gt;Using ultra &lt;strong&gt;stable and reliable&lt;&#x2F;strong&gt; technologies. I want to use things that will still work in 10 years, not the fad-of-the-day javascript framework that will be obsolete in 6 months, or that will break compatibility on each update.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Technical&lt;&#x2F;strong&gt;: And that do not try to be friendly to non-technical authors and admins, as  I will be the sole admin and editor.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;now&quot;&gt;Now&lt;a class=&quot;zola-anchor&quot; href=&quot;#now&quot; aria-label=&quot;Anchor link for: now&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;So now (December 2020), I am still using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;foswiki.org&#x2F;Home&#x2F;WebHome&quot;&gt;Foswiki&lt;&#x2F;a&gt;, but progressively prototyping on it the features I will try to implement later:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;A simplified skin, with all the &quot;wiki-ism&quot; (everything editable) removed. As you can see I got rid of the left toolbar, to keep only the top banner with its sections (Code&#x2F;Surf&#x2F;Blog) menu on the logo and minimal tools on the right&lt;&#x2F;li&gt;
&lt;li&gt;Editing contents in Markdown instead of the Foswiki syntax: I now do not use the Foswiki system to edit topics, but desktop-edit via &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marktext.app&#x2F;&quot;&gt;marktext&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Having all the post sharing a common Form, so that the fields of this form can be easily converted to YAML as used as frontmatter (metadata) in modern Markdown-based systems.&lt;&#x2F;li&gt;
&lt;li&gt;But still using all the Foswiki power for the site admin and non-content topics (indexes,...)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The idea is to migrate progressively the contents into a form (Markdown + Frontmatter) usable in a modern static web generator like Hugo, while adapting Foswiki to use this content form, preparing a future migration.&lt;&#x2F;p&gt;
&lt;p&gt;I have developed the details of what this means in my post on the Foswiki site: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;foswiki.org&#x2F;Development&#x2F;FoswikiNonWikiWebSites&quot;&gt;Foswiki for non-wiki web sites&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;spring-2021&quot;&gt;Spring 2021&lt;a class=&quot;zola-anchor&quot; href=&quot;#spring-2021&quot; aria-label=&quot;Anchor link for: spring-2021&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;After I retire, at the end of February 2021, I will have more time to ditch Foswiki and implement the site on a new engine. It will probably be a static website generator, most probably &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;gohugo.io&#x2F;&quot;&gt;Hugo&lt;&#x2F;a&gt;, but maybe also &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;&quot;&gt;Zola&lt;&#x2F;a&gt;  &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.11ty.dev&#x2F;&quot;&gt;Eleventy&lt;&#x2F;a&gt;, or &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.gatsbyjs.com&#x2F;&quot;&gt;Gasby&lt;&#x2F;a&gt;, and incorporating ideas of the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;jamstack.org&#x2F;generators&#x2F;&quot;&gt;myriad of other ones&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;summer-2021&quot;&gt;Summer 2021&lt;a class=&quot;zola-anchor&quot; href=&quot;#summer-2021&quot; aria-label=&quot;Anchor link for: summer-2021&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I will then probably replace progressively various components of this system by ones that I will handcraft optimally to incorporate all the ideas I have been toying with during all these years: the HTML+CSS+JS layout, the tag&#x2F;category system, the search engine, the comment engine, the editing process...&lt;&#x2F;p&gt;
&lt;h2 id=&quot;later&quot;&gt;Later...&lt;a class=&quot;zola-anchor&quot; href=&quot;#later&quot; aria-label=&quot;Anchor link for: later&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;And I may even at some time create a totally new web engine system, who knows?&lt;&#x2F;p&gt;
&lt;p&gt;Or code a wiki replacement: a collaborative editing site based on the concepts learned via this experiment.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>A New Version of the site for 2020</title>
        <published>2020-07-26T00:00:00+00:00</published>
        <updated>2020-07-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/a-new-version-of-the-site-for-2020/"/>
        <id>https://colas.nahaboo.net/blog/a-new-version-of-the-site-for-2020/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/a-new-version-of-the-site-for-2020/">&lt;p&gt;After 10 years of
neglect, it is time for a new start of this site, because:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;I am going to retire in early 2021 (in 6 months), and I will have now time to properly maintain a personal site&lt;&#x2F;li&gt;
&lt;li&gt;I am feeling the need to archive in a central place all the contents I scatter in various different places, if only for the selfish reason to be able to retreive them more easily&lt;&#x2F;li&gt;
&lt;li&gt;I was toying with the idea of going to a static web site, as it is now in vogue, and it has a kind of nostalgia for me as I started my web sites as static   sites anyways. But by looking at the existing solutions, I was not convinced by them, as a lot seemed to naively solve the 80% easy part of the problem, and them struggle without any clear vision on how to solve the 20% hard part... a classic situation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I thus decided to keep on using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;foswiki.org&quot;&gt;Foswiki&lt;&#x2F;a&gt;
(v2.1.6), as it is now quite mature, and thus stable: I like building on
solid, time-tested fundations that will not change every month. And
let&#x27;s be honest, it is both extremely powerful and incredibly reliable.
I am just tweaking it for using it as a public site (one author with all
admin rights, and read-only viewers), rather than the standard wiki
setup of many authors, all able to edit contents, with some able to also
admin rights. My postulate is that a dynamic web site like a wiki, with
proper caching, has all the advantages of a static web site, but is more
practical to maintain (although more complex to implement).&lt;&#x2F;p&gt;
&lt;p&gt;I will detail my views on how to website-ize a wiki in future posts, but
for now, on 2020-07-26 at noon French time, let go live!&lt;&#x2F;p&gt;
&lt;p&gt;Welcome to my (new) world!&lt;&#x2F;p&gt;
&lt;p&gt;Colas.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Usability issues on a payment form</title>
        <published>2009-03-03T00:00:00+00:00</published>
        <updated>2009-03-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/usability-issues-on-a-payment-form/"/>
        <id>https://colas.nahaboo.net/blog/usability-issues-on-a-payment-form/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/usability-issues-on-a-payment-form/">&lt;p&gt;I know, I know, it is easy to nitpick on other people design, but this
morning I tried to pay my phone bill online, and... failed. I had to
retry many times, because I kept making mistakes on a simple,
run-of-the-mill form to enter my credit card data. I was dumbfounded.
How can, in 2009, people manage to make such a trivial and essential
part of online business go so wrong? As I guess you are as curious as
me, here is what I found out: (See the picture for the 3 main pain
points)&lt;&#x2F;p&gt;
&lt;img src=&quot;telefact-bloopers.png&quot;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;&#x2F;strong&gt; the expiration date example is ambiguous: does &lt;code&gt;0903&lt;&#x2F;code&gt; here means
2009-03 or 2003-09 ? Why didnt they disambiguate it by also adding a
specification (like MMYY, or, as it is a french dialog, MMAA ?)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;&#x2F;strong&gt; but today, it was not only ambiguous but plainly misleading! As
we were in March 2009, I assumed that the example was built from the
current month and year. I said cool, so it is YYMM. Wrong! it was
actually the reverse, MMYY, resulting in one failed attempt&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;3&lt;&#x2F;strong&gt; ok, I filled the fields, and hit the OK button... and it just
reset the page to empty fields! Grumbling, I re-typed the fields,
re-clic, and... another blank page! After these two more failures, I
tried to think (which is what you &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Don&amp;#x27;t_Make_Me_Think&quot;&gt;do not want your users to
do&lt;&#x2F;a&gt;, trust me). I
then read the button label and discovered that this big, prominent
button alone at the bottom of the page was &lt;strong&gt;not the Submit button&lt;&#x2F;strong&gt;
but the Cancel one. I should have hit the middle one &quot;Valider&quot;, but
this button was not in the correct place on the flow of the form.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;So,after 3 failed attempts, I managed to pay my bill. All this on a
simple form with no fancy verification code or Captcha. Well done
Telefact, I wonder if you can find a worse example still in use today.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>My work on TWiki</title>
        <published>2008-12-20T00:00:00+00:00</published>
        <updated>2008-12-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/my-work-on-twiki/"/>
        <id>https://colas.nahaboo.net/code/my-work-on-twiki/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/my-work-on-twiki/">&lt;p&gt;I discovered the wiki concept in 2000, and quickly decided that this was
the future of the web site building tools, after many attempts at trying
various methods of Web development. Doing some research made me choose
the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twiki.org&quot;&gt;TWiki engine&lt;&#x2F;a&gt;, and since then I have been part of
the TWiki community, providing some work and enhancements on it. For
more detailed info, the best place is to go look at &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twiki.org&#x2F;cgi-bin&#x2F;view&#x2F;Main&#x2F;ColasNahaboo&quot;&gt;my page on the
TWiki site&lt;&#x2F;a&gt;, and my
&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twiki.org&#x2F;cgi-bin&#x2F;view&#x2F;Codev&#x2F;PersonalRoadmapForColasNahaboo&quot;&gt;personal goals&lt;&#x2F;a&gt;
for it.&lt;&#x2F;p&gt;
&lt;p&gt;Of course, since the brutal TWiki fork, I have
folowed the whole TWiki community into the new great
&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;foswiki.org&quot;&gt;Foswiki&lt;&#x2F;a&gt; wiki project.&lt;&#x2F;p&gt;
&lt;p&gt;I was working on: (latest first)&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;TWiki &quot;koala&quot; pattern skin A system to
properly customize the pattern skin. This is the one I use on this
site&lt;&#x2F;li&gt;
&lt;li&gt;Enhancements to the Vote Plugin&lt;&#x2F;li&gt;
&lt;li&gt;TWiki misc enhancements for freetown&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>What is good code?</title>
        <published>2008-10-22T00:00:00+00:00</published>
        <updated>2008-10-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/what-is-good-code/"/>
        <id>https://colas.nahaboo.net/blog/what-is-good-code/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/what-is-good-code/">&lt;p&gt;I stumbled upon the blog post &quot;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20190630095624&#x2F;https:&#x2F;&#x2F;weblogs.asp.net&#x2F;fredriknormen&#x2F;is-it-important-to-write-good-code&quot;&gt;Is it important to write good
code?&lt;&#x2F;a&gt;&quot;
the other day, and became more and more ill at ease as I realized that I
thought that I preferred the original code, that the author was trying
to ridicule, over his new &quot;improved&quot; object-oriented version. At first I
guessed this was another manifestation of the the &quot;Worst is best&quot;
scenario - enhancements are often not worth the added complexity - but I
realized that it was perhaps a more profound factor:&lt;&#x2F;p&gt;
&lt;p&gt;The original code is very good because it ... is &lt;strong&gt;small&lt;&#x2F;strong&gt;. It fits on a
teminal screen, so an human being can &lt;strong&gt;read&lt;&#x2F;strong&gt; it at once and have less
items to maintain in his &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;The_Magical_Number_Seven,_Plus_or_Minus_Two&quot;&gt;short term
memory&lt;&#x2F;a&gt;
and also &lt;strong&gt;understand&lt;&#x2F;strong&gt; it easily because it follows a natural way of
thinking with &lt;strong&gt;sentences using IF&lt;&#x2F;strong&gt;. This becomes obvious by reading
the body of the blog post surrounding the code samples, where you can
see that the author is using phrases such as &quot;if I need this I do that&quot;,
showing that in plain english, the if statement is the best way to make
people understand what you mean. And making code that &lt;strong&gt;people&lt;&#x2F;strong&gt;
understand is the best way to make debuggable and maintainable code.&lt;&#x2F;p&gt;
&lt;p&gt;At this moment I noticed the citation in the blog header: &lt;em&gt;&quot;Good
programmers write code that humans can understand&quot;&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Indeed :-)&lt;&#x2F;p&gt;
&lt;p&gt;PS: I know I am a bit exaggerating the issues there, and that I unfairly
nitpick on Fredrik Normé, but it is that it seems to me from my personal
experience that the two changes I see most in my coding efficiency as I
grow older is a decrease of my short term memory capacity, and that I
make more and more typos where I realize I mix up totally words with
totally different meanings but that sound the same, for instance writing
&quot;never&quot; instead of &quot;nether&quot;, making me suspect that our natural way of
thinking may be much more language-based that I imagined...&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Mercurial web templating</title>
        <published>2008-10-09T00:00:00+00:00</published>
        <updated>2008-10-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/mercurial-web-templating/"/>
        <id>https://colas.nahaboo.net/blog/mercurial-web-templating/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/mercurial-web-templating/">&lt;p&gt;For some time now, I have seen the light and I switched to the new wave
of the Distributed Source Control management systems. &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=4XpnKHJAok8&quot;&gt;Linus famous
video&lt;&#x2F;a&gt; of his Google talk
decided me to try. I was a bit apprehensive at first, wary of engaging
myself on a technology that would bring more problems than solutions,
but after some days of use, the realisation dawned over me: Distributed
Source Control may be one little step for a programmer, but it is a
giant step for programming. Why? because, its &lt;strong&gt;mental model actually
follows your first intuitions&lt;&#x2F;strong&gt; that most of us developed as young
programmers before using any source control system. Suppose you want to
try a feature? instead of just copying the directory, you clone it. You
mess an operation? you just remove the directory, no embarrassing traces
left to keep the burning scar of shame on you for the following decades
of a central repository. You are used to think of your enhancements as
patches, you can work with patches. I could go on and on, but many
people have done it much better than me so I&#x27;ll just say that you should
definitely try it.&lt;&#x2F;p&gt;
&lt;p&gt;By the way, between the 3 main contenders, &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;&quot;&gt;git&lt;&#x2F;a&gt;,
&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.mercurial-scm.org&#x2F;&quot;&gt;mercurial&lt;&#x2F;a&gt; (aka HG), and
&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;GNU_Bazaar&quot;&gt;bazaar&lt;&#x2F;a&gt;, I chose mercurial because of its
simplicity, its better support of windows (I work in Linux since 1995
but my coworkers currently use Windows), and because some people at ILOG
started using git so I wanted to be able to try something else. I did
not choose bazaar as I wanted to stay close enough of git, to be able to
switch to it if ever my dream to work in a windows-free world
materializes one day...&lt;&#x2F;p&gt;
&lt;p&gt;So I started to set up a public web repository of my Open Source personal
work with mercurial, which gave me a simple way to publish my work in
full detail, but, although mercurial is quite easy to use, but I had a
bit of trouble figuring out how to customize its look &amp;amp; feel.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hgweb Mercurial template customization</title>
        <published>2008-04-06T00:00:00+00:00</published>
        <updated>2008-04-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/hgweb-mercurial-template-customization/"/>
        <id>https://colas.nahaboo.net/code/hgweb-mercurial-template-customization/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/hgweb-mercurial-template-customization/">&lt;p&gt;If you use the &lt;code&gt;hgwebdir.cgi&lt;&#x2F;code&gt; system to provide a web view of your mercurial repository, to customize the style like I did for (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20101113204327&#x2F;https:&#x2F;&#x2F;hg.colas.nahaboo.net&#x2F;&quot;&gt;archived view&lt;&#x2F;a&gt;), a way to do it is (in debian, paths to adapt to your linux distribution):&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;copy &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;mercurial&#x2F;templates&#x2F;gitweb&lt;&#x2F;code&gt; somewhere among your hg repositories. make a hg repository out of it&lt;&#x2F;li&gt;
&lt;li&gt;clone it to another one, e.g. &lt;code&gt;myhg&lt;&#x2F;code&gt;. This way, when upgrades will change the distributed templates, you will just have to copy the new ones in your &lt;code&gt;gitweb&lt;&#x2F;code&gt; repo, commit, and pull+merge the changes into your &lt;code&gt;myhg&lt;&#x2F;code&gt; repo.&lt;&#x2F;li&gt;
&lt;li&gt;edit the files in it: header.tmpl to add css code, etc. Adding links in the page headers will make you edit most of the files&lt;&#x2F;li&gt;
&lt;li&gt;install by copying it to &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;mercurial&#x2F;templates&#x2F;myhg&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;edit your &#x2F;etc&#x2F;mercurial&#x2F;hgrc to tell hgwebdir.cgi to use your new templates by a line &lt;code&gt;style=myhg&lt;&#x2F;code&gt; . in your &lt;code&gt;[web]&lt;&#x2F;code&gt; section. Here is my file as an exemple:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# system-wide mercurial configuration file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# See hgrc(5) for more information&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[trusted]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;users=colas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[web]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;baseurl=https&amp;amp;#58;&#x2F;&#x2F;hg.colas.nahaboo.net&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;contact=colas@nahaboo.net&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;description=Open source software made by Colas Nahaboo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;maxchanges=16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;staticurl=https&amp;amp;#58;&#x2F;&#x2F;hg.colas.nahaboo.net&#x2F;static&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;style=colas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;The above will make these settings global to the site. but you can still override them on a per-repository basis by adding these lines into the &lt;code&gt;hgweb.config&lt;&#x2F;code&gt; of the repositories.&lt;&#x2F;li&gt;
&lt;li&gt;Note that you can use HTML code in the description field&lt;&#x2F;li&gt;
&lt;li&gt;This &lt;code&gt;hgrc&lt;&#x2F;code&gt; is not cloned by &lt;code&gt;hg&lt;&#x2F;code&gt;. So you must add&#x2F;edit it directly on the web repository, you cannot prepare it in advance in your work dir and expect it to be pushed on the web site on first creation&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>The rebirth of this site</title>
        <published>2008-04-04T00:00:00+00:00</published>
        <updated>2008-04-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/the-rebirth-of-this-site/"/>
        <id>https://colas.nahaboo.net/blog/the-rebirth-of-this-site/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/the-rebirth-of-this-site/">&lt;p&gt;At last, I decided myself to redo my old website, which was a collection
of static html and was based on many of the various tools I made in
these past years. As I grew in love with wikis over these years, the
natural tought was just to do it in a Wiki, and naturally in the Wiki I
like the most, &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twiki.org&quot;&gt;TWiki&lt;&#x2F;a&gt;. So bear with me and keep
posted, as this site will slowly emerge in this first half of 2008.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
