Browse Source

Links

master
David Larlet 1 year ago
parent
commit
542c56586b

+ 201
- 0
cache/2023/36a8b8a87633796d41c2574720812594/index.html View File

@@ -0,0 +1,201 @@
<!doctype html><!-- This is a valid HTML5 document. -->
<!-- Screen readers, SEO, extensions and so on. -->
<html lang="fr">
<!-- Has to be within the first 1024 bytes, hence before the `title` element
See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
<meta charset="utf-8">
<!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
<!-- The viewport meta is quite crowded and we are responsible for that.
See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Required to make a valid HTML5 document. -->
<title>Writing Is Magic (archive) — David Larlet</title>
<meta name="description" content="Publication mise en cache pour en conserver une trace.">
<!-- That good ol' feed, subscribe :). -->
<link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
<!-- Generated from https://realfavicongenerator.net/ such a mess. -->
<link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
<link rel="manifest" href="/static/david/icons2/site.webmanifest">
<link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
<link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
<meta name="msapplication-TileColor" content="#f7f7f7">
<meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
<meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
<!-- Documented, feel free to shoot an email. -->
<link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
<!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<script>
function toggleTheme(themeName) {
document.documentElement.classList.toggle(
'forced-dark',
themeName === 'dark'
)
document.documentElement.classList.toggle(
'forced-light',
themeName === 'light'
)
}
const selectedTheme = localStorage.getItem('theme')
if (selectedTheme !== 'undefined') {
toggleTheme(selectedTheme)
}
</script>

<meta name="robots" content="noindex, nofollow">
<meta content="origin-when-cross-origin" name="referrer">
<!-- Canonical URL for SEO purposes -->
<link rel="canonical" href="https://brooker.co.za/blog/2022/11/08/writing.html">

<body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">


<article>
<header>
<h1>Writing Is Magic</h1>
</header>
<nav>
<p class="center">
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="https://brooker.co.za/blog/2022/11/08/writing.html" title="Lien vers le contenu original">Source originale</a>
</p>
</nav>
<hr>
<p class="meta">Magic can be dangerous.</p>

<p><em>Sometimes when folks ask me for advice at work, I write them very long emails to answer their question. Sometimes, those emails are generally interesting and not work-specific, so I share them here. A couple days ago somebody asked me about how to get better at communicating their ideas and opinions, how to extend their influence, and how to drive consensus. This was my reply.</em></p>

<p>There are many ways to be influential. You can form 1:1 relationships with people, have small group meetings, do talks, send out a code review, or argue in Slack. All of those can be valuable at the right time. But there's one tool that I choose most often: long-form writing. Writing is the closest thing I know to magic.</p>

<p>Nearly every time I need to drive a difficult, subtle, or contentious decision, I write a document. Sometimes that's half a page, sometimes its six pages. Sometimes much longer, although brevity is valuable. I see a few benefits to this approach that keep me coming back it it again and again.</p>

<p>First, clarity. I'm sure you know the quote "Writing is nature’s way of letting you know how sloppy your thinking is"<sup><a href="#foot1">1</a></sup>, and knowing how sloppy your thinking is allows you to sharpen it, test your arguments, and test different explanations. I find, more often than not, that I understand something much less well when I sit down to write about it than when I'm thinking about it in the shower. In fact, I find that I change my own mind on things a lot when I try write them down. It really is a powerful tool for finding clarity in your own mind. Once you have clarity in your own mind, you're much more able to explain it to others.</p>

<p>Second, time. Getting people's full, focused, attention on your ideas is very hard. Reading, if your team has a strong document culture, is one of the only ways to do that. You give people a couple pages to read, ideally on paper, and they're likely to be quiet and focus on understanding your ideas for at least a few minutes. You get to be there, in their heads, with nothing else, for a while. You get to lay out an argument, tell a story, present some data, or ask their opinion without interruption, without back-and-forth. Just your voice. There are very few other ways to do that.</p>

<p>Third, scale. Sometimes documents only live for an hour or so. They're there to drive a decision, and when the decision is made the document is dead. Much more often, in my experience, they live well beyond the initial reading. I've had people ask me questions about documents I wrote more than a decade ago, that they're still finding useful today. I love reading CS papers from before I was born. Writing scales in time much better than speaking. I also encourage people to share documents. They can go from the initial audience, to a whole team, to other stakeholders, to people working on similar problems. Writing scales in space much better than nearly any other way of communicating. Sometimes your writing may scale more than you want it to, in either time our space. You do need to watch out for that.</p>

<p>Fourth, authority. For some reason, people tend to believe the things I write more strongly than the things I say. Maybe its the fact I took the time I write suggests its worth their time to read. I've found many times that I've said the same thing over and over and over, and then once I write it down suddenly its The Law. You need to be super careful with that effect, if you see it yourself. It can stifle discussion and communication. It can lead to people treating your words as more certain than they really are, of turning your musings into dogma<sup><a href="#foot2">2</a></sup>. Sometimes it doesn't work at all, and you'll write something down to no effect, but I don't see that very often.</p>

<p>Finally, memory. I don't know if my memory is uniquely terrible, but I really do tend to forget things. I vividly remember the tuck shop menu from my primary school, 30 years ago. I don't always remember my justification for decisions I was pushing for last week. Writing is my own record. My own way to go back and see what I was thinking then, and whether its still true. Sometimes I find that I was much smarter two weeks ago than I am now. Sometimes its the opposite. Either way, the record is something I find valuable.</p>

<p>Writing takes time. Writing well takes a lot of time. On the other hand, the output of writing is almost always more clarity, and sometimes a clear decision. Over my career, I think I've wasted at least ten times more time going around and around in conversations without finding consensus than I have writing documents that didn't turn out to be valuable. It's very seldom that I think back over writing something and conclude that it wasn't a good investment of my time. That can happen, and you have to watch for it, but it doesn't happen to me a lot.</p>

<p>My last point is about reading culture. Sitting down to read, really read for understanding, is a learned skill. It's something I recommend that everybody practice, and model in their organizations. I like to discourage people from arguing in document comments. I especially discourage people from nitpicking. Seeking feedback <em>on the document</em> rather than <em>on the ideas in the document</em> is, of course, useful if you want to get better at writing. But it's way easier for a reader to nitpick grammar than it is to engage with ideas, so I like to time box that kind of feedback or take it to a different channel.</p>

<p>This isn't a complete answer to your question, but a partial one. Write more.</p>

<p><strong>Footnotes</strong></p>

<ol>
<li><a name="foot1"></a> Lamport <a href="https://dl.acm.org/doi/pdf/10.1145/2736348">attributes this</a> to <a href="https://en.wikipedia.org/wiki/Dick_Guindon">Dick Guindon</a>, but there are other credible attributions out there. No matter who said it first, it seems true.</li>
<li><a name="foot2"></a> Lev Grossman's Magicians series has this ongoing theme about how dangerous magic is to the people to practice it, and a lot of the difficulty isn't in harnessing power, its in having that power not destroy you when you do. I think about that a lot. Influence is something worth becoming great at, and I really admire some of the people who are the best at it, but you need to be really careful.</li>
</ol>
</article>


<hr>

<footer>
<p>
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
</svg> Suivre</a> •
<a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
</svg> Pro</a> •
<a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
</svg> Email</a> •
<abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
</svg> Légal</abbr>
</p>
<template id="theme-selector">
<form>
<fieldset>
<legend><svg class="icon icon-brightness-contrast">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
</svg> Thème</legend>
<label>
<input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
</label>
<label>
<input type="radio" value="dark" name="chosen-color-scheme"> Foncé
</label>
<label>
<input type="radio" value="light" name="chosen-color-scheme"> Clair
</label>
</fieldset>
</form>
</template>
</footer>
<script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
<script>
function loadThemeForm(templateName) {
const themeSelectorTemplate = document.querySelector(templateName)
const form = themeSelectorTemplate.content.firstElementChild
themeSelectorTemplate.replaceWith(form)

form.addEventListener('change', (e) => {
const chosenColorScheme = e.target.value
localStorage.setItem('theme', chosenColorScheme)
toggleTheme(chosenColorScheme)
})

const selectedTheme = localStorage.getItem('theme')
if (selectedTheme && selectedTheme !== 'undefined') {
form.querySelector(`[value="${selectedTheme}"]`).checked = true
}
}

const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
window.addEventListener('load', () => {
let hasDarkRules = false
for (const styleSheet of Array.from(document.styleSheets)) {
let mediaRules = []
for (const cssRule of styleSheet.cssRules) {
if (cssRule.type !== CSSRule.MEDIA_RULE) {
continue
}
// WARNING: Safari does not have/supports `conditionText`.
if (cssRule.conditionText) {
if (cssRule.conditionText !== prefersColorSchemeDark) {
continue
}
} else {
if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
continue
}
}
mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
}

// WARNING: do not try to insert a Rule to a styleSheet you are
// currently iterating on, otherwise the browser will be stuck
// in a infinite loop…
for (const mediaRule of mediaRules) {
styleSheet.insertRule(mediaRule.cssText)
hasDarkRules = true
}
}
if (hasDarkRules) {
loadThemeForm('#theme-selector')
}
})
</script>
</body>
</html>

+ 36
- 0
cache/2023/36a8b8a87633796d41c2574720812594/index.md View File

@@ -0,0 +1,36 @@
title: Writing Is Magic
url: https://brooker.co.za/blog/2022/11/08/writing.html
hash_url: 36a8b8a87633796d41c2574720812594

<p class="meta">Magic can be dangerous.</p>


<p><em>Sometimes when folks ask me for advice at work, I write them very long emails to answer their question. Sometimes, those emails are generally interesting and not work-specific, so I share them here. A couple days ago somebody asked me about how to get better at communicating their ideas and opinions, how to extend their influence, and how to drive consensus. This was my reply.</em></p>

<p>There are many ways to be influential. You can form 1:1 relationships with people, have small group meetings, do talks, send out a code review, or argue in Slack. All of those can be valuable at the right time. But there's one tool that I choose most often: long-form writing. Writing is the closest thing I know to magic.</p>

<p>Nearly every time I need to drive a difficult, subtle, or contentious decision, I write a document. Sometimes that's half a page, sometimes its six pages. Sometimes much longer, although brevity is valuable. I see a few benefits to this approach that keep me coming back it it again and again.</p>

<p>First, clarity. I'm sure you know the quote "Writing is nature’s way of letting you know how sloppy your thinking is"<sup><a href="#foot1">1</a></sup>, and knowing how sloppy your thinking is allows you to sharpen it, test your arguments, and test different explanations. I find, more often than not, that I understand something much less well when I sit down to write about it than when I'm thinking about it in the shower. In fact, I find that I change my own mind on things a lot when I try write them down. It really is a powerful tool for finding clarity in your own mind. Once you have clarity in your own mind, you're much more able to explain it to others.</p>

<p>Second, time. Getting people's full, focused, attention on your ideas is very hard. Reading, if your team has a strong document culture, is one of the only ways to do that. You give people a couple pages to read, ideally on paper, and they're likely to be quiet and focus on understanding your ideas for at least a few minutes. You get to be there, in their heads, with nothing else, for a while. You get to lay out an argument, tell a story, present some data, or ask their opinion without interruption, without back-and-forth. Just your voice. There are very few other ways to do that.</p>

<p>Third, scale. Sometimes documents only live for an hour or so. They're there to drive a decision, and when the decision is made the document is dead. Much more often, in my experience, they live well beyond the initial reading. I've had people ask me questions about documents I wrote more than a decade ago, that they're still finding useful today. I love reading CS papers from before I was born. Writing scales in time much better than speaking. I also encourage people to share documents. They can go from the initial audience, to a whole team, to other stakeholders, to people working on similar problems. Writing scales in space much better than nearly any other way of communicating. Sometimes your writing may scale more than you want it to, in either time our space. You do need to watch out for that.</p>

<p>Fourth, authority. For some reason, people tend to believe the things I write more strongly than the things I say. Maybe its the fact I took the time I write suggests its worth their time to read. I've found many times that I've said the same thing over and over and over, and then once I write it down suddenly its The Law. You need to be super careful with that effect, if you see it yourself. It can stifle discussion and communication. It can lead to people treating your words as more certain than they really are, of turning your musings into dogma<sup><a href="#foot2">2</a></sup>. Sometimes it doesn't work at all, and you'll write something down to no effect, but I don't see that very often.</p>

<p>Finally, memory. I don't know if my memory is uniquely terrible, but I really do tend to forget things. I vividly remember the tuck shop menu from my primary school, 30 years ago. I don't always remember my justification for decisions I was pushing for last week. Writing is my own record. My own way to go back and see what I was thinking then, and whether its still true. Sometimes I find that I was much smarter two weeks ago than I am now. Sometimes its the opposite. Either way, the record is something I find valuable.</p>

<p>Writing takes time. Writing well takes a lot of time. On the other hand, the output of writing is almost always more clarity, and sometimes a clear decision. Over my career, I think I've wasted at least ten times more time going around and around in conversations without finding consensus than I have writing documents that didn't turn out to be valuable. It's very seldom that I think back over writing something and conclude that it wasn't a good investment of my time. That can happen, and you have to watch for it, but it doesn't happen to me a lot.</p>

<p>My last point is about reading culture. Sitting down to read, really read for understanding, is a learned skill. It's something I recommend that everybody practice, and model in their organizations. I like to discourage people from arguing in document comments. I especially discourage people from nitpicking. Seeking feedback <em>on the document</em> rather than <em>on the ideas in the document</em> is, of course, useful if you want to get better at writing. But it's way easier for a reader to nitpick grammar than it is to engage with ideas, so I like to time box that kind of feedback or take it to a different channel.</p>

<p>This isn't a complete answer to your question, but a partial one. Write more.</p>

<p><strong>Footnotes</strong></p>

<ol>
<li><a name="foot1"></a> Lamport <a href="https://dl.acm.org/doi/pdf/10.1145/2736348">attributes this</a> to <a href="https://en.wikipedia.org/wiki/Dick_Guindon">Dick Guindon</a>, but there are other credible attributions out there. No matter who said it first, it seems true.</li>
<li><a name="foot2"></a> Lev Grossman's Magicians series has this ongoing theme about how dangerous magic is to the people to practice it, and a lot of the difficulty isn't in harnessing power, its in having that power not destroy you when you do. I think about that a lot. Influence is something worth becoming great at, and I really admire some of the people who are the best at it, but you need to be really careful.</li>
</ol>


+ 292
- 0
cache/2023/646ebfa25432bc6b653e524b52d25c9a/index.html View File

@@ -0,0 +1,292 @@
<!doctype html><!-- This is a valid HTML5 document. -->
<!-- Screen readers, SEO, extensions and so on. -->
<html lang="fr">
<!-- Has to be within the first 1024 bytes, hence before the `title` element
See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
<meta charset="utf-8">
<!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
<!-- The viewport meta is quite crowded and we are responsible for that.
See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Required to make a valid HTML5 document. -->
<title>Keep it simple, stupid le plus longtemps possible (archive) — David Larlet</title>
<meta name="description" content="Publication mise en cache pour en conserver une trace.">
<!-- That good ol' feed, subscribe :). -->
<link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
<!-- Generated from https://realfavicongenerator.net/ such a mess. -->
<link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
<link rel="manifest" href="/static/david/icons2/site.webmanifest">
<link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
<link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
<meta name="msapplication-TileColor" content="#f7f7f7">
<meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
<meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
<!-- Documented, feel free to shoot an email. -->
<link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
<!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<script>
function toggleTheme(themeName) {
document.documentElement.classList.toggle(
'forced-dark',
themeName === 'dark'
)
document.documentElement.classList.toggle(
'forced-light',
themeName === 'light'
)
}
const selectedTheme = localStorage.getItem('theme')
if (selectedTheme !== 'undefined') {
toggleTheme(selectedTheme)
}
</script>

