<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: SFEIR</title>
    <description>The latest articles on Forem by SFEIR (@sfeircode).</description>
    <link>https://forem.com/sfeircode</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F4184%2F7cf6f1af-ded5-4fbf-a5f4-7bd98eccaa44.png</url>
      <title>Forem: SFEIR</title>
      <link>https://forem.com/sfeircode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sfeircode"/>
    <language>en</language>
    <item>
      <title>Back to Back #19 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Wed, 25 Jan 2023 07:00:00 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-19-back-end-news-by-sfeir-5gc2</link>
      <guid>https://forem.com/sfeircode/back-to-back-19-back-end-news-by-sfeir-5gc2</guid>
      <description>&lt;p&gt;&lt;em&gt;Comme chaque fin de mois, les experts de SFEIR publient la newsletter back-end. Retrouvez la sélection de contenu, les outils coup de cœur et les astuces.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📰 Articles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://dzone.com/articles/kubernetes-native-inner-loop-development-with-quarkus" rel="noopener noreferrer"&gt;Kubernetes-Native Inner Loop Development With Quarkus&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Quarkus est à la rescousse afin de simplifier le processus de développement et de test des microservices ainsi que de réduire les cycles de développement.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://thenewstack.io/one-year-of-log4j/" rel="noopener noreferrer"&gt;One Year of Log4j&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Il y a un peu plus d'un an, il ne s'agissait que d'un inoffensif outil de logging. Depuis la vulnérabilité Log4Shell est passée par là. Cet article nous montre qu'il reste de nombreuses organisations vulnérables à cette attaque.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://chriswarrick.com/blog/2023/01/15/how-to-improve-python-packaging/" rel="noopener noreferrer"&gt;How to improve Python packaging&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Pipenv, Poetry, setuptools… Avec autant de solutions différentes,  il est difficile de savoir quelle est la meilleure approche. Cet article explore l'état actuel du packaging en Python et (peut-être ?) le futur avec la PEP 582.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Outils
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.npmjs.com/package/modern-errors" rel="noopener noreferrer"&gt;modern-errors&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Un package npm qui facilite la création et l'utilisation des classes d'erreurs. Des plugins existent, comme &lt;code&gt;modern-errors-http&lt;/code&gt; qui gèrent les réponses HTTP.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://docs.gofiber.io/" rel="noopener noreferrer"&gt;Fiber&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Fiber est un framework web inspiré d'Express. Il se base sur Fasthttp, l'implémentation HTTP de Go la plus rapide. Conçu pour faciliter les choses pour des développements rapides, Fiber garde à l'esprit l'absence d'allocations mémoires, ainsi que les performances.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Trucs et astuces
&lt;/h2&gt;

&lt;p&gt;Voici une collection de règles utiles applicables avec les fichiers &lt;code&gt;.htaccess&lt;/code&gt; : redirection, protection d'un dossier, forçage d'un téléchargement…&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/phanan" rel="noopener noreferrer"&gt;
        phanan
      &lt;/a&gt; / &lt;a href="https://github.com/phanan/htaccess" rel="noopener noreferrer"&gt;
        htaccess
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      ✂A collection of useful .htaccess snippets.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;.htaccess Snippets &lt;a href="https://github.com/sindresorhus/awesome" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8693bde04030b1670d5097703441005eba34240c32d1df1eb82a5f0d6716518e/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667" alt="Awesome"&gt;&lt;/a&gt;
&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A collection of useful .htaccess snippets, all in one place.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: &lt;code&gt;.htaccess&lt;/code&gt; files are for people that do not have rights to edit the main server configuration file. They are intrinsically slower and more complicated than using the main config. Please see the &lt;a href="https://httpd.apache.org/docs/current/howto/htaccess.html" rel="nofollow noopener noreferrer"&gt;howto in the httpd documentation&lt;/a&gt; for further details.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: While dropping the snippet into an &lt;code&gt;.htaccess&lt;/code&gt; file is most of the time sufficient, there are cases when certain modifications might be required. Use at your own risk.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt;: Apache 2.4 introduces a few breaking changes, most notably in access control configuration. For more information, check the &lt;a href="https://httpd.apache.org/docs/2.4/upgrading.html" rel="nofollow noopener noreferrer"&gt;upgrading document&lt;/a&gt; as well as &lt;a href="https://github.com/phanan/htaccess/issues/2" rel="noopener noreferrer"&gt;this issue&lt;/a&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Credits&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;What we are doing here is mostly collecting useful snippets from all over the interwebs (for example, a good chunk is from &lt;a href="https://github.com/h5bp/server-configs-apache" rel="noopener noreferrer"&gt;Apache Server Configs&lt;/a&gt;) into one place. While we’ve been trying to credit where due…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/phanan/htaccess" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  🎤 CFP
&lt;/h2&gt;

&lt;p&gt;Si vous ne voulez rien louper des conférences tech et des CFP, suivez ce repo géré par &lt;a class="mentioned-user" href="https://dev.to/aurelievache"&gt;@aurelievache&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/scraly" rel="noopener noreferrer"&gt;
        scraly
      &lt;/a&gt; / &lt;a href="https://github.com/scraly/developers-conferences-agenda" rel="noopener noreferrer"&gt;
        developers-conferences-agenda
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      developers.events is a community-driven platform listing developer/tech conferences and Calls for Papers (CFPs) worldwide with a list, a calendar and a map view. It helps organizers, speakers, sponsors &amp;amp; attendees.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Developers Conferences &amp;amp; CFP Agenda/List/Map&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;--&amp;gt; &lt;a href="https://developers.events" rel="nofollow noopener noreferrer"&gt;developers.events&lt;/a&gt; &amp;lt;--&lt;/p&gt;
&lt;p&gt;This repository lists a maximum of conference dates to help conference organizers.&lt;/p&gt;
&lt;p&gt;As conference organizers, one of the first question we ask ourselves is what will be the ideal date for our event.&lt;/p&gt;
&lt;p&gt;One piece of data to take into account is the date of other events, but how do you find it?&lt;/p&gt;
&lt;p&gt;As a developer and a technical lover, it is handy to have a calendar to look at to know when will be the next event.&lt;/p&gt;
&lt;p&gt;I propose this GitHub repository to list all the conferences for developers in France, Europe and the world.&lt;/p&gt;
&lt;p&gt;Do you want to contribute, add an event or your event? Perfect! You can follow the &lt;a href="https://github.com/scraly/developers-conferences-agendaCONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt; and just open a &lt;a href="https://github.com/scraly/developers-conferences-agenda/pulls" rel="noopener noreferrer"&gt;Pull Request (PR)&lt;/a&gt; to update the developers conferences agenda
If everybody contributes to this repo, it can help conference organizers but not only. Another goal…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/scraly/developers-conferences-agenda" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>api</category>
    </item>
    <item>
      <title>Back to Back #18 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Wed, 30 Nov 2022 09:16:09 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-18-back-end-news-by-sfeir-39gp</link>
      <guid>https://forem.com/sfeircode/back-to-back-18-back-end-news-by-sfeir-39gp</guid>
      <description>&lt;p&gt;&lt;em&gt;Comme chaque fin de mois, les experts de SFEIR publient la newsletter back-end. Retrouvez la sélection de contenu, les outils coup de cœur et les astuces.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📰 Articles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.cybertec-postgresql.com/en/why-are-my-postgresql-updates-getting-slower/"&gt;Why are my PostgreSQL updates getting slower ?&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Laurenz Albe nous parle de mises à jour dans une base de données. Son article part d'un exemple puis explique les raisons des opérations de plus en plus longues et termine sur les remèdes.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://medium.com/graalvm/graalvm-22-3-is-here-jdk-19-builds-jlink-support-new-monitoring-features-and-more-f6e2b2eeff95"&gt;GraalVM 22.3 is here: JDK 19 builds, jlink support, new monitoring features, and more!&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;En plus de la version 22.3 sortie à la fin du mois précédent, l'équipe GraalVM a annoncé qu'Oracle va contribuer à OpenJDK avec une partie du code. L'objectif est « l'élimination des obstacles à l'adoption par un écosystème plus large et à la participation au développement des technologies GraalVM ». Autre nouvelle importante, une nouvelle mascotte a été dévoilée 🐇&lt;/p&gt;

&lt;h3&gt;
  
  
  #RetourAuxSources : Le cache HTTP
&lt;/h3&gt;

&lt;p&gt;Bon ok, le cache http, sujet hautement pas du tout sexy… Et pourtant ! Hubert nous rappelle toutes les bases, toutes manières de gérer le cache, tout est très bien présenté, animé avec un petit wagon sur une ligne de métro c'est juste parfait ! Que vous ayez ou non de l'expérience avec le cache HTTP, prenez le temps de regarder son talk, vous allez forcément apprendre des trucs et ça vous trotte dans la tête quand vous en aurez besoin !&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/xtpaQ8_mmKM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Outils
&lt;/h2&gt;

&lt;h3&gt;
  
  
  flastapi
&lt;/h3&gt;

