<?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: Olivier Dumas</title>
    <description>The latest articles on DEV Community by Olivier Dumas (@olivdums).</description>
    <link>https://dev.to/olivdums</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%2F263608%2F7c240af9-24dc-4473-a4a4-9d8b428845ab.jpeg</url>
      <title>DEV Community: Olivier Dumas</title>
      <link>https://dev.to/olivdums</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/olivdums"/>
    <language>en</language>
    <item>
      <title>🤬 Make users' input polite with PoliteText</title>
      <dc:creator>Olivier Dumas</dc:creator>
      <pubDate>Thu, 05 Nov 2020 14:53:43 +0000</pubDate>
      <link>https://dev.to/olivdums/make-users-input-polite-with-politetext-56b6</link>
      <guid>https://dev.to/olivdums/make-users-input-polite-with-politetext-56b6</guid>
      <description>&lt;p&gt;Hey devs ✌️,&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://stanza.dev?ref=gem"&gt;stanza.dev&lt;/a&gt; we help developers to share coding concepts and learn from each others. 👨‍💻 👩‍💻&lt;/p&gt;

&lt;p&gt;We can't monitor each post by hand but as Stanza must be a place full of love 🌞, we have developed a gem that removes the bad words from the website : &lt;a href="https://github.com/OpenGems/polite_text"&gt;polite_text&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Remove swear words 🤬
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;include PoliteText

str = "This gem is a fucking big shit but let's try it"

PoliteText.be_polite!(str)
=&amp;gt; "This gem is a *** big *** but let's try it"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Check if string is polite 🙅‍♂️ 🙅‍♀️
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;include PoliteText

str = "This gem is a fucking big shit but let's try it"

PoliteText.is_polite?(str)
=&amp;gt; false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example for an Article model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# == Schema Information
#
# Table name: articles
#
#  id         :bigint           not null, primary key
#  text      :string           default(""), not null
#  created_at :datetime         not null
#  updated_at :datetime         not null
#

class Article &amp;lt; ApplicationRecord
  include PoliteText

  # Callbacks
  before_save :make_text_polite

  # Methods
  def make_text_polite
    PoliteText.be_polite!(text)
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Custom swear words list 🌞
&lt;/h3&gt;

&lt;p&gt;You can even pass your custom swear words list that is relevant for your app.&lt;/p&gt;

&lt;p&gt;We have opensourced it and we hope that you will like it and contribute to improve it if you want 🙏&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://stanza.dev?ref=gem"&gt;stanza.dev&lt;/a&gt; - Learn coding concepts faster&lt;/p&gt;

&lt;p&gt;Access the gem repo &lt;a href="https://github.com/OpenGems/polite_text"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>codenewbie</category>
      <category>opensource</category>
    </item>
    <item>
      <title>✍️ Get awesome feedbacks from users</title>
      <dc:creator>Olivier Dumas</dc:creator>
      <pubDate>Mon, 19 Oct 2020 08:40:06 +0000</pubDate>
      <link>https://dev.to/olivdums/get-awesome-feedbacks-from-users-and-build-with-them-51kj</link>
      <guid>https://dev.to/olivdums/get-awesome-feedbacks-from-users-and-build-with-them-51kj</guid>
      <description>&lt;p&gt;I've always though that users must be placed right in the center of every feature development. 🧑‍💻 👨‍💻 👩‍💻&lt;/p&gt;

&lt;p&gt;While I was building the MVP of &lt;a href="https://www.stanza.dev?ref=devto"&gt;stanza.dev&lt;/a&gt; in one month, I took the time to add one page that will allow users to give feedbacks and report bugs.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Get feedbacks asap&lt;/strong&gt; 🙋‍♂️ 🙋‍♀️
&lt;/h1&gt;