<meta name="robots" content="noindex, nofollow">
<meta content="origin-when-cross-origin" name="referrer">
<!-- Canonical URL for SEO purposes -->
<link rel="canonical" href="https://sklein.xyz/garden/020-keep-it-simple-stupid-le-plus-longtemps-possible/">

<body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">


<article>
<header>
<h1>Keep it simple, stupid le plus longtemps possible</h1>
</header>
<nav>
<p class="center">
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="https://sklein.xyz/garden/020-keep-it-simple-stupid-le-plus-longtemps-possible/" title="Lien vers le contenu original">Source originale</a>
</p>
</nav>
<hr>
<p>Depuis quelques années, j’utilise les mots suivants pour décrire mon mindset de développement :</p>
<blockquote>
<p>« Je suis au maximum le principe KISS (<a href="https://fr.wikipedia.org/wiki/Principe_KISS">Keep it simple, stupid</a>), j’écris le code le plus direct possible
et quand j’ai trop de “douleur” alors je refactor mon code et j’y ajoute le minimum de sophistication indispensable »</p>
</blockquote>

<p>Ici j’utilise le mot “douleur” dans le sens de <a href="https://hn.algolia.com/?dateRange=all&amp;page=0&amp;prefix=false&amp;query=pain%20point&amp;sort=byPopularity&amp;type=story">“a pain point”</a> en anglais : quelque chose de casse-pieds, pénibilité, grosse difficulté…</p>
<h2 id="partie-1-la-quete-du-code-parfait" tabindex="-1">Partie 1 : la quête du code “parfait” </h2>
<p>Pendant la plus grande première partie de ma vie de développeur, j’ai essayé d’écrire le code le plus “propre” possible.</p>
<p>Cela passait par :</p>
<ul>
<li>Découper le code en petites fonctions</li>
<li>Éviter toute duplication de code (mon plus grand combat était le <a href="https://en.wikipedia.org/wiki/Copy-and-paste_programming">copy-and-paste programming</a>, j’ai embêté beaucoup de monde avec cela)</li>
<li>Organiser le plus logiquement possible l’arborescence des dossiers</li>
<li>Créer le maximum de classes (programmation objet) avec le maximum de niveau d’héritage (à l’époque c’était cool de faire de l’héritage)</li>
<li>Utiliser les <a href="https://en.wikipedia.org/wiki/Design_Patterns">Design Patterns</a> (j’ai aussi creusé la <a href="https://fr.wikipedia.org/wiki/Programmation_orient%C3%A9e_aspect">programmation orientée aspect</a>…)</li>
<li><a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don’t repeat yourself</a></li>
<li>Découper mon projet en de petits projets ou librairies réutilisables</li>
<li>Multiplier le nombres de repositories (Git…)</li>
<li>Écrire du code pérenne dans le temps</li>
<li>J’essayais d’écrire tout de suite le code dans sa version finale, devoir intervenir à nouveau sur du code était pour moi un échec, la preuve d’un mauvais choix de design.</li>
</ul>
<p>En résumé, un beau code était pour moi un code “intelligent” avec beaucoup de sophistication.</p>
<h2 id="partie-2-la-prise-de-conscience-le-trop-de-tout" tabindex="-1">Partie 2 : la prise de conscience, le “trop de tout” </h2>
<p>Il y a un peu moins de dix ans, j’ai commencé à prendre le chemin inverse, quand j’ai réalisé que je passais mon temps à chercher le code “parfait”.</p>
<ul>
<li>je me suis rendu compte que je passais énormément de temps à découper mon code en petites fonctions, ce qui impliquait :
<ul>
<li>se creuser la tête pour trouver des noms à ces fonctions</li>
<li>de savoir où les placer, dans quels fichiers, dans quels sous dossiers, trouver des noms logiques à ces fichiers et ces dossiers</li>
<li>de réorganiser encore et encore le découpage, le naming au fur et à mesure de l’évolution de l’application</li>
</ul>
</li>
<li>je me suis rendu compte qu’à force d’éviter la duplication de code :
<ul>
<li>que j’avais un code de plus en plus difficile à comprendre</li>
<li>qu’il fallait énormément de temps pour une nouvelle personne pour intervenir sur mon code</li>
</ul>
</li>
<li>j’ai accepté (par expérience) que le code était jetable et que ce n’était pas un échec s’il avait été utile pendant une certaine durée</li>
</ul>
<p>Mon but était-il de faire du code ou de créer un produit rapidement tout en étant de qualité d’un point de vue fonctionnel ?</p>
<h3 id="quest-ce-qui-ma-aide-a-prendre-ce-recul" tabindex="-1">Qu’est-ce qui m’a aidé à prendre ce recul ? </h3>
<h4 id="des-echecs" tabindex="-1">Des échecs </h4>
<p>De 2007 à 2013 j’ai poursuivi la quête du <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don’t repeat yourself</a>, de <a href="https://fr.wikipedia.org/wiki/Pas_de_balle_en_argent">« la balle d’argent »</a> !</p>
<p>Influencé par <a href="https://fr.wikipedia.org/wiki/Ruby_on_Rails">Ruby On Rails</a>, <a href="https://fr.wikipedia.org/wiki/Django_(framework)">Django</a>,
mon rêve pour améliorer ma productivité était de générer automatiquement les applications à partir du modèle de données et des informations de paramétrages des UX.</p>
<p>Ce fut un échec, un <a href="https://github.com/stephane-klein/personnal-notebook/blob/master/003-ne-tonds-pas-de-yaks.md">Yak!</a> perpétuel !</p>
<p>Je passais la majorité de mon temps à :</p>
<ul>
<li>étudier, comprendre les Framework, sélectionner le “meilleur”</li>
<li>embrasser toujours plus de complexité en écrivant des extensions, des plugins pour traiter mes cas particuliers</li>
<li>modifier mes projets pour suivre la monté en version des frameworks</li>
<li>trouver des solutions pour contourner les bugs des frameworks</li>
</ul>
<p>Je me suis trouvé de plus en plus dans des situations où je passais par exemple plus d’une semaine pour modifier un cas particulier d’un simple champ select html,
chose qui m’aurait pris 30min sans framework, sans toutes les couches de magies.</p>
<p>À cela s’ajoute en équipe, les heures et les heures de <a href="https://fr.wikipedia.org/wiki/Troll_(Internet)">trolls</a> de choix de framework.<br>
Chaque développeur a ses préférences, pour tel ou tel framework et tout cela est parfaitement argumentable, car ils ont tous des forces et faiblesses.</p>
<p>C’est suite à cette expérience que j’ai très peur de bâtir une application sur des solutions comme <a href="https://github.com/marmelab/react-admin">React Admin</a>, <a href="https://www.forestadmin.com/">Forest Admin</a> si je sais que je vais devoir les adapter (solutions qui peuvent être très bien pour faire un <a href="https://fr.wikipedia.org/wiki/Preuve_de_concept">POC</a> ou un <a href="https://fr.wikipedia.org/wiki/Produit_minimum_viable">MVP</a>), j’ai très peur de tomber dans un énorme <a href="https://github.com/stephane-klein/personnal-notebook/blob/master/003-ne-tonds-pas-de-yaks.md">Yak!</a>.</p>
<h4 id="des-personnes" tabindex="-1">Des personnes </h4>
<p>Des rencontres, par exemples :</p>
<ul>
<li><a href="https://twitter.com/athoune">Mathieu Lecarme</a> qui m’a dit une fois « j’ai besoin d’intervenir sur …, je constate que c’est de l’horlogerie fine, j’ai besoin d’aide », je me suis dit que j’avais codé quelque chose de bien trop compliqué</li>
<li>Je me souviens de la quête vers le minimaliste dans le code de <a href="https://larlet.fr/david/blog/">David Larlet</a>
<ul>
<li>Est-ce qu’il est possible d’enlever des couches dans la stack ?</li>
</ul>
</li>
<li><a href="https://twitter.com/plafoucriere">Philippe Lafoucrière</a> qui m’a poussé vers du minimalisme, de grosse remise en question en contribuant au code source de Gemnasium
<ul>
<li>Est-ce que mon ORM me fait vraiment gagner du temps ?</li>
<li>Est-ce que je peux me passer de cette librairie ?</li>
</ul>
</li>
</ul>
<p>Ces deux dernières personnes m’ont poussé à réfléchir si je pouvais supprimer des couches, enlever des choses.</p>
<blockquote>
<p>Il semble que la perfection soit atteinte non quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien à retrancher. – <a href="https://fr.wikiquote.org/wiki/Perfection">Antoine de Saint-Exupéry</a></p>
</blockquote>
<h4 id="linfluence-culturelle-de-technos" tabindex="-1">L’influence culturelle de technos </h4>
<p>Depuis 15 ans, je suis très influencé par <a href="https://fr.wikipedia.org/wiki/Zen_de_Python">les 19 principes du Zen de Python</a>, tout particulièrement :</p>
<blockquote>
<ul>
<li>Préfère :
<ul>
<li>l’explicite à l’implicite,</li>
<li>le déroulé à l’imbriqué,</li>
</ul>
</li>
<li>Prends en compte la lisibilité.</li>
<li>Mais, à la pureté, privilégie l’aspect pratique.</li>
<li>Face à l’ambiguïté, à deviner ne te laisse pas aller.</li>
</ul>
</blockquote>
<p>Les choix minimalistes avec peu de sophistication du langage <a href="https://en.wikipedia.org/wiki/Go_(programming_language)">Go</a> a conforté la direction <a href="https://fr.wikipedia.org/wiki/Principe_KISS">KISS</a>.</p>
<h2 id="partie-3-prise-de-decision-le-code-direct-du-code-stupide" tabindex="-1">Partie 3 : prise de décision, le code direct, du code “stupide” </h2>
<p>Depuis quelques années, j’essaie d’écrire un code le plus direct possible.</p>
<p>Mon objectif : diminuer au maximum ma <a href="https://fr.wikipedia.org/wiki/Charge_cognitive">charge cognitive</a>.</p>
<p>J’essaie d’ajouter, une librairie, un service ou une couche d’abstraction uniquement si c’est nécessaire fonctionnellement ou si j’ai beaucoup de “douleur” avec la solution actuelle.</p>
<p>J’essaie de garder un code le plus flat possible (<a href="https://www.thepythoncorner.com/2017/12/the-art-of-avoiding-nested-code/">The art of avoiding nested code</a>, <a href="https://medium.com/@ankushchoubey/clean-code-1-flat-is-better-than-nested-leave-when-not-okay-c09ba74090ef">Flat is better than nested</a>, <a href="http://matthewrocklin.com/blog/work/2019/06/23/avoid-indirection">Avoid Indirection in Code for human readability</a>)</p>
<p>J’essaie de découper mon code uniquement si j’ai trop de “douleur” ou si cela apporte de la valeur fonctionnelle, exemple :</p>
<ul>
<li>je crée une fonction si j’ai besoin de la tester dans un test unitaire, ce qui fini par être le cas si j’ai trop de difficulté sur une section de code</li>
<li>je crée une fonction pour éviter de la duplication en suivant la règle <a href="https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)">« Rule of three »</a></li>
</ul>

<h2>Ressources</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it">YAGNI</a> (You aren’t gonna need it)</li>
<li><a href="https://en.wikipedia.org/wiki/Overengineering">Overengineering</a></li>
<li><a href="https://en.wikipedia.org/wiki/KISS_principle">KISS principle</a></li>
<li><a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don’t repeat yourself</a></li>
<li><a href="https://en.wikipedia.org/wiki/Duplicate_code">Duplicate code</a></li>
<li><a href="https://en.wikipedia.org/wiki/Code_reuse">Code reuse</a></li>
<li><a href="https://en.wikipedia.org/wiki/Database_normalization">Database normalization</a></li>
<li><a href="https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)">Rule of three (computer programming)</a></li>
<li><a href="https://en.wikipedia.org/wiki/Separation_of_concerns">Separation of concerns</a></li>
<li><a href="https://en.wikipedia.org/wiki/Single_source_of_truth">Single source of truth</a></li>
<li><a href="https://josebrowne.com/on-coding-ego-and-attention/">On Coding, Ego and Attention</a></li>
</ul>
</article>


<hr>

<footer>
<p>
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
</svg> Suivre</a> •
<a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
</svg> Pro</a> •
<a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
</svg> Email</a> •
<abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
</svg> Légal</abbr>
</p>
<template id="theme-selector">
<form>
<fieldset>
<legend><svg class="icon icon-brightness-contrast">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
</svg> Thème</legend>
<label>
<input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
</label>
<label>
<input type="radio" value="dark" name="chosen-color-scheme"> Foncé
</label>
<label>
<input type="radio" value="light" name="chosen-color-scheme"> Clair
</label>
</fieldset>
</form>
</template>
</footer>
<script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
<script>
function loadThemeForm(templateName) {
const themeSelectorTemplate = document.querySelector(templateName)
const form = themeSelectorTemplate.content.firstElementChild
themeSelectorTemplate.replaceWith(form)

form.addEventListener('change', (e) => {
const chosenColorScheme = e.target.value
localStorage.setItem('theme', chosenColorScheme)
toggleTheme(chosenColorScheme)
})

const selectedTheme = localStorage.getItem('theme')
if (selectedTheme && selectedTheme !== 'undefined') {
form.querySelector(`[value="${selectedTheme}"]`).checked = true
}
}

const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
window.addEventListener('load', () => {
let hasDarkRules = false
for (const styleSheet of Array.from(document.styleSheets)) {
let mediaRules = []
for (const cssRule of styleSheet.cssRules) {
if (cssRule.type !== CSSRule.MEDIA_RULE) {
continue
}
// WARNING: Safari does not have/supports `conditionText`.
if (cssRule.conditionText) {
if (cssRule.conditionText !== prefersColorSchemeDark) {
continue
}
} else {
if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
continue
}
}
mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
}

// WARNING: do not try to insert a Rule to a styleSheet you are
// currently iterating on, otherwise the browser will be stuck
// in a infinite loop…
for (const mediaRule of mediaRules) {
styleSheet.insertRule(mediaRule.cssText)
hasDarkRules = true
}
}
if (hasDarkRules) {
loadThemeForm('#theme-selector')
}
})
</script>
</body>
</html>

+ 125
- 0
cache/2023/646ebfa25432bc6b653e524b52d25c9a/index.md View File

@@ -0,0 +1,125 @@
title: Keep it simple, stupid le plus longtemps possible
url: https://sklein.xyz/garden/020-keep-it-simple-stupid-le-plus-longtemps-possible/
hash_url: 646ebfa25432bc6b653e524b52d25c9a