&lt;p&gt;FastAPI ? Flask ? Pourquoi pas les deux 🤷 C'est ce que ce module propose. Voulant profiter de fonctionnalités disponibles dans FastAPI mais pas (encore ?) dans Flask, ce plugin allie le meilleur des deux mondes.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/maarten-dp"&gt;
        maarten-dp
      &lt;/a&gt; / &lt;a href="https://github.com/maarten-dp/flastapi"&gt;
        flastapi
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      FastAPI-like interface plugin for Flask
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Table of contents&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#introduction"&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#quickstart"&gt;Quickstart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/maarten-dp/flastapi#api-overview"&gt;API Overview&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#path-parameters"&gt;Path parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#query-parameters"&gt;Query parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#body-parameters"&gt;Body parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#multi-body-parameters"&gt;Multi body parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#query-dependency"&gt;Query dependency&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#context-dependency"&gt;Context dependency&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/maarten-dp/flastapi#testing-dependencies"&gt;Testing dependencies&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#overrides"&gt;Overrides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#using-requests-as-test-client"&gt;Using requests as test client&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/maarten-dp/flastapi#roadmap"&gt;Roadmap&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#stuff-id-still-like-to-add"&gt;Stuff I'd still like to add&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maarten-dp/flastapi#requesting-features"&gt;Requesting features&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
Introduction&lt;/h1&gt;
&lt;p&gt;Flastapi is a small flask plugin to enable a Fastapi-like interface to build API endpoints using pydantic.&lt;/p&gt;
&lt;p&gt;Current features are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;path parameters using flask paths&lt;/li&gt;
&lt;li&gt;query parameters&lt;/li&gt;
&lt;li&gt;body parameters using pydantic&lt;/li&gt;
&lt;li&gt;depends (including context dependencies)&lt;/li&gt;
&lt;li&gt;dependency_overrides&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Fastapi did a great job at integrating pydantic, as a marshaller for API endpoints, in an intuitive way. With this library I wanted to expose these capabilities in flast as well, for those who haven't found the ability to transition to newer techs (Or those who have a hard time dealing with change ;) )&lt;/p&gt;
&lt;h1&gt;
Quickstart&lt;/h1&gt;
&lt;div class="highlight highlight-source-python notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s1"&gt;flask&lt;/span&gt; &lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-v"&gt;Flask&lt;/span&gt;
&lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s1"&gt;flastapi&lt;/span&gt; &lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-v"&gt;FlastAPI&lt;/span&gt;, &lt;span class="pl-v"&gt;Router&lt;/span&gt;
&lt;span class="pl-s1"&gt;app&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-v"&gt;Flask&lt;/span&gt;(&lt;span class="pl-s1"&gt;__name__&lt;/span&gt;)
&lt;span class="pl-s1"&gt;flastapi&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-v"&gt;FlastAPI&lt;/span&gt;(&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/maarten-dp/flastapi"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  &lt;a href="https://javalin.io/"&gt;Javalin&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Javalin est à la fois une bibliothèque web Kotlin et une bibliothèque web Java, ce qui signifie qu'il est développée en mettant l'accent sur une grande interopérabilité entre les deux langages. Javalin n'a pas pour objectif d'être un framework web complet, mais plutôt une bibliothèque d'API REST légère. Ainsi, il peut être utilisé pour créer un backend RESTful ou juste pour exposer des ressources statiques.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Trucs et astuces
&lt;/h2&gt;

&lt;p&gt;L'astuce de mois concerne Docker Compose. Ce billet de Maciej Walkowiak parle du flag &lt;code&gt;--wait&lt;/code&gt;, qui attend que les containers soient prêts avant de pouvoir les utiliser : &lt;a href="https://maciejwalkowiak.com/blog/docker-compose-waiting-containers-ready/"&gt;&lt;em&gt;Docker Compose - waiting until containers are ready&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>newsletter</category>
      <category>french</category>
      <category>backend</category>
      <category>sfeir</category>
    </item>
    <item>
      <title>Back to Back #17 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Wed, 26 Oct 2022 07:40:01 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-17-back-end-news-by-sfeir-2m9m</link>
      <guid>https://forem.com/sfeircode/back-to-back-17-back-end-news-by-sfeir-2m9m</guid>
      <description>&lt;p&gt;&lt;em&gt;Comme chaque fin de mois, les experts de SFEIR publient la newsletter back-end. Retrouvez la sélection de contenu, les outils coup de cœur et les astuces.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📰 Articles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://blog.python.org/2022/10/python-3110-is-now-available.html"&gt;Python 3.11.0 is now available&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;La PSF a annoncé la sortie de la version 3.11 de Python. Ce billet de blog liste les nouveautés du langage (comme une meilleure localisation des erreurs dans les tracebacks ou les groupes d'exceptions) mais aussi un gain de performances notable par rapport à la 3.10.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.infoq.com/news/2022/10/quarkus-csrf-defense/"&gt;Quarkus Defends REST APIs against Attack&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;La version 2.13.0 de Quarkus est sortie avec l’ajout d’un filtre CSRF pour les serveurs RESTEasy Reactive. Un &lt;a href="https://quarkus.io/guides/security-csrf-prevention"&gt;guide&lt;/a&gt; est disponible pour les développeurs voulant activer ce mécanisme de défense.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://devblogs.microsoft.com/typescript/ten-years-of-typescript/"&gt;Ten Years of TypeScript&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;TypeScript a 10 ans ! L’anniversaire a eu lieu au tout début de ce mois. Pour cette occasion, Daniel Rosenwasser revient sur les premiers pas du langage et le scepticisme ambiant de l’époque.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Outils
&lt;/h2&gt;

&lt;h3&gt;
  
  
  bat
&lt;/h3&gt;

&lt;p&gt;Avec Halloween, l’occasion est parfaite pour parler de bat 🦇 Écrit en Rust, ce clone de la commande &lt;code&gt;cat&lt;/code&gt; qui vient avec une coloration syntaxique pour un grand nombre de langages et une intégration de Git pour afficher les modifications dans les fichiers.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/sharkdp"&gt;
        sharkdp
      &lt;/a&gt; / &lt;a href="https://github.com/sharkdp/bat"&gt;
        bat
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A cat(1) clone with wings.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/sharkdp/batdoc/logo-header.svg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j784zywC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/sharkdp/batdoc/logo-header.svg" alt="bat - a cat clone with wings"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a href="https://github.com/sharkdp/bat/actions?query=workflow%3ACICD"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SDm4f-Rr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/sharkdp/bat/workflows/CICD/badge.svg" alt="Build Status"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/4718d2a1e7a54c33732310613b2e2e8d8ef70c25e3e27406d1df79466b6b603d/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f6c2f6261742e737667"&gt;&lt;img src="https://camo.githubusercontent.com/4718d2a1e7a54c33732310613b2e2e8d8ef70c25e3e27406d1df79466b6b603d/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f6c2f6261742e737667" alt="license"&gt;&lt;/a&gt;
  &lt;a href="https://crates.io/crates/bat" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/295b01f4d06e6db8b2fd1578ee2827e4f953fe7b63578b3a9c810d8cb0d3abcb/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f6261742e7376673f636f6c6f72423d333139653863" alt="Version info"&gt;&lt;/a&gt;&lt;br&gt;
  A &lt;i&gt;cat(1)&lt;/i&gt; clone with syntax highlighting and Git integration
&lt;/p&gt;

&lt;p&gt;
  &lt;a href="https://github.com/sharkdp/bat#syntax-highlighting"&gt;Key Features&lt;/a&gt; •
  &lt;a href="https://github.com/sharkdp/bat#how-to-use"&gt;How To Use&lt;/a&gt; •
  &lt;a href="https://github.com/sharkdp/bat#installation"&gt;Installation&lt;/a&gt; •
  &lt;a href="https://github.com/sharkdp/bat#customization"&gt;Customization&lt;/a&gt; •
  &lt;a href="https://github.com/sharkdp/bat#project-goals-and-alternatives"&gt;Project goals, alternatives&lt;/a&gt;&lt;br&gt;
  [English]
  [&lt;a href="https://github.com/sharkdp/batdoc/README-zh.md"&gt;中文&lt;/a&gt;]
  [&lt;a href="https://github.com/sharkdp/batdoc/README-ja.md"&gt;日本語&lt;/a&gt;]
  [&lt;a href="https://github.com/sharkdp/batdoc/README-ko.md"&gt;한국어&lt;/a&gt;]
  [&lt;a href="https://github.com/sharkdp/batdoc/README-ru.md"&gt;Русский&lt;/a&gt;]
&lt;/p&gt;