&lt;p&gt;I'm sure this seems obvious for some people but it was not for me when I launched my firsts projects. 🤷‍♂️&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Protect yourself 🌞&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;As a developer it's &lt;strong&gt;way too easy&lt;/strong&gt; to build new features that we (sometimes) tend to forget our users. What seems cool for you is not always cool for your users...&lt;/p&gt;

&lt;p&gt;After coding an awesome feature for two weeks during the evening after your daily job, you deploy your new feature and no one cares. 🤯&lt;/p&gt;

&lt;p&gt;Build features without asking your users what they want is the best way to loose motivation, time, energy and quit.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Engage your users&lt;/strong&gt; 👷‍♂️ 👷‍♀️
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ep09SLwu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6kdny8szi8md0qyudw1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ep09SLwu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6kdny8szi8md0qyudw1w.png" alt="Alt Text" width="378" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine going on a website, ask for changes or for a feature that you wanna see and some weeks later it's online ! Magic right ? 💫&lt;/p&gt;

&lt;p&gt;Give this magic to your users, they will tell you what they want, you will work on that and they will give you love in return.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Turn haters into lovers&lt;/strong&gt; 👹 👺
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m5XzvhiN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hxc6s71q1xhw3pnvmqru.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m5XzvhiN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hxc6s71q1xhw3pnvmqru.png" alt="Alt Text" width="414" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok now imagine that you are on &lt;a href="https://www.stanza.dev?ref=devto"&gt;stanza.dev&lt;/a&gt; and something bother you so much, you're very angry and you have a way to express yourself.&lt;/p&gt;

&lt;p&gt;A few minutes later, you drop a message to Stanza to tell that this website is a piece of shit and you close the tab.&lt;/p&gt;

&lt;p&gt;A few days later, Stanza comes back to you with this brand new feature you wanted so much. And the magic comes again 💫&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Getting feedbacks&lt;/strong&gt; 👋
&lt;/h1&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Be everywhere&lt;/strong&gt; 👀
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BlwcDz2J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bbw2i0w4romb454hx1ov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BlwcDz2J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bbw2i0w4romb454hx1ov.png" alt="Alt Text" width="880" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your users should be able to give you their feedbacks (or express their hate) from everywhere on your website.&lt;/p&gt;

&lt;p&gt;I've chosen to add a button into the navbar and one other in the bottom left of the screen that scrolls with the content.&lt;/p&gt;

&lt;p&gt;I even added a button on my &lt;code&gt;/tags&lt;/code&gt; page as I thought some users would want to ask for more tags at this exact place.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ygkfMGVR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t1x7rl7wt4z9pc5nbuxu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ygkfMGVR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t1x7rl7wt4z9pc5nbuxu.png" alt="Alt Text" width="411" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ps: I've removed these buttons from the mobile view as my feedback page is not very nice on mobile (for now) and most of my users are on computer (for now), but I must allow mobile users to give feedbacks too asap.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;To do list&lt;/strong&gt; ✅
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mljgMnUu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r69h201cuxcanj5eadpb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mljgMnUu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r69h201cuxcanj5eadpb.png" alt="Alt Text" width="880" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The feedbacks page of &lt;a href="https://www.stanza.dev?ref=devto"&gt;stanza.dev&lt;/a&gt; looks like a to do list of four columns :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ideas&lt;/strong&gt; 💡 - Users can freely ask for what they want based on four tags (bugs, features, Ux, Ui).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, all users of Stanza can upvote any card if they think the issue is relevant. &lt;/p&gt;

&lt;p&gt;They can't do anything on the three following columns (apart from liking cards)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Todo&lt;/strong&gt; 👀 - What we will build asap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Doing&lt;/strong&gt; 💪 - What we are currently building.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Done&lt;/strong&gt; 🙌 - What we did.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Inform your users&lt;/strong&gt; 💬
&lt;/h4&gt;

&lt;p&gt;Every time a card goes from one column to another, &lt;a href="https://www.stanza.dev?ref=devto"&gt;stanza.dev&lt;/a&gt; sends an email to inform the user.&lt;/p&gt;