<p>Depuis quelques années, j’utilise les mots suivants pour décrire mon mindset de développement :</p>
<blockquote>
<p>« Je suis au maximum le principe KISS (<a href="https://fr.wikipedia.org/wiki/Principe_KISS">Keep it simple, stupid</a>), j’écris le code le plus direct possible
et quand j’ai trop de “douleur” alors je refactor mon code et j’y ajoute le minimum de sophistication indispensable »</p>
</blockquote>

<p>Ici j’utilise le mot “douleur” dans le sens de <a href="https://hn.algolia.com/?dateRange=all&amp;page=0&amp;prefix=false&amp;query=pain%20point&amp;sort=byPopularity&amp;type=story">“a pain point”</a> en anglais : quelque chose de casse-pieds, pénibilité, grosse difficulté…</p>
<h2 id="partie-1-la-quete-du-code-parfait" tabindex="-1">Partie 1 : la quête du code “parfait” </h2>
<p>Pendant la plus grande première partie de ma vie de développeur, j’ai essayé d’écrire le code le plus “propre” possible.</p>
<p>Cela passait par :</p>
<ul>
<li>Découper le code en petites fonctions</li>
<li>Éviter toute duplication de code (mon plus grand combat était le <a href="https://en.wikipedia.org/wiki/Copy-and-paste_programming">copy-and-paste programming</a>, j’ai embêté beaucoup de monde avec cela)</li>
<li>Organiser le plus logiquement possible l’arborescence des dossiers</li>
<li>Créer le maximum de classes (programmation objet) avec le maximum de niveau d’héritage (à l’époque c’était cool de faire de l’héritage)</li>
<li>Utiliser les <a href="https://en.wikipedia.org/wiki/Design_Patterns">Design Patterns</a> (j’ai aussi creusé la <a href="https://fr.wikipedia.org/wiki/Programmation_orient%C3%A9e_aspect">programmation orientée aspect</a>…)</li>
<li><a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don’t repeat yourself</a></li>
<li>Découper mon projet en de petits projets ou librairies réutilisables</li>
<li>Multiplier le nombres de repositories (Git…)</li>
<li>Écrire du code pérenne dans le temps</li>
<li>J’essayais d’écrire tout de suite le code dans sa version finale, devoir intervenir à nouveau sur du code était pour moi un échec, la preuve d’un mauvais choix de design.</li>
</ul>
<p>En résumé, un beau code était pour moi un code “intelligent” avec beaucoup de sophistication.</p>
<h2 id="partie-2-la-prise-de-conscience-le-trop-de-tout" tabindex="-1">Partie 2 : la prise de conscience, le “trop de tout” </h2>
<p>Il y a un peu moins de dix ans, j’ai commencé à prendre le chemin inverse, quand j’ai réalisé que je passais mon temps à chercher le code “parfait”.</p>
<ul>
<li>je me suis rendu compte que je passais énormément de temps à découper mon code en petites fonctions, ce qui impliquait :
<ul>
<li>se creuser la tête pour trouver des noms à ces fonctions</li>
<li>de savoir où les placer, dans quels fichiers, dans quels sous dossiers, trouver des noms logiques à ces fichiers et ces dossiers</li>
<li>de réorganiser encore et encore le découpage, le naming au fur et à mesure de l’évolution de l’application</li>
</ul>
</li>
<li>je me suis rendu compte qu’à force d’éviter la duplication de code :
<ul>
<li>que j’avais un code de plus en plus difficile à comprendre</li>
<li>qu’il fallait énormément de temps pour une nouvelle personne pour intervenir sur mon code</li>
</ul>
</li>
<li>j’ai accepté (par expérience) que le code était jetable et que ce n’était pas un échec s’il avait été utile pendant une certaine durée</li>
</ul>
<p>Mon but était-il de faire du code ou de créer un produit rapidement tout en étant de qualité d’un point de vue fonctionnel ?</p>
<h3 id="quest-ce-qui-ma-aide-a-prendre-ce-recul" tabindex="-1">Qu’est-ce qui m’a aidé à prendre ce recul ? </h3>
<h4 id="des-echecs" tabindex="-1">Des échecs </h4>
<p>De 2007 à 2013 j’ai poursuivi la quête du <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don’t repeat yourself</a>, de <a href="https://fr.wikipedia.org/wiki/Pas_de_balle_en_argent">« la balle d’argent »</a> !</p>
<p>Influencé par <a href="https://fr.wikipedia.org/wiki/Ruby_on_Rails">Ruby On Rails</a>, <a href="https://fr.wikipedia.org/wiki/Django_(framework)">Django</a>,
mon rêve pour améliorer ma productivité était de générer automatiquement les applications à partir du modèle de données et des informations de paramétrages des UX.</p>
<p>Ce fut un échec, un <a href="https://github.com/stephane-klein/personnal-notebook/blob/master/003-ne-tonds-pas-de-yaks.md">Yak!</a> perpétuel !</p>
<p>Je passais la majorité de mon temps à :</p>
<ul>
<li>étudier, comprendre les Framework, sélectionner le “meilleur”</li>
<li>embrasser toujours plus de complexité en écrivant des extensions, des plugins pour traiter mes cas particuliers</li>
<li>modifier mes projets pour suivre la monté en version des frameworks</li>
<li>trouver des solutions pour contourner les bugs des frameworks</li>
</ul>
<p>Je me suis trouvé de plus en plus dans des situations où je passais par exemple plus d’une semaine pour modifier un cas particulier d’un simple champ select html,
chose qui m’aurait pris 30min sans framework, sans toutes les couches de magies.</p>
<p>À cela s’ajoute en équipe, les heures et les heures de <a href="https://fr.wikipedia.org/wiki/Troll_(Internet)">trolls</a> de choix de framework.<br>
Chaque développeur a ses préférences, pour tel ou tel framework et tout cela est parfaitement argumentable, car ils ont tous des forces et faiblesses.</p>
<p>C’est suite à cette expérience que j’ai très peur de bâtir une application sur des solutions comme <a href="https://github.com/marmelab/react-admin">React Admin</a>, <a href="https://www.forestadmin.com/">Forest Admin</a> si je sais que je vais devoir les adapter (solutions qui peuvent être très bien pour faire un <a href="https://fr.wikipedia.org/wiki/Preuve_de_concept">POC</a> ou un <a href="https://fr.wikipedia.org/wiki/Produit_minimum_viable">MVP</a>), j’ai très peur de tomber dans un énorme <a href="https://github.com/stephane-klein/personnal-notebook/blob/master/003-ne-tonds-pas-de-yaks.md">Yak!</a>.</p>
<h4 id="des-personnes" tabindex="-1">Des personnes </h4>
<p>Des rencontres, par exemples :</p>
<ul>
<li><a href="https://twitter.com/athoune">Mathieu Lecarme</a> qui m’a dit une fois « j’ai besoin d’intervenir sur …, je constate que c’est de l’horlogerie fine, j’ai besoin d’aide », je me suis dit que j’avais codé quelque chose de bien trop compliqué</li>
<li>Je me souviens de la quête vers le minimaliste dans le code de <a href="https://larlet.fr/david/blog/">David Larlet</a>
<ul>
<li>Est-ce qu’il est possible d’enlever des couches dans la stack ?</li>
</ul>
</li>
<li><a href="https://twitter.com/plafoucriere">Philippe Lafoucrière</a> qui m’a poussé vers du minimalisme, de grosse remise en question en contribuant au code source de Gemnasium
<ul>
<li>Est-ce que mon ORM me fait vraiment gagner du temps ?</li>
<li>Est-ce que je peux me passer de cette librairie ?</li>
</ul>
</li>
</ul>
<p>Ces deux dernières personnes m’ont poussé à réfléchir si je pouvais supprimer des couches, enlever des choses.</p>
<blockquote>
<p>Il semble que la perfection soit atteinte non quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien à retrancher. – <a href="https://fr.wikiquote.org/wiki/Perfection">Antoine de Saint-Exupéry</a></p>
</blockquote>
<h4 id="linfluence-culturelle-de-technos" tabindex="-1">L’influence culturelle de technos </h4>
<p>Depuis 15 ans, je suis très influencé par <a href="https://fr.wikipedia.org/wiki/Zen_de_Python">les 19 principes du Zen de Python</a>, tout particulièrement :</p>
<blockquote>
<ul>
<li>Préfère :
<ul>
<li>l’explicite à l’implicite,</li>
<li>le déroulé à l’imbriqué,</li>
</ul>
</li>
<li>Prends en compte la lisibilité.</li>
<li>Mais, à la pureté, privilégie l’aspect pratique.</li>
<li>Face à l’ambiguïté, à deviner ne te laisse pas aller.</li>
</ul>
</blockquote>
<p>Les choix minimalistes avec peu de sophistication du langage <a href="https://en.wikipedia.org/wiki/Go_(programming_language)">Go</a> a conforté la direction <a href="https://fr.wikipedia.org/wiki/Principe_KISS">KISS</a>.</p>
<h2 id="partie-3-prise-de-decision-le-code-direct-du-code-stupide" tabindex="-1">Partie 3 : prise de décision, le code direct, du code “stupide” </h2>
<p>Depuis quelques années, j’essaie d’écrire un code le plus direct possible.</p>
<p>Mon objectif : diminuer au maximum ma <a href="https://fr.wikipedia.org/wiki/Charge_cognitive">charge cognitive</a>.</p>
<p>J’essaie d’ajouter, une librairie, un service ou une couche d’abstraction uniquement si c’est nécessaire fonctionnellement ou si j’ai beaucoup de “douleur” avec la solution actuelle.</p>
<p>J’essaie de garder un code le plus flat possible (<a href="https://www.thepythoncorner.com/2017/12/the-art-of-avoiding-nested-code/">The art of avoiding nested code</a>, <a href="https://medium.com/@ankushchoubey/clean-code-1-flat-is-better-than-nested-leave-when-not-okay-c09ba74090ef">Flat is better than nested</a>, <a href="http://matthewrocklin.com/blog/work/2019/06/23/avoid-indirection">Avoid Indirection in Code for human readability</a>)</p>
<p>J’essaie de découper mon code uniquement si j’ai trop de “douleur” ou si cela apporte de la valeur fonctionnelle, exemple :</p>
<ul>
<li>je crée une fonction si j’ai besoin de la tester dans un test unitaire, ce qui fini par être le cas si j’ai trop de difficulté sur une section de code</li>
<li>je crée une fonction pour éviter de la duplication en suivant la règle <a href="https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)">« Rule of three »</a></li>
</ul>

<h2>Ressources</h2>
<ul>
<li><a href="https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it">YAGNI</a> (You aren’t gonna need it)</li>
<li><a href="https://en.wikipedia.org/wiki/Overengineering">Overengineering</a></li>
<li><a href="https://en.wikipedia.org/wiki/KISS_principle">KISS principle</a></li>
<li><a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself">Don’t repeat yourself</a></li>
<li><a href="https://en.wikipedia.org/wiki/Duplicate_code">Duplicate code</a></li>
<li><a href="https://en.wikipedia.org/wiki/Code_reuse">Code reuse</a></li>
<li><a href="https://en.wikipedia.org/wiki/Database_normalization">Database normalization</a></li>
<li><a href="https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)">Rule of three (computer programming)</a></li>
<li><a href="https://en.wikipedia.org/wiki/Separation_of_concerns">Separation of concerns</a></li>
<li><a href="https://en.wikipedia.org/wiki/Single_source_of_truth">Single source of truth</a></li>
<li><a href="https://josebrowne.com/on-coding-ego-and-attention/">On Coding, Ego and Attention</a></li>
</ul>

+ 456
- 0
cache/2023/c564325b28ec854b6b098950df5c8c8f/index.html View File

@@ -0,0 +1,456 @@
<!doctype html><!-- This is a valid HTML5 document. -->
<!-- Screen readers, SEO, extensions and so on. -->
<html lang="fr">
<!-- Has to be within the first 1024 bytes, hence before the `title` element
See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
<meta charset="utf-8">
<!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
<!-- The viewport meta is quite crowded and we are responsible for that.
See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Required to make a valid HTML5 document. -->
<title>weathering software winter (archive) — David Larlet</title>
<meta name="description" content="Publication mise en cache pour en conserver une trace.">
<!-- That good ol' feed, subscribe :). -->
<link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
<!-- Generated from https://realfavicongenerator.net/ such a mess. -->
<link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
<link rel="manifest" href="/static/david/icons2/site.webmanifest">
<link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
<link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
<meta name="msapplication-TileColor" content="#f7f7f7">
<meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
<meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
<!-- Documented, feel free to shoot an email. -->
<link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
<!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
<script>
function toggleTheme(themeName) {
document.documentElement.classList.toggle(
'forced-dark',
themeName === 'dark'
)
document.documentElement.classList.toggle(
'forced-light',
themeName === 'light'
)
}
const selectedTheme = localStorage.getItem('theme')
if (selectedTheme !== 'undefined') {
toggleTheme(selectedTheme)
}
</script>

<meta name="robots" content="noindex, nofollow">
<meta content="origin-when-cross-origin" name="referrer">
<!-- Canonical URL for SEO purposes -->
<link rel="canonical" href="https://100r.co/site/weathering_software_winter.html">

<body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">


<article>
<header>
<h1>weathering software winter</h1>
</header>
<nav>
<p class="center">
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="https://100r.co/site/weathering_software_winter.html" title="Lien vers le contenu original">Source originale</a>
</p>
</nav>
<hr>
<p><img src="https://100r.co/media/content/blog/wsw_01.jpg" loading="lazy"></p>
<p>This is a blog post based on a transcript of a talk Devine gave at <a href="handmade-seattle.com/" target="_blank">Handmade Seattle</a> on November 26th 2022. Watch the <a href="https://youtu.be/9TJuOwy4aGA" target="_blank">video version</a>. The slideshow presentation was made using <a href="adelie.html" class="local">adelie</a>.</p>

<p>Thank you to Matt Mascarenhas for providing us with an auto-transcript, it would have taken us ages to put this text together without it, and thank you to Abner Coimbre for organizing this amazing event.</p>

<h3>Weathering Software Winter</h3>

<p>I work with a little studio called Hundred Rabbits, it is a small collective of two which operates from a small solar-powered sailboat. All of our devices are donated, discarded devices. Our <a href="philosophy.html" class="local">philosophy</a> is that to make fast software, you need slow computers, and we've tried to espouse this as much as we could. We spend our time sailing around, and doing experiments with resilience, that covers computers, but we also touch on food security, preservation, and on studying past technologies that could be used today in times of crisis.</p>

<p><img src="https://100r.co/media/content/blog/wsw_04.jpg" loading="lazy"></p>
<p>We started sailing seven years ago, it took us all around the Pacific. We went through <a href="mexico.html" class="local">mexico</a>, <a href="french_polynesia.html" class="local">french polynesia</a>, <a href="new_zealand.html" class="local">new zealand</a>, up through <a href="fiji.html" class="local">fiji</a>, <a href="japan.html" class="local">japan</a>, and then followed the Russian Coast, brushing by Alaska before returning to <a href="western_canada.html" class="local">western canada</a>. Our thinking was that we could keep doing art, music, and video games as we sailed around, but it soon became obvious that all the technology that we took for granted, and that we had with us, was not designed to leave the Western world.</p>