&lt;h3&gt;
Sponsors&lt;/h3&gt;
&lt;p&gt;A special &lt;em&gt;thank you&lt;/em&gt; goes to our biggest &lt;a href="https://github.com/sharkdp/batdoc/sponsors.md"&gt;sponsors&lt;/a&gt;:&lt;br&gt;
&lt;a href="https://workos.com/?utm_campaign=github_repo&amp;amp;utm_medium=referral&amp;amp;utm_content=bat&amp;amp;utm_source=github" rel="nofollow"&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qdPaaolU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/sharkdp/batdoc/sponsors/workos-logo-white-bg.svg" width="200" alt="WorkOS"&gt;
&lt;br&gt;
&lt;strong&gt;Your app, enterprise-ready.&lt;/strong&gt;
&lt;br&gt;
Start selling to enterprise customers with just a few lines of code.
&lt;br&gt;
&lt;sup&gt;Add Single Sign-On (and more) in minutes instead of months.&lt;/sup&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Syntax highlighting&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;bat&lt;/code&gt; supports syntax highlighting for a large number of programming and markup
languages:&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/7b7c397acc5b91b4c4cf7756015185fe3c5f700f70d256a212de51294a0cf673/68747470733a2f2f696d6775722e636f6d2f724773646e44652e706e67"&gt;&lt;img src="https://camo.githubusercontent.com/7b7c397acc5b91b4c4cf7756015185fe3c5f700f70d256a212de51294a0cf673/68747470733a2f2f696d6775722e636f6d2f724773646e44652e706e67" alt="Syntax highlighting example"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Git integration&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;bat&lt;/code&gt; communicates with &lt;code&gt;git&lt;/code&gt; to show modifications with respect to the index
(see left side bar):&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c436c206f2c86605ab2f9fb632dd485afc05fccbf14af472770b0c59d876c9cc/68747470733a2f2f692e696d6775722e636f6d2f326c53573452452e706e67"&gt;&lt;img src="https://camo.githubusercontent.com/c436c206f2c86605ab2f9fb632dd485afc05fccbf14af472770b0c59d876c9cc/68747470733a2f2f692e696d6775722e636f6d2f326c53573452452e706e67" alt="Git integration example"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Show non-printable characters&lt;/h3&gt;
&lt;p&gt;You can use the &lt;code&gt;-A&lt;/code&gt;/&lt;code&gt;--show-all&lt;/code&gt; option to show and highlight non-printable
characters:&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/643244c46834769e0ea2802e15518c49e0c7cf10aa82d00c7c69a406f2aa161d/68747470733a2f2f692e696d6775722e636f6d2f576e64477039482e706e67"&gt;&lt;img src="https://camo.githubusercontent.com/643244c46834769e0ea2802e15518c49e0c7cf10aa82d00c7c69a406f2aa161d/68747470733a2f2f692e696d6775722e636f6d2f576e64477039482e706e67" alt="Non-printable character example"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
Automatic paging&lt;/h3&gt;
&lt;p&gt;By default, &lt;code&gt;bat&lt;/code&gt; pipes its own output to a pager (e.g. &lt;code&gt;less&lt;/code&gt;) if the output is too large for one screen
If you would rather …&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/sharkdp/bat"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;
  
  
  Key Promoter X
&lt;/h3&gt;

&lt;p&gt;Pour ceux qui utilisent Intellij, le plugin Key Promoter X affiche le raccourci clavier pour l'action que vous venez de faire avec la souris. Pour les boutons qui n'ont pas de raccourci, le plugin vous propose d'en créer un. Ainsi, Key Promoter vous aide à prendre le réflexe d’utiliser le clavier au lieu de la souris.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/halirutan"&gt;
        halirutan
      &lt;/a&gt; / &lt;a href="https://github.com/halirutan/IntelliJ-Key-Promoter-X"&gt;
        IntelliJ-Key-Promoter-X
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Modern IntelliJ plugin to learn shortcuts for buttons
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/8be76834105d069a1e4ea7ea3dde58d5cbadc416bd1687a2620033c39a1b564b/68747470733a2f2f696d672e736869656c64732e696f2f6a6574627261696e732f706c7567696e2f642f393739322d6b65792d70726f6d6f7465722d782e737667"&gt;&lt;img src="https://camo.githubusercontent.com/8be76834105d069a1e4ea7ea3dde58d5cbadc416bd1687a2620033c39a1b564b/68747470733a2f2f696d672e736869656c64732e696f2f6a6574627261696e732f706c7567696e2f642f393739322d6b65792d70726f6d6f7465722d782e737667" alt="Downloads Badge"&gt;&lt;/a&gt;
&lt;a href="https://github.com/halirutan/IntelliJ-Key-Promoter-X/actions/workflows/build.yml"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TpMKqRu0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/halirutan/IntelliJ-Key-Promoter-X/actions/workflows/build.yml/badge.svg" alt="Build Status"&gt;&lt;/a&gt;
&lt;a href="https://plugins.jetbrains.com/slack" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/dc6b85dbaa02b5da5bce3149a0dddb4f880635d51e9f473ab413d156b59035e4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d253233706c7567696e2d2d6b657970726f6d6f7465722d2d782d626c7565" alt="Slack"&gt;&lt;/a&gt;
&lt;a href="https://github.com/sponsors/halirutan"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BkQouOkG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/halirutan/IntelliJ-Key-Promoter-Xdoc/img/kpxBanner.png" alt="Banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm grateful this project is currently sponsored by&lt;/p&gt;
&lt;p&gt;&lt;a href="https://sponsorlink.codestream.com/?utm_source=jbmarket&amp;amp;utm_campaign=keypromoterx&amp;amp;utm_medium=banner" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/ae6368253e49d3ef647ef32d7384b2259e2ec5321707bdd9372b2f2a2b132a74/68747470733a2f2f616c742d696d616765732e636f646573747265616d2e636f6d2f636f646573747265616d5f6c6f676f5f6b657970726f6d6f746572782e706e67" alt="CodeStream"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and receives $4/month from
&lt;a href="https://github.com/dbabiak"&gt;Daniel Babiak&lt;/a&gt;
&lt;a href="https://github.com/sthagen"&gt;Stefan Hagen&lt;/a&gt;
&lt;a href="https://github.com/jlash13"&gt;jlash13&lt;/a&gt;
&lt;a href="https://github.com/mccorkle"&gt;Mark McCorkle&lt;/a&gt;,
&lt;a href="https://github.com/m2ger"&gt;Indrek Toom&lt;/a&gt;,
&lt;a href="https://github.com/opentraintimes"&gt;OpenTrainTimes Ltd.&lt;/a&gt;,
&lt;a href="https://github.com/incubyteco"&gt;incubyteco&lt;/a&gt;,
$2/month from
&lt;a href="https://github.com/macalac"&gt;Mac Adamarczuk&lt;/a&gt;,
&lt;a href="https://github.com/franklinharper"&gt;Frank Harper&lt;/a&gt;,
&lt;a href="https://github.com/chriswk"&gt;Christopher Kolstad&lt;/a&gt;,
&lt;a href="https://github.com/sudhirj"&gt;Sudhir Jonathan&lt;/a&gt;,
&lt;a href="https://github.com/hbaxamoosa"&gt;Hasnain Baxamoosa&lt;/a&gt;,
&lt;a href="https://github.com/datenbrille"&gt;Karl Spies&lt;/a&gt;,
&lt;a href="https://github.com/ryanwilliamquinn"&gt;Ryan Quinn&lt;/a&gt;,
&lt;a href="https://github.com/cristianradulescu"&gt;Cristian Radulescu&lt;/a&gt;,
&lt;a href="https://github.com/brianlevis"&gt;Brian Levis&lt;/a&gt;,
&lt;a href="https://github.com/IgnatBeresnev"&gt;Ignat Beresnev&lt;/a&gt;,
&lt;a href="https://github.com/PCoetzeeDev"&gt;PCoetzeeDev&lt;/a&gt;,
and $1/month from &lt;a href="https://github.com/sponsors/halirutan"&gt;24 other people&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/sponsors/halirutan"&gt;Become a GitHub Sponsor and support the Key Promoter X development&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Key Promoter X is a plugin for IntelliJ-based products like IDEA, Android Studio, or CLion, and it helps to learn
essential keyboard shortcuts from mouse actions while you are working
When you use the mouse on a button inside the IDE, the Key Promoter X shows you the keyboard shortcut that you should
have used instead. This provides an easy way to learn how
to replace…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/halirutan/IntelliJ-Key-Promoter-X"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  💡 Trucs et astuces
&lt;/h2&gt;

&lt;p&gt;Ce guide d'Anthony &lt;a href="https://k49.fr.nf/package-npm-universel-ou-comment-construire-un-package-quon-pourra-utiliser-partout/"&gt;&lt;em&gt;Package NPM universel&lt;/em&gt;&lt;/a&gt; répond à une problématique du développement en JS : créer un module qui pourra être utilisé partout, aussi bien sur un serveur que dans un navigateur Internet Explorer.&lt;/p&gt;

</description>
      <category>newsletter</category>
      <category>french</category>
      <category>backend</category>
      <category>sfeir</category>
    </item>
    <item>
      <title>Back to Back #16 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Wed, 28 Sep 2022 09:46:02 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-16-back-end-news-by-sfeir-4k2l</link>
      <guid>https://forem.com/sfeircode/back-to-back-16-back-end-news-by-sfeir-4k2l</guid>
      <description>&lt;p&gt;&lt;em&gt;Comme chaque fin de mois, les experts de SFEIR publient la newsletter back-end. Retrouvez la sélection de contenu, les outils coup de cœur et les astuces.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📰 Articles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://k49.fr.nf/java-19-le-point-sur-les-nouveautes/"&gt;Java 19 : le point sur les nouveautés&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;La version 19 du kit de développement Java est sortie le 20 septembre 2022, comme prévue. Le Sfeirien Anthony nous fait les tour des nouveautés. Entre autres, le support de l'architecture RISC-V et l'amélioration du pattern matching.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://stephantromer.dev/blog/how-to-handle-poison-pills-in-kafka"&gt;How to handle poison pills in Spring Kafka?&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Tout se passe bien dans vos flux de données. Sauf qu'un jour, un message au format inattendu arrive dans Kafka. Cet article explique ce que sont les &lt;em&gt;poison pills&lt;/em&gt;, comment continuer à consommer des topics malgré ces erreurs et comment récupérer ces messages défectueux dans des &lt;em&gt;dead letter topics&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Detecting Breaking API Changes: Better API Management Through Automation
&lt;/h3&gt;

