<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Florian &quot;Aamu&quot; Kauder on Medium]]></title>
        <description><![CDATA[Stories by Florian &quot;Aamu&quot; Kauder on Medium]]></description>
        <link>https://medium.com/@AamuLumi?source=rss-889e900cc31c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OYMQTeRbAHWslS778ibzTw.png</url>
            <title>Stories by Florian &amp;quot;Aamu&amp;quot; Kauder on Medium</title>
            <link>https://medium.com/@AamuLumi?source=rss-889e900cc31c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 08:26:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@AamuLumi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[L’IA face à ses problèmes]]></title>
            <link>https://medium.com/ekino-france/l-ia-face-a-ses-problemes-bf3348ebf2ab?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf3348ebf2ab</guid>
            <category><![CDATA[work]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[society]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[ecology]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 11:03:16 GMT</pubDate>
            <atom:updated>2025-12-17T11:03:16.888Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YrPELOx64OLVh1oVh1R5g.png" /><figcaption><a href="https://pixabay.com/fr/illustrations/artificiel-intelligence-machine-4082314/">Source : Mohammed_hassan</a> avec quelques modifications</figcaption></figure><p>La “<em>révolution IA</em>” est partout. L’intelligence artificielle s’installe de plus en plus dans nos outils, dans nos discussions, dans nos vies. Cette technologie apporte un lot de nouveaux usages jusqu’ici impensables il y a une dizaine d’années. On peut aussi bien générer de la poésie à la manière de Leopardi que de construire un film d’auteur par la simple force de ses doigts sur un clavier. On peut même y découvrir <a href="https://www.nytimes.com/2025/01/15/technology/ai-chatgpt-boyfriend-companion.html">un petit ami</a> fidèle, disponible et riche de connaissances derrière ce simple courant électrique informatisé.</p><p>Néanmoins, si les apports de cette technologie ne sont plus à prouver, une part plus sombre reste présente. Ce revers de la médaille, perçu souvent à tort comme un courant techno-pessimiste, amène un lot de questions importantes auxquelles nous n’avons pas encore répondu. Et ce sont ces réponses, tantôt techniques, tantôt morales, qui compliqueront ou non la démocratisation de l’IA.</p><p>Le but de cet article n’est pas d’être inutilement pessimiste mais <strong>de construire un inventaire des problèmes auxquels nous (en tant que <em>société</em>) devons répondre pour poursuivre efficacement cette révolution de l’IA</strong>. Afin de rendre cet inventaire plus accessible, chaque problème est représenté par une question sans réponse. La réflexion de chaque question est argumentée après ladite question. Des médias d’ouverture sont aussi proposés pour chaque problème, si vous souhaitez creuser plus loin sur l’un d’entre eux.</p><p><strong>Il est important de noter que cet article ne propose pas de solutions</strong>. La grandeur des domaines traités implique une expertise sur chacun desdits domaines afin de pouvoir prétendre apporter une solution. Faute d’expertise polymathe, cet article suit un axe documentaire. Des angles morts pouvant toujours subsister dans ces réflexions, cet inventaire n’est pas exhaustif.</p><h3>Les problèmes écologiques et énergétiques</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mqPmZ1RKpHPMeAwg.jpg" /><figcaption><a href="https://pixabay.com/photos/glacier-sea-ocean-water-nature-7187291/">Source : Janvanbizar — Pixabay</a></figcaption></figure><blockquote><strong>Problème 1</strong></blockquote><blockquote><strong>Comment éviter que l’IA participe activement à une future crise de l’eau ?</strong></blockquote><p>En 2019, Google avait construit des data-centers supplémentaires en Arizona, ce qui conduisit à <a href="https://time.com/5814276/google-data-centers-water/">un article du Time</a> insistant lourdement sur le fait que <strong>ces data-centers consommaient beaucoup trop d’eau dans des zones déjà affectées par la sécheresse</strong>. L’Arizona étant déjà l’une des principales victimes, l’État s’était retrouvé dans des combats politiques pour essayer de continuer à pouvoir fournir de l’eau aux habitants.</p><p>Cette crise de l’eau ne s’est absolument pas améliorée avec le temps comme on a pu le constater avec les récentes sécheresses. Et, en parallèle, l’IA augmente la nécessité d’avoir plus de datacenters, donc <a href="https://andthewest.stanford.edu/2025/thirsty-for-power-and-water-ai-crunching-data-centers-sprout-across-the-west/">encore et toujours plus d’eau</a> à disposition. Mis en corrélation avec les <a href="https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_SPM.pdf">prévisions du GIEC</a> concernant des sécheresses beaucoup plus courantes, <strong>le futur s’oriente vers une guerre de l’eau</strong> afin de définir qui des habitant-es ou des machines doivent être hydratés.</p><blockquote><strong>Problème 2</strong></blockquote><blockquote><strong>Comment concilier la consommation énergétique des data centers et la crise écologique ?</strong></blockquote><p>L’IA nécessite beaucoup de processeurs graphiques pour être entraînée et pour fonctionner. <strong>La demande en énergie a donc grimpé d’une manière peu conventionnelle</strong>. Si bien que les <a href="https://www.instituteforenergyresearch.org/the-grid/energy-department-report-raises-blackout-risks-from-ai-and-increased-electrification-if-current-utility-plans-continue/">centrales à charbon ont été rouvertes pour essayer de sauver les américain-es des coupures électriques</a>. De multiples plans d’investissement ont donc été décidés afin de fournir plus d’énergie et sauver les data-centers. Sauf que ces plans prennent des années pour être achevés, laissant donc la part belle à une <a href="https://iee.psu.edu/news/blog/why-ai-uses-so-much-energy-and-what-we-can-do-about-it">consommation d’énergies fossiles largement accrue</a> pendant ce temps.</p><p>Beaucoup moins loin de nous, et après que le gouvernement nous invitait <a href="https://www.lemonde.fr/politique/article/2022/10/06/sobriete-energetique-le-plan-du-gouvernement-pour-passer-l-hiver-et-preparer-l-avenir_6144616_823448.html">à la sobriété énergétique pour éviter les coupures pendant l’hiver</a> (devenu <a href="https://www.service-public.gouv.fr/particuliers/actualites/A16856">maintenant un levier écologique pour sauver l’environnement</a>), l’Alsace est maintenant en négociation <a href="https://www.rue89strasbourg.com/alsace-data-center-microsoft-consommera-comme-350000-foyers-347813">pour accueillir un data center de Microsoft dont la consommation énergétique a été estimée équivalente à celle de 350 000 foyers</a>. Pendant ce temps, <a href="https://www.lemonde.fr/economie/article/2025/05/31/data-centers-les-hauts-de-france-revent-de-devenir-la-vallee-europeenne-de-l-intelligence-artificielle_6609398_3234.html">les Hauts-de-France souhaitent devenir une zone reconnue sur l’IA</a> et <a href="https://www.solutions-numeriques.com/choose-france-quels-projets-en-infrastructures-et-services-ia/">l’Île-de-france va accueillir son lot de datacenters</a>, le tout <a href="https://www.lemagit.fr/actualites/366619359/Datacenters-IA-en-France-promesses-contre-promesses">sous couvert d’une réduction fiscale sur l’électricité</a>. Comble de l’inquiétude, les <a href="https://www.lemonde.fr/planete/article/2025/07/10/les-investissements-publics-et-prives-lies-au-climat-ont-baisse-en-france-en-2024_6620373_3244.html">investissements liés au climat ont baissé de 5 % entre 2023 et 2024</a>. De fait, <strong>on assiste à une protection des entreprises d’IA afin que la France devienne une puissance dans ce domaine</strong>, au <a href="https://www.notre-environnement.gouv.fr/ree-2024/4-grands-defis-pour-demain/changement-climatique/article/changement-climatique-des-effets-de-plus-en-plus-perceptibles">détriment d’efforts accrus sur l’écologie.</a></p><p>Pour aller plus loin sur ces problèmes :</p><ul><li><a href="https://www.technologyreview.com/2025/05/20/1116327/ai-energy-usage-climate-footprint-big-tech/">[EN] <strong>We did the math on AI’s energy footprint. Here’s the story you haven’t heard. </strong>— J. O’Donnell, C. Crownhart — MIT Technology Review — 20 mai 2025</a></li><li><a href="https://hal.inrae.fr/hal-05020408v1/document">[FR] <strong>Les impacts de l’IA sur l’environnement </strong>— F. Garcia, S. Schbath — Annales des Mines — Mars 2025</a></li><li><a href="https://hbr.org/2024/07/the-uneven-distribution-of-ais-environmental-impacts">[EN] <strong>The Uneven Distribution of AI’s Environmental Impacts</strong> — S. Ren, A. Wierman — Harvard Business Review— 15 Juillet 2024</a></li></ul><h3>Le problème financier</h3><blockquote><strong>Problème 3</strong></blockquote><blockquote><strong>Comment créer une économie de l’IA stable et indépendante des investissements financiers ?</strong></blockquote><p>D’après le graphique (G1), l’IA se caractérise par des financements élevés <a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/economy">à hauteur de 250 milliards de dollars en 2024</a>. La première information intéressante est que cette valeur traduit <strong>un attrait du domaine pour les investisseurs et les investisseuses, mais aussi </strong><a href="https://epoch.ai/blog/how-much-does-it-cost-to-train-frontier-ai-models"><strong>une quantité croissante d’argent nécessaire afin de développer des modèles de plus en plus puissants</strong>, si bien que l’on prévoit des entraînements à un coût de plus de 1 milliard d’euros pour 2027</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPoVTTXZwJV86LdC0FVaDA.png" /><figcaption><a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/economy">(G1) — Source : The 2025 AI Index Report — HAI Stanford University</a></figcaption></figure><p>La deuxième information que l’on peut extraire de ce graphique est la tendance des investissements au cours des dernières années. En considérant que <a href="https://www.linfodurable.fr/finance-durable/2021-record-pour-le-capital-investissement-se-veut-plus-durable-30482">2021 est une année exceptionnelle en termes de financement</a>, les investissements dans l’IA sont stables à hauteur de 250 milliards de dollars depuis 2021. À l’inverse, <a href="https://www.cleantechforeurope.com/publications/cleantech-annual-briefing-2024">les investissements dans la Cleantech ont mondialement diminué depuis 2021, passant de 51,7 milliards d’euros à 31,8 milliards d’euros en 2024</a>. Et, de manière plus générale, <strong>le secteur de l’IA draine une très grande partie des investissements au détriment des autres secteurs</strong>. <a href="https://www.visualcapitalist.com/ais-rising-share-of-u-s-venture-capital-investment/">Pendant le 1er trimestre de 2025 aux Etats-Unis, les investissements dans l’IA ont représenté 71 % des investissements totaux</a>. Pendant ce temps, en France, <a href="https://www.publicsenat.fr/actualites/economie/intelligence-artificielle-emmanuel-macron-annonce-109-milliards-deuros-dinvestissements-prives">le Président de la République annonce une enveloppe de 109 milliards d’euros d’investissement dans l’IA financée majoritairement par les Émirats arabes unis</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/0*cQK6mrByKvt0qJNM" /><figcaption><a href="https://www.bloomberg.com/news/features/2025-10-07/openai-s-nvidia-amd-deals-boost-1-trillion-ai-boom-with-circular-deals">(G2) — Source : Bloomberg</a></figcaption></figure><p>En parallèle, <a href="https://www.bloomberg.com/news/features/2025-10-07/openai-s-nvidia-amd-deals-boost-1-trillion-ai-boom-with-circular-deals">plusieurs articles de Bloomberg</a> ont mis un coup de projecteur sur les financements circulaires qui composent en grande partie l’IA d’un point de vue financier, <strong>mettant à nouveau l’accent sur l’existence d’une bulle IA</strong> (graphique G2). Même <a href="https://www.businessinsider.com/why-ai-bubble-meta-sam-altman-mit-report-2025-8">Sam Altman, le CEO d’OpenAI, parle de cette bulle d’investissement</a> dont <a href="https://www.dbresearch.com/PROD/RI-PROD/PDFVIEWER.calias?pdfViewerPdfUrl=PROD0000000000604456">l’explosion va mettre à mal l’économie américaine</a>. Face à ces risques, <a href="https://www.reuters.com/world/china/investors-use-dotcom-era-playbook-dodge-ai-bubble-risks-2025-10-24/">les investisseurs et les investisseuses commencent déjà à revoir leurs stratégies</a> afin d’éviter de <a href="https://edition.cnn.com/2025/10/18/business/ai-bubble-analyst-nightcap">vivre une explosion de la bulle Dotcom 2.0</a>.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/economy">[EN] <strong>The 2025 AI Index Report: Chapter 4: Economy</strong>— HAI Stanford University — Avril 2025</a></li><li><a href="https://pluralistic.net/2025/09/27/econopocalypse/">[EN] <strong>The real (economic) AI apocalypse is nigh</strong> — C. Doctorow —Pluralistic — 27 Septembre 2025</a></li><li><a href="https://www.businessinsider.com/why-ai-bubble-meta-sam-altman-mit-report-2025-8">[EN] <strong>3 reasons everyone is talking about an AI bubble</strong> — A. Tecotzky — Business Insider — 26 Août 2025</a></li></ul><h3>Les problèmes liés au travail</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1O6i5fApUIzNWG-9.jpg" /><figcaption><a href="https://pixabay.com/photos/architecture-skyscraper-building-2083687/">Source : auteur-e inconnu-e — Pixabay</a></figcaption></figure><blockquote><strong>Problème 4</strong></blockquote><blockquote><strong>Comment augmenter la productivité via l’IA sans diminuer le bien-être des travailleurs et travailleuses ?</strong></blockquote><p>Probablement l’impact le plus attendu par les investisseurs et les investisseuses, <a href="https://www.mckinsey.com/capabilities/mckinsey-digital/our-insights/superagency-in-the-workplace-empowering-people-to-unlock-ais-full-potential-at-work"><em>“l’intelligence artificielle […] possède le potentiel d’être aussi innovante que le moteur à vapeur l’a été pendant la révolution industrielle du 19ème siècle”</em>, selon un article de McKinsey citant une étude de McKinsey</a>. <strong>Théoriquement, l’IA est une technologie qui pourrait révolutionner notre façon de travailler et devenir un outil <em>magique </em>pour nous aider sur divers problèmes</strong>. Ses capacités en font un assistant parfait pour construire des notes de réunion ou retrouver des informations disséminées dans un ensemble de documents. Cependant, dans la pratique à court terme, ces améliorations ont des résultats mitigés.</p><p>En termes de productivité, <a href="https://theconversation.com/does-ai-actually-boost-productivity-the-evidence-is-murky-260690">on retrouve autant de cas positifs que de cas négatifs</a>. <strong>À court terme, il est donc difficile de qualifier l’impact de l’IA sur le quotidien des employé-es</strong>, et il est nécessaire d’attendre des études plus larges afin d’avoir cette réponse. Néanmoins, un article a déjà permis d’éclairer la pratique du <a href="https://hbr.org/2025/09/ai-generated-workslop-is-destroying-productivity"><strong><em>AI workslop</em></strong>, c’est-à-dire des documents de travail qui ont l’air d’être correctement faits mais dont le contenu est en réalité totalement bâclé</a>. Cette pratique diminue donc purement et simplement la productivité des groupes de travail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Dn_Un0oYGsrTgYKxviQdw.jpeg" /><figcaption><a href="https://www.upwork.com/research/ai-enhanced-work-models">(G3) Source : From Burnout to Balance: AI-Enhanced Work Models — Upwork</a></figcaption></figure><p>Sur le plan du bien-être au travail pour les employé-es, on constate aussi bien <a href="https://www.nature.com/articles/s41598-025-98241-3">des conditions de travail inchangées dans le cas d’entreprises allemandes</a> que <a href="https://www.upwork.com/research/ai-enhanced-work-models">des conditions dégradées dans le cas d’entreprises anglophones</a> (d’après le graphique G3). Une explication de cette différence pourrait être l’écart entre la sécurité de l’emploi beaucoup plus forte pour les entreprises allemandes par rapport aux entreprises anglophones, inhibant la nécessité d’une productivité largement accrue pour conserver son emploi. Par conséquent, <strong>l’intégration de l’IA dans les milieux de travail nécessiterait une législation du travail forte et un environnement de travail sain</strong> afin d’éviter l’augmentation du nombre de burn-outs.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://www.nature.com/articles/s41598-025-98241-3">[EN] <strong>Artificial intelligence and the wellbeing of workers</strong>— O. Giuntella, J. Konig, L. Stella — Nature — 23 Juin 2025</a></li><li><a href="https://theconversation.com/does-ai-actually-boost-productivity-the-evidence-is-murky-260690">[EN] <strong>Does AI actually boost productivity? The evidence is murky </strong>— J. Whittle — The Conversation — 10 Juillet 2025</a></li></ul><blockquote><strong>Problème 5</strong></blockquote><blockquote><strong>Comment permettre aux travailleurs et travailleuses des métiers détruits par l’IA de vivre ?</strong></blockquote><p>La peur de la perte de l’emploi causée par l’avènement de l’IA n’est absolument pas une illusion. <a href="https://www.reuters.com/sustainability/amazon-lay-off-about-14000-roles-2025-10-28/">Amazon</a>, <a href="https://www.traxtech.com/ai-in-supply-chain/ups-deploys-ai-automation-to-replace-43000-workers">UPS</a>, <a href="https://www.theregister.com/2025/11/26/hp_inc_q4_2025/">HP</a>, <a href="https://www.sdxcentral.com/news/cisco-announces-layoffs-days-after-ceo-said-it-wont-cut-jobs-in-favor-of-ai/">Cisco</a>, <a href="https://www.theverge.com/news/657594/duolingo-ai-first-replace-contract-workers">Duolingo</a> ou encore <a href="https://www.cnbc.com/2025/05/14/klarna-ceo-says-ai-helped-company-shrink-workforce-by-40percent.html">Klarna</a> sont des exemples de licenciements massifs spécifiquement attribués à l’IA. Ces exemples, dans <a href="https://layoffs.fyi/">un secteur de la tech qui a déjà été très touché ces dernières années par les vagues de licenciement</a>s, ne font que <strong>rajouter à l’angoisse permanente que partagent les travailleurs et travailleuses de la tech</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rS3LwZnkP6aBnQyXR7Ebww.png" /><figcaption><a href="https://layoffs.fyi/">(G4) Source : Layoffs.fyi</a></figcaption></figure><p>Il faut cependant considérer que <strong>ces exemples sont liés à des entreprises anglo-saxonnes avec, comme expliqué dans le problème précédent, une sécurité de l’emploi plus faible</strong>. En se penchant sur le contexte français, <a href="https://www.ouest-france.fr/high-tech/intelligence-artificielle/cette-entreprise-francaise-vire-217-salaries-pour-les-remplacer-par-une-intelligence-artificielle-1dea7af2-560d-11ee-ba56-a7ce59b686ce">le cas de licenciement au profit de l’IA le plus connu est celui de Onclusive</a>. L’entreprise aurait licencié 217 personnes sous le motif de l’IA, <a href="https://www.precisement.org/blog/Licenciement-pour-IA-vrai-ou-faux.html">mais ce motif est contesté</a>. De plus, <a href="https://www.frenchweb.fr/ia-en-entreprise-la-jurisprudence-qui-change-la-donne-et-pas-dans-une-moindre-mesure/454213">une décision du tribunal judiciaire de Nanterre du 14 février 2025 semble donner une première direction de la mise en place de l’IA dans les entreprises en faveur de la sécurité des emplois</a>. Néanmoins, il est nécessaire d’attendre une première jurisprudence de la Cour de Cassation afin de définitivement confirmer cette direction.</p><p>En dehors de la tech, cette angoisse permanente est aussi présente. <strong>Les travailleurs et travailleuses dans des </strong><a href="https://www.theguardian.com/technology/2025/mar/15/its-happening-fast-creative-workers-and-professionals-share-their-fears-and-hopes-about-the-rise-of-ai"><strong>domaines comme le graphisme, la traduction, le son, la photographie, i.e. de métiers créatifs, sont aujourd’hui très largement affectés</strong></a><strong> par une baisse de leurs revenus.</strong> Et la raison est simple : pourquoi payer une personne 100 € afin d’obtenir une image faite main alors qu’un abonnement à ChatGPT est trois fois moins cher et permet d’obtenir autant d’images que l’on veut ? En appliquant ce raisonnement à la musique, on obtient donc <a href="https://www.lemonde.fr/idees/article/2025/10/14/l-ia-destabilise-dangereusement-le-marche-de-la-musique_6646627_3232.html">une crise sur un marché déjà très fragilisé par l’avènement des plateformes de diffusion musicale</a>.</p><p>L’unique moyen pour contrer les effets néfastes de cette destruction progressive des emplois est “simple” : <a href="https://aamulumi.info/Sociologie/Vers-une-nouvelle-conception-du-travail#pr%C3%A9parer-lavenir--la-r%C3%A9duction-du-temps-de-travail">il est nécessaire de repenser le fonctionnement de notre société</a>. Sans emploi, les gens ne peuvent pas gagner d’argent. Et sans argent, les gens ne peuvent pas vivre. <strong>Notre modèle de société actuel n’est donc pas compatible avec les conséquences de l’IA sur les domaines créatifs</strong>, et <a href="https://www.qmul.ac.uk/media/news/2025/queen-mary-news/pr/creative-industry-workers-feel-job-worth-and-security-under-threat-from-ai-.html">ces conséquences vont continuer inlassablement à empirer</a>.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://www.youtube.com/watch?v=_zfN9wnPvU0">[EN] <strong>AI Slop is destroying the Internet</strong> — Kurzgesagt — In a Nutshell — Youtube — Octobre 2025</a></li><li><a href="https://economics.mit.edu/sites/default/files/2024-04/The%20Simple%20Macroeconomics%20of%20AI.pdf">[EN] <strong>The Simple Macroeconomics of AI</strong> — D. Acemoglu — MIT — 5 Avril 2024</a></li><li><a href="https://aamulumi.info/Sociologie/Vers-une-nouvelle-conception-du-travail#pr%C3%A9parer-lavenir--la-r%C3%A9duction-du-temps-de-travail">[FR] <strong>Vers une nouvelle conception du travail ?</strong> — F. Kauder —aamulumi.info — 2 Octobre 2019</a></li></ul><blockquote><strong>Problème 6</strong></blockquote><blockquote><strong>Comment continuer à former des personnes expérimentées face à la diminution des postes de juniors ?</strong></blockquote><p>En considérant les métiers qui sont affectés directement par l’IA, <a href="https://digitaleconomy.stanford.edu/wp-content/uploads/2025/11/CanariesintheCoalMine_Nov25.pdf">il y a un déclin net du nombre de recrutements sur des personnes en début de carrière</a>. <a href="https://www.economist.com/graphic-detail/2025/10/13/can-ai-replace-junior-workers">Ce déclin est également absent chez les travailleurs et travailleuses plus expérimentés.</a> Or, si ce déclin peut paraître comme une tendance temporaire à court terme, il est important de garder en tête que <strong>sans débutants et débutantes, il n’y a pas d’experts et d’expertes</strong>.</p><p>Il est très facile d’illustrer les conséquences d’un manque de formation par une chose que nous connaissons bien en France : le manque de médecins. <a href="https://www.franceinfo.fr/sante/deserts-medicaux/acces-aux-soins-pourquoi-manque-t-on-de-medecins-generalistes-en-france_7108128.html">La politique du numerus clausus a limité le nombre de personnes formées à la médecine entre 1970 et 2020.</a> De fait, la population grandissante et la densité médicale faiblissant, <a href="https://www.info.gouv.fr/actualite/former-plus-principe-de-solidarite-le-plan-du-gouvernement-face-aux-deserts-medicaux">ce manque de formation des débutants et débutantes a créé une situation médicale très tendue</a>. <a href="https://www.lemonde.fr/economie/article/2023/05/23/informatique-le-secteur-bancaire-manque-de-specialistes-du-cobol_6174417_3234.html">Ce type de scénario existe déjà dans l’informatique avec une pénurie de spécialistes du COBOL créant un climat alarmant pour le secteur bancaire</a>. Et, faute de continuer à former des personnes, la “<em>cobol-isation</em>” des métiers pourrait s’étendre.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://hbr.org/2025/09/the-perils-of-using-ai-to-replace-entry-level-jobs">[EN] <strong>The Perils of Using AI to Replace Entry-Level Jobs</strong> — A. C. Edmondson, T. Chamorro-Premuzic — Harvard Business Review — 16 Septembre 2025</a></li><li><a href="https://digitaleconomy.stanford.edu/publications/canaries-in-the-coal-mine/">[EN] <strong>Canaries in the Coal Mine? Six Facts about the Recent Employment Effect of Artificial Intelligence</strong> — E. Brynjolfsson, B. Chandar, R. Chen — HAI Stanford University — Novembre 2025</a></li><li><a href="https://www.understandingai.org/p/new-evidence-strongly-suggest-ai">[EN] <strong>New evidence strongly suggests AI is killing jobs for young programmers </strong>— T. B. Lee — Understanding AI — 28 Août 2025</a></li></ul><h3>Les problèmes juridiques</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nnUF-T9ffDYkBr4c.jpg" /><figcaption><a href="https://pixabay.com/photos/judge-hammer-judgement-court-1587300/">Source : Daniel_B_photos — Pixabay</a></figcaption></figure><blockquote><strong>Problème 7</strong></blockquote><blockquote><strong>Comment garantir la protection de la propriété intellectuelle face à une exploitation illégale des données pour l’entraînement des IA ?</strong></blockquote><p>L’entraînement des modèles des IAs se traduit par <strong>l’exploitation de médias différents, et, très généralement, de médias soumis à la propriété intellectuelle</strong>. De fait, <a href="https://www.bakerlaw.com/services/artificial-intelligence-ai/case-tracker-artificial-intelligence-copyrights-and-class-actions/">un grand nombre de procédures judiciaires sont en cours</a>, et, dernièrement, <a href="https://www.japantimes.co.jp/business/2025/10/07/tech/open-ai-sora-2-copyright/">OpenAI a réussi à se mettre à dos une grande partie de l’industrie japonaise avec Sora 2</a> (<a href="https://www.japantimes.co.jp/business/2025/10/16/companies/japan-opt-in-model-sora2/">et aussi le gouvernement japonais</a>). Pour éviter ces problèmes légaux, les différentes entreprises entraînant des IAs essaient une nouvelle méthode : se servir des données de leurs utilisateurs et utilisatrices. On retrouve donc maintenant <a href="https://www.lemonde.fr/pixels/article/2025/09/22/linkedin-va-utiliser-les-donnees-personnelles-de-ses-utilisateurs-pour-entrainer-son-ia_6642418_4408996.html">LinkedIn (Microsoft)</a>, <a href="https://www.cnil.fr/fr/meta-entrainement-ia-donnees-utilisateurs">Instagram &amp; Facebook (Meta)</a> et <a href="https://intelligence-artificielle.developpez.com/actu/364783/De-nouvelles-conditions-de-service-permettent-a-X-d-utiliser-vos-donnees-pour-entrainer-son-IA-les-messages-textuels-les-photos-et-les-videos-sont-utilises-pour-l-entrainement-de-Grok-le-chatbot-d-Elon-Musk/">X</a> à cette table, mais aussi <a href="https://www.wired.com/story/how-to-stop-your-data-from-being-used-to-train-ai/">Slack, Figma ou encore Tumblr</a>.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://www.bakerlaw.com/services/artificial-intelligence-ai/case-tracker-artificial-intelligence-copyrights-and-class-actions/">[EN] <strong>Case Tracker: Artificial Intelligence, Copyrights and Class Actions</strong> — T. M. Weisenberger, D. C. Milton, H. A. Enright — BakerHostetler</a></li></ul><blockquote><strong>Problème 8</strong></blockquote><blockquote><strong>Comment faire évoluer le principe de propriété intellectuelle face à la génération d’oeuvres ?</strong></blockquote><p>En se basant sur le droit français (suivant l’AI Act de l’Union Européenne), la règle est simple : <a href="https://www.lagbd.org/IA_generative_et_creations_de_mode_quels_enjeux_juridiques">une création intégralement créée par une IA ne peut être soumise au droit d’auteur car l’IA n’est pas humaine</a>. Cependant, <a href="https://www.village-justice.com/articles/droit-auteur-qui-est-auteur,49508.html">si l’IA n’est utilisée qu’à titre d’outil, le droit d’auteur revient alors à l’auteur-e</a>. Passé cette simplicité, une question vient alors tout remettre en cause : <strong>comment différencier une création de l’IA et une création assistée par l’IA ?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pw5BZwp_ZYyGP8oP.jpg" /><figcaption><a href="https://fr.wikipedia.org/wiki/Th%C3%A9%C3%A2tre_d%27op%C3%A9ra_spatial">(I2) Source : Théâtre d’opéra spatial — Midjourney — Prompts de Jason M. Allen</a></figcaption></figure><p>Une excellente illustration de ce problème se pose dans le fameux <a href="https://www.lesinrocks.com/art/un-tableau-concu-par-une-intelligence-artificielle-gagne-un-prix-et-cree-la-polemique-495797-06-09-2022/">cas de Jason M. Allen qui avait gagné un concours d’art en 2022 avec une oeuvre générée par IA</a> (image I2 ci-dessus). Suivant cet événement, <a href="https://www.cpr.org/2024/09/26/colorado-springs-artist-appeals-copyright-rejection-ai-art/">il a décidé de faire enregistrer son oeuvre à l’U.S. Copyright Office, mais celui-ci à refusé l’enregistrement vu que celle-ci a été générée par une IA</a>. Ce qui amène donc une réflexion morale sur un ensemble de sujets :</p><ul><li>si les oeuvres générées par IA sont refusées, que se passe-t-il si les oeuvres ne sont pas indiquées comme étant générées par IA ? Et, à l’inverse, est-ce que des oeuvres faites par des humain-es vont être refusées car trop proches des créations des IAs ?</li><li>si le droit d’auteur ne peut être appliqué que pour des oeuvres créées par des humains, qu’en est-il des oeuvres construites par des algorithmes et reconnues comme celles de <a href="https://www.centrepompidou.fr/fr/pompidou-plus/magazine/article/vera-molnar-aux-sources-du-code">Vera Molnár</a> ou de <a href="https://www.galeriecharlot.com/fr/51/Manfred-Mohr">Manfred Mohr</a> ?</li><li>à partir de quel moment doit-on considérer qu’une oeuvre est créée par assistance de l’IA ou est créée par l’IA ? Est-ce que l’application d’un simple filtre de couleur par un-e humain-e rend l’oeuvre humaine ?</li></ul><p><strong>De telles questions ne sont que difficilement solvables sans outils de détection adaptés</strong>. Et ces outils, bien qu’existants, ne sont déjà <a href="https://lawlibguides.sandiego.edu/c.php?g=1443311&amp;p=10721367">pas recommandés dans le contexte académique</a> à cause d’un trop grand nombre d’erreurs.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://www.lagbd.org/IA_generative_et_creations_de_mode_quels_enjeux_juridiques">[FR] <strong>IA générative et créations de mode : quels enjeux juridiques ?</strong> — G. Makoundou — La Grande Bibliothèque du Droit — Juillet 2024</a></li><li><a href="https://artificialintelligenceact.eu/ai-act-explorer/">[EN] <strong>The AI Act Explorer</strong> — Future of Life Institute</a></li><li><a href="https://www.ropesgray.com/en/insights/alerts/2023/03/can-works-created-with-ai-be-copyrighted-copyright-office-issues-formal-guidance">[EN] <strong>Can Works Created with AI Be Copyrighted? Copyright Office Issues Formal Guidance</strong> — E. Gourvitz, S. L. Ameri — Ropes&amp;Gray — Mars 2023</a></li></ul><h3>Les problèmes sociaux</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9U6Kag0nynWjt6P0.jpg" /><figcaption><a href="https://pixabay.com/fr/photos/v%C3%A9rit%C3%A9-journal-nouvelles-imprim%C3%A9-166853/">Source : PDPics — Pixabay</a></figcaption></figure><blockquote><strong>Problème 9</strong></blockquote><blockquote><strong>Comment éviter que l’intelligence artificielle devienne un catalyseur de propagation de fausses informations ?</strong></blockquote><p><a href="https://theconversation.com/facebook-data-reveal-the-devastating-real-world-harms-caused-by-the-spread-of-misinformation-265742"><strong>Les réseaux sociaux ont un impact direct sur notre monde</strong>. Et donc propager une fausse information a de réelles conséquences.</a> Par exemple, <a href="https://www.sciencedirect.com/science/article/pii/S0176268025000011">les campagnes marketing sur Facebook ont eu des impacts directs sur l’élection présidentielle américaine de 2016</a>, et <a href="https://www.sciencedirect.com/science/article/abs/pii/S2352250X22001282">les théories du complot se développent dangereusement via des chambres d’écho des réseaux sociaux</a>. En parallèle de ces évolutions, <a href="https://www.edps.europa.eu/press-publications/publications/techsonar/fake-news-detection_en">les outils de détection des fake news continuent de se développer</a>, mais le mal est déjà fait et <a href="https://theconversation.com/sommes-nous-entres-dans-une-epoque-de-post-verite-246659">une partie des sociologues et politologues parlent de notre entrée dans l’ère de la post-vérité</a> où le mensonge n’est plus odieux et la vérité n’est plus primordiale.</p><p>Dans ce contexte compliqué, il est nécessaire de bien comprendre que <strong>l’IA va avoir un impact important sur plusieurs aspects de la vérité</strong>. Son utilisation <a href="https://www.sciencedirect.com/science/article/pii/S2666990024000120">permet de réduire drastiquement le temps nécessaire à construire une information</a> (rédaction, mise en page, correction, publication), qu’il s’agisse d’une information textuelle, graphique, ou même audiovisuelle. Par conséquent, <a href="https://sherwood.news/tech/ai-created-videos-are-quietly-taking-over-youtube/">des plateformes comme Youtube font face à une quantité croissante de contenus partiellement ou intégralement générés par IA</a>. De plus, et à cause de <a href="https://www.sciencedirect.com/science/article/pii/S0747563220303034">notre incapacité à différencier des informations générées et non générées</a> (<a href="https://www.sciencedirect.com/science/article/abs/pii/S2666799123000436">bien que des méthodes s’affinent pour pallier à ce problème</a>), la <a href="https://arxiv.org/pdf/2405.11697">mésinformation prend une ampleur nouvelle depuis 2023 et l’avènement des images générées</a>.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://arxiv.org/abs/2405.11697"><strong>[EN] AMMEBA: A Large-Scale Survey and Dataset of Media-Based Misinformation In-The-Wild</strong> —N. Dufour, A. Pathak, P. Samangouei, N. Hariri, S. Deshetti, A. Dudfield, C. Guess, P. H. Escayola, B. Tran, M. Babakar, C. Bregler — arXiv — Mai 2024</a></li><li><a href="https://arxiv.org/abs/2411.05060v2"><strong>[EN] A Guide to Misinformation Detection Data and Evaluation</strong> — C. Thibault, J.-J. Tian, G. Peloquin-Skulski, T. L. Curtis, J. Zhou, F. Laflamme, Y. Guan, R. Rabbany, J.-F. Godbout, K. Pelrine — arXiv — Août 2025</a></li></ul><blockquote><strong>Problème 10</strong></blockquote><blockquote><strong>Comment éviter que l’intelligence artificielle soit utilisée à des fins de violences psychologiques et morales ?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x2p-Pm2cmCg-PFtQ5aVzEg.png" /><figcaption><a href="https://www.ipsos.com/sites/default/files/ct/news/documents/2022-02/Ipsos_Feministes%20contre%20le%20cyberharcelement_Rapport.pdf">(I3) Source : IPSOS — Cyberviolence et cyberharcèlement : état des lieux d’un phénomène répandu</a></figcaption></figure><p><strong>Les faits de cyberviolence sont déjà nombreux</strong>. <a href="https://www.ipsos.com/sites/default/files/ct/news/documents/2022-02/Ipsos_Feministes%20contre%20le%20cyberharcelement_Rapport.pdf">Dans un sondage statistique fait en 2021 (image I3), 41 % des français et françaises déclaraient avoir vécu des faits de cyberviolence</a>. Cette statistique augmente dramatiquement et systémiquement pour les personnes issues de minorités et les jeunes. L’échantillon étant insatisfaisant pour déterminer le taux de condamnations, nous pouvons estimer un ordre de grandeur de ce taux via une hypothèse : les faits de violences sexistes et sexuelles (VSS) sont considérés comme plus graves que les faits de cyberviolences. En suivant ce procédé, <a href="https://www.vie-publique.fr/rapport/298969-senat-rapport-sur-la-prevention-recidive-viol-et-agressions-sexuelles">et en considérant que moins de 10 % des victimes de VSS portent plainte et que moins de 10 % de ces plaintes donnent lieu à une condamnation</a>, on arrive à une valeur très faible de moins de 1 % de condamnations.</p><p>Dans ce contexte, <strong>l’intelligence artificielle a simplifié dangereusement l’accès à des outils de harcèlement. Dans une première mesure, l’IA peut être utilisée comme générateur de médias de harcèlement</strong>. <a href="https://www.sciencedirect.com/science/article/abs/pii/S0160791X25002799">Les criminels peuvent facilement construire des médias autant et même plus efficaces que les médias traditionnels</a>. On retrouve cette utilisation <a href="https://www.lemonde.fr/pixels/article/2025/07/28/des-videos-racistes-generees-par-ia-deferlent-sur-les-reseaux-sociaux-francais_6624896_4408996.html">en France à travers une pléthore de vidéos de gorilles à connotation raciste</a>, destinées à harceler les personnes issues d’autres ethnies.</p><p>Dans une seconde mesure similaire, <strong>l’IA est un outil extrêmement efficace pour la création des deepfakes</strong>. Et, de cette idée, <a href="https://news.ufl.edu/2025/05/non-consensual-fake-imagery/">le nombre de cas de génération de contenus explicites sans consentement a explosé</a>. <a href="https://arxiv.org/pdf/2411.09751v1">Les outils de “nudification” illégaux se sont multipliés, avec des modèles économiques différents mais souvent destinés à la même clientèle : les hommes</a>. On retrouve leur utilisation aussi bien <a href="https://www.journaldemontreal.com/2024/01/17/deux-influenceuses-deshabillees-par-lintelligence-artificielle-denoncent-les-lourdes-consequences">sur des influenceuses</a> <a href="https://www.radiofrance.fr/franceinfo/podcasts/les-voies-de-l-ia/episode-1-deepfakes-quand-l-ia-trahit-notre-intimite-6218028">que des femmes du quotidien</a>. Et de mal en pis, on retrouve aussi cet usage <a href="https://hai.stanford.edu/news/how-do-we-protect-children-in-the-age-of-ai">sur les enfantes et adolescentes, aussi bien par leurs camarades que par des pédocriminels</a>. Et, comme énoncé dans les problèmes juridiques, <a href="https://www.franceinfo.fr/internet/intelligence-artificielle/deepfakes-pornographiques-pourquoi-la-lutte-contre-les-images-generees-par-intelligence-artificielle-s-annonce-difficile_6382105.html">le manque de moyens de détection empêche la diminution du nombre de victimes.</a></p><p>Enfin, dans une troisième mesure, l’entraînement des modèles d’IA se fait par la création de jeux de données en labellisant notamment des milliers d’images (<a href="https://theconversation.com/ai-is-a-multi-billion-dollar-industry-its-underpinned-by-an-invisible-and-exploited-workforce-240568"><strong>procédé qui, par ailleurs, exploite des millions de gens</strong></a>). De fait, <a href="https://www.nature.com/articles/d41586-025-03298-9">l’IA va définir les choses de la même façon que nous les définissons. Ce qui signifie aussi <strong>retrouver les mêmes biais de stéréotypes de la société</strong></a>. On retrouve donc <a href="https://theconversation.com/australiana-images-made-by-ai-are-racist-and-full-of-tired-cliches-new-study-shows-263117">des biais racistes sur l’Australiana</a> et <a href="https://hai.stanford.edu/news/covert-racism-ai-how-language-models-are-reinforcing-outdated-stereotypes">sur l’African American English</a> ou encore <a href="https://www.unesco.org/en/articles/generative-ai-unesco-study-reveals-alarming-evidence-regressive-gender-stereotypes">des biais misogynes</a>. Il est cependant à noter que <a href="https://dl.acm.org/doi/10.1145/3743676">les LLMs semblent récemment évoluer dans le bon sens sur des sujets comme la transphobie</a> (<a href="https://www.out.com/news/chatbot-grok-generates-transphobic-comments">excepté Grok</a>).</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://arxiv.org/abs/2411.09751">[EN] <strong>Analyzing the AI Nudification Application Ecosystem</strong> — C. Gibson &amp; D. Olszewski &amp; N. G. Brigham &amp; A. Crowder &amp; K. R. B. Butler &amp; P. Traynor &amp; E. M. Redmiles &amp; T. Kohno — arXiv — Novembre 2024</a></li><li><a href="https://www.sciencedirect.com/science/article/abs/pii/S0160791X25002799">[EN] <strong>AI can be cyberbullying perpetrators: Investigating individuals’ perceptions and attitudes towards AI-generated cyberbullying</strong> — W. Pei, F. Wang, Y. T. Chua — ScienceDirect — Septembre 2025</a></li><li><a href="https://theconversation.com/australiana-images-made-by-ai-are-racist-and-full-of-tired-cliches-new-study-shows-263117">[EN] <strong>‘Australiana’ images made by AI are racist and full of tired cliches, new study shows</strong> — T. Leaver &amp; S. Srdarov — The Conversation — 14 Août 2025</a></li></ul><h3>Le problème sur la science</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5ekRodd1_3wVJD83.jpg" /><figcaption><a href="https://pixabay.com/fr/photos/livre-ouvert-une-biblioth%C3%A8que-1428428/">Source : lil_foot_ — Pixabay</a></figcaption></figure><blockquote><strong>Problème 11</strong></blockquote><blockquote><strong>Comment éviter que l’intelligence artificielle contribue à la pollution globale dans les articles scientifiques ?</strong></blockquote><p>Depuis plusieurs années, <strong>le monde de la publication scientifique est frappé par la publication massive de faux articles scientifiques</strong>. Le nombre de <a href="https://fr.wikipedia.org/wiki/R%C3%A9tractation_(publication_acad%C3%A9mique)">rétractations</a> <a href="https://www.theguardian.com/science/2024/feb/03/the-situation-has-become-appalling-fake-scientific-papers-push-research-credibility-to-crisis-point">est passé d’environ 1 000 en 2013 à plus de 10 000 en 2023</a>. <a href="https://www.science.org/content/article/paper-mills-bribing-editors-scholarly-journals-science-investigation-finds">Cette augmentation est due à la corruption grandissante dans le milieu, mettant en scène des fermes à articles et des journaux de publication avides d’argent</a>, <a href="https://www.sciencedirect.com/science/article/pii/S0895435624003056#sec3">pour permettre à certains chercheurs et chercheuses d’accéder à des promotions ou des primes</a> ou pire, <a href="https://www.tandfonline.com/doi/full/10.1080/1369118X.2023.2245869#abstract">manipuler l’opinion publique en fournissant des arguments scientifiques fallacieux</a>. Ce qui donne, par exemple, <a href="https://www.biorxiv.org/content/10.1101/2025.08.29.673016v1">près de 10% des articles scientifiques sur le cancer qui auraient été écrits par ces fermes depuis 1999</a>. Ou encore <a href="https://retractionwatch.com/retracted-coronavirus-covid-19-papers/">une très belle liste de plus de 500 articles rétractés sur le thème du COVID-19</a>.</p><p>Face à ces chiffres alarmants, <a href="https://www.nature.com/articles/d41586-025-00212-1">des chercheurs et chercheuses ont commencé à s’organiser pour combattre ces fausses publications</a>. Mais <a href="https://www.medrxiv.org/content/10.1101/2025.09.09.25335401v1"><strong>l’innovation apportée par l’IA sur la rédaction de contenus divers a accéléré la tendance de publication de faux articles ou d’articles redondants</strong></a>, <a href="https://www.medrxiv.org/content/10.1101/2025.07.07.25331008v1">impactant particulièrement le domaine de la médecine</a>.</p><p>Pour aller plus loin sur ce problème :</p><ul><li><a href="https://misinforeview.hks.harvard.edu/article/gpt-fabricated-scientific-papers-on-google-scholar-key-features-spread-and-implications-for-preempting-evidence-manipulation/">[EN] <strong>GPT-fabricated scientific papers on Google Scholar: Key features, spread, and implications for preempting evidence manipulation</strong> — Haider, J., Söderström, K. R., Ekström, B., &amp; Rödl, M. — HKS Misinformation Review — Septembre 2024</a></li></ul><p>Après toute cette lecture, l’arrivée de l’IA peut sembler n’être finalement qu’une descente aux enfers de l’incertitude. Cependant, cette incertitude peut se lire de plusieurs manières : elle est l’absence d’un chemin à suivre, tout comme elle est l’existence d’une direction à créer. C’est cette direction qu’il faut définir ensemble, en tant que <em>société humaine</em> et non en tant qu’entreprise libérale. Cette liste de problèmes correspond à un nombre de possibilités sur lesquels nous pouvons discuter, réfléchir, argumenter, afin de construire un futur dans lequel l’IA rend raison à l’<a href="https://www.nouvelobs.com/idees/20170120.OBS4118/quand-keynes-imaginait-le-capitalisme-en-2030.html">idéal de Keynes</a>.</p><p>Il est donc de notre devoir de raisonner sur ces sujets. Nous devons comprendre ce qui n’a pas été compris, et penser ce qui n’est pas défini. De cette manière, nous pourrons concevoir un cadre sain autour de l’IA, cadre qui manque cruellement aujourd’hui et est comblé, pour le moment, par les décisions d’entreprises et d’entrepreneurs. C’est à nous de choisir comment l’IA doit nous impacter, et c’est maintenant qu’il faut commencer ce travail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*tn8yfXwDdcLmaZ4URZ4JGw.gif" /><figcaption>Merci d’avoir lu cet article ❤️</figcaption></figure><p><strong><em>Merci à Nicolas, Julien, Olivier, Théo, Marine, Maxime et Élodie pour leur aide à la relecture et leurs conseils, et merci à </em></strong><a href="https://www.ekino.fr/"><strong><em>ekino</em></strong></a><strong><em> de m’avoir laisser le temps d’écrire cet article qui compte énormément pour moi.</em></strong></p><p><em>Si jamais vous voulez me voir écrire plus de choses de ce type, hésitez pas à suivre le </em><a href="https://medium.com/ekino-france"><em>compte Medium d’ekino</em></a><em> et ajouter un petit like ! Et prenez soin de vous !</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf3348ebf2ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ekino-france/l-ia-face-a-ses-problemes-bf3348ebf2ab">L’IA face à ses problèmes</a> was originally published in <a href="https://medium.com/ekino-france">ekino-france</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI vs. its problems]]></title>
            <link>https://medium.com/ekino-france/ai-vs-its-problems-0fb1bf8d915c?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fb1bf8d915c</guid>
            <category><![CDATA[ecology]]></category>
            <category><![CDATA[society]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[work]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Thu, 27 Nov 2025 16:20:57 GMT</pubDate>
            <atom:updated>2025-11-27T20:46:08.266Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="A computer with a brain in the screen but the brain is glitchy" src="https://cdn-images-1.medium.com/max/1024/1*3YrPELOx64OLVh1oVh1R5g.png" /><figcaption><a href="https://pixabay.com/fr/illustrations/artificiel-intelligence-machine-4082314/">Source : Mohammed_hassan</a> with some graphical additions</figcaption></figure><p>The “AI revolution” is everywhere. Artificial intelligence is increasingly finding its way into our tools, our conversations, and our lives. This technology brings a host of new uses that would have been unimaginable just a decade ago. Today, you can generate poetry in the style of Leopardi or craft an art-house film with nothing more than the tap of your fingers on a keyboard. You can even discover <a href="https://www.nytimes.com/2025/01/15/technology/ai-chatgpt-boyfriend-companion.html">a loyal lover,</a> available and brimming with knowledge, hidden behind a simple stream of computerized electricity.</p><p>Nevertheless, while the benefits of this technology are undeniable, a darker side remains. This flip side, often mistakenly dismissed as <em>techno-pessimism</em>, raises a host of important questions we have yet to answer. And it is these answers, sometimes technical, sometimes moral, that will determine <strong>whether AI becomes truly democratized or not</strong>.</p><p>The purpose of this article is not to be needlessly pessimistic, but <strong>to build an inventory of the problems that we, as a <em>society</em>, must address in order to effectively carry forward this AI revolution</strong>. To make this inventory more accessible, each problem is framed as an unanswered question, supported by a reasoned explanation. Additionally, suggested media resources are provided for each problem, if you wish to explore any of them further.</p><p><strong>It is important to note that this article does not offer solutions</strong>. The breadth of the topics covered requires expertise in each of these fields to legitimately propose answers. Lacking such polymath expertise, this article takes a documentary approach. Blind spots may still persist in these reflections, so this inventory is not exhaustive.</p><p>Also, <strong>this article is trying to focus mainly on the France context</strong>. Some problems will have more details relative to this country especially and some sources are in French.</p><h3>Ecologic and energy problems</h3><figure><img alt="The ice floe almost fully melted with birds on it" src="https://cdn-images-1.medium.com/max/1024/0*mqPmZ1RKpHPMeAwg.jpg" /><figcaption><a href="https://pixabay.com/photos/glacier-sea-ocean-water-nature-7187291/">Source : Janvanbizar — Pixabay</a></figcaption></figure><blockquote><strong>Problem 1</strong></blockquote><blockquote><strong>How can we prevent AI from actively contributing to a future water crisis?</strong></blockquote><p>In 2019, Google built additional data centers in Arizona, which <a href="https://time.com/5814276/google-data-centers-water/">led to a Time article strongly emphasizing that <strong>these facilities consumed far too much water in areas already affected by drought</strong></a>. Arizona, already one of the hardest-hit states, found itself embroiled in political battles to maintain water supply for its residents.</p><p>This water crisis has not improved over time, as recent droughts have shown. Meanwhile, AI is driving the need for more data centers, and therefore, <a href="https://andthewest.stanford.edu/2025/thirsty-for-power-and-water-ai-crunching-data-centers-sprout-across-the-west/">ever more water</a>. When correlated with <a href="https://www.ipcc.ch/report/ar6/syr/downloads/report/IPCC_AR6_SYR_SPM.pdf">IPCC forecasts predicting increasingly frequent droughts</a>, <strong>the future seems headed toward a water war</strong> to decide whether it is the residents or the machines that should be kept hydrated.</p><blockquote><strong>Problem 2</strong></blockquote><blockquote><strong>How can we reconcile the energy consumption of data centers with the ecological crisis?</strong></blockquote><p>AI requires a large number of graphics processors to be trained and to operate. As a result, <strong>energy demand has surged in an unusual way</strong>, so much so that <a href="https://www.instituteforenergyresearch.org/the-grid/energy-department-report-raises-blackout-risks-from-ai-and-increased-electrification-if-current-utility-plans-continue/">coal plants have been reopened to prevent Americans from facing power outages</a>. Multiple investment plans have been launched to supply more energy and keep data centers running. However, these plans take years to complete, leaving a <a href="https://iee.psu.edu/news/blog/why-ai-uses-so-much-energy-and-what-we-can-do-about-it">significant increase in fossil fuel consumption</a> in the meantime.</p><p>Closer to home, after the French government urged us to <a href="https://www.lemonde.fr/politique/article/2022/10/06/sobriete-energetique-le-plan-du-gouvernement-pour-passer-l-hiver-et-preparer-l-avenir_6144616_823448.html">practice energy sobriety to avoid winter blackouts</a> (a measure that has now become <a href="https://www.service-public.gouv.fr/particuliers/actualites/A16856">an ecological lever to protect the environment</a>), Alsace is currently negotiating <a href="https://www.rue89strasbourg.com/alsace-data-center-microsoft-consommera-comme-350000-foyers-347813">to host a Microsoft data center whose energy consumption is estimated to equal that of 350,000 households</a>. Meanwhile, <a href="https://www.lemonde.fr/economie/article/2025/05/31/data-centers-les-hauts-de-france-revent-de-devenir-la-vallee-europeenne-de-l-intelligence-artificielle_6609398_3234.html">Hauts-de-France aims to become a recognized AI hub</a>, and <a href="https://www.solutions-numeriques.com/choose-france-quels-projets-en-infrastructures-et-services-ia/">Île-de-France is set to welcome its share of data centers</a> — <a href="https://www.lemagit.fr/actualites/366619359/Datacenters-IA-en-France-promesses-contre-promesses">all under the guise of tax reductions on electricity</a>. Adding to the concern, <a href="https://www.lemonde.fr/planete/article/2025/07/10/les-investissements-publics-et-prives-lies-au-climat-ont-baisse-en-france-en-2024_6620373_3244.html">climate-related investments dropped by 5% between 2023 and 2024</a>. In short, <strong>we are witnessing efforts to shield AI companies so that France can become a major player in this field</strong>, <a href="https://www.notre-environnement.gouv.fr/ree-2024/4-grands-defis-pour-demain/changement-climatique/article/changement-climatique-des-effets-de-plus-en-plus-perceptibles">at the expense of stronger ecological commitments</a>.</p><p>More informations on these problems:</p><ul><li><a href="https://www.technologyreview.com/2025/05/20/1116327/ai-energy-usage-climate-footprint-big-tech/">[EN] <strong>We did the math on AI’s energy footprint. Here’s the story you haven’t heard. </strong>— J. O’Donnell, C. Crownhart — MIT Technology Review — 20 mai 2025</a></li><li><a href="https://hal.inrae.fr/hal-05020408v1/document">[FR] <strong>Les impacts de l’IA sur l’environnement </strong>— F. Garcia, S. Schbath — Annales des Mines — Mars 2025</a></li><li><a href="https://hbr.org/2024/07/the-uneven-distribution-of-ais-environmental-impacts">[EN] <strong>The Uneven Distribution of AI’s Environmental Impacts</strong> — S. Ren, A. Wierman — Harvard Business Review — 15 Juillet 2024</a></li></ul><h3>Financial problem</h3><blockquote><strong>Problem 3</strong></blockquote><blockquote><strong>How can we build a stable AI economy that is independent of financial investments?</strong></blockquote><p>According to chart (G1), AI is characterized by high levels of funding, reaching <a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/economy">$250 billion in 2024</a>. The first noteworthy point is that this figure reflects <strong>strong investor interest in the field, but also </strong><a href="https://epoch.ai/blog/how-much-does-it-cost-to-train-frontier-ai-models"><strong>the growing amount of money required to develop increasingly powerful models</strong>. Training costs are expected to exceed €1 billion by 2027</a>.</p><figure><img alt="A graph on Corporate investment in AI, with $221B in 2020, $360B in 2021, $253B in 2022 and $201B in 2023." src="https://cdn-images-1.medium.com/max/1024/1*iPoVTTXZwJV86LdC0FVaDA.png" /><figcaption><a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/economy">(G1) — Source: The 2025 AI Index Report — HAI Stanford University</a></figcaption></figure><p>The second insight from this chart is the trend in investments over recent years. <a href="https://www.linfodurable.fr/finance-durable/2021-record-pour-le-capital-investissement-se-veut-plus-durable-30482">While 2021 was an exceptional year in terms of funding</a>, AI investments have remained stable at around $250 billion since then. In contrast, <a href="https://www.cleantechforeurope.com/publications/cleantech-annual-briefing-2024">global investments in Cleantech have declined since 2021, dropping from €51.7 billion to €31.8 billion in 2024</a>. More broadly, <strong>the AI sector is absorbing a significant share of investments at the expense of other industries</strong>. <a href="https://www.visualcapitalist.com/ais-rising-share-of-u-s-venture-capital-investment/">In the first quarter of 2025 in the United States, AI accounted for 71% of total investments</a>. Meanwhile, <a href="https://www.publicsenat.fr/actualites/economie/intelligence-artificielle-emmanuel-macron-annonce-109-milliards-deuros-dinvestissements-prives">in France, the President announced a €109 billion investment package in AI, financed primarily by the United Arab Emirates</a>.</p><figure><img alt="A graph showing different flow movements between tech companies. Almost all companies are dealing with Nvidia ($4.5T) and OpenAI ($500B)" src="https://cdn-images-1.medium.com/max/593/0*cQK6mrByKvt0qJNM" /><figcaption><a href="https://www.bloomberg.com/news/features/2025-10-07/openai-s-nvidia-amd-deals-boost-1-trillion-ai-boom-with-circular-deals">(G2) — Source: Bloomberg</a></figcaption></figure><p>At the same time, <a href="https://www.bloomberg.com/news/features/2025-10-07/openai-s-nvidia-amd-deals-boost-1-trillion-ai-boom-with-circular-deals">several Bloomberg articles have highlighted the circular financing that largely underpins AI from a financial perspective</a>, once again <strong>drawing attention to the existence of an AI bubble</strong> (chart G2). <a href="https://www.businessinsider.com/why-ai-bubble-meta-sam-altman-mit-report-2025-8">Even Sam Altman, CEO of OpenAI, has spoken about this investment bubble</a>, and <a href="https://www.dbresearch.com/PROD/RI-PROD/PDFVIEWER.calias?pdfViewerPdfUrl=PROD0000000000604456">its burst could severely damage the U.S. economy</a>. Faced with these risks, <a href="https://www.reuters.com/world/china/investors-use-dotcom-era-playbook-dodge-ai-bubble-risks-2025-10-24/">investors are already revising their strategies</a> to avoid experiencing <a href="https://edition.cnn.com/2025/10/18/business/ai-bubble-analyst-nightcap">a Dotcom 2.0-style collapse</a>.</p><p>More information on this problem:</p><ul><li><a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/economy">[EN] <strong>The 2025 AI Index Report: Chapter 4: Economy</strong> — HAI Stanford University — Avril 2025</a></li><li><a href="https://pluralistic.net/2025/09/27/econopocalypse/">[EN] <strong>The real (economic) AI apocalypse is nigh</strong> — C. Doctorow — Pluralistic — 27 Septembre 2025</a></li><li><a href="https://www.businessinsider.com/why-ai-bubble-meta-sam-altman-mit-report-2025-8">[EN] <strong>3 reasons everyone is talking about an AI bubble</strong> — A. Tecotzky — Business Insider — 26 Août 2025</a></li></ul><h3>Work-Related Issues</h3><blockquote><strong>Problem 4</strong></blockquote><blockquote><strong>How can we boost productivity through AI without reducing workers’ well-being?</strong></blockquote><p>Probably the most anticipated impact by investors, <a href="https://www.mckinsey.com/capabilities/mckinsey-digital/our-insights/superagency-in-the-workplace-empowering-people-to-unlock-ais-full-potential-at-work">“<em>artificial intelligence […] has the potential to be as transformative as the steam engine was during the 19th-century industrial revolution</em>” according to a McKinsey article citing a McKinsey study</a>. <strong>In theory, AI is a technology that could revolutionize the way we work and become a powerful tool to help us tackle various challenges</strong>. Its capabilities make it an ideal assistant for drafting meeting notes or retrieving scattered information from a set of documents. However, in practice, short-term improvements have yielded mixed results.</p><p>In terms of productivity, <a href="https://theconversation.com/does-ai-actually-boost-productivity-the-evidence-is-murky-260690">there are as many positive cases as negative ones</a>. <strong>In the short term, it is therefore difficult to assess AI’s impact on employees’ daily work</strong>, and broader studies are needed to provide that answer. Nevertheless, one article has already shed light on the phenomenon of <a href="https://hbr.org/2025/09/ai-generated-workslop-is-destroying-productivity">“<em>AI workslop</em>” — documents that appear well-crafted but whose content is actually sloppy and superficial</a>. This practice simply and strictly reduces team productivity.</p><figure><img alt="A graph showing Increased demand on employees. There’s 37% for “Use AI tools to increase their output”, 35% for “Expand their skillsets”, 30% for “Take on a wider range of resposnabilities”, 27% for “Return to the office”, 26% for “Work more quickly/efficiently” and 20% for “Work longer hours”." src="https://cdn-images-1.medium.com/max/1024/1*_Dn_Un0oYGsrTgYKxviQdw.jpeg" /><figcaption><a href="https://www.upwork.com/research/ai-enhanced-work-models">(G3) Source: From Burnout to Balance: AI-Enhanced Work Models — Upwork</a></figcaption></figure><p>When it comes to employee well-being, we see both <a href="https://www.nature.com/articles/s41598-025-98241-3">unchanged working conditions in German companies</a> and <a href="https://www.upwork.com/research/ai-enhanced-work-models">deteriorated conditions in American-based ones</a> (according to chart G3). One possible explanation for this difference could be the much stronger job security in German companies compared to English-speaking ones, reducing the pressure for significantly increased productivity to keep one’s job. <strong>Consequently, integrating AI into workplaces would require strong labor legislation and a healthy work environment to prevent a rise in burnout cases.</strong></p><p>More information on this problem:</p><ul><li><a href="https://www.nature.com/articles/s41598-025-98241-3">[EN] <strong>Artificial intelligence and the wellbeing of workers</strong> — O. Giuntella, J. Konig, L. Stella — Nature — 23 Juin 2025</a></li><li><a href="https://theconversation.com/does-ai-actually-boost-productivity-the-evidence-is-murky-260690">[EN] <strong>Does AI actually boost productivity? The evidence is murky </strong>— J. Whittle — The Conversation — 10 Juillet 2025</a></li></ul><blockquote><strong>Problem 5</strong></blockquote><blockquote><strong>How can we ensure that workers in jobs eliminated by AI are able to make a living?</strong></blockquote><p>The fear of job loss caused by the rise of AI is anything but an illusion. <a href="https://www.reuters.com/sustainability/amazon-lay-off-about-14000-roles-2025-10-28/">Amazon</a>, <a href="https://www.traxtech.com/ai-in-supply-chain/ups-deploys-ai-automation-to-replace-43000-workers">UPS</a>, <a href="https://www.theregister.com/2025/11/26/hp_inc_q4_2025/">HP</a>, <a href="https://www.sdxcentral.com/news/cisco-announces-layoffs-days-after-ceo-said-it-wont-cut-jobs-in-favor-of-ai/">Cisco</a>, <a href="https://www.theverge.com/news/657594/duolingo-ai-first-replace-contract-workers">Duolingo</a>, and <a href="https://www.cnbc.com/2025/05/14/klarna-ceo-says-ai-helped-company-shrink-workforce-by-40percent.html">Klarna</a> are examples of massive layoffs explicitly attributed to AI. These cases, <a href="https://layoffs.fyi/">in a tech sector already heavily impacted by waves of layoffs in recent years</a>, <strong>only add to the constant anxiety shared by tech workers</strong>.</p><figure><img alt="A graph showing layoffs in tech companies between 2024 and 2025. There’s several months showing 30K+ layoffs." src="https://cdn-images-1.medium.com/max/1024/1*rS3LwZnkP6aBnQyXR7Ebww.png" /><figcaption><a href="https://layoffs.fyi/">(G4) Source: Layoffs.fyi</a></figcaption></figure><p>However, it’s worth noting that <strong>these examples involve mainly American companies, where, as explained in the previous problem, job security is weaker</strong>. Looking at the French context, <a href="https://www.ouest-france.fr/high-tech/intelligence-artificielle/cette-entreprise-francaise-vire-217-salaries-pour-les-remplacer-par-une-intelligence-artificielle-1dea7af2-560d-11ee-ba56-a7ce59b686ce">the most well-known case of layoffs in favor of AI is Onclusive</a>. The company reportedly dismissed 217 employees citing AI as the reason, <a href="https://www.precisement.org/blog/Licenciement-pour-IA-vrai-ou-faux.html">though this claim is contested</a>. Moreover, <a href="https://www.frenchweb.fr/ia-en-entreprise-la-jurisprudence-qui-change-la-donne-et-pas-dans-une-moindre-mesure/454213">a ruling by the Nanterre Judicial Court on February 14, 2025, seems to set an initial direction for implementing AI in companies while safeguarding jobs</a>. Still, we must wait for a first ruling from the Court of Cassation to definitively confirm this trend.</p><p>Outside the tech sector, this constant anxiety is also present. <a href="https://www.theguardian.com/technology/2025/mar/15/its-happening-fast-creative-workers-and-professionals-share-their-fears-and-hopes-about-the-rise-of-ai"><strong>Workers in fields such as graphic design, translation, audio, photography — i.e., creative professions — are now widely affected by declining incomes</strong></a>. And the reason is simple: why pay someone €100 for a handmade image when a ChatGPT subscription costs three times less and allows unlimited image generation? Apply this reasoning to music, and <a href="https://www.lemonde.fr/idees/article/2025/10/14/l-ia-destabilise-dangereusement-le-marche-de-la-musique_6646627_3232.html">you get a crisis in a market already weakened by the rise of music streaming platforms</a>.</p><p>The only way to counter the harmful effects of this progressive destruction of jobs is “simple”: <a href="https://aamulumi.info/Sociologie/Vers-une-nouvelle-conception-du-travail#pr%C3%A9parer-lavenir--la-r%C3%A9duction-du-temps-de-travail">we need to rethink how our society functions</a>. Without jobs, people cannot earn money. And without money, people cannot live. <strong>Our current societal model is therefore incompatible with the consequences of AI on creative fields , </strong><a href="https://www.qmul.ac.uk/media/news/2025/queen-mary-news/pr/creative-industry-workers-feel-job-worth-and-security-under-threat-from-ai-.html"><strong>and these consequences will continue to worsen relentlessly</strong></a>.</p><p>More information on this problem:</p><ul><li><a href="https://www.youtube.com/watch?v=_zfN9wnPvU0">[EN] <strong>AI Slop is destroying the Internet</strong> — Kurzgesagt — In a Nutshell — Youtube — Octobre 2025</a></li><li><a href="https://economics.mit.edu/sites/default/files/2024-04/The%20Simple%20Macroeconomics%20of%20AI.pdf">[EN] <strong>The Simple Macroeconomics of AI</strong> — D. Acemoglu — MIT — 5 Avril 2024</a></li><li><a href="https://aamulumi.info/Sociologie/Vers-une-nouvelle-conception-du-travail#pr%C3%A9parer-lavenir--la-r%C3%A9duction-du-temps-de-travail">[FR] <strong>Vers une nouvelle conception du travail ?</strong> — F. Kauder — aamulumi.info — 2 Octobre 2019</a></li></ul><blockquote><strong>Problem 6</strong></blockquote><blockquote><strong>How can we continue to train experienced professionals when entry-level positions are disappearing?</strong></blockquote><p>When considering jobs directly impacted by AI, <a href="https://digitaleconomy.stanford.edu/wp-content/uploads/2025/11/CanariesintheCoalMine_Nov25.pdf">there is a clear decline in hiring for entry-level positions</a>. <a href="https://www.economist.com/graphic-detail/2025/10/13/can-ai-replace-junior-workers">This decline is not observed among more experienced workers</a>. While this trend may seem temporary in the short term, it’s important to remember that <strong>without beginners, there can’t be experts</strong>.</p><p>It’s easy to illustrate the consequences of a lack of training with something we know well in France: the shortage of doctors. <a href="https://www.franceinfo.fr/sante/deserts-medicaux/acces-aux-soins-pourquoi-manque-t-on-de-medecins-generalistes-en-france_7108128.html">The numerus clausus policy limited the number of people trained in medicine between 1970 and 2020</a>. As the population grew and medical density declined, <a href="https://www.info.gouv.fr/actualite/former-plus-principe-de-solidarite-le-plan-du-gouvernement-face-aux-deserts-medicaux">this lack of training for newcomers created a highly strained healthcare situation</a>. <a href="https://www.lemonde.fr/economie/article/2023/05/23/informatique-le-secteur-bancaire-manque-de-specialistes-du-cobol_6174417_3234.html">A similar scenario already exists in IT, with a shortage of COBOL specialists creating an alarming climate for the banking sector</a>. And if we stop training new professionals, <strong>the “<em>COBOL-ization</em>” of jobs could spread even further</strong>.</p><p>More information on this problem:</p><ul><li><a href="https://hbr.org/2025/09/the-perils-of-using-ai-to-replace-entry-level-jobs">[EN] <strong>The Perils of Using AI to Replace Entry-Level Jobs</strong> — A. C. Edmondson, T. Chamorro-Premuzic — Harvard Business Review — 16 Septembre 2025</a></li><li><a href="https://digitaleconomy.stanford.edu/publications/canaries-in-the-coal-mine/">[EN] <strong>Canaries in the Coal Mine? Six Facts about the Recent Employment Effect of Artificial Intelligence</strong> — E. Brynjolfsson, B. Chandar, R. Chen — HAI Stanford University — Novembre 2025</a></li><li><a href="https://www.understandingai.org/p/new-evidence-strongly-suggest-ai">[EN] <strong>New evidence strongly suggests AI is killing jobs for young programmers </strong>— T. B. Lee — Understanding AI — 28 Août 2025</a></li></ul><h3>Legal Issues</h3><figure><img alt="A picture of a hammer in a justice court" src="https://cdn-images-1.medium.com/max/1024/0*nnUF-T9ffDYkBr4c.jpg" /><figcaption><a href="https://pixabay.com/photos/judge-hammer-judgement-court-1587300/">Source: Daniel_B_photos — Pixabay</a></figcaption></figure><blockquote><strong>Problem 7</strong></blockquote><blockquote><strong>How can we guarantee the protection of intellectual property against the illegal exploitation of data for AI training?</strong></blockquote><p>Training AI models involves <strong>leveraging various types of media to teach these systems, and very often, that media is protected by intellectual property rights</strong>. As a result, <a href="https://www.bakerlaw.com/services/artificial-intelligence-ai/case-tracker-artificial-intelligence-copyrights-and-class-actions/">numerous lawsuits are currently underway</a>, and most recently, <a href="https://www.japantimes.co.jp/business/2025/10/07/tech/open-ai-sora-2-copyright/">OpenAI managed to antagonize a large part of the Japanese industry with Sora 2</a> (<a href="https://www.japantimes.co.jp/business/2025/10/16/companies/japan-opt-in-model-sora2/">as well as the Japanese government</a>).<br>To avoid these legal issues, companies developing AI models are trying a new approach: using their users’ data. This now includes <a href="https://www.lemonde.fr/pixels/article/2025/09/22/linkedin-va-utiliser-les-donnees-personnelles-de-ses-utilisateurs-pour-entrainer-son-ia_6642418_4408996.html">LinkedIn (Microsoft)</a>, <a href="https://www.cnil.fr/fr/meta-entrainement-ia-donnees-utilisateurs">Instagram &amp; Facebook (Meta)</a>, and <a href="https://intelligence-artificielle.developpez.com/actu/364783/De-nouvelles-conditions-de-service-permettent-a-X-d-utiliser-vos-donnees-pour-entrainer-son-IA-les-messages-textuels-les-photos-et-les-videos-sont-utilises-pour-l-entrainement-de-Grok-le-chatbot-d-Elon-Musk/">X</a> at the table, but <a href="https://www.wired.com/story/how-to-stop-your-data-from-being-used-to-train-ai/">also Slack, Figma, and even Tumblr</a>.</p><p>More information on this problem:</p><ul><li><a href="https://www.bakerlaw.com/services/artificial-intelligence-ai/case-tracker-artificial-intelligence-copyrights-and-class-actions/">[EN] <strong>Case Tracker: Artificial Intelligence, Copyrights and Class Actions</strong> — T. M. Weisenberger, D. C. Milton, H. A. Enright — BakerHostetler</a></li></ul><blockquote><strong>Problem 8</strong></blockquote><blockquote><strong>How can we adapt the principle of intellectual property in the face of AI-generated works?</strong></blockquote><p>Under French law (following the EU AI Act), the rule is simple: <a href="https://www.lagbd.org/IA_generative_et_creations_de_mode_quels_enjeux_juridiques">a creation entirely produced by AI cannot be subject to copyright because AI is not human</a>. However, <a href="https://www.village-justice.com/articles/droit-auteur-qui-est-auteur,49508.html">if AI is used merely as a tool, copyright then belongs to the author</a>. Beyond this apparent simplicity, one question throws everything into doubt: <strong>how do we distinguish between an AI-generated work and an AI-assisted work?</strong></p><figure><img alt="A picture of the Allen’ piece. It show people walking in a rich room. There’s a woman looking at the window to the beautiful and strange landscape." src="https://cdn-images-1.medium.com/max/1024/0*Pw5BZwp_ZYyGP8oP.jpg" /><figcaption><a href="https://fr.wikipedia.org/wiki/Th%C3%A9%C3%A2tre_d%27op%C3%A9ra_spatial">(I2) Source: Théâtre d’opéra spatial — Midjourney — Prompts by Jason M. Allen</a></figcaption></figure><p>A striking illustration of this issue is <a href="https://www.lesinrocks.com/art/un-tableau-concu-par-une-intelligence-artificielle-gagne-un-prix-et-cree-la-polemique-495797-06-09-2022/">the famous case of Jason M. Allen, who won an art competition in 2022 with a piece generated by AI</a> (image I2 above). Following this event, <a href="https://www.cpr.org/2024/09/26/colorado-springs-artist-appeals-copyright-rejection-ai-art/">he attempted to register his work with the U.S. Copyright Office, which refused because it was AI-generated</a>. This raises a moral debate on several points:</p><ul><li>If AI-generated works are rejected, what happens when works are not disclosed as AI-generated? Conversely, will human-made works be rejected for being too similar to AI creations?</li><li>If copyright applies only to works created by humans, what about works produced by algorithms and recognized as those of <a href="https://www.centrepompidou.fr/fr/pompidou-plus/magazine/article/vera-molnar-aux-sources-du-code">Vera Molnár</a> or <a href="https://www.galeriecharlot.com/fr/51/Manfred-Mohr">Manfred Mohr</a>?</li><li>At what point should we consider a work as AI-assisted rather than AI-created? Does applying a simple color filter by a human make the work human?</li></ul><p><strong>Such questions are nearly impossible to resolve without suitable detection tools</strong>. And while these tools do exist, <a href="https://lawlibguides.sandiego.edu/c.php?g=1443311&amp;p=10721367">they are already discouraged in academic contexts due to a high error rate</a>.</p><p>More information on this problem:</p><ul><li><a href="https://www.lagbd.org/IA_generative_et_creations_de_mode_quels_enjeux_juridiques">[FR] <strong>IA générative et créations de mode : quels enjeux juridiques ?</strong> — G. Makoundou — La Grande Bibliothèque du Droit — Juillet 2024</a></li><li><a href="https://artificialintelligenceact.eu/ai-act-explorer/">[EN] <strong>The AI Act Explorer</strong> — Future of Life Institute</a></li><li><a href="https://www.ropesgray.com/en/insights/alerts/2023/03/can-works-created-with-ai-be-copyrighted-copyright-office-issues-formal-guidance">[EN] <strong>Can Works Created with AI Be Copyrighted? Copyright Office Issues Formal Guidance</strong> — E. Gourvitz, S. L. Ameri — Ropes&amp;Gray — Mars 2023</a></li></ul><h3>Social Issues</h3><figure><img alt="A picture of a newspaper with the word “truth” focused" src="https://cdn-images-1.medium.com/max/1024/0*9U6Kag0nynWjt6P0.jpg" /><figcaption><a href="https://pixabay.com/fr/photos/v%C3%A9rit%C3%A9-journal-nouvelles-imprim%C3%A9-166853/">Source : PDPics — Pixabay</a></figcaption></figure><blockquote><strong>Problem 9</strong></blockquote><blockquote><strong>How can we prevent artificial intelligence from becoming a catalyst for spreading misinformation?</strong></blockquote><p><a href="https://theconversation.com/facebook-data-reveal-the-devastating-real-world-harms-caused-by-the-spread-of-misinformation-265742"><strong>Social networks have a direct impact on our world</strong>. Spreading false information therefore has real consequences</a>. For example, <a href="https://www.sciencedirect.com/science/article/pii/S0176268025000011">marketing campaigns on Facebook had a direct influence on the 2016 U.S. presidential election</a>, and <a href="https://www.sciencedirect.com/science/article/abs/pii/S2352250X22001282">conspiracy theories are dangerously proliferating through social media echo chambers</a>.</p><p>Alongside these developments, <a href="https://www.edps.europa.eu/press-publications/publications/techsonar/fake-news-detection_en">tools for detecting fake news continue to evolve</a>, but the damage is already done, and <a href="https://theconversation.com/sommes-nous-entres-dans-une-epoque-de-post-verite-246659">some sociologists and political scientists argue that we have entered the era of post-truth</a> — where lies are no longer shocking and truth is no longer essential.</p><p>In this complex context, it is crucial to understand that <strong>AI will have a significant impact on several aspects of truth</strong>. Its use <a href="https://www.sciencedirect.com/science/article/pii/S2666990024000120">drastically reduces the time needed to create information</a> — writing, layout, editing, publishing — whether it’s a textual, graphic, or even audiovisual information. As a result, <a href="https://sherwood.news/tech/ai-created-videos-are-quietly-taking-over-youtube/">platforms like YouTube are facing a growing flood of content that is partially or entirely AI-generated</a>. Moreover, <a href="https://www.sciencedirect.com/science/article/pii/S0747563220303034">due to our inability to distinguish between generated and non-generated information</a> (<a href="https://www.sciencedirect.com/science/article/abs/pii/S2666799123000436">despite improving methods to address this issue</a>), <a href="https://arxiv.org/pdf/2405.11697">misinformation has taken on a new dimension since 2023 with the rise of AI-generated images</a>.</p><p>More information on this problem:</p><ul><li><a href="https://arxiv.org/abs/2405.11697"><strong>[EN] AMMEBA: A Large-Scale Survey and Dataset of Media-Based Misinformation In-The-Wild</strong> — N. Dufour, A. Pathak, P. Samangouei, N. Hariri, S. Deshetti, A. Dudfield, C. Guess, P. H. Escayola, B. Tran, M. Babakar, C. Bregler — arXiv — Mai 2024</a></li><li><a href="https://arxiv.org/abs/2411.05060v2"><strong>[EN] A Guide to Misinformation Detection Data and Evaluation</strong> — C. Thibault, J.-J. Tian, G. Peloquin-Skulski, T. L. Curtis, J. Zhou, F. Laflamme, Y. Guan, R. Rabbany, J.-F. Godbout, K. Pelrine — arXiv — Août 2025</a></li></ul><blockquote><strong>Problem 10</strong></blockquote><blockquote><strong>How can we prevent artificial intelligence from being used for psychological and moral harm?</strong></blockquote><figure><img alt="Multiple graphs from the French report. 41% of French people said they already has been victim from cyberviolence. Also, the main age is 15years old to 24 years old with 87% (it decrease until 20% for 60+ years old). There an additional graph showing that 85% of people were attacked because of sexual orientation, 78% because of religion, 71% because of ethnicity and only 32% don’t belong to a minority." src="https://cdn-images-1.medium.com/max/1024/1*x2p-Pm2cmCg-PFtQ5aVzEg.png" /><figcaption><a href="https://www.ipsos.com/sites/default/files/ct/news/documents/2022-02/Ipsos_Feministes%20contre%20le%20cyberharcelement_Rapport.pdf">(I3) Source : IPSOS — Cyberviolence et cyberharcèlement : état des lieux d’un phénomène répandu</a></figcaption></figure><p><strong>Incidents of cyberviolence are already numerous</strong>. <a href="https://www.ipsos.com/sites/default/files/ct/news/documents/2022-02/Ipsos_Feministes%20contre%20le%20cyberharcelement_Rapport.pdf">In a 2021 survey (image I3), 41% of French respondents reported having experienced cyberviolence</a>. This figure rises dramatically and systematically for people from minority groups and for young people. While the sample is insufficient to determine conviction rates, we can estimate an approximate figure through an assumption: gender-based and sexual violence is considered more serious than cyberviolence. Following this logic, <a href="https://www.vie-publique.fr/rapport/298969-senat-rapport-sur-la-prevention-recidive-viol-et-agressions-sexuelles">and considering that fewer than 10% of gender-based and sexual violence victims file complaints and fewer than 10% of those complaints lead to convictions</a>, we arrive at a very low rate — less than 1%.</p><p>In this context, <strong>artificial intelligence has dangerously simplified access to harassment tools</strong>. <strong>First, AI can be used as a generator of harassment media</strong>. <a href="https://www.vie-publique.fr/rapport/298969-senat-rapport-sur-la-prevention-recidive-viol-et-agressions-sexuelles">Criminals can easily create content as effective, or even more effective, than traditional media</a>. This trend is evident <a href="https://www.lemonde.fr/pixels/article/2025/07/28/des-videos-racistes-generees-par-ia-deferlent-sur-les-reseaux-sociaux-francais_6624896_4408996.html">in France through a flood of racist gorilla-themed videos</a> aimed at harassing people from other ethnic backgrounds.</p><p>Second, <strong>AI is an extremely effective tool for creating deepfakes</strong>. As a result, <a href="https://news.ufl.edu/2025/05/non-consensual-fake-imagery/">the number of cases involving the generation of explicit content without consent has exploded</a>. <a href="https://arxiv.org/pdf/2411.09751v1">Illegal “<em>nudification</em>” tools have multiplied, with varying business models but often targeting the same clientele: men</a>. These tools are used <a href="https://www.journaldemontreal.com/2024/01/17/deux-influenceuses-deshabillees-par-lintelligence-artificielle-denoncent-les-lourdes-consequences">on influencers</a> as well on <a href="https://www.radiofrance.fr/franceinfo/podcasts/les-voies-de-l-ia/episode-1-deepfakes-quand-l-ia-trahit-notre-intimite-6218028">ordinary women</a>. Worse still, <a href="https://hai.stanford.edu/news/how-do-we-protect-children-in-the-age-of-ai">they are also used on children and teenage girls by other children</a> but <a href="https://www.iwf.org.uk/about-us/why-we-exist/our-research/how-ai-is-being-abused-to-create-child-sexual-abuse-imagery/">also pedophile criminals</a>. And, as noted in the legal issues, <a href="https://www.franceinfo.fr/internet/intelligence-artificielle/deepfakes-pornographiques-pourquoi-la-lutte-contre-les-images-generees-par-intelligence-artificielle-s-annonce-difficile_6382105.html">the lack of detection capabilities prevents any reduction in the number of victims</a>.</p><p>Finally, AI models are trained using datasets created by labeling thousands of images (<a href="https://theconversation.com/ai-is-a-multi-billion-dollar-industry-its-underpinned-by-an-invisible-and-exploited-workforce-240568"><strong>a process that, incidentally, exploits millions of people</strong></a>). Consequently, <a href="https://www.nature.com/articles/d41586-025-03298-9">AI will define things the same way we do, which means <strong>reproducing the same societal stereotypes</strong>.</a> This includes <a href="https://theconversation.com/australiana-images-made-by-ai-are-racist-and-full-of-tired-cliches-new-study-shows-263117">racist biases about Australiana</a> and <a href="https://hai.stanford.edu/news/covert-racism-ai-how-language-models-are-reinforcing-outdated-stereotypes">African American English</a>, as well as <a href="https://www.unesco.org/en/articles/generative-ai-unesco-study-reveals-alarming-evidence-regressive-gender-stereotypes">misogynistic biases</a>. It is worth noting, however, that <a href="https://dl.acm.org/doi/10.1145/3743676">LLMs seem to have recently improved on issues such as transphobia</a> (<a href="https://www.out.com/news/chatbot-grok-generates-transphobic-comments">with the exception of Grok</a>).</p><p>More information on this problem:</p><ul><li><a href="https://arxiv.org/abs/2411.09751">[EN] <strong>Analyzing the AI Nudification Application Ecosystem</strong> — C. Gibson &amp; D. Olszewski &amp; N. G. Brigham &amp; A. Crowder &amp; K. R. B. Butler &amp; P. Traynor &amp; E. M. Redmiles &amp; T. Kohno — arXiv — Novembre 2024</a></li><li><a href="https://www.sciencedirect.com/science/article/abs/pii/S0160791X25002799">[EN] <strong>AI can be cyberbullying perpetrators: Investigating individuals’ perceptions and attitudes towards AI-generated cyberbullying</strong> — W. Pei, F. Wang, Y. T. Chua — ScienceDirect — Septembre 2025</a></li><li><a href="https://theconversation.com/australiana-images-made-by-ai-are-racist-and-full-of-tired-cliches-new-study-shows-263117">[EN] <strong>‘Australiana’ images made by AI are racist and full of tired cliches, new study shows</strong> — T. Leaver &amp; S. Srdarov — The Conversation — 14 Août 2025</a></li></ul><h3>Science Issue</h3><figure><img alt="A picture of two books open in front of a library with a pen on it" src="https://cdn-images-1.medium.com/max/1024/0*5ekRodd1_3wVJD83.jpg" /><figcaption><a href="https://pixabay.com/fr/photos/livre-ouvert-une-biblioth%C3%A8que-1428428/">Source: lil_foot_ — Pixabay</a></figcaption></figure><blockquote><strong>Problem 11</strong></blockquote><blockquote><strong>How can we prevent artificial intelligence from contributing to global pollution in scientific articles?</strong></blockquote><p>For several years now, <strong>the world of scientific publishing has been plagued by the massive release of fake scientific articles.</strong> Considering the number of <a href="https://en.wikipedia.org/wiki/Retraction_in_academic_publishing">retractions</a>, <a href="https://www.theguardian.com/science/2024/feb/03/the-situation-has-become-appalling-fake-scientific-papers-push-research-credibility-to-crisis-point">the figure has risen from around 1,000 in 2013 to over 10,000 in 2023</a>. <a href="https://www.science.org/content/article/paper-mills-bribing-editors-scholarly-journals-science-investigation-finds">This surge is driven by growing corruption in the field, involving paper mills and profit-hungry journals</a>, <a href="https://www.sciencedirect.com/science/article/pii/S0895435624003056#sec3">enabling certain researchers to secure promotions or bonuses</a> — or worse, <a href="https://www.tandfonline.com/doi/full/10.1080/1369118X.2023.2245869#abstract">manipulate public opinion by providing misleading scientific arguments</a>. For example, <a href="https://www.biorxiv.org/content/10.1101/2025.08.29.673016v1">nearly 10% of scientific articles on cancer are believed to have been written by these paper mills since 1999</a>. Or also <a href="https://retractionwatch.com/retracted-coronavirus-covid-19-papers/">this beautiful list of more than 500 retracted articles on COVID-19</a>.</p><p>Faced with these alarming numbers, <a href="https://www.nature.com/articles/d41586-025-00212-1">researchers have begun organizing to fight these fake publications</a>. But <a href="https://www.medrxiv.org/content/10.1101/2025.09.09.25335401v1"><strong>the innovation brought by AI in generating diverse content has accelerated the trend of publishing fraudulent or redundant articles</strong></a>, <a href="https://www.medrxiv.org/content/10.1101/2025.07.07.25331008v1">impacting especially the field of medicine</a>.</p><p>More information on this problem:</p><ul><li><a href="https://misinforeview.hks.harvard.edu/article/gpt-fabricated-scientific-papers-on-google-scholar-key-features-spread-and-implications-for-preempting-evidence-manipulation/">[EN] <strong>GPT-fabricated scientific papers on Google Scholar: Key features, spread, and implications for preempting evidence manipulation</strong> — Haider, J., Söderström, K. R., Ekström, B., &amp; Rödl, M. — HKS Misinformation Review — Septembre 2024</a></li></ul><p>After all this reading, the arrival of AI may seem like nothing more than a descent into the hell of uncertainty. Yet this uncertainty can be interpreted in different ways: it is the absence of a path to follow, but also the existence of a direction to create. <strong>It is this direction that we must define together, as a human <em>society</em>, not as a liberal enterprise</strong>. This list of problems represents a set of possibilities on which we can discuss, reflect, and debate, in order to build a future where AI fulfills <a href="https://www.nouvelobs.com/idees/20170120.OBS4118/quand-keynes-imaginait-le-capitalisme-en-2030.html">Keynes’s ideal</a>.</p><p>It is therefore our duty to reason through these issues. We must understand what has not been understood and think about what has not yet been defined. By doing so, we can design a healthy framework around AI — a framework that is sorely lacking today and currently filled by corporate and entrepreneurial decisions. <strong>It is up to us to choose how AI should impact us, and the time to begin this work is now.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*tn8yfXwDdcLmaZ4URZ4JGw.gif" /><figcaption>Thank you for reading this big article ❤️</figcaption></figure><p><strong><em>Thanks to Nicolas, Julien, Olivier, Théo, Marine, Maxime and Élodie for their help with proofreading and their advice, and thanks to </em></strong><a href="https://www.ekino.fr/"><strong><em>ekino</em></strong></a><strong><em> for giving me the time to write this article that matters so much to me.</em></strong> 🫶🏻</p><p><em>Feel free to follow the </em><a href="https://medium.com/ekino-france"><em>ekino Medium account</em></a><em> and add a like if you want to see me writing more things like that. And take care of you!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fb1bf8d915c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ekino-france/ai-vs-its-problems-0fb1bf8d915c">AI vs. its problems</a> was originally published in <a href="https://medium.com/ekino-france">ekino-france</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Useless Brainfuck Interpreter in Typescript]]></title>
            <link>https://medium.com/ekino-france/the-useless-brainfuck-interpreter-in-typescript-616acac57205?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/616acac57205</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[experiment]]></category>
            <category><![CDATA[type]]></category>
            <category><![CDATA[out-of-the-box]]></category>
            <category><![CDATA[brainfuck]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Wed, 18 Jun 2025 14:58:28 GMT</pubDate>
            <atom:updated>2025-06-18T14:58:28.699Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A generated image of three cosmic brains in the space with a lot of stars everywhere" src="https://cdn-images-1.medium.com/max/1024/1*sJpcIGtyFF6WmDJQuTwltQ.png" /><figcaption>3 brains for the 3rd article on the subject</figcaption></figure><h4>One of the stupidest ideas you’ll ever read in your life</h4><p><em>We don’t know what the future holds. We don’t know where we’re going. We don’t even know why we do our jobs. Life is a constant cycle of renewing our ideas, our opinions, and our desires. Everything moves. Everything changes. Endlessly. Leaving us with no hope for a truly peaceful existence. But there’s one thing that will never change. Something that was there at the birth of the universe. Something that will (probably) vanish when the Sun will explode. Yes, we will always find a stupid idea. And this one is </em><strong><em>uber-stupid</em></strong><em>.</em></p><p>So, you clicked on this article because :</p><ul><li>you read the word <em>Brainfuck</em> and thought it sounded funny: <strong>you will regret this</strong>.</li><li>you read the word <em>Interpreter</em> and thought it sounded interesting: <strong>you will regret this</strong>.</li><li>you read the word <em>Typescript</em> and wanted to learn about upcoming features: <strong>you will regret this</strong>.</li><li>you read the title: <strong>you will regret this</strong>.</li><li>you clicked randomly because you needed something to pretend you’re working on: <strong>you’ll be back to work very soon</strong>.</li></ul><p>Every time I talk about writing this article to a colleague or a friend, they ask me: “<em>Why the f*** are you doing this?</em>”. Honestly? I don’t know.<strong> There’s no real purpose</strong>. No company will hire me because I wrote an article about a Brainfuck interpreter using only Typescript types. No conference will invite me. My colleagues will say: “<em>Oh, that’s the Brainfuck pal. Let’s go somewhere else before it spreads.</em>”. I won’t find love, fame, or fortune with this article. My parents will still think I fix printers. <strong>Yes, this article won’t change anything </strong>(except maybe for the colleague thing, <em>damn</em>).</p><p>But sometimes, you just want to prove something. You have to do it. There’s no reason except to say: “<em>I did it.</em>” You want to be the only person on Earth who’s done this. And maybe I’m the second, the third, the thousandth — <em>I hope not, for the sake of humanity —</em> but I can say it loud and proud:<strong> I wrote a Brainfuck interpreter using only Typescript types</strong>.</p><figure><img alt="A animated image of Michael Scott from The office serie saying: “Am I a hero? I really can’t say. But yes.”" src="https://cdn-images-1.medium.com/max/640/1*2eBnDSIKtOilAwDLRsMBWA.gif" /></figure><h3>Rules</h3><ul><li>You have to write a <strong>Brainfuck interpreter</strong> (see a bit further for the definition of Brainfuck). This code has to work:</li></ul><pre>type Program = [<br>  // First letter<br>  P, P, P, P, J, R, P, P, P, P, J, R, P, P, P, P, L, M, B, L, M, B, R, R, P, P, P, O, L, L,<br>  // Second letter <br>  P, P, P, P, J, R, P, P, P, P, J, R, P, P, L, M, B, L, M, B, R, R, P, P, P, P, P, O, <br>  // Third letter<br>  M, M, M, O, <br>  // Fourth letter,<br>  P, P, P, O,<br>];</pre><ul><li>You can only <strong>use Typescript types</strong>. Any form of Javascript is strictly prohibited.</li><li>If you think the challenge is too easy (lul), you can make it even harder by<strong> banning the use of numbers entirely</strong>. That’s what I did by using <a href="https://medium.com/ekino-france/the-useless-type-calculator-in-typescript-edb8d525fe31">my custom number system from the first article</a>.</li></ul><h4>The Brainfuck definition</h4><p>Brainfuck is a language created in 1993 by Urban Müller. In Brainfuck, you have a memory composed of cells of integers. You also have one pointer pointing to the current memory cell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*mqN7DPQQw6NfW3OD8eLDEA.png" /></figure><p>This language uses 8 operators and so 8 characters to write code.</p><ul><li><strong>+</strong> <strong>increments</strong> the value of the current cell.</li><li><strong>- decrements</strong> the value of the current cell.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*qIAz8B0oZ9I4Gd_l-Nrn6A.png" /></figure><ul><li><strong>&gt;</strong> <strong>moves the pointer</strong> to the cell <strong>to the</strong> <strong>right</strong>.</li><li><strong>&lt;</strong> <strong>moves the pointer</strong> to the cell <strong>to the</strong> <strong>left</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*YtcrfcuSe4Sx_YthmITmtQ.png" /></figure><ul><li><strong>[</strong> is the <strong>start of a loop</strong>. If the current cell value is 0, the interpreter jumps to the matching <strong>]</strong>, skipping the loop body. Otherwise, it continues with the next instruction.</li><li><strong>]</strong> is the <strong>end of a loop</strong>. If the current cell value is not 0, the interpreter jumps back to the matching [, repeating the loop. Otherwise, it continues with the next instruction.</li></ul><p>Here’s an example of the loop usage with the program: <strong>++[&gt;+++&lt;-]</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*y1W0EOAYzw_50SABe5cB9A.png" /></figure><p>When evaluating <strong>[</strong> (the start of the loop), we have <strong>2</strong> in our current cell. So we don’t jump out of the loop and we execute the loop body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*wd4phPeGbGZdzeJiY1T1zQ.png" /></figure><p>Now, when evaluating <strong>]</strong> (the end of the loop), we have <strong>1</strong> in our current cell. So we jump back to the beginning of the loop and execute the loop body a second time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*Ksk-tdQ6ue4_zBU2nV3lVQ.png" /></figure><p>This time, when evaluating <strong>]</strong>, the current cell value is<strong> 0</strong>. So we continue the program which finish because it was the last instruction. And yes, this little program performed the mathematical operation <strong>2x3</strong>.</p><ul><li><strong>,</strong> reads a <strong>character from the input</strong>. However, this operator doesn’t have to be implemented because we can’t access <em>stdin</em> using Typescript types.</li><li><strong>.</strong> sends the <strong>output character</strong> <strong>corresponding to the ASCII value from of the current cell</strong>. For example, if you want to output an A, your cell must contain the value 65. <a href="https://www.asciitable.com/">Here’s the full ASCII table.</a></li></ul><p>Since Typescript doesn’t accept non-letter characters in type names, we’ll use letters to represent each operator. Here’s my syntax:</p><ul><li><strong>+</strong> is <strong>P </strong>(Plus)</li><li><strong>-</strong> is <strong>M</strong> (Minus)</li><li><strong>&lt;</strong> is <strong>L</strong> (Left)</li><li><strong>&gt;</strong> is <strong>R</strong> (Right)</li><li><strong>.</strong> is <strong>O</strong> (Output)</li><li><strong>,</strong> is <strong>I</strong> (Input)</li><li><strong>[</strong> is <strong>J</strong> (Jump)</li><li><strong>]</strong> is <strong>B</strong> (Back)</li></ul><p><em>Have fun… I guess?</em></p><figure><img alt="A animated picture of Patrick from Spongebob with its head exploding." src="https://cdn-images-1.medium.com/max/450/1*KG6zYwXsABzN7QlZcfwimw.gif" /><figcaption>It’s ok pal. It’s ok. The solution is just below.</figcaption></figure><h3>Theorical solution: write a Brainfuck interpreter in a functional way</h3><p>For this exceptional project — and because of the complexity of the Typescript code written — I’ll start by explaining the theory. Then, we’ll dive into the Typescript syntax and the horror of types with too many lines.</p><p><a href="https://medium.com/ekino-france/the-useless-type-array-sorter-in-typescript-d2c6f53eab9e">In my last article</a>, I explained how writing programs using Typescript types is similar to functional programming without higher-order functions. With this predicate, we first need to understand how to build the interpreter using functional programming principles before translating it into Typescript syntax.</p><p>So, what is a Brainfuck program? <strong>It’s a sequence of simple instructions, executed one by one.</strong> Following that logic, our program should be represented as an array (a <em>list of instructions</em>), and our interpreter should be a recursive function that executes the current instruction, then calls itself with the remaining instructions. Here’s a simple example with the program <strong>++&gt; </strong>and a function <em>Execute(prog)</em>:</p><pre>execute (++&gt;) = <br>  Use + and <br>  execute (+&gt;) = <br>    Use + and <br>    execute (&gt;) = <br>      Use &gt;</pre><p>With this idea in mind, how do we manage memory while executing more instructions? The solution is simple: <strong>we add a memory argument to our function</strong>. Each execution step updates the memory based on the current instruction, then passes the updated memory to the next execution. Since the memory only contains integer values, we can represent it using a simple integer array.</p><pre>execute (++&gt;, [0]) = execute (+&gt;, [1]) = execute (&gt;, [2]) = [2, 0]</pre><p>The next step is to simulate <em>stdout</em>. <strong>It’s just a simple string </strong>that gets new characters whenever we encounter the <strong>.</strong> (or <strong>O</strong>) operator. We could also simulate input by passing a string to the Execute function, and after each <strong>,</strong> (or <strong>I</strong>), we’d pop the first character. I didn’t do that, but it wouldn’t be hard to do.</p><p>Now come the hardest operators: <strong>[ </strong>and<strong> ]</strong>. When I started coding them, I used<strong> a <em>storage-based approach</em></strong>. You have a two-dimensional array of operators. The first dimension represents the current loop nesting level. Each time we enter a loop, we increment this nesting level. We push each instruction to the current and previous nesting levels as we execute them. Then, when we reach the end of a loop and the current cell value is not zero, we prepend the instructions from the current nesting level to the remaining instructions — effectively re-executing the loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*OWIAxzp66Y_l3rfnQ7EdyA.png" /></figure><p>It’s a decent solution, but I ran into quite a few bugs during implementation. Therefore, I preferred to go for something smarter and simpler. In the previous approach, we already had the entire program stored at the first index of our array. So <strong>why don’t we keep the full program and store the instruction index for the beginning of each loop?</strong> That’s the approach I ended up using for this interpreter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*BjhBHOEiGkpa2wkfAxfXHA.png" /></figure><p>We can repeat instructions, but currently, we can’t skip the entire loop execution if the initial condition is <em>false</em>. To fix that, I added another parameter to the <em>Execute(program)</em> function which is <strong>the nested level we must reach before resuming execution</strong>.</p><p>With this theoretical working interpreter, we can now implement it with our types — or at least give it a shot.</p><p>Before your brain starts turning into slime, take a 2 minutes break.<br>Listen to this ambient new age music and gaze at beautiful trees and breathtaking landscapes.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1ZYbU82GVz4%3Fstart%3D4496%26feature%3Doembed%26start%3D4496&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1ZYbU82GVz4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1ZYbU82GVz4%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/78ed3d4f878ba0e3eb3afcda1f636544/href">https://medium.com/media/78ed3d4f878ba0e3eb3afcda1f636544/href</a></iframe><p>Okay. Here comes the bad guy.</p><h3>Practical solution: write a Brainfuck interpreter with types</h3><p>To define our Brainfuck instructions, we are using <a href="https://medium.com/ekino-france/the-useless-type-calculator-in-typescript-edb8d525fe31">our good ol’ TypeNumber written with types</a>. <strong>Each instruction is represented as a number between 1 and 8</strong>, and we define a union type that includes all valid operators.</p><pre> type P = One;<br> type M = Add&lt;One, P&gt;;<br> type L = Add&lt;One, M&gt;;<br> type R = Add&lt;One, L&gt;;<br> type O = Add&lt;One, R&gt;;<br> type I = Add&lt;One, O&gt;;<br> type J = Add&lt;One, I&gt;;<br> type B = Add&lt;One, J&gt;;<br><br> type Operators = P | M | L | R | O | I | J | B;</pre><p>To make our syntax a bit more manageable when writing the Execute function, we’ll <strong>introduce a type that behaves like a switch-case</strong> in traditional languages. But since Typescript’s conditional types only allow us to build if-else chains, well… let’s go ahead and write this awful monster.</p><pre> type IFOP&lt;<br>  Op extends Operators,<br>  PCase,<br>  MCase,<br>  LCase,<br>  RCase,<br>  OCase,<br>  ICase,<br>  JCase,<br>  BCase,<br> &gt; =<br>  EQ&lt;Op, P&gt; extends true<br>   ? PCase<br>   : EQ&lt;Op, M&gt; extends true<br>    ? MCase<br>    : EQ&lt;Op, L&gt; extends true<br>     ? LCase<br>     : EQ&lt;Op, R&gt; extends true<br>      ? RCase<br>      : EQ&lt;Op, O&gt; extends true<br>       ? OCase<br>       : EQ&lt;Op, I&gt; extends true<br>        ? ICase<br>        : EQ&lt;Op, J&gt; extends true<br>         ? JCase<br>         : EQ&lt;Op, B&gt; extends true<br>          ? BCase<br>          : never;</pre><figure><img alt="An animated image of a dog sniffing something, then making a face and swatting at it with its paw." src="https://cdn-images-1.medium.com/max/367/1*28oNB5Ev_myS5MjtkfX7yQ.gif" /><figcaption>Your reaction</figcaption></figure><p>Now that we have our first monster, it needs a good friend. This one will be <strong>the definition of the Execute function, </strong>based on the theory paragraph. So if you remember correctly, we had a lot of parameters:</p><ul><li>the program</li><li>the memory</li><li>the current cell index</li><li>the output</li><li>the current nested loop level</li><li>the skip nested loop level</li><li>the entire program</li><li>the current program index</li><li>the array of loop beginning indexes</li><li>an error parameter to catch bugs (<em>though we won’t explain that one in this article</em>)</li></ul><p>Now, just imagine writing a type with all of those parameters…</p><pre>type Execute&lt;<br>  P extends Array&lt;Operators&gt;,<br>  Memory extends Array&lt;TypeNumber&gt; = [Zero],<br>  CurrentCell extends TypeNumber = Zero,<br>  CurrentError extends InterpreterError | null = null,<br>  Output extends string = &#39;&#39;,<br>  LoopLevel extends TypeNumber = One,<br>  SkipUntilLoopLevel extends TypeNumber = One,<br>  InitialProgram extends Array&lt;Operators&gt; = P,<br>  CurrentProgramIndex extends TypeNumber = Zero,<br>  LoopBackPointers extends Array&lt;TypeNumber&gt; = [Zero, Zero],<br> &gt; = never;</pre><figure><img alt="An animated image of a man losing his mind moving his head from left to right with the text: “Lord have mercy”" src="https://cdn-images-1.medium.com/max/498/1*DKvPUgfU4bOR4qTg8ZMe8g.gif" /><figcaption>Your new reaction</figcaption></figure><p>Based on these parameters, we need <strong>to define how each part of our interpreter should behave for each instruction</strong>. So, let’s start with the <em>Program (P)</em> behavior.</p><p>Each time the <em>Execute</em> function is called, we must extract the current instruction and call the function again with the remaining instructions. We’re using a conditional type here, just like we did in our previous articles:</p><pre>P extends [infer Op extends Operators, ...infer Rest]<br>  ? Execute&lt;<br>    Rest extends Array&lt;Operators&gt;<br>      // Call the next instruction with remaining instructions<br>      ? Rest<br>      // Call the last Execute call without any instruction<br>      //  because there&#39;s not any remaining instruction<br>      : [],<br>    // Current instruction is available in the Op variable<br>    ...&gt;<br>  // No more Op to execute = the end of the program<br>  : [] // This is the type returned at the end</pre><h4>Memory parameter: Plus, Minus and a bit of Right</h4><p>Each instruction is executed one by one. For the <em>Memory</em> part, <strong>two instructions modify its value: P (+) and M (-)</strong>. The first one increments the current cell’s value, while the second one decrements it. We also introduce two behaviors that are not defined in the original interpreter spec:</p><ul><li>When decrementing, we check the current value. If it’s 0, the interpreter throws an error. I added this because my current number implementation doesn’t support negative numbers.</li><li>When moving to the next cell with R (&gt;), we push a new cell if none exists. Technically, Brainfuck interpreters use a fixed-size memory, but I prefer to expand it dynamically as needed.</li></ul><pre>IFOP&lt;<br>  Op,<br>  // P case<br>  IncrementCell&lt;Memory, CurrentCell&gt;,<br>  // M case (with a non-zero check to avoid negative numbers)<br>  GT&lt;<br>    Memory[ToRealNumber&lt;CurrentCell&gt;],<br>    Zero<br>  &gt; extends true<br>    ? DecrementCell&lt;Memory, CurrentCell&gt;<br>    : Memory,<br>  Memory,<br>  // R case (with an auto-scaling memory)<br>  AddCellIfNeeded&lt;Memory, Add&lt;CurrentCell, One&gt;&gt;,<br>  Memory,<br>  Memory,<br>  Memory,<br>  Memory<br>&gt;</pre><p>The<em> IncrementCell</em> function seems pretty straightforward: it just increments the value of a specific cell. But since we’re using functional programming with only basic operations, <strong>we don’t have any helper to locate the correct cell and update its value directly</strong>. I see two simple ways to handle this:</p><ul><li>Split the memory into three parts: the part before the current cell, the current cell itself, and the part after. Then replace the current cell with its incremented value.</li><li>Iterate through the memory array until we reach the target index, then return the updated value along with the remaining cells.</li></ul><p>I went with the second approach, but honestly, the first one feels cleaner.</p><pre>type IncrementCell&lt;<br>  Memory extends Array&lt;TypeNumber&gt;,<br>  // CurrentCell is our counter decremented after each function iteration<br>  CurrentCell extends TypeNumber,<br>&gt; = Memory extends [<br>  infer Current extends TypeNumber,<br>  ...infer Rest extends Array&lt;TypeNumber&gt;,<br>]<br>  ? IF&lt;<br>    // True = we reach the good cell index<br>    EQ&lt;CurrentCell, Zero&gt;,<br>    // Increment and return the new memory<br>    [Add&lt;Memory[ToRealNumber&lt;CurrentCell&gt;], One&gt;, ...Rest],<br>    // Continue recursive calls with a decremented CurrentCell<br>    [Current, ...IncrementCell&lt;Rest, Sub&lt;CurrentCell, One&gt;&gt;]<br>   &gt;<br>  : [Zero];</pre><figure><img alt="An animated image of Jim in The office with a surprise expression (more like “WTF?”)" src="https://cdn-images-1.medium.com/max/498/1*n5tnmoMA8EtOc85YcncAGA.gif" /><figcaption>Your honest reaction</figcaption></figure><h4>CurrentCell parameter: Right and Left</h4><p>The <em>CurrentCell</em> parameter <strong>keeps the index of our current cell used</strong>. These rules are applied to this parameter:</p><ul><li>When we get an R (&gt;), we increment <em>CurrentCell</em>.</li><li>When we get an L(&lt;), we decrement <em>CurrentCell</em>.</li></ul><pre>IFOP&lt;<br>  Op,<br>  CurrentCell,<br>  CurrentCell,<br>  // L case: we check if we&#39;re not at the beginning of the memory<br>  GT&lt;CurrentCell, Zero&gt; extends true<br>    ? Sub&lt;CurrentCell, One&gt;<br>    : CurrentCell,<br>  // R case: go to next cell by incrementing the CurrentCell index<br>  Add&lt;CurrentCell, One&gt;,<br>  CurrentCell,<br>  CurrentCell,<br>  CurrentCell,<br>  CurrentCell<br>&gt;</pre><p>If you read the previous code carefully, you might have noticed a function called<em> AddCellIfNeeded</em> that we haven’t explained yet. This function simply creates a new cell when the <em>CurrentCell</em> moves to a non-existent cell on the “right” side of the memory (the end). We could technically do the same for movements to the left, but <strong>that wouldn’t be compliant with the Brainfuck specifications</strong> — assuming such specifications even exist.</p><pre>type AddCellIfNeeded&lt;<br>  Memory extends Array&lt;TypeNumber&gt;,<br>  CurrentCell extends TypeNumber,<br>&gt; = IF&lt;<br>  GTE&lt;CurrentCell, NumberOfElements&lt;Memory&gt;&gt;,<br>  // True -&gt; Create a new cell<br>  [...Memory, Zero],<br>  // False -&gt; Do nothing<br>  Memory<br>&gt;;</pre><h4>Output parameter</h4><p>The <em>Output</em> parameter is a simple template literal, using this cool feature of Typescript 4.1. We also use a basic <em>Char</em> table — essentially just an ASCII table — to convert code into characters. It looks like this:</p><pre>EQ&lt;Op, O&gt; extends true<br>  ? `${Output}${Char[ToRealNumber&lt;Memory[ToRealNumber&lt;CurrentCell&gt;]&gt;]}`<br>  : Output,</pre><p><em>You need a break. Because the ugliest part of the article is just few pixels away. <br>You need to see cute animals. With a piano. A very calm piano. <br>Work is far away. Typescript is far away. <br>There are only cute animals watching you. <br></em><strong><em>You are a cute animal.</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FuLcBpuB8UiA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuLcBpuB8UiA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FuLcBpuB8UiA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/273895819b8a247919bc5e5df28df031/href">https://medium.com/media/273895819b8a247919bc5e5df28df031/href</a></iframe><p><strong>Time’s up!</strong></p><p>Come back to the reality and prepare yourself for the <em>horror</em>.</p><h4>The five parameters to create loops</h4><p>If we summarize our current program implementation, we have a big recursive function named <em>Execute</em> that iterates over each instruction until there are no instructions left in the program. But since we want to be able to loop though the program, <strong>we need to update it with some new features</strong>.</p><p>When we encounter on a <strong>B</strong> (<strong>]</strong>) instruction, we change the following things in the next <em>Execute</em> iteration, but only if the current cell value is not 0 (<strong>because we have to re-execute the loop</strong>):</p><ul><li>We replace the program with the one containing the full loop instructions (to re-execute the loop).</li><li>We update the <em>CurrentProgramIndex</em> to point to the instruction right after the beginning of the current loop.</li></ul><p>But if the cell value is 0, <strong>the loop ends</strong>, so:</p><ul><li>We decrement the current <em>LoopLevel</em>.</li><li>We remove the last <em>LoopBackPointer</em> (because we won’t go back to the beginning of the loop anymore).</li></ul><p>For the <strong>J</strong> (<strong>[</strong>) instruction, it’s pretty much the same. If the current cell value is not 0 (meaning <strong>we need to execute the loop code</strong>):</p><ul><li>We increment the current <em>LoopLevel</em>.</li><li>We add the next instruction to the <em>LoopBackPointers</em> (so we can jump back to it if needed at the end of the loop).</li></ul><p>If the current cell value of 0, we <em>simply</em> need to ignore all instructions until we reach the end of the loop. And that’s why we did some theory before diving into this mess: <strong>we’ll add some conditions before the <em>Execute</em> function to <em>skip </em>each instruction one by one</strong> until we return to the correct loop level.</p><p>At this point, the code is especially long because we have to write multiple <em>Execute</em> cases with all of its arguments. The main pain point I had was figuring <strong>how to recreate the program state at the start of the loop</strong>. But by using some pointers to save that index, it wasn’t that hard.</p><pre>// Program recomputation<br>Rest extends Array&lt;Operators&gt;<br>  ? EQ&lt;Op, B&gt; extends true<br>    ? Memory[ToRealNumber&lt;CurrentCell&gt;] extends Zero<br>      ? Rest<br>      : GetProgramFromIndex&lt;<br>        InitialProgram,<br>        LoopBackPointers[ToRealNumber&lt;LoopLevel&gt;]<br>      &gt;<br>    : Rest<br>  : [],</pre><p>The <em>GetProgramFromIndex</em> is a simple loop which is iterating recursively on the original program until it reaches the good index.</p><pre>type GetProgramFromIndex&lt;<br>  Program extends Array&lt;Operators&gt;,<br>  CurrentIndex extends TypeNumber,<br>&gt; =<br>  EQ&lt;CurrentIndex, Zero&gt; extends true<br>    ? Program<br>    : GetProgramFromIndex&lt;<br>        Program extends [<br>          infer _,<br>          ...infer Elements extends Array&lt;Operators&gt;,<br>        ]<br>        ? Elements<br>        : [],<br>      Sub&lt;CurrentIndex, One&gt;<br>&gt;;</pre><p>And … <strong>yes, we dit it.</strong></p><figure><img alt="A animated gif of a muppet with fire behind it. The muppet has arms in the air with the text “Finally”" src="https://cdn-images-1.medium.com/max/440/1*0C--vS2Z9xcPjJ3Yd3-EOA.gif" /></figure><h3><strong>Program result</strong></h3><p>It’s time <strong>to discover what was hidden behind this strange Brainfuck code</strong>. Maybe it’s the recipe for happiness. Or the secret bank code to transfer all the money in the world on your account. Or maybe…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jlSuVi_1tz_38zP4Ka4bwQ.png" /><figcaption>Yes, it’s only the word “Cheh”</figcaption></figure><p>Cheh is a French slang that can be translated as “deserved” or “serves you right”. Like: “<em>Oh, you spent a few hours writing a wonderful Brainfuck compiler and it’s completely useless? CHEH</em>”</p><figure><img alt="An image of an annoyed dog with the text “Really?”" src="https://cdn-images-1.medium.com/max/625/0*pe9qBl0EhPhQoknt.jpg" /><figcaption>Your last reaction</figcaption></figure><p><strong>Yes, it’s a terrible reward.</strong></p><p>So yes, <strong>we wrote this Brainfuck compiler with only Typescript types</strong>. <a href="https://github.com/AamuLumi/extreme-typescript/blob/main/src/brainfuck-compiler.ts">The code is available here.</a> Honestly, it took me a few months to be able to write this article, because this mess is clearly… a giant mess. I’m not even sure what the interest of this article is, except to show off some Typescript dark magic. And I really hope you enjoyed it — or at least learned something.</p><p><strong>I won’t write about this subject again for the next months.</strong> After writing the code, it felt like there wasn’t much more to learn from this kind of stupid but funny exercise. I’m currently studying other topics, like programming language quality assessment or reverse-engineering from assembly to C. These might lead to new articles on more accessible subjects, <strong>so feel free to follow me if you’re interested </strong>(especially if you read French, since I want to go back to writing in my native language 🥖).</p><p>If you need more Typescript stupid things, <a href="https://www.reddit.com/r/programming/comments/1iyqeu7/typescript_types_can_run_doom/">here’s someone who runs DOOM with the Typescript types</a>. <strong>Yes, it’s another level of stupidity</strong>.</p><p><strong>Thanks a lot for reading this big Typescript mess. You rock. xoxo</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*cTbcbzWOr3hlz_NrIDYIJA.gif" /></figure><p><em>Thanks to Nicolas and Elodie from </em><a href="https://www.ekino.fr/"><em>ekino</em></a><em> for their suggestions and corrections on this article 🫶</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=616acac57205" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ekino-france/the-useless-brainfuck-interpreter-in-typescript-616acac57205">The Useless Brainfuck Interpreter in Typescript</a> was originally published in <a href="https://medium.com/ekino-france">ekino-france</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Useless Type Array Sorter in Typescript]]></title>
            <link>https://medium.com/ekino-france/the-useless-type-array-sorter-in-typescript-d2c6f53eab9e?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2c6f53eab9e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Mon, 11 Nov 2024 00:00:12 GMT</pubDate>
            <atom:updated>2025-01-30T09:58:46.868Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C55ge0d73mpI5ucxxXz5Zw.png" /></figure><h3>The Useless Type Array Sorter in TypeScript</h3><h4>The stupid idea came back</h4><p>To understand this article, you need to read the first part of the article: <a href="https://medium.com/@AamuLumi/the-useless-type-calculator-in-typescript-edb8d525fe31">The Useless Type Calculator in Typescript</a></p><p><em>Through space and time, when you never wait for their comeback, they arrive with the future. Not the future you wanted, clearly not the one with flying cars and toaster robots preparing your delicious meal, but the one where a human pushed their stupid idea too far. Really too far.</em></p><p>So, I have a new job. It’s cool, and I have some time and motivation to work on my side projects. But instead of working on something useful, something that will help someone do a specific task I don’t know, I prefer to dig up my truly useless project: the good ol’ calculator made only with types and without any numbers.</p><p>The main problem is figuring out what I can do with this project. I did something funny (yes, a strange notion of fun), but is there something funnier? Is there something that can be more ridiculous than computing numbers with types? Can we level up our stupidity to go higher than the stratosphere?</p><p>Of course, we can.</p><p>Here comes part two of this project.</p><p>We will sort an array of numbers.</p><p>Without numbers.</p><p>Only with types.</p><figure><img alt="An image from Grand Theft Auto of a man saying : “Ah shit, here we go again !" src="https://cdn-images-1.medium.com/max/518/1*G_kG8de0M_jtU49e0AyyLg.gif" /></figure><h3>The rules</h3><p>The challenge is pretty simple:</p><ul><li>you start with our two booleans.</li></ul><pre>type BZero = false;<br>type BOne = true;</pre><ul><li>you can’t use any number. However, you can use the numbers and operations created in the first part. I defined a simple structure with them:</li></ul><pre>type D = {  <br>    Zero: Zero,  <br>    One: One,  <br>    Two: Add&lt;One, D[&#39;One&#39;]&gt;,  <br>    Three: Add&lt;One, D[&#39;Two&#39;]&gt;,  <br>    Four: Add&lt;One, D[&#39;Three&#39;]&gt;,  <br>    Five: Add&lt;One, D[&#39;Four&#39;]&gt;,  <br>    Six: Add&lt;One, D[&#39;Five&#39;]&gt;,  <br>    Seven: Add&lt;One, D[&#39;Six&#39;]&gt;,  <br>    Eight: Add&lt;One, D[&#39;Seven&#39;]&gt;,  <br>    Nine: Add&lt;One, D[&#39;Eight&#39;]&gt;,  <br>}</pre><ul><li>you have an array, and you have to sort it.</li></ul><pre>type TestArrayToSort = [D[&#39;Six&#39;], D[&#39;One&#39;], D[&#39;Five&#39;], D[&#39;Three&#39;], D[&#39;Eight&#39;], D[&#39;One&#39;]];<br><br>// The result to obtain<br>type Result = [D[&#39;One&#39;], D[&#39;One&#39;], D[&#39;Three&#39;], D[&#39;Five&#39;], D[&#39;Six&#39;], D[&#39;Eight&#39;]];</pre><ul><li>it’s a TypeScript types-only challenge. So you can’t use type guards or any code using JavaScript.</li></ul><p>Happy coding!</p><figure><img alt="An image from The Office of a woman behind a desk screaming “Let’s go !”" src="https://cdn-images-1.medium.com/max/640/1*yRcf5YiNAepUq4vHDbWfoQ.gif" /></figure><p>…</p><p>…</p><p>Ok, I know you’re here to read the solution.</p><figure><img alt="An image from The Office of a man winking to the camera" src="https://cdn-images-1.medium.com/max/498/1*hvfaZs5hKzRBXjB7so6Mfg.gif" /></figure><h3>The solution</h3><p>To code this algorithm, I‘ve decided to … create conditions and control flow structures like any programming language.</p><figure><img alt="An image zooming on the face of a turtle in a animation movie. The turtle is doing a surprised expression (like “What ???”)." src="https://cdn-images-1.medium.com/max/586/1*0a6y96C_yOfdK96CyJs6nw.gif" /><figcaption>You.</figcaption></figure><h4>Comparison operators and conditions</h4><pre>type EQ&lt;A extends TypeNumber, B extends TypeNumber&gt; =  <br>    A extends B  <br>       ? true  <br>       : false;</pre><p>The EQ operator is pretty obvious. We&#39;re just checking A and B have the same type.</p><pre>type GTE&lt;A extends TypeNumber, B extends TypeNumber&gt; =  <br>    A extends [...infer _, ...B]  <br>       ? true  <br>       : false;<br><br>type LTE&lt;A extends TypeNumber, B extends TypeNumber&gt; =  <br>    B extends [...infer _, ...A]  <br>       ? true  <br>       : false;</pre><p><strong>Small reminder</strong>: the <em>infer</em> keyword in a conditional type will retrieve a type into a type variable. In this case, <em>…infer _</em> will retrieve the type of what’s left by the <em>…B</em> type in the array. <em>(</em><a href="https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#inferring-within-conditional-types"><em>infer keyword documentation</em></a><em>)</em></p><p>The main idea behind GTE is to check if our number A contains the number B (the same technique used to code Divide in the first part). It feels a bit counterintuitive, but you can read the syntax as is A equals to (something + B) ?.</p><p>By swapping A and B, you get the LTE operator.</p><pre>type GT&lt;A extends TypeNumber, B extends TypeNumber&gt; =  <br>    A extends [...infer _, ...B]  <br>       ? A extends B  <br>          ? false  <br>          : true  <br>       : false;<br><br>type LT&lt;A extends TypeNumber, B extends TypeNumber&gt; =  <br>    B extends [...infer _, ...A]  <br>       ? B extends A  <br>          ? false  <br>          : true  <br>       : false;</pre><p>The GT and LT operators are curiously more complex than GTE and LTE because we added a check to return false if we are in the case of A extends B (the EQ case).</p><p>So we have our basic operators. We can now define a type using these operators and, according to the result, we use the TrueCase or the FalseCase.</p><pre>type ComparisonOperator&lt;A extends TypeNumber = Zero, B extends TypeNumber = Zero&gt; =  <br>    LTE&lt;A, B&gt; |  <br>    LT&lt;A, B&gt; |  <br>    GTE&lt;A, B&gt; |  <br>    GT&lt;A, B&gt; |  <br>    EQ&lt;A, B&gt;;<br><br>type Instruction = any;<br>type I_DoNothing = never;<br><br>type IF&lt;C extends ComparisonOperator,   <br>  TrueCase extends Instruction = I_DoNothing,   <br>  FalseCase extends Instruction = I_DoNothing&gt; =  <br>    C extends true ? TrueCase : FalseCase;</pre><p>I’ve constrained the TrueCase and FalseCase with an Instruction type because I&#39;m pretty sure I will have a cool Instruction type in the future. And tadaaaa! We have a type system with condition and comparison operators! Piece of cake!</p><figure><img alt="An image of a man saying “It’s a weird flex, but sure.”" src="https://cdn-images-1.medium.com/max/640/1*dHIlac1IEqS7PR1o2towvA.gif" /></figure><h4>The sorting algorithm</h4><p>I’ve decided to implement an <a href="https://en.wikipedia.org/wiki/Insertion_sort">insertion sort</a> because it’s a very simple and intuitive algorithm. You take each element of your input array, and you place these elements at the good index of the output array. Nothing more.</p><p><strong>Typescript types as a <em>functional programming language</em>?</strong></p><p>The first important thing is to create a loop with a stop condition. It seems very simple, but there’s a problem in TypeScript: programming with types is <strong>a kind of</strong> <em>functional programming</em> and not <em>imperative programming</em>. Writing a while would be something like this:</p><pre>type While&lt;  <br>    LoopCondition extends ComparisonOperator,   <br>    LoopCase extends Instruction = I_DoNothing,   <br>    OutCase extends Instruction = I_DoNothing  <br>&gt; =  <br>    LoopCondition extends true ? <br>        While&lt;LoopCondition, LoopCase, OutCase&gt; : <br>        OutCase;</pre><p>But I said <strong>a kind of</strong> functional programming. Because TypeScript can compute basic types (boolean, string, etc.) and generic types (ReturnType, Omit, etc.) but can&#39;t compute generic of generic types. If we compare TypeScript with functional programming, we get this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*fbSk9RLqK5d6YoHMjf4wTg.png" /><figcaption>Comparison table between TypeScript and any functional programming language</figcaption></figure><p><a href="https://en.wikipedia.org/wiki/Higher-order_function">Higher-order functions</a> are an important part of <em>functional programming</em> because it’s the principle used to define <em>predicates</em> for loops, mapping functions, etc. Without that, we could only give a literal or computed value ( myVar &lt; 5) to a while function and not a <em>step-by-step computed value</em> ((myVar) =&gt; myVar &lt; 5).</p><p>That’s exactly what is happening with our While type: if we use it, we will pass a value for the LoopCondition and not a predicate. So it&#39;s an infinite loop because the LoopCondition is never recomputed.</p><p><a href="https://github.com/microsoft/TypeScript/issues/1213">This issue</a> has been quickly spotted by some developers and is still active since 2014. Until the implementation of these <strong>Higher Kinded Types (HKTs)</strong> in Typescript core, some crazy developers worked on the subjects and achieved implementations of HKTs:</p><ul><li><a href="https://code.lol/post/programming/higher-kinded-types/">Alice Poteat on code.lol</a></li><li><a href="https://dev.to/effect/encoding-of-hkts-in-typescript-5c3">Michael Arnaldi on dev.to</a></li></ul><p>Maybe I’ll use them in future projects for a better code readability and simpler implementation, but let’s not use them for our current algorithm.</p><figure><img alt="An image of a woman saying “You’re crazy.”" src="https://cdn-images-1.medium.com/max/640/1*HaaTQBaB3G-sfJwp12k-Ow.gif" /><figcaption>Probably you.</figcaption></figure><p><strong>Back to the sorting</strong></p><p>We start to work here with an input array and an output array. We will take elements one by one from the input and place them in their good place in the output. So we will have something like this:</p><pre>type DoNothing = never; // A stupid placeholder type<br><br>type SortArray&lt;<br> ArrayParam extends Array&lt;TypeNumber&gt;, <br> Out extends Array&lt;TypeNumber&gt; = []<br>&gt; =  <br>    IF&lt;GT&lt;ArrayParam[&quot;length&quot;], Zero&gt;,  <br>     DoNothing, // We will call sorting here<br>     Out  <br>    &gt;</pre><p>But this code can’t work because our GT needs a TypeNumber and not a number. In this case, the easiest thing to do is to compute manually the size of our array with a custom type instead of trying to transform a number to a TypeNumber. This custom type is quite easy after all the things we&#39;ve done: we&#39;re just emptying the array until it&#39;s empty, and we increment a counter after each iteration.</p><pre>type NumberOfElements&lt;<br> A extends unknown[], <br> Result extends TypeNumber = Zero<br>&gt; =  <br>    A extends [infer _, ...infer Rest]  <br>       ? Rest extends unknown[]  <br>          ? NumberOfElements&lt;Rest, Add&lt;Result, One&gt;&gt;  <br>          : NumberOfElements&lt;Rest, Result&gt;  <br>       : Result;</pre><p>The next step is to “iterate” on our array, do something until there’s no element in the input array, and return the output type. It will be something like this:</p><pre>type SortArray&lt;<br> ArrayParam extends TypeNumber[], <br> Out extends TypeNumber[] = []<br>&gt; =  <br>    IF&lt;GT&lt;NumberOfElements&lt;ArrayParam&gt;, Zero&gt;,  <br>       ArrayParam extends [infer CurrentElement, ...infer Rest]  <br>          ? Rest extends TypeNumber[]  <br>             // There are elements after the current one<br>             ? CurrentElement extends TypeNumber<br>                // We will search the index of our element here  <br>                ? SortArray&lt;Rest, never&gt;  <br>                : SortArray&lt;Rest, Out&gt;  <br>             : CurrentElement extends TypeNumber  <br>                // Search index of the last element<br>                ? never <br>                : Out  <br>          : Out,  <br>       Out  <br>    &gt;</pre><p>When reading this, someone in my imagination will say: “But why are you re-inferring CurrentElement type? ArrayParam extends TypeNumber[] and CurrentElement is the first element of ArrayParam, so CurrentElement is already TypeNumber, isn&#39;t it?&quot; That&#39;s true in theory. But we&#39;re using Typescript with <em>only</em> 5k+ open issues on the repository. So yes, this is only a check to remove a buggy TS2344 error. Why does it happen? Y&#39;know, I&#39;m a stupidity genius, not a wizard.</p><figure><img alt="An image of a man pointing his finger on his head." src="https://cdn-images-1.medium.com/max/308/1*B5x_rgiDMDQ4QO3lQA_SAg.gif" /><figcaption>Me.</figcaption></figure><p><strong>A place to call home</strong></p><p>The search part of the algorithm is easier than you think. Because our algorithm is really dumb: loop until we find a greater number than our element, and place our element at this place. Using <em>functional programming</em> (so recursive functions), we will produce something like this:</p><pre>Call rec. 0 // sort(6, [1, 4, 7, 9]) <br>Call rec. 1 // [1, ...sort(6, [4, 7, 9])] <br>Call rec. 2 // [1, ...[4, ...sort(6, [7, 9])]] <br>Resolve 2   // [1, ...[4, ...[6, 7, 9]]] <br>Resolve 1   // [1, ...[4, 6, 7, 9]] <br>Resolve 0   // [1, 4, 6, 7, 9]</pre><p>Each sort function call has to check if the new number is greater than the first element in the array. The call returns an array with the new elements followed by the rest of the array. Otherwise, we call another sort function but without the first element of the array.</p><p>With our set of magical types, we can implement this logic:</p><pre>type _SearchIndexForElement&lt;<br> NewNumber extends TypeNumber, <br> R extends Array&lt;TypeNumber&gt;, <br> // We remove an extends ternary by placing it here<br> CurrentElement extends TypeNumber = R[ToRealNumber&lt;Zero&gt;]<br>&gt; =  <br>    R extends [CurrentElement, ...infer Rest]  <br>       ? IF&lt;GT&lt;NewNumber, CurrentElement&gt;,  <br>          // Another useless check because it&#39;s Typescript<br>          Rest extends TypeNumber[]  <br>             // There&#39;s elements remaining in the array<br>             ? [CurrentElement, ..._SearchIndexForElement&lt;<br>              NewNumber, Rest&gt;]  <br>             // Useless case for a useless check<br>             : [...R, NewNumber],<br>          // We found a place for NewNumber  <br>          [NewNumber, ...R]  <br>       &gt;<br>       // No more elements in array, so <br>       //   NewNumber is the bigger number<br>       : [...R, NewNumber];</pre><p>Now we just have to call our new _SearchIndexForElement type in our sort algorithm:</p><pre>type SortArray&lt;<br> ArrayParam extends TypeNumber[], <br> Out extends TypeNumber[] = []<br>&gt; =  <br>    IF&lt;GT&lt;NumberOfElements&lt;ArrayParam&gt;, Zero&gt;,  <br>       ArrayParam extends [infer CurrentElement, ...infer Rest]  <br>          ? Rest extends TypeNumber[]  <br>             ? CurrentElement extends TypeNumber  <br>                ? SortArray&lt;Rest, _SearchIndexForElement&lt;CurrentElement, Out&gt;&gt;  <br>                : SortArray&lt;Rest, Out&gt;  <br>             : CurrentElement extends TypeNumber  <br>                ? _SearchIndexForElement&lt;CurrentElement, Out&gt;  <br>                : Out  <br>          : Out,  <br>       Out  <br>    &gt;</pre><p>When testing the algorithm, we got this result:</p><pre>type TestArrayToSort = [D[&#39;Six&#39;], D[&#39;One&#39;], D[&#39;Five&#39;], D[&#39;Three&#39;], D[&#39;Eight&#39;], D[&#39;One&#39;]];  <br>type TransformedResult&lt;T extends TypeNumber[]&gt; = { [K in keyof T]: ToRealNumber&lt;T[K]&gt; };  <br>type TestSort = TransformedResult&lt;SortArray&lt;TestArrayToSort&gt;&gt;;<br>// Got [1, 1, 3, 5, 6, 8]</pre><p>Oh yeah, we did it! It’s not perfect and poorly optimized, but hey, did you ever think somday you’d see a sort algorithm only with types? And the most interesting thing in this experience is not writing the algorithm but studying the complexity existing in types systems: as I explained before, we’re near to a real functional programming language. Typescript has its bugs, but it works correctly in a huge amount of use cases. And even in some of the strangest cases.</p><p>Thanks a lot for reading this article. I don’t know if I’ll write another part of this funny series of articles. I started a few months ago a work on coding a decimal calculator with types, but it’s not as easy as I thought. Anyway, don’t hesitate to share this article, discuss it with me on <a href="https://bsky.app/profile/aamulumi.bsky.social">Bluesky</a> or <a href="https://rivals.space/@aamulumi">Mastodon</a>, or just code anything funny.</p><p>Oh, and all the code is now available here: <a href="https://github.com/AamuLumi/extreme-typescript">https://github.com/AamuLumi/extreme-typescript</a></p><figure><img alt="An image of a sheep running to the camera and saying “Hi”." src="https://cdn-images-1.medium.com/max/220/1*gqvVD0vmYOMIHtE40ybz6Q.gif" /><figcaption>Cute goat wanted to thank you.</figcaption></figure><p><em>Thanks to Elodie and Armand for their help and advice. You rock!</em></p><p><em>Originally published at </em><a href="https://aamulumi.info/Dev/The-Useless-Type-Array-Sorter-in-Typescript"><em>https://aamulumi.info</em></a><em> on November 11, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2c6f53eab9e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ekino-france/the-useless-type-array-sorter-in-typescript-d2c6f53eab9e">The Useless Type Array Sorter in Typescript</a> was originally published in <a href="https://medium.com/ekino-france">ekino-france</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Non, on ne forme pas une développeuse ou un développeur en 6 mois]]></title>
            <link>https://medium.com/@AamuLumi/non-on-ne-forme-pas-une-d%C3%A9veloppeuse-ou-un-d%C3%A9veloppeur-en-6-mois-d44250520405?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d44250520405</guid>
            <category><![CDATA[développement]]></category>
            <category><![CDATA[formation]]></category>
            <category><![CDATA[informatique]]></category>
            <category><![CDATA[dev]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Thu, 28 Sep 2023 00:00:22 GMT</pubDate>
            <atom:updated>2024-10-26T10:58:11.448Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="Une image de développeurs et développeuses travaillant sur des ordinateurs. L’image est stylisée avec un “décalage de canal RGB”." src="https://cdn-images-1.medium.com/max/700/1*hhbaHMTltp_dJsTv-Tc8Zw.png" /></figure><h4>Réflexions sur la formation courte au développement informatique</h4><p><em>Posté initialement le 22 février 2024 sur mon blog : </em><a href="https://aamulumi.info/Dev/Non,-on-ne-forme-pas-une-d%C3%A9veloppeuse-ou-un-d%C3%A9veloppeur-en-6-mois"><em>https://aamulumi.info/Dev/Non,-on-ne-forme-pas-une-d%C3%A9veloppeuse-ou-un-d%C3%A9veloppeur-en-6-mois</em></a></p><p>—</p><p><em>Avant toute chose, je tiens à préciser qu’il s’agit d’un point de vue complètement personnel. Cet article est issu d’un ensemble d’expériences rassemblées au cours de mes années de travail en tant que Directeur Technique et Tech Lead d’une petite entreprise bordelaise, mais aussi formateur et conférencier. Je me sers aussi de beaucoup de discussions partagées avec des confrères et consoeurs de postes différents : responsables de formation, formateurs et formatrices, tech leads, CTO, alternants et alternantes, intervenants, développeurs et développeuses, recruteurs et recruteuses.Pour clarifier les choses, je suis autodidacte. J’ai ensuite enchaîné sur un BTS IRIS puis un Master Génie Logiciel à l’Université de Bordeaux. De fait, mon avis est forcément biaisé par mon cursus. J’essaierai au maximum de conserver un angle objectif en me basant sur les faits de mon expérience professionnelle mis en corrélation de la recherche et des faits existants, et je m’excuse par avance si l’objectivité de certains arguments laissent à désirer.Enfin, mon expérience et ma vie étant liée à la ville de Bordeaux, je me prononcerai en priorité sur le contexte bordelais.</em></p><p>Les formations “courtes” représentent aujourd’hui une voie de formation principale dans le domaine de l’informatique (principalement le développement Web). Las des Universités, IUT, BTS et autres écoles d’ingénieurs, les nouveaux développeurs et les nouvelles développeuses se tournent vers de nouvelles formations plus courtes pour entrer dans le monde paradisiaque du développement Web. Mais est-ce que ces formations suffisent réellement à former des développeurs et des développeuses ? Spoiler : non.</p><h3>Contextualisation des formations courtes</h3><p>Pour comprendre comment la situation actuelle s’est créée, il faut d’abord comprendre l’histoire de la formation dans l’informatique et la mettre en corrélation avec l’histoire de l’informatique en tant que travail en France.</p><figure><img alt="Une capture d’écran de la page d’accueil du Site du Zéro" src="https://cdn-images-1.medium.com/max/1024/1*6jZ5KCNZTjvYg3FWbB6VXg.png" /><figcaption>Le site du Zéro, temple disparu de l’initiation au développement</figcaption></figure><p>À une époque où la navigation “sur la toile” s’effectuait au moyen d’Internet Explorer ( <a href="https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/">qui est maintenant définitivement mort, RIP</a>), où les pages persos étaient là sans jamais devenir les blogs, où les rares webmestres devaient acheter des livres pour apprendre à coder, un certain <strong>M@teo21</strong> décide de créer un site permettant à n’importe qui d’apprendre à coder facilement : le <strong>Site du Zéro</strong>. Ce drôle de site où des passionné*es écrivaient des cours de développement a été une initiation formidable au doux monde du développement, d’abord pour moi, mais aussi pour un nombre non négligeable de connaissances. Le site connut un large succès, et plusieurs années plus tard, il devînt un site dédié à la formation courte : <strong>OpenClassrooms</strong>.</p><p>Le modèle change, la rédaction se professionnalise, et l’État autorise alors OpenClassrooms à délivrer des diplômes en échange de formations payantes. En parallèle, une <em>success story</em> donnant des idées à d’autres, des nouvelles écoles s’ouvrent. On découvre alors, sur Bordeaux, des nouvelles écoles <em>innovantes</em> comme la <a href="https://www.pappers.fr/entreprise/innoveduc-794926063">Wild Code School</a> (2013), le <a href="https://www.pappers.fr/entreprise/la-loco-810930123">Wagon</a> (2015), la <a href="https://www.pappers.fr/entreprise/la-capsule-823860234">Capsule</a> (2016), la <a href="https://www.pappers.fr/entreprise/la-piscine-830523866">Piscine</a> (2017), <a href="https://www.pappers.fr/entreprise/3wa-3w-academy-754047702">3WRH</a> (2018), ou encore <a href="https://www.pappers.fr/entreprise/actual-digital-france-900795212">Holberton School</a> (2021) pour ne citer que les plus célèbres.</p><p>Le principe est toujours le même : effectuer une formation <strong>intensive</strong> pour entrer dans le monde de la tech, réputé pour son confort de travail et ses hauts salaires.</p><figure><img alt="Plusieurs captures d’écrans des pages d’accueil des différentes formations au développement informatique" src="https://cdn-images-1.medium.com/max/1024/1*JeyOVmxD7MyAFGrPSLPiiA.png" /><figcaption>Un extrait des “quelques” formations courtes en développement</figcaption></figure><p>Bien évidemment, les écoles de formation font face à une demande réelle : <strong>l’explosion de la demande dans la tech</strong>. Internet a vécu un essor formidable depuis ses débuts, voyant <a href="https://www.internetworldstats.com/emarketing.htm">ses 16 millions d’utilisateurs en 1995 devenir 5 382 millions en 2022</a>. Les usages se sont multipliés : les utilisateurs d’Internet discutent, découvrent et consomment, faisant d’Internet un marché pesant <a href="https://www.broadbandsearch.net/blog/internet-statistics">4 900 milliards de dollars, et ce uniquement pour l’e-commerce</a>. Les sites web sont devenus des applications performantes et riches en fonctionnalités, propulsées pour beaucoup par l’essor des start-ups en recherche d’un produit innovant à vendre. Les smartphones se sont démocratisés, si bien que, <a href="https://www.insee.fr/fr/statistiques/6036909?sommaire=6049348#:~:text=est%20%C3%A9galement%20modifi%C3%A9.-,Une%20population%20tr%C3%A8s%20bien%20%C3%A9quip%C3%A9e,t%C3%A9l%C3%A9phone%20fixe%20dans%20son%20foyer.">en 2021, 77% de la population âgée de 15 ans ou plus en était équipée</a>, créant un marché de l’application mobile auparavant inexistant. Les appareils connectés ont atteint le doux nombre de <a href="https://iot-analytics.com/number-connected-iot-devices/">16,7 milliards d’objets actifs en 2023</a>, et le récent essor de l’intelligence artificielle permet <a href="https://www.nytimes.com/2022/09/02/technology/ai-artificial-intelligence-artists.html">à n’importe quel personne dotée d’un clavier de remporter des concours d’art</a>.</p><p>Devant la lenteur des formations “classiques” et la montagne d’offres d’emploi des domaines du développement, quelques entrepeneur*euses ont décidés de répondre plus rapidement à la forte demande en créant des formations plus courtes, plus intensives, mais aussi plus chères. Garantissant un emploi à la sortie, ces formations font de plus en plus d’adeptes, qu’il s’agisse d’étudiants post-bac ou de reconversions professionelles. Cependant, quels sont les arguments de ces formations pour pouvoir atteindre un résultat aussi rapidement et aussi bon (selon elles) ?</p><h3>Philosophies et méthodes de la formation courte</h3><p>L’innovation est le mot d’ordre de ces formations <em>next-gen</em>, dont le discours et les méthodes suivent non-exhaustivement ces préceptes :</p><h4>1 — Les écoles traditionnelles françaises ne forment pas correctement</h4><p>Quoi de mieux pour passer pour un type intelligent et malin que de dire que l’on disrupte le système éducatif français qui ne marche pas ? C’est notamment <a href="https://www.presse-citron.net/xavier-niel-presente-42-une-ecole-dinformatique-gratuite-qui-souhaite-revolutionner-leducation/">le discours qu’a tenu Xavier Niel lors de l’ouverture de 42</a> en 2013, et qui est repris par les nouvelles écoles pour crédibiliser leurs méthodes de formation.</p><figure><img alt="Une photo de Xavier Niel" src="https://cdn-images-1.medium.com/max/660/1*znEKDo7UrsZBzOmrgJrvsg.png" /><figcaption>Xavier Niel, pionnier de la décridibilisation des formations “classiques” en informatique</figcaption></figure><p>Là où tout semblait formidable et cohérent en 2013, les fissures de ce modèle révolutionnaire commençait déjà à apparaître en 2018, rassemblant <a href="https://etudes.developpez.com/actu/256794/A-l-Ecole-42-de-Xavier-Niel-sexe-harcelement-arnaques-et-comptes-offshore-une-enquete-de-Mediapart/">harcèlement et arnaques</a>. En dehors des faits journalistiques, et de discussion en discussion avec d’autres professionel*les, les anciens élèves de 42 ont tendance à exacerber les défauts des anciens élèves d’écoles d’ingénieurs privées : peu de remise en question, difficile à gérer, peu de soft skills, ou encore une tendance à rendre le travail en équipe compliqué.</p><p>Dans le cas des formations courtes, cet argument sert beaucoup plus à défendre une vision différente de la formation visant à mettre en avant la pratique plus que la théorie. Dans le domaine, on appelle ça <strong>apprendre à pisser du code</strong>.</p><p>Si cela semble une bonne idée au premier abord, il faut d’abord revenir sur une conjecture primordiale : l’informatique est un domaine qui évolue très rapidement. Tellement rapidement que la pratique apprise en 2024 a une chance non négligeable de tomber en désuétude dés 2030. C’est notamment pour cette raison que beaucoup d’écoles traditionnelles continuent de former à la théorie et donc <strong>aux bases de l’informatique</strong>. Les personnes qui connaissent la théorie ont beaucoup plus de facilité de s’adapter à de nouvelles choses, et, mieux encore, peuvent utiliser les théories de base pour concevoir de nouvelles théories et de nouveaux outils, donc innover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*QljNZhhKQRnJM5DmQK_P2Q.png" /></figure><p>Pour illustrer ce principe, il suffit de se pencher sur l’innovation actuellement à la mode : <strong>l’intelligence artificielle</strong>. Derrière ce concept fourre-tout se cache l’utilisation des réseaux neuronaux qui permettent d’apprendre et de répéter des choses. Si l’essor de l’intelligence artificielle a été durant ces 5 dernières années, le concept des réseaux neuronaux a été détaillé initialement dans un papier scientifique de 1967 nommé <a href="https://books.google.fr/books?id=rGFgAAAAMAAJ&amp;redir_esc=y">Cybernetics and Forcasting Techniques — A. G. Ivakhnenko &amp; Valentin Grigorʹevich Lapa</a>. Sans connaître la théorie, il n’y aurait donc pas eu d’intelligence artificielle de la façon dont on la connaît aujourd’hui.</p><p>Dans un contexte technique plus avancé, les personnes qui connaissent les patrons de conception (par exemple, <a href="https://en.wikipedia.org/wiki/Design_Patterns">ceux du Gang of Four</a>) sont plus propices à construire des solutions logicielles plus maintenables, comprendre plus facilement des technologies ou des langages qui reposent sur ces patrons ou même communiquer plus efficacement, étant donné qu’iels possèdent des éléments de langage basiques et communs au domaine. Par cette connaissance, ces développeurs et ces développeuses seront bien plus “productifs” que leurs équivalent*es formé*es uniquement à la pratique.</p><h4>2 — Pas de professeurs : les étudiants sont des mentors</h4><p>Le discours est simple : si on est capable d’enseigner, c’est que nous avons parfaitement compris la chose. C’est une philosophie que je partage complètement et que je pratique régulièrement sur différents sujets.</p><p>Néanmoins, là où les nouvelles écoles se targuent de cette philosophie comme solution miracle, il semble beaucoup plus pertinent d’y voir une optimisation des coûts plus qu’une idéologie : pourquoi payer des professeur*es alors qu’on pourrait se servir des élèves ? Cette méthode a et est toujours utilisée par <a href="https://etudiant.lefigaro.fr/le-labeducation/actualite/detail/article/a-l-epitech-nous-avons-supprime-les-cours-912/">l’école Epitech dans laquelle les étudiant*es d’années supérieures vont former les 1ère années</a>, officiellement pour que les élèves évoluent plus vite et créer de la cohésion (un terme alternatif à celui de <a href="https://en.wikipedia.org/wiki/Bro_culture">broculture</a>), officieusement pour réduire les coûts de formation et augmenter au maximum le bénéfice au détriment de la qualité de formation.</p><p>Sur un autre plan, l’absence de professeur implique que, si les élèves-mentors sont incapables de répondre à une question, la réponse viendra très probablement d’Internet. D’expérience, les élèves ont souvent des questions pertinentes qui nécessitent un retour d’expérience : pourquoi utiliser telle technologie et pas celle-ci ? Comment fonctionne telle architecture et est-ce que c’est adapté à ce projet ? Est-ce qu’il y a des cas dans lesquelles telle solution n’est pas intéressante ? Toutes ces questions nécessitent un point de vue expérimenté, au-delà des 3/5 années d’études pour les formations sérieuses, donc encore plus loin pour les formations courtes.</p><p>Enfin, les enseignements de type mentorat / tutorat ont leurs avantages mais aussi leurs inconvénients : compétence du mentor (plus que questionnable ici), manque de formation et/ou de pédagogie du mentor, ou encore possibilité de détourner le mentorat à des fins personnels (exemple : une élève se retrouve en danger car un mentor fait du chantage à des fins immondes). Les avantages de cette méthode d’enseignement <a href="https://journals.openedition.org/sas/3723?lang=en">n’ont également pas été prouvés, comme le constate Roxane Bricet et Héloïse Lucas dans leur état des lieux sur le mentorat</a>.</p><h4>3 — Vous décrocherez un poste dans les meilleures entreprises tech</h4><p>Toute personne initiée à la communication sait que la promesse de résultats est une technique efficace pour que les personnes passent à l’achat. Vous vous renseignez sur un régime ? Regardez les photos de ces personnes qui ont perdus 27 kg en 2 semaines. Vous souhaitez acheter une tondeuse à gazon ? Admirez ce magnifique jardin que vous aurez grâce à cet achat. Un sèche-cheveux ? Des cheveux dignes des plus grands coiffeurs et coiffeuses.</p><figure><img alt="Une photo d’une publicité pour un sèche-cheveux Dyson d’une femme se séchant les cheveux dans une élégance rare" src="https://cdn-images-1.medium.com/max/600/1*5iu6iOgxKmyLQabfFGZMVg.png" /><figcaption>Publicité pour un sèche-cheveux Dyson</figcaption></figure><p>De fait, la tech est un domaine qui attire : nous avons des <a href="https://fr.talent.com/salary?job=tech">salaires très élevés (3970€/mois en moyenne)</a> , des <a href="https://start.lesechos.fr/travailler-mieux/flexibilite-au-travail/le-100-teletravail-sans-frontieres-remede-a-la-penurie-de-cerveaux-dans-la-tech-1942062">conditions de travail formidables avec le travail distanciel ou même en devenant digital nomade</a>, et, bien évidemment, nous vivons de notre passion. Et oublions <a href="https://www.zdnet.fr/actualites/les-employes-de-la-tech-risquent-un-gigantesque-burnout-si-les-employeurs-n-agissent-pas-maintenant-39938383.htm">les burnouts, épuisements mentaux et autres dépressions</a> : comment travailler derrière son bureau toute la journée pourrait être un métier difficile ?</p><p>Du point de vue des entreprises, oui, il y a des postes à pourvoir. Cependant, le secteur de la tech recherche essentiellement des profils seniors aujourd’hui. On peut effectivement taxer les entreprises de ne pas vouloir former des juniors, mais le problème peut s’expliquer en 2 points :</p><ul><li>beaucoup de formations courtes existent aujourd’hui, donc <strong>beaucoup plus de profils juniors sont disponibles sur le marché</strong>. Il y a 4 ans, lorsque j’ai fait un recrutement d’un profil junior, j’ai eu la surprise de recevoir environ 50 CVs en 48 heures, alors même que nous étions une toute petite entreprise et peu connue. J’ai eu l’occasion de confirmer ce point avec des confrères et consoeurs qui ont également reçu beaucoup de CVs à la création d’un poste de junior. Par conjecture, le secteur de la tech semble aujourd’hui très bouché pour les profils “ultra-juniors” (c’est-à-dire avec moins de 3 ans de formation).</li><li>les profils “ultra-juniors” sont formés en 6 mois, donc <strong>uniquement sur un langage et une techno spécifique</strong>, mais sans avoir de socle théorique nécessaire pour évoluer correctement dans le métier. On pourrait dire que ces personnes sont des “<strong>profils jetables</strong>”, étant donné qu’à la moindre évolution, iels ne pourront se maintenir à niveau sans difficulté.</li></ul><p>De plus, dans le cas où les entreprises recherchent des profils juniors, les élèves de formations courtes se retrouvent alors en concurrence avec les élèves de formations classiques (Bac +3 à +5) issues des IUTs, universités ou écoles d’ingés publiques et privées. Comment est-il possible de rivaliser avec des personnes qui ont eu 6 à 20 fois plus de temps pour se former ? Réponse : <strong>on ne peut pas</strong>.</p><h4>4 — C’est un bootcamp / une formation intensive</h4><p>Pour justifier des périodes 6 à 20 fois plus courtes que les formations classiques, il faut forcément trouver une méthode miracle. Celle-ci existe pourtant depuis des années dans les classes préparatoires françaises : le bourrage de crâne <strong>le rythme intensif de travail</strong>.</p><figure><img alt="Une photo de développeurs et développeuses en train de travailler ensemble sur des ordinateurs" src="https://cdn-images-1.medium.com/max/1024/1*1Du6wk80A38MjLVdwMolCQ.png" /><figcaption>Un bootcamp sûrement intensif — Image de The Muse</figcaption></figure><p>La conclusion des deux études est exactement la même : <strong>aucun résultat ne permet d’affirmer que les formations intensives sont moins efficaces que les formations classiques</strong>. De fait, une formation intensive est capable d’obtenir les mêmes résultats qu’une formation classique deux fois plus longue (cf. la 2ème étude).</p><p>Une question reste cependant sur la longueur condensable par une formation intensive, et, malgré tous les efforts du monde, je doute sur le fait qu’on peut condenser 2 ans de formation sur 6 mois. D’expérience, les élèves ont besoin de temps pour emmagasiner l’information sur le long terme et éviter les effets néfastes du <a href="https://fr.wikipedia.org/wiki/Bachotage">bachotage</a> (provoquant une rétention temporaire et réduite des informations).</p><h4>5 — La formation ne vous coûtera rien</h4><p>Effectivement, c’est une réalité : faire une formation courte ne coûte généralement pas d’argent personnel. Si les formations courtes se sont développées aussi vite que les punaises de lit à Paris, la raison est justement que les personnes qui créent ces formations connaissent toutes les aides et les méthodes d’obtention de celles-ci.</p><p>C’est assez simple : on construit des formations que l’on fait certifié par Qualiopi (surtout long administrativement), puis on devient éligible <a href="https://www.francenum.gouv.fr/aides-financieres/guides-et-conseils-financiers/quelles-sont-les-aides-financieres-pour-se-former">au CPF, aux contrats d’apprentissage et de professionnalisation (en fonction du plus rentable pour l’année en cours), à la Préparation Opérationnelle à l’Emploi, à l’Action de Formation Préalable au Recrutement et à l’Aide Individuelle à la formation</a>. En parallèle, on peut deviner que ces entreprises sont subventionnées par les aides aux organismes de formations ( <a href="https://www.iledefrance.fr/aides-et-appels-a-projets/soutien-linvestissement-des-organismes-de-formation-dispensant-des-formations-par-apprentissage">par exemple</a>), mais aucune information n’est disponible pour valider cette hypothèse.</p><h3>Conséquences et problèmes de la formation courte</h3><h4>Exploitation des juniors</h4><p>Nous avons déjà abordé l’une des conséquences principales de ces formations qui est la <strong>création d’un bouchon important sur le marché du développement</strong> avec une quantité trop importante de profils juniors.</p><figure><img alt="Extrait du clip de Another brick in the Wall Part. 2 de Pink Floyd où des écoliers et des écolières marchent à la chaîne sur une plateforme en fer, comme si c’était des robots" src="https://cdn-images-1.medium.com/max/943/1*MFEMwjr4koiBRluAIMS9VQ.jpeg" /><figcaption>Another brick in the Wall Part. 2 de Pink Floyd</figcaption></figure><p>Beaucoup d’autres ESNs effectuent ce genre de pratiques de façon plus ou moins variée : un junior est placé comme seul développeur sur un projet avec, comme support, un tech lead disponible 10 minutes par jour, et bien évidemment vendu au tarif d’un senior. Puis, si jamais il lâche, il sera remplacé par un autre. On peut même faire des groupes de 2 à 3 juniors si jamais le client est un peu plus important !</p><p>En soit, il s’agit d’une variante bien connue dans les entreprises de l’utilisation des alternant*es et stagiaires comme travailleur*euses, sauf que cette nouvelle version est <strong>totalement légale</strong>.</p><h4>Non-sélection des profils à l’entrée</h4><p>Vu que l’on parle de formation courte et intensive, on pourrait penser que les écoles pratiquent une sélection pour homogénéiser le niveau de base des élèves. En discutant avec un ancien formateur, j’ai eu l’occasion d’apprendre que, lors de l’ouverture d’une école sur Bordeaux, il y avait effectivement des sélections, <strong>ce qui a disparu dés la seconde promotion</strong>. L’explication est bien évidemment que plus de personnes implique plus d’argent, mais ce n’est pas réellement là le problème.</p><p>Quand vous formez des personnes, plus un groupe est hétérogène, plus la formation sera compliquée. Par exemple, quand vous entrez en première année d’informatique en Université, il y a aujourd’hui un pourcentage important de personnes qui ont fait la spécialité NSI (Numérique et Sciences Informatiques) dans leur Bac. Cela signifie que, dans votre enseignement, vous pouvez partir du postulat que les étudiant*es connaissent le principe d’une boucle ou d’une condition et passer rapidement dessus. Dans le cas où aucune connaissance de départ ou d’affinité particulière n’est partagée, vous devez donc vous adaptez en permanence vos cours en partant du niveau le plus bas du groupe (donc rien) et réussir à vous adapter à des personnes extrêmement différentes par leurs compétences, leurs motivations et leurs présences.</p><p>Si ce n’est normalement pas un problème dans les formations traditionnelles, cela en devient un <strong>dés que la formation est censée être intensive</strong>, et donc que la formation doit être rapide et efficace, ce qui est incompatible, de mon point de vue, avec la présence d’absolument n’importe quel personne qui aurait juste payé la formation.</p><figure><img alt="Image d’un tableau représentant un chaos dense, avec beaucoup de couleurs pas forcément harmonisée, des formes étranges, des papillons, bref, c’est un beau merdier." src="https://cdn-images-1.medium.com/max/575/1*e4tKTTyEGCl7ZJBZhy2jEg.png" /><figcaption>Chaos Theory de Shahid Zuberi (2023)</figcaption></figure><h4>Sous-qualification des formations</h4><p>Précédemment, nous avons vu que la formation intensive peut être aussi efficace qu’une formation plus longue. Cependant, nous restons sur des formations offrant des compétences de technicien*es / codeur*euses, malgré le fait que ces formations promettent des compétences de développeur*euse full-stack. Soyons francs : même un Bac+5 n’est pas un bon full-stack.</p><p>Il faut aussi considérer la période que nous vivons : l’essor des intelligences artificielles provoquent l’obligation d’une réflexion sur notre approche au travail (ce qui curieusement, ressemble à <a href="https://aamulumi.info/Sociologie/Vers-une-nouvelle-conception-du-travail">mon essai de 2019 sur la conception du travail</a>). Les métiers nécessitant “moins de capacités intellectuelles et créatives” sont menacés comme l’ont été les métiers nécessitant “moins de capacités physiques” lors du début de l’essor de la robotique. Et parmi ces métiers, celui de codeur est ouvertement menacé. Pour illustrer ce propos, il suffit de voir <a href="https://www.reddit.com/r/ChatGPTCoding/comments/11zu7l7/i_built_an_entire_react_app_with_chatgpt4_without/">ce post Reddit</a> d’une personne qui a <strong>construit une application Web sans écrire la moindre ligne de code</strong> grâce à GPT4. On peut donc poser une question simple : <strong>à quoi va servir le métier de codeur ?</strong></p><p>Sauf si vous allez être recruté*e pour faire de la TMA (Tierce Maintenance Applicative) sur des applications codées par des IAs ou <a href="https://www.lemonde.fr/economie/article/2023/05/23/informatique-le-secteur-bancaire-manque-de-specialistes-du-cobol_6174417_3234.html">sur des applications bancaires que personne ne veut maintenir</a> (le temps que GPT apprenne le COBOL), <strong>vous n’aurez plus de travail</strong>. Le travail dans l’informatique sera de plus haut niveau : architecturer les applications et les infrastructures, vérifier la sécurité d’une application ou faire fonctionner des ordinateurs quantiques, bref, des choses qu’aucune formation courte n’enseigne aujourd’hui.</p><h3>Comment se former au développement</h3><p>Beaucoup de personnes posent régulièrement cette question, donc je vais essayer de détailler un peu les possibilités.</p><figure><img alt="Un meme d’une personne en costume avec une baguette sous le bras et un béret avec des chiffres de la bourse en fond et une flèche qui monte, avec comme légende “stonque” (en référence à “stonks” en anglais)" src="https://cdn-images-1.medium.com/max/1024/1*sAWpfv3PuI-5nP-0nAw6lw.png" /></figure><h4>Vous êtes bachelier et vous voulez et pouvez faire des études plus longues</h4><p><strong>Visez au minimum un BUT (Bac +3)</strong>. Cette formation assurée par les IUTs est accessible et professionnalisante, et vous disposerez d’un premier bagage solide de savoir. Il est à noter que le BUT est <strong>uniquement à visée professionnelle et ne permet pas de faire un master après</strong> (a contrario de l’ancienne Licence Pro qui pouvait amener parfois à un Master sur dossier).</p><p>Si vous souhaitez rentrer dans des domaines plus précis (cryptographie, traitement de l’image et du son, informatique fondamentale, IA, génie logiciel, etc.), <strong>faites une Licence puis un Master en Université ou en école d’ingénieur publique</strong>. Ces formations sont accessibles et vous permettront d’avoir beaucoup de connaissances avec des enseignants-chercheurs (pas forcément pédagogues par contre) pour ensuite évoluer en toute sérénité. C’est aussi le moyen d’entrée pour pouvoir faire un doctorat. Il est aussi possible de bifurquer vers un Master MIAGE (Informatique et Gestion) pour avoir une double compétence et un master en alternance (chose qui n’existe que très peu).</p><p>Si vous estimez que la théorie ne vous intéresse absolument pas, vous pouvez <strong>voir les écoles d’ingénieur privées</strong> (Epitech, SupInfo, Cesi, Ynov, etc.) qui coûtent au minimum 6 000 à 7000€ l’année. Il me semble que certaines écoles proposent des formations en alternance sur toutes les années pour le financement, mais, pour y avoir été intervenant, la qualité de l’enseignement n’est pas forcément à la hauteur de l’argent (une fabuleuse histoire de support de cours fourni par une école qui était complètement désuet).</p><p>Enfin, vous pouvez toujours vous <strong>laisser tenter par une formation courte</strong>, mais conservez un oeil critique envers ces formations. Avec certain*es de mes alternant*es, on a déjà eu des soucis de personnel qui change constamment, de cours qui sautent sans prévenir, bref, c’est loin d’être votre meilleure option.</p><h4>Vous êtes en réorientation professionnelle</h4><p>Forcément, cela signifie que vous êtes déjà dans la vie active, donc que <strong>vous avez besoin de pognon pour vivre</strong>.</p><p><strong>Vérifiez d’abord toutes les aides possibles (AIF, POE, AFPR, …)</strong>. N’hésitez pas à consulter un*e conseiller*e Pôle Emploi France Travail, iels ont potentiellement des pistes en plus dont j’ignore l’existence.</p><p>Ensuite, en fonction de vos revenus, votre compte en banque et des aides possibles :</p><ul><li>si vous avez assez d’argent, un <strong>BUT dans un IUT est très intéressant</strong>.</li><li>sinon, <strong>regardez les formations avec de l’alternance</strong> (donc l’entreprise paiera votre formation). Généralement, ça va être des formations courtes privées, mais vérifier malgré tout dans les IUTs, universités et écoles d’ingénieur s’il y a des choses qui peuvent se faire en alternance. Et, au cas-où, vous pouvez consulter <a href="https://payfit.com/fr/fiches-pratiques/remuneration-apprenti-syntec/">la grille de rémunération minimale des apprentis ici</a>.</li></ul><p>Une troisième solution existe : <strong>être autodidacte</strong>. L’informatique est un domaine pour lequel une énorme quantité d’informations est disponible sur Internet. C’est un chemin plus ardu, mais vous êtes complètement autonome, vous pouvez progressez à votre rythme, avec vos projets, et continuer en attendant à vivre avec votre travail rémunéré. Même si vous n’avez pas de diplôme, si vous êtes devenu quelqu’un de compétent, <strong>vous pouvez réussir à obtenir des entretiens via les différents événements liés à la tech</strong> (je pense notamment à toutes les sauteries les rencontres de la French Tech par exemple). Par contre, c’est très vivement conseillé de savoir ou d’apprendre à parler anglais.</p><p>—</p><p><strong>26/02/24 — Mise à jour concernant l’autodidaxie</strong> : un commentaire sur LinkedIn de la part de Radu Mihnea Ciobanu mentionne l’open-source en tant qu’approche autodidacte, et c’est effectivement une approche extrêmement intéressant.</p><p>Pour faire simple, le principe de l’open-source est de créer des projets et publier le code sur des serveurs de versionnage ( <em>git</em> pour le plus utilisé aujourd’hui). D’autres personnes peuvent alors participer à ce projet en modifiant le code pour répondre à des besoins ou corriger des bugs. Cela peut aussi être pour rajouter de la documentation, des tests, de la traduction, etc.</p><p>Cela nécessite de connaître un minimum le domaine, mais participer à l’open-source permet de découvrir des techniques de développement, des conventions de code, des domaines de travail, bref, plein de choses qui alimenteront votre culture du développement, tout en aidant des projets à se développer.</p><p>Si vous êtes intéressé*e, je vous invite à lire <a href="https://docs.github.com/fr/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github">cette page de documentation de Github</a> qui va vous permettre de débuter dans le monde fabuleux de l’open-source.</p><p>—</p><p>Un grand merci de votre lecture. J’espère que je vous aurais au moins permis d’y voir un peu plus clair dans cette jungle de l’enseignement en informatique.</p><p>Je tiens à remercier mes relecteur•trices Jean B. et Matthieu G., qui m’ont permis de mieux formater mes idées et vérifier le niveau de bêtises que je raconte dans cet article.</p><p>Vous pouvez me retrouver sur très peu de réseaux sociaux pour plus de <em>takes</em> désastreuses et de mésaventures, disponibles juste en-dessous. Et, bien évidemment, le GIF de fin :</p><figure><img alt="Une image animée de Michael Scott (de la série The Office) qui s’incline en disant merci" src="https://cdn-images-1.medium.com/max/300/1*znY-MTNDcZLEcl1ElAaSaQ.gif" /><figcaption>Michael Scott vous remercie de votre lecture</figcaption></figure><p><em>Ca vient de mon fabuleux blog : </em><a href="https://aamulumi.info/Dev/Non,-on-ne-forme-pas-une-d%C3%A9veloppeuse-ou-un-d%C3%A9veloppeur-en-6-mois"><em>https://aamulumi.info</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d44250520405" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Useless Type Calculator in Typescript]]></title>
            <link>https://medium.com/ekino-france/the-useless-type-calculator-in-typescript-edb8d525fe31?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/edb8d525fe31</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[out-of-the-box]]></category>
            <category><![CDATA[calculator]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 00:00:28 GMT</pubDate>
            <atom:updated>2024-11-15T16:53:16.103Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="Picture of a cosmic brain" src="https://cdn-images-1.medium.com/max/1024/1*iw6I6WAs9Tac4qDXXPtBTA.png" /></figure><h3>The Useless Type Calculator in TypeScript</h3><p><em>It’s time for one of the most useless things I’ve ever made — something beyond reason, where logic stops being rational and void becomes reality. It’s time to create a calculator using only types from TypeScript.</em></p><p><em>Originally posted on my blog the October, 5th 2021 : </em><a href="https://aamulumi.info/Dev/The-Useless-Type-Calculator-in-Typescript"><em>https://aamulumi.info/Dev/The-Useless-Type-Calculator-in-Typescript</em></a></p><p>—</p><p>A few days ago, I remembered a discussion with a friend about <a href="https://en.wikipedia.org/wiki/Turing_completeness">Turing-complete systems</a>. We checked the Wikipedia article on the subject, and we discovered that <a href="https://en.wikipedia.org/wiki/Turing_completeness#Examples">many things (like games) are Turing-complete</a>. So yes, Minecraft is Turing-complete, Factorio too, Dwarf Fortress too, and it seems that Habbo Hotel and Magic: The Gathering (yes, the cards game) are also Turing-complete.</p><p>We also found somewhere that TyepScript’s type system is Turing-complete. With this knowledge, I decided to start developing something that would serve no practical purpose: a calculator using only TypeScript types.</p><figure><img alt="An animated image of Gordon Ramsay facepalming." src="https://cdn-images-1.medium.com/max/500/1*WGCByfRwiCxW6GMcom8GOw.gif" /><figcaption>You reading this.</figcaption></figure><p>Yes. This is one of the stupidest ideas I‘ve had in a while. But it’s a fun exercise to prove your skill in typing everything.</p><h3>The rules</h3><p>If you’d like to try creating the calculator, here are the rules of the “game” (if we can even call it a game):</p><ul><li>you have to start with only two types: BZero (for Boolean Zero) and BOne (for Boolean One).</li></ul><pre>type BZero = false;<br>type BOne = true;</pre><ul><li>you can only use types. No interfaces, no enums, only types.</li><li>you need to implement the four basic mathematical operations (using types): addition, subtraction, multiplication, and division. You can also add modulo.</li><li>this code should works:</li></ul><pre>// Equivalent of (6 + 6 * (1 + 2)) / (6 - 2) = 6<br>type StrangeOperation = Divide&lt;<br>  Add&lt;Multiply&lt;Six, Add&lt;One, Two&gt;&gt;, Six&gt;,<br>  Subtract&lt;Six, Two&gt;<br>&gt;;</pre><p>Due to the way I implement the calculator, I use another type Result to read the result:</p><pre>type OpResult = Result&lt;StrangeOperation&gt;;</pre><p>This type is completely optional in the rules. However you must have an exact number type at the end of the computation. For example, you should have:</p><pre>type OpResult = 6;</pre><p>And here you go! It’s time for you to code!</p><figure><img alt="An animated image of a girl clapping her hands and saying “Let’s go!”" src="https://cdn-images-1.medium.com/max/480/1*aRMb0vgzNcL_97EaJafjnA.gif" /></figure><p>…</p><p>…</p><p>…</p><p>Yeah, better to just read the solution, right?</p><figure><img alt="An animated image of a man pointing his finder on his head in a smart way." src="https://cdn-images-1.medium.com/max/480/1*iTnk_ASzXCFzdBvPmO2z5A.gif" /></figure><h3>The solution</h3><h4>Conception</h4><p>Firstly, I searched for ways to get a number type from a type in Typescript. You have your basic operation to transform BZero and BOne to Zero and One number if you‘re familiar with this.</p><p>I tried something based on array indexes, but there was no way to get a number. So I discovered that <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#fixed-length-tuples">Typescript tuples have a </a><a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#fixed-length-tuples">length property</a>. And it works with <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#example-1">variable-length tuples since 3.0</a>. With this information, I started writing a calculator based on tuples.</p><pre>type TypeNumber = Array&lt;any&gt;;</pre><p>The first types we need are the Zero and the One based on tuples. In this way, I write a simple conditional type that returns a tuple with the number of elements equivalent to the number it describes. For example:</p><pre>type ToTypeNumber&lt;A&gt; = A extends true ? [true] : [];<br> <br>type Zero = ToTypeNumber&lt;BZero&gt;;<br>type One = ToTypeNumber&lt;BOne&gt;;<br> <br>// Result<br>type Zero = [];<br>type One = [true];</pre><p>In this way, we need a type to determine the length in order to obtain the desired number type.</p><pre>type Result&lt;A extends TypeNumber&gt; = A[&quot;length&quot;];<br> <br>// Example<br>type C = Result&lt;One&gt;;<br> <br>// Result<br>type C = 1;</pre><h4>Operation 1 : Add</h4><p>With this conception, the Add type is the most straightforward operation to implement, <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#variadic-tuple-types">thanks to TypeScript 4.0</a>. We simply need to concatenate the two tuples to create Add type.</p><pre>type Add&lt;A extends TypeNumber, B extends TypeNumber&gt; = [...A, ...B];<br> <br>// Example<br>type Two = Add&lt;One, One&gt;;<br>type TwoResult = Result&lt;Two&gt;;<br>type Four = Add&lt;Two, Two&gt;;<br>type FourResult = Result&lt;Four&gt;;<br> <br>// Result<br>type Two = [true, true];<br>type TwoResult = 2;<br>type Four = [true, true, true, true];<br>type FourResult = 4;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*bmCgMnlrg1NeCOYqylOy2g.gif" /></figure><h4>Operation 2 : Subtract</h4><p><em>The hard way</em></p><p>Now, the fun begins.</p><p>We need to think about the computation behind subtraction. So let’s go back to elementary school.</p><p>I have 6 balloons. I give 4 balloons to Manu. I now have 2 balloons left.</p><p>In terms of tuples, we can represent the problem with this:</p><pre>type MyBalloons = [true, true, true, true, true, true];<br>type NewManuBalloons = [true, true, true, true];<br>type NewMyBalloons = [true, true];</pre><p>To implement subtraction, I take each element of MyBalloons one by one and check if it exists in NewManuBalloons. I reach the point where there are no more elements in NewManuBallooons, I start to increment a variable which will be the result.</p><p>But there’s a problem: it looks like a loop. How can we implement a loop in Typescript?</p><p>The answer is to use a recursive type. With a condition, we can achieve this using a <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#recursive-conditional-types">recursive conditional type</a>. Here’s the code:</p><pre>type Subtract&lt;<br>  A extends TypeNumber,<br>  B extends TypeNumber,<br>  Res extends TypeNumber = []<br>&gt; = A extends [boolean, ...infer H]<br>  ? B extends [boolean, ...infer J]<br>    ? Subtract&lt;H, J, Res&gt;<br>    : Subtract&lt;H, B, Add&lt;Res, One&gt;&gt;<br>  : Res;<br></pre><figure><img alt="An animated image of a man opening widely his eyes." src="https://cdn-images-1.medium.com/max/480/1*jBnCJLPKtEfDXKbZdm4WIQ.gif" /><figcaption>Probably you.</figcaption></figure><p>Oh yeah, there’s another tip: I use <a href="https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#inferring-within-conditional-types">type inference</a> to remove elements from a tuple. For example, if I have type A = [true, true, true], I will get type H = [true, true]. This is because I check if A &#39;s first element is a boolean, and I send the rest of the tuple in another type variable.</p><p>I use type inference in a second condition to check if the current element exists in B. When there&#39;s an element in both A and B, I recall the Subtract type with the remaining elements of A (H) and the remaining elements of B (J). If there are no more elements in B, we continue to call Subtract, but we increase Res at each call. When A is empty, we return the Res type.</p><p>And now, we have subtraction implemented using only types. Note that this subtraction only works with positive integers. This limitation arises from the nature of tuples, because you cannot have a tuple with a negative length.</p><pre>// Example<br>type TwoFromSubtract = Subtract&lt;Four, Two&gt;;<br>type TwoFromSubtractResult = Result&lt;TwoFromSubtract&gt;;<br> <br>// Result<br>type TwoFromSubtract = [true, true];<br>type TwoFromSubtractResult = 2;</pre><p><em>The smart way</em></p><p>The hard way is a pure example of overengineering. There’s actually a much simpler way to perform subtraction: subtract B from A and keep the result.</p><p>In my defense, I realized I could use type inference between 2 dynamic types when working on Divide. But you can shame me, and it&#39;s okay.</p><p>Here’s the code:</p><pre>type BetterSubtract&lt;A extends TypeNumber, B extends TypeNumber&gt; = A extends [<br>  ...B,<br>  ...infer Res<br>]<br>  ? Res<br>  : Zero;</pre><figure><img alt="An animated image of a man pointing his head with his finger (in a smart way)." src="https://cdn-images-1.medium.com/max/338/1*OWkJOqjzKRHkWj2cKTQ-bw.gif" /><figcaption>Smart.</figcaption></figure><h4>Operation 3 : Multiply</h4><p>We have already covered all the techniques we need for multiplication. To multiply, we simply need to add A to itself B times. This is now a piece of cake since we tackled the hard way of subtraction.</p><p>To perform multiplication, we create a loop (using recursive types). In this loop, remove One from B, add A to the result, and return Res when B is Zero. In this way, we will add A B times, effectively performing A x B.</p><pre>type Multiply&lt;A extends TypeNumber, B extends TypeNumber&gt; = B extends [<br>  boolean,<br>  ...infer S<br>]<br>  ? Add&lt;Multiply&lt;A, S&gt;, A&gt;<br>  : [];<br> <br>// Example<br>type MultTest = Multiply&lt;Four, Six&gt;;<br>type MultTestResult = Result&lt;MultTest&gt;;<br> <br>// Result<br>type MultTest = [<br>  true,<br>  ... 22 more,<br>  true<br>];<br>type MultTestResult = 24;</pre><figure><img alt="An animated image of a woman inclining her head like “oh pretty good”" src="https://cdn-images-1.medium.com/max/500/1*CfCVRJuQ9kfSsMWSmgwWgg.gif" /></figure><h4>Operation 4 : Divide</h4><p>We’ve been working with integers from the start, so for this part, we can only perform a <a href="https://en.wikipedia.org/wiki/Euclidean_division">Euclidian division</a>.</p><p>In subtraction, we check if A can contain B and determine the remainder. We will do the same thing here, except we need to find out how many times A contains B. So, we use the same primary condition as in subtraction, but we add a recursive type that increments the result with each loop iteration. When A can no longer contain B, we return the number of loops completed up to that point.</p><pre>type Divide&lt;<br>  A extends TypeNumber,<br>  B extends TypeNumber,<br>  Res extends TypeNumber = Zero<br>&gt; = A extends [...B, ...infer T] ? Divide&lt;T, B, Add&lt;Res, One&gt;&gt; : Res;<br> <br>// Example<br>type DivideTest = Divide&lt;MultTest, Six&gt;;<br>type DivideTestResult = Result&lt;DivideTest&gt;;<br>type DivideTest2 = Divide&lt;Six, Four&gt;;<br>type DivideTest2Result = Result&lt;DivideTest2&gt;;<br> <br>// Result<br>type DivideTest = [true, true, true, true];<br>type DivideTestResult = 4;<br>type DivideTest2 = [true];<br>type DivideTest2Result = 1;</pre><figure><img alt="An animated image of two mans saying “That was easy”" src="https://cdn-images-1.medium.com/max/400/1*tGa9hX3PoGxZgI7t-q1WqA.gif" /></figure><h4>Operation Bonus : Modulo</h4><p>Modulo is very similar to division. We keep checking how many times A contains B, and when we reach the end, we return the remaining value instead of the number of iterations. And tadaaaaaa, we get the modulo operation.</p><pre>type Modulo&lt;T extends TypeNumber, U extends TypeNumber&gt; = T extends [<br>  ...U,<br>  ...infer S<br>]<br>  ? Modulo&lt;S, U&gt;<br>  : T;<br> <br>// Example<br>type ModuloTest = Modulo&lt;MultTest, Six&gt;;<br>type ModuloTestResult = Result&lt;ModuloTest&gt;;<br>type ModuloTest2 = Modulo&lt;Six, Four&gt;;<br>type ModuloTest2Result = Result&lt;ModuloTest2&gt;;<br> <br>// Result<br>type ModuloTest = [];<br>type ModuloTestResult = 0;<br>type ModuloTest2 = [true, true];<br>type ModuloTest2Result = 2;</pre><p>So here we have a fully functional calculator using only TypeScript types. I considered implementing a decimal calculator based on the <a href="https://en.wikipedia.org/wiki/Binary_integer_decimal">binary representation of decimals</a>, but that would have been madness.</p><p>I hope you enjoyed reading this piece of programming as much as I enjoyed writing it. And last but not least, <a href="https://github.com/microsoft/TypeScript/issues/14833">here’s the topic of the initial discussion I had with my friend about Turing-Complete TypeScript</a>.</p><p>Thanks for reading! On behalf of all of us here, I want to wish you happy programming and God Bless, my friend! :)</p><figure><img alt="An animated image of Jean Claude Van Damme doing the big gap (I hope this is the word) and saying “Hey”" src="https://cdn-images-1.medium.com/max/480/1*gq2SApJEkHUTc5cRZio1FQ.gif" /><figcaption>xoxo ❤</figcaption></figure><p><em>Many thanks to Aude for her proofreading and corrections.</em></p><p><em>Originally published at </em><a href="https://aamulumi.info/Dev/The-Useless-Type-Calculator-in-Typescript"><em>https://aamulumi.info</em></a><em> on October 5, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edb8d525fe31" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ekino-france/the-useless-type-calculator-in-typescript-edb8d525fe31">The Useless Type Calculator in Typescript</a> was originally published in <a href="https://medium.com/ekino-france">ekino-france</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vers une nouvelle conception du travail ?]]></title>
            <link>https://medium.com/@AamuLumi/vers-une-nouvelle-conception-du-travail-9d8573169e2c?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d8573169e2c</guid>
            <category><![CDATA[work]]></category>
            <category><![CDATA[sociology]]></category>
            <category><![CDATA[france]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Wed, 02 Oct 2019 18:01:49 GMT</pubDate>
            <atom:updated>2019-10-25T18:33:45.256Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*ILuaxxn9_5QQtzxcf2IdDg.jpeg" /></figure><h3>Vers une nouvelle conception du travail ?</h3><p><em>Note : n’étant ni économiste ni sociologue, je ne vise qu’à apporter quelques pistes de réflexion qui, j’espère, seront au mieux source de lectures approfondies, au pire source de critiques hardies.</em></p><blockquote>Ce que nous appelons “travail” est une invention de la modernité. […] S’il nous arrive de parler du “travail ménager”, du “travail artistique” ou du “travail d’autoproduction”, c’est en un sens fondamentalement différent de ceux-ci qu’a le travail placé par la société au fondement de son existence, à la fois moyen cardinal et but suprême.</blockquote><p>C’est en ces mots qu’André Gorz commence la première partie de son essai relatif aux Métamorphoses du travail. Le travail dont nous parlons, ce travail qui nous habille d’un statut social et nous permet de recevoir de l’argent, est la source essentielle de la vie dans la société française. Il correspond à cette activité où nous faisons profiter nos compétences physiques et/ou intellectuelles contre de l’argent.</p><p>En général, un·e travailleur·euse est rémunéré·e en fonction de son temps de travail, et potentiellement en fonction de sa productivité. Iel vit professionnellement en suivant un cycle de travail défini sur une à quatre semaines <a href="https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=JORFARTI000002241085&amp;cidTexte=LEGITEXT000006072050&amp;dateTexte=">(d’après la législation française)</a>. Ce cycle est réitéré et peaufiné durant l’intégralité de sa carrière, sauf cas de vacances, de maladies et/ou d’événements exceptionnels qui vont réduire le nombre de jours travaillés.</p><p>Dans le modèle actuel, un·e travailleur·euse peut travailler plus que le nombre d’heures de son cycle, lui faisant bénéficier d’un meilleur salaire ou d’un temps de congé plus élevé. Mais, dans tous les cas, iel reste coincé dans son cycle jusqu’à l’arrivée à la retraite (qui s’éloigne de plus en plus aujourd’hui, faute de la médecine) ou, plus logiquement, jusqu’à l’arrivée d’un raz-le-bol du quotidien, par la manifestation d’une démission, de pathologies psychologiques ou encore de <em>burn-outs</em>.</p><p>Le problème n’est pas la faute du travail : il est un devoir pour prétendre à être une personne de la société. Je donne mes compétences à la <em>sphère publique</em>, donc j’ai le droit d’exister dans cette <em>sphère publique</em>. Cependant, même s’il peut être un vecteur d’épanouissement pour certaines personnes, il n’en sera jamais le cas pour toute la population, <a href="https://twitter.com/STPo/status/1159769491586371584?s=20">là où certains politiques cherchent à nous faire croire l’inverse</a>.</p><p>L’épanouissement de chacun·e passe souvent par d’autres activités regroupées sous l’étiquette de <em>loisirs</em>. On pourrait définir ces activités comme ayant pour objectif de consommer notre temps libre sans but économique, par opposition au travail qui génère de l’argent avec du temps libre. Les loisirs sont très souvent une part importante du développement de soi, car ils permettent de créer des relations sociales, de développer de nouvelles compétences, d’acquérir d’autres connaissances, etc.</p><p>Là où le bât blesse, c’est que le partage de notre vie entre travail et loisir se fait en suivant des cycles adaptés pour le travail et non pour le loisir. En tant qu’individu, si je souhaite prendre du temps pour découvrir une nouvelle langue ou apprendre un nouvel instrument, je ne peux qu’effectuer des activités qui me le permettent entre mes horaires de travail. Je n’ai cependant pas la possibilité de m’investir complètement dans un projet de vie, sauf si je prends une année sabbatique dont le succès reposera sur les économies que j’ai eu le temps de mettre de côté.</p><h3>Briser les cycles : le modèle de Gorz</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/0*RhhARBa2UqAKnsIW.jpg" /><figcaption><a href="https://fr.wikipedia.org/wiki/Andr%C3%A9_Gorz">André Gorz</a>, philosophe et journaliste français</figcaption></figure><p>Le modèle de Gorz (que je nomme ainsi car il s’agit d’un modèle de société dont il est l’auteur dans <a href="http://www.gallimard.fr/Catalogue/GALLIMARD/Folio/Folio-essais/Metamorphoses-du-travail">Metamorphoses du travail</a>) est une théorie reposant sur une autre conception des cycles de travail.</p><p>Sa théorie est qu’un·e travailleur·euse ne possède plus un cycle de travail réparti sur quelques semaines, mais sur au minimum une année. Iel possède un quota annuel d’heures à effectuer (<a href="https://www.juristique.org/social/duree-du-travail">entre 1600 et 1800 en France</a>), et organise son travail en fonction de ce nombre d’heures. Il est alors possible de créer des plannings de travail permettant d’alterner des semaines de travail intensives avec des semaines de congés.</p><p>Un·e travailleur·euse peut donc être beaucoup plus actif·ve au travail pendant une période, de façon à pouvoir profiter de ses loisirs pendant une autre période. La rémunération d’un·e travailleur·euse ne serait donc plus lié à ses heures qu’iel a effectué·e dans le mois, mais correspondrait à 1/12e de son salaire annuel, et ce quelque soit ses horaires. C’est déjà le cas des animateurs et des professeurs, <a href="https://www.regionsjob.com/conseils/comment-fonctionne-lannualisation-du-temps-de-travail.html#targetText=Deux%20formes%20de%20r%C3%A9mun%C3%A9ration%20sont,travail%20effectu%C3%A9%20dans%20le%20mois.&amp;targetText=-%20soit%20l&#39;employeur%20annualise%20%C3%A9galement,la%20m%C3%AAme%20paie%20chaque%20mois">dont leurs temps de travail sont annualisés</a>.</p><p>La théorie peut aussi être étendue à un quota de temps à vie, permettant à chacun·e de choisir des longues périodes de travail et de loisirs. On peut comparer cette idée à une sorte de revenu universel, sauf que le revenu serait garanti par le fait que la personne a un devoir de travail envers la société.</p><h3>Préparer l’avenir : la réduction du temps de travail</h3><p>Un des problèmes majeurs qui arrive au fur et à mesure de l’évolution est qu’il n’y aura plus assez de travail pour tout le monde. Les avancées dans la robotique et l’intelligence artificielle détruisent des postes de travail au fur et à mesure des années. <a href="https://www.automation.com/pdf_articles/oxford/RiseOfTheRobotsFinal240619_Digital.pdf">Une étude menée par l’entreprise Oxford Economics</a> prévoit la perte de 20 millions de postes dans le monde d’ici 2030, sans pouvoir prévoir la suite et les évolutions de l’intelligence artificielle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uC7gTcFz3k-l38kshfjMpQ.png" /><figcaption>Source : Rise of The Robots, Oxford Economics, p. 22</figcaption></figure><p>Ce n’est pas un cas d’urgence, mais il est nécessaire de prévoir une société du futur où chacun puisse travailler pour subvenir à ses besoins. La réponse actuelle souvent proposée par des partis de gauche concernent l’implémentation d’un revenu universel permettant de subvenir aux besoins de base de tout individu.</p><p>Une autre théorie possible est tout simplement de réduire le temps de travail en fonction du nombre de postes disponibles. Cela permettrait d’assurer à chacun·e un emploi permettant de vivre, en plus de pouvoir faire grandir les secteurs liés aux loisirs, comme les secteurs culturels et associatifs. Les gens possédant plus de temps pour vivre, il serait donc nécessaire de trouver des activités dans lesquelles dépenser ce temps.</p><p>De plus, la réduction du temps de travail n’implique pas directement de baisse de productivité. D’après <a href="https://www.bbc.com/worklife/article/20180828-just-how-short-could-we-make-the-workweek">cet article de la BBC</a>, plusieurs expériences ont été menées en Nouvelle-Zélande, en Suède et en Islande sur des travailleurs·euses dont le temps de travail a été réduit. Aucune réduction de productivité n’a été constatée, et il a même été remarqué une amélioration dans le service client d’une entreprise.</p><p>Cette théorie de réduction du travail s’adapte parfaitement avec le modèle de Gorz : il suffit simplement de réduire le quota annuel de travail par personne pour pouvoir moduler le nombre de postes disponibles. Les plannings des travailleurs·euses seraient alors plus <em>intermittents</em>, avec de plus longues périodes pour les loisirs.</p><h4>Comme une alternative à la rémunération monétaire</h4><p>Tout·e travailleur·euse récupère un salaire de son travail. Au fur et à mesure de sa carrière, iel reçoit de nouveaux avantages en nature et/ou monétaires.</p><p>Une application possible de la réduction du temps de travail serait que les entreprises puissent proposer, dans le cadre des avancées de carrière, la réduction du temps de travail du travailleur·euse.</p><h3>Critiques du modèle de Gorz</h3><p>Je trouve le modèle de Gorz fascinant, mais malheureusement, des interrogations restent en suspens :</p><ul><li><strong>Comment, en tant qu’entreprise, gérer l’intermittence de l’emploi des travailleurs·euses ?</strong></li></ul><p>Tous les modèles de gestion des entreprises sont basés sur le fait d’être au même endroit au même moment. Je pense qu’il y a déjà des éléments de réponses dans les méthodes de gestion du télé-travail, mais qu’il est nécessaire de pousser la réflexion non plus sur un problème géographique mais temporel.</p><ul><li><strong>Quelles sont les règles à fixer pour ne pas tomber dans un modèle de sur-exploitation des travailleurs·euses ?</strong></li></ul><p>La mise en place d’un quota <em>a minima </em>annuel nécessiterait une refonte du Code du travail, et de définir des règles pour éviter à un·e travailleur·euse de travailler 35 heures en 2 jours, de travailler 6 mois d’affilée avec 10 jours de repos etc.<br>Il s’agirait d’un travail extrêmement important à mener au cours de discussions entre syndicats et politiques, nécessitant probablement de multiples expérimentations afin de déterminer les limites des quotas de travail.</p><ul><li><strong>Est-ce qu’il est nécessaire de fixer des objectifs de quota minimaux pour assurer le devoir entre travailleur·euse et société ?</strong></li></ul><p>De mon point de vue, il serait nécessaire de régir les quotas de travail par des paliers à atteindre au bout d’une période fixe pour éviter qu’une dette trop forte se crée entre la société et le travailleur·euse. Cela <em>casserait </em>une partie de la flexibilité de ce modèle, mais permettrait d’avoir une sécurité de la société vis-à-vis des individus.</p><p>André Gorz nous a livré une vision sociétale qui a le mérite de penser aux travailleurs·euses, et à leur conception de la vie, partagée entre le devoir qu’implique la société (le travail) et le droit qu’elle leur offre (le loisir). L’<em>intermittence</em> que propose son modèle est une solution intéressante à des problèmes bien actuels.</p><p>Nous vivons une époque complexe : les politiques des gouvernements continuent de se focaliser sur l’emploi sans pour autant remettre en question sa place dans la société d’aujourd’hui. Au lieu de tester de nouvelles visions du monde, on se cantonne à des idées recyclées encore et encore. Il est nécessaire que nous allions de l’avant, et que nous proposions des modèles où puissent s’unir devoir du travail et droit du loisir.</p><p>Merci d’avoir lu cet article. <br>Je tenais, comme d’habitude, à remercier <a href="https://medium.com/u/2d3aae3d3bc3">Jean “HackJack” B.</a> qui, une fois encore, a sauvé cet article de la débauche orthographique.</p><p>Si jamais vous avez d’autres idées ou des lectures relatives au domaine, je serai curieux d’y jeter une partie de mon esprit. N’hésitez pas à en faire part !</p><p>Et comme d’habitude, le gif de la fin :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*zm3zDg1y9gCncrT6vnKpIw.gif" /><figcaption>Cute lizard thanks you for reading</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d8573169e2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Type the Untypable: 101 for Advanced Typings in Typescript]]></title>
            <link>https://medium.com/@AamuLumi/type-the-untypable-101-for-advanced-typings-in-typescript-f5ef986c5836?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5ef986c5836</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[typing]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Tue, 05 Mar 2019 18:04:23 GMT</pubDate>
            <atom:updated>2019-03-05T18:04:23.059Z</atom:updated>
            <content:encoded><![CDATA[<p><em>You use Typescript. You want to type the world. But you don’t want to read the whole Typescript doc. So here I come with this introduction to Typescript advanced typings with all type tricks you need.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fXdwi_DSvqo5fMSQHVrWQ.jpeg" /><figcaption>Yeah, I needed an image for this article, so I create this epic Typescript moment.</figcaption></figure><p><em>Note: this article is </em><strong><em>not</em></strong><em> an introduction for Typescript beginners. I’m considering you’re here with a bit of Typescript experience and you need to go further in Typescript world. If you never used Typescript, please take a look at lease to this tutorial and take the time to manipulate some Typescript code.</em></p><ul><li>Typescript in 5 minutes: <a href="https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html">https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html</a></li></ul><h3>Dynamically type a function</h3><p>You need to create a function which can have different returns types according to its parameters.</p><h4>Code</h4><blockquote><strong>const </strong>f = &lt;T&gt;(param1: T): T =&gt; { return param1; }</blockquote><h4>Usage</h4><blockquote><strong>const </strong>createStore = &lt;T&gt; (mainReducer: Reducer&lt;T&gt;): Store&lt;T&gt; =&gt; {…}</blockquote><blockquote><strong>const</strong> someStore = createStore(someTypedReducer);</blockquote><h4>Explanation</h4><p>This feature works like the <em>infer</em> syntax. We describe a <strong>generic type</strong> <em>T</em> which will be determined by the Typescript compiler each time you will use the function <em>f</em>. You can use this type to create a complex return type like in <strong>Usage</strong>.</p><p>This is a very powerful feature which allows the creation of complex auto-inferred types.</p><p>You can take a look in <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-4.html">Typescript 2.4</a> notes to see some other examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*_Oc8YAKWCOVuWHC_" /></figure><h3>Non Nullable type</h3><p>You need to forbid a variable to be null (or undefined).</p><h4>Code</h4><blockquote><strong>type</strong> NonNullable&lt;T&gt; = T extends null | undefined ? never : T;</blockquote><p><strong>Important note: NonNullable is available in global Typescript context</strong></p><h4><strong>Usage</strong></h4><blockquote>NonNullable&lt;string | null&gt;<strong> // string</strong></blockquote><h4>Explanation</h4><p>We need to use a <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html">Typescript 2.8</a> trick with a <em>distributive conditional type</em>.</p><p>If we take <em>T = string | undefined</em>, we reduce the code with this:</p><blockquote>NonNullable&lt;<strong>string</strong>|<strong>undefined</strong>&gt; = (<strong>string</strong> extends undefined | null ? never : T) | (<strong>undefined</strong> extends undefined | null ? never : T);</blockquote><p>So we check each type of T and if one of these types is <em>null</em> or <em>undefined</em>, it will be replaced by <em>never</em> which is the Typescript way to remove a type.</p><p>You can also define a <em>Diff</em> type to remove any type from T:</p><blockquote><strong>type</strong> Diff&lt;T, U&gt; = T extends U ? never : T;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*6VWOOeZhIl7n-WQY" /></figure><h3>Return Type of a function</h3><h4>Code</h4><blockquote><strong>type</strong> ReturnType&lt;T&gt; = T extends (…args: any[]) =&gt; infer R ? R : any;</blockquote><p><strong>Important note: ReturnType is available in global Typescript context</strong></p><h4>Usage</h4><blockquote>const f = () =&gt; 2;</blockquote><blockquote>ReturnType&lt;typeof f&gt;<strong> // number</strong></blockquote><h4>Explanation</h4><p>Another <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html">Typescript 2.8</a> use here.</p><p><em>infer</em> keyword tells to the compiler to get the type of a variable. We check if T is a function and telling to the compiler to associate a type R to the type of the return. So we just have to return the type R if T is a function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*UT-QR1QHqSfbISA4" /></figure><h3>Instance Type of a class</h3><h4>Code</h4><blockquote><strong>type</strong> InstanceType&lt;T extends new (…args: any[]) =&gt; any&gt; = T extends new (…args: any[]) =&gt; infer R ? R : any;</blockquote><p><strong>Important note: InstanceType is available in global Typescript context</strong></p><h4>Usage</h4><blockquote>class C { constructor() {} }</blockquote><blockquote>InstanceType&lt;typeof C&gt;<strong> // C</strong></blockquote><h4>Explanation</h4><p>Always <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html">Typescript 2.8</a> use here.</p><p>This is the same trick as <em>ReturnType</em>. We just need to check if the object <em>T</em> extends the function <em>new</em> (which is the needed function to create a class in JS). If <em>new</em> exists, we just get the return type of the <em>new</em> function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*2VndmBkQdwkD5im4" /></figure><h3>Set all properties of an object as optional</h3><h4>Code</h4><blockquote><strong>type</strong> Partial&lt;T&gt; = { [P in keyof T]?: T[P] };</blockquote><p><strong>Important note: Partial is available in global Typescript context</strong></p><h4>Usage</h4><blockquote>Partial&lt;{ value: number}&gt;<strong> // {value?: number}</strong></blockquote><h4>Explanation</h4><p>We dive in <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html">Typescript 2.1</a> here.</p><p>The syntax used here is the <strong>mapped typed</strong> syntax. We iterate on each key of T (stored each time in the type variable P) and for each key P, we create a new optional property with its value <em>T[P]</em>.</p><p>It seems complicated at the beginning, but it’s just nothing more than an iteration on all keys of the object <em>T</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/0*8_6_e0GF4P60_WDp" /></figure><h3>Get the type of a function parameter</h3><h4>Code</h4><blockquote><strong>type</strong> FirstParameter&lt;T&gt; = T extends (arg1: infer U, …args: Array&lt;any&gt;) =&gt; any ? U : undefined;</blockquote><blockquote><strong>type</strong> SecondParameter&lt;T&gt; = T extends (arg1: any, arg2: infer U, …args: Array&lt;any&gt;) =&gt; any ? U : undefined;</blockquote><h4>Usage</h4><blockquote>const f = (someArg: number, otherArg: string) =&gt; true;</blockquote><blockquote>FirstParameter&lt;typeof f&gt;<strong> // number</strong></blockquote><blockquote>SecondParameter&lt;typeof f&gt; <strong>// string</strong></blockquote><h4>Explanation</h4><p>Some custom use of <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html">Typescript 2.8</a>.</p><p><em>infer</em> syntax can be used for anything in typing. Here, we just tell to Typescript to create a type <em>U </em>from getting the type of a specific argument when <em>T </em>is a function with enough parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*Uc9vg_tPuTr0tUQi" /></figure><h3>Make a union with all values of an array/object</h3><p>You have an array, and you want to create a single union type with all values of an array or an object.</p><h4>Code</h4><blockquote><strong>type</strong> Union&lt;T&gt; = T[keyof T];</blockquote><h4>Usage</h4><blockquote>Union&lt;{value: number; otherValue: string}&gt; <strong>// number | string</strong></blockquote><h4>Explanation</h4><p>This one looks so ridiculous, but I figure out how to do that after a long time. It’s a custom use of the <strong>mapped types</strong> and <strong>lookup types</strong> of <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html">Typescript 2.1</a>.</p><p>We iterate on all keys of <em>T </em>on <em>T </em>itself. The <strong>lookup type</strong> (<em>keyof T</em>) gets all keys of T and create a union with all these keys. Accessing to <em>T</em> with a union of keys result by creating a union of values types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*oV3ZroFwwYbuL2WA" /></figure><p>With these simple tricks, you can now achieve a lot of works in Typescript world.</p><p>Don’t hesitate to comment if you have some questions about them. I’m available on this post comments or on <a href="https://twitter.com/aamulumi">my Twitter</a>.</p><p>Thanks for reading! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5ef986c5836" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I’ve never understood Redux, so I rewrote it.]]></title>
            <link>https://medium.com/@AamuLumi/redux-recode-86fcd953d7dd?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/86fcd953d7dd</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[dan-abramov]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Fri, 25 Jan 2019 17:49:31 GMT</pubDate>
            <atom:updated>2019-01-25T17:49:31.157Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<blockquote>I’ve been using Redux for a few years. It’s cool! I can manage the state of my application in a single Store with many reducers. But… wait, what is really a store? A reducer? An action? Let’s decrypt it!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XLOd81KHvFZDjKmU.jpg" /><figcaption>Each time I speak about Redux to someone.</figcaption></figure><p><em>Note: I wrote this article after having prepared a talk on the same subject. This article is more or less this talk’s retranscription (with all I want to say on the subject). If you’re interested, I can present the talk at some conference, so you can contact me at florian[at]kbdev[dot]io. Thanks a lot and have a good read!</em></p><p>Yeah, <strong>Redux</strong>! Honestly, I know there’s so much better ways to store state and all the things related to <strong>Redux</strong>. But I began to write <strong>React</strong> applications with it, and it was cool. Except I remember when I began to use it, it looks like learning to play Dwarf Fortress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/0*LRn1T9dYpxTpqEA4.jpg" /><figcaption>Replace Dwarf Fortress with Redux.</figcaption></figure><p>Each time I wrote an action, I was sure some strange bugs would happen. What did this <em>dispatch</em> function do? How could I connect it to my <strong>React</strong> app? And, clearly the best: <strong>how could I write this f***ing async function</strong>?</p><p>After writing a Typescript typed version of <strong>Redux</strong>, I saw the light: <strong>Redux is incredibly simple</strong>. I can now (and, after reading this article, you will be able to) write a Redux in 5 minutes. With <em>async</em> and <em>history handling</em>. Sounds cool huh?</p><p>Let’s do some magic!</p><h3><strong>What is Redux?</strong></h3><blockquote>A predictable state container for JavaScript apps.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/0*E0IUVvhX_AhRG6CZ" /><figcaption>Me. I’m a penguin.</figcaption></figure><p>Hmmm … let’s try something better.</p><p>Imagine <strong>Redux</strong> like a big object which contains all global variables of your application. You cannot mutate directly this object. You need to call some functions to change it.</p><p>A simple example is saying <strong>Redux</strong> is your bank. You have an amount on your account and you can only change this amount by doing some operations. An operation is an <strong>action </strong>(or mutation) and your account is the <strong>Store’s data.</strong></p><h3>Action — I do an operation</h3><p><strong>Each mutation is done by passing an action.</strong></p><p>An action is just a simple Javascript object with a unique key (to recognize which action we are doing) and the data of the action. This little object is given to a function <strong>dispatch()</strong> which sends it.</p><p>In the bank example, an <strong>action</strong> is something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/460640ae9184f55eff1b87a21ba8e8a2/href">https://medium.com/media/460640ae9184f55eff1b87a21ba8e8a2/href</a></iframe><p>To avoid doing some errors when typing the unique key of the action, we can create an <strong>Action Creator</strong>. This is just a function which creates the object. Something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae38b26f7002bfcc9e87629600414199/href">https://medium.com/media/ae38b26f7002bfcc9e87629600414199/href</a></iframe><h3>Reducer — I treat the operation</h3><p><strong>Each variable available in the application is a reducer.</strong></p><p>A <strong>Reducer</strong> is a function which returns the data for the current variable. It can be, for example, the state for the option “dark mode enabled” of your application. Or, in the bank example, the amount of money on all accounts.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cb8d9a5e0659ed6f9c0fc7d4b8e3391/href">https://medium.com/media/8cb8d9a5e0659ed6f9c0fc7d4b8e3391/href</a></iframe><p>Each time you give a new action to a <strong>reducer</strong>, it will check if this type of action must be handled. If that is the case, the <strong>reducer</strong> will create a new output value which corresponds to the <strong>reducer new state</strong>.</p><p>These functions must be pure and without any side effect. These two conditions just tell:</p><ul><li><strong>a function must return the same result with the same arguments</strong>. (ex: a function which computes an addition is pure.)</li><li><strong>a function must not do any modification to the environment</strong>. (ex: a function which mutates an argument has a side-effect.)</li></ul><p>These conditions allow <strong>Redux</strong> to be completely <strong>predictable</strong>. If your functions always do the same things with the same arguments, you will always get the same result by computing the same sequence of actions at any time. So you can easily test your code or create reproducible error logs.</p><p>The <em>default state</em> is here because <em>(spoiler alert)</em> <strong>the Store dispatches any action to all reducers</strong>. So we need to return the current state if the treated <strong>action</strong> hasn’t any incidence on the current <strong>reducer</strong>.</p><h3><strong>Store — Where all happens</strong></h3><p>Until here, we didn’t have code any <strong>Redux</strong> file. Because <strong>Redux</strong> is just the <strong>Store</strong>. This is where all the magic happens.</p><p>A <strong>Store</strong> is an object which propagates <strong>actions</strong> in <strong>reducers </strong>and keeps the current state in memory. In <strong>Redux</strong>, you can also listen to any change in the <strong>Store</strong> with the <strong>subscribe()</strong> method.</p><p>For the bank, the <strong>Store</strong> is the system which handles operations. The <strong>Store</strong> calls the system, and the system updates accounts.</p><p>To create the <strong>Store</strong>, we will use a simple ES6 Class with 2 attributes: <em>state</em> to keep the last state of the application and <em>reducers </em>to keep the reducers of the application.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bd7948b50e138ebee682e2f09b47a52a/href">https://medium.com/media/bd7948b50e138ebee682e2f09b47a52a/href</a></iframe><p>The next step is one of the biggest steps we will do: creating the <strong>dispatch</strong> function. This is the famous function which does all the job in <strong>Redux</strong>.</p><p>The algorithm is :</p><ul><li>1: Get all reducers</li><li>2: Create an object <strong>NextState</strong>.</li><li>3: For each reducer <strong>R </strong>with its name <strong>Name</strong>, call the reducer <strong>R</strong> and store its result in <strong>NextState[Name]</strong>.</li><li>4: Replace the previous <strong>this.state</strong> by <strong>NextState</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/0*4w9ByKPDkVtndRhw" /></figure><p>Yeah. That’s all. Nothing more.</p><p>Writing this code is not really complicated. I use the <strong>Array.reduce()</strong> method to call each <strong>reducer</strong> and compute a new <strong>state</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c5e31cf3fbe3650e8efff3f9bcfd5a4a/href">https://medium.com/media/c5e31cf3fbe3650e8efff3f9bcfd5a4a/href</a></iframe><p>I also added the <strong>getState()</strong> method which only returns the current <strong>state</strong> of the <strong>Store</strong>. To be <strong>Redux-compliant</strong>, we also need two things: <strong>subscribers </strong>and <strong>middlewares</strong>. We will not speak about <strong>middlewares</strong>: they are not extremely difficult to implement, but you don’t probably need them because you can add everything you need directly in your own version of <strong>Redux</strong>.</p><p>For friends of the <em>Gang of Four</em>, <strong>subscribers </strong>are a simple <strong>Observer pattern</strong>.</p><h4>// Long version for the <strong>Observer pattern</strong>. Go to the next comment if you don’t need it.</h4><p>An <strong>Observer</strong> is one of the simplest patterns described in the <a href="https://sophia.javeriana.edu.co/~cbustaca/docencia/DSBP-2018-01/recursos/Erich%20Gamma,%20Richard%20Helm,%20Ralph%20Johnson,%20John%20M.%20Vlissides-Design%20Patterns_%20Elements%20of%20Reusable%20Object-Oriented%20Software%20%20-Addison-Wesley%20Professional%20(1994).pdf">Design Patterns book</a> from Gamma, Helm, Johnson, and Vlissides (the <em>Gang of Four</em>), an OOP design patterns book. This pattern is also known as <strong>Listener </strong>or <strong>Subscriber</strong>.</p><p>You need at least two objects to use this pattern:</p><ul><li>the <strong>Subject</strong> is the object we are waiting for information. When this object will do an update, it will send its new state to all <strong>Observers</strong>.</li><li>an <strong>Observer</strong> is an object waiting for an update of the <strong>Subject</strong>. It will do something when the <strong>Subject</strong> tells him it has been updated.</li></ul><p>This pattern allows to add and to remove any new <strong>Observer</strong> to the <strong>Subject</strong> at any time, so we have a <em>low dependency </em>between our objects.</p><p>In our case, the <strong>Subject </strong>is the <strong>Store</strong>.</p><p>To implement this pattern in Javascript, we only need to add a <strong>subscribe()</strong> method which will return the <strong>unsubscribe()</strong> method when we add a <strong>Subscriber</strong> and keep the new subscriber in an array of <strong>subscribers</strong>. And we must add the call to the <strong>subscribers</strong> when a new <strong>state</strong> is created.</p><h4>// End of long version for the Observer pattern.</h4><p>In term of code for <strong>subscribers</strong> implementation, we got this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e6598d57d5907d2d5849c9c8d156d665/href">https://medium.com/media/e6598d57d5907d2d5849c9c8d156d665/href</a></iframe><p>Not a lot of code. That’s cool.</p><p>And… you have your version of <strong>Redux</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/247/0*T4ap0E1LIF9cu377" /><figcaption>You.</figcaption></figure><p>Eheh. Yes. Dan Abramov got 46000 stars on Github with this. Our prophet has one of the best number of lines/stars ratio of Github. <em>(If you’re reading this and you’re Dan, please, I want a dedicated portrait of you on my desk. We can marry us too, but a portrait can be a good beginning.)</em></p><h3>Time to go to Redux++</h3><p>Ok, we have the basis. But I’m sure you want to have at least one of the most complex feature to deal with <strong>Redux</strong>: asynchronous function handling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/0*epuyIN0TBpoZOxp5" /><figcaption>My brain. Your brain. Everyone’s brain reading that.</figcaption></figure><p>It’s ok. We will do this together. Without banned words like <strong>thunk</strong> and <strong>saga</strong> and <strong>any-way-to-do-async-without-doing-anything-but-I-never-understood-this</strong>.</p><p>Our async handling system will use functions. We will consider that <strong>action can be a function </strong>instead of an object. This function will take the <strong>dispatch()</strong> method from the <strong>Store</strong> as parameter. So we can create an <strong>action</strong> that will call himself the <strong>dispatch()</strong> method when we need to dispatch a new <strong>action</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58d13c4c10da1fdcfb753aae45b5a752/href">https://medium.com/media/58d13c4c10da1fdcfb753aae45b5a752/href</a></iframe><p>In this case, we are just considering that any <strong>action</strong> which is a function is an <strong>Async Action</strong>. So we just have to check if the <strong>action </strong>in <strong>dispatch()</strong> is a function and call it in this case. Else, only do what we did before.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e2f2d528704d91aa560b65a21fc103c/href">https://medium.com/media/0e2f2d528704d91aa560b65a21fc103c/href</a></iframe><p>5 new lines of codes. You can write only one line with a fat-arrow and a ternary operator.</p><p>And now you are handling <strong>async functions</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*RPWYnNdsvu7t2j3q" /><figcaption>You. Me. Everyone.</figcaption></figure><p>The best thing is you can write every system you want based on <strong>Redux</strong>. If you are totally <strong>Redux-compliant</strong>, you can replace your current <strong>redux</strong> with your own new system in <strong>react-redux</strong>. That’s what we did on an internal project at <strong>KBDev</strong>.</p><h3>Redux is minimalist and magic. It’s the perfection.</h3><p>I’m not sure for this statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*0kIdV-PyEJE1lHlM" /><figcaption>You.</figcaption></figure><p>Hmm yes, I wrote this article on <strong>Redux</strong> and I’m saying that this library is not a solution for all problems.</p><p>We must think about a few things.</p><p>First, if you are using <strong>React</strong>, there’s a lot of API features which will be soon added. Just take a look at the <a href="https://reactjs.org/docs/context.html">Context API</a>, the <a href="https://medium.com/@Charles_Stover/react-suspense-with-the-fetch-api-a1b7369b0469">Suspense API</a> or the amazing <a href="https://reactjs.org/docs/hooks-reference.html">Hooks API</a>. All of these APIs are solutions for problems where <strong>Redux</strong> was used.</p><p>Secondly, in an article named <a href="https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367">You Might Not Need Redux</a> from our lord Dan himself, he wrote we perhaps need <strong>Redux </strong>because we don’t have understood how to code with <strong>React</strong>.</p><blockquote>However, if you’re just learning React, don’t make Redux your first choice.</blockquote><blockquote><strong>Instead learn to think in React.</strong></blockquote><blockquote>Come back to Redux if you find a real need for it, or if you want to try something new. But approach it with caution, just like you do with any highly opinionated tool.</blockquote><blockquote>If you feel pressured to do things “the Redux way”, it may be a sign that you or your teammates are taking it too seriously. It’s just one of the tools in your toolbox, an experiment gone wild.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*AukYuwbxDD3B-25q" /><figcaption>The Lord and Saviour of the Earth.</figcaption></figure><p>Thirdly, I wrote this article to prove you that you don’t always need to do an <strong>npm install </strong>each time. A lot of libraries are just some concepts you can recreate and complete with your needs.</p><p>Lastly, <strong>Redux</strong> must be appreciated like a design pattern instead of a library. We need to remember how we can create some simple state management software with <strong>reducers</strong>. You can reuse this pattern to make internal reducers for components or anything else. For example, I’ve done an HTTP fetch hook based on an internal reducer. And it works like a charm.</p><h3>Florian Kauder 🌺 on Twitter</h3><p>React Hooks are so cool. You can create some small internals reducers for fetching data with only one line. Here&#39;s an example of a custom API reducer hook. Code here : https://t.co/Nsv32qE8Dl https://t.co/CE5aDn0hby</p><p>We need to remember that we can invent things. I’m sure if you have read this article you are interested in how software pieces work. On how can we create complex systems with just some lines of code. That’s what we have to do: always learn new and efficient ways to do a better job. And that’s the magic of our job: we are paid to hit our f***ing keyboard to display rainbows and unicorns on all screens of the universe. And that’s cool! So let’s do some great unicorns instead of evil and ugly dead hell pony!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/0*Et5GdXmv2ebkkLOf" /></figure><p>There’s a <strong>Github</strong> repository with all the code of this article and my own <strong>Typescript</strong> special version of <strong>Redux</strong> called <strong>Zebulon</strong>. All are available here: <a href="https://github.com/kb-dev/redux-recoded">Redux-Recoded repository</a>. You can use this code in your projects. And if you have some questions, just ask them in comments, I will try to answer them.</p><p>Thanks a lot for reading! :)</p><p>And thanks for Jean Batista and Jérémy Turon for correcting my bad English.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86fcd953d7dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Voyage to the most efficient loop in NodeJS (and a bit JS)]]></title>
            <link>https://medium.com/@AamuLumi/voyage-to-the-most-efficient-loop-in-nodejs-and-a-bit-js-5961d4524c2e?source=rss-889e900cc31c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5961d4524c2e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[efficiency]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[loop]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Florian "Aamu" Kauder]]></dc:creator>
            <pubDate>Wed, 26 Jul 2017 17:43:56 GMT</pubDate>
            <atom:updated>2019-04-11T15:24:29.703Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*kotgmjKRwfvMDIFXSMolNQ.jpeg" /></figure><blockquote>In this new episode, we will try to determine what is the best way to write a loop in node.js and JS. Is the cached length myth a reality? Has StackOverflow the best answer to this problem? Is there a new best option to compute the super-fast loop? All these questions will be answered in this MythBusters!</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FNDtizUq0aaG6k%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FNDtizUq0aaG6k%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FNDtizUq0aaG6k%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="274" frameborder="0" scrolling="no"><a href="https://medium.com/media/87732f786fc6c7788aa0ed8f79923663/href">https://medium.com/media/87732f786fc6c7788aa0ed8f79923663/href</a></iframe><p><strong>EDIT (11/4/19) :</strong> I’m currently doing some tests with Node 10, and the caching bug seems corrected. You can now write your loop with the good old way :</p><blockquote>for (let i = 0; i &lt; array.length; i++)</blockquote><p><strong>EDIT (31/3/18)</strong> : an explanation of loops behaviors from <a href="https://medium.com/u/f3ae459c39ed">John Klimov</a> :</p><p><a href="https://medium.com/@klimcode/there-is-no-difference-between-for-and-while-in-this-case-99da509dd442">There is no difference between for and while In this case.</a></p><p>It explains a lot of things. Many thanks to him !</p><p><strong>EDIT (17/8/17)</strong> : I’m now running Node 8.4, and caching length is again useful.</p><p><strong>EDIT (9/8/17) :</strong> I discovered that the trick I described in this article <strong>really exists in Hydrogen generated code</strong>. Hydrogen is the engine used in V8 until 5.9 to optimize Javascript code. The difference with the classic loop is the tricked loop will be transformed into a more simple code.</p><p>I tested the trick on the latest v8 engine which uses Turbofan. It’s version 6.2 when I did tests. <strong>And the trick was corrected</strong>. So this trick will not be available from Node 8.4 (which will use Turbofan).</p><p>If you want a bit more information : <a href="https://twitter.com/AamuLumi/status/895224348642037761">https://twitter.com/AamuLumi/status/895224348642037761</a></p><p>I’m currently developing an optimization library (called <a href="https://github.com/AamuLumi/sanic.js/tree/master"><strong>sanic.js</strong></a>) to increase native functions performance in node.js. So I need to find <strong>the best way to write some parts of code like loops</strong>.</p><p>If you type “js loop efficient” on Google (or Qwant, but he didn’t find it), you should find <a href="https://stackoverflow.com/questions/5349425/whats-the-fastest-way-to-loop-through-an-array-in-javascript">this topic</a>. The <strong>top answer</strong> is (in ES6 version) :</p><blockquote>for (let i = 0, iMax = array.length; i &lt; iMax; i++) {}</blockquote><p>The <strong>second answer</strong> is :</p><blockquote>let i = array.length; while (i — ) {}</blockquote><p>First time I read it, I was thinking <em>StackOverflow</em> must be right, and these answers must be the best. <a href="https://jsperf.com/fastest-array-loops-in-javascript/32">Another resource (a JSPerf page)</a> show me the <em>while</em> version is so far powerful <strong><em>(note : on a WebKit browser)</em></strong>. But you cannot use it if you need to iterate your array in ascending order.</p><p>At this point, I decided to make my own benchmark of loops with this condition :</p><blockquote>The loop must be nondestructive. Ascending order is a plus.</blockquote><h3>Benchmark’ them all!</h3><p>With this condition, I write 13 different loops on an array with for and while loops in node.js. I add the famous StackOverflow answers to the test to check if they are good. All the functions are available in <a href="https://github.com/AamuLumi/sanic.js/blob/master/bench/misc/loop.js">this benchmark file</a>. I know there are more functions to test, but these 13 functions are a good base.</p><p>I work with the famous Benchmark.js library to compute all my benchmarks. I’m running the latest node version (<em>last </em>when I’m writing this article) which is 8.1.4. Functions are executed at least 200 times to compute these statistics.</p><p>Numbers presented in this array are the number of operations by seconds. It corresponds (if I correctly understood the library) to the number of times the tested function can be executed in one second.</p><p>Okay, let’s take a look at the result array :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gqIM_xhVPtlOqSBPlNmxpA.png" /><figcaption>13 ways to loop on array (<a href="https://github.com/AamuLumi/sanic.js/blob/master/doc/loop-perf.md">Original file</a>)</figcaption></figure><p>The best StackOverflow answer is the <strong>(2)</strong>. The <strong>(1)</strong> is the same version but without cached length. So yes, <strong>assign the array length to a variable is no more necessary (in node.js)</strong>.</p><p>The <em>while </em>descending version is the <strong>(10)</strong>, which<strong> is really faster than the best StackOverflow answer</strong>. But it has the disadvantage to working with a descending order.</p><p>If you look correctly, there are two fasters ways : <strong>(4)</strong> and <strong>(5)</strong>. I don’t really understand why, but <strong>these writing ways are so much faster (until x2.2 on big arrays)</strong>. <strong>(4)</strong> is the cached length version of the <strong>(5)</strong>. So what is the code for <strong>(4)</strong> ?</p><blockquote>let i = 0; const iMax = array.length; for(; i &lt; iMax; i++) {}</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl2RaPhzQeY4ODghNK%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl2RaPhzQeY4ODghNK%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl2RaPhzQeY4ODghNK%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="338" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2e00cc6205e25023ececfb2987e5b17/href">https://medium.com/media/e2e00cc6205e25023ececfb2987e5b17/href</a></iframe><p>Yeah. That’s ridiculous, but I test this loop on <a href="https://github.com/AamuLumi/sanic.js"><strong>sanic.js</strong></a> functions (which was written with the best StackOverflow answer). And …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3xNeCH1KX2SjBfmuGXPpg.png" /><figcaption>sanic.js gotta go faster now</figcaption></figure><p>These numbers correspond to the coefficient of speed gained compared to the natives node.js functions. <strong>All functions gained at least 30% of speed</strong> (except <em>reduce</em> but <em>reduce</em> was already written with this technic due to the algorithm).</p><p>So yeah, I expect the V8 to have a better optimization of this new loop. But I cannot give you a better explanation because I didn’t find it.</p><h3>Time to use this good old Javascript</h3><p>To confirm this hypothesis, I write <a href="https://jsperf.com/loop-test-aamulumi/1">another JSperf</a> with the new case. I use Vivaldi browser which is WebKit-based, so another V8 engine. The result is the same : <strong>guys, this is the new way to write an efficient loop in JS run by V8 Engine.</strong> <em>(Note: I also test this on </em><strong><em>Chrome. And same result</em></strong><em>.)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*0b2Yf4R7eiETephfEjE2HA.png" /><figcaption>Vivaldi for the ❤️</figcaption></figure><p>We are ok for V8. But is there the same thing on other JS Engine (like Firefox) ? And one thing happens : <strong>the StackOverflow for and the new version has no difference.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*Mm9HJp0a39_Px0MYWox0oQ.png" /><figcaption>Firefox — Installed just for this article</figcaption></figure><h3>Okay. So what must we do ?</h3><p><strong>To front-end developer :</strong> if you can use this new version of the efficient loop, <strong>JUST DO IT</strong>. WebKit browsers are now the leader on the market (according to <a href="https://www.w3schools.com/Browsers/default.asp">W3Schools</a>), so a free optimization is always good.</p><p><strong>To back-end developer : </strong>no hesitation. If you need performance, <strong>you must use it. </strong>No more to say.</p><p>Remember :</p><blockquote>let i = 0; const iMax = array.length; for(; i &lt; iMax; i++) {}</blockquote><blockquote>If you’re searching better performances in node.js native functions, take a look at my new and fresh library : <a href="https://github.com/AamuLumi/sanic.js"><strong>sanic.js</strong></a>. You can test it in one line of code (a require() + a function), and it can help you to gain performance without doing anything.</blockquote><blockquote>And if you want to make me happy, any <em>💚</em> on this article or sanic.js are welcome. :)</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FtsIFjie7obBM4%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FtsIFjie7obBM4%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FtsIFjie7obBM4%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="222" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a98c1947fe20b5512c7c694d31a6017/href">https://medium.com/media/2a98c1947fe20b5512c7c694d31a6017/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5961d4524c2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>