<p>The moment we cast off from Mexico, all of our devices started breaking down. In his 2022 Handmade Seattle opening speech, Abner was making a point about the Roombas starting to fail. If your Roomba fails, you pick up a broom, but on a sailboat you depend on devices working to find your position, knowing the weather, etc. These things have a more direct impact on your survival, and all of that technology is built on the same stack as the Roomba.</p>

<p><img src="https://100r.co/media/content/blog/wsw_05.jpg" loading="lazy"></p>
<p>Many of the tools that we thought we could rely on broke down, whether it is Apple products, or software that require subscription services, DRM, etc. As an artist you spend time developping a skill, you become a Photoshop illustrator. When your connection to the internet fails and that the software locks up, that skill that you thought was yours was actually entirely owned by someone, and can be taken away.</p>

<p>Even though we've been paying for this sort of software for years, the moment that you can't have access to authenticate yourself that skill is gone. We didn't expect this, it scared us.</p>

<p><img src="https://100r.co/media/content/blog/wsw_06.jpg" loading="lazy"></p>
<p>Nowadays, everything is built on the cloud. While sailing along the US coast in early 2016, we'd stop by conferences to see all the happenings in tech. We would speak with people at the booths, and they would try and sell us their product, but we'd have to stop them mid-sentence to ask, "Does it work offline?" 99% of times people say, "ah, yeah no, sorry. It's on the cloud."</p>
<p>

</p>
<p>It seemed that no one was building things that we could use. This was a sad realization. I love programming, and for a time it seemed that it was utterly incompatible with our new way of life.</p>

<p>Before I go on any further, I will paint you a picture of what it looks like to try to use modern stacks when away from the shores of the Western world.</p>

<p>Imagine two people in a small sailboat in the tropics, somewhere like the Marquesas, or another island in the South Pacific Ocean. These islands are covered with beautiful lush forests, they require rain and sun, that's all, then there's us sharing that same space, busy lifting a smartphone in a Ziploc bag up the mast to try and get one bar of signal to update Xcode, which at the time was 11 gigs. We had a stack of cards, each worth two gigabytes of mobile data, but with Xcode you can't resume the download if it fails. We could swap the codes for the cards, and if we did it within 10 seconds it would detect a timeout and would continue. The problem is that if the download is not done by 1600, then the sun is setting, the solar panels aren't charging the batteries anymore, and our laptops are dying. The download is at 7 gigs with three more hours left to download the update, it won't finish, and we will have spent all that data for nothing.</p>

<p>This wasn't ideal. We tried to look for alternatives...</p>

<p><img src="https://100r.co/media/content/blog/wsw_07.jpg" loading="lazy"></p>
<p>We noticed that all the software that we had written in the past was gradually becoming unusable. We grew up in Montreal, and many of our friends worked in AAA studios like Ubisoft, making free-to-play games, building projects that had a lifespan of three years. The projects that we made in the past on the Apple stack, Electron, or on Unity3D, also had a lifespan of three to four years, but games like Super Mario, as well as others produced in that era, are still playable today. We are in a dark age, where game developers and artists spend years building games that quickly become lost <a href="http://wiki.xxiivv.com/site/stack.html" target="_blank">bitrot</a>. We'll never be able to play Scott Pilgrim on the PlayStation again.</p>

<p>Looking online, it seemed that others shared these concerns.</p>

<p>In the above image are four philosophies of digital data preservation, they all have their flaws. Data preservation is a somewhat new field, we don't know what sort of data we'll be able to recover in a hundred years, but from the experiments that we've looked at, it doesn't look good. The BBC had a project where they were trying to mimic one of their longest lasting books, the <a href="https://en.wikipedia.org/wiki/Domesday_Book" target="_blank">Domesday book</a>. It was written by monks a few hundred years ago. The BBC's thinking was that we still have this book today, we can still read it, do we have technology to make something like this? Is it possible to record our way of life today, so that people in a thousand years can see how we lived? They created the <a href="https://en.wikipedia.org/wiki/BBC_Domesday_Project" target="_blank">BBC Domesday</a>, a disc that contained music, movies, and scientific papers. Then 10 years later, it was an unreadable, people forgot how to decrypt and decompile the disc. It seemed that there was no real way to preserve data long-term, and so we decided to try our own little experiment.</p>

<p>As a disclaimer, all that I am writing now is very naive. I draw, and I make music, when I started doing research I didn't have the vocabulary to find what I was looking for. I didn't know what virtual machines were, I didn't know what compilers were either. I had a vague idea of what programming was. I had written Swift and Objective C, but had no conception of how it actually tied to processors. It seemed like I was learning a service, the same way I was learning "To Photoshop". It wasn't like learning a skill, you don't learn to draw when you use Photoshop, you learn how to operate within the confines of someone else's playground, and when that rug is pulled from underneath you, there's nothing you can say or do, and you never really understood how it worked in the first place so you can't really replicate it.</p>

<p><img src="https://100r.co/media/content/blog/wsw_08.jpg" loading="lazy"></p>
<p>We eventually stumbled on the words <b>virtual machine</b>. With a Super Mario brother NES file, I knew I could put it on a computer and I could run it, I could run it on my phone, I could run it on an old computer, I could run it on a Super Nintendo, I could also run a Super Nintendo emulator running Mario on a Nintendo 64. This seemed a good way of preserving data. We decided to not give up entirely on software, and to see what could be done in that space using virtual machines.</p>

<p><img src="https://100r.co/media/content/blog/wsw_09.jpg" loading="lazy"></p>
<p>Hardware is extremely cheap, and because it is it's covering the world with e-waste, and all of it is there for the taking. Everyone has drawers full of old devices, Super Nintendos, Playstations, Dreamcasts, all of which are considered obsolete, people stopped developing games for them, but we thought we could give a second life to such devices. When looking into how this could be done, it led us to interesting places. We became interested in seeing how we could repurpose old electronics. There didn't seem to be any competition. If you do like everyone else, you're competing with everyone else. For example, if making iOS 10 software the marketplace is completely saturated, but if you're going be release an Atari game today, it's going to be huge. There's no one giving purpose to these devices anymore. We tried to do something completely left field. To start, our goal was to try and make games for the NintendoDS.</p>

<p><img src="https://100r.co/media/content/blog/wsw_10.jpg" loading="lazy"></p>
<p>So looking at a VM from the outside, without having a sort of academic background, the first thing you find is the <a href="https://en.wikipedia.org/wiki/Java_virtual_machine" target="_blank">JVM</a>. I've never written any Java, but I would go around and tell my friends who are actual programmers, "I'm gonna make the JVM! It seems like this would solve our problem!" Their response was that the JVM was so fractalized, and that this wasn't what we were looking for. We found plenty of academic papers with no software written for them.</p>

<p><img src="https://100r.co/media/content/blog/wsw_11.jpg" loading="lazy"></p>
<p>I dabbled into the Java ecosystem, and I couldn't make heads or tails of it</p>

<p><img src="https://100r.co/media/content/blog/wsw_12.jpg" loading="lazy"></p>
<p>I knew that we wanted to make playful little projects that could run on a variety of devices, on a sort of cross platform that was not Electron. Instead of always targeting the new modern thing, we thought we could make a VM, or something other, that could run increasingly further back into the past.</p>

<p>There is an incredible amount of fast computers out there. The first time <a href="donsol.html">I made an NES game</a>, I was surprised at how much stuff I could draw on the screen at 60 fps. I had somehow been convinced that modern technology was better, faster, and all the eight bit stuff had been solved problems, I thought that we had explored this problem space entirely.</p>

<p><img src="https://100r.co/media/content/blog/wsw_13.jpg" loading="lazy"></p>
<p>It didn't seem to be the case. There were a lot of ideas in the past that were forgotten, and I made it my mission to explore this. It was COVID, everyone was confined to their homes, it was the perfect time to figure out how computers work. We're going to look into the past to see how people did it, and what ideas were forgotten.</p>

<p><img src="https://100r.co/media/content/blog/wsw_14.jpg" loading="lazy"></p>
<p>There was a time when computers were super playful, but now they feel cold, and have been weaponized against people. The sort of playfulness that you'd find in <a href="https://en.wikipedia.org/wiki/Microsoft_Bob" target="_blank">Microsoft Bob</a>, I can't really find a parallel for today. I can imagine what Microsoft Bob would look like if made today, it would try to sell you all sorts of shit. I don't think we, as a society, have a system in place that would foster the creation of something as playful as this.</p>

<p><img src="https://100r.co/media/content/blog/wsw_15.jpg" loading="lazy"></p>
<p>A realization that I had working on something like this was that customizing your hardware, and your software, makes you care.</p>

<p>If you buy something off the shelf, like an iPhone, which you can't change, you're less likely to care for it, and it's going to end up in a drawer. Back then you could go to Radio Shack and get parts for your computer, it was possible to customize it (for example, the <a href="https://en.wikipedia.org/wiki/Altair_8800" target="_blank">Altair</a>), and then you could know it in its entirety. Devices that were customized, or built from near-scratch, are still loved, but as for your old iPhone6, you don't know where it is, and even if you did it's probably unusable. Devices like the iPhone6 can't be repaired, they are designed to fail in ways that are inscrutable.</p>

<p><img src="https://100r.co/media/content/blog/wsw_16.jpg" loading="lazy"></p>
<p>Instead of trying to make things as broadly accessible as possible, we thought we'd try to see what we could do if we designed it for just one person, a sort of personal computing that was not designed to scale.</p>
<p>

</p>
<p>I can see the appeal of languages like Rust, I won't be learning it, but if you're convinced that you can use computers to solve problems, then obviously this will not be relevant to you. I think that if you are forced to use a computer, there is no way that it can be playful. There was a writer who said, "if you're forced to play, you can't play."</p>

<p>I don't have a smartphone. Walking in Seattle I saw the streets lined with lime scooters everywhere, to see the menu to be allowed to use a scooter you need to scan a QR code. There's a layer of reality that's being forced onto people to use technology.</p>

<p>This is not what I'm talking about here. What we're trying to do is something that is closer to your personal computer, something that would be designed and tailored to help you play.</p>

<p><img src="https://100r.co/media/content/blog/wsw_17.jpg" loading="lazy"></p>
<p>When we began looking at what VMs there were, we looked into the past, and that brought us to <a href="https://en.wikipedia.org/wiki/Smalltalk" target="_blank">Smalltalk</a>. I read this book called What the <a href="https://en.wikipedia.org/wiki/What_the_Dormouse_Said" target="_blank">Dormouse Said</a>, and it talked about the history of Stanford, and how people had this utopian idea of what computers could be. This is way before I even became interested in computers, learning what their vision was then made me optimistic about what could be done.</p>

<p>That was when I was first exposed to the idea of a virtual machine, or byte code. As I mentioned before, looking up information online without the vocabulary you need to find things is really difficult. There was no way I could go around learning about personal computing without spending some time learning Smalltalk.</p>

<p><img src="https://100r.co/media/content/blog/wsw_18.jpg" loading="lazy"></p>
<p>Obviously, the moment that you start going that down that route, you will have people telling you that you really have to try <a href="https://en.wikipedia.org/wiki/Lisp_machine" target="_blank">Lisp machines</a>. I spent time learning about Symbolics and LVP. I learned about a sort of system where the whole thing could be inspected, a system that was trying to do computing in a very personal way.</p>

<p>Nowadays, it's akin to the browser, where you can go on a website that you like, and right click to inspect. It is less and less the case now, but for a while you could inspect websites to see how it was put together. This was empowering, emblematic of the era.</p>

<p><img src="https://100r.co/media/content/blog/wsw_19.jpg" loading="lazy"></p>
<p>This doesn't work on a VM at all, but it's relevant because <b>Niklaus Wirth</b>, who wrote <a href="https://en.wikipedia.org/wiki/Oberon_(operating_system)" target="_blank">Oberon</a>, wrote an entire operating system that came with a book.</p>

<p>The Oberon book is really nice, especially if you come into it with a clear mind, without prior knowledge or expectation of what programming is. The book explains how to build an operating system from scratch. It uses a language like <a href="https://en.wikipedia.org/wiki/Pascal_(programming_language)" target="_blank">Pascal</a>, which is very easy to read, more beautiful than other <a href="https://en.wikipedia.org/wiki/ALGOL" target="_blank">ALGOL languages</a>. One of the first things that it teaches you to do is how to draw pictures, which I thought was kind of interesting as someone who's very visually-inclined.</p>

<p><img src="https://100r.co/media/content/blog/wsw_20.jpg" loading="lazy"></p>
<p>In the book Niklaus Wirth mentions the <a href="https://en.wikipedia.org/wiki/P-code_machine" target="_blank">P-machine</a>. I was beginning to form an idea of what virtual machines were, and he just briefly mentions it, "oh! By the way, I wrote this Pascal compiler targeting a virtual machine." I was like, "a language can target a virtual machine?! What?" And the reason why it was so easy for him to port the compiler between platforms, is that the opcodes running it were extremely simple, and very few in number.</p>

<p>I thought then, <b>this</b> is a way to do data preservation that is appealing to me.</p>

<p><img src="https://100r.co/media/content/blog/wsw_21.jpg" loading="lazy"></p>
<p>I learned Pascal.</p>

<p>Pascal is a beautiful language. In the above image, I am running it in an emulator for the Macintosh. I loved that I could have a whole operating system running in a small window that wasn't Linux, that wasn't some big <a href="https://en.wikipedia.org/wiki/QEMU" target="_blank">QEMU image</a>. It was a little self-contained system, which I could destroy, or start over with really quickly. I could run it and do 3D at 60 fps by running the emulator at 128 times its speed, and thought that was cool, a testament to how fast computers are nowadays.</p>

<p><img src="https://100r.co/media/content/blog/wsw_22.jpg" loading="lazy"></p>
<p>That led me to learn about the history of C.</p>

<p>I migrated all my platform to <a href="https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs" target="_blank">Plan 9</a>. Plan 9 has its own C compiler, and it's not quite C89, it's its own thing, a no-concessions system.</p>

<p>The people who built this weren't planning to make money with it, you can really tell that it's a product of love. That made me optimistic about what personal computing could be.</p>

<p><img src="https://100r.co/media/content/blog/wsw_24.jpg" loading="lazy"></p>
<p>Plan 9 didn't run on a VM, but it inspired another system. The lessons that they learned during Plan 9 led to the building of something called <a href="https://en.wikipedia.org/wiki/Inferno_(operating_system)" target="_blank">Inferno</a>, which runs on a VM.</p>

<p>I think I was starting to understand what VMs were. If this entire operating system runs on a vm, this is what I wanna be doing.</p>

<p><img src="https://100r.co/media/content/blog/wsw_25.jpg" loading="lazy"></p>
<p>The scale of something like Inferno is quite big, but in an afternoon I could run through the whole C code for this virtual machine. The above (image) is the opcodes that it had.</p>

<p><img src="https://100r.co/media/content/blog/wsw_26.jpg" loading="lazy"></p>
<p>It was in part inspired from the actual hardware that ran the <a href="https://en.wikipedia.org/wiki/Apple_Newton" target="_blank">Apple Newton</a>.</p>