&lt;p&gt;Pour améliorer l'API sans perturber les consommateurs existants, il est important de savoir si une modification peut causer un breaking change. Dans cette vidéo, on nous parle de différents outils de comparaison pour les spécifications OpenAPI et de la manière dont ils peuvent s'intégrer dans le management des APIs. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/nhiaJQCyXdw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Outils
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://devtoys.app/"&gt;DevToys&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;DevToys se présente comme le couteau suisse du développeur. Disponible uniquement sous Windows, le logiciel n'a pas besoin d'une connexion Internet pour fonctionner et possède une trentaine d'outils dont un testeur de regex, une convertisseur d'images ou un parseur de crons. DevToys peut détecter automatiquement quel outil est le plus pertinent grâce à la &lt;em&gt;Smart Detection&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  simdjson
&lt;/h3&gt;

&lt;p&gt;Les serveurs du monde entier passent beaucoup de temps à parser du JSON. La bibliothèque simdjson utilise des &lt;a href="https://fr.wikipedia.org/wiki/Single_instruction_multiple_data"&gt;instructions SIMD&lt;/a&gt; et des algorithmes microparallèles pour battre des records de vitesse. Une douzaine de ports et de bindings ont été publiés en Python, R, Ruby, PHP, C#, Rust, Swift, Go, etc.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/simdjson"&gt;
        simdjson
      &lt;/a&gt; / &lt;a href="https://github.com/simdjson/simdjson"&gt;
        simdjson
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Parsing gigabytes of JSON per second 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/simdjson/simdjson/workflows/Ubuntu%2018.04%20CI%20(GCC%207)/badge.svg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iCTaiTnZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/simdjson/simdjson/workflows/Ubuntu%252018.04%2520CI%2520%28GCC%25207%29/badge.svg" alt="Ubuntu 18.04 CI"&gt;&lt;/a&gt;
&lt;a href="https://simdjson.org/plots.html" rel="nofollow"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pLb-q3_Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/simdjson/simdjson/workflows/Ubuntu%252020.04%2520CI%2520%28GCC%25209%29/badge.svg" alt="Ubuntu 20.04 CI"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/simdjson/simdjson/workflows/VS16-CI/badge.svg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7x8GhdfG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/simdjson/simdjson/workflows/VS16-CI/badge.svg" alt="VS16-CI"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/simdjson/simdjson/workflows/MinGW64-CI/badge.svg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EyWo_yW---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/simdjson/simdjson/workflows/MinGW64-CI/badge.svg" alt="MinGW64-CI"&gt;&lt;/a&gt;
&lt;a href="https://github.com/simdjson/simdjsonLICENSE"&gt;&lt;img src="https://camo.githubusercontent.com/b5d57b953702cf4ad393aca3e0d1e66a267698f99f3b304b482cbd1d4ed3fd51/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322d626c75652e737667" alt=""&gt;&lt;/a&gt;  &lt;a href="https://simdjson.org/api/2.0.0/index.html" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/2e77aac61b0e0a5c3673af4d646617c901b921cab78d4ba6b3a7bf4755b6cbed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d646f787967656e2d677265656e2e737667" alt="Doxygen Documentation"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
simdjson : Parsing gigabytes of JSON per second&lt;/h1&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/simdjson/simdjsonimages/logo.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8jCbkETR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/simdjson/simdjsonimages/logo.png" width="10%"&gt;&lt;/a&gt;&lt;/p&gt;
JSON is everywhere on the Internet. Servers spend a *lot* of time parsing it. We need a fresh
approach. The simdjson library uses commonly available SIMD instructions and microparallel algorithms
to parse JSON 4x  faster than RapidJSON and 25x faster than JSON for Modern C++
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast:&lt;/strong&gt; Over 4x faster than commonly used production-grade JSON parsers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Record Breaking Features:&lt;/strong&gt; Minify JSON  at 6 GB/s, validate UTF-8  at 13 GB/s,  NDJSON at 3.5 GB/s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy:&lt;/strong&gt; First-class, easy to use and carefully documented APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict:&lt;/strong&gt; Full JSON and UTF-8 validation, lossless parsing. Performance with no compromises.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic:&lt;/strong&gt; Selects a CPU-tailored parser at runtime. No configuration needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliable:&lt;/strong&gt; From memory allocation to error handling, simdjson's design avoids surprises.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Peer Reviewed:&lt;/strong&gt; Our research appears in venues like VLDB Journal, Software: Practice and Experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This library is part of the &lt;a href="https://awesomecpp.com" rel="nofollow"&gt;Awesome Modern C++&lt;/a&gt; list.&lt;/p&gt;
&lt;h2&gt;
Table of Contents&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/simdjson/simdjson#quick-start"&gt;Quick&lt;/a&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/simdjson/simdjson"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  💡 Trucs et astuces
&lt;/h2&gt;

&lt;p&gt;Terminons avec ce guide &lt;a href="https://tech.davis-hansson.com/p/make/"&gt;&lt;em&gt;Your Makefiles are wrong&lt;/em&gt;&lt;/a&gt; qui contient différents conseils afin d'améliorer vos Makefile.&lt;/p&gt;

</description>
      <category>newsletter</category>
      <category>french</category>
      <category>backend</category>
      <category>sfeir</category>
    </item>
    <item>
      <title>Back to Back #15 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Wed, 31 Aug 2022 07:14:16 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-15-back-end-news-by-sfeir-4epf</link>
      <guid>https://forem.com/sfeircode/back-to-back-15-back-end-news-by-sfeir-4epf</guid>
      <description>&lt;p&gt;La rentrée est souvent l’occasion de partir sur un nouveau cycle et de faire bouger les choses. Après avoir rechargé les batteries cet été, la newsletter revient avec une nouvelle formule ⚡&lt;/p&gt;

&lt;p&gt;Au menu, vous retrouverez désormais les outils coup de cœur des Sfeiriens et leurs meilleurs trucs et astuces en plus de la sélection d'articles.&lt;/p&gt;




&lt;h2&gt;
  
  
  📰 Articles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://deno.com/blog/changes"&gt;Big Changes Ahead for Deno&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Après avoir annoncé une levée de fonds de 21 millions de dollars en juin, Deno annonce sur son blog de grands changements à venir : une meilleure developer experience, une forte compatibilité avec npm et l’arrivée du serveur web Javascript le plus rapide jamais développé.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://nordicapis.com/what-are-over-fetching-and-under-fetching/"&gt;What Are Over-Fetching and Under-Fetching?&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Deux des problèmes récurrents avec les APIs sont l’over et l’under-fetching. Cet article de Nordic APIs revient sur ces notions et propose des solutions simples pour résoudre ce problème courant.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aaronfrancis.com/2022/mysql-count-star-slow"&gt;Is &lt;code&gt;COUNT(*)&lt;/code&gt; slow in MySQL?&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Réponse courte: Non. Réponse plus longue : L’opération &lt;code&gt;COUNT(*)&lt;/code&gt; est optimisée de telle sorte à calculer le résultat à partir du plus petit index secondaire. Réponse complète : l’article 😁&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Outils
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://jsonvisio.com/"&gt;JSON Visio&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;JSON Visio permet de visualiser des graphes à partir d’objets JSON. On peut enregistrer ces graphes sous forme d’images, on peut également lancer des recherches sur les nœuds. L’outil est disponible sur le web mais aussi en local, en exécutant l’éditeur via Docker.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://k9scli.io/"&gt;K9s&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;K9s est une interface de ligne de commande pour interagir avec des clusters Kubernetes. L'objectif de ce projet est de faciliter la navigation, l'observation et la gestion des applications déployées. &lt;/p&gt;

&lt;h2&gt;
  
  
  💡Trucs et astuces
&lt;/h2&gt;

&lt;p&gt;Voici un script shell qui permet de mettre à jour la branche principale de plusieurs projets git.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;superpull&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="nb"&gt;dir &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt; ~/&lt;span class="k"&gt;*&lt;/span&gt;
    &lt;span class="k"&gt;do
        if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$dir&lt;/span&gt;&lt;span class="s2"&gt;/.git"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;then
            &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$dir&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            git &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="nv"&gt;$dir&lt;/span&gt; checkout &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;git &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="nv"&gt;$dir&lt;/span&gt; branch &lt;span class="nt"&gt;-rl&lt;/span&gt; &lt;span class="s1"&gt;'*/HEAD'&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s1"&gt;'[^/]\+$'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            git &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="nv"&gt;$dir&lt;/span&gt; pull&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;fi
    done&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Le script va regarder dans les dossiers situés dans le répertoire HOME. Pour chaque répertoire, s'il contient un dossier &lt;code&gt;.git&lt;/code&gt; alors un &lt;code&gt;git pull&lt;/code&gt; est effectué sur la branche principale (qui est très souvent &lt;code&gt;master&lt;/code&gt; ou &lt;code&gt;main&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Vous voyez des évolutions à ce script ? N'hésitez pas à poster vos pistes d'améliorations en commentaire 👇&lt;/p&gt;

</description>
      <category>newsletter</category>
      <category>french</category>
      <category>backend</category>
      <category>sfeir</category>
    </item>
    <item>
      <title>Mascotte SFEIR : Pourquoi avoir choisi un axolotl ?</title>
      <dc:creator>Axolotl</dc:creator>
      <pubDate>Thu, 28 Jul 2022 15:05:00 +0000</pubDate>
      <link>https://forem.com/sfeircode/mascotte-sfeir-pourquoi-avoir-choisi-un-axolotl--121n</link>
      <guid>https://forem.com/sfeircode/mascotte-sfeir-pourquoi-avoir-choisi-un-axolotl--121n</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8kPW0JEc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdkt7fprfsc9sytpt1po.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8kPW0JEc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdkt7fprfsc9sytpt1po.png" alt="Image description" width="813" height="455"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;L’axolotl est l’animal totem de SFEIR depuis 2016. Fétiche de l’entreprise, sa bouille bienveillante séduit en interne comme en externe. Mais alors, pourquoi avoir choisi cette créature ? Petit retour sur la genèse de notre mascotte.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Une initiative interne&lt;/strong&gt; &lt;br&gt;