&lt;p&gt;These are very simple emails for the moment, to include the user into the building process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HmpbKOe9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3veqtba6zq0all1tnw3l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HmpbKOe9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3veqtba6zq0all1tnw3l.png" alt="Alt Text" width="552" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yRYpmXb6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0icga1ro2wsxpadlz0j1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yRYpmXb6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0icga1ro2wsxpadlz0j1.png" alt="Alt Text" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--plyVj-p7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b1v5mch08vfk2gxx7ksv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--plyVj-p7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b1v5mch08vfk2gxx7ksv.png" alt="Alt Text" width="552" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how we are getting users' feedbacks 24/7 while we are building &lt;a href="https://www.stanza.dev?ref=devto"&gt;stanza.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I am sure that a lot of things can be improved and will be changed over time but at least it's working 🤹‍♂️ 🤹‍♀️ &lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://www.stanza.dev?ref=devto"&gt;www.stanza.dev - Learn coding concepts faster.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title> 👀 From 0 to 81 sign ups in a day with Product Hunt</title>
      <dc:creator>Olivier Dumas</dc:creator>
      <pubDate>Sat, 10 Oct 2020 17:32:51 +0000</pubDate>
      <link>https://dev.to/olivdums/from-0-to-81-sign-ups-in-a-day-with-product-hunt-4obh</link>
      <guid>https://dev.to/olivdums/from-0-to-81-sign-ups-in-a-day-with-product-hunt-4obh</guid>
      <description>&lt;p&gt;As a developer I've always had a problem : Find new concepts to learn. 👨‍💻&lt;/p&gt;

&lt;p&gt;You can learn concepts at work with your colleagues, by contributing to open source projects or by reading articles like here. &lt;/p&gt;

&lt;p&gt;But not enough to appease this internal need to learn... &lt;/p&gt;

