<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: David Lacourt</title>
    <description>The latest articles on DEV Community by David Lacourt (@doppelganger9).</description>
    <link>https://dev.to/doppelganger9</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F17240%2F98a4adf6-d2b5-4f84-9422-fd1a26d0e42d.jpg</url>
      <title>DEV Community: David Lacourt</title>
      <link>https://dev.to/doppelganger9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/doppelganger9"/>
    <language>en</language>
    <item>
      <title>Here is a HUEseless side-project</title>
      <dc:creator>David Lacourt</dc:creator>
      <pubDate>Thu, 04 Jul 2019 22:05:11 +0000</pubDate>
      <link>https://dev.to/doppelganger9/here-is-a-hueseless-side-project-30jf</link>
      <guid>https://dev.to/doppelganger9/here-is-a-hueseless-side-project-30jf</guid>
      <description>&lt;h1&gt;
  
  
  HUEseless
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.thinkgeek.com%2Fimages%2Fproducts%2Fzoom%2Fivlq_useless_light_switch.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.thinkgeek.com%2Fimages%2Fproducts%2Fzoom%2Fivlq_useless_light_switch.gif" alt="Like this one from ThinkGeek"&gt;&lt;/a&gt;&lt;br&gt;
(This is a physical one from &lt;a href="https://www.thinkgeek.com/product/ivlq/" rel="noopener noreferrer"&gt;ThinkGeek&lt;/a&gt; &lt;em&gt;(not an affiliate link)&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;In this post, I will recount how I made a silly side-project playing with the &lt;a href="https://developers.meethue.com/develop/" rel="noopener noreferrer"&gt;Philips HUE APIs&lt;/a&gt;, NodeJS, Google Home, RaspberryPi Zero W, and my kids.&lt;/p&gt;
&lt;h2&gt;
  
  
  My genius evil plan
&lt;/h2&gt;

&lt;p&gt;The story is:&lt;/p&gt;

&lt;p&gt;In 2016, I installed a Philips HUE lightbulb in my kids' bedroom.&lt;br&gt;
Unfortunately, the room switch turns it off, and when turned back on, the HUE lightbulb goes back to white and 100% intensity. So the kids quickly learned that If I turn off the lights remotely with an app or Google Home, they simply need to play with the room switch off then on and they "win".&lt;/p&gt;

&lt;p&gt;So, as soon as I closed their door when time to sleep has had come, they would get up and turn it back on!&lt;/p&gt;

&lt;p&gt;A war of turning on &amp;amp; off lights ensued.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3ohzdFHDBEG32PmWJO/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3ohzdFHDBEG32PmWJO/giphy.gif" alt="on/off"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a geek dad, I wanted to automate this into an evil AI, so that I can laugh madly while petting my cat, &lt;em&gt;mwahahahahah&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/MgwVy8YxMqJ56/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/MgwVy8YxMqJ56/giphy.gif" alt="evil laugh"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Gitlab Repository
&lt;/h2&gt;

&lt;p&gt;As a gift, here is a link to the repository where you'll find more details:&lt;br&gt;
&lt;a href="https://gitlab.com/davidlacourt/hueseless" rel="noopener noreferrer"&gt;https://gitlab.com/davidlacourt/hueseless&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  How does it work?
&lt;/h3&gt;
&lt;h4&gt;
  
  
  NodeJS
&lt;/h4&gt;

&lt;p&gt;For this quick script thing of a project, I prefer JavaScript and NodeJS.&lt;br&gt;
For once, I did not write tests, because my kids tested it for me directly on production.&lt;/p&gt;
&lt;h4&gt;
  
  
  PhillipsHUE
&lt;/h4&gt;

&lt;p&gt;The APIs are really easy to "HUE"-se.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/qs6ev2pm8g9dS/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/qs6ev2pm8g9dS/giphy.gif" alt="quotes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just read the documentation and follow the tutorial, I did not meet any obstacle on the way. So I could hack an evil "AI" really quickly.&lt;/p&gt;
&lt;h4&gt;
  
  
  Evil AI (= 2 "IF"s)
&lt;/h4&gt;

&lt;p&gt;Here is the evil AI pseudo-code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IF you get data from API
   IF the light is on
   THEN turn it off
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://i.giphy.com/media/xl5QdxfNonh3q/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/xl5QdxfNonh3q/giphy.gif" alt="dr evil laughing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Google Home
&lt;/h4&gt;

&lt;p&gt;Just for the fun of it, I added voice to my script, so that instead of using &lt;code&gt;console.log&lt;/code&gt; I would hear messages from it.&lt;br&gt;
When starting, it would say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Light status monitoring enabled!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or when turning off the lights:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I turned off the lights.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I used &lt;a href="https://www.npmjs.com/package/node-googlehome" rel="noopener noreferrer"&gt;node-googlehome&lt;/a&gt; repository/NPM library but had to tweak it a little to make it work, and ended up opening a PR.&lt;/p&gt;

&lt;h4&gt;
  
  
  RaspberryPi Zero W
&lt;/h4&gt;

&lt;p&gt;The RaspberryPi Zero W is a mini version of the RaspberryPi which is already a really small computer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/8Q62oGruZu0BG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/8Q62oGruZu0BG/giphy.gif" alt="mini me"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once installed and built, I deployed this project on the RPi0W, which was really slow to &lt;code&gt;npm install&lt;/code&gt; all the libs, but 10 minutes later, I could run the main loop.&lt;/p&gt;

&lt;p&gt;I even added an auto-start to the Raspberry, which made it so that when powering up, it would automatically start my NodeJS script. &lt;br&gt;
Really nice!&lt;/p&gt;

&lt;p&gt;For more details, I just followed &lt;a href="https://medium.com/@andrew.nease.code/set-up-a-self-booting-node-js-eb56ebd05549" rel="noopener noreferrer"&gt;this Medium article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l3vR6aasfs0Ae3qdG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l3vR6aasfs0Ae3qdG/giphy.gif" alt="perfect plan"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well, it worked perfectly.&lt;/p&gt;

&lt;p&gt;Except kids learn more quickly than my evil "AI"!&lt;/p&gt;

&lt;p&gt;They learned that switching on/off a few dozen times made my code break. And even, instead of simply putting the lights on, for them it became a new &lt;br&gt;
game!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/2iBsieTJ3eO1q/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/2iBsieTJ3eO1q/giphy.gif" alt="the irony"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I ended the experiment there.&lt;/p&gt;

&lt;p&gt;Now they go to sleep without any need to have a light so I can say it's over.&lt;/p&gt;

&lt;p&gt;🤷‍♂️&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this short post, I wanted to show you a silly side-project mixing Google Home, NodeJS, Philips HUE, running on a RaspberryPI and evil AI in order to battle my smart kids. The result is working but they still outsmarted the whole contraption 🤣!&lt;/p&gt;

&lt;p&gt;Anyway, I learned some things on the way.&lt;/p&gt;

&lt;p&gt;I hope you too learned a few things or at least piqued your curiosity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for reading this blog, If you have any questions, please use the &lt;a href="https://github.com/doppelganger9/blog/issues" rel="noopener noreferrer"&gt;Github Repository's Issues&lt;/a&gt; to start a conversation, or use &lt;a href="https://twitter.com/doppelganger9" rel="noopener noreferrer"&gt;Twitter: my DMs are open&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;👋&lt;/p&gt;

&lt;p&gt;(First posted on my personal blog &lt;a href="https://lacourt.dev/2019/03/26/" rel="noopener noreferrer"&gt;https://lacourt.dev/2019/03/26/&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>node</category>
      <category>philipshue</category>
      <category>googlehome</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Gitpod, my new on-demand 🛎 dev environment 👨‍💻</title>
      <dc:creator>David Lacourt</dc:creator>
      <pubDate>Sun, 31 Mar 2019 16:10:36 +0000</pubDate>
      <link>https://dev.to/doppelganger9/gitpod-my-new-on-demand-dev-environment-3n23</link>
      <guid>https://dev.to/doppelganger9/gitpod-my-new-on-demand-dev-environment-3n23</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitpod.io%2Fimages%2Fgitpod-logo.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitpod.io%2Fimages%2Fgitpod-logo.svg" alt="gitpod logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wrote the original post for my personal blog from a &lt;a href="https://gitpod.io" rel="noopener noreferrer"&gt;Gitpod&lt;/a&gt; environment, launched directly from my blog's repository URL.&lt;/p&gt;

&lt;p&gt;You can try this just now: &lt;a href="https://gitpod.io/#https://github.com/doppelganger9/blog" rel="noopener noreferrer"&gt;https://gitpod.io/#https://github.com/doppelganger9/blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Did you see how easy and smart it is to just add "&lt;a href="https://gitpod.io/#" rel="noopener noreferrer"&gt;https://gitpod.io/#&lt;/a&gt;" in front of your GitHub repo to launch the environment 🤓?&lt;/p&gt;

&lt;p&gt;Ok, time to make it trippy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/rou0CTAp6Z8VW/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/rou0CTAp6Z8VW/giphy.gif" alt="hail hypnotoad"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flacourt.dev%2Fstatic%2Fd7ab94fb640066bfb14d481388394ad3%2F301c0%2Fscreenshot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Flacourt.dev%2Fstatic%2Fd7ab94fb640066bfb14d481388394ad3%2F301c0%2Fscreenshot.png" alt="mise en abyme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is this?
&lt;/h2&gt;

&lt;p&gt;As you see, the idea is to have a &lt;strong&gt;VisualStudio Code in the browser development environment&lt;/strong&gt; bootstrapped from your repository.&lt;/p&gt;

&lt;p&gt;To be more precise, it is based on &lt;a href="https://www.theia-ide.org/" rel="noopener noreferrer"&gt;Theia IDE&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  extensions
&lt;/h3&gt;

&lt;p&gt;It does not come with your collection of VSCode Extensions, but it is enough useful for 95% of the time.&lt;/p&gt;

&lt;h3&gt;
  
  
  network stability
&lt;/h3&gt;

&lt;p&gt;It has a few disconnecting moments.&lt;/p&gt;

&lt;h3&gt;
  
  
  exposing a local web server
&lt;/h3&gt;

&lt;p&gt;It can expose ports like when you need to run your dev web server, it is possible and really frictionless.&lt;/p&gt;

&lt;h3&gt;
  
  
  closing files
&lt;/h3&gt;

&lt;p&gt;Whoops, If like me you are used to hitting &lt;code&gt;CMD + W&lt;/code&gt; on VSCode to close files, this will not work here, because it will close the browser tab! 😱&lt;br&gt;
Hopefully, opening back &lt;a href="https://gitpod.io" rel="noopener noreferrer"&gt;https://gitpod.io&lt;/a&gt; shows my workspaces and the one I accidentally closed is still running and I can reopen it in the state it was (process running, etc.) which is well thought!&lt;/p&gt;
&lt;h3&gt;
  
  
  💸
&lt;/h3&gt;

&lt;p&gt;Don't forget to stop your workspaces, the free tier gives you 100 Hours which is really sufficient for my kind of usage: working on Github Repositories outside of working hours.&lt;/p&gt;
&lt;h2&gt;
  
  
  This integration test is failing 🤭
&lt;/h2&gt;

&lt;p&gt;After I finished writing the first draft of this post, I tried to &lt;code&gt;git push&lt;/code&gt;, but I encountered this error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ! [remote rejected]  ... (refusing to allow an integration to create .github/main.workflow)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GitHub rejects my push because it seems that when you &lt;a href="//../2019/03/06/"&gt;enable Github Actions&lt;/a&gt; it blocks all other GitHub Integrations from working. And Gitpod is one such Integration.&lt;/p&gt;

&lt;p&gt;Well... again not everything is 🌈 and 🦄.&lt;/p&gt;

&lt;p&gt;Damn, after a little search, it seems there really is an issue about this.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1089848015626686465-894" src="https://platform.twitter.com/embed/Tweet.html?id=1089848015626686465"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1089848015626686465-894');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1089848015626686465&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1089880487659737088-609" src="https://platform.twitter.com/embed/Tweet.html?id=1089880487659737088"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1089880487659737088-609');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1089880487659737088&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  Partial fix and git-fu 🥋
&lt;/h3&gt;

&lt;p&gt;I could not resolve myself to neither remove Github Actions nor drop using Gitpod!&lt;/p&gt;

&lt;p&gt;So I...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git stash&lt;/code&gt;-ed my uncommitted changes,&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git checkout -&lt;/code&gt; to leave the git branch I had dedicated for this post and come back to the previous one (&lt;code&gt;git checkout master&lt;/code&gt; also works, but 5 more characters to type? Meh.)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git cherry-pick&lt;/code&gt;-ed the commits I did, not knowing the &lt;code&gt;push&lt;/code&gt; rejection issue,&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git push&lt;/code&gt; worked 🎉 from &lt;code&gt;master&lt;/code&gt;, so I knew I would not have to copy all my changes out of Gitpod to my local computer,&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git stash pop&lt;/code&gt;-ped and proceeded from here to continue writing this paragraph and push it live!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So, as I've experienced sort of an emotional rollercoaster,&lt;br&gt;
at a moment I thought that even though I really liked the idea of having a &lt;em&gt;"remote VS Code in the browser"&lt;/em&gt; and in the past had found it very useful,&lt;br&gt;
combining this with Github Actions had ruined it. But pushing from &lt;code&gt;master&lt;/code&gt; did the trick!&lt;/p&gt;




&lt;p&gt;I hope you learned a few things or at least witnessed how I bump against issues and go on 🤣.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for reading this article, If you have any questions, please use the comments below!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;👋&lt;/p&gt;

</description>
      <category>gitpodio</category>
      <category>editor</category>
    </item>
    <item>
      <title>Yet another blog built with Gatsby.</title>
      <dc:creator>David Lacourt</dc:creator>
      <pubDate>Tue, 26 Mar 2019 21:25:32 +0000</pubDate>
      <link>https://dev.to/doppelganger9/yet-another-blog-built-with-gatsby-47j0</link>
      <guid>https://dev.to/doppelganger9/yet-another-blog-built-with-gatsby-47j0</guid>
      <description>&lt;p&gt;&lt;em&gt;NOTE: this should have been one of my first posts, so it's kind of a "pilot" post.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(It was first posted on &lt;a href="https://lacourt.dev/2019/03/20/"&gt;https://lacourt.dev/2019/03/20/&lt;/a&gt;, which is the blog mentioned in this post)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hqM-MV2d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/21834/35175472-11db4c98-fd74-11e7-9886-7e4e418c3f90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hqM-MV2d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/21834/35175472-11db4c98-fd74-11e7-9886-7e4e418c3f90.png" alt="Gatsby"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.gatsbyjs.org/"&gt;Gatsby&lt;/a&gt; is a free and open source framework based on React that helps developers build blazing fast websites and apps&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  GraphQL
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;GraphQL&lt;/em&gt; is a query language for your APIs and a runtime for fulfilling those queries with your existing data&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://graphql.org/"&gt;GraphQL&lt;/a&gt; here is used to fetch data from different sources, which allows aggregation of content from a myriad of origins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;local "classic" React JS views,&lt;/li&gt;
&lt;li&gt;Web services / REST endpoints&lt;/li&gt;
&lt;li&gt;Database&lt;/li&gt;
&lt;li&gt;markdown files&lt;/li&gt;
&lt;li&gt;... and anything else because it is extensible!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Starters
&lt;/h3&gt;

&lt;p&gt;Gatsby comes with a lot of starter templates provided by the core team and the community. This is really handy and one of the reasons I chose Gatsby: to quickly prototype my website.&lt;/p&gt;

&lt;p&gt;To start this blog I chose the first Starter I found on &lt;a href="https://www.gatsbyjs.org/starters/?v=2"&gt;the official marketplace&lt;/a&gt;.&lt;br&gt;
It being the &lt;a href="https://www.gatsbyjs.org/starters/gatsbyjs/gatsby-starter-blog/"&gt;gatsby-starter-blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B2Fv5vCu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lacourt.dev/static/d3b01d94cc0d1706ff8272aed131a7a6/adc74/doge.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B2Fv5vCu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lacourt.dev/static/d3b01d94cc0d1706ff8272aed131a7a6/adc74/doge.jpg" alt="Doge"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's the Open Source dream! You get huge quantities of free shared stuff, and you just have to assemble and customize it to make it your own. You can still study all the code and engage in diverse ways to improve it for others who will, in turn, reap the benefits.&lt;/p&gt;

&lt;p&gt;So I have this piece of software, &lt;a href="https://www.gatsbyjs.org/docs/"&gt;really nice documentation&lt;/a&gt; with &lt;a href="https://www.gatsbyjs.org/tutorial/"&gt;tutorials&lt;/a&gt;, &lt;a href="https://www.gatsbyjs.org/showcase/"&gt;examples&lt;/a&gt;, &lt;a href="https://www.gatsbyjs.org/plugins/"&gt;lots of plugins from which to choose&lt;/a&gt;, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I want to add internal links (anchors) on headings, there's a plugin for that&lt;/li&gt;
&lt;li&gt;I want to show the reading time of each post, there's a plugin for that&lt;/li&gt;
&lt;li&gt;I want to use fun icons, there's a plugin for that.&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;functional plugins, source plugins, and transformer plugins&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;All this gives me the opportunity to quickly add functionality with the plugin abstractions which do not require me to fully understand how they work. I could create my own plugin if there I cannot find one filling a particular need. Just finding existing ones spared me a lot of time. I can thus concentrate on the "business" which is writing posts!&lt;/p&gt;




&lt;p&gt;Now that I have started writing content, it feels like thoughts are forming by themselves. Kind of a meditative practice where you let the thoughts out.&lt;br&gt;
Then comes the "refactoring" where you reorganize everything to make it more linear and express some goal whether it's telling a story or describing a product or whatever. Instead of a mind dump. Like this post. 🤣🤷‍♂️&lt;br&gt;
When I'm writing, usually it sparks another idea and I feel the urge to catch it and carve it on the screen with words before it flies away. Like capturing fleeting thoughts. Then they are gone. And give way to others.&lt;br&gt;
It's also cathartic in the way that some persistent thoughts in your head can instead persist inside a post. And as you rework them iteratively, they take on a shining quality and give you the opportunity to make this second brain memory even better. I acquired a new appreciation for books and the mindset of authors of said books.&lt;br&gt;
Mind meandering... Flushed the mental toilet.&lt;br&gt;
Now back to technical stuff, ready?&lt;br&gt;
&lt;em&gt;burp&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;The Starter already comes with a great list of plugins.&lt;br&gt;
I won't describe how to start, I followed &lt;a href="https://daveceddia.com/start-blog-gatsby-netlify/"&gt;a post that already does this perfectly&lt;/a&gt; (thanks, by the way!).&lt;/p&gt;

&lt;h3&gt;
  
  
  gatsby-transformer-remark
&lt;/h3&gt;

&lt;p&gt;This one is here to transform your markdown into blog post views,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Support for an &lt;a href="https://lacourt.dev/rss.xml"&gt;RSS feed&lt;/a&gt;"? You can add my blog to your RSS Reader... wait... this is not 2009?!&lt;/li&gt;
&lt;li&gt;"Support for code syntax highlighting": well, you might have read some of my previous posts, and the code inside wasn't all that &lt;strong&gt;highlighted&lt;/strong&gt;, merely shown. I might have missed something, here.&lt;/li&gt;
&lt;li&gt;"Includes plugins for offline support out of the box": this is great, &lt;a href="https://dev.to/future/this-blog-is-100-PWA"&gt;this blog is a PWA&lt;/a&gt; you can install it, it will download all contents and you can read the articles while offline. Also, it makes visiting this site much faster after the first time thanks to service workers!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Regrets
&lt;/h3&gt;

&lt;p&gt;Now that I'm fully into this, I kind of regret my initial choice of starter. &lt;em&gt;Lumen starter I'm eyeing at you, you look so nice with this sexy sidebar (even though with my profile pic of a non-hipster face, that might not be as good)&lt;/em&gt;&lt;br&gt;
Maybe I can just &lt;a href="https://dev.to/alternate-reality/migrating-to-lumen-starter"&gt;migrate to another starter&lt;/a&gt;?&lt;/p&gt;

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

&lt;p&gt;Other possibilities would have been to use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://jekyllrb.com/"&gt;Jekyll&lt;/a&gt;, if you're into Ruby,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wordpress.com/"&gt;Wordpress&lt;/a&gt;, if you're into PHP or part of 33% of websites that have chosen it,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt;, if you're into Go,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gitbook.com/"&gt;GitBook&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/"&gt;Next&lt;/a&gt;, another one for React from &lt;a href="https://zeit.co/"&gt;Zeit&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nuxtjs.org/"&gt;Nuxt&lt;/a&gt;, using &lt;a href="https://vuejs.org/"&gt;VueJS&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;... &lt;a href="https://www.staticgen.com/"&gt;there are many others!&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Own your content
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;ownership of your own content forever&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In a way, every post on &lt;a href="https://lacourt.dev"&gt;lacourt.dev&lt;/a&gt; is my own content, but as &lt;a href="https://github.com/doppelganger9/blog/blob/master/LICENSE"&gt;everything is under MIT License&lt;/a&gt;, this can also be your's or anyone's.&lt;br&gt;
Some site could even use crawling robots to find it and publish it on their platform to monetize it.&lt;br&gt;
So my goal in the future is to find the best way to &lt;a href="https://dev.to/future/publishing-all-the-things"&gt;push my posts to other platforms&lt;/a&gt; (dev.to? Medium? others?) to spread the word, but bring everyone back here. Mainly because most of my posts are explaining how I'm constructing the infrastructure they rely on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security
&lt;/h2&gt;

&lt;p&gt;Gatsby is a &lt;a href="https://www.staticgen.com/gatsby"&gt;Static Site Generator&lt;/a&gt;. As the name implies, SSRs have fewer security issues when deployed on a live server, because, well, everything is static. You will not expose your API keys, API calls, or anything else, all the content is already included in the pages. Just don’t put your keys on GitHub and you’ll be ok 👌🏼&lt;/p&gt;

&lt;h2&gt;
  
  
  Why an SSG is a good fit
&lt;/h2&gt;

&lt;p&gt;I will be the main contributor &amp;amp; developer for this blog. Maybe you will contribute and that would be awesome! But I would still be the core maintainer. The website is a blog. This blog will not have many different pages. I don't need a full-fledged CMS. So a static site generator like Gatsby is a perfect fit for my use-case.&lt;/p&gt;

&lt;p&gt;Also, &lt;a href="https://dev.to/future/this-blog-is-100-PWA"&gt;the performance of a static website is 💯&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And I can host a simple stupid static website on a free service, no need for a big server with a database, etc. So fewer maintenance costs for me 💸&lt;/p&gt;

&lt;p&gt;See also &lt;a href="https://hackernoon.com/why-migrate-from-wordpress-to-a-static-site-generator-c9d46bd24710"&gt;this article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this post, I wanted to explain the choice for the technology stack for this blog. If it is not clear, well, maybe I should not have written it at 5am or you could help me with proof-reading 🤣&lt;/p&gt;

&lt;p&gt;Anyway, I learned a ton on the way and am quite satisfied with this blog as a result.&lt;/p&gt;

&lt;p&gt;I hope you too learned a few things.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for reading this article, If you have any questions, please use the comments below, or use Twitter: my DMs are open.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;👋&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>meta</category>
    </item>
    <item>
      <title>Hi, I'm David Lacourt</title>
      <dc:creator>David Lacourt</dc:creator>
      <pubDate>Fri, 21 Apr 2017 19:38:52 +0000</pubDate>
      <link>https://dev.to/doppelganger9/hi-im-david-lacourt</link>
      <guid>https://dev.to/doppelganger9/hi-im-david-lacourt</guid>
      <description>&lt;p&gt;I have been coding for 15 years.&lt;/p&gt;

&lt;p&gt;You can find me on GitHub as &lt;a href="https://github.com/doppelganger9" rel="noopener noreferrer"&gt;doppelganger9&lt;/a&gt; or Twitter also as &lt;a href="https://twitter.com/doppelganger9" rel="noopener noreferrer"&gt;doppelganger9&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I live in Senlis, in France.&lt;/p&gt;

&lt;p&gt;I work for &lt;a href="http://www.generali.fr" rel="noopener noreferrer"&gt;Generali France&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I mostly program in these languages: JavaScript (ES5, ES6, TypeScript), Java, Shell, ObjC.&lt;/p&gt;

&lt;p&gt;I am currently learning more about Algorithms, AI, GraphQL.&lt;/p&gt;

&lt;p&gt;I also like to learn new human languages : Italian, Japanese, Spanish, Russian...&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