L’idée d’avoir une mascotte pour l’entreprise avait germée quelques temps auparavant. C’est en effet monnaie courante dans notre milieu : DinoChrome, Octocat - GitHub, Docker, Golang, pour n’en citer que quelques unes, font l’unanimité : différents produits à leurs effigies font fureur dans nos locaux, et contribuent à l’écosystème graphiquement très riche dans lequel nous évoluons. Pierre Gosselin, développeur chez SFEIR propose un jour l’idée de l’axolotl, en vantant la proximité de ses propriétés avec nos valeurs. C’est le point de départ de ce qui deviendra plus tard un pan incontournable de l’identité graphique de SFEIR.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La jeunesse éternelle&lt;/strong&gt;&lt;br&gt;
Une des caractéristiques les plus étonnantes de l’Axolotl est sa tendance à maintenir des propriétés juvéniles au stade adulte. Cette capacité à rester jeune se rapproche immédiatement des qualités des développeurs. Un état d’esprit jeune et agile, une soif d’apprentissage intarissable. Tant de traits qui nous poussent à exceller dans un domaine en perpétuel mouvement. Trait illustré par notre concept de SFEIR School, à travers lesquels nous nous formons et avons l’opportunité de former d’autres personnes sur des sujets techniques.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Une capacité d’adaptation hors du commun&lt;/strong&gt;&lt;br&gt;
Une autre singularité de l’Axolotl est sa capacité à s’adapter à son écosystème. Être développeur demande un investissement régulier, tant notre écosystème est soumis aux innovations, et chacun doit s’adapter à ces technologies, susceptibles de devenir obsolètes d’une année sur l’autre. Cette aptitude à accueillir le changement, et à se féliciter d’en faire partie est présente chez SFEIR. Mais s’adapter, ce n’est pas seulement ça. Cela fait également référence à l’empathie client. En effet, nous développons des solutions personnalisées pour les clients, en fonction de leurs besoins mais aussi de leurs métiers, afin de leur proposer une solution unique et pérenne.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La régénération&lt;/strong&gt;&lt;br&gt;
L’Axolotl a la capacité de régénérer certaines parties de son anatomie. Ayant subit des dommages, l’animal a les facultés de guérir. Cette aptitude extraordinaire nous a rappelé l’importance d’apprendre de nos erreurs et de rebondir. Liberté d’entreprendre et responsabilité sont deux valeurs inscrites dans l’ADN de SFEIR, mais cela nécessite la capacité de se remettre en question, la volonté d’itérer pour toujours progresser, et donc une passion et un enthousiasme sans borne pour l’écosystème dans lequel nous évoluons.&lt;/p&gt;

&lt;p&gt;Vous vous reconnaissez dans ces valeurs ? &lt;a href="https://www.sfeir.com/fr/carrieres/"&gt;Rencontrons nous !&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Réflexion et exécution créative&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d_tzsBhL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/at4woff0u0qh5zsfrz2i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d_tzsBhL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/at4woff0u0qh5zsfrz2i.png" alt="Image description" width="813" height="454"&gt;&lt;/a&gt;&lt;br&gt;
Vous pouvez le voir, le design de l’Axolotl a bien changé depuis six ans déjà. Seule sa couleur reste inchangée. Gustavo Zambelli (v1), puis Esper (v2 à aujourd’hui) du collectif Haut en Couleurs ont exécuté avec nous cette transformation. Cette version finale se décline aujourd’hui dans de multiples univers. Chacun peut se l’approprier ou reconnaitre en elle des traits familiers de références pop culture. (Lesquelles selon vous ?)&lt;/p&gt;

&lt;p&gt;La volonté d’impliquer et de se fondre parmi les mascottes des autres technologies était pour nous primordiale, afin d’éclairer immédiatement sur notre corps de métier : vous pouvez le voir sur la v2 de la mascotte. Cette volonté s’est ensuite muée en inspiration, pour donner plus tard nos fresques emblématiques, nos stickers, des impressions 3D, des jeux vidéo et surtout... notre &lt;strong&gt;peluche&lt;/strong&gt; !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wa8pqsIs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rz8693ogzx3ecoegy54.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wa8pqsIs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4rz8693ogzx3ecoegy54.jpg" alt="Image description" width="880" height="1173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Merci à tous les Sfeiriens et Sfeiriennes qui donnent vie à notre mascotte grâce à leurs incroyables talents ! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m9L5QMyR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/srhjwr85eiddr7wiyrva.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m9L5QMyR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/srhjwr85eiddr7wiyrva.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mascotte</category>
      <category>axolotl</category>
      <category>sfeir</category>
      <category>sfeirlife</category>
    </item>
    <item>
      <title>Back to Back #14 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Tue, 28 Jun 2022 17:29:57 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-14-back-end-news-by-sfeir-5h7m</link>
      <guid>https://forem.com/sfeircode/back-to-back-14-back-end-news-by-sfeir-5h7m</guid>
      <description>&lt;p&gt;&lt;em&gt;Comme chaque fin de mois, les experts de SFEIR publient la newsletter back-end. Retrouvez la sélection d'articles sur les microservices, les APIs, les bases de données…&lt;/em&gt; 🕑&lt;/p&gt;




&lt;h3&gt;
  
  
  🔒 &lt;a href="https://hakibenita.com/django-concurrency"&gt;Handling Concurrency Without Locks&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Un des problèmes récurrents lors de développement d’applications est la programmation concurrente. Ajouter des verrous peut résoudre des problèmes mais on peut vite se retrouver avec une baisse des performances ou pire, des deadlocks. En prenant des cas d’usage en Django, &lt;a href="https://twitter.com/be_haki"&gt;Haki Benita&lt;/a&gt; propose dans cet article des astuces pour utiliser un minimum de verrous.&lt;/p&gt;

&lt;h3&gt;
  
  
  📈 &lt;a href="https://blog.postman.com/2022-api-platform-landscape-trends-and-challenges"&gt;The 2022 API Platform Landscape: Trends and Challenges&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://twitter.com/a85"&gt;Abhinav Asthana&lt;/a&gt;, CEO et fondateur de Postman, a publié sur son blog les dernières tendances et les derniers défis ainsi qu'une mise à jour du paysage des plateformes API. L'approche API-first a le vent en poupe !&lt;/p&gt;

&lt;h3&gt;
  
  
  💭 &lt;a href="https://thenewstack.io/best-practices-for-naming-variables-what-the-research-shows/"&gt;Best Practices for Naming Variables: What the Research Shows&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;La linguistique à l’aide de l’informatique. &lt;a href="https://twitter.com/felienne"&gt;Felienne Hermans&lt;/a&gt; a conçu un guide qui, selon elle, "nous aidera à mieux nommer les choses". À l’instar des code smells, les linguistic smells sont des mauvaises pratiques qui peuvent conduire à de mauvaises surprises et qu’il faut éviter. Selon des travaux scientifiques, ces smells augmentent la charge cognitive des développeurs.&lt;/p&gt;

&lt;h3&gt;
  
  
  📁 &lt;a href="https://hackernoon.com/why-env-variables-are-no-good-anymore/"&gt;Why ENV Variables are no Good Anymore&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Il est fortement probable que vous ayez des fichiers .env actuellement sur votre ordinateur. C’est une solution simple et rapide mais qui possède des défauts, notamment en termes de sécurité. &lt;a href="https://twitter.com/pragati_verma18"&gt;Pragati Verma&lt;/a&gt; pense qu’il est l’heure de passer à une nouvelle génération de stockage de variables d’environnement.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☸️ &lt;a href="https://inlets.dev/blog/2022/06/24/fixing-kubectl-port-forward.html"&gt;Fixing the Developer Experience of Kubernetes Port Forwarding&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Finissons cette revue de presse avec &lt;a href="https://twitter.com/alexellisuk"&gt;Alex Ellis&lt;/a&gt; qui nous propose une alternative à la commande &lt;code&gt;kubectl port-forward&lt;/code&gt;. Le port-forwarding est très pratique mais plusieurs inconvénients peuvent gâcher la &lt;em&gt;developer experience&lt;/em&gt; : devoir lancer la commande pour chaque service, retenir quels ports sont déjà pris, devoir relancer la commande en cas de déconnexion…&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Les Sfeiriens se mettent en pause cet été. On se retrouve fin août pour préparer la rentrée !&lt;/em&gt;&lt;/p&gt;

</description>
      <category>newsletter</category>
      <category>french</category>
      <category>backend</category>
    </item>
    <item>
      <title>Smarter conditions with flags and enums</title>
      <dc:creator>Pierre Bouillon</dc:creator>
      <pubDate>Mon, 27 Jun 2022 05:40:05 +0000</pubDate>
      <link>https://forem.com/sfeircode/smarter-conditions-with-flags-and-enums-2io8</link>
      <guid>https://forem.com/sfeircode/smarter-conditions-with-flags-and-enums-2io8</guid>
      <description>&lt;p&gt;Enumeration are commonly used to define a set of mutually exclusive values (ex: colors, days of the week, months, etc.).&lt;/p&gt;

&lt;p&gt;When working with them, we often want to check that a given value is part of a subset of our enumeration. Unfortunately, it may result in verbose conditions or in several of them being quite long and prone to bugs due to their length.&lt;/p&gt;