<p>I could run it in an afternoon, and know exactly how it ran. I would look at the compiler that targeted the Dis virtual machine, and could see how they reduced the problem-space to a limited number of operations.</p>

<p><img src="https://100r.co/media/content/blog/wsw_27.jpg" loading="lazy"></p>
<p>The people who worked really hard in the past to get away from time-sharing system would laugh, or they would cry, at how we got tricked into falling back in that situation where computers were something that was done behind a wall. You have a terminal, but that's where your power ends.</p>
<p>

<img src="https://100r.co/media/content/blog/wsw_28.jpg" loading="lazy">

</p>
<p>I wanted a way of doing computers that nobody could take away from me.</p>

<p>I would read people who would write entire operating system on a weekend, but I couldn't even map this idea onto things I was seeing, a bridge was missing.</p>

<p><img src="https://100r.co/media/content/blog/wsw_29.jpg" loading="lazy"></p>
<p>The modern stack doesn't really work for us, it doesn't apply to the limitations that we have on the boat. We have 180 watts of solar. We just spent the whole summer with two 6-volt batteries, which is very small. When you're going down that route, at every turn people are telling to just put more solar panels, or to buy more batteries. That is such a modern way of solving your problem. In reality, technology like this(especially high-tech) rarely solves problems. It creates a lot of other problems, which on a sailboat is very immediate. Putting more solar would mean more windage, more chance of things flying off and cutting our limbs. More batteries would mean the boat would be heavier, it would stop us from being able to run away from storms.</p>

<p>The limits of a sailboat gives us a space for creativity, and these limitations became a sort of playground for us.</p>

<p>I am not the sort of programmer who could build Plan 9, or Oberon, or Lisp machines, but I knew I could write simple NES games and port them. I couldn't write an NES game inside an NES game, and that was such a shame. I wanted something that was completely bootstrapped.</p>

<p><img src="https://100r.co/media/content/blog/wsw_30.jpg" loading="lazy"></p>
<p> So after looking at 6502, the <a href="https://en.wikipedia.org/wiki/Commodore_64" target="_blank">Commodore 64</a> emulator was extremely complex, more complex than I could grasp. It was the limit of what I think a single person could understand. It seemed like a simple system, it was just a box, but writing an emulator for it was more than a weekend project. I was looking for something that I could nail in a single weekend.</p>

<p><img src="https://100r.co/media/content/blog/wsw_31.jpg" loading="lazy"></p>
<p>6502 has a lot of mnemonics. When trying to implement the 6502 as a VM, it is possible to make a naive implementation in a week, or in a weekend if you don't do anything else. My knowledge of C is very limited, but luckily I had help. I wondered if this instruction set could be reduced further...</p>

<p><img src="https://100r.co/media/content/blog/wsw_32.jpg" loading="lazy"></p>
<p>It got me thinking about complexity, and on what simplicity means. <a href="https://en.wikipedia.org/wiki/Andrey_Kolmogorov" target="_blank">Kolmogorov</a>, the mathematician, said that the index of complexity of any one system is the length of the program that could generate a specific string. I really like that way of looking at complexity and simplicity, because nowadays it's sort of convoluted. If you don't really know about hardware, it seems that everyone's trying to make the programmer comfortable, and not focusing on making an actual fast product.</p>

<p>Most of the people I know who are hobbyist programmers use type systems, memory safety, all sorts of <i>training wheels</i>(I'm kidding here, if you're a large team, please do use type systems for god's sake). When I work on my own, I want to reduce the problem space to as little a thing as I can make it. I don't like programming that much, and in the future I'm gonna hate it probably even more, so I want my future self to be able to reimplement my entire system at most in a weekend.</p>

<p><img src="https://100r.co/media/content/blog/wsw_33.jpg" loading="lazy"></p>
<p>So where does that bring me? 6502 is beyond the scope of what I was hoping to do, because having done it twice already, I don't think I'll have it in me to do it again.</p>

<p><img src="https://100r.co/media/content/blog/wsw_34.jpg" loading="lazy"></p>
<p>Looking back at that same era with <a href="https://en.wikipedia.org/wiki/Bell_Labs" target="_blank">Bell Labs</a>, this was a time when people would build paper computers to teach kids to understand what a program counter was, how things moved around in the program, and how to navigate byte code.</p>

<p>No one can take a paper computer away from you. As long as you have paper and pen you can still solve problems, albeit slowly, and more painfully, but this is a form of computing that can be easily ported.</p>

<p><img src="https://100r.co/media/content/blog/wsw_35.jpg" loading="lazy"></p>
<p>When I was looking at the BBC's Domesday book, I noticed that Alan Kay(Small Talk) also had a project that was in line with what I was trying to do. He thought, "Smalltalk is a vm, how much of a small VM can possibly run smalltalk-72."</p>

<p>He wrote a paper called <a href="https://dl.acm.org/doi/10.1145/2814228.2814250" target="_blank">The Cuneiform Tablets of 2015</a>, he had all these words to talk about computers that went viral. He said things like, "Lisp was the Maxwell equation of programming." As a minimalist geek I was glad to hear this, it's what I wanted, but then looking into Lisp, I thought that a language that creates garbage by design wasn't really what I was looking for. This was a bit more like it, but it was a register machine, and I didn't see how that mapped to Smalltalk.</p>

<p><img src="https://100r.co/media/content/blog/wsw_36.jpg" loading="lazy"></p>
<p>So <a href="https://sr.ht/~bctnry/chifir/" target="_blank">ChifirVM</a> is not exactly what I'm looking for, but there are plenty of other ways of doing computing out there. Instantly, I fell onto one-instruction set computers, like <a href="https://wiki.xxiivv.com/site/subleq.html">SUBLEQ</a>. I thought it was a disgusting tar pit, but I could implement it in 15 minutes, and I would be really kind for my future self to make a system that could run on something that I could implement in 15 minutes.</p>

<p>The problem was that the toolchain required to write things that could actually have any purpose for it was immense. There were people who wrote C compilers down to Subleq, but this shifts the whole complexity back to the compiler, and that doesn't solve my problem. </p>

<p>There were computing paradigms which I absolutely loved, so pure, so beautiful, but at the same time they mapped so poorly to silicone that they didn't really work for me.</p>

<p><img src="https://100r.co/media/content/blog/wsw_37.jpg" loading="lazy"></p>
<p><a href="http://wiki.xxiivv.com/site/thue.html" target="_blank">Thue</a>(one of my favorites) is an esoteric programming language that has one operator, and only has a replacement rule. So you have an accumulator, which is a series of characters, and every rule, one for every line, is a replacement of what's on the left with what's on the right. It was very slow, but extremely powerful, and could be implemented in 30 minutes.</p>

<p><img src="https://100r.co/media/content/blog/wsw_38.jpg" loading="lazy"></p>
<p><a href="http://wiki.xxiivv.com/site/fractran.html" target="_blank">FRACTRAN</a> was another OISC system. It has one operation: multiply. Its primitives were not bytes, or shorts, but fractions. It used prime encoding, which was one of the most beautiful mathematical concept that I knew of.</p>

<p>For a while I thought I had found my bedrock, I was going to use fractions to make computers. The only issue... is that it maps poorly to silicone.</p>

<p><img src="https://100r.co/media/content/blog/wsw_39.jpg" loading="lazy"></p>
<p><a href="http://wiki.xxiivv.com/site/logic.html" target="_blank">SKI calculus</a> was beautiful, it has this mathematical elegance to it. I went down that rabbit hole, and I barely emerged back alive.</p>

<p>I recommend everyone to take a Lisp detour, and then learn SKI, to read Smullyan, and to read about others like him who don't care about making products, but really want to explore software in a way that is very creative and artistic. I almost made this my bedrock, except that at the VM layer garbage collection was a bad idea.</p>

<p><img src="https://100r.co/media/content/blog/wsw_41.jpg" loading="lazy"></p>
<p><a href="http://wiki.xxiivv.com/site/brainfuck.html" target="_blank">Brainfuck</a> has 7 instructions, implementing it would take 45 minutes, maybe an hour.</p>

<p>We are going up the abstraction chain here, and the pattern I was seeing was that the lesser a mnemonic or complexity that you reduced it to, the slower it got. Brainfuck was surprisingly fast, you could run a mandelbrot on a system that was quite small to implement, but that wasn't the sort of programming I wanted to do. It led me to another system...</p>

<p><a href="https://en.wikipedia.org/wiki/Charles_H._Moore" target="_blank">Chuck Moore</a> never came up in my books about Stanford, he must have been some sort of outsider. FPGA is not something I was very quite familiar with, but people were trying experimental computing systems with them. It didn't matter, it was goo, you could shape it in any way you wanted.</p>

<p><img src="https://100r.co/media/content/blog/wsw_40.jpg" loading="lazy"></p>
<p>Someone wrote an FPGA system called <a href="https://excamera.com/files/j1.pdf" target="_blank">J1</a>, a <a href="https://en.wikipedia.org/wiki/Forth_(programming_language)" target="_blank">Forth system</a>. It had very few opcodes, but had one of the most beautiful mapping of byte code I had ever seen. The Stack Machine primitives were implemented so you could combine them with each other, with weird combinations of bit toggles on a byte you could have really interesting esoteric stack manipulators.</p>

<p>I was smitten.</p>

<p>It's a 16-bit Forth system, the biggest literal you can have in one of those words would be like 35k fixed. The arithmetic was really beautiful, but the whole system's maximum program that it could run was four kilobytes.</p>

<p><img src="https://100r.co/media/content/blog/wsw_42.jpg" loading="lazy"></p>
<p>What I had in mind was slightly <b>more</b> than four kilobytes, but not much more. If I could have a full addressable, 64 would be really nice. I didn't want the complexity of the 6502.</p>

<p><img src="https://100r.co/media/content/blog/wsw_43.jpg" loading="lazy"></p>
<p>The <a href="http://wiki.xxiivv.com/site/chip8.html" target="_blank">CHIP-8</a> is an interesting system that has a rich, vibrant community of people who build things for it during game jams.</p>

<p>The spec is quite simple, it fits on maybe two pages of paper, side by side. It feels like the paper computer in ways that I like, but it was not designed to be a general purpose driving vm. It is meant to be building things in the scale of Pong. The keyboard is like a hex keyboard with just numbers on it. My plan was to build something that could build itself in it, so I'd need a keyboard, a cursor-a weird keyboard for me would not cut it.</p>

<p><img src="https://100r.co/media/content/blog/wsw_44.jpg" loading="lazy"></p>
<p><a href="https://wiki.c2.com/?MachineForth" target="_blank">Machine Forth</a> was something I stumbled upon after. Chuck Moore wrote Forth, and then he thought it too complicated. I thought, "what do you mean it's complicated? There's like no syntax, no nothing. It's space-divided language. Implementing a Forth system is really fast." Chuck More, being himself, thought that he could do without all this 'cruft'. He reduced even further to Machine Forth which has 32, or 24 opcodes.</p>

<p>I kept seeing Forth over and over again, and couldn't really grasp, or see the beauty in it for a while. If you've just come from Lisp, you have whiplash when you fall into Forth. It has similar beauty. Lisp would be prefix, Forth would be <a href="http://wiki.xxiivv.com/site/notation.html" target="_blank">postfix</a>. Following that mindset you think you could be anyone, or you could do anything, and you chose to be Algol, why?</p>

<p>Going back and forth between Forth and Lisp, I couldn't make up my mind, but I kept seeing people who would fall in love with Forth, but were really bad at selling it. With Lisp it's really hard to find any Lisp code that you can actually copy/paste in a project because everyone's using weird macros, and libraries, and nothing is portable.</p>

<p>Forth had a different problem, everyone I'd talk to would say Forth was the best, and that I should really use it, but then I'd ask them questions like, "how do I calculate the distance between two points?" I walked away from that interaction thinking, well, it seems like a lot of people like Forth, but don't write it. It was hard to find any code at all. I know Forth is not portable, but it was hard to find just actual use-case of Forth that wasn't someone trying to learn Forth by implementing Forth and then moving on back to Rust.</p>

<p><img src="https://100r.co/media/content/blog/wsw_46.jpg" loading="lazy"></p>
<p>The way Forth works is really simple, you put stuff on a stack, it hits a token, pulls the item from the stack, etc. It doesn't have precedence rules.</p>

<p>It seemed like a really good bedrock for the things I wanted to do.</p>

<p><img src="https://100r.co/media/content/blog/wsw_47.jpg" loading="lazy"></p>
<p>Machine Forth was something that was going to be something close to the metal, Forth at its core is something pretty close to Assembly, but I wanted something that mapped exactly to Assembly, something that would be like, 'one token would be one byte, or one short'. </p>

<p><img src="https://100r.co/media/content/blog/wsw_48.jpg" loading="lazy"></p>
<p>So after a while I picked a bunch of opcodes, and I'd shown them to my friends, and they were like, "these are bad." They were people I trust. If I'd been on my own, I would have likely given up and not done it, or would be writing JavaScript still. They were extremely patient with me, they understood what I was trying to do. People like Sigrid, Alderwick, and Andrew had infinite patience for my stupid questions, they would tell me, "I wouldn't do it this way, but here's something that you could use to improve your system."</p>

<p>In the end, I ended up with this napkin definition of a system that I kind of liked. My goal throughout this whole process was to make a system that could fit on a t-shirt. I might lose my computer, especially on a sailboat, but I don't want to keep preserving all the documentation.</p>

<p>When I started sailing I was doing a bit of Ruby, when came time to gather all the Ruby documentation that I would need to be self-sufficient, the amount was overwhelming.</p>

<p>Being at sea for 50 days straight we don't have access to StackOverflow, our questions remain unanswered, now imagine if the site was gone forever tomorrow. At sea, without internet, if I wanted to look up how to fill a polygon, I couldn't do it, but if I had printed it? There are languages that make this more accessible, and others that make it really hard. Not having a background in C, I found it really difficult to go off sailing without my C documentation, but it is very extensive, and very clunky.</p>

<p>My thinking is that I'm probably going to lose the book at some point in the future, but if my future self had that t-shirt they'd probably be okay. I tried to reduce everything that I could do to fit onto a t-shirt, that's as much as I afforded in bandwidth.</p>

<p><img src="https://100r.co/media/content/blog/wsw_49.jpg" loading="lazy"></p>
<p>If you're familiar with 6502 on the left (above image), it just looks like this vertical series of instructions. The little language I made is quite similar. You can map it one to one, and the resulting size of byte code is pretty much the same.</p>

<p><img src="https://100r.co/media/content/blog/wsw_50.jpg" loading="lazy"></p>
<p>You might be familiar with this sort of Assembly language, reading as a big vertical column of characters, but I wanted to use the beauty of Forth and make a language that would be verbose in ways that it resembled writing a little bit.</p>

<p>Every morning when I wake up, and I open my programs, I don't hate myself for not leaving comments because the code itself is a bit more readable and self-documenting.</p>

<p><img src="https://100r.co/media/content/blog/wsw_51.jpg" loading="lazy"></p>
<p>The first thing I tried to do was to make an assembler in that language. It was easy. The language is so simple that the assembler itself is also going to be simple. I generated a X86 application of the VM that could run its own assembler in that language.</p>

<p>The assembler is <a href="https://git.sr.ht/~rabbits/drifblim/" target="_blank">3000 bytes</a>.</p>

<p><img src="https://100r.co/media/content/blog/wsw_52.jpg" loading="lazy"></p>
<p>It's nothing like a computer, but it will run bytecode. I felt like I had reduced the problems that I was solving with computers down to 32 things, and these 32 things I could probably implement in Fractran and Subleq, other more minimal computing systems.</p>

<p>It taught me about how the little functions you would use in JavaScript to convert a string into an end, you write it in Assembly, and it dispels the magic. Sometimes people say they love magic, but in truth they don't. I don't like magic at all, especially not when things start to break.</p>

<p>Douglas Adams said that, "The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at and repair." This is the situation I was in with programming. I wanted to understand the whole thing, and to have it be inspectable.</p>

<p><img src="https://100r.co/media/content/blog/wsw_53.jpg" loading="lazy"></p>
<p>From there I started to build dawing routines, etc. I started to make implementations of Basic, of games, or of other emulators.</p>

<p>I have been writing in this little language for two years.</p>

<p><img src="https://100r.co/media/content/blog/wsw_54.jpg" loading="lazy"></p>
<p>In his <a href="https://guide.handmade-seattle.com/c/2022/behind-crafting-interpreters/" target="_blank">sit-down with Abner Coimbre</a> for the Handmade Seattle 2022 opening, <a href="https://journal.stuffwithstuff.com/" target="_blank">Robert Nystrom</a> was encouraging everyone to make their own programming language and their own system. Many of the conference attendees share this view, but in other circles it is generally frowned upon. The first time I mentioned it to anyone I was laughed out the room. I liked to draw, and people were thinking, "what do you even know about computers?"</p>

<p>I would love to see everyone's programming language, to meet someone new and to ask them: "show me how many opcodes you have."</p>

<p>It is telling about a person's mind.</p>

<p><img src="https://100r.co/media/content/blog/wsw_55.jpg" loading="lazy"></p>
<p>We built this little system that is tailored to host the games we make. It'll be alien to anyone else, and that's okay, we are not trying to sell you on this idea, what we want is for everyone to try and make their own personal computer instead of piggybacking on someone else's idea that's cluttered with artifacts. I don't think we've even begun to scratch the surface of what can be done with this.</p>

<p>A lot of people will try to tell you that we've tried everything with 8-bit, but by the time the NES was out, most of the game genres that we have today didn't exist. There are immense amounts of space left to explore, but now everyone has moved on, to VR, AR or other.</p>

<p><img src="https://100r.co/media/content/blog/wsw_56.jpg" loading="lazy"></p>
<p>I made this entire talk in black and white, and I could have done a system in black and white too, but I made it in <a href="https://en.wikipedia.org/wiki/Four_color_theorem" target="_blank">four colors</a>. Imagine how much power you have with four colors.</p>

<p>One-bit can be a totally evocative, things don't have to be visually busy all the time. I think this maximalism of 'I need all these features' and 'I need to be doing this and that,' is exhausting. Learning to live without float points is actually kind of nice. There is beauty in really simple systems, trying to always scale things to fit everyone's usage is foolish.</p>

<p><img src="https://100r.co/media/content/blog/wsw_57.jpg" loading="lazy"></p>
<p>As a closing remark, I want to say that I don't think that my attempt is the best solution to data preservation, I'm not even sure if I'm gonna be able to use that system in five years, but at least it's one attempt at trying to preserve things.</p>

<p><a href="https://permacomputing.net/" target="_blank">Permacomputing</a> is inspired from permaculture, its goal is to build resilience. The resilience of permaculture comes from trying different ideas, and seeing what sticks. If we all jump on the same language, and the same ecosystem, it makes it really fragile when one individual can just buy the whole thing, then you're left with a system that was never truly yours.</p>

<p>Thank you for reading.</p>
</article>


<hr>

<footer>
<p>
<a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
</svg> Accueil</a> •
<a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
</svg> Suivre</a> •
<a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
</svg> Pro</a> •
<a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
</svg> Email</a> •
<abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
</svg> Légal</abbr>
</p>
<template id="theme-selector">
<form>
<fieldset>
<legend><svg class="icon icon-brightness-contrast">
<use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
</svg> Thème</legend>
<label>
<input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
</label>
<label>
<input type="radio" value="dark" name="chosen-color-scheme"> Foncé
</label>
<label>
<input type="radio" value="light" name="chosen-color-scheme"> Clair
</label>
</fieldset>
</form>
</template>
</footer>
<script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
<script>
function loadThemeForm(templateName) {
const themeSelectorTemplate = document.querySelector(templateName)
const form = themeSelectorTemplate.content.firstElementChild
themeSelectorTemplate.replaceWith(form)

form.addEventListener('change', (e) => {
const chosenColorScheme = e.target.value
localStorage.setItem('theme', chosenColorScheme)
toggleTheme(chosenColorScheme)
})

const selectedTheme = localStorage.getItem('theme')
if (selectedTheme && selectedTheme !== 'undefined') {
form.querySelector(`[value="${selectedTheme}"]`).checked = true
}
}

const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
window.addEventListener('load', () => {
let hasDarkRules = false
for (const styleSheet of Array.from(document.styleSheets)) {
let mediaRules = []
for (const cssRule of styleSheet.cssRules) {
if (cssRule.type !== CSSRule.MEDIA_RULE) {
continue
}
// WARNING: Safari does not have/supports `conditionText`.
if (cssRule.conditionText) {
if (cssRule.conditionText !== prefersColorSchemeDark) {
continue
}
} else {
if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
continue
}
}
mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
}

// WARNING: do not try to insert a Rule to a styleSheet you are
// currently iterating on, otherwise the browser will be stuck
// in a infinite loop…
for (const mediaRule of mediaRules) {
styleSheet.insertRule(mediaRule.cssText)
hasDarkRules = true
}
}
if (hasDarkRules) {
loadThemeForm('#theme-selector')
}
})
</script>
</body>
</html>

