<?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: Crosson David</title>
    <description>The latest articles on DEV Community by Crosson David (@dacr).</description>
    <link>https://dev.to/dacr</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%2F474354%2Fd07c3c26-5875-4e7b-ab78-f328ec4abf04.jpeg</url>
      <title>DEV Community: Crosson David</title>
      <link>https://dev.to/dacr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dacr"/>
    <language>en</language>
    <item>
      <title>A Software to publish good code examples</title>
      <dc:creator>Crosson David</dc:creator>
      <pubDate>Sun, 25 Oct 2020 21:17:12 +0000</pubDate>
      <link>https://dev.to/dacr/a-software-to-publish-good-code-examples-3pbf</link>
      <guid>https://dev.to/dacr/a-software-to-publish-good-code-examples-3pbf</guid>
      <description>&lt;p&gt;Code example manager (CEM) is a software tool which manage your code examples and provide publish mechanisms to &lt;a href="https://github.com/"&gt;github.com&lt;/a&gt; (&lt;a href="https://docs.github.com/en/github/writing-on-github/creating-gists"&gt;gists&lt;/a&gt;) or &lt;a href="https://gitlab.com/"&gt;gitlab.com&lt;/a&gt; (&lt;a href="https://docs.gitlab.com/ce/user/snippets.html"&gt;snippets&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Current &lt;a href="https://github.com/dacr/code-examples-manager"&gt;Code example manager (CEM)&lt;/a&gt; implementation is just a command line tool which compare locally available examples with already published ones in order to find what it should do (add, update, do nothing). &lt;/p&gt;

&lt;p&gt;All my code examples (my programming knowledge base) are now shared using this tool, you can take a look to &lt;a href="https://gist.github.com/c071a7b7d3de633281cbe84a34be47f1"&gt;my public gists overview on github&lt;/a&gt; to illustrate the publishing work achieved by CEM. &lt;/p&gt;

</description>
      <category>coding</category>
      <category>examples</category>
      <category>codeexamplesmanager</category>
      <category>sharing</category>
    </item>
    <item>
      <title>The rules for good code examples</title>
      <dc:creator>Crosson David</dc:creator>
      <pubDate>Sun, 25 Oct 2020 21:09:57 +0000</pubDate>
      <link>https://dev.to/dacr/the-rules-for-good-code-examples-2cgk</link>
      <guid>https://dev.to/dacr/the-rules-for-good-code-examples-2cgk</guid>
      <description>&lt;h1&gt;
  
  
  &lt;a href="https://github.com/dacr/the-rules-for-good-code-examples"&gt;The rules for good code examples&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Code examples are very important, each example is most of the time designed to focus on a particular feature/characteristic of a programming language, a library or a framework.&lt;br&gt;
They help us to quickly test, experiment and remember how bigger project or at least some parts of them are working.&lt;/p&gt;

&lt;p&gt;Learning or remembering is much quicker when you have at your disposal your own set of examples. This set of examples is a &lt;strong&gt;knowledge asset&lt;/strong&gt;, we must become aware of its value for us but also from a project team point of view.&lt;/p&gt;

&lt;p&gt;Being aware of this knowledge asset means that you should establish and follow some simple rules which will help you or your project team to valorize this asset.&lt;/p&gt;
&lt;h2&gt;
  
  
  Simple rules for good code examples
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One purpose&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limited size&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Runnable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exploratory compatible&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Self-describing&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manage and share&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When writing source code examples, try to take into account the maximum number of those rules in order to implement the best possible examples. &lt;/p&gt;
&lt;h3&gt;
  
  
  One purpose rule
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A good code example has one purpose&lt;/strong&gt; such as learning the basics of a programming language (the typical &lt;code&gt;println("Hello world")&lt;/code&gt; example) or experimenting/testing a library or framework.&lt;/p&gt;

&lt;p&gt;It can also be used to illustrate how you can achieve one feature, for example &lt;code&gt;date -u +"%Y-%m-%dT%H:%M:%S.%3NZ"&lt;/code&gt; is a linux date command usage example which prints a date/time in the ISO8601 standard date format.&lt;/p&gt;
&lt;h3&gt;
  
  
  Limited size rule
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1 example in 1 single file&lt;/strong&gt; (when possible) helps to limit the overall example size as well as it simplifies greatly the sharing.&lt;/p&gt;

&lt;p&gt;Try to keep each source code example as short as possible, if over the time one example becomes larger and larger, try to split it into several examples, it may also mean you need to drop the example format and switch to a dedicated project organization.&lt;/p&gt;

&lt;p&gt;A good approach is to always start small through a source code example. When you want to enhance/refactor your initial example and probably add some complexities, create a copy of your example and make your changes, it is very important to keep your first iterations as they will retain the simplest aspects of what was your successive intentions.   &lt;/p&gt;
&lt;h3&gt;
  
  
  Runnable rule
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Your example self-contains all information required to run it&lt;/strong&gt;, so it means that &lt;strong&gt;it must provide&lt;/strong&gt; the following information :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what are the &lt;strong&gt;runtime prerequisites&lt;/strong&gt; such as python, jshell, ammonite, bash, julia,...

&lt;ul&gt;
&lt;li&gt;while giving precise release information if required such as python-3, java-15&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;what are its required &lt;strong&gt;software dependencies&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;linux packages required to run this bash script example&lt;/li&gt;
&lt;li&gt;python modules to install before trying to run the example&lt;/li&gt;
&lt;li&gt;maven/classpath required packages&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The minimum thing to do is to add comments in your example which list the required runtime and dependencies information. You can also use a &lt;a href="https://en.wikipedia.org/wiki/Shebang_(Unix)"&gt;shebang&lt;/a&gt; to make your example directly executable while giving to the reading the information about how it is executed.&lt;/p&gt;

&lt;p&gt;It is also important that your example &lt;em&gt;prints&lt;/em&gt; something, for a function, add some usage example with printed results.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#!/usr/bin/env python3
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'1+2='&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A very good developer experience is achieved when you use the &lt;a href="https://ammonite.io/"&gt;ammonite&lt;/a&gt; REPL as it is able to load software dependencies at runtime !&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scala"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;$ivy.&lt;/span&gt;&lt;span class="n"&gt;`com.lihaoyi::requests:0.6.5`&lt;/span&gt;
&lt;span class="nv"&gt;requests&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;get&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"https://httpbin.org/get"&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="py"&gt;lines&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="py"&gt;foreach&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Exploratory compatible rule
&lt;/h3&gt;

&lt;p&gt;When a read-eval-print-loop (REPL) can be used with your example, organize your example in a way that it is &lt;strong&gt;easy to copy/paste the example in a REPL session&lt;/strong&gt; for interactive&lt;br&gt;
exploratory live experiments.&lt;/p&gt;

&lt;p&gt;For one-liner example this is trivial, with longer examples it may add some constraints depending of your technological choices, so while writing your example, use a REPL session&lt;br&gt;
interactivly to check how it behaves and also to help you enhance your code example.&lt;/p&gt;

&lt;p&gt;For example for python don't forget to add an empty line after each function definition.&lt;/p&gt;
&lt;h3&gt;
  
  
  Self-describing rule
&lt;/h3&gt;

&lt;p&gt;When it makes sense, design your example to make its execution self-describing, this is quite simple when you &lt;strong&gt;use a unit test framework&lt;/strong&gt; as most of them can generate a report. If you use &lt;em&gt;specification&lt;/em&gt; oriented unit tests, it becomes trivial as you can see in the following example output :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;split
- should be able to split in 2 parts using the last dot thanks to zero-width positive lookahead regexp
- should be able to split on characters while preserving those characters
regexp
- should allow partial matching
- should be possible to use named arguments
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which is generated by the following example script, a runnable example with flat specification output brought by the &lt;a href="https://www.scalatest.org/"&gt;scalatest&lt;/a&gt; unit test framework :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scala"&gt;&lt;code&gt;&lt;span class="o"&gt;#!/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt; &lt;span class="n"&gt;amm&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;$ivy.&lt;/span&gt;&lt;span class="n"&gt;`org.scalatest::scalatest:3.2.2`&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.scalatest._&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;flatspec&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;_&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="nv"&gt;matchers&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;_&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;  &lt;span class="nv"&gt;OptionValues&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;_&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;java.util.Locale&lt;/span&gt;
&lt;span class="k"&gt;object&lt;/span&gt; &lt;span class="nc"&gt;StringOperations&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;AnyFlatSpec&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nv"&gt;should&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Matchers&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s"&gt;"split"&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="s"&gt;"be able to split in 2 parts using the last dot thanks to zero-width positive lookahead regexp"&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;val&lt;/span&gt; &lt;span class="nv"&gt;aType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ab.cd.de"&lt;/span&gt;
    &lt;span class="k"&gt;val&lt;/span&gt; &lt;span class="nv"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;aPackage&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;aClassName&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;aType&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;split&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"[.](?=[^.]*$)"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;aPackage&lt;/span&gt; &lt;span class="n"&gt;shouldBe&lt;/span&gt; &lt;span class="s"&gt;"ab.cd"&lt;/span&gt;
    &lt;span class="n"&gt;aClassName&lt;/span&gt; &lt;span class="n"&gt;shouldBe&lt;/span&gt; &lt;span class="s"&gt;"de"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;

  &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="s"&gt;"be able to split on characters while preserving those characters"&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;val&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="k"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"abc. truc? blah, blu."&lt;/span&gt;
    &lt;span class="nv"&gt;in&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;split&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"""\s*(?&amp;lt;=[?.,])\s*"""&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="py"&gt;toList&lt;/span&gt; &lt;span class="n"&gt;shouldBe&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"abc."&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"truc?"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"blah,"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"blu."&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="s"&gt;"regexp"&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="s"&gt;"allow partial matching"&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;val&lt;/span&gt; &lt;span class="nv"&gt;MyRE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"TO(.*)TA"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;r&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;unanchored&lt;/span&gt;
    &lt;span class="s"&gt;"xxTOTUTAxx"&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;MyRE&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inside&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;inside&lt;/span&gt; &lt;span class="n"&gt;shouldBe&lt;/span&gt; &lt;span class="s"&gt;"TU"&lt;/span&gt;
      &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="k"&gt;_&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;fail&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="n"&gt;should&lt;/span&gt; &lt;span class="s"&gt;"be possible to use named arguments"&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;val&lt;/span&gt; &lt;span class="nv"&gt;MyRE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"TO(?&amp;lt;in&amp;gt;.*)TA"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;r&lt;/span&gt;
    &lt;span class="k"&gt;val&lt;/span&gt; &lt;span class="nv"&gt;sample&lt;/span&gt; &lt;span class="k"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"TOTUTA"&lt;/span&gt;
    &lt;span class="nv"&gt;MyRE&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;findFirstMatchIn&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="py"&gt;map&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;_&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;group&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"in"&lt;/span&gt;&lt;span class="o"&gt;)).&lt;/span&gt;&lt;span class="py"&gt;value&lt;/span&gt; &lt;span class="n"&gt;shouldBe&lt;/span&gt; &lt;span class="s"&gt;"TU"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="nv"&gt;StringOperations&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="py"&gt;execute&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;So when executed, the output describes exactly what it does, and even more, as this is unit tests based it will&lt;br&gt;