&lt;p&gt;Hopefully, .NET has a pretty neat feature that can help you having smarter and cleaner conditions in such cases: let's explore it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Use case
&lt;/h2&gt;

&lt;p&gt;For our use case, let's create a &lt;code&gt;DaysOfTheWeek&lt;/code&gt; enum with all of them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Monday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Tuesday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Wednesday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Thursday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Friday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Saturday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Sunday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We then want to compute the price of a given service depending of the day of the week. &lt;/p&gt;

&lt;p&gt;Our algorithm is not very hard but has a couple of conditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the provided day is in the week-end, it is &lt;code&gt;3&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If the provided day is Monday, Tuesday or Friday, it is &lt;code&gt;1&lt;/code&gt; because those are counted as special days by the company&lt;/li&gt;
&lt;li&gt;Otherwise, the price will just be &lt;code&gt;2&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A first implementation of those rules might be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;GetRate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Saturday&lt;/span&gt;
        &lt;span class="p"&gt;||&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Sunday&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Monday&lt;/span&gt;
        &lt;span class="p"&gt;||&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Tuesday&lt;/span&gt;
        &lt;span class="p"&gt;||&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Friday&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are, however, some disadvantages to such algorithm:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The method looks pretty "complicated" for three simple conditions (many ORs and a lot of chars)&lt;/li&gt;
&lt;li&gt;The logic we implemented is not very explicit and having someone looking at the code will certainly result in questions asking how are those days chosen&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introducing the &lt;code&gt;Flags&lt;/code&gt; attribute
&lt;/h2&gt;

&lt;p&gt;With the &lt;code&gt;[Flags]&lt;/code&gt; attribute, we can use our enum values as flags an perform bitwise comparison on them without too much pain&lt;/p&gt;

&lt;p&gt;To do so, we only have to slightly modify our enumeration by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Adding the &lt;code&gt;[Flags]&lt;/code&gt; attribute to it&lt;/li&gt;
&lt;li&gt;Assigning each enumeration constant a power of two so that they will not overlap each other when combining them&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Doing so will result in the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Flags&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Monday&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Tuesday&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Wednesday&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Thursday&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Friday&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Saturday&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Sunday&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By just updating our enumeration, we didn't altered our code and the previous function still works great. However, let's now use our flags for the conditions using the &lt;code&gt;HasFlag&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;GetRate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Saturday&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Sunday&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;HasFlag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Monday&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Tuesday&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Friday&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;HasFlag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is still very verbose and does not solve anything right away but one interesting thing about flags is that we can define values in our enumeration that are a combination of others.&lt;/p&gt;

&lt;p&gt;In our case, by having a dedicated value for the weekend and another one for the special days, we might succeed in improving the overall readability a little bit (pun intended), let's do that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;[Flags]
&lt;span class="p"&gt;public enum DaysOfTheWeek
&lt;/span&gt;{
    Monday    = 1,
    Tuesday   = 2,
    Wednesday = 4,
    Thursday  = 8,
    Friday    = 16,
    Saturday  = 32,
    Sunday    = 64,
&lt;span class="gi"&gt;+   Weekend    = Saturday | Sunday,
+   SpecialDay = Monday | Tuesday | Friday,
&lt;/span&gt;}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By introducing those values, our code is suddenly much straightforward but also self-explanatory as for why there is such conditions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;GetRate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Weekend&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;HasFlag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SpecialDay&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;HasFlag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Take aways
&lt;/h2&gt;

&lt;p&gt;Using flags, we were able to combine several enumeration constants onto a single one to clarify the intent of our algorithm by only slightly altering it&lt;/p&gt;

&lt;p&gt;However, flags might not always be the solution for those problems: if you have only a small subset of constants that you want to check a value against, it might not be worth the complexity&lt;/p&gt;

&lt;p&gt;Similarly, introducing flags to an enumeration that is persisted in a database will require you to update all your previous stored records&lt;/p&gt;

&lt;p&gt;Finally, you should be careful about the powers of two that you are using: a wrong value or an overlapping one might introduce nasty bugs&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As a side note, be very careful when using flags for access rights not to grant anything for the value &lt;code&gt;0&lt;/code&gt; as &lt;code&gt;0.HasFlag(/*anything*/)&lt;/code&gt; will return &lt;code&gt;true&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Additional tip
&lt;/h2&gt;

&lt;p&gt;As a side note, it may be too verbose to write the powers of two yourself. You can use the shift-left operator to let the computer do that for you!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Flags&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;DaysOfTheWeek&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Monday&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 1&lt;/span&gt;
    &lt;span class="n"&gt;Tuesday&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 2&lt;/span&gt;
    &lt;span class="n"&gt;Wednesday&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 4&lt;/span&gt;
    &lt;span class="n"&gt;Thursday&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 8&lt;/span&gt;
    &lt;span class="n"&gt;Friday&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 16&lt;/span&gt;
    &lt;span class="n"&gt;Saturday&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 32&lt;/span&gt;
    &lt;span class="n"&gt;Sunday&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 64&lt;/span&gt;
    &lt;span class="n"&gt;Weekend&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Saturday&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;Sunday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;SpecialDay&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Monday&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;Tuesday&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;Friday&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope that you learned something useful, happy coding!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Back to Back #13 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Wed, 25 May 2022 15:27:34 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-13-back-end-news-by-sfeir-1hbp</link>
      <guid>https://forem.com/sfeircode/back-to-back-13-back-end-news-by-sfeir-1hbp</guid>
      <description>&lt;p&gt;&lt;em&gt;Comme chaque dernier mercredi du mois, les experts de SFEIR publient la newsletter back-end. Retrouvez la sélection d'articles sur les microservices, les APIs, les bases de données…&lt;/em&gt; 🕑&lt;/p&gt;




&lt;h3&gt;
  
  
  🧵 &lt;a href="https://doordash.engineering/2021/11/09/the-beginners-guide-to-kotlin-coroutine-internals/"&gt;The Beginner’s Guide to Kotlin Coroutine Internals&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Cet article est un guide sur les coroutines. Après une présentation du principe des coroutines et de l'ordonnancement, on plonge en profondeur dans la bibliothèque Kotlin jusqu'au bytecode.&lt;/p&gt;

&lt;h3&gt;
  
  
  🆕 &lt;a href="https://betterdatascience.com/python-311-whats-new/"&gt;Top 3 Radical New Features in Python 3.11&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;La version 3.11 de Python n'est pas encore sortie mais nous connaissances déjà les nouveautés grâce aux release candidates. &lt;a href="https://betterdatascience.com/about/"&gt;Dario Radečić&lt;/a&gt; revient sur trois de ces changements.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☕ &lt;a href="https://www.infoq.com/news/2022/05/java-news-roundup-may16-2022/"&gt;Java News Roundup&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Ce bulletin résume les dernières actualités dans l’écosystème Java. Notamment, on y retrouve la sortie de la version 2.7.0 de Spring Boot, des informations sur la JDK 19 en early access ou les hotfixes pour Tomcat.&lt;/p&gt;

&lt;h3&gt;
  
  
  🅱️ &lt;a href="https://hackernoon.com/building-a-wordle-game-using-test-driven-development-in-25-minutes"&gt;Building a Wordle Game Using Test-Driven Development in 25 Minutes&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Pour finir, &lt;a href="https://twitter.com/mcsee1"&gt;Maximiliano Contieri&lt;/a&gt;  nous montre comment l’application du TDD peut aider à développer pas à pas la mécanique d’un jeu comme Wordle. Les cas et les tests s’enchaînent jusqu’à aboutir à une solution valide.&lt;/p&gt;




&lt;h3&gt;
  
  
  🎟️ CFP et événements
&lt;/h3&gt;

&lt;p&gt;Comme chaque mois, retrouvez les &lt;em&gt;calls for papers&lt;/em&gt; ouverts ! C’est le moment de proposer vos talks pour :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/wGVYkl21UFxeiuakhKfu"&gt;Cloud Nord&lt;/a&gt;, CFP ouvert jusqu'au 31/05 &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/CfucIjaXxrZThJE0POR3"&gt;DevFest Nantes&lt;/a&gt;, CFP ouvert jusqu'au 19/06 &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/wgaja45IBdGT4sw4CXDB"&gt;DevFest Strasbourg&lt;/a&gt;, CFP ouvert jusqu'au 30/06&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/Ag6h1yHTsrdzHsPni5o9"&gt;JUG Summer Camp&lt;/a&gt;, CFP ouvert jusqu'au 01/07 &lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;On se retrouve le mois prochain pour partager de nouveau les pépites du back-end.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>newsletter</category>
      <category>french</category>
      <category>cfp</category>
      <category>backend</category>
    </item>
    <item>
      <title>Reduce your tests cognitive complexity with AutoFixture</title>
      <dc:creator>Pierre Bouillon</dc:creator>
      <pubDate>Fri, 20 May 2022 07:47:45 +0000</pubDate>
      <link>https://forem.com/sfeircode/reduce-your-tests-cognitive-complexity-with-autofixture-2dm4</link>
      <guid>https://forem.com/sfeircode/reduce-your-tests-cognitive-complexity-with-autofixture-2dm4</guid>
      <description>&lt;p&gt;When unit testing your components, you may often be in a situation when you must provide several parameters but only one is relevant. &lt;/p&gt;

