diff options
author | Loïc Hoguin <[email protected]> | 2017-03-26 12:37:17 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-03-26 12:37:17 +0200 |
commit | 65b900e73c1875e4fdb136f6e6fd517c9e5922c6 (patch) | |
tree | 9377fa19f957a286dae2e7f5e179dcc939ab6207 /articles/index.xml | |
parent | ade8a523dd6afe21f169a3f41cd78cc1ba730c74 (diff) | |
download | ninenines.eu-65b900e73c1875e4fdb136f6e6fd517c9e5922c6.tar.gz ninenines.eu-65b900e73c1875e4fdb136f6e6fd517c9e5922c6.tar.bz2 ninenines.eu-65b900e73c1875e4fdb136f6e6fd517c9e5922c6.zip |
New article: the elephant in the room
Diffstat (limited to 'articles/index.xml')
-rw-r--r-- | articles/index.xml | 283 |
1 files changed, 143 insertions, 140 deletions
diff --git a/articles/index.xml b/articles/index.xml index dbb9bb8f..70dc98a5 100644 --- a/articles/index.xml +++ b/articles/index.xml @@ -6,10 +6,152 @@ <description>Recent content in Articles-rsses on Nine Nines</description> <generator>Hugo -- gohugo.io</generator> <language>en-us</language> - <lastBuildDate>Sun, 22 Jan 2017 00:00:00 +0100</lastBuildDate> + <lastBuildDate>Sun, 26 Mar 2017 00:00:00 +0100</lastBuildDate> <atom:link href="https://ninenines.eu/articles/index.xml" rel="self" type="application/rss+xml" /> <item> + <title>The elephant in the room</title> + <link>https://ninenines.eu/articles/the-elephant-in-the-room/</link> + <pubDate>Sun, 26 Mar 2017 00:00:00 +0100</pubDate> + + <guid>https://ninenines.eu/articles/the-elephant-in-the-room/</guid> + <description><div class="paragraph"><p>Have you ever tried telling someone why they should use
+Erlang? You boast the smaller code size, the auto healing
+mechanisms, the distribution and they seem really excited.
+They wonder why they never heard about Erlang before. And
+then you show them what the code looks like. All excitement
+goes away. The smiles disappear. Their face starts
+becoming really serious.</p></div>
+<div class="paragraph"><p>You lost them. You know you lost them. They comment on the
+syntax, or perhaps you do, already admitting defeat. It&#8217;s
+unlike anything they have ever used before. And they will
+most likely end up not using it.</p></div>
+<div class="paragraph"><p>What about people who already know what the syntax looks
+like? As soon as you mention Erlang, the topic of the syntax
+comes in. It&#8217;s like nothing else matters.</p></div>
+<div class="paragraph"><p>Perhaps the topic of syntax didn&#8217;t come up. But they&#8217;re
+still not going to try Erlang because of it.</p></div>
+<div class="paragraph"><p>You&#8217;re probably not having these kinds of interactions at
+Erlang conferences. This doesn&#8217;t happen with people who are
+already somewhat interested in, or need, the features that
+Erlang provides. With them the syntax is at worst a minor
+inconvenience.</p></div>
+<div class="paragraph"><p>This happens because most developers are familiar with
+syntaxes that look nothing like Erlang. To be clear, I
+include language features and other concepts like objects
+as part of "syntax" here. Familiarity is a very important
+factor to drive adoption.</p></div>
+<div class="paragraph"><p>You can see an example of that in the Elixir world, where
+the majority of people come from Ruby or already knew and
+liked Ruby. The 2016 survey tells us that 59% of Elixir
+developers were using Ruby primarily before. That&#8217;s in
+large part because of the syntax. They will deny it of
+course and find other reasons. And yet, we don&#8217;t see such
+a strong adoption of Erlang from Ruby developers, before
+or after Elixir appeared.</p></div>
+<div class="paragraph"><p>Side note: have you ever wondered why the Elixir community
+is, I quote, much friendlier than the Ruby community?
+Despite having much of the same people?</p></div>
+<div class="paragraph"><p>Before we continue, let me be clear. I love the Erlang
+syntax. It is simple and explicit. It is powerful, especially
+when dealing with binary data. It has very few quirks.
+It has little to no ambiguity. It&#8217;s great. Except for
+persuading people to use it.</p></div>
+<div class="paragraph"><p>Over the years I have been writing Erlang, I have seen
+very few people point out that the syntax slows down
+adoption. We have no problem with it, so why would others?
+At the same time, people coming to Erlang come to solve
+a real problem they&#8217;re having, so the syntax is fairly
+secondary. Even if they hate it at first, they know they
+can solve their problems despite the syntax.</p></div>
+<div class="paragraph"><p>You don&#8217;t build a popular product or language by solving
+people&#8217;s problems though. In general you end up solving
+some problems and creating new problems. No, you build
+a popular product by <strong>convincing people to use it</strong>. And
+you make them stay with your product by making them
+<strong>commit</strong> to using it.</p></div>
+<div class="paragraph"><p>Take MongoDB for example. It didn&#8217;t become popular by
+working, or even by being practical. It wasn&#8217;t performing
+its primary function and was losing people&#8217;s data. That
+didn&#8217;t stop it from becoming popular. Smart people would
+knowingly use a database that was losing data. Think about
+that for a minute.</p></div>
+<div class="paragraph"><p>MongoDB of course had a huge marketing machine, and they
+focused on that. They helped organize many meetups all
+over the world, complete with various swag items given
+for free, including a small handbook about MongoDB. All
+people had to do was show up.</p></div>
+<div class="paragraph"><p>They didn&#8217;t go tell people to look at all the weaknesses
+their product had. They focused on the strengths. On
+what would convince people to try it. People would go
+to meetups, discuss with people, commit to try it (or
+try it at meetups directly), and by doing so sell MongoDB
+to themselves.</p></div>
+<div class="paragraph"><p>How do we get people to meetups though? That&#8217;d be the
+first step: you need to <strong>catch people&#8217;s attention</strong>.
+I believe MongoDB did this using benchmark results.
+Ironic isn&#8217;t it? MongoDB gets fast benchmark results
+because they lose data, and this gets everyone to buy
+into the product.</p></div>
+<div class="paragraph"><p>The key points to remember about this are:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+catch people&#8217;s attention
+</p>
+</li>
+<li>
+<p>
+show your product&#8217;s strengths
+</p>
+</li>
+<li>
+<p>
+make people take a commitment
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Once they commit to something, you win. Everyone will not
+end up ultimately using your product of course, but it&#8217;s
+at the very least become a consideration. It&#8217;s on their
+mind. Their resolve will be stronger when they ultimately
+try it and inevitably run into issues.</p></div>
+<div class="paragraph"><p>Erlang&#8217;s syntax is a weakness. Almost nobody looks at the
+Erlang syntax and falls in love with it at first sight.
+No, it takes time to learn it and understand how good it
+is. You need to sell Erlang to people without showing
+the Erlang syntax. If you do show it, then you need to
+hide the parts that feel alien. Function calls are OK.
+Recursion, not so much. Maps are OK. Records, not.</p></div>
+<div class="paragraph"><p>Avoiding code is not always possible when you try
+to sell it, especially to developers. You can however
+prepare them to accept the alien syntax by admitting
+that the syntax is not perfect before you show it.
+You can do this while praising it at the same time.
+For example, "the syntax is a little out there, but
+it matches the concepts perfectly, it will all make
+sense when you start learning".</p></div>
+<div class="paragraph"><p>This might not be the best introduction. Someone will
+need to A/B test it to find the one that gives the
+best results. But that should give you ideas.</p></div>
+<div class="paragraph"><p>When something terrible happens, mentioning that this
+isn&#8217;t the end of the world <strong>before</strong> you tell others what
+happened will soften their reaction. When someone
+breaks your favorite item and cries over it calling
+themselves stupid, it&#8217;s harder to get mad at them,
+compared to the same event with no emotional reaction.</p></div>
+<div class="paragraph"><p>Our behavior is largely dependent on what&#8217;s at the
+top of our mind, so it&#8217;s up to you to take advantage
+of this to make your case in the best conditions.</p></div>
+<div class="paragraph"><p>Next time you try to make someone use Erlang, remember
+that you should aim for getting a spoken commitment
+out of them, if possible before you show the syntax.
+If that&#8217;s not possible, then prepare them to accept
+the flaws or the weirdness before they see them.</p></div>
+</description> + </item> + + <item> <title>Don't let it crash</title> <link>https://ninenines.eu/articles/dont-let-it-crash/</link> <pubDate>Sun, 22 Jan 2017 00:00:00 +0100</pubDate> @@ -1509,144 +1651,5 @@ containing all the flags to pass to the Erlang VM, for example </description> </item> - <item> - <title>Xerl: intermediate module</title> - <link>https://ninenines.eu/articles/xerl-0.5-intermediate-module/</link> - <pubDate>Mon, 25 Mar 2013 00:00:00 +0100</pubDate> - - <guid>https://ninenines.eu/articles/xerl-0.5-intermediate-module/</guid> - <description><div class="paragraph"><p>Today we will start the work on the intermediate module
-that will be used to run the code for the expressions found
-in our file&#8217;s body, replacing our interpreter.</p></div>
-<div class="paragraph"><p>This is what we want to have when all the work is done:</p></div>
-<div class="listingblock">
-<div class="content">
-<pre><code>xerl -&gt; tokens -&gt; AST -&gt; intermediate -&gt; cerl</code></pre>
-</div></div>
-<div class="paragraph"><p>Today we will perform this work only on the atomic integer
-expression however, so we will not build any module at the end.
-We have a few more things to take care of before getting there.
-This does mean that we completely break compilation of modules
-though, so hopefully we can resolve that soon.</p></div>
-<div class="paragraph"><p>This intermediate representation is in the form of a module
-which contains a single function: <code>run/0</code>. This function
-contains all the expressions from our Xerl source file.</p></div>
-<div class="paragraph"><p>In the case of a Xerl source file only containing the integer
-<code>42</code>, we will obtain the following module ready to
-be executed:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">-module</span></span>(<span style="color: #FF6600">'$xerl_intermediate'</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">run</span></span><span style="color: #990000">/</span><span style="color: #993399">0</span>])<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">run</span></span>() <span style="color: #990000">-&gt;</span>
- <span style="color: #993399">42</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>Running it will of course give us a result of <code>42</code>,
-the same we had when interpreting expressions.</p></div>
-<div class="paragraph"><p>The resulting Core Erlang code looks like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #FF6600">module</span> <span style="color: #FF6600">'$xerl_intermediate'</span> [<span style="color: #FF6600">'run'</span><span style="color: #990000">/</span><span style="color: #993399">0</span>]
- <span style="color: #FF6600">attributes</span> []
-<span style="color: #FF6600">'run'</span><span style="color: #990000">/</span><span style="color: #993399">0</span> <span style="color: #990000">=</span>
- <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> () <span style="color: #990000">-&gt;</span>
- <span style="color: #993399">42</span>
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre></div></div>
-<div class="paragraph"><p>The nice thing about doing it like this is that other than the
-definition of the intermediate module and its <code>run/0</code>
-function, we can use the same code we are using for generating
-the final Beam file. It may also be faster than interpreting
-if you have complex modules.</p></div>
-<div class="paragraph"><p>Of course this here only works for the simplest cases, as you
-cannot declare a module or a function inside another Erlang function.
-We will need to wrap these into function calls to the Xerl compiler
-that will take care of compiling them, making them available for
-any subsequent expression. We will also need to pass the environment
-to the <code>run</code> function to keep track of all this.</p></div>
-<div class="paragraph"><p>This does mean that we will have different code for compiling
-<code>fun</code> and <code>mod</code> expressions when creating
-the intermediate module. But the many other expressions don&#8217;t need
-any special care.</p></div>
-<div class="paragraph"><p>Right now we&#8217;ve used the <code>'$xerl_intermediate'</code> atom
-for the intermediate module name because we only have one, but we
-will need to have a more random name later on when we&#8217;ll implement
-modules this way.</p></div>
-<div class="paragraph"><p>The attentive mind will know by now that when compiling a Xerl
-file containing one module, we will need to compile two intermediate
-modules: one for the file body, and one for the module&#8217;s body. Worry
-not though, if we only detect <code>mod</code> instructions in the file
-body, we can just skip this phase.</p></div>
-<div class="paragraph"><p>While we&#8217;re at it, we&#8217;ll modify our code generator to handle lists
-of expressions, which didn&#8217;t actually work with integer literals
-before.</p></div>
-<div class="paragraph"><p>We&#8217;re going to use Core Erlang sequences for running the many
-expressions. Sequences work like <code>let</code>, except no value
-is actually bound. Perfect for our case, since we don&#8217;t support
-binding values at this time anyway.</p></div>
-<div class="paragraph"><p>Sequences have an argument and a body, both being Core Erlang
-expressions. The simplest way to have many expressions is to use
-a simple expression for the argument and a sequence for the rest
-of the expressions. When we encounter the last expression in the
-list, we do not create a sequence.</p></div>
-<div class="paragraph"><p>The result is this very simple function:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000000">comp_body</span></span>([<span style="color: #009900">Expr</span>]) <span style="color: #990000">-&gt;</span>
- <span style="font-weight: bold"><span style="color: #000000">expr</span></span>(<span style="color: #009900">Expr</span>);
-<span style="font-weight: bold"><span style="color: #000000">comp_body</span></span>([<span style="color: #009900">Expr</span>|<span style="color: #009900">Exprs</span>]) <span style="color: #990000">-&gt;</span>
- <span style="color: #009900">Arg</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">expr</span></span>(<span style="color: #009900">Expr</span>),
- <span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">comp_body</span></span>(<span style="color: #009900">Exprs</span>),
- <span style="font-weight: bold"><span style="color: #000000">cerl:c_seq</span></span>(<span style="color: #009900">Arg</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>In the case of our example above, a sequence will not be created,
-we only have one expression. If we were to have <code>42, 43, 44</code>
-in our Xerl source file, we would have a result equivalent to the
-following before optimization:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="font-weight: bold"><span style="color: #000080">-module</span></span>(<span style="color: #FF6600">'$xerl_intermediate'</span>)<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">run</span></span><span style="color: #990000">/</span><span style="color: #993399">0</span>])<span style="color: #990000">.</span>
-
-<span style="font-weight: bold"><span style="color: #000000">run</span></span>() <span style="color: #990000">-&gt;</span>
- <span style="color: #993399">42</span>,
- <span style="color: #993399">43</span>,
- <span style="color: #993399">44</span><span style="color: #990000">.</span></tt></pre></div></div>
-<div class="paragraph"><p>And the result is of course <code>44</code>.</p></div>
-<div class="paragraph"><p>The resulting Core Erlang code looks like this:</p></div>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #FF6600">module</span> <span style="color: #FF6600">'$xerl_intermediate'</span> [<span style="color: #FF6600">'run'</span><span style="color: #990000">/</span><span style="color: #993399">0</span>]
- <span style="color: #FF6600">attributes</span> []
-<span style="color: #FF6600">'run'</span><span style="color: #990000">/</span><span style="color: #993399">0</span> <span style="color: #990000">=</span>
- <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> () <span style="color: #990000">-&gt;</span>
- <span style="color: #FF6600">do</span> <span style="color: #993399">42</span>
- <span style="color: #FF6600">do</span> <span style="color: #993399">43</span>
- <span style="color: #993399">44</span>
-<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre></div></div>
-<div class="paragraph"><p>Feels very lisp-y, right? Yep.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<a href="https://github.com/extend/xerl/blob/0.5/">View the source</a>
-</p>
-</li>
-</ul></div>
-</description> - </item> - </channel> </rss>
\ No newline at end of file |