<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Blog Buddyweb - Agence Digitale à Paris - Medium]]></title>
        <description><![CDATA[Agence Digitale Buddyweb @Paris - Medium]]></description>
        <link>https://medium.com/les-forgerons?source=rss----eea0d01accad---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Blog Buddyweb - Agence Digitale à Paris - Medium</title>
            <link>https://medium.com/les-forgerons?source=rss----eea0d01accad---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:44:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/les-forgerons" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Can we achieve fair betting games through blockchain technology ?]]></title>
            <link>https://medium.com/les-forgerons/can-we-achieve-fair-betting-games-through-blockchain-technology-16174908a892?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/16174908a892</guid>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[betting]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Fri, 10 May 2019 15:04:07 GMT</pubDate>
            <atom:updated>2018-06-26T06:41:32.995Z</atom:updated>
            <content:encoded><![CDATA[<p># Non-technical paper</p><p>Betting is a juicy business, but mostly for the casino. Even in sports betting, which requires a lot of strategy, very few people can bet for a living. The house always wins because they are keeping some of the money. Inevitably, bettors end up loosing.</p><blockquote>Can the blockchain change this ?</blockquote><p>The blockchain is a technology that empowers communities by cutting middle-men and bottlenecks in many configurations.</p><p>In this paper, we will demonstrate how we can make “fair bets” using two key features of the blockchain : <strong>crypto-currencies</strong> and <strong>smart contracts</strong>.</p><p>With this explanation comes a functional proof-of-concept (POC) : the <a href="http://betdemocracy.org/">betdemocracy.org</a> sports betting platform. Why sports betting ? Sports betting is huge on the internet and bookmaker margins are up to 10 times bigger that in any other betting types.</p><h4>What is a “fair game” ?</h4><p>A fair game is a game where the rules are not favorable to a specific side. Let’s say that two players play heads or tails for 1 € each throw, and get 2 € in case of win. In the long term, they will almost finish in the position they started in. We can say that this game is fair.</p><p>If players get rewarded 1,80 € per win by a middle-man (the coin-thrower), they will both finish broke soon if they keep playing. That game is not fair and it’s more or less what happends in casino games like black jack or roulette.</p><h4>Real life case</h4><p>In our example, we will use <a href="https://thefootytipster.com/1x2-betting/">1X2 soccer bets</a> on the World Cup 2018 in Russia. In this kind of game, you can bet for the 3 possible outcomes : a home team win, an away team win or a draw. As stronger teams have more chances to win, each of the 3 outcomes has a specific odd. In other words, you will get a bigger reward if you betted for the underdog than if you betted for the favorite. Let’s have a look to the odds for France X Peru in one of the major betting sites in the world (odds are almost similar in all platforms).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zZrOiwvXkPJa_S0nwDsD4w.png" /><figcaption>Odds for France X Peru soccer game. Fractional and moneyline odds are calculated from decimal values.</figcaption></figure><p>The total exceeds 100 %. This represents a bookmaker margin of 5,01%, which is not bad, margins are usually between 5% and 15% in those bets.</p><p>Now, let’s compare it with a “perfect” situation where the bookmaker doesn’t take any margin :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aNzrvVB6L18DmlULv0o_AA.png" /><figcaption>We estimate odds with cross-multiplication. Fractional and moneyline odds are calculated from decimal values, rounded to 0.01.</figcaption></figure><p>As you can see, all odds are better without the bookmaker margin. You may think that 5% doesn’t count very much, but it’s a huge difference. Have a look of <a href="https://www.bettingexpert.com/">betting experts’ yields on this website</a> and you will struggle to find a pro better with a ROI &gt; 5% .</p><h4>How can we get rid of bookmaker margin ?</h4><p>To get rid of the bookmaker margin, <strong>we have to get rid of the bookmaker itself</strong>. That is where the blockchain can help us.</p><p>A blockchain is a network were the power is decentralized and shared to the whole network. Our choice for this project is the <a href="https://ethereum.org/">Ethereum blockchain</a> for many reasons :</p><ul><li>It’s the 2nd biggest in <a href="https://coinmarketcap.com/">market cap</a> (right after Bitcoin), so many people own Ethers, its crypto-currency</li><li>Unlike Bitcoin, it support smart contracts. There is a well-documented language for those contracts : <a href="http://solidity.readthedocs.io/en/v0.4.24/">Solidity</a></li><li>There is a strong community and there is many projects on top of it</li></ul><p>Ethereum acts like a single universal computer where you can add pieces of code : smart contracts. A smart contract is like a<strong> digital contract between one or several entities</strong>. It also acts like a wallet as it can receive and store money. Our smart contract will store opponents’ bets safely and return the money back to the winner.</p><h4>Betting against each other</h4><p>At this point there is a big difference: in betting sites, you always play against the house. The casino takes all bets.</p><p>Without casino, you have to play against someone betting for the exact opposite. For “France X Peru”, if you bet for a “France win”, you need someone betting for a “Peru win or draw” and agree on the odds and the stake. With that said, we are clear that we must have <strong>a platform to connect people</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X9VNPLRsmxWmT0CRgXB7Fg.png" /></figure><p>To keep it simple, we look for one person to complete the player’s bet using double-chance bets (like “Peru win or draw”). It can work with more opponents : a “draw” bettor and a “Peru win” bettor. We also can have several players that join their stake to meet opponents requirements. But let’s keep it simple for now.</p><p>Indeed, our proof-of-concept is like a marketplace, but we can imagine an automated platform like an exchange it the future.</p><h4>The cost of the bet</h4><p>Let’s be clear : at the time we are writing this, crypto-currency transactions and smart contract execution require (small) fees. We will not achieve a “perfect” fair bet because the cost is not zero BUT we will consider that a bet is fair if the cost is ≤ 0,01 % of the total stake.</p><p>To make that number more visual, imagine that you bet for the 3 possible outcomes of a game (just for the example). It means that just one bet per match would be correct. In traditional betting sites, your initial stake will reduce by more than half <strong>after 14 games.</strong> With what we consider a fair game, you need to do the same for<strong> 6931 games</strong> to see your stake reduce to half of what it was. It is a ridiculously high amount of games so we can agree that the bet is “fair”.</p><p>In blockchains, fees are not based in the amount of money that is sent, but on the <strong>computation power</strong> that is needed to process the transaction. It means that fees are fixed costs. The higher the stake, the lower the cost in percentage.</p><p>Based on previous transactions on Bet Democracy, we found out that the average bet needs around 35 000 gas to be processed. In Ethereum, gas is the basic unit for computing power. The more complicated the function you call, the more gas you spend. And, of course, you have to pay your gas : )</p><p>You can choose the price you pay to skip the line or save money (or somewhere in the middle). In this example, we are using the <a href="https://ethgasstation.info/">SafeLow gas price of 1 gwei</a>, it’s the lowest price then ensures you that the transaction will be validated for sure. As this is a non-technical paper I don’t want to enter too much into details, but another paper will be created with more explanations.</p><p>At today’s rate of 1 ETH = 401,49 €, the price of the bet is 0,15 € divided by the bettors. Let’s make a chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOz-IcQLpmmhGknj4Isr0g.png" /><figcaption>Bet cost in percentage based on total stake in Euros (logarithmic scale).</figcaption></figure><p>There is 2 important points in this chart :</p><ul><li>At <strong>3 € of bet total stake</strong> (your stake plus your opponent’s), the bet is cheaper than in almost all betting sites (&lt; 5%).</li><li>At <strong>935 € of bet total stake</strong>, the fees are equal to 0.01 % and we consider it a “fair bet”.</li></ul><h4>Conclusion</h4><p>With this paper and the Bet Democracy platform example, we proved that we can <strong>achieve a virtually “fair game” in Sports betting</strong>.</p><p>We strongly believe that we can decrease the gas needed by optimizating the smart contract to lower that 935 € “fair bet” step. In addition to that, as blockchain technology quickly improves, transaction prices are lowering. Transactions are already free in many blockchains.</p><p>So, <strong>YES</strong>, blockchains can provide “fair bets” and <strong>YES</strong> it is probably going to disrupt the betting industry. Blockchain betting enables many possibilities, especially everything about reducing costs, bet trading and anymousity.</p><p>Of course, there is some obstacles : crypto-currencies are not yet widely used by bettors and people need to gain confidence in blockchains. Security can be a big deal too, as we already saw smart contracts being robbed by hackers. But we are really confident about the fact that there is a bright future for <strong>blockchain betting</strong>.</p><p>If you read until this point, we recommend that you have a look at the POC version of <a href="https://betdemocracy.org/">Bet Democracy</a> that enables bets with dummy-money (Ropsten Ethers). Make sure to have the MetaMask extension on your browser.</p><p>Our plan is to build a fully functional version on the main Ethereum network with real money. <strong>We are looking for funding, sponsoring and anything that can help us achieve our goal.</strong> If you are interested, write us at <a href="/service/mailto:hello@betdemocracy.org">hello@betdemocracy.org</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16174908a892" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/can-we-achieve-fair-betting-games-through-blockchain-technology-16174908a892">Can we achieve fair betting games through blockchain technology ?</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutoriel : Créer une application basique avec Angular]]></title>
            <link>https://medium.com/les-forgerons/tutoriel-cr%C3%A9er-une-application-basique-avec-angular-81eb816bbe5d?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/81eb816bbe5d</guid>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Fri, 10 May 2019 15:03:38 GMT</pubDate>
            <atom:updated>2019-05-10T15:03:26.322Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutoriel : Créer une app basique avec Angular</h3><p>Dans ce tutoriel nous allons créer une application concrète de A à Z avec Angular. La<a href="https://angular.io/docs"> documentation officielle</a> est bien faite, mais on a souvent besoin de voir des examples concrets pour avancer.</p><p>Nous allons donc <strong>partir de zéro</strong> pour créer une application pragmatique qui va afficher des résultats de matchs de foot (c’est un exemple, la même méthode peut nous aider à récupérer n’importe quelle donnée). Nous irons chercher ces résultats sur une API externe et les afficherons dans notre app. Voici donc les différentes étapes:</p><ol><li>Installer Angular</li><li>Configuration SCSS</li><li>Installation kit UI</li><li>Création des composants</li><li>Routing</li><li>Création des services</li><li>Interfaces</li><li>Appels HTTP</li><li>Affichage des variables dans les templates</li></ol><p><em>Info: </em><a href="https://github.com/brunobuddy/angular-basic-app"><em>Le code source de l’application est disponible ici</em></a><em>. Cet article est le résumé des 2 vidéos suivantes :</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcNAchoTqzDg%3Fstart%3D1%26feature%3Doembed%26start%3D1&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcNAchoTqzDg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcNAchoTqzDg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a5e49f9f807871a7e326760858153a4/href">https://medium.com/media/5a5e49f9f807871a7e326760858153a4/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FzdqrR17f30U%3Fstart%3D275%26feature%3Doembed%26start%3D275&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DzdqrR17f30U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FzdqrR17f30U%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8d86e751f7a2c184933f1bbf39b07c0/href">https://medium.com/media/e8d86e751f7a2c184933f1bbf39b07c0/href</a></iframe><h3>Installer Angular</h3><p>Pour créer un nouveau projet Angular, vous avez besoin de la <a href="https://cli.angular.io/">CLI d’Angular</a> et de <a href="https://nodejs.org/en/">NodeJS</a>.<strong> CLI</strong> signifie Command Line Interface, c’est un outil qui vous permettra de taper des commandes commençant par <em>“ng”</em> sur votre terminal.</p><p>Une fois ces dépendances téléchargées, tapez dans votre terminal :</p><pre>ng new angular-tutorial</pre><p>Ce qui va créer un nouveau dossier à votre emplacement actuel et installer un projet Angular dedans. Cela va prendre quelque temps à s’installer, puis vous pouvez vérifier en servant l’app :</p><pre>cd angular-tutorial<br>ng serve</pre><p>Et en allant sur <a href="http://localhost:4200.">http://localhost:4200</a> avec votre navigateur. Vous devriez maintenant voir un gros logo Angular. Tout va bien pour l’instant.</p><h3>Configuration SCSS sur Angular</h3><p>Par défaut les fiches de style sont en <em>.css</em> sur Angular. Si on veut passer à <a href="https://sass-lang.com/">SASS</a> par défaut (je vous le recommande), il faut modifier les paramètres du fichier <a href="https://github.com/brunobuddy/angular-basic-app/blob/master/angular.json"><em>angular.json</em></a><em> :</em></p><pre>&quot;schematics&quot;: {        <br>  &quot;@schematics/angular:component&quot;: {          <br>    &quot;styleext&quot;: &quot;scss&quot;        <br>  }<br>}</pre><p>A partir de maintenant, lorsque vous allez créer un composant, sa fiche de style sera par défaut en SCSS. Il me semble que la même configuration permet de faire la même chose pour du <a href="http://lesscss.org/">LESS</a>.</p><h3>Installer un kit UI (framework CSS) sur Angular</h3><p>Dans notre example nous allons utiliser un kit UI très puissant et très simple qui s’appelle <a href="https://bulma.io/">Bulma</a>. Installons le avec une commande NPM. Dans le terminal à la racine du projet faites :</p><pre>npm i bulma --save</pre><p>Angular prône <a href="https://medium.com/@simonb90/comprendre-la-viewencapsulation-dans-un-component-angular-83decae8f092">une philosophie d’encapsulation de ses composants</a>, y compris pour le style. Ce principe permet d’éviter que vos déclarations “débordent” des composants, par exemple vous pouvez appeler un élément “title” sur chacun de vos composants et lui donner des propriétés différentes sans qu’elles se superposent. Chaque composant contient sont “title” et ses définitions qui se limitent à lui-même. Chacun chez soi, tout le monde est content.</p><p>Ceci est très bien et très utile, surtout sur les grosses apps, mais nous voulons faire une seule exception à la règle pour que notre kit impacte tous les composants avec un style par défaut. Chaque composant pourra ensuite ajouter ou surcharger ces propriétés avec des déclarations spécifiques et limitées à lui-même.</p><p>Nous allons donc retirer l’encapsulation du <a href="https://github.com/brunobuddy/angular-basic-app/blob/master/src/app/app.component.ts">composant principal</a> et de faire un lien vers une nouvelle feuille de style qui importe notre kit :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pmwgwmR8JMUFeRV6100IMQ.png" /><figcaption>Utilisation de la propriété “encapsulation” du décorateur @Composant</figcaption></figure><p>Dans cet example, on a crée un fichier main.scss dans /assets/styles. Ce fichier ne comprend qu’une ligne qui importe notre kit Bulma :</p><pre>@import &#39;../../../node_modules/bulma/bulma&#39;;</pre><p>Et voilà, en retournant sur notre page d’accueil on doit déjà voir que le style à légèrement changé (typo plus ronde et couleur plus grisées). On avance !</p><h3>Création de composants</h3><p>Créons un composant pour le header afin de diviser nos templates :</p><pre>ng g c partials/header</pre><p>La commande “generate component” (abrégée “g c”) va créer un composant header que nous allons pouvoir appeler dans app.component.html avec la balise app-header.</p><pre>&lt;app-header&gt;&lt;/app-header&gt;</pre><p>Il est possible d’en faire de même pour le footer ou d’autres éléments de l’app. Il vaut mieux beaucoup de petits fichiers qu’un seul gros fichier.</p><h3>Routes et URLs dans Angular</h3><p>Maintenant nous allons créer 2 vues différentes : MatchList et MatchDetail pour afficher respectivement la liste des matches et le détail d’un match</p><pre>ng g c resources/matches/match-detail<br>ng g c resources/matches/match-list</pre><p>Et nous allons créer un nouveau fichier <a href="https://github.com/brunobuddy/angular-basic-app/blob/master/src/app/app.routes.ts">app.routes</a> dans /app avec le contenu suivant :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AAh-93-ZCnSY99FmOI0Qpw.png" /><figcaption>app.routes.ts</figcaption></figure><p>Puis l’importer dans app.module.ts avec appRoutes en paramètre de forRoot :</p><pre>imports: [BrowserModule, RouterModule.forRoot(appRoutes)]</pre><p>Pour finir, il nous faut ajouter une balise dans le HTML (app.component.html) qui va nous indiquer ce qui va changer en changeant de route :</p><pre>&lt;app-header&gt;&lt;/app-header&gt; <br>&lt;router-outlet&gt;&lt;/router-outlet&gt; <br>&lt;p&gt;FOOTER&lt;/p&gt;</pre><p>Dans cet example, le header et le &lt;p&gt; footer vont rester là tandis que le contenu de &lt;router-outlet&gt; sera remplacé par le contenu de nos composants si la route change.</p><h3>Créer des services HTTP dans Angular</h3><p>Pour cette étape nous allons utiliser <a href="https://bridge.buddyweb.fr/">un outil gratuit nommé Bridge</a>, qui va nous permettre de créer des APIs en JSON depuis un tableau CSV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o4wWMNlujX9xz99b437P-A.png" /><figcaption>Vision de Postman</figcaption></figure><p>L’API est ouverte est accessible à l’URL :<br>- <a href="https://bridge.buddyweb.fr/api/tutorials/matches">https://bridge.buddyweb.fr/api/tutorials/matches</a> pour la liste des matchs<br>- <a href="https://bridge.buddyweb.fr/api/tutorials/matches">https://bridge.buddyweb.fr/api/tutorials/matches</a>/1 pour le détail</p><p>Nous allons donc créer un service qui va récupérer ces données là.</p><pre>ng g s common/services/match</pre><p>Et nous voilà avec un MatchService.</p><h3>Interfaces</h3><p>Les interfaces sont <a href="https://www.typescriptlang.org/docs/handbook/interfaces.html">une fonctionnalité de TypeScript</a> qui va nous permettre de définir précisément ce qu’on va recevoir, en l’occurrence un “match”. Qu’est ce qu’un match ? Pour notre application nous allons définir ce concept en créant une interface Match dans un fichier <a href="https://github.com/brunobuddy/angular-basic-app/blob/master/src/app/common/interfaces/match.ts">match.ts</a> :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R2s9OKLovTg8OzsXD9rlHQ.png" /><figcaption>L’interface Match détaille les différentes propriétés d’un Match.</figcaption></figure><h3>Appels HTTP depuis les services Angular</h3><p>Maintenant que nous savons quel type de données nous allons recevoir et l’URL à laquelle nous allons les recevoir, il ne manque plus qu’à passer l’appel. Commençons par doter notre service de 2 fonctions, une pour récupérer la liste de matchs (sans paramètres), et l’autre qui va récupérer un seul match en fonction de son ID.</p><p>Tout d’abord nous avons besoin d’ajouter le HttpClientModule dans app.module.ts, nous avions déjà touché cette ligne pour ajouter les routes :</p><pre>imports: [BrowserModule, RouterModule.forRoot(appRoutes), HttpClientModule],</pre><p>Voici le service avec nos 2 fonctions :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CWOsaH7Nv_-9ndlGZvLybw.png" /><figcaption>La fonction list() retourne un Observable qui se résout en array de Match tandis que la fonction show(id) renvoie un Observable qui se résout par un Match unique.</figcaption></figure><p>Les outils sont prêts, il ne reste plus qu’à s’en servir. Utilisons la fonction <em>ngOnInit()</em> pour lancer notre requête HTTP instantanément en arrivant sur la MatchList :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yJFHsrYCy1IyzYWAO5szQ.png" /><figcaption>NgOnInit() nous permet de charger la liste des Matchs et de la stocker dans la propriété matches de MatchListComponent.</figcaption></figure><p><a href="https://github.com/brunobuddy/angular-basic-app/blob/master/src/app/resources/matches/match-detail/match-detail.component.ts">Même combat pour la MatchDetail</a>, avec cette fois-ci une différence: le paramètre “id” sera récupéré directement depuis l’URL grâce à ActivatedRoute.</p><p>Pour tester les 2 réponses, il suffit de se rendre sur l’url <a href="http://localhost:4200/">http://localhost:4200</a> et sur <a href="http://localhost:4200/matches/1">http://localhost:4200/matches/1</a> par exemple. Ensuite regarder si l’appel HTML a bien été réalisé dans la console/DevTools de votre navigateur.</p><h3>Afficher les variables dans les templates</h3><p>Et le plus facile pour la fin ! Une fois les matches disponibles, il suffit de les appeler en utilisant la double accolade, ainsi que <a href="https://angular.io/guide/displaying-data">les directives Angular nécessaires comme *ngFor ou *ngIf</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryirO2tJnSuUG42R6--a1g.png" /><figcaption>match-list-component.html</figcaption></figure><p>Je vous laisse faire de même (ou mieux que moi) pour le <a href="https://github.com/brunobuddy/angular-basic-app/blob/master/src/app/resources/matches/match-detail/match-detail.component.html">match-detail-comonent.html</a></p><h3>Conclusion</h3><p>Nous avons parcouru beaucoup de chemin depuis l’installation de Angular ! Ces fonctionnalités sont basiques et utilisées dans la plupart des projets Angular.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81eb816bbe5d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/tutoriel-cr%C3%A9er-une-application-basique-avec-angular-81eb816bbe5d">Tutoriel : Créer une application basique avec Angular</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mettre les Cookies de Google Analytics en Conformité avec le RGPD]]></title>
            <link>https://medium.com/les-forgerons/mettre-les-cookies-de-google-analytics-en-conformit%C3%A9-avec-le-rgpd-21b6bcf7b5c9?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/21b6bcf7b5c9</guid>
            <category><![CDATA[rgpd]]></category>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[google-analytics]]></category>
            <category><![CDATA[cookies]]></category>
            <category><![CDATA[gdpr]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Fri, 03 May 2019 09:02:16 GMT</pubDate>
            <atom:updated>2019-05-03T09:01:08.308Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*ZKCh64R-xu7CNm17qpSa2Q.png" /><figcaption>Le visiteur n’a pas la possibilité de refuser les cookies sur cet exemple.</figcaption></figure><p>Le <strong>RGPD (ou GDPR) </strong>réglemente l’utilisation des données personnelles dans l’ère du digital. Si vous avez<strong> un site web avec Google Analytics</strong>, vous êtes concernés. En effet, Analytics envoie <strong>des cookies</strong> et conserve <strong>des données considérées comme personnelles</strong> (les adresses IP).</p><p>Nous allons donc réaliser 2 actions pour mettre Google Analytics en conformité avec le RGPD :</p><ul><li>Rendre les adresses IP anonymes (rapide)</li><li>N’installer des cookies que chez les visiteurs qui les acceptent (long)</li></ul><p>On voit souvent des <strong>bandeaux cookie </strong>qui indiquent simplement que le site web utilise des cookies, comme sur l’image ci-dessus. <strong>Ceci n’est pas suffisant</strong> car on installe instantanément des cookies sur le navigateur du visiteur alors qu’il n’a pas encore lu le bandeau.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*xrO_ajrtJfNsiZMTA6jehw.jpeg" /></figure><p>Avouons-le: le RGPD est long à comprendre et à mettre en place<em>.</em> C’est un grand pas avant pour la privacité et les utilisateurs, mais il oblige les petites et moyennes organisations a prendre des mesures souvent chères et pénibles pour leur taille. Je vous conseille vivement de <a href="https://www.economie.gouv.fr/entreprises/reglement-general-sur-protection-des-donnees-rgpd">comprendre le sens général du RGPD</a> et <a href="https://www.cnil.fr/fr/site-web-cookies-et-autres-traceurs">son application sur les cookies</a> avant d’aller plus loin.</p><h3>Le déroulement</h3><p>Nous allons mettre en place le processus suivant :</p><blockquote>On demande au visiteur s’il accepte les cookies, puis on lui envoie s’il accepte. S’il avait déjà accepté auparavant, on ne lui demande plus.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*cy3MB4EGoUx8YfF8gaT8XQ.png" /></figure><p>Nota Bene : L’utilisateur ne peut pas refuser “une fois pour toutes” de recevoir des cookies pour les sessions suivantes. En effet, dans ce cas il faudrait lui envoyer un cookie pour garder en mémoire le fait qu’il refuse les cookies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*banrIKxflsbXqcKh.jpg" /></figure><p>Voici donc les ingrédients de la recette :</p><ul><li><a href="https://marketingplatform.google.com/about/analytics/">Google Analytics</a> (bien sûr)</li><li><a href="https://www.google.com/intl/fr_fr/tagmanager/">Google Tag Manager</a></li><li>Du Javascript (sous n’importe quelle forme)</li></ul><p><em>Si vous ne pouvez pas effectuer ces opérations, </em><a href="https://buddyweb.fr/"><em>l’agence Buddyweb</em></a><em> réalise des mises en conformités RGPD.</em></p><h3>1 . Configuration de Google Tag Manager</h3><p><a href="https://tagmanager.google.com/">Google Tag Manager</a> (ou GTM) est un outil qui permet de gérer les balises tierces sur votre site web. Aujourd’hui, il y a une balise pour tout : <em>Facebook, Twitter, LinkedIn, Google Analytics, Adwords, Hotjar…</em> Au début ça va, on ajoute le script dans le code source, mais cela peut s’entasser au bout d’un moment. De plus, chaque configuration impose de modifier ce code et peut entrainer un nouveau déploiement.</p><p>GTM dispose d’une interface de type CMS qui permet de configurer chaque balise, ses paramètres et quand et comment elle se déclenche. Lançons-nous dans l’aventure !</p><h4>A) Créer la variable accept_cookies</h4><p>Une fois votre compte créé (copiez les 2 snippets de code GTM pour plus tard), commençons par créer directement une variable <strong>accept_cookies</strong> (en snake_case comme il est convention pour les cookies) à partir de l’onglet “variables”. Ceci permettra à GTM de lire le cookie <strong>accept_cookies</strong> sur le navigateur de l’utilisateur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tlt4JviLpobY-Jg2htl1sQ.png" /></figure><h4>B) Créer le déclencheur “Accept Cookies Button Click”</h4><p>Etant donné que nous allons lancer (ou re-lancer) Analytics à l’acceptation des cookies, nous allons créer <strong>un déclencheur customisé</strong>. Il sera relié au bouton “J’accepte les cookies” sur notre site web et exécutera le code des balises au clic sur ce bouton. On peut créer un déclencheur directement dans l’onglet “Déclencheurs”. Pour la propriété “Click ID”, choisissez “accept-cookies”, ce sera l’ID de notre bouton HTML.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jUIOvOzVhn8kiXB_-dBdmg.png" /></figure><h4>C) Créer la balise qui active/désactive le tracking Google Analytics</h4><p>Nous allons créer un script qui va aller voir si le cookie <strong>accept_cookies</strong> est présent chez l’utilisateur et faire un <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out">User Opt-Out</a> si ce n’est pas le cas.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b59c7391ba2152b203cf5df32e05741/href">https://medium.com/media/4b59c7391ba2152b203cf5df32e05741/href</a></iframe><p>Cette balise sera reliée à 2 déclencheurs :</p><ul><li><strong>All pages :</strong> Se déclenche à l’arrivée sur une page</li><li><strong>Accept Cookies Button Click :</strong> Prendre en compte l’acceptation de cookies au click sur le bouton “j’accepte les cookies”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2fCFoRHUc6uj9C5G-UzXg.png" /><figcaption>Image de création de la balise HTML avec le script d’activation de Google Analytics en fonction du cookie “accept_cookies”</figcaption></figure><h4>D) Créer la balise Google Analytics et configurer son déclenchement</h4><p>La 2ème balise que nous allons créer est celle de <strong>Google Analytics</strong>. Pour cela sélectionnez “Google Analytics — Universal Analytics” comme <em>Type de balise</em> et ajoutez votre ID de suivi (<em>UA-XXXXXXXX-XX</em>) après avoir coché la case <em>Autoriser le remplacement des paramètres dans cette balise</em>.</p><p>Reliez-la aux 2 mêmes déclencheurs et réglez le séquençage de la balise pour qu’elle se déclenche <strong>APRES</strong> l’autre balise (très important). En effet, nous voulons que GA se lance après que la balise précédente ait activé le tracking lors du click sur le bouton “accepter les cookies”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cMJsRxRUJAAavFLYtOlc0Q.png" /><figcaption>Vue d’ensemble de la configuration de Google Analytics sur Google Tag Manager</figcaption></figure><p>Profitez-en pour définir le champ <strong>anonymizeIp</strong> <strong>à true </strong>comme sur l’image ci-dessous.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*pgnNMFOGvMlqw6xn5fkh2A.png" /><figcaption>AnonymizeIp doit être à “true” pour être RGPD-compliant car de ce fait, les informations stockées ne sont pas reliées à un IP identifiable</figcaption></figure><h3>2 . Configuration du front-end (site web)</h3><p>Une fois notre gestion de balises réalisée, place au travail sur le site web. Nous devons le connecter avec GTM et demander aux utilisateurs s’ils acceptent les cookies avec un<strong> bandeau cookie RGPD</strong>.</p><h4>A) Ajouter le script GTM</h4><p>Il y a 2 scripts en réalité : un dans le &lt;head&gt; et l’autre dans le &lt;body&gt;. On peut les retrouver dans <em>Admin &gt; Installer Google Tag Manager</em>. Les 2 scripts doivent être accessibles depuis toutes les pages.</p><h4>B) Créer un bandeau cookie (ou cookie modal)</h4><p>A partir d’ici, la méthode diffère en fonction du framework ou de la technologie utilisée. Ceci-dit, la logique reste la même :</p><ul><li>A l’arrivée sur le site : vérifier si l’utilisateur a le cookie <strong>accept_cookies</strong>. Si ce n’est pas le cas, on affiche notre bandeau RGPD.</li><li>Dans notre bandeau, un bouton “accept-cookies” déclenche une fonction qui ajoutera le cookie accept_cookies et qui fermera le bandeau.</li></ul><p>Pour ma part j’utilise <strong>Angular</strong> et <a href="https://www.npmjs.com/package/ngx-cookie-service">ngx-cookie-service</a>, mais vous pouvez faire de même avec <strong>React, Vue, jQuery </strong>ou d’autres. Voici la template de la modal ainsi que le composant :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14322562a1d4c8bd89bea91697acda39/href">https://medium.com/media/14322562a1d4c8bd89bea91697acda39/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/44d3727144acd7a73817396ff87387df/href">https://medium.com/media/44d3727144acd7a73817396ff87387df/href</a></iframe><h3>3 . Tester avec la prévisualisation de Tag Manager</h3><p>Google Tag Manager offre la possibilité de prévisualiser les modifications avant de les publier. Pour cela je vous conseille d’utiliser Google Chrome et d’ouvrir un nouvel onglet dans la même fenêtre avec votre site web. Vous pourrez ensuite tester le fonctionnement et valider le comportement suivant:</p><h4>A la 1ère arrivée sur le site :</h4><ul><li>Aucun cookie ne s’enregistre sur le navigateur</li><li>La cookie modal s’affiche</li></ul><h4>Au click sur “accepter les cookies”</h4><ul><li>Le cookie “accept_cookies” et les cookies de Google Analytics s’enregistrent sur el navigateur</li><li>La cookie modal disparaît</li></ul><h4>Lors d’une suivante visite après acceptation (recharger la page)</h4><ul><li>Les cookies sont toujours là</li><li>La cookie modal n’apparait pas</li></ul><h4>Lors d’une suivante visite SANS acceptation des cookies</h4><ul><li>Pareil qu’à la 1ère arrivée sur le site</li></ul><p><em>Attention ! Pensez à effacer vos cookies avant de commencer et d’actualiser les cookies à chaque changement (bouton “refresh” en haut de la liste du devTools).</em></p><p>Si les tests sont concluants, vous n’avez qu’à <strong>publier vos modifications sur GTM </strong>et sur votre front-end pour passer en production. Si l’appel de <em>gtm.js</em> renvoie une erreur 404, c’est que les modifications n’ont pas été correctement publiées.</p><h3>Conclusion : Une utilisation de cookies Google Analytics conformes au RGPD</h3><p>Grâce à cette méthode nous avons réussi à <strong>envoyer des cookies uniquement aux visiteurs qui les ont acceptés</strong>. La différence avec un bandeau strictement informatif “<em>ce site utilise des cookies</em>” est importante car le visiteur a le choix de les accepter ou non.</p><p>De plus, l’IP du visiteur ne sera pas conservé en tant que tel, mais transformé pour devenir anonyme. En effet, l’adresse IP “en clair” permet l’identification d‘une personne et relève donc des données personnelles. Le RGPD vous obligerait donc à prendre en compte tout un tas de trucs supplémentaires.</p><p>Et voilà pour la plupart ! Par contre si vous envoyez à Google Analytics des données personnelles (identifiants, valeurs de formulaires, etc.), il vous faudra bien évidemment vous mettre en accord avec le RGPD sur ce point là aussi.</p><p>Bon courage !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21b6bcf7b5c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/mettre-les-cookies-de-google-analytics-en-conformit%C3%A9-avec-le-rgpd-21b6bcf7b5c9">Mettre les Cookies de Google Analytics en Conformité avec le RGPD</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Human Developer is Better Than a Wizard]]></title>
            <link>https://medium.com/les-forgerons/a-human-developer-is-better-than-a-wizard-565bef09e391?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/565bef09e391</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[digital-project-manager]]></category>
            <category><![CDATA[webmaster]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[developer-relations]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Tue, 19 Feb 2019 08:55:32 GMT</pubDate>
            <atom:updated>2019-02-19T08:55:31.925Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*rkhUk69PoyQ7nDJJAHcTvg.png" /></figure><p>Like many of you, I grew up watching hackers in movies. I was really thrilled to see those hacking scenes in the late-90’s and 2000s movies. The hackers were some kind of modern-era super heroes. This image shaped the way people perceived the job of developers. It actually made people believe that that those movie-hackers had the requirements to be good developers.</p><p>Nowadays, to build a website or a platform, we have plenty of diverse profiles, skills and sensitivities collaborating together. But before the digital labour got divided, there was a single person doing everything such as server monitoring, UX design and even comment moderation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*OtodkA6X85Qe1x8yAJurbg.gif" /></figure><p>That “<a href="https://en.wikipedia.org/wiki/Webmaster">webmaster</a>” had indeed <strong>a lot of responsabilities</strong> back then. Even more than you think, as most people didn’t get anything about computers at that time. They needed someone to do what seemed magic for them: They needed a wizard, and in response to that, developers acted like wizards.</p><h3>You don’t need to be a wizard anymore</h3><p>Many things changed <a href="https://www.warnerbros.com/archive/spacejam/movie/jam.htm">since that era</a>, one thing in particular : <strong>developers are not alone anymore</strong>. They came out of the cave to sit on nice office chairs. They became a valuable and acknowledge part of a workforce, and their non-technical pairs can now understand most of their concepts because they are daily IT users too. <strong>Magic became craft</strong>, and it’s a good thing.</p><p>The most important change is that a large part of the developers work in team. Working in a team <strong>means a lot of things</strong>. First of all, you cannot be an a**hole anymore. You owe respect to all of your teammates and you must develop a new set of skills : Discipline, communication, empathy and pedagogy. None of those are tech-related skills.</p><p>In my 10-year developer experience, I met and worked with many of those so-called wizards or geniuses. Speaking loudly technical terms, making you feel bad if you don’t know this or that technology. In my junior years, I was really impressed by them. I often felt ashamed, because, as a developer, I thought I should have understood them but I didn’t get a word of their jargon.</p><p>But you know what ? That’s bullshit. Our job is to make complex things easy, not the opposite. I say that for junior developers like I was at that time, and for anyone impressed by their speeches.</p><h3>Let’s make it easy instead !</h3><p>Ok, let’s face it : Our job is not that difficult. <strong>Very few developers</strong> are working on really hard-to-grab concepts. Most of us, including myself, are basically <strong>sending, receiving and manipulating data</strong>. I am not saying this in a bad way, the point is that those concepts are mainly understandable. Don’t you think we should be able to talk about them simply with non-tech savvy people ?</p><p>There was a time where computing was not for everybody. The tools were rudimentary (if they even existed), there was a lot of calculation involved and you needed a lot of will to make anything work as you wanted. But right now ? Day-to-day there is not that much to invent or to hack. We need people who think clearly.</p><p>In order to remove that sticky wizard-hacker prejudice, we need to change the perception of our job. It starts with changing ourselves : <strong>to communicate inclusively and understand that we are now part of a production chain</strong>.</p><p>Code katas for example (coding exercices) or coding contests are overrated in my opinion. Of course it’s a good way to learn code and have fun, but companies should not overlook that point : A developer that understand the business value and respects the job frame is way more profitable than a developer that can find all prime numbers in one (illegible) line of code.</p><h3>Or… let’s be a part-time wizard</h3><p>If you are a developer and reading this post, you are wandering since when developing became that boring, I can tell you : Since it pays good.</p><p>Coding as a job is not an adventure in the wild, it’s full of methodology, meetings, explaining yourself, testing and many more boring stuff. But it is still super fun to do. And in addition to that, you still can be a wizard in your free time and have a lot of experimental side-projects in obscure languages !</p><p>That’s it ! What do you think about the evolution of the job of a developer ? What are the qualities that you think a developer should have or not have ? I would be glad to see your opinion (for devs AND non-devs) in the comments :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=565bef09e391" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/a-human-developer-is-better-than-a-wizard-565bef09e391">A Human Developer is Better Than a Wizard</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS overscroll-behavior : Contrôlez le scroll de vos interfaces.]]></title>
            <link>https://medium.com/les-forgerons/css-overscroll-behavior-contr%C3%B4lez-le-scroll-de-vos-interfaces-d8754f0e68a6?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/d8754f0e68a6</guid>
            <category><![CDATA[css-grid]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[css-modules]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[skills]]></category>
            <dc:creator><![CDATA[Sebastien Conejo]]></dc:creator>
            <pubDate>Tue, 30 Oct 2018 13:20:15 GMT</pubDate>
            <atom:updated>2018-10-30T13:18:06.778Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9SEJ7ugH_X0JA-QO4bDiA.jpeg" /></figure><h3>CSS overscroll-behavior : Contrôlez le scroll de vos interfaces.</h3><p>Overscroll-behavior est une propriété CSS qui permet de contrôler le comportement par défaut du navigateur lorsqu’on dépasse une zone de scroll.</p><h3>Contexte</h3><h4><em>Le Scroll-chaining</em></h4><p>L’interaction de certains éléments lorsqu’on scroll sur une application web ou mobile peut paraitre intuitive. Et pourtant, il faut parfois surcharger le comportement proposé par le navigateur pour obtenir le résultat attendu.</p><p>Prenons l’exemple d’une modale qui s’ouvre par dessus un article. Il faut scroller dans cette modale pour pouvoir lire tout son contenu.</p><p>Par défaut, si on scroll en dépassant la limite de défilement de ce contenu, alors la page sous-jacente défilera sous la modale.</p><p>On appelle ça le <strong>scroll-Chaining.</strong></p><p>Dans notre cas, ce comportement est gênant car, après la fermeture de la modale, on ne se retrouve plus au même endroit sur notre article.</p><h4>Le pull-to refresh</h4><p>Un autre exemple est celui du pull-to-refresh. Certains navigateurs mobile proposent de rafraichir du contenu en défilant jusqu’en haut ou en bas d’une page.</p><p>Dans certains cas, cet effet n’est pas souhaité. Il est alors nécessaire de le désactiver pour avoir un comportement intuitif.</p><h3><strong>Introduction de overscroll-behavior.</strong></h3><p>overscroll-behavior permet de contrôler le comportement de ce qui se produit lorsque vous faites défiler un conteneur.</p><p>Il peut être utiliser pour annuler le scroll-chaining ou le pull-to-refresh. Cette propriété n’a aucun impact négatif sur la performance.</p><h4>Les valeurs de la propriété</h4><p><strong>auto</strong> Le dépassement de la zone de défilement se déroule normalement. C’est la valeur initiale.</p><p><strong>contain</strong> Le défilement a un comportement normal sur l’élément concerné. Les éléments sous-jacents ne sont pas impactés par ce défilement.</p><p><strong>none</strong> Même chose que contain, les effets de défilement sont aussi évités à l&#39;intérieur de l’élément.</p><p>La propriété est un raccourci de overscroll-behavior-x et overscroll-behavior-y. Elle est définie par l’une de ces valeurs pour l’axe x puis y.</p><p>Si une seule valeur est indiquée, alors elle s’applique à la foie pour x et y.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*BcZNVHIbHcXzycXSh9cynQ.png" /></figure><p>Overscroll-behavior est une propriété non héritée. La spécification est consultable sur <a href="https://wicg.github.io/overscroll-behavior/"><strong>le Github du WICG</strong></a>.</p><h3><strong>Mise en pratique</strong></h3><p>Dans notre cas, on affiche une modale ouverte par dessus un article. Cette modale a suffisamment de contenu pour être scrollable.</p><p>Si je scroll dans la modale en dépassant sa limite de défilement, le comportement par défaut sera d’appliquer un scroll à l’élément qui est en arrière-plan. A savoir, l’article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*mTRAF18NjfB2rBFjpnwUwg.gif" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fsebconejo%2Fembed%2Fpreview%2FxyNYqe%3Fheight%3D600%26slug-hash%3DxyNYqe%26default-tabs%3Dhtml%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;url=https%3A%2F%2Fcodepen.io%2Fsebconejo%2Fpen%2FxyNYqe&amp;image=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fm.cdpn.io%2Fscreenshot-coming-soon-small.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/0791b64dbf83f7f5e6f4d4f75ab1af06/href">https://medium.com/media/0791b64dbf83f7f5e6f4d4f75ab1af06/href</a></iframe><p>Nous ne voulons pas appliquer cet effet. Notre souhait est d’empêcher le scroll sur l’article pendant que la modale est ouverte. Tout ça, sans utiliser javascript.</p><p>Pour cela on utilise overscroll-behavior-y: contain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*-NMzCw-IYyQXg_sRDRVMwA.gif" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fsebconejo%2Fembed%2Fpreview%2FbmOaxM%3Fheight%3D600%26slug-hash%3DbmOaxM%26default-tabs%3Dhtml%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;url=https%3A%2F%2Fcodepen.io%2Fsebconejo%2Fpen%2FbmOaxM&amp;image=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fi.cdpn.io%2F1938378.bmOaxM.small.539de181-573b-4c0f-9780-e3b348f733cf.png&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1f442b10b2266ac9b0eebe2c9c140b8/href">https://medium.com/media/d1f442b10b2266ac9b0eebe2c9c140b8/href</a></iframe><p>Vous pouvez tester l’impact de cette propriété sur l’utilisation du scroll en activant et désactivant la valeur “contain” de la modale <a href="https://codepen.io/sebconejo/pen/VEqprj"><strong>sur ce pen</strong></a>.</p><h4>Compatibilité navigateurs</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z9_jZ1NM3gGIYMl6rR7aKg.png" /></figure><p>Plus d’informations sur la compatiblité sur <a href="https://caniuse.com/#feat=css-overscroll-behavior">CanIuse</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8754f0e68a6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/css-overscroll-behavior-contr%C3%B4lez-le-scroll-de-vos-interfaces-d8754f0e68a6">CSS overscroll-behavior : Contrôlez le scroll de vos interfaces.</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Easiest NodeJS Scraper — with Instant Facebook Notification]]></title>
            <link>https://medium.com/les-forgerons/the-easiest-nodejs-scraper-with-instant-facebook-notification-b1213205ba68?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/b1213205ba68</guid>
            <category><![CDATA[scraper]]></category>
            <category><![CDATA[puppeteer]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[scraping]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Mon, 17 Sep 2018 08:36:10 GMT</pubDate>
            <atom:updated>2018-09-17T12:49:59.101Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hc_Z8jIsiBo9_CxUhqn1nw.jpeg" /></figure><p>Just 67 lines of code to get notified instantaneously on each change for cheap flights, hot deals, new products, or any list of items.</p><h3>Intro</h3><p>In this tutorial, we are going build a script that visits a webpage every 5 minutes and sends a Facebook message if there is a new item. Nice, isn’t it ? In our example, <a href="https://www.voyagespirates.fr/tag/erreur-de-pri">the page we are scrapping</a> displays super-cheap flights with a “price mistake” : Those deals disappear very quickly, that’s why we want to know it right away ! NB: The page is in French, but there is no need to read it.</p><p>If you are busy, just get the <a href="https://github.com/brunobuddy/cheap-flights-scrapper">Github repo of the cheap flights scraper</a>. For everybody else, let’s go together on this journey step by step :</p><pre>mkdir my-scrapper<br>cd my-scrapper</pre><p>Nice ! We just created a folder and <em>cd</em> into it.</p><h3>Scrap</h3><p>Let’s start with the main feature : <strong>scrap a website with NodeJs</strong>. We will use <a href="https://github.com/GoogleChrome/puppeteer">Puppeteer</a>, let’s say that it’s a version of Google Chrome without the window to view it. As we don’t need to <em>see</em> the website but just to extract data from it, it fits perfectly for our scraper.</p><pre>npm init // Creates a package.json file<br>npm i puppeteer --save // &quot;i&quot; stands for install</pre><p>Puppeteer is super easy to use. Let’s create a file called <em>main.js</em> and start working. <a href="https://blog.buddyweb.fr/my-way-from-webstorm-to-vs-code-and-other-things-in-a-developers-life-fe71f0d07c59">I am using VS Code</a>, but you can use any editor you want. That code below takes a screenshot of our page and stores it as <em>example.png </em>in the root folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JyY0YlEfPIG4j-I3TcMaDg.png" /></figure><p>Let’s execute it :</p><pre> node main.js</pre><p>Ok, this one was easy, but make sure that the image was generated. What we want to do now is to find a <strong>list of items</strong> in this page. We are using <a href="https://www.w3schools.com/cssref/css_selectors.asp">selectors</a> to fetch this list. Let get only the item titles, there is no need to get images and texts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FHGe_vYKnotdVcwJJiL9ZQ.png" /><figcaption>Extract of the source code of the page. Notice the structure : &lt;h2&gt; tag directly followed by a &lt;a&gt; tag, that is what we want !</figcaption></figure><p>The selector to get all the titles is <strong><em>h2 &gt; a</em></strong> that means <em>“all the &lt;a&gt; tags that have an &lt;h2&gt; tag as direct parent”</em>. Let’s try to <em>console.log</em> it to check if you have the right content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UslMXETj06LenKPQ109yEg.png" /><figcaption>In line 9 we are using innerText instead of innerHTML because we don’t want to be disturbed by HTML symbols</figcaption></figure><p>If you execute the file again (<em>node main.js</em>), you should receive an output in your terminal that lists all the items. Before going further, be sure that this output corresponds only to the items of the list, and that it’s the text you want. You may need to add a class selector like “<em>a.item-title</em>” to make it work</p><h3>Compare and store</h3><p>Once we have that data, we need to compare it with a previous extract. If the data changed, we send a message.</p><p>So how are we going to store the data : SQLite ? MongoDB ? MySQL ? No, This is not the fanciest NodeJs scraper, it’s the easiest NodeJs scraper ! Let’s be cheap and play for time, we are going to store it in a JSON file :)</p><p>One more thing, we don’t need to get all the items, but only the last one published, witch is actually the first one to appear in the page (on a feed-like system).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aigTmNkmy1lwhW-EG4L0MA.png" /></figure><p>Let’s add “fs” to read and write files. Don’t forget to “require” it on top of the file.</p><pre>npm i fs --save</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*89puExdIfPP40OhGPadEUg.png" /></figure><p>Ok, things are going a bit faster here. First we read a file called “previous-deal.json”. If the text in it is similar to the last deal from the website, we do nothing and stop the script.</p><p>If it’s empty or different, we update the JSON and we follow the script. Notice that we are using a try/catch structure because an error is thrown if the file does not exist, and we don’t want the program to stop.</p><p>You can try to execute the script again several times, eventually changing the content of the JSON file to trick the script and let it believe that the data changed.</p><h3>Send Facebook Messenger notification</h3><p>Now that we know if things changed, we need to send a notification to the recipients. We are using Facebook for that : it’s instantaneous, free, and easy to implement.</p><p>Once again, we will take a shortcut and we will NOT create a chatbot and manage tons of ids, authorizations and tokens. Instead, we will use an <a href="https://github.com/Schmavery/facebook-chat-api">unofficial small library</a> that allows to send messages as someone for whom you have the credentials. In order to keep our credentials and personal data safe, we will use <a href="https://github.com/motdotla/dotenv">dotenv</a> too.</p><pre>npm i facebook-chat-api dotenv --save</pre><p>Let’s create a “.env” file with our sensitive data. This file remains private and will not be added to the version control system (git). You cannot send a message to yourself on Facebook so we need a sender account with login credentials (SENDER_USERNAME and SENDER_PASSWORD) and recipient accounts (Facebook IDs only)</p><p>Each Facebook account has an ID that you can find easily with <a href="https://findmyfbid.com/">this website</a>. You will need to get the ID of each one of the recipients and add them in the double-quote string in the RECIPIENTS environment variable (see code below, replace the “recipientX” by the ID).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vLWC5zygc734fqKT74pM0g.png" /><figcaption>Create a .env file and add your data. Recipient Facebook IDs should be coma separated because we are going to <a href="https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/String/split">split()</a> that string later</figcaption></figure><p>For the sender account, if you are a hacker you probably have that old account that you made some time ago. If not, just create a new one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knHeHLyav1pvZsl26GAe3Q.png" /></figure><h3>Repeat every 5 minutes</h3><p>We will use a CRON job to run the script regularly :</p><pre>npm i node-cron express --save</pre><p>We use <a href="https://www.npmjs.com/package/node-cron">node-cron</a> to schedule tasks and expressjs to keep listening.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*GRLqjSlfMuugSHRAQKN8qw.png" /><figcaption>The code in line 3 will be executed every 5 minutes</figcaption></figure><p>You just need to replace the <em>console.log</em> in line 13 by your code. Have a look at the <a href="https://github.com/brunobuddy/cheap-flights-scrapper/blob/master/main.js">final version here</a>.</p><h3>Deploy</h3><p>Now that your Node js scraper is ready, you need to deploy it on a server that will always be available. I will not enter too much in detail as this part will be different based on your solution, whereas you use <a href="https://www.heroku.com/">Heroku</a>, <a href="https://zeit.co/now">Now</a>, or another cloud service.</p><p>I use personally <a href="https://www.digitalocean.com/">Digital Ocean</a> servers with Ubuntu and had to install some libraries in order to run Puppeteer :(</p><p>That’s it ! Please let me know how it worked out for you. Let me know too if you know how we can make this scraper even simpler.</p><p><a href="https://github.com/brunobuddy/cheap-flights-scrapper">brunobuddy/cheap-flights-scrapper</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1213205ba68" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/the-easiest-nodejs-scraper-with-instant-facebook-notification-b1213205ba68">The Easiest NodeJS Scraper — with Instant Facebook Notification</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ma sélection de ressources UX pour trouver l’inspiration]]></title>
            <link>https://medium.com/les-forgerons/ma-s%C3%A9lection-de-ressources-ux-pour-trouver-linspiration-a90ebc67d66f?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/a90ebc67d66f</guid>
            <category><![CDATA[outil]]></category>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[design-resources]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Sebastien Conejo]]></dc:creator>
            <pubDate>Sun, 12 Aug 2018 18:04:03 GMT</pubDate>
            <atom:updated>2018-08-12T15:05:52.549Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ywKyxYISuTmcZrYgVj9Y-g.png" /></figure><p>On me demande souvent oú trouver de l’inspiration, que ce soit pour définir une typo, des couleurs ou une mise en page. Il existe des centaines de ressources UX, des portfolios aux outils de présentation en passant par des librairies de composants. Je liste ici une sélection de ressources que nous utilisons à l’agence.</p><h4><strong>Outils</strong></h4><p><a href="http://diytoolkit.org/tools/">http://diytoolkit.org/tools/</a> : C’est une boîte à outils très complète. Les outils sélectionnés sont bien documentés.</p><h4><strong>Inspiration</strong></h4><p><a href="https://www.awwwards.com/">https://www.awwwards.com/</a> : On ne le présente plus je pense. C’est la plateforme que j’utilise le plus pour m’inspirer des dernières tendances.</p><p><a href="https://thefwa.com/">https://thefwa.com/</a> : Une alternative à AWWWARDS. Il y a d’autres plateformes comme celle-ci qui récompensent les meilleurs sites web. A vous de voir laquelle vous préférez utiliser. Ces 2 là sont mes favorites.</p><p><a href="https://www.behance.net/search?field=132&amp;content=projects&amp;sort=featured_date&amp;time=week&amp;featured_on_behance=true">https://www.behance.net/search?field=132&amp;content=projects&amp;sort=featured_date&amp;time=week&amp;featured_on_behance=true</a> : J’aime bien m’inspirer sur Behance parce qu’on trouve beaucoup de Web Design Concepts. Les designers proposent des interfaces très innovantes. Parfois même trop puisqu’on trouve souvent des interfaces impossibles à développer. Pour l’inspiration, car reste une plateforme parfaite.</p><p><a href="https://reallygoodemails.com/">https://reallygoodemails.com/</a> : Ce site recense des mails HTML avec le code source parfois. Dans certaines situations, c’est plus simple d’utiliser cette plateforme plutôt qu’un framework email qui peut prendre du temps de développement.On peut trouver la template mail de MeetUp, Uber ou encore AirBnb.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5aOIFhBmW_RBz2s_d0mIvA.png" /><figcaption>Really Good Email : Filtrez les mails par catégories, sélectionnez une template mail, puis éditez son code source.</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Freallygoodemails%2Fembed%2Fpreview%2FoyJXPo%3Fheight%3D600%26slug-hash%3DoyJXPo%26default-tabs%3Dhtml%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io%26embed-version%3D2&amp;url=https%3A%2F%2Fcodepen.io%2Freallygoodemails%2Fpen%2FoyJXPo&amp;image=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fi.cdpn.io%2F443424.oyJXPo.small.1e54d8ef-1c7d-4aca-a8b1-7e857dc56bf9.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ae18753aaf922eb56e6d485c407918d/href">https://medium.com/media/7ae18753aaf922eb56e6d485c407918d/href</a></iframe><p><a href="https://www.pages.xyz/type/landing">https://www.pages.xyz</a> : Une sélection de pages web</p><p><a href="https://www.lapa.ninja/">https://www.lapa.ninja</a> : Une sélection de jolies Landing Pages</p><p><a href="https://www.designspiration.net/">https://www.designspiration.net</a></p><p><a href="https://fontface.ninja/">https://fontface.ninja/</a> : Une extension pour Chrome géniale ! Elle permet de savoir quelle typo est utilisée sur un site consulté. On peut ensuite tester la typo via l’outil.</p><p><a href="https://mobbin.design/">https://mobbin.design</a> : Une collection des derniers patterns piochés dans le meilleur du design mobile.</p><p><a href="https://www.typographicposters.com/">https://www.typographicposters.com/</a> : Une belle plateforme pour l’inspiration. On trouve une sélection d’affiches avec une utilisation des typos très bien faite. Petit bémol : Le filtre est assez compliqué à utiliser je trouve.</p><h4><strong>Design de composants</strong></h4><p><a href="https://savee.it/">https://savee.it</a> : Une sélection de designs de composants. C‘est idéal quand on travaille sur une fonctionnalité. Vous pouvez par exemple faire une recherche de type « Calendar » ou « landing page ».</p><p><a href="http://collectui.com/designs">http://collectui.com/designs</a> : Une liste de composants sélectionnés pour la qualité de leur design depuis dribbble et catégorisés par composant. C’est plutôt cool !</p><p><a href="http://styleguides.io/">http://styleguides.io</a> : Une sélection de styleguides.</p><p><a href="https://www.calltoidea.com/">https://www.calltoidea.com</a> : Une alternative à Savee.it. Vous pouvez trouver des mockups de pages 404, Popups, players, listes d’offres d’emploi, et plein d’autres éléments …</p><p><a href="http://uigarage.net/">http://uigarage.net</a> : Au cas ou ça ne vous suffirait pas, encore une alternative à Savee.IT ou calltoidea.</p><p><a href="https://uimovement.com/">https://uimovement.com</a> : Une sélection qualitative d’animations. Tapez “carousel”, “scroll” ou “menu” et vous verrez…</p><p><a href="http://emptystat.es/">http://emptystat.es</a> : C’est une liste de designs qui correspondent à des états vides. Qu’affiche tableau de bord sans information ou une application de gestion de projet sans projet ?. C’est intéressant et il y a peu de ressources comme celles-ci.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*fLDMU78bAgKNaZTC4IEGTQ.png" /></figure><p><a href="https://undraw.co/illustrations">https://undraw.co/illustrations</a> : Une liste d’illustrations libres de droit. On peut attribuer une couleur principale à chaque illustration avant de la télécharger.</p><h4><strong>R&amp;D</strong></h4><p><a href="https://www.productmanual.co/">https://www.productmanual.co</a> : Ce site est très complet. Pour chaque thème il liste des articles, livres, podcasts et outils.</p><p><a href="https://muz.li/">https://muz.li</a> : C’est top juste TOP ! Muzli est une extension de Chrome qui offre des histoires et des idées de design pertinentes. Tout est pioché parmi les meilleurs sources de contenus web (webdesignerdepot, Abduzeedo, Designspiration, etc…). J’adore cette extension. Elle me permet de faire de la veille plus facilement. Je ne vais pas chercher l’information. C’est elle qui vient à moi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NnMyyDXOGpkQ7Xs1DcEjfQ.png" /></figure><p><a href="https://www.webdesignerdepot.com/category/community-inspiration/">https://www.webdesignerdepot.com/category/community-inspiration/</a> : la catégorie “community inspiration” de webdesignerdepot. C’est un classique mais la sélection des tendances à venir est superbe . Un indispensable pour moi.</p><p><a href="https://design.google/news/">https://design.google/news</a></p><p><a href="https://designshack.net/">https://designshack.net</a></p><p><a href="https://uxmyths.com/">https://uxmyths.com</a></p><h4><strong>Photos</strong></h4><p><a href="https://unsplash.com/">https://unsplash.com</a></p><p><a href="https://www.pexels.com/">https://www.pexels.com</a></p><h4><strong>Icons</strong></h4><p><a href="https://feathericons.com/">https://feathericons.com</a> : Une petite librairie d’icônes.</p><h4><strong>Outils</strong></h4><p><a href="https://getavataaars.com/">https://getavataaars.com</a> : Une générateur d’avatars.</p><p><a href="https://www.palettable.io/DEC199">https://www.palettable.io/</a> : J’utilise cet outil pour sélectionner mes couleurs. Je trouve ça bien fait pour un premier jet. La sélection des couleurs n’est pas forcément définitive mais ça me permet de débloquer certaines situations. Ensuite je travaille aussi avec d’autres outils comme ceux-ci :</p><p><a href="https://hihayk.github.io/wheel/?ref=webdesignernews.com">https://hihayk.github.io/wheel/?ref=webdesignernews.com</a></p><p><a href="https://coolors.co/app">https://coolors.co/app</a></p><p><a href="https://color.adobe.com/fr/">https://color.adobe.com/fr</a></p><p>Et voilà ! J’espère que vous avez découverts de nouvelles ressources.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FxT8qB2e02TaKVIsaU8%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fgeekandsundry-travis-willingham-xT8qB2e02TaKVIsaU8&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FxT8qB2e02TaKVIsaU8%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/77a9e9d9a0d62af158272a4955260991/href">https://medium.com/media/77a9e9d9a0d62af158272a4955260991/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a90ebc67d66f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/ma-s%C3%A9lection-de-ressources-ux-pour-trouver-linspiration-a90ebc67d66f">Ma sélection de ressources UX pour trouver l’inspiration</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My way from WebStorm to VS Code and other things in a developer’s life]]></title>
            <link>https://medium.com/les-forgerons/my-way-from-webstorm-to-vs-code-and-other-things-in-a-developers-life-fe71f0d07c59?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/fe71f0d07c59</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webstorm]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[ide]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Fri, 06 Jul 2018 11:44:23 GMT</pubDate>
            <atom:updated>2018-07-06T11:44:22.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*e2bFJqGpZ8s3kRA5IFG7Ag.png" /></figure><p>For developers, IDE/Text-editor choice has passed beyond rational debate long time ago : it’s something personal. For that reason, I don’t want to create another <em>VSCode VS WebStorm</em> post, but instead relate how and why I came to switch from JetBrains WebStorm to Microsoft VS Code.</p><h4>Why change from one to another ?</h4><p>First of all, let me say that both softwares are really good.</p><p>I have been working for 4 years on IntelliJ IDEA (IntelliJ, WebStorm, PHPStorm, PyCharm are basically “flavors” of the same product). I loved my experience and I even wrote <a href="https://blog.buddyweb.fr/why-i-stopped-using-sublimetext-to-use-phpstorm-dbd927263a11">a post about it</a> at that time.</p><p>Both WebStorm and Microsoft Visual Studio Code are VERY similar, so why loose time to learn something new ? All started with performance. As my MacBook Pro started its third year of existence, it became a bit slow (thanks planned obsolescence), an its 8gb of RAM are not that much when WebStorm only itself often uses 2gb.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*LDCBZYgIB2VWWz4a7Chrqg.png" /></figure><p>I heard that VS Code was more lightweight and I decided to take the opportunity to try the thing that everybody is talking about. When I say everybody, I mean the louder ones, the JS and NodeJS developers :)</p><p>Actually, I’m one of them without being one of them. I’ve started with PHP and did many <a href="https://laravel.com/">Laravel</a> projects, then started with AngularJS when it came out and evolved to <a href="https://angular.io/">Angular</a>. I fell in love with TypeScript and I’m still learning to do some server-side programming with a Node.js/TypeScript framework called <a href="https://nestjs.com/">Nest</a>.</p><p>Ok, let’s go back to performance. Using VS Code did a huge change in overall performance and my Mac seems young again. One point for VS Code !</p><h4>Starting with VS Code</h4><p>To reduce the learning curve, you can start by installing some plugins : <a href="https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings">IntelliJ IDEA Keybindings</a>, <a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker">Code Spell Checker</a>, <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">Prettier</a>, <a href="https://marketplace.visualstudio.com/items?itemName=krizzdewizz.goto-last-edit-location">goto-last-edit-location</a>, <a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag">Auto Rename Tag</a>, <a href="https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight">TODO Highlight</a>. Those features are available out-of-the-box on WebStorm but we have to download them as plugins in VS Code. There is huge difference in their philospohy : As WebStorm comes with key-packages included from start, Microsoft VS Code comes half-naked and you have to dress it (like a PHP project in comparison to a NodeJS project). It’s neither good or bad, but the approach is different.</p><p>Settings are easy to change, JSON-style make it easy to search and to make the difference between the default ones and the ones you specifically changed.</p><p>Global UI is cleaner than WebStorm. For minimalist-lovers like me, you can use Zen Mode to focus even more.</p><h4>Day-to-day work on VS Code</h4><p>After few days, I’m still adapting but I am quite happy with my new editor. Code’s Source Control is so much nicer that WebStorm. I use the <a href="https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack">Git Extension Pack</a> and everything is smooth. I actually don’t really know which features are native or from the plugin, it’s probably a good thing.</p><p>Regarding the terminal,I found out that VS Code is more convinient. With your keyboard you can <em>Create New Integrated Terminal</em>, split panes and navigate between them just with shortcuts. Maybe that shortcut exists on IntelliJ but I couldn’t find out.</p><h4>Angular on VS Code</h4><p>Let me introduce you to <a href="https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme">Material Icon Theme</a>. I’m actually not a huge fan of material design, but the point of this theme is that file icons represent not only their extension but their roles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*7yo2pwg21o9XlSG8TAc39Q.png" /><figcaption>Components, pipes, and services have different colors to distinguish them.</figcaption></figure><p>Another good thing for Angular developers : VS Code doesn’t save the file on highlighting other applications. That means that your browser will not reload unexpectedly. If you know what I’m talking about, you know it’s bothering.</p><h4>TypeScript on VS Code</h4><p>Did I already told you that I love TypeScript ? TypeScript is great because it’s a fail-fast language that solidifies your apps. And there is a greater benefit, TypeScript helps IDEs to understand your code, and IDEs rewards you by providing you a better code completion and highlight errors. Unless you are still in the samouraï era and use emacs or vim, TypeScript will save you a lot of time and prevent mistakes.</p><p>VS Code was made by Microsoft that created TypeScript too. I had great expectations on that point. But WebStorm is already excellent on understanding TypeScript… Unless one tiny point : WebStorm doesn’t get <a href="https://developers.google.com/web/updates/2015/01/ES6-Template-Strings">ES6 Template strings</a>, VSC does. Anyway, both IDEs manage very well this language. Maybe VS Code will have a better / quicker implementation of future versions ?</p><h4>PHP on VS Code</h4><p>On the other hand, PHP support is way better on IJ. If you work exclusively in PHP, stop reading here and keep IntelliJ.</p><h4>The future</h4><p>Before investing your precious time into something, it’s important to ensure that this thing will not die tomorrow. When I decided to learn <a href="https://laravel.com/">Laravel</a> (42k stars on Github today), around 4 years ago, it was way less used than Symphony (17k) , CakePHP (7k) or Yii (5k). But they where clues : overall quality was really good and acknowledged by thrusted developers, Github repo was well maintained and even the website design was nice and clean.</p><p>IDE choice is less community-dependent than an open-source framework but still it’s important to check if people are still going to use it in the future. Digging around the web, I found that VS Code seems having more and more enthusiasts whereas the other one is stagnating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VWzyNzVN4nnuduTXGwB0Dw.png" /><figcaption>Seems like VS Code is having more and more interest.</figcaption></figure><p>Did you heard about Solidity ? It’s a quite new language to create decentralized apps on the <a href="https://www.ethereum.org/">Ethereum blockchain</a>. Let’s say that it’s the new BIG thing alright ? So, witch editor do you think has more Solidity support ? Again, VS Code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*-kbrUriadRXRsMMF2V5W7A.png" /><figcaption>Solidity plugins for VS Code.</figcaption></figure><h4>Conclusion</h4><p>If you don’t have a good reason to change from one to another, you’re not missing much by not doing it. Those are both really good software. If you have to choose between both, I would say that PHP and Java devs should go IntelliJ and JS/TS devs with VSCode. For myself, I’ll keep VS Code. And you ?</p><p><strong>VS Code pros</strong></p><ul><li>Open Source</li><li>Lightweight : less RAM and CPU usage</li><li>Bigger community : plugins, tutorials, etc.</li><li>A bit better with JavaScript and TypeScript</li><li>More “future-proof”</li></ul><p><strong>WebStorm pros</strong></p><ul><li>Better PHP / Java support</li><li>Less Intrusive</li><li>More configurable</li><li>More stable</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe71f0d07c59" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/my-way-from-webstorm-to-vs-code-and-other-things-in-a-developers-life-fe71f0d07c59">My way from WebStorm to VS Code and other things in a developer’s life</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Les Moteurs de Recherche alternatifs à Google]]></title>
            <link>https://medium.com/les-forgerons/les-moteurs-de-recherche-alternatifs-%C3%A0-google-e644cb74b9e9?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/e644cb74b9e9</guid>
            <category><![CDATA[bing]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[moteur-de-recherche]]></category>
            <category><![CDATA[search-engines]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Mon, 04 Sep 2017 14:25:54 GMT</pubDate>
            <atom:updated>2017-09-04T14:25:53.523Z</atom:updated>
            <content:encoded><![CDATA[<p>Il y a plein de raisons d’arrêter d’utiliser Google : privacité, éthique, pratique, ou tout simplement pour arrêter de nourrir le monstre qui est bien parti pour en finir avec l’humanité un de ces jours.</p><p>On a donc testé quelques alternatives pour vous. Différentes approches, différentes promesses. Découvrez tout de suite les moteurs de recherche de l’internet d’aujourd’hui.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*wOI77I6FdIYOpRMpWDFKzA.png" /></figure><h3>DuckDuckGo : Le moteur de recherche respectueux de la privacité</h3><p><a href="https://duckduckgo.com/">DuckDuckGo</a> est le “moteur de recherche qui ne vous espionne pas”. Soucieux du respect de la vie privée, il n’y a pas de trackers ni sur le moteur de recherche, ni sur les publicités. Aucune information personnelle n’est conservée. La classe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*Ctdmtapy8DXPG3C_ad_JlA.png" /></figure><h3>Ecosia : Le moteur de recherche écolo</h3><p><a href="https://www.ecosia.org/">Ecosia</a> : “lancer une recherche pour planter des arbres”. Ils gagnent de l’argent avec les liens sponsorisés et reversent 80% des ces revenus à des associations environnementales. Ecosia est en fait un meta-moteur de recherche : sous le capot, c’est en fait les résultats de Bing qui s’affichent. Ecosia est totalement transparent sur son activité et publie <a href="http://ecosia.dropmark.com/369419">des rapports financiers</a> tous les mois.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*VjnLG59ERK15OK3Y9BMILg.png" /></figure><h3>Lilo : La recherche solidaire</h3><p><a href="https://search.lilo.org/">Lilo</a> est également un moteur de recherche engagé. Chaque recherche permet d’obtenir des “gouttes” que l’on peut convertir en don pour une association de son choix. Sympa ! Comme <strong>Ecosia</strong>, ils agissent comme une sur-couche d’autres moteurs de recherche (Google et Bing pour le coup).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*krRb6ucNK7RukdVpQIWo5A.png" /></figure><h3>Bing : Le challenger qui n’a pas su s’imposer</h3><p>Conçu par Microsoft en copiant clairement Google sur tous les points, <a href="http://www.bing.com/">Bing</a> n‘a jamais vraiment réussi à inquiéter Google. Pourtant, Microsoft avait soi-disant réalisé un test qui prouvait que ses résultats étaient meilleurs que ceux de Google… Malgré son éternelle 2ème place ils est néanmoins un très bon moteur de recherche.</p><p>Personnellement, en tant que développeur, j’aime bien leur <a href="https://azure.microsoft.com/fr-fr/services/cognitive-services/bing-web-search-api/">API de recherche</a> qui m’a bien servi pour certains projets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*b4OF5PB9jJWH6KlkrQPz6g.png" /></figure><h3>Twitter : L’information LIVE</h3><p>Si vous cherchez l’actualité immédiate sur un évènement qui se passe en ce moment même, <a href="http://twitter.com/">Twitter</a> est votre meilleur allié.</p><p>Twitter n’obéit pas aux mêmes règles que les moteurs de recherches : Il n’a pas à indexer des millions de sites pour en trier l’information. Tout est déjà sur sa plate-forme.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J54mhLRMrePHTE_N13lOHg.png" /></figure><h3>Google Maps : Recherche de lieux</h3><p>Bon j’avoue, ce n’est pas une “vraie” alternative à Google, mais cela vaut quand même le détour !</p><p>Avec toujours plus de lieux répertoriés, <a href="https://www.google.fr/maps/">Google Maps</a> permet de rechercher des lieux et de consulter les photos et les avis des utilisateurs. La disposition des résultats sur une carte et le fort côté social en font un moteur de recherche très efficace pour des recherches de restaurants, attractions touristiques et lieux particuliers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e41ZL6Z1-jHS9Y-q5xEouw.png" /></figure><h3>Quora : Des questions et des réponses</h3><p>Comme nous l’avons vu, un moteur de recherche ce n’est pas forcément des résultats soulignés en bleu sur un fond blanc ! <a href="http://quora.com/">Quora</a> en est l’exemple : c’est une plate-forme de questions et réponses, un peu comme <a href="https://fr.answers.yahoo.com/">Yahoo Questions/Réponses</a> mais avec des gens intelligents.</p><p>La version anglaise a pratiquement la réponse à tout, tandis que la version française est un peu moins fournie. Et dans tous le cas, vous pouvez toujours poser votre propre question si vous ne trouvez pas ce que vous voulez…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*18UAPHyJA-i-q9vJN97Wnw.png" /></figure><h3>Siri / Alexa : Les assistants vocaux</h3><p>2017 est l’année de sortie de l’<a href="https://www.amazon.com/Amazon-Echo-Bluetooth-Speaker-with-WiFi-Alexa/dp/B00X4WHP5E">Amazon Echo</a>, du <a href="https://madeby.google.com/home/">Google Home</a> et du <a href="https://www.apple.com/homepod/">HomePod d’Apple</a>. Tous investissent dans la sortie d’un assistant vocal, même si leur arrivée dans nos salons en intimide plus d’un.</p><p>Ces assistants sont déjà présents sur nos smartphones et sur quelques ordinateurs. Ils nous permettent une recherche vocale et non plus visuelle. Le recherche vocale est pressentie pour remplacer petit à petit la recherche textuelle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*w4Xe-6_1v1lgZPt5QwNJOw.png" /></figure><h3>Lycos : L’oublié</h3><p>Et pour finir on vous laisse avec <a href="http://lycos.fr/">Lycos</a>, qui autrefois faisait concurrence à Google pour ceux qui s’en souviennent (va chercher Lycos !).</p><p>Eh oui, le moteur de recherche est toujours sur internet. C’est moche, c’est kitch et c’est lent, mais ça fait du bien une fois de temps en temps !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e644cb74b9e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/les-moteurs-de-recherche-alternatifs-%C3%A0-google-e644cb74b9e9">Les Moteurs de Recherche alternatifs à Google</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create an open REST API in 2 minutes with Bridge [no code]]]></title>
            <link>https://medium.com/les-forgerons/create-an-open-rest-api-in-2-minutes-with-bridge-no-code-698ab786ec7b?source=rss----eea0d01accad---4</link>
            <guid isPermaLink="false">https://medium.com/p/698ab786ec7b</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[json-api]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Bruno Pérez]]></dc:creator>
            <pubDate>Fri, 01 Sep 2017 14:20:25 GMT</pubDate>
            <atom:updated>2017-09-01T14:20:24.963Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FoXfm-dao7RNpUmCxh8lhQ.png" /><figcaption>Bridge is a free tool to create REST APIs for your mocks or Open Data projects.</figcaption></figure><p><em>Quick tutorial to go from an Excel or CSV file to an open REST API in JSON in just 2 minutes with Bridge.</em></p><h4><strong>Which kind of API can we create ?</strong></h4><p><a href="https://getbridgeapp.co/en">Bridge</a> is a free tool that creates and hosts simple APIs. If you need API that calculates the distance from your current position to the moon, it’s definitely not the right tool. But if you just need a standard API that returns a static set of data (GET requests only), this tutorial is made for you.</p><p>We don’t need to install and configure any kind of server (and neither pay for it). Bridge takes care of the dirty work. Basically, we just have to upload the data.</p><h4><strong>Create a new API</strong></h4><p>Ok, let’s click on “sign up” and create an account (one step only). Once in the dashboard click on “create a new API”.</p><p>We will pretend that we are a museum that wants to list its works in this example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*HywYqyAnyP3_N83ZkEAg-g.png" /><figcaption>Create easily an API for your organisation.</figcaption></figure><p>The API name should be general, like the name of your organisation/project/company… (the museum’s name in our case). You will be able to add spreadsheets later on.</p><h4><strong>Add a spreadsheet to our API</strong></h4><p>Let’s continue and click on “add a new spreadsheet”. We are going to upload our Excel or CSV file with the data we want to open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*GZcL0xxKlOkYM02u-wz4_g.png" /><figcaption>We want to import this spreadsheet with a list of works. Notice the “field with no values”, the field is empty for all our works but we could have a 4th work with a value in this field.</figcaption></figure><p>In our example, we will import a simple spreadsheet with a list of the museum’s works. The spreadsheet name will be “works”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*aAB69BDTRfQE5JP1uqQQeQ.png" /><figcaption>Bravo !</figcaption></figure><p>That’s it ! The Excel / CSV spreadsheet has been imported in the API and it is now open to the public. If you want to update the data later, you would just need to upload un updated Excel file.</p><p>Back on the API page of “The Peach Museum”, we will click on “see documentation”. If you are a developper, we will instantanelly have 2 thoughts :</p><ul><li>Cool, the doc has been automatically generated !</li><li>Wow, it’s really nice.</li></ul><p>If you are not a developper, just know that this documentation contains all the elements needed for others to connect to your new API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_59b-5y5wM7pvN_k3vtLw.png" /><figcaption>Your API documentation is available ! Check the example responses at right, one for each endpoint.</figcaption></figure><p>It was fast, right ? Let’s test what we created.</p><h4><strong>Test our new REST API</strong></h4><p>The documentation shows us 2 RESTful endpoints :</p><ul><li>GET /works for the list of works</li><li>GET /works/{id} to get a specific work</li></ul><p>Let’s copy-paste the full URL to see what happens. I am using Postman but you can do it in the web browser you are using right now. As you can see, wee receive clean JSON with our data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*mf0oF2RPDOzQqAguBy1ERg.png" /><figcaption>We receive clean JSON from the API. The “field with no values” is still here because it was in our Excel spreadsheet.</figcaption></figure><p>We can filter those results if we want, using one or several parameters in our HTTP request. Bridge automatically extracts parameters from the uploaded spreadsheets. Just try it yourself :</p><ul><li><a href="https://getbridgeapp.co/api/thepeachmuseum/works?artist=Picasso">https://getbridgeapp.co/api/thepeachmuseum/works?artist=Picasso</a></li></ul><h4><strong>Retreive a single item</strong></h4><p>There is no “id” property in our data. If it was the case, we could retreive a defined item by its id.</p><p>If there is no “id” column like in our case, Bridge will consider each item’s position in the array as it’s id :1 to get the first item, 2 for the second etc. Technically it’s an “index + 1” :)</p><ul><li><a href="https://getbridgeapp.co/api/thepeachmuseum/works/3">https://getbridgeapp.co/api/thepeachmuseum/works/3</a></li></ul><h4><strong>Conclusion</strong></h4><p>We just created an open REST API incredibly fast.</p><p>API URLs are RESTful, on “https” and deliver clean JSON based on your Excel or CSV file.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=698ab786ec7b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/les-forgerons/create-an-open-rest-api-in-2-minutes-with-bridge-no-code-698ab786ec7b">Create an open REST API in 2 minutes with Bridge [no code]</a> was originally published in <a href="https://medium.com/les-forgerons">Blog Buddyweb - Agence Digitale à Paris</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>