&lt;p&gt;Ensuring that your test is still readable and not bloated by the setup of those variables may be quite a challenge but hopefully no more with &lt;a href="https://github.com/AutoFixture/AutoFixture/" rel="noopener noreferrer"&gt;AutoFixture&lt;/a&gt;, let's see how!&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to, you can make the same manipulations as I am doing, like a small hands on lab on AutoFixture. If not, you may skip this chapter and head directly to the case study.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The setup here is really minimal, just create a new test project. I'll be using &lt;a href="https://xunit.net/" rel="noopener noreferrer"&gt;xUnit&lt;/a&gt; but &lt;a href="https://nunit.org/" rel="noopener noreferrer"&gt;NUnit&lt;/a&gt; should be fine too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~&lt;span class="nv"&gt;$ &lt;/span&gt;dotnet new xunit &lt;span class="nt"&gt;-o&lt;/span&gt; AutoFixtureExample
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now open your new project in an editor of your choice and delete the generated &lt;code&gt;UnitTest1.cs&lt;/code&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case study
&lt;/h2&gt;

&lt;p&gt;For us to understand why AutoFixture might be an asset in your projects, we will work on a simple case study: considering a warehouse and an order for clothes, we want to either confirm or refuse to process the order.&lt;/p&gt;

&lt;p&gt;In a new file &lt;code&gt;Warehouse.cs&lt;/code&gt;, let's first add our entities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Warehouse.cs&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;Cloth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Cloth&lt;/span&gt; &lt;span class="n"&gt;cloth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;UnitsOrdered&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;Discount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Warehouse&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, append our simple ordering validation inside the &lt;code&gt;Warhouse&lt;/code&gt; class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Warehouse.cs&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="nf"&gt;IsValid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UnitsOrdered&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Some more checks on the stocks&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have our logic, we can test it in a new &lt;code&gt;WarehouseTest.cs&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// WarehouseTest.cs&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;WarehouseTest&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Fact&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;OrderingWithAnInvalidUnitsCount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Cloth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"sweat"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Warehouse&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;IsValid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;Assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;False&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may now ensure that our test is passing by running the tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some problem
&lt;/h2&gt;

&lt;p&gt;Our test may pass but it may not be as well written as we would like.&lt;/p&gt;

&lt;h3&gt;
  
  
  Readability and intent
&lt;/h3&gt;

&lt;p&gt;Let's tackle the first issue here which might be readability.&lt;/p&gt;

&lt;p&gt;In our example, the test is fairly simple but a newcomer on the project might not know what the &lt;code&gt;-1&lt;/code&gt; really means, and maybe not that the kind of cloth we are creating here is irrelevant.&lt;/p&gt;