+ 335
- 0
cache/2023/c564325b28ec854b6b098950df5c8c8f/index.md View File

@@ -0,0 +1,335 @@
title: weathering software winter
url: https://100r.co/site/weathering_software_winter.html
hash_url: c564325b28ec854b6b098950df5c8c8f

<img src="https://100r.co/media/content/blog/wsw_01.jpg" loading="lazy">

<p>This is a blog post based on a transcript of a talk Devine gave at <a href="handmade-seattle.com/" target="_blank">Handmade Seattle</a> on November 26th 2022. Watch the <a href="https://youtu.be/9TJuOwy4aGA" target="_blank">video version</a>. The slideshow presentation was made using <a href="adelie.html" class="local">adelie</a>.</p>

<p>Thank you to Matt Mascarenhas for providing us with an auto-transcript, it would have taken us ages to put this text together without it, and thank you to Abner Coimbre for organizing this amazing event.</p>

<h3>Weathering Software Winter</h3>

<p>I work with a little studio called Hundred Rabbits, it is a small collective of two which operates from a small solar-powered sailboat. All of our devices are donated, discarded devices. Our <a href="philosophy.html" class="local">philosophy</a> is that to make fast software, you need slow computers, and we've tried to espouse this as much as we could. We spend our time sailing around, and doing experiments with resilience, that covers computers, but we also touch on food security, preservation, and on studying past technologies that could be used today in times of crisis.</p>

<img src="https://100r.co/media/content/blog/wsw_04.jpg" loading="lazy">

<p>We started sailing seven years ago, it took us all around the Pacific. We went through <a href="mexico.html" class="local">mexico</a>, <a href="french_polynesia.html" class="local">french polynesia</a>, <a href="new_zealand.html" class="local">new zealand</a>, up through <a href="fiji.html" class="local">fiji</a>, <a href="japan.html" class="local">japan</a>, and then followed the Russian Coast, brushing by Alaska before returning to <a href="western_canada.html" class="local">western canada</a>. Our thinking was that we could keep doing art, music, and video games as we sailed around, but it soon became obvious that all the technology that we took for granted, and that we had with us, was not designed to leave the Western world.</p>

<p>The moment we cast off from Mexico, all of our devices started breaking down. In his 2022 Handmade Seattle opening speech, Abner was making a point about the Roombas starting to fail. If your Roomba fails, you pick up a broom, but on a sailboat you depend on devices working to find your position, knowing the weather, etc. These things have a more direct impact on your survival, and all of that technology is built on the same stack as the Roomba.</p>

<img src="https://100r.co/media/content/blog/wsw_05.jpg" loading="lazy">

<p>Many of the tools that we thought we could rely on broke down, whether it is Apple products, or software that require subscription services, DRM, etc. As an artist you spend time developping a skill, you become a Photoshop illustrator. When your connection to the internet fails and that the software locks up, that skill that you thought was yours was actually entirely owned by someone, and can be taken away.</p>

<p>Even though we've been paying for this sort of software for years, the moment that you can't have access to authenticate yourself that skill is gone. We didn't expect this, it scared us.</p>

<img src="https://100r.co/media/content/blog/wsw_06.jpg" loading="lazy">

<p>Nowadays, everything is built on the cloud. While sailing along the US coast in early 2016, we'd stop by conferences to see all the happenings in tech. We would speak with people at the booths, and they would try and sell us their product, but we'd have to stop them mid-sentence to ask, "Does it work offline?" 99% of times people say, "ah, yeah no, sorry. It's on the cloud."</p><p>

</p><p>It seemed that no one was building things that we could use. This was a sad realization. I love programming, and for a time it seemed that it was utterly incompatible with our new way of life.</p>

<p>Before I go on any further, I will paint you a picture of what it looks like to try to use modern stacks when away from the shores of the Western world.</p>

<p>Imagine two people in a small sailboat in the tropics, somewhere like the Marquesas, or another island in the South Pacific Ocean. These islands are covered with beautiful lush forests, they require rain and sun, that's all, then there's us sharing that same space, busy lifting a smartphone in a Ziploc bag up the mast to try and get one bar of signal to update Xcode, which at the time was 11 gigs. We had a stack of cards, each worth two gigabytes of mobile data, but with Xcode you can't resume the download if it fails. We could swap the codes for the cards, and if we did it within 10 seconds it would detect a timeout and would continue. The problem is that if the download is not done by 1600, then the sun is setting, the solar panels aren't charging the batteries anymore, and our laptops are dying. The download is at 7 gigs with three more hours left to download the update, it won't finish, and we will have spent all that data for nothing.</p>

<p>This wasn't ideal. We tried to look for alternatives...</p>

<img src="https://100r.co/media/content/blog/wsw_07.jpg" loading="lazy">

<p>We noticed that all the software that we had written in the past was gradually becoming unusable. We grew up in Montreal, and many of our friends worked in AAA studios like Ubisoft, making free-to-play games, building projects that had a lifespan of three years. The projects that we made in the past on the Apple stack, Electron, or on Unity3D, also had a lifespan of three to four years, but games like Super Mario, as well as others produced in that era, are still playable today. We are in a dark age, where game developers and artists spend years building games that quickly become lost <a href="http://wiki.xxiivv.com/site/stack.html" target="_blank">bitrot</a>. We'll never be able to play Scott Pilgrim on the PlayStation again.</p>

<p>Looking online, it seemed that others shared these concerns.</p>

<p>In the above image are four philosophies of digital data preservation, they all have their flaws. Data preservation is a somewhat new field, we don't know what sort of data we'll be able to recover in a hundred years, but from the experiments that we've looked at, it doesn't look good. The BBC had a project where they were trying to mimic one of their longest lasting books, the <a href="https://en.wikipedia.org/wiki/Domesday_Book" target="_blank">Domesday book</a>. It was written by monks a few hundred years ago. The BBC's thinking was that we still have this book today, we can still read it, do we have technology to make something like this? Is it possible to record our way of life today, so that people in a thousand years can see how we lived? They created the <a href="https://en.wikipedia.org/wiki/BBC_Domesday_Project" target="_blank">BBC Domesday</a>, a disc that contained music, movies, and scientific papers. Then 10 years later, it was an unreadable, people forgot how to decrypt and decompile the disc. It seemed that there was no real way to preserve data long-term, and so we decided to try our own little experiment.</p>

<p>As a disclaimer, all that I am writing now is very naive. I draw, and I make music, when I started doing research I didn't have the vocabulary to find what I was looking for. I didn't know what virtual machines were, I didn't know what compilers were either. I had a vague idea of what programming was. I had written Swift and Objective C, but had no conception of how it actually tied to processors. It seemed like I was learning a service, the same way I was learning "To Photoshop". It wasn't like learning a skill, you don't learn to draw when you use Photoshop, you learn how to operate within the confines of someone else's playground, and when that rug is pulled from underneath you, there's nothing you can say or do, and you never really understood how it worked in the first place so you can't really replicate it.</p>

<img src="https://100r.co/media/content/blog/wsw_08.jpg" loading="lazy">

<p>We eventually stumbled on the words <b>virtual machine</b>. With a Super Mario brother NES file, I knew I could put it on a computer and I could run it, I could run it on my phone, I could run it on an old computer, I could run it on a Super Nintendo, I could also run a Super Nintendo emulator running Mario on a Nintendo 64. This seemed a good way of preserving data. We decided to not give up entirely on software, and to see what could be done in that space using virtual machines.</p>

<img src="https://100r.co/media/content/blog/wsw_09.jpg" loading="lazy">

<p>Hardware is extremely cheap, and because it is it's covering the world with e-waste, and all of it is there for the taking. Everyone has drawers full of old devices, Super Nintendos, Playstations, Dreamcasts, all of which are considered obsolete, people stopped developing games for them, but we thought we could give a second life to such devices. When looking into how this could be done, it led us to interesting places. We became interested in seeing how we could repurpose old electronics. There didn't seem to be any competition. If you do like everyone else, you're competing with everyone else. For example, if making iOS 10 software the marketplace is completely saturated, but if you're going be release an Atari game today, it's going to be huge. There's no one giving purpose to these devices anymore. We tried to do something completely left field. To start, our goal was to try and make games for the NintendoDS.</p>

<img src="https://100r.co/media/content/blog/wsw_10.jpg" loading="lazy">

<p>So looking at a VM from the outside, without having a sort of academic background, the first thing you find is the <a href="https://en.wikipedia.org/wiki/Java_virtual_machine" target="_blank">JVM</a>. I've never written any Java, but I would go around and tell my friends who are actual programmers, "I'm gonna make the JVM! It seems like this would solve our problem!" Their response was that the JVM was so fractalized, and that this wasn't what we were looking for. We found plenty of academic papers with no software written for them.</p>

<img src="https://100r.co/media/content/blog/wsw_11.jpg" loading="lazy">

<p>I dabbled into the Java ecosystem, and I couldn't make heads or tails of it</p>

<img src="https://100r.co/media/content/blog/wsw_12.jpg" loading="lazy">

<p>I knew that we wanted to make playful little projects that could run on a variety of devices, on a sort of cross platform that was not Electron. Instead of always targeting the new modern thing, we thought we could make a VM, or something other, that could run increasingly further back into the past.</p>

<p>There is an incredible amount of fast computers out there. The first time <a href="donsol.html">I made an NES game</a>, I was surprised at how much stuff I could draw on the screen at 60 fps. I had somehow been convinced that modern technology was better, faster, and all the eight bit stuff had been solved problems, I thought that we had explored this problem space entirely.</p>