&lt;p&gt;I needed a faster way that could show me directly a concept and I will do the rest to learn it on my own (as I've been doing since the day I wrote my first line of code).&lt;/p&gt;

&lt;p&gt;Thus, I've built this website and named it &lt;a href="https://www.stanza.dev?ref=dev" rel="noopener noreferrer"&gt;Stanza.dev&lt;/a&gt; based on 3 simple points&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Short posts presenting a concept 🧑‍💻&lt;/li&gt;
&lt;li&gt;Illustrated with a code snippet ✍️&lt;/li&gt;
&lt;li&gt;With a reading list of articles to go further (DEV.to, Medium, etc.) 👀&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;After building my MVP in one month:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;ok let's show it to the world with the easiest way I know : Product Hunt&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw62gnqhgeo4b4tous2v2.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw62gnqhgeo4b4tous2v2.png" alt="First version of Stanza"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Preparing the launch&lt;/strong&gt; ✌️
&lt;/h2&gt;

&lt;p&gt;Product Hunt is very simple : every day you have a bunch of products that are published and people just upvote the ones they love.&lt;/p&gt;

&lt;h4&gt;
  
  
  Timezone 🌎 🌍 🌏
&lt;/h4&gt;

&lt;p&gt;Yep but actually I live in Europe and ProductHunt is based on US timezone. Thus, I programmed my post to be published at 00.02 am on the website and then remain 24hours online. Don't ask me why not 00.01, I just had a bad feeling about it ... 🤷‍♂️&lt;/p&gt;

&lt;h4&gt;
  
  
  Metrics 📈
&lt;/h4&gt;

&lt;p&gt;One of the most important thing before you launch : set up google analytics (or what you want) to get metrics.&lt;/p&gt;

&lt;h4&gt;
  
  
  Content 📷 ✍️ 🎊
&lt;/h4&gt;

&lt;p&gt;Many start ups are making very nice videos about their product, nice illustrations and animated gifs. &lt;/p&gt;

&lt;p&gt;I did none of that because it was out of my budget (0€) and I was in this kind of state that : If my product is useful for people they don't need all of this to try it.&lt;/p&gt;

&lt;p&gt;I have to say that Stanza.dev is a side project for me, not a big startup, but if you have the budget or a very complexe product maybe it's better to add all this branding magic on you post. ✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Three screenshot later I was ready 🙈&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Launch&lt;/strong&gt; 🚀
&lt;/h2&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3u6tyjrgh1hsnmz00x70.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3u6tyjrgh1hsnmz00x70.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I woke up and just wait that my post was published automatically at 00.02am (us timezone).&lt;/p&gt;

&lt;h4&gt;
  
  
  Getting more upvotes 🙋‍♂️ 🙋‍♀️
&lt;/h4&gt;

&lt;p&gt;I had the chance to remain on the front page the whole day ! If not you go directly in the "see more" list and of course you reach less people.&lt;/p&gt;

&lt;p&gt;I had some traffic but I did something after a few hours that increased my number of votes : &lt;/p&gt;

&lt;p&gt;ProductHunt gives you an embed link that shows a button on your site saying you are on ProductHunt. People coming from ProductHunt will go to your website and then it's like a reminder saying "Hey don't forget to upvote Stanza if you like it !". And I can't give you numbers here (as I don't remember) but I've seen the number of votes increasing.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fykretvphepwr24e2yoeb.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fykretvphepwr24e2yoeb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Getting more signups 🤙
&lt;/h4&gt;

&lt;p&gt;I had more people coming to Stanza.dev, a few of them were singing up but I did something that changed radically the signup ratio between visitors and people who actually signed up : I showed to them that other developers were signing up.&lt;/p&gt;

&lt;p&gt;I've added the github avatar of the last registered users on the main page and I think that visitors got a more "community experience" than before. &lt;/p&gt;

&lt;p&gt;Once I did that, I've seen more people creating accounts and sharing coding concepts.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft2mhhcachupdadm67u0u.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ft2mhhcachupdadm67u0u.png" alt="Alt Text"&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5tkrv9iowwvtvvc3yqrc.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5tkrv9iowwvtvvc3yqrc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Global metrics&lt;/strong&gt; 🧑‍🏫
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Total traffic 🛵 🛺
&lt;/h4&gt;

&lt;p&gt;I've got around 720 users during the 24hours of my post (there are still more users coming two days after). You can generate much more traffic than me but still I am very happy with this number !&lt;/p&gt;

&lt;h4&gt;
  
  
  Total signups ✅
&lt;/h4&gt;

&lt;p&gt;I had zero users on my website when I launched (just me), and in 24hours I got 81 other developers signing up. In other words, 11,25% of visitors that came to stanza.dev signed up.&lt;/p&gt;

&lt;h5&gt;
  
  
  Two days after 🕒
&lt;/h5&gt;

&lt;p&gt;We are now 96 developers on Stanza, sharing our best coding concept together thanks to ProductHunt.&lt;/p&gt;

&lt;p&gt;Feel free to join us 👉 &lt;a href="https://www.stanza.dev?ref=dev" rel="noopener noreferrer"&gt;https://stanza.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See you on &lt;a href="https://www.stanza.dev?ref=dev" rel="noopener noreferrer"&gt;https://stanza.dev&lt;/a&gt; 😘&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Learn new coding concepts faster</title>
      <dc:creator>Olivier Dumas</dc:creator>
      <pubDate>Tue, 06 Oct 2020 07:37:27 +0000</pubDate>
      <link>https://dev.to/olivdums/learn-new-coding-concepts-faster-4k0i</link>
      <guid>https://dev.to/olivdums/learn-new-coding-concepts-faster-4k0i</guid>
      <description>&lt;p&gt;Hey everyone 👋, &lt;/p&gt;

&lt;p&gt;We believe that looking for new coding concepts is not such an easy task even for experienced developers so we've built &lt;a href="https://www.stanza.dev"&gt;stanza.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is not a blogging platform as DEV.to or Medium, it's only a place were you share some coding concepts illustrated by code snippets and you can add a reading list referencing the best blog posts to go deeper.&lt;/p&gt;

&lt;p&gt;👉 We are looking for our first contributors in every programming languages, so if you like our project and want to support us, please feel free to contribute :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.stanza.dev"&gt;https://www.stanza.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What I didn’t know about Ruby Classes</title>
      <dc:creator>Olivier Dumas</dc:creator>
      <pubDate>Sun, 23 Aug 2020 12:41:01 +0000</pubDate>
      <link>https://dev.to/olivdums/what-i-didn-t-know-about-ruby-classes-48bd</link>
      <guid>https://dev.to/olivdums/what-i-didn-t-know-about-ruby-classes-48bd</guid>
      <description>&lt;p&gt;I use to write things in order to learn them so here is a series of short articles about what I didn’t know.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The class Class&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The class Class inherits directly from Module, and adds to it all the behavior related to instances. Long story short, Modules are used to add methods to one or several Classes of your app, and Classes are used to managed your objects’ properties.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jRWrMo-p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zumg1h4gajl6hqwfd2ne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jRWrMo-p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zumg1h4gajl6hqwfd2ne.png" alt="Alt Text" width="880" height="427"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Ps: This diagram is very very very minimalist and focus on Class, but Module and Object have a lot of other children.&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Classes and ancestors&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In order to see the the ancestor of a Class, you can use the .superclass method :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; Class.superclass
=&amp;gt; Module

&amp;gt;&amp;gt; Module.superclass
=&amp;gt; Object
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if you want to see all the superclasses of a particular class, you can use the .ancestors method :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; Class.ancestors
=&amp;gt; [Class, Module, Object, Kernel, BasicObject]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the array includes all the superclasses of Class and this is what we call the ancestor chain in ruby.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Classes are constants&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In Ruby, when you define a new class, you are actually creating an instance of the class Class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Foo
end

&amp;gt;&amp;gt; Foo.class
=&amp;gt; Class
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, here, we have just created a new class named Foo, which is an instance of the class Class and we can access to this instance by using the contant Foo.&lt;br&gt;
Following this logic, we can see that we could have created Foo like a casual object :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Foo = Class.new

&amp;gt;&amp;gt; Foo.class
=&amp;gt; Class
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;How does Ruby looks for a method ?&lt;/strong&gt;
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MyExample   
 def say_hello
   puts 'hello world'
 end
end

&amp;gt;&amp;gt; MyExample.ancestors
=&amp;gt; [MyExample, Object, Kernel, BasicObject]

&amp;gt;&amp;gt; MyExample.new.say_hello
=&amp;gt; hello world

&amp;gt;&amp;gt; MyExample.new.say_good_bye
=&amp;gt; NoMethodError
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;say_hello : When we call the say_hello method on an instance of the MyExample class, Ruby looks through the MyExample class for a method named say_hello, it finds it and return the appropriate result.&lt;/p&gt;

&lt;p&gt;say_good_bye : If I call a say_good_bye method, ruby will look into MyExample for this method, it will not find it and then it will goes through the ancestor chain passing through each parent at a time until BasicObject to find a method called say_good_bye.&lt;/p&gt;

&lt;p&gt;Because the say_good_bye method doesn’t exist in the MyExample class or any of the ancestors, Ruby will return a NoMethodError.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Include and Extend your Classes&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Adding a Module’s code to a Class can be done using the include, extend and prepend methods. Let’s focus on the two firsts as they are much more commons.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Include&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ruby-doc.com/docs/ProgrammingRuby/html/classes.html"&gt;As the doc says&lt;/a&gt; When a class includes a module, module’s instance methods become available as instance methods of the class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module RandomModule
  def say_thank_you
    puts 'thank you'  
  end
end

class RandomClass   
 include RandomModule
end

&amp;gt;&amp;gt; RandomClass.new.say_thank_you
=&amp;gt; thank you

&amp;gt;&amp;gt; RandomClass.ancestors
=&amp;gt; [RandomClass, RandomModule, Object, Kernel, BasicObject]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here you can also see that if we check the ancestor chain of our RandomClass, the RandomModule appears !&lt;/p&gt;

&lt;p&gt;As we saw earlier, when we call the module’s method (say_thank_you), Ruby will check in our RandomClass class for the method, it will not find it so Ruby will go through each of the ancestors of the RandomClass class in order to find the method.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Extend&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I’ve always found obscure the difference between extend and include, but they are actually very different : extend adds the module’s method as class methods and not instance methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module RandomModule
  def say_thank_you
    puts 'thank you'  
  end
end

class RandomClass   
 extend RandomModule
end

&amp;gt;&amp;gt; RandomClass.new.say_thank_you
=&amp;gt; NoMethodError

&amp;gt;&amp;gt; RandomClass.say_thank_you
=&amp;gt; thank you

&amp;gt;&amp;gt; RandomClass.ancestors
=&amp;gt; [RandomClass, Object, Kernel, BasicObject]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the module is mixed with our RandomClass, and it’s methods are not accessible at the instance level (RandomClass.new.method) but at the class level (RandomClass.method).&lt;/p&gt;

&lt;p&gt;You can even use extend on one particular instance :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module RandomModule
  def say_thank_you
    puts 'thank you'  
  end
end

class RandomClass
end

&amp;gt;&amp;gt; RandomClass.new.say_thank_you
=&amp;gt; NoMethodError

&amp;gt;&amp;gt; new_instance = RandomClass.new
&amp;gt;&amp;gt; new_instance.extend RandomModule
&amp;gt;&amp;gt; new_instance.say_thank_you
=&amp;gt; thank you
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;Classes are open&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;It means that you can always add and edit methods of a particular ancestor class. You can do it for classes that you have created yourself or even from classes which are part of Ruby.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class String
  def tell_my_size
    self.size
  end

  def reverse
    self.size
  end
end

&amp;gt;&amp;gt; my_string = 'hello world'
&amp;gt;&amp;gt; my_string.tell_my_size
=&amp;gt; 11

&amp;gt;&amp;gt; my_string.reverse
=&amp;gt; 11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have added a new method to the String class and we have changed the behavior of the reverse method.&lt;br&gt;
Note that it is of course dangerous to override other Classes this way ! Be very careful by doing so and always prefer to edit the existing classes directly.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The last word&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;I know there are lots of other concepts around Classes but that’s all for this article, feel free to improve my explanation in the comments, I might add more concepts here in the future 👋&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What I didn’t know about Ruby Numbers</title>
      <dc:creator>Olivier Dumas</dc:creator>
      <pubDate>Tue, 18 Aug 2020 08:54:36 +0000</pubDate>
      <link>https://dev.to/olivdums/what-i-didn-t-know-about-ruby-numbers-5g0j</link>
      <guid>https://dev.to/olivdums/what-i-didn-t-know-about-ruby-numbers-5g0j</guid>
      <description>&lt;p&gt;I use to write things in order to learn them so here is a series of short articles about what I didn’t know.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Numeric Class
&lt;/h1&gt;

&lt;p&gt;In Ruby, what we call “numbers” are all objects from the Numeric class as we can see on the following diagram :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TbY4oMOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h953ju6thypplt3ktsgr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TbY4oMOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/h953ju6thypplt3ktsgr.png" alt="Alt Text" width="880" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Fixnum and Bignum
&lt;/h1&gt;

&lt;p&gt;Fixnum are representing small integers and Bignum are representing big integers. As the doc says : “Holds Integer values that can be represented in a native machine word (minus 1 bit).”&lt;/p&gt;

&lt;p&gt;Since ruby 2.4, Fixnum and Bignum are unified under the Integer class, so depending on your ruby version, you will get a different behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Before Ruby 2.4
&amp;gt;&amp;gt; 3.class
=&amp;gt; Fixnum
&amp;gt;&amp;gt; 30000000000000.class 
=&amp;gt; Bignum
# After Ruby 2.4
&amp;gt;&amp;gt; 3.class 
=&amp;gt; Integer
&amp;gt;&amp;gt; 30000000000000.class
=&amp;gt; Integer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Use underscores to improve your readability
&lt;/h1&gt;

&lt;p&gt;You can use underscores to get more readable numbers when they reach one thousand.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; 1_000 + 1
=&amp;gt; 1001
1_350_800 - 1_000_000
=&amp;gt; 350800
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Divmod vs Modulo operators
&lt;/h1&gt;

&lt;p&gt;As the doc specifies, Divmod is a method that returns an array containing the quotient and modulus obtained by dividing num by numeric., in other words :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; 13.divmod(3)
=&amp;gt; [4, 1]
# The quotient 4 means that we get 4 times 3 in 13 (4 * 3 = 12) and it rests 1 (12 + 1 = 13).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the modulo operator (%) with positive values is pretty easy to understand as it gives you the rest of a division :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; 13%3
=&amp;gt; 1
&amp;gt;&amp;gt; 13.modulo(3) 
=&amp;gt; 1
# it is equivalent to 13.divmod(3)[1]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but using it with negative values can be really complicated. I am not going to explain it deeper here and I prefer to give you some resources that will do it far better than me :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/24074869/why-is-the-behavior-of-the-modulo-operator-different-between-c-and-ruby-for"&gt;Why is the behavior of the modulo operator (%) different between C and Ruby for negative integers?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@tannrallard/exploring-the-difference-between-modulus-and-remainder-in-rubys-numeric-class-65eb8b50a4b8"&gt;Exploring the difference between modulus and remainder in Ruby’s Numeric class&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Floats are not exact …
&lt;/h1&gt;

&lt;p&gt;Every developer knows that float are decimal numbers but I didn’t know that floats were inexact real numbers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; 4.0 - 3.1 == 0.9
=&amp;gt; false
&amp;gt;&amp;gt; 4.0 - 3.1 
=&amp;gt; 0.8999999999999999
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is due to the limited number of bytes that can store a Float, so sometimes a Float is not exactly equals to what you think… And here comes the BigDecimal class.&lt;/p&gt;

&lt;h1&gt;
  
  
  … but BigDecimals are
&lt;/h1&gt;

&lt;p&gt;BigDecimal provides arbitrary-precision floating point decimal arithmetic. In some precise cases, you will need to use BigDecimal in order to overcome the inexactitude of floats.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; require 'bigdecimal'
=&amp;gt; true
&amp;gt;&amp;gt; BigDecimal('4.0') - BigDecimal('3.1') == 0.9
=&amp;gt; true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Rationals
&lt;/h1&gt;

&lt;p&gt;The docs says that a rational number can be represented as a pair of integer numbers: a/b (b&amp;gt;0), where a is the numerator and b is the denominator. In other words, rationals are similar to fractions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; (2/3).class
=&amp;gt; Integer
&amp;gt;&amp;gt; (2/3r).class
=&amp;gt; Rational
&amp;gt;&amp;gt; 1.5.to_r
=&amp;gt; (3/2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can run all the “+”, “ /”, “-” and “*” operations between Rationals&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt; (1/8r) + (7/8r)
=&amp;gt; (1/1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  The last word
&lt;/h1&gt;

&lt;p&gt;I know there are lots of other concepts around the Numeric class but that’s all for this article, feel free to improve my explanation in the comments, I might add more concepts here in the future 👋&lt;/p&gt;

&lt;p&gt;Connect with me :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/olivier_dms"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/DumasOlivier"&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