&lt;p&gt;We may want to clarify it by naming our variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;// WarhouseTest.cs
&lt;span class="p"&gt;public class WarehouseTest
&lt;/span&gt;{
    [Fact]
    public void OrderingWithAnInvalidUnitsCount()
    {
&lt;span class="gd"&gt;-       var order = new Order(new Cloth("sweat"), -1, 0);
&lt;/span&gt;&lt;span class="gi"&gt;+       var invalidUnitsCount = -1;
+       var cloth = new Cloth("This does not matter for the test");
+       var irrelevantDiscount = 0;
+       var order = new Order(cloth, invalidUnitsCount, irrelevantDiscount);
&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;        var result = new Warehouse().IsValid(order);
&lt;span class="err"&gt;
&lt;/span&gt;        Assert.False(result);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Variables that are purposely created to indicate that they does not matter are also sometimes referred as &lt;a href="https://docs.microsoft.com/en-us/archive/blogs/ploeh/anonymous-variables" rel="noopener noreferrer"&gt;&lt;em&gt;anonymous variables&lt;/em&gt;&lt;/a&gt; in AutoFixture.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's now a bit more verbose but the intent of the test is clearer and might help someone new to grasp what the parameters are for.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Notice that strings can hold their intents (ex: &lt;code&gt;"My value does not matter"&lt;/code&gt;) but other types may not such as int, double, etc. That's why we had to name our variable holding the discount with this explicit name.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Surviving refactoring
&lt;/h3&gt;

&lt;p&gt;Another issue that you may face is the classes used in your tests evolving.&lt;/p&gt;

&lt;p&gt;Let's say that our &lt;code&gt;Cloth&lt;/code&gt; class now also contains its marketing date, we will have to update our test in consequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;// Warehouse.cs
&lt;span class="gd"&gt;- public record Cloth(string Name);
&lt;/span&gt;&lt;span class="gi"&gt;+ public record Cloth(string Name, DateTime MarketingDate);
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;// WarehouseTest.cs
&lt;span class="p"&gt;public class WarehouseTest
&lt;/span&gt;{
    [Fact]
    public void OrderingWithAnInvalidUnitsCount()
    {
        var invalidUnitsCount = -1;
&lt;span class="gd"&gt;-       var cloth = new Cloth("This does not matter for the test");
&lt;/span&gt;&lt;span class="gi"&gt;+       var cloth = new Cloth("This does not matter for the test", DateTime.Now);
&lt;/span&gt;        var irrelevantDiscount = 0;
        var order = new Order(cloth, invalidUnitsCount, irrelevantDiscount);
&lt;span class="err"&gt;
&lt;/span&gt;        var result = new Warehouse().IsValid(order);
&lt;span class="err"&gt;
&lt;/span&gt;        Assert.False(result);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Having this change already impacted our test even with our example that is minimal. If we had more tests or objects using &lt;code&gt;Cloth&lt;/code&gt; we would have a lot more refactoring to do.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You may also notice that we are passing &lt;code&gt;DateTime.Now&lt;/code&gt; here, which is yet not very readable regarding its intent.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Introducing AutoFixture
&lt;/h2&gt;

&lt;p&gt;Our test is slowly getting more and more bloated with those initialization and may be even more if either of our classes evolve.&lt;/p&gt;

&lt;p&gt;Hopefully, using &lt;a href="https://github.com/AutoFixture/AutoFixture/" rel="noopener noreferrer"&gt;AutoFixture&lt;/a&gt;, we can greatly simplify it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/AutoFixture/AutoFixture/" rel="noopener noreferrer"&gt;AutoFixture&lt;/a&gt; is a NuGet that can generate variables that can be seen as explicitly not significant.&lt;/p&gt;

&lt;p&gt;Having a glance at their README, it appears that it is exactly what we would need:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AutoFixture is designed to make Test-Driven Development more productive and unit tests more refactoring-safe. It does so by removing the need for hand-coding anonymous variables as part of a test's Fixture Setup phase.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's add AutoFixture and see what's changing !&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;~/AutoFixtureExample&lt;span class="nv"&gt;$ &lt;/span&gt;dotnet add package AutoFixture
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// WarehouseTest.cs&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;WarehouseTest&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;IFixture&lt;/span&gt; &lt;span class="n"&gt;Fixture&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Fixture&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Fact&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;OrderingWithAnInvalidUnitsCount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;invalidUnitsCount&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;cloth&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Fixture&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Cloth&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;discount&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Fixture&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cloth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;invalidUnitsCount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;discount&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Warehouse&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;IsValid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;Assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;False&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's a &lt;em&gt;little&lt;/em&gt; bit better since now we do not have to specify which value is relevant and which one is not. However, the test is still pretty long and we can take advantage of AutoFixture's builder to create our order in an even more straightforward way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;// WarehouseTest.cs
&lt;span class="p"&gt;public class WarehouseTest
&lt;/span&gt;{
    private static readonly IFixture Fixture = new Fixture();
&lt;span class="err"&gt;
&lt;/span&gt;    [Fact]
    public void OrderingWithAnInvalidUnitsCount()
    {
&lt;span class="gd"&gt;-       var invalidUnitsCount = -1;
-       var cloth = Fixture.Create&amp;lt;Cloth&amp;gt;();
-       var discount = Fixture.Create&amp;lt;double&amp;gt;();
-       var order = new Order(cloth, invalidUnitsCount, discount);
&lt;/span&gt;&lt;span class="gi"&gt;+       var order = Fixture.Build&amp;lt;Order&amp;gt;()
+           .With(order =&amp;gt; order.UnitsOrdered, -1)
+           .Create();
&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;        var result = new Warehouse().IsValid(order);
&lt;span class="err"&gt;
&lt;/span&gt;        Assert.False(result);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We now have a test where only the variable that matters is explicitly set and that does not need to be modified if any class changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Take aways
&lt;/h2&gt;

&lt;p&gt;Using AutoFixture, we have greatly improved our test's readability and clarify its intents while also ensuring that it will not break whenever a class's definition changes.&lt;/p&gt;

&lt;p&gt;Of course there is much more to learn about this library, such as how to customize the objects generations, creating sequences and more and for that you can refer to their GitHub and the associated &lt;a href="https://github.com/AutoFixture/AutoFixture/wiki/Cheat-Sheet" rel="noopener noreferrer"&gt;cheat sheet&lt;/a&gt; that can be a good starting point for using AutoFixture.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>testing</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Back to Back #12 - Back-end news by SFEIR</title>
      <dc:creator>Alexandre Moevi</dc:creator>
      <pubDate>Tue, 26 Apr 2022 18:16:13 +0000</pubDate>
      <link>https://forem.com/sfeircode/back-to-back-12-back-end-news-by-sfeir-1kji</link>
      <guid>https://forem.com/sfeircode/back-to-back-12-back-end-news-by-sfeir-1kji</guid>
      <description>&lt;p&gt;&lt;em&gt;C'est l'heure de retrouver le meilleur du back-end, la sélection aux petits oignons par les experts de SFEIR.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✨ &lt;a href="https://dzone.com/articles/types-may-finally-be-coming-to-javascript"&gt;Types May Finally Be Coming to JavaScript&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Jusqu’à présent, Javascript a toujours été un langage non typé, mais une proposition a récemment été faite pour ajouter la possibilité de typer nativement en Javascript. Cet article vous décrit ce que cela pourrait apporter au langage par la suite.&lt;/p&gt;

&lt;h3&gt;
  
  
  📈 &lt;a href="https://nordicapis.com/5-api-trends-to-look-forward-to-in-2022/"&gt;5 API Trends to Look Forward to in 2022&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Le domaine des API est en constante évolution. Les API sont utilisées de manière nouvelle et passionnante en permanence, ce qui signifie qu'il y a toujours des tendances émergentes à surveiller. Voici cinq des principales tendances en matière d'API à surveiller en 2022 !&lt;/p&gt;

&lt;h3&gt;
  
  
  👃 &lt;a href="https://caseysoftware.com/blog/api-design-smells"&gt;API Design Smells&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Dans cet article, Keith Casey nous partage ses 20 ans d'expérience dans la conception d'API et nous explique comment reconnaître certains anti-patterns qui à terme rendent compliquée la maintenance de nos API.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌳 &lt;a href="https://www.infoq.com/news/2022/04/climate-change-software-engineer/"&gt;How Software Affects Climate Change, and What Software Engineers Can Do about It&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Le secteur numérique a un impact non négligeable sur l’environnement. Cet article met en avant l’impact des datacenters et ce que les ingénieur.e.s peuvent faire lorsqu’ils conçoivent leurs logiciels pour diminuer leur consommation en énergie.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Si ce sujet vous intéresse, SFEIR organise un événement en ligne le 12 mai autour du Green IT. Inscrivez-vous à cette adresse&lt;/em&gt; 👉 &lt;strong&gt;&lt;a href="https://www.sfeir.com/fr/green-it-responsabilite-et-sobriete-numerique/"&gt;https://www.sfeir.com/fr/green-it-responsabilite-et-sobriete-numerique/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🎟️ CFP et événements
&lt;/h3&gt;

&lt;p&gt;Plusieurs évènements tech ont annoncé leur retour en 2022 et leurs &lt;em&gt;calls for papers&lt;/em&gt; sont ouverts ! C’est le moment de proposer vos talks pour :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/txK7ihjaAR4LtuJyYZCx"&gt;Cloud Ouest&lt;/a&gt;, CFP ouvert jusqu'au 30/04 &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/8Wu147xoRDKQSjGcawoY"&gt;Volcamp&lt;/a&gt;, CFP ouvert jusqu'au 13/05 &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/wGVYkl21UFxeiuakhKfu"&gt;Cloud Nord&lt;/a&gt;, CFP ouvert jusqu'au 31/05 &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://conference-hall.io/public/event/CfucIjaXxrZThJE0POR3"&gt;DevFest Nantes&lt;/a&gt;, CFP ouvert jusqu'au 19/06 &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🏫 SFEIR Schools
&lt;/h3&gt;

&lt;p&gt;Profitez de formations gratuites dans nos agences SFEIR :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.sfeir.com/fr/sfeir-school-nantes-cypress-tdd-for-the-win/"&gt;Cypress : TDD for the win !&lt;/a&gt;, le 05/05 à Nantes&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sfeir.com/fr/sfeir-school-lille-github-actions/"&gt;GitHub Actions&lt;/a&gt;, le 13/05 à Lille&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sfeir.com/fr/sfeir-school-luxembourg-spring-security/"&gt;Spring security&lt;/a&gt;, le 24/05 à Luxembourg&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sfeir.com/fr/sfeir-school-bordeaux-github-actions/"&gt;GitHub Actions&lt;/a&gt;, le 31/05 à Bordeaux&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;C’en est fini de la revue de presse ! On se revoit le mois prochain.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>newsletter</category>
      <category>french</category>
      <category>backend</category>
      <category>cfp</category>
    </item>
    <item>
      <title>Revue de Presse Cloud #4</title>
      <dc:creator>Gregory Kieffer</dc:creator>
      <pubDate>Fri, 15 Apr 2022 09:21:09 +0000</pubDate>
      <link>https://forem.com/sfeircode/revue-de-presse-cloud-4-4f7</link>
      <guid>https://forem.com/sfeircode/revue-de-presse-cloud-4-4f7</guid>
      <description>&lt;p&gt;Le comité Cloud de SFEIR s’est réuni pour vous préparer leur revue de presse mensuelle ! &lt;/p&gt;

&lt;p&gt;Nous vous avons sélectionné les articles et news à ne pas louper ces dernières semaines dans l’univers Cloud &lt;/p&gt;

&lt;p&gt;Bonne lecture ! &lt;/p&gt;




&lt;h2&gt;
  
  
  Google Cloud
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://cloud.google.com/blog/products/devops-sre/easy-managed-prometheus-metrics-service-for-kubernetes"&gt;Google Cloud Managed Service for Prometheus is now generally available&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;C'est toujours plus pratique avec les services managés : voilà le tour de prometheus d'avoir une version managé. Outil incontournable du monitoring.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://cloud.google.com/blog/topics/developers-practitioners/demystifying-event-filters-eventarc"&gt;Demystifying event filters in Eventarc&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Comment mettre en place event arc avec Cloud Run point par point, avec quelques exemples. Event arc est un outil bien pratique quand on veut mettre en place des workflow basés sur sur une architecture event driven&lt;/p&gt;

&lt;h2&gt;
  
  
  Microsoft Azure
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.blueboxes.co.uk/how-to-separate-production-test-and-development-resources-in-azure"&gt;How to Separate Production, Test and Development Resources in Azure&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Un guide pour bien organiser la ségrégation de ses environnements dans Azure&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://blog.filador.fr/retour-dexperience-sur-la-certification-aws-certified-solutions-architect-professional/"&gt;Retour d'expérience sur la certification AWS Certified Solutions Architect – Professional&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Romain Boulanger, Sfeirien à Paris a obtenu la certification AWS Certified Solutions Architect - Professional le mois dernier. 🥳&lt;br&gt;
L'examen le plus dur qu'il a eu à passer... 🤯&lt;br&gt;
Il était donc indispensable pour lui de vous partager son retour d'expérience et ses astuces pour être le plus efficace possible lors de l'examen. 🚀&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://aws.amazon.com/blogs/developer/build-and-deploy-a-microsoft-net-core-web-api-application-to-aws-app-runner-using-cloudformation/"&gt;Build and Deploy a Microsoft .NET Core Web API application to AWS App Runner using CloudFormation&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Toutes les applications .net n'aboutissent pas sur Azure... Comment déployer une application .net sur AWS App Runner avec CloiudFormation&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Summit Paris - 12 avril
&lt;/h3&gt;

&lt;p&gt;Pour la toute première fois, SFEIR sera présent aux côtés d'Amazon Web Services (AWS) lors de la prochaine édition de l'#AWSSummit2022 le 12 avril à Paris ! 🤩Venez à la rencontre de Martin REGENT, notre Alliance Manager et Olivier B., notre Cloud Architect expert AWS sur notre stand (emplacement B22) de 9h30 à 18h !&lt;br&gt;
Inscrivez-vous vite ⬇️&lt;br&gt;
&lt;a href="https://bit.ly/3wX06PU"&gt;https://bit.ly/3wX06PU&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Other
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.blog/2022-03-23-an-update-on-recent-service-disruptions/"&gt;An update on recent service disruptions&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Github a rencontré ces derniers temps des problèmes de disponibilités, et communique clairement sur ces problèmes d'architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://blog.cloudflare.com/api-gateway/"&gt;Announcing the Cloudflare API Gateway&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Cloudflare présente sa nouvelle offre d'API Gateway, pour gérer, protéger, monitorer ses endpoints API.&lt;/p&gt;




&lt;h2&gt;
  
  
  SFEIR Institute - Cloud
&lt;/h2&gt;

&lt;p&gt;SFEIR Institute fournit aux entreprises des solutions de formation sur les technologies de pointe. Tous les mois, le comité Cloud met en avant l’une de ses SFEIR Institute.&lt;/p&gt;

&lt;p&gt;Ce mois-ci, nous vous proposons cette formation gratuite d’une journée sur les Fondamentaux Google Cloud -&amp;gt; Big Data et Machine Learning&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.sfeir.com/fr/formation-gratuite-google-cloud-fundamentals-big-data-ml/"&gt;Inscriptions et infos ici 👉 &lt;br&gt;
https://www.sfeir.com/fr/formation-gratuite-google-cloud-fundamentals-big-data-ml/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  CFP et évènements en France
&lt;/h3&gt;

&lt;p&gt;Plusieurs évènements tech ont annoncé leur retour en 2022 et leurs Call for Paper sont ouverts ! &lt;/p&gt;

&lt;p&gt;C’est le moment de proposer vos talks -&amp;gt;&lt;br&gt;
👉 Voxxed Days&lt;br&gt;
👉 DevFest Nantes&lt;br&gt;
👉 Cloud Nord&lt;/p&gt;




&lt;p&gt;Antoine Méausoone&lt;br&gt;
Grégory Kieffer&lt;br&gt;
Romain Boulanger&lt;/p&gt;




&lt;p&gt;Merci à la communauté Cloud de SFEIR pour cette revue de presse !&lt;/p&gt;

&lt;p&gt;A bientôt pour de nouvelles actus !&lt;/p&gt;

</description>
      <category>sfeir</category>
      <category>aws</category>
      <category>azure</category>
      <category>gcp</category>
    </item>
  </channel>
</rss>