<img src="https://100r.co/media/content/blog/wsw_13.jpg" loading="lazy">

<p>It didn't seem to be the case. There were a lot of ideas in the past that were forgotten, and I made it my mission to explore this. It was COVID, everyone was confined to their homes, it was the perfect time to figure out how computers work. We're going to look into the past to see how people did it, and what ideas were forgotten.</p>

<img src="https://100r.co/media/content/blog/wsw_14.jpg" loading="lazy">

<p>There was a time when computers were super playful, but now they feel cold, and have been weaponized against people. The sort of playfulness that you'd find in <a href="https://en.wikipedia.org/wiki/Microsoft_Bob" target="_blank">Microsoft Bob</a>, I can't really find a parallel for today. I can imagine what Microsoft Bob would look like if made today, it would try to sell you all sorts of shit. I don't think we, as a society, have a system in place that would foster the creation of something as playful as this.</p>

<img src="https://100r.co/media/content/blog/wsw_15.jpg" loading="lazy">

<p>A realization that I had working on something like this was that customizing your hardware, and your software, makes you care.</p>

<p>If you buy something off the shelf, like an iPhone, which you can't change, you're less likely to care for it, and it's going to end up in a drawer. Back then you could go to Radio Shack and get parts for your computer, it was possible to customize it (for example, the <a href="https://en.wikipedia.org/wiki/Altair_8800" target="_blank">Altair</a>), and then you could know it in its entirety. Devices that were customized, or built from near-scratch, are still loved, but as for your old iPhone6, you don't know where it is, and even if you did it's probably unusable. Devices like the iPhone6 can't be repaired, they are designed to fail in ways that are inscrutable.</p>

<img src="https://100r.co/media/content/blog/wsw_16.jpg" loading="lazy">

<p>Instead of trying to make things as broadly accessible as possible, we thought we'd try to see what we could do if we designed it for just one person, a sort of personal computing that was not designed to scale.</p><p>

</p><p>I can see the appeal of languages like Rust, I won't be learning it, but if you're convinced that you can use computers to solve problems, then obviously this will not be relevant to you. I think that if you are forced to use a computer, there is no way that it can be playful. There was a writer who said, "if you're forced to play, you can't play."</p>

<p>I don't have a smartphone. Walking in Seattle I saw the streets lined with lime scooters everywhere, to see the menu to be allowed to use a scooter you need to scan a QR code. There's a layer of reality that's being forced onto people to use technology.</p>

<p>This is not what I'm talking about here. What we're trying to do is something that is closer to your personal computer, something that would be designed and tailored to help you play.</p>

<img src="https://100r.co/media/content/blog/wsw_17.jpg" loading="lazy">

<p>When we began looking at what VMs there were, we looked into the past, and that brought us to <a href="https://en.wikipedia.org/wiki/Smalltalk" target="_blank">Smalltalk</a>. I read this book called What the <a href="https://en.wikipedia.org/wiki/What_the_Dormouse_Said" target="_blank">Dormouse Said</a>, and it talked about the history of Stanford, and how people had this utopian idea of what computers could be. This is way before I even became interested in computers, learning what their vision was then made me optimistic about what could be done.</p>

<p>That was when I was first exposed to the idea of a virtual machine, or byte code. As I mentioned before, looking up information online without the vocabulary you need to find things is really difficult. There was no way I could go around learning about personal computing without spending some time learning Smalltalk.</p>

<img src="https://100r.co/media/content/blog/wsw_18.jpg" loading="lazy">

<p>Obviously, the moment that you start going that down that route, you will have people telling you that you really have to try <a href="https://en.wikipedia.org/wiki/Lisp_machine" target="_blank">Lisp machines</a>. I spent time learning about Symbolics and LVP. I learned about a sort of system where the whole thing could be inspected, a system that was trying to do computing in a very personal way.</p>

<p>Nowadays, it's akin to the browser, where you can go on a website that you like, and right click to inspect. It is less and less the case now, but for a while you could inspect websites to see how it was put together. This was empowering, emblematic of the era.</p>

<img src="https://100r.co/media/content/blog/wsw_19.jpg" loading="lazy">

<p>This doesn't work on a VM at all, but it's relevant because <b>Niklaus Wirth</b>, who wrote <a href="https://en.wikipedia.org/wiki/Oberon_(operating_system)" target="_blank">Oberon</a>, wrote an entire operating system that came with a book.</p>

<p>The Oberon book is really nice, especially if you come into it with a clear mind, without prior knowledge or expectation of what programming is. The book explains how to build an operating system from scratch. It uses a language like <a href="https://en.wikipedia.org/wiki/Pascal_(programming_language)" target="_blank">Pascal</a>, which is very easy to read, more beautiful than other <a href="https://en.wikipedia.org/wiki/ALGOL" target="_blank">ALGOL languages</a>. One of the first things that it teaches you to do is how to draw pictures, which I thought was kind of interesting as someone who's very visually-inclined.</p>

<img src="https://100r.co/media/content/blog/wsw_20.jpg" loading="lazy">

<p>In the book Niklaus Wirth mentions the <a href="https://en.wikipedia.org/wiki/P-code_machine" target="_blank">P-machine</a>. I was beginning to form an idea of what virtual machines were, and he just briefly mentions it, "oh! By the way, I wrote this Pascal compiler targeting a virtual machine." I was like, "a language can target a virtual machine?! What?" And the reason why it was so easy for him to port the compiler between platforms, is that the opcodes running it were extremely simple, and very few in number.</p>

<p>I thought then, <b>this</b> is a way to do data preservation that is appealing to me.</p>

<img src="https://100r.co/media/content/blog/wsw_21.jpg" loading="lazy">

<p>I learned Pascal.</p>

<p>Pascal is a beautiful language. In the above image, I am running it in an emulator for the Macintosh. I loved that I could have a whole operating system running in a small window that wasn't Linux, that wasn't some big <a href="https://en.wikipedia.org/wiki/QEMU" target="_blank">QEMU image</a>. It was a little self-contained system, which I could destroy, or start over with really quickly. I could run it and do 3D at 60 fps by running the emulator at 128 times its speed, and thought that was cool, a testament to how fast computers are nowadays.</p>

<img src="https://100r.co/media/content/blog/wsw_22.jpg" loading="lazy">

<p>That led me to learn about the history of C.</p>

<p>I migrated all my platform to <a href="https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs" target="_blank">Plan 9</a>. Plan 9 has its own C compiler, and it's not quite C89, it's its own thing, a no-concessions system.</p>

<p>The people who built this weren't planning to make money with it, you can really tell that it's a product of love. That made me optimistic about what personal computing could be.</p>

<img src="https://100r.co/media/content/blog/wsw_24.jpg" loading="lazy">

<p>Plan 9 didn't run on a VM, but it inspired another system. The lessons that they learned during Plan 9 led to the building of something called <a href="https://en.wikipedia.org/wiki/Inferno_(operating_system)" target="_blank">Inferno</a>, which runs on a VM.</p>

<p>I think I was starting to understand what VMs were. If this entire operating system runs on a vm, this is what I wanna be doing.</p>

<img src="https://100r.co/media/content/blog/wsw_25.jpg" loading="lazy">

<p>The scale of something like Inferno is quite big, but in an afternoon I could run through the whole C code for this virtual machine. The above (image) is the opcodes that it had.</p>

<img src="https://100r.co/media/content/blog/wsw_26.jpg" loading="lazy">

<p>It was in part inspired from the actual hardware that ran the <a href="https://en.wikipedia.org/wiki/Apple_Newton" target="_blank">Apple Newton</a>.</p>

<p>I could run it in an afternoon, and know exactly how it ran. I would look at the compiler that targeted the Dis virtual machine, and could see how they reduced the problem-space to a limited number of operations.</p>

<img src="https://100r.co/media/content/blog/wsw_27.jpg" loading="lazy">

<p>The people who worked really hard in the past to get away from time-sharing system would laugh, or they would cry, at how we got tricked into falling back in that situation where computers were something that was done behind a wall. You have a terminal, but that's where your power ends.</p><p>

<img src="https://100r.co/media/content/blog/wsw_28.jpg" loading="lazy">

</p><p>I wanted a way of doing computers that nobody could take away from me.</p>

<p>I would read people who would write entire operating system on a weekend, but I couldn't even map this idea onto things I was seeing, a bridge was missing.</p>

<img src="https://100r.co/media/content/blog/wsw_29.jpg" loading="lazy">

<p>The modern stack doesn't really work for us, it doesn't apply to the limitations that we have on the boat. We have 180 watts of solar. We just spent the whole summer with two 6-volt batteries, which is very small. When you're going down that route, at every turn people are telling to just put more solar panels, or to buy more batteries. That is such a modern way of solving your problem. In reality, technology like this(especially high-tech) rarely solves problems. It creates a lot of other problems, which on a sailboat is very immediate. Putting more solar would mean more windage, more chance of things flying off and cutting our limbs. More batteries would mean the boat would be heavier, it would stop us from being able to run away from storms.</p>

<p>The limits of a sailboat gives us a space for creativity, and these limitations became a sort of playground for us.</p>

<p>I am not the sort of programmer who could build Plan 9, or Oberon, or Lisp machines, but I knew I could write simple NES games and port them. I couldn't write an NES game inside an NES game, and that was such a shame. I wanted something that was completely bootstrapped.</p>

<img src="https://100r.co/media/content/blog/wsw_30.jpg" loading="lazy">

<p> So after looking at 6502, the <a href="https://en.wikipedia.org/wiki/Commodore_64" target="_blank">Commodore 64</a> emulator was extremely complex, more complex than I could grasp. It was the limit of what I think a single person could understand. It seemed like a simple system, it was just a box, but writing an emulator for it was more than a weekend project. I was looking for something that I could nail in a single weekend.</p>

<img src="https://100r.co/media/content/blog/wsw_31.jpg" loading="lazy">

<p>6502 has a lot of mnemonics. When trying to implement the 6502 as a VM, it is possible to make a naive implementation in a week, or in a weekend if you don't do anything else. My knowledge of C is very limited, but luckily I had help. I wondered if this instruction set could be reduced further...</p>

<img src="https://100r.co/media/content/blog/wsw_32.jpg" loading="lazy">

<p>It got me thinking about complexity, and on what simplicity means. <a href="https://en.wikipedia.org/wiki/Andrey_Kolmogorov" target="_blank">Kolmogorov</a>, the mathematician, said that the index of complexity of any one system is the length of the program that could generate a specific string. I really like that way of looking at complexity and simplicity, because nowadays it's sort of convoluted. If you don't really know about hardware, it seems that everyone's trying to make the programmer comfortable, and not focusing on making an actual fast product.</p>