fail until you give the right implementation ! Or until you've understood what's going on ;)&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Manage and share rule
&lt;/h3&gt;

&lt;p&gt;Once you've written dozens of examples, you'll quickly need to industrialize their life cycle. It will mean :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how to share them ? Publicly or internally ? &lt;/li&gt;
&lt;li&gt;how to let people react over them ?&lt;/li&gt;
&lt;li&gt;how to manage their change history ?&lt;/li&gt;
&lt;li&gt;how to write them from your perspective or from the team one ?&lt;/li&gt;
&lt;li&gt;how to search through your examples ?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this require some good practices, and tooling. Among the good practices one of the most important one is to insert within each of your example some meta-data in order to give more insights about it. You can add several meta-data fields such as a short description, a keyword list, some licensing information, ... which will greatly help your examples life-cycle management. &lt;/p&gt;

&lt;p&gt;In fact this is quite easy thanks to :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GIT repository to store all your examples

&lt;ul&gt;
&lt;li&gt;store your examples or your team collective examples inside a GIT repository&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://gitlab.com/explore/snippets"&gt;Gitlab snippets&lt;/a&gt;/&lt;a href="https://gist.github.com/"&gt;Github gists&lt;/a&gt; solutions to share small code example, as they

&lt;ul&gt;
&lt;li&gt;give an easy way to publish and share any numbers of examples&lt;/li&gt;
&lt;li&gt;provide user interactions for each example (comments, starring, ...)&lt;/li&gt;
&lt;li&gt;provide a search engine&lt;/li&gt;
&lt;li&gt;store the history of all exampleschanges&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;And it becomes even easier by using the &lt;a href="https://github.com/dacr/code-examples-manager"&gt;code-examples-manager&lt;/a&gt; project

&lt;ul&gt;
&lt;li&gt;it automates everything, and becomes mandatory as soon as you have dozens of examples. &lt;/li&gt;
&lt;li&gt;Take a look to my publicly &lt;a href="https://gist.github.com/dacr/c071a7b7d3de633281cbe84a34be47f1"&gt;shared examples knowledge bases&lt;/a&gt;
to have a good idea of what it does.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8QoPaPT9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/v1/images/cem-keywords.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8QoPaPT9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/v1/images/cem-keywords.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>coding</category>
      <category>examples</category>
      <category>rules</category>
      <category>codeexamplesmanager</category>
    </item>
  </channel>
</rss>
