<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yeiber Cano on Medium]]></title>
        <description><![CDATA[Stories by Yeiber Cano on Medium]]></description>
        <link>https://medium.com/@yeibercano?source=rss-c695e6070715------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a3lZPng7QIRF0BSBEnfYNA.jpeg</url>
            <title>Stories by Yeiber Cano on Medium</title>
            <link>https://medium.com/@yeibercano?source=rss-c695e6070715------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 13:31:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yeibercano/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Thinking Graph ( Neo4j )]]></title>
            <link>https://medium.com/@yeibercano/thinking-graph-neo4j-1b01d63de8fd?source=rss-c695e6070715------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b01d63de8fd</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[neo4j]]></category>
            <category><![CDATA[graphene]]></category>
            <dc:creator><![CDATA[Yeiber Cano]]></dc:creator>
            <pubDate>Thu, 19 May 2016 07:11:18 GMT</pubDate>
            <atom:updated>2016-06-09T23:04:41.473Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://world.mathigon.org/Graph_Theory">Graph theory</a> has been around since the XVII century started by <a href="http://www.biography.com/people/leonhard-euler-21342391">Leonhard Euler</a>. Over the last decade, Graph databases have skyrocketed in popularity, at least, accordingly to <a href="http://db-engines.com/en/ranking_trend/graph+dbms">db-engines.com.</a> With that, Neo4j has been in the forefront of the trend maintaining its growth and popularity. At the time of this post Neo4j has just released <a href="http://neo4j.com/blog/neo4j-3-0-milestone-1-release/">Neo4j 3.0 Milestone 1</a> which includes a native <a href="https://www.npmjs.com/package/neo4j-driver">driver</a> and bolt protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WybdJLzQDcP3gIr9pHR-QA.png" /></figure><h4>Deploying Neo4j</h4><p>There are a few options in this regard with their own flavors:</p><ul><li><a href="http://neo4j.com/developer/guide-cloud-deployment/#docker">Neo4j with Docker</a></li><li><a href="http://neo4j.com/developer/guide-cloud-deployment/#_hosting_on_aws_ec2">Hosting on AWS / EC2</a></li><li><a href="http://neo4j.com/developer/guide-cloud-deployment/#_neo4j_cloud_hosting_providers">Neo4j Cloud Hosting Providers</a></li><li><a href="http://neo4j.com/developer/guide-cloud-deployment/#_other_paas_integrations">Other PaaS Integrations</a></li></ul><p>For the project I am currently working on, I chose for <a href="http://www.graphenedb.com/">GrapheneDB</a> with AWS, but it is also available as <a href="https://elements.heroku.com/addons/graphenedb">Heroku</a> add on.</p><h4>Querying Neo4j with Cypher</h4><p><a href="http://neo4j.com/developer/cypher/">Cypher</a> relays on relationships to traverse through nodes. This query language is capable of querying millions of node in one second. It can perform complex queries. For the scope of this post, I will only go over basic examples:</p><p>CREATE (n) RETURN (n) → creates an empty node</p><p>CREATE (juan:Person {name:”Juan”}) RETURN (juan) → creates a node with a Person label and a name property.</p><p>CREATE (juan:Person {name:”Juan”}), (carl:Person {name:”Carl”})</p><p>MERGE (juan) -[r:brother]-&gt; (carl) RETURN juan, carl, r</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWdLKY5OceWJiBJa5xg6jg.png" /><figcaption>View of Neo4j browser console. This is the result of the above query creating two nodes with a brother relationship</figcaption></figure><p>Example of a complex relationship with a simple query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kiCqXPRcsr3RPwFtUYoF6Q.png" /></figure><h4>Key Takeaways</h4><ul><li>Graph databases organize nodes with relationships</li><li>Neo4j provides flexible and dynamic schemas</li><li>Deploy to AWS or Heroku using GrapheneDB</li></ul><h4>Resources:</h4><ul><li><a href="http://neo4j.com/developer/guide-data-modeling/">Neo4j </a>data modeling</li><li><a href="http://neo4j.com/graphacademy/online-course-getting-started/">Neo4j.com free online course</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPL9Hl4pk2FsvUVugR_NxBMH-bBDkMJt32N&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5Tl8WcaqZoc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F5Tl8WcaqZoc%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8db4e3f5274a371aaa9e9b78e3a9ddfb/href">https://medium.com/media/8db4e3f5274a371aaa9e9b78e3a9ddfb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b01d63de8fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Emmet: faster html and css coding]]></title>
            <link>https://medium.com/@yeibercano/emmet-faster-html-and-css-coding-3f1d8cdbc194?source=rss-c695e6070715------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f1d8cdbc194</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Yeiber Cano]]></dc:creator>
            <pubDate>Tue, 26 Apr 2016 05:02:43 GMT</pubDate>
            <atom:updated>2016-04-26T05:02:43.495Z</atom:updated>
            <content:encoded><![CDATA[<p>Find myself typing a lot of “class” and “ID” and many other tags throughout my code. And when it comes to writing css, the work can get tedious writing so many vendor prefixes. I found Emmet: a plugin that helps you speed up your coding.</p><p>Emmet uses similar syntax as css, so you it feels natural to use. For how to install the plugin check out <a href="http://emmet.io/download/">Emmet</a>. You can also install it with jsfiddle, codepen and others.</p><p>I will share some of the features that I commonly use.</p><p><strong>HTML</strong></p><p>For instance, creating a div with an ID of home and class of container you type <strong>div#myID.myClass</strong> and you get:</p><pre>&lt;div id=”myID” class=”myClass”&gt;&lt;/div&gt;</pre><p>For multiple classes you type <strong>div#myID.myClass.clearFix</strong> and you get:</p><pre>&lt;div id=”myId” class=”myClass clearFix”&gt;&lt;/div&gt;</pre><p>if you do not specify the ‘div’ Emmet will make a default ‘div’. If you type <strong>#home.container.myClass</strong> you get the same result. Try it.</p><p><strong>CHILD AND SIBLING SELECTORS</strong></p><p>What if you wanted to create section with h1, an ul with 5 li, and a tag? That would take some writing, with Emmet you can simply type this <strong>section&gt;h1+ul&gt;li*5&gt;a</strong> and you get this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/396b5447d745242ee7ee1cd386dccdcc/href">https://medium.com/media/396b5447d745242ee7ee1cd386dccdcc/href</a></iframe><p><strong>CSS</strong></p><p>This is probably one of the coolest and most impressive part I find from Emmet is vendor prefixes. Do you want an animation to your class with all vendor prefixes? type this <strong>-animation</strong> and get this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a96081302dcb14d125a3d873d15527b5/href">https://medium.com/media/a96081302dcb14d125a3d873d15527b5/href</a></iframe><p>How about a gradient? a linear gradient from left to right and blue to red Simply type this <strong>lg(left, blue, red) </strong>inside your selector and get this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/854e24b9304e8c3d85297b6f1c1d875c/href">https://medium.com/media/854e24b9304e8c3d85297b6f1c1d875c/href</a></iframe><p>Check out E<a href="http://docs.emmet.io/css-abbreviations/gradients/">mmet</a> documentation for more details. Have fun trying.</p><p>There is also an Emmet <a href="http://docs.emmet.io/cheat-sheet/">cheatsheet</a> you may want to check out. There is a lot more in there that I can show here.</p><p>Share you Emmet’s trick!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f1d8cdbc194" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Factory Functions over Constructors]]></title>
            <link>https://medium.com/@yeibercano/why-factory-functions-over-constructors-b7efeb3f0c4b?source=rss-c695e6070715------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7efeb3f0c4b</guid>
            <category><![CDATA[factory-functions]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Yeiber Cano]]></dc:creator>
            <pubDate>Fri, 08 Apr 2016 02:33:02 GMT</pubDate>
            <atom:updated>2016-04-08T02:33:02.293Z</atom:updated>
            <content:encoded><![CDATA[<p>In javascript every function can return an objet <strong>(functions in javascript are objects)</strong>, you do not need the ‘new’ keyword to create objects:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yjnpe4_wTO1OWBTpbMQ2Q.png" /><figcaption>In this example, we create a function that returns a an object with its methods. We do not use ‘new’ or ‘this’.</figcaption></figure><p>We we take the same example and use a constructor function this happens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UjoNgqpg1MWtO6lOKp5clw.png" /><figcaption>As we see, we have to use the ‘new’ keyword and the context breaks.</figcaption></figure><p>We could fix this with ‘bind’ or arrow functions in ES6;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fyx_rmOk-70Gn3xHQbAuNw.png" /></figure><p>Here we can start seeing how both patterns significantly show their benefits and drawbacks.</p><h3>The big problem with inheritance</h3><p>Aside from being less intuitive and hard to debug ‘inheritance’ posses a bigger problem.</p><blockquote>… the really big problem with inheritance is that you’re encouraged to predict the future. Inheritance encourages you to build this taxonomy of objects very early on in your project, and you are most likely going to make design mistakes doing that, because humans cannot predict the future (even though it feels like we can), and getting out of these inheritance taxonomies is a lot harder than getting out of them. Mattias Johansson.</blockquote><p>Check <a href="https://medium.com/humans-create-software/composition-over-inheritance-cb6f88070205#.npnu1eowr"><strong>Mattias Petter Johansson</strong></a><em>, post for a deeper understanding on the subject.</em></p><h3><strong>Factory functions are widely used</strong></h3><p>You find in major frameworks and libraries, taken from Eric Elliott’s <a href="https://medium.com/javascript-scene/common-misconceptions-about-inheritance-in-javascript-d5d9bab29b0a#.qafq2udlm">blog</a>:</p><ul><li><strong>React</strong> <em>`React.createClass()`</em> is a factory.</li><li><strong>Angular</strong> uses classes &amp; factories, but wraps them all with a factory in the Dependency Injection container. All providers are sugar that use the<em>`.provider()`</em> factory. There’s even a `.<em>factory()`</em> provider, and even the<em>`.service()`</em> provider wraps normal constructors and exposes … you guessed it: A factory for DI consumers.</li><li><strong>Ember</strong> <em>`Ember.Application.create();`</em> is a factory that produces the app. Rather than creating constructors to call with <em>`new`</em>, the <em>`.extend()`</em>methods augment the app.</li><li><strong>Node</strong> core services like <em>`http.createServer()`</em> and <em>`net.createServer()` </em>are factory functions.</li><li><strong>Express</strong> is a factory that creates an express app.</li></ul><h3>Key takeaways</h3><ul><li>Factory functions are more flexible and reusable than classes</li><li>Factory functions do not need ‘new’ or ‘this’, so lets bugs</li><li>Constructors classes create tight coupling</li><li>Constructors would not allow you to expand the root class without refactoring its children</li><li>Constructors: using ‘instanceof” is not reliable.</li><li>Choose composition over inheritance</li></ul><p>Here are two videos that inspired this post, thanks to Eric Elliott and Mattias Johansson for sharing.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlKCCZTUx0sI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlKCCZTUx0sI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlKCCZTUx0sI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/25416778719aff2cbe1dd7d520539269/href">https://medium.com/media/25416778719aff2cbe1dd7d520539269/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FwfMtDGfHWpA%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DwfMtDGfHWpA%26nohtml5%3DFalse&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FwfMtDGfHWpA%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/24bd10829047a9910ef8b2dc63f66006/href">https://medium.com/media/24bd10829047a9910ef8b2dc63f66006/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7efeb3f0c4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>