<p>Most of the people I know who are hobbyist programmers use type systems, memory safety, all sorts of <i>training wheels</i>(I'm kidding here, if you're a large team, please do use type systems for god's sake). When I work on my own, I want to reduce the problem space to as little a thing as I can make it. I don't like programming that much, and in the future I'm gonna hate it probably even more, so I want my future self to be able to reimplement my entire system at most in a weekend.</p>

<img src="https://100r.co/media/content/blog/wsw_33.jpg" loading="lazy">

<p>So where does that bring me? 6502 is beyond the scope of what I was hoping to do, because having done it twice already, I don't think I'll have it in me to do it again.</p>

<img src="https://100r.co/media/content/blog/wsw_34.jpg" loading="lazy">

<p>Looking back at that same era with <a href="https://en.wikipedia.org/wiki/Bell_Labs" target="_blank">Bell Labs</a>, this was a time when people would build paper computers to teach kids to understand what a program counter was, how things moved around in the program, and how to navigate byte code.</p>

<p>No one can take a paper computer away from you. As long as you have paper and pen you can still solve problems, albeit slowly, and more painfully, but this is a form of computing that can be easily ported.</p>

<img src="https://100r.co/media/content/blog/wsw_35.jpg" loading="lazy">

<p>When I was looking at the BBC's Domesday book, I noticed that Alan Kay(Small Talk) also had a project that was in line with what I was trying to do. He thought, "Smalltalk is a vm, how much of a small VM can possibly run smalltalk-72."</p>

<p>He wrote a paper called <a href="https://dl.acm.org/doi/10.1145/2814228.2814250" target="_blank">The Cuneiform Tablets of 2015</a>, he had all these words to talk about computers that went viral. He said things like, "Lisp was the Maxwell equation of programming." As a minimalist geek I was glad to hear this, it's what I wanted, but then looking into Lisp, I thought that a language that creates garbage by design wasn't really what I was looking for. This was a bit more like it, but it was a register machine, and I didn't see how that mapped to Smalltalk.</p>

<img src="https://100r.co/media/content/blog/wsw_36.jpg" loading="lazy">

<p>So <a href="https://sr.ht/~bctnry/chifir/" target="_blank">ChifirVM</a> is not exactly what I'm looking for, but there are plenty of other ways of doing computing out there. Instantly, I fell onto one-instruction set computers, like <a href="https://wiki.xxiivv.com/site/subleq.html">SUBLEQ</a>. I thought it was a disgusting tar pit, but I could implement it in 15 minutes, and I would be really kind for my future self to make a system that could run on something that I could implement in 15 minutes.</p>

<p>The problem was that the toolchain required to write things that could actually have any purpose for it was immense. There were people who wrote C compilers down to Subleq, but this shifts the whole complexity back to the compiler, and that doesn't solve my problem. </p>

<p>There were computing paradigms which I absolutely loved, so pure, so beautiful, but at the same time they mapped so poorly to silicone that they didn't really work for me.</p>

<img src="https://100r.co/media/content/blog/wsw_37.jpg" loading="lazy">

<p><a href="http://wiki.xxiivv.com/site/thue.html" target="_blank">Thue</a>(one of my favorites) is an esoteric programming language that has one operator, and only has a replacement rule. So you have an accumulator, which is a series of characters, and every rule, one for every line, is a replacement of what's on the left with what's on the right. It was very slow, but extremely powerful, and could be implemented in 30 minutes.</p>

<img src="https://100r.co/media/content/blog/wsw_38.jpg" loading="lazy">

<p><a href="http://wiki.xxiivv.com/site/fractran.html" target="_blank">FRACTRAN</a> was another OISC system. It has one operation: multiply. Its primitives were not bytes, or shorts, but fractions. It used prime encoding, which was one of the most beautiful mathematical concept that I knew of.</p>

<p>For a while I thought I had found my bedrock, I was going to use fractions to make computers. The only issue... is that it maps poorly to silicone.</p>

<img src="https://100r.co/media/content/blog/wsw_39.jpg" loading="lazy">

<p><a href="http://wiki.xxiivv.com/site/logic.html" target="_blank">SKI calculus</a> was beautiful, it has this mathematical elegance to it. I went down that rabbit hole, and I barely emerged back alive.</p>

<p>I recommend everyone to take a Lisp detour, and then learn SKI, to read Smullyan, and to read about others like him who don't care about making products, but really want to explore software in a way that is very creative and artistic. I almost made this my bedrock, except that at the VM layer garbage collection was a bad idea.</p>

<img src="https://100r.co/media/content/blog/wsw_41.jpg" loading="lazy">

<p><a href="http://wiki.xxiivv.com/site/brainfuck.html" target="_blank">Brainfuck</a> has 7 instructions, implementing it would take 45 minutes, maybe an hour.</p>

<p>We are going up the abstraction chain here, and the pattern I was seeing was that the lesser a mnemonic or complexity that you reduced it to, the slower it got. Brainfuck was surprisingly fast, you could run a mandelbrot on a system that was quite small to implement, but that wasn't the sort of programming I wanted to do. It led me to another system...</p>

<p><a href="https://en.wikipedia.org/wiki/Charles_H._Moore" target="_blank">Chuck Moore</a> never came up in my books about Stanford, he must have been some sort of outsider. FPGA is not something I was very quite familiar with, but people were trying experimental computing systems with them. It didn't matter, it was goo, you could shape it in any way you wanted.</p>

<img src="https://100r.co/media/content/blog/wsw_40.jpg" loading="lazy">

<p>Someone wrote an FPGA system called <a href="https://excamera.com/files/j1.pdf" target="_blank">J1</a>, a <a href="https://en.wikipedia.org/wiki/Forth_(programming_language)" target="_blank">Forth system</a>. It had very few opcodes, but had one of the most beautiful mapping of byte code I had ever seen. The Stack Machine primitives were implemented so you could combine them with each other, with weird combinations of bit toggles on a byte you could have really interesting esoteric stack manipulators.</p>

<p>I was smitten.</p>

<p>It's a 16-bit Forth system, the biggest literal you can have in one of those words would be like 35k fixed. The arithmetic was really beautiful, but the whole system's maximum program that it could run was four kilobytes.</p>

<img src="https://100r.co/media/content/blog/wsw_42.jpg" loading="lazy">

<p>What I had in mind was slightly <b>more</b> than four kilobytes, but not much more. If I could have a full addressable, 64 would be really nice. I didn't want the complexity of the 6502.</p>

<img src="https://100r.co/media/content/blog/wsw_43.jpg" loading="lazy">

<p>The <a href="http://wiki.xxiivv.com/site/chip8.html" target="_blank">CHIP-8</a> is an interesting system that has a rich, vibrant community of people who build things for it during game jams.</p>

<p>The spec is quite simple, it fits on maybe two pages of paper, side by side. It feels like the paper computer in ways that I like, but it was not designed to be a general purpose driving vm. It is meant to be building things in the scale of Pong. The keyboard is like a hex keyboard with just numbers on it. My plan was to build something that could build itself in it, so I'd need a keyboard, a cursor-a weird keyboard for me would not cut it.</p>

<img src="https://100r.co/media/content/blog/wsw_44.jpg" loading="lazy">

<p><a href="https://wiki.c2.com/?MachineForth" target="_blank">Machine Forth</a> was something I stumbled upon after. Chuck Moore wrote Forth, and then he thought it too complicated. I thought, "what do you mean it's complicated? There's like no syntax, no nothing. It's space-divided language. Implementing a Forth system is really fast." Chuck More, being himself, thought that he could do without all this 'cruft'. He reduced even further to Machine Forth which has 32, or 24 opcodes.</p>

<p>I kept seeing Forth over and over again, and couldn't really grasp, or see the beauty in it for a while. If you've just come from Lisp, you have whiplash when you fall into Forth. It has similar beauty. Lisp would be prefix, Forth would be <a href="http://wiki.xxiivv.com/site/notation.html" target="_blank">postfix</a>. Following that mindset you think you could be anyone, or you could do anything, and you chose to be Algol, why?</p>

<p>Going back and forth between Forth and Lisp, I couldn't make up my mind, but I kept seeing people who would fall in love with Forth, but were really bad at selling it. With Lisp it's really hard to find any Lisp code that you can actually copy/paste in a project because everyone's using weird macros, and libraries, and nothing is portable.</p>

<p>Forth had a different problem, everyone I'd talk to would say Forth was the best, and that I should really use it, but then I'd ask them questions like, "how do I calculate the distance between two points?" I walked away from that interaction thinking, well, it seems like a lot of people like Forth, but don't write it. It was hard to find any code at all. I know Forth is not portable, but it was hard to find just actual use-case of Forth that wasn't someone trying to learn Forth by implementing Forth and then moving on back to Rust.</p>

<img src="https://100r.co/media/content/blog/wsw_46.jpg" loading="lazy">

<p>The way Forth works is really simple, you put stuff on a stack, it hits a token, pulls the item from the stack, etc. It doesn't have precedence rules.</p>

<p>It seemed like a really good bedrock for the things I wanted to do.</p>

<img src="https://100r.co/media/content/blog/wsw_47.jpg" loading="lazy">

<p>Machine Forth was something that was going to be something close to the metal, Forth at its core is something pretty close to Assembly, but I wanted something that mapped exactly to Assembly, something that would be like, 'one token would be one byte, or one short'. </p>

<img src="https://100r.co/media/content/blog/wsw_48.jpg" loading="lazy">

<p>So after a while I picked a bunch of opcodes, and I'd shown them to my friends, and they were like, "these are bad." They were people I trust. If I'd been on my own, I would have likely given up and not done it, or would be writing JavaScript still. They were extremely patient with me, they understood what I was trying to do. People like Sigrid, Alderwick, and Andrew had infinite patience for my stupid questions, they would tell me, "I wouldn't do it this way, but here's something that you could use to improve your system."</p>

<p>In the end, I ended up with this napkin definition of a system that I kind of liked. My goal throughout this whole process was to make a system that could fit on a t-shirt. I might lose my computer, especially on a sailboat, but I don't want to keep preserving all the documentation.</p>

<p>When I started sailing I was doing a bit of Ruby, when came time to gather all the Ruby documentation that I would need to be self-sufficient, the amount was overwhelming.</p>

<p>Being at sea for 50 days straight we don't have access to StackOverflow, our questions remain unanswered, now imagine if the site was gone forever tomorrow. At sea, without internet, if I wanted to look up how to fill a polygon, I couldn't do it, but if I had printed it? There are languages that make this more accessible, and others that make it really hard. Not having a background in C, I found it really difficult to go off sailing without my C documentation, but it is very extensive, and very clunky.</p>

<p>My thinking is that I'm probably going to lose the book at some point in the future, but if my future self had that t-shirt they'd probably be okay. I tried to reduce everything that I could do to fit onto a t-shirt, that's as much as I afforded in bandwidth.</p>

<img src="https://100r.co/media/content/blog/wsw_49.jpg" loading="lazy">

<p>If you're familiar with 6502 on the left (above image), it just looks like this vertical series of instructions. The little language I made is quite similar. You can map it one to one, and the resulting size of byte code is pretty much the same.</p>

<img src="https://100r.co/media/content/blog/wsw_50.jpg" loading="lazy">

<p>You might be familiar with this sort of Assembly language, reading as a big vertical column of characters, but I wanted to use the beauty of Forth and make a language that would be verbose in ways that it resembled writing a little bit.</p>

<p>Every morning when I wake up, and I open my programs, I don't hate myself for not leaving comments because the code itself is a bit more readable and self-documenting.</p>

<img src="https://100r.co/media/content/blog/wsw_51.jpg" loading="lazy">

<p>The first thing I tried to do was to make an assembler in that language. It was easy. The language is so simple that the assembler itself is also going to be simple. I generated a X86 application of the VM that could run its own assembler in that language.</p>

<p>The assembler is <a href="https://git.sr.ht/~rabbits/drifblim/" target="_blank">3000 bytes</a>.</p>

<img src="https://100r.co/media/content/blog/wsw_52.jpg" loading="lazy">

<p>It's nothing like a computer, but it will run bytecode. I felt like I had reduced the problems that I was solving with computers down to 32 things, and these 32 things I could probably implement in Fractran and Subleq, other more minimal computing systems.</p>

<p>It taught me about how the little functions you would use in JavaScript to convert a string into an end, you write it in Assembly, and it dispels the magic. Sometimes people say they love magic, but in truth they don't. I don't like magic at all, especially not when things start to break.</p>
<p>Douglas Adams said that, "The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at and repair." This is the situation I was in with programming. I wanted to understand the whole thing, and to have it be inspectable.</p>

<img src="https://100r.co/media/content/blog/wsw_53.jpg" loading="lazy">

<p>From there I started to build dawing routines, etc. I started to make implementations of Basic, of games, or of other emulators.</p>

<p>I have been writing in this little language for two years.</p>

<img src="https://100r.co/media/content/blog/wsw_54.jpg" loading="lazy">

<p>In his <a href="https://guide.handmade-seattle.com/c/2022/behind-crafting-interpreters/" target="_blank">sit-down with Abner Coimbre</a> for the Handmade Seattle 2022 opening, <a href="https://journal.stuffwithstuff.com/" target="_blank">Robert Nystrom</a> was encouraging everyone to make their own programming language and their own system. Many of the conference attendees share this view, but in other circles it is generally frowned upon. The first time I mentioned it to anyone I was laughed out the room. I liked to draw, and people were thinking, "what do you even know about computers?"</p>

<p>I would love to see everyone's programming language, to meet someone new and to ask them: "show me how many opcodes you have."</p>

<p>It is telling about a person's mind.</p>

<img src="https://100r.co/media/content/blog/wsw_55.jpg" loading="lazy">

<p>We built this little system that is tailored to host the games we make. It'll be alien to anyone else, and that's okay, we are not trying to sell you on this idea, what we want is for everyone to try and make their own personal computer instead of piggybacking on someone else's idea that's cluttered with artifacts. I don't think we've even begun to scratch the surface of what can be done with this.</p>

<p>A lot of people will try to tell you that we've tried everything with 8-bit, but by the time the NES was out, most of the game genres that we have today didn't exist. There are immense amounts of space left to explore, but now everyone has moved on, to VR, AR or other.</p>

<img src="https://100r.co/media/content/blog/wsw_56.jpg" loading="lazy">

<p>I made this entire talk in black and white, and I could have done a system in black and white too, but I made it in <a href="https://en.wikipedia.org/wiki/Four_color_theorem" target="_blank">four colors</a>. Imagine how much power you have with four colors.</p>

<p>One-bit can be a totally evocative, things don't have to be visually busy all the time. I think this maximalism of 'I need all these features' and 'I need to be doing this and that,' is exhausting. Learning to live without float points is actually kind of nice. There is beauty in really simple systems, trying to always scale things to fit everyone's usage is foolish.</p>

<img src="https://100r.co/media/content/blog/wsw_57.jpg" loading="lazy">

<p>As a closing remark, I want to say that I don't think that my attempt is the best solution to data preservation, I'm not even sure if I'm gonna be able to use that system in five years, but at least it's one attempt at trying to preserve things.</p>

<p><a href="https://permacomputing.net/" target="_blank">Permacomputing</a> is inspired from permaculture, its goal is to build resilience. The resilience of permaculture comes from trying different ideas, and seeing what sticks. If we all jump on the same language, and the same ecosystem, it makes it really fragile when one individual can just buy the whole thing, then you're left with a system that was never truly yours.</p>

<p>Thank you for reading.</p>

+ 6
- 0
cache/2023/index.html View File

@@ -73,12 +73,16 @@
<li><a href="/david/cache/2022/1676902071b6e1e7e0d3395bc47956b5/" title="Accès à l’article dans le cache local : Adding ActivityPub to your static site">Adding ActivityPub to your static site</a> (<a href="https://paul.kinlan.me/adding-activity-pub-to-your-static-site/" title="Accès à l’article original distant : Adding ActivityPub to your static site">original</a>)</li>
<li><a href="/david/cache/2022/646ebfa25432bc6b653e524b52d25c9a/" title="Accès à l’article dans le cache local : Keep it simple, stupid le plus longtemps possible">Keep it simple, stupid le plus longtemps possible</a> (<a href="https://sklein.xyz/garden/020-keep-it-simple-stupid-le-plus-longtemps-possible/" title="Accès à l’article original distant : Keep it simple, stupid le plus longtemps possible">original</a>)</li>
<li><a href="/david/cache/2022/934ed9f96be582e35b3c8cf8fc0859e5/" title="Accès à l’article dans le cache local : La dette technique - Carnet de notes">La dette technique - Carnet de notes</a> (<a href="https://n.survol.fr/n/la-dette-technique" title="Accès à l’article original distant : La dette technique - Carnet de notes">original</a>)</li>
<li><a href="/david/cache/2022/4be6162587a2171b64fd7753b7fe410b/" title="Accès à l’article dans le cache local : Playing with ActivityPub">Playing with ActivityPub</a> (<a href="https://macwright.com/2022/12/09/activitypub.html" title="Accès à l’article original distant : Playing with ActivityPub">original</a>)</li>
<li><a href="/david/cache/2022/8440372c6df33b8f23cfce7a9eca5961/" title="Accès à l’article dans le cache local : A highly opinionated guide to learning about ActivityPub">A highly opinionated guide to learning about ActivityPub</a> (<a href="https://tinysubversions.com/notes/reading-activitypub/" title="Accès à l’article original distant : A highly opinionated guide to learning about ActivityPub">original</a>)</li>
<li><a href="/david/cache/2022/c564325b28ec854b6b098950df5c8c8f/" title="Accès à l’article dans le cache local : weathering software winter">weathering software winter</a> (<a href="https://100r.co/site/weathering_software_winter.html" title="Accès à l’article original distant : weathering software winter">original</a>)</li>
<li><a href="/david/cache/2022/c9441324cd8ba32c33817cdbc720bfda/" title="Accès à l’article dans le cache local : Grande Traversée du Poisson Blanc 2023">Grande Traversée du Poisson Blanc 2023</a> (<a href="https://poissonblanc.ca/experiences/la-grande-traversee/" title="Accès à l’article original distant : Grande Traversée du Poisson Blanc 2023">original</a>)</li>
<li><a href="/david/cache/2022/dddffbc175fe6802b5e33a92ebc440ec/" title="Accès à l’article dans le cache local : Année 2022 en revue">Année 2022 en revue</a> (<a href="https://blog.hello-bokeh.fr/2022/12/30/annee-2022-en-revue/" title="Accès à l’article original distant : Année 2022 en revue">original</a>)</li>
@@ -105,6 +109,8 @@
<li><a href="/david/cache/2022/669f9d9d8f0c6cfb8131887c17eecfa9/" title="Accès à l’article dans le cache local : Why the super rich are inevitable">Why the super rich are inevitable</a> (<a href="https://pudding.cool/2022/12/yard-sale/" title="Accès à l’article original distant : Why the super rich are inevitable">original</a>)</li>
<li><a href="/david/cache/2022/36a8b8a87633796d41c2574720812594/" title="Accès à l’article dans le cache local : Writing Is Magic">Writing Is Magic</a> (<a href="https://brooker.co.za/blog/2022/11/08/writing.html" title="Accès à l’article original distant : Writing Is Magic">original</a>)</li>
<li><a href="/david/cache/2022/42b4db67c4daf075941dc387d6be4aaf/" title="Accès à l’article dans le cache local : ETC-ISTE : Bonne année">ETC-ISTE : Bonne année</a> (<a href="http://etc-iste.blogspot.com/2022/12/bonne-annee.html" title="Accès à l’article original distant : ETC-ISTE : Bonne année">original</a>)</li>
</ul>

Loading…
Cancel
Save