<?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 Josue Yenga on Medium]]></title>
        <description><![CDATA[Stories by Josue Yenga on Medium]]></description>
        <link>https://medium.com/@josueyenga?source=rss-6b86e4df33e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OWssc1DUW4XxeCYP3gcBQg.jpeg</url>
            <title>Stories by Josue Yenga on Medium</title>
            <link>https://medium.com/@josueyenga?source=rss-6b86e4df33e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 17:11:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@josueyenga/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[Taking Breaks When You Code Does Not Slow You Down]]></title>
            <link>https://javascript.plainenglish.io/taking-breaks-when-you-code-does-not-slow-you-down-97861fb95fc0?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/97861fb95fc0</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[inspiration]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Tue, 21 Dec 2021 12:48:46 GMT</pubDate>
            <atom:updated>2021-12-21T12:48:46.132Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nRrGs9p631Gag7LmHE0yKg.jpeg" /></figure><p>Hi developers, I’m happy to share with you my little experience on the above-mentioned topic of how most developers a bit like me don’t take a break when coding alone or in a team.</p><p>Indeed this is an interesting problem that almost all engineers struggle with regularly. How to take breaks and make them useful to be productive on a daily basis.</p><p>I try to take frequent breaks but they usually have a purpose (<strong><em>bathroom</em></strong>, <strong><em>food/coffee</em></strong>, etc). I tend to find that while I am away from my desk, I am always thinking about the problem at hand. However, this thinking is not distracted by the code in front of me and allows me to think more about the problem as a whole rather than nitpicking the details in front of me. Often, when I return to my desk, I have a new idea of how to approach the problem I am working on.</p><p>This depends entirely on your current state. If I’m stuck on something, I’ll switch to Program. <strong><em>SE or SO</em></strong> and check some questions. I’ll get up and go for a walk. Maybe get a <strong><em>soda</em></strong> or a <strong><em>slice of pizza</em></strong>.</p><p>If I’m late with the deadline, then I won’t stop. Breaks are beneficial when left to the discretion of the programmers.</p><p>So we will try to bring out the case that arises from this problem. Then I summarize it in the 2 most common questions that people ask :</p><ul><li><strong>Frequency of breaks — How often should you take a break?</strong></li><li><strong>Duration of the break — How long should they last?</strong></li></ul><p>Unfortunately, there is no single effective schedule that anyone can follow, in my humble opinion. It’s not flexible enough for coding. But your mileage may vary.</p><p>Since coding is a creative endeavor, once you are “in the flow”, it is best not to take a break. Forced breaks from a state of flow cause irritation and bad moods — try not to be in situations that encourage unintentional interruptions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n542Y5DcpmNTYTk5v8LqvQ.jpeg" /></figure><p>I would advise you to take a <strong><em>10–15 minute</em></strong> break when you are coding to allow yourself to relax, to unwind your nerves, you can try listening to music, going for a walk, talking about things other than programming with a friend or your girlfriend/boyfriend, etc.</p><p>One of the drawbacks is lack of sleep, I don’t blame you but I strongly advise against pulling all-nighters unless it’s Saturday or Sunday but not during the week because it affects your mental state and a physical feeling of drowsiness or exhaustion and prevents you from being productive during the day, forces you to take a break.</p><p>I know you would say that your metabolism is different than mine but know that the more you push yourself beyond what is physically tolerated by your body becomes a recipe for long-term disaster.</p><p>When you are hungry, need to refill your water bottle, go to the bathroom, etc., it’s a recipe for disaster. It’s natural, it doesn’t feel like an unwanted interruption and it’s an easy place to start your break.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P3lF9Jr0B_UIX4VU3MoWcg.jpeg" /></figure><p>But aside from that, there’s another important question that most people don’t think about or talk about at all: <strong>what should you do during a break?</strong></p><p>I’ve seen many people browsing their social apps on their phones, watching <strong>Netflix videos</strong>, <strong>playing video games</strong>, <strong>reading books/blog posts</strong> on their laptops/phones, etc. It’s usually something that’s on an electronic device. And even if it’s not working, it’s subconsciously just as exhausting.</p><p>The one thing I strongly urge software engineers to do is to step away from their screens — for at least two hours a day. Lay your eyes on something that is more than 10 meters away for an extended period of time, and you’ll realize how different it is, just looking at something that is far away for an extended period of time.</p><p><strong><em>Walking in nature or taking a hike in the woods with a friend or girlfriend after lunch for example.</em></strong></p><p>Thank you for reading this article, I hope it has given you some insight or solutions.</p><p><em>More content at </em><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a><strong><em>.</em></strong><em> Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter here</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97861fb95fc0" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/taking-breaks-when-you-code-does-not-slow-you-down-97861fb95fc0">Taking Breaks When You Code Does Not Slow You Down</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Programming Languages to Learn in 2022 (for Job & Future)]]></title>
            <link>https://javascript.plainenglish.io/programming-languages-to-learn-in-2022-for-job-future-3f72aa48fc02?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f72aa48fc02</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Sat, 18 Dec 2021 17:23:13 GMT</pubDate>
            <atom:updated>2021-12-20T14:17:44.474Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>The best programming languages to learn </strong>in 2022<strong> that can get you a job.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zfu91KkkryN-D7sMd8cWfA.jpeg" /></figure><p>Hello programmer, I am really glad to be back among you via this article, and today we are going to talk about <strong>programming languages <br>to learn in 2022 (for Job &amp; Future).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ny6cbIuKd8hOhLwqIpsodw.jpeg" /></figure><p>As most of you who learn alone or attend a programming course remain automatically frozen that the language he learns is the good one.</p><p>But, what we know is where we should use all this theoretical information in programming.</p><p>Maybe your answer is no because, in so many programming languages, your teacher will teach you everything.</p><p>If you like programming languages or if you want to make a career in programming, then you must know which programming languages are in demand in the market and why.</p><p>Well, the developer and developer communities are evolving faster than ever. Several new programming languages and frameworks are emerging, tailored to different categories of developers (beginners, intermediates, and experts) and different use cases (web application, mobile applications, game development, distributed system, etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0ow1dnNs4HfoubFVFjLkw.jpeg" /></figure><p>If you are considering improving your skills and moving into this highly sought-after field, you need to know the different types and levels of programming, and of course which coding languages are best to learn.</p><p>Which languages are the most sought after by the client!</p><p>Or which programming languages are going to give you a good salary.</p><p><strong>Therefore, here today, you will get the best details about programming languages to learn in 2022 and likely to give you a job.</strong></p><h3>1) JavaScript</h3><p>In recent years, <a href="https://www.javascript.com/"><strong>JavaScript has become more and more demanding</strong></a> in the computer field, because it was invented to bring web pages to life.</p><p>Today, many organizations, often startups, use<strong> </strong><a href="https://nodejs.org/en/"><strong>NodeJS</strong></a>, a <strong>JavaScript-based runtime environment,</strong> Node.js allows developers to use JavaScript for server-side scripting, that is, to execute server-side scripts to produce dynamic Web page content before the page is sent to the user’s Web browser.</p><p>If you’re looking for a cool technical job at your favorite startup, then you should seriously consider <strong>learning JavaScript in 2022.</strong></p><h3>2) Python</h3><p><a href="https://www.python.org/"><strong>Python</strong></a> is generally considered the best programming language to learn first, as it is very accessible. It is a fast, easy to use, and deploy programming language that is widely used to develop scalable web applications. YouTube, Instagram, Pinterest, SurveyMonkey are all built using <a href="https://www.python.org/"><strong>Python</strong></a><strong>.</strong></p><p>The programming language provides a great starting point for beginners. If you are looking for one of the most accessible and popular coding languages to learn, you should try Python! Many startups use Python as their main stack, so this opens up many opportunities for <strong>full-stack Python developers.</strong></p><p>If you’re thinking of going into the data science or AI industry, you’ll almost certainly need to learn Python. It can also be used in other fields, such as web development. The versatility and accessibility make it a great choice for beginners.</p><h3>3) Golang (or Go)</h3><p><a href="https://go.dev/"><strong>Go</strong></a>, also known as <strong>Golang</strong>, is a programming language designed by <strong>Google</strong>. It offers excellent multithreading support and is therefore often used by companies that rely heavily on distributed systems, as well as Silicon Valley startups. Those interested in joining a Valley-based startup specializing in core systems may want to learn <strong>Golang</strong></p><h3>4) PHP</h3><p><a href="https://www.php.net/"><strong>PHP</strong></a> is one of the most popular backend programming languages. Although PHP faces fierce competition from Python and JavaScript, the market still needs a large number of <strong>PHP</strong> developers. Those who wish to join a relatively well-established organization as a backend developer should consider learning<strong> PHP programming</strong>.</p><h3>5) Swift</h3><p>As you know, after <strong>becoming a favorite among developers</strong>, its requirements are getting higher and higher.</p><p>This programming language uses a development application for applications for<strong> iOS, WatchOS,</strong> etc.</p><p>Like <a href="https://www.java.com/en/"><strong>Java</strong></a><strong>, </strong><a href="https://developer.apple.com/swift/"><strong>Swift</strong></a> is also very easy to maintain and read, it is also fast and has fewer lines of coding.</p><p><strong>Also, if I’m talking about syntax shopping, it’s very easy.</strong></p><p>Using<strong> Swift</strong>, you can start creating an application in 4 to 5 months and even if you can launch your application.</p><p>After that, if we talk about salary, it depends again on your experience and knowledge, so if you are considering a career as a mobile developer in the year <strong>2022</strong> you are celebrating the right choice.</p><h3>So, what is the best programming language?</h3><p>Your choice of which programming language to learn will depend on your career goals. For example, if you want to dive into machine learning and deep learning, you shouldn’t spend your time learning Java or C#. To help you make this decision, we’ll briefly review some of the languages and their uses.</p><p>Python and JavaScript, two of the most popular languages, are trending in the startup world. Many startups use Django (Python), Flask (Python), and NodeJS (JavaScript) as backend frameworks. These are both easy to learn and therefore considered the best programming languages to learn for beginners. On top of that, there are several opportunities in the market for these roles.</p><p>Java and PHP are commonly used in the enterprise world. Many organizations use Spring (Java) and Laravel(PHP) as their web backend framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DWGvN8jSGXNU5U2u3sXrw.jpeg" /></figure><p>With that, I hope you have an answer to the question of which programming language to learn. Your goal should be to pick a language and work on projects related to your career goals. It will take effort, but it’s also very rewarding!</p><p>If you already know a programming language then you don’t need to learn a new one because the best thing to do is to improve what you already know.</p><p>And for those who have not yet chosen or are still hesitating then I will ask you to choose the field in which you want to evolve.</p><p>Thank you for reading.</p><p><em>More content at </em><a href="http://plainenglish.io/"><em>plainenglish.io</em></a><em>. Sign up for our </em><a href="http://newsletter.plainenglish.io/"><em>free weekly newsletter here</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f72aa48fc02" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/programming-languages-to-learn-in-2022-for-job-future-3f72aa48fc02">Programming Languages to Learn in 2022 (for Job &amp; Future)</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C++ 20 Modern features]]></title>
            <link>https://cryptocurrencyhub.io/c-20-modern-features-65b2f1944498?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/65b2f1944498</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[c-plus-plus-language]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Wed, 09 Sep 2020 06:18:56 GMT</pubDate>
            <atom:updated>2020-09-14T14:40:04.142Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-OUzEXmQDKttWFk29sbsvA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*X9wdNMiFISoCpYdOAyBIAQ.png" /></figure><p>If you have an opinion about <a href="https://cryptocurrencyhub.io/">C++</a>, chances are you like it for its breadth and versatility, or dislike it for its inflated complexity and prefer to stick to alternative languages, C++ 20 has a lot to offer as announced last February by the ISO committee C++ 20 held its summer meeting in Cologne, Germany.</p><p>The minutes of the meeting indicate that work is complete for C++ 20 and a draft will be circulated before the end of the summer. During the meeting, some additions and changes were made to the C++ 20 draft presented by the committee in February.</p><p>As C++ 11 did, C++ 20 will change the way we program modern C++. This change is especially true for beaches, coroutines, concepts and modules. To understand this next big step in the evolution of C++, let me put it in this article in the historical context of the C++ standards.</p><h3>C ++ 98</h3><p>In the late 1980s, Bjarne Stroustrup and Margaret A. Ellis wrote the famous book Annotated C ++ Reference Manual (ARM). These books had two purposes. First, there were many independent C ++ implementations. So ARM defined the functionality of C ++. Second, ARM served as the basis for the first C++ standard: C++ 98 (ISO / IEC 14882). C ++ 98 had some important features: templates, the Standard Template Library (STL) with its containers and algorithms, strings and IO flows. For more information see these referents.</p><h3>C ++ 03</h3><p>With C ++ 03 (14882: 2003), C ++ 98 obtained a technical chronology correction. In the community, C ++ 03, which includes C ++ 98, is called inherited C++.</p><h3><strong>TR1</strong></h3><p>In 2005, something very interesting happened. The so-called TR1 technical report was published. TR1 was a big step towards C ++ 11 and, consequently, towards modern C ++. TR1 (TR 19768) is based on the Boost project which was founded by members of the C ++ standardization committee. TR1 to 13 libraries that should be part of the next C ++ standard. For example, the library to regular expression library, random number library, smart pointers such as std :: shared_ptr and hash tables. Only the so-called special mathematical functions had to wait for C ++ 17.</p><h3>C ++ 11</h3><p>C ++ 11 is the next C ++ standard, but we simply call it modern C ++. This name is also true for C ++ 14 and C ++ 17. C ++ 11 has many features that have fundamentally changed the way we program C ++. For example, C ++ 11 brought the components of the TR1, but also move-semantic, perfect forwarding, variadic models, or constexpr . But that’s not all. With C ++ 11, we have for the first time a memory model as the fundamental basis of threading and a threading API.</p><h3>C ++ 14</h3><p>C ++ 14 is a small C ++ standard. It brought read-write locks, generalized lambdas and generalized constexpr functions.</p><h3>Trending Cryptocurrency Hub Articles:</h3><blockquote><a href="https://cryptocurrencyhub.io/blockchain-for-dummies-in-4-minutes-ec2d2071457c">1. Blockchain for Dummies in 4 minutes</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/introduction-to-cryptocurrencies-dogecoin-the-most-bizarre-coin-in-the-cryptocurrency-world-c777a2e9cf14">2. Introduction to Cryptocurrencies: Dogecoin, the Most Bizarre Coin in the Cryptocurrency World</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/google-enters-the-blockchain-sector-through-a-partnership-f0927bc14db1">3. Google Enters The Blockchain Sector Through A Partnership</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/blockchain-use-case-trade-finance-cda650052582">4. Blockchain use case: Trade Finance</a></blockquote><h3>C ++ 17</h3><p>C ++ 17 is neither big nor small. It has two remarkable features: the parallel STL and the standardized file system. About 80 algorithms of the STL can be executed with a so-called execution policy. This means that an std :: sort call (std :: execute :: par, vec.begin (), vec.end ()) is a hint for the C ++ implementation to sort the vec container in parallel. In addition, you can specify that the sorting should be done sequentially ( std :: execution :: seq ), or vectorized ( std :: execution :: par_unseq ). As for C ++ 11, boost has also been very influential for C ++ 17. We got the boost file system and the three new data types: std :: option , std :: variant , and std :: all . Here are my messages to C ++ 17 .</p><h3>C ++ 20</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1iUFkv9Cqxlp3vTHFgx_yg.png" /></figure><p>C ++ 20 will change the way we program C ++ as fundamentally as C ++ 11. This is especially true for the four major ones: ranges, coroutines, concepts and modules.</p><p>The new range library allows him to express algorithms directly on the container, to compose the algorithm with the pipe symbol and to apply them on infinite data flows.</p><p>Thanks to Coroutines, asynchronous programming in C ++ can become commonplace. Coroutines are the basis for cooperative tasks, event loops, infinite data streams or pipelines.</p><p>In any case, the list of new features is long, the combination of all the proposed specifications is even longer, and each of these additions could fill its own article in its own right. But to get a rough idea of what’s going to happen to C++ next year, let’s take a condensed look at some of the major new features, changes, and additions that await us in C++20</p><p>Here are some additional highlights:</p><ul><li>the three-way comparison operator &lt;=&gt;</li><li>literal strings as model parameters</li><li>calendar and timezone extensions of the chrono library</li><li>std:: span as view on a contiguous array</li><li>fvirtual function constexpr</li><li>volatile redefinition</li><li>additions to atomic: std :: atomic_ref &lt;T&gt; and std :: atomic &lt;std :: shared_ptr &lt;T&gt;&gt;; while waiting for atomic</li><li>new synchronization mechanisms such as semaphores, locks and barriers</li><li>Constexpr containers such as std :: string and std :: vector</li><li>an improved std :: jthread, which joins automatically and can be stopped</li></ul><p>However, this is not the end of the story, you can use predefined concepts or define your own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*a0UZtG3q35JGK8tlmnPKRg.png" /></figure><h3>Routing library</h3><p>The range library is the first concept client. It supports algorithms that:</p><ul><li>can run directly on the container; you don’t need iterators to specify a range</li><li>can be composed</li><li>To make a long story short: the range library supports functional models.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*Mjp4hdIf_jhSbJ6iFCXQZA.png" /></figure><h3>Coroutines</h3><p>Coroutines are generalized functions that can be suspended and resumed while maintaining their state. Coroutines are the usual way to write event-driven applications. An event-driven application can be simulations, games, servers, user interfaces or even algorithms. Coroutines are also commonly used for cooperative multitasking .</p><p>We don’t get with the concrete coroutines C ++ 20; we will get a frame to write our coroutines. The framework for writing coroutines consists of more than 20 functions that you have to partially implement and that could partially overwrite.</p><p>Therefore, you can adapt the coroutine to your needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*0vJrgFRb84zshPr0A8CKnw.png" /></figure><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V4R_3rYnWKASI1MehwJhLw.jpeg" /></figure><p>The C ++ is alive and occupies its own niche.</p><p>New standards introduce innovations that make the language simpler and more “user-friendly”. Software created with this language is still in use and requires support. C ++ is perfectly adapted to software development in certain areas, which, along with everything said above, means that C ++ is still necessary, evolving and will not give up.</p><h3>Don’t forget to give us your 👏 !</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*nOxuUSC4AxqWjuQN" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fikehfc%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fcrypto%3Ffbclid%3DIwAR21qa1rA-tRluviP4tLa5avDklNFY34mg5aK5elSnw1k8oaStOIoXvTjLY&amp;image=http%3A%2F%2Fapi.screenshotlayer.com%2Fapi%2Fcapture%3Faccess_key%3Dfe59908dad3baab69ffab249a2224b03%26viewport%3D1024x612%26width%3D1000%26url%3Dhttps%253A%252F%252Fupscri.be%252Fikehfc%253Fscreenshot&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/974d07603b9c9ad19d749b8dbe54e438/href">https://medium.com/media/974d07603b9c9ad19d749b8dbe54e438/href</a></iframe><figure><a href="https://www.facebook.com/groups/556761034656722/"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*2f7OqE2AJK1KSrhkmD9ZMw.png" /></a></figure><figure><a href="https://upscri.be/crypto"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*v-PpfkSWHbvlWWamSVHHWg.png" /></a></figure><figure><a href="https://docs.google.com/forms/d/1apzYQHO6Qdt7ng5yUPFO_LG4ABWFBwUl6FSRo25zozY/edit"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*Wt2auqISiEAOZxJ-I7brDQ.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65b2f1944498" width="1" height="1" alt=""><hr><p><a href="https://cryptocurrencyhub.io/c-20-modern-features-65b2f1944498">C++ 20 Modern features</a> was originally published in <a href="https://cryptocurrencyhub.io/">Crypto Currency Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HoloChain, challenges of a decentralized Internet]]></title>
            <link>https://cryptocurrencyhub.io/holochain-challenges-of-a-decentralized-internet-87242e8c9e36?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/87242e8c9e36</guid>
            <category><![CDATA[holochain]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Tue, 31 Mar 2020 07:56:10 GMT</pubDate>
            <atom:updated>2020-07-28T16:07:21.472Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tfuw_LVaJxZPbkS1wG3p6g.jpeg" /></figure><p><a href="https://holochain.org/"><strong><em>HoloChain</em> </strong></a>is a software infrastructure for p2p applications created by Arthur Brock and Eric Harris Braun in 2017 that aims at a more correct and decentralized internet not controlled by governments or some companies. <br>Holochain is an alternative to BlocChain.</p><p><a href="https://holochain.org/"><strong><em>Holochain</em></strong></a><strong><em> </em></strong>is a platform that seeks a better exploitation of the internet network to connect users without subjecting them to the centralization policy of big companies like Google or Facebook.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXH2dV33shxE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXH2dV33shxE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXH2dV33shxE%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/ebf0ac90ab58f34209542a4393a9ac1a/href">https://medium.com/media/ebf0ac90ab58f34209542a4393a9ac1a/href</a></iframe><h3><strong>An alternative to the BlockChain</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*pRmgTpLyhUTfOFncH-y8ww.png" /></figure><p>The Blockchain is a technology for storing and transmitting information without a control device based on a distributed database whose information is sent by users.<br>Although the Blockchain was one of the first technologies to promote centralized architecture, it has limitations that Holochain overcomes.</p><h3>Holochain VS Blockchain</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5RE2GhcbYTfig58F8mN9Sw.jpeg" /></figure><p>Blockchain (used by Bitcoin and Ethereum) consumes a lot of energy and contributes greatly to the pollution of the earth, which is not the case with Holochain, which guarantees that it will be 100,000 times less polluting thanks to an unlimited network power that each user of the network will use to support the infrastructure.</p><h3>Security</h3><p>One of the major points ‘of a technology is its security, on this point there is no need to worry because Holochain aims to have a secure infrastructure with a distributed hash system (DHT).<br>During a transaction, contrary to the blockchain which has an asynchronous and individual system (the transaction is done on one side only), Hoclochain it proceeds from two sides (debtor and creditor) which will be the only ones to have a cryptographic key which guarantees the maximum security in the long term.</p><h3>Anonymous</h3><p>The Blockchain is a totally anonymous technology, this way of doing things has many advantages because no organization can have access to the different transactions.<br>Unfortunately, even the ill-intentioned can take advantage of its benefits and use the Blockchain for Mafia and other shady practices without being worried at all.<br>Luckily, there is Holochain, which is not totally anonymous to precisely address this problem. It is possible that transactions may be verified to help deter “mafia” networks, but despite this verification, users will be informed when their data has been reviewed, they will also know who has accessed their data, which is not the case in a centralized network where we have no idea where, how and by whom our data is sold or used.</p><h3>Trending AR VR Articles:</h3><blockquote><a href="https://cryptocurrencyhub.io/blockchain-for-dummies-in-4-minutes-ec2d2071457c">1. Blockchain for Dummies in 4 minutes</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/introduction-to-cryptocurrencies-dogecoin-the-most-bizarre-coin-in-the-cryptocurrency-world-c777a2e9cf14">2. Introduction to Cryptocurrencies: Dogecoin, the Most Bizarre Coin in the Cryptocurrency World</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/google-enters-the-blockchain-sector-through-a-partnership-f0927bc14db1">3. Google Enters The Blockchain Sector Through A Partnership</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/blockchain-use-case-trade-finance-cda650052582">4. Blockchain use case: Trade Finance</a></blockquote><h3>Some technical terms to know about Holochain</h3><p>As you go through the documentation, you will probably find unknown or familiar terms used in surprising ways. Here are the definitions we use.</p><h4>Holochain DNA</h4><p>Each Holochain (happ) application has a configuration file named DNA in json format which has a set of key attributes/values that represent the name of the application, the description of the application and its version,…</p><h4>Holo fuel</h4><p>The Holo fluel is a currency based on the Holochain which is a contractual obligation of service, exchangeable for accommodation. Holo Fuel is a mutual credit accounting system capable of performing billions of micro transactions daily. It is primarily used by Holochain application providers (hApp) to pay Holo hosts for their services.</p><h4>HoloPorts</h4><p>Energy-efficient, ready-to-use personal servers.<br>Holoports allow to host holo apps, anyone can own a holoport, the more holoports there are, the more computing power there is.<br>A holoport can allow its owner to earn holofluels.<br>Holoports can be obtained from the<a href="https://store.holo.host/"><strong><em> holostore</em></strong>.</a> Prices currently range from $120 to $1100.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3w6j7B1hAwE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3w6j7B1hAwE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3w6j7B1hAwE%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/5b7487721aa3b70bd16220c984b0859e/href">https://medium.com/media/5b7487721aa3b70bd16220c984b0859e/href</a></iframe><h3>Holochain or happs applications</h3><p>Holo and applications that use Holo are based on Holochain. Holochain allows a distributed Web with user autonomy integrated directly into its architecture and protocols.</p><h4>Holochain application list</h4><p>Holochain is a project in full expansion, which means that currently there are not yet a large number of applications based on this technology, which represents a major challenge for developers.<br>The goal of the holo company is to create clones of centralized applications such as (Facebook, Twitter, Google,…) in a decentralized architecture for a more human internet.<br>This is how<strong><em> </em></strong><a href="https://github.com/ArcadeCity/unter"><strong><em>Unter</em></strong></a><strong><em> </em></strong>(a clone of Uber) or <a href="https://github.com/holochain/clutter"><strong><em>Clutter</em></strong></a><strong><em> </em></strong>(a clone of Twitter) exists for example. You can find a more extensive list of <a href="https://github.com/holochain/apps"><strong><em>holo</em></strong></a> applications.</p><h3>Who can create holochain applications (happ)</h3><p>Any developer with some programming knowledge can create a happ.<br>Happs applications are based on WebAssembly, which is a world wide web standard for application development.<br>Any programming language using this standard, such as C#, Node.js or Python, can contribute to creating a happ.<br>Holochain recommends the Rust programming language, and there are many Holochain projects written in Rust on Github. here is the repository of the <a href="https://github.com/holochain"><strong><em>holochain </em></strong></a>project.</p><h3>Resources</h3><ul><li><a href="https://github.com/holochain/holochain-proto/blob/whitepaper/holochain.pdf"><strong><em>Holochain</em></strong></a> technical paper</li><li><strong>Holochain</strong>: <a href="http://holochain.org/">http://holochain.org</a></li><li><strong>Holo</strong> : <a href="http://holo.host/">http://holo.host</a></li><li><strong>Ceptr</strong>: <a href="http://ceptr.org/">http://ceptr.org</a></li><li><strong>Metacurrency</strong>: <a href="http://metacurrency.org/">http://metacurrency.org</a></li></ul><h3>Conclusion</h3><p>Holochain is a recent technology with huge ambitions and aiming at a new decentralized internet where everyone will be able to have total control over their data. The current state of the project is only a tiny part of the objectives that holochain is pursuing, it is possible to see new opportunities that can be offered by holochain in the coming months, the project is in full evolution.<br>Based on its holochain ambitions can be an opportunity for developers by creating fully decentralized solutions that can have paid services (developers will receive holofluel) and for simple users holochain will allow them to no longer be afraid of who controls the data, in short to be master of their data.</p><p>Thanks for your reading and this tutorial is made by my brother <a href="https://medium.com/@loicyabili"><strong><em>Loicyabili</em></strong></a><strong><em> </em></strong>who I thank for his work and dedication in technology!</p><h3>Don’t forget to give us your 👏 !</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*nOxuUSC4AxqWjuQN" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fikehfc%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fcrypto%3Ffbclid%3DIwAR21qa1rA-tRluviP4tLa5avDklNFY34mg5aK5elSnw1k8oaStOIoXvTjLY&amp;image=http%3A%2F%2Fapi.screenshotlayer.com%2Fapi%2Fcapture%3Faccess_key%3Dfe59908dad3baab69ffab249a2224b03%26viewport%3D1024x612%26width%3D1000%26url%3Dhttps%253A%252F%252Fupscri.be%252Fikehfc%253Fscreenshot&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/974d07603b9c9ad19d749b8dbe54e438/href">https://medium.com/media/974d07603b9c9ad19d749b8dbe54e438/href</a></iframe><figure><a href="https://www.facebook.com/groups/556761034656722/"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*2f7OqE2AJK1KSrhkmD9ZMw.png" /></a></figure><figure><a href="https://upscri.be/crypto"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*v-PpfkSWHbvlWWamSVHHWg.png" /></a></figure><figure><a href="https://docs.google.com/forms/d/1apzYQHO6Qdt7ng5yUPFO_LG4ABWFBwUl6FSRo25zozY/edit"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*Wt2auqISiEAOZxJ-I7brDQ.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87242e8c9e36" width="1" height="1" alt=""><hr><p><a href="https://cryptocurrencyhub.io/holochain-challenges-of-a-decentralized-internet-87242e8c9e36">HoloChain, challenges of a decentralized Internet</a> was originally published in <a href="https://cryptocurrencyhub.io/">Crypto Currency Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Handlebars with Node.js]]></title>
            <link>https://medium.com/analytics-vidhya/using-handlebars-with-node-js-35235f682f39?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/35235f682f39</guid>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Fri, 20 Mar 2020 19:49:22 GMT</pubDate>
            <atom:updated>2020-07-23T12:09:06.631Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lmAc5edMAmgk1QQH4BW30Q.jpeg" /></figure><p>Handlebars is a simple templating language.</p><p>It uses a template and an input object to generate HTML or other text formats. Handlebars templates look like regular text with embedded Handlebars expressions. After a lot of consideration, I chose <a href="https://handlebarsjs.com/"><strong>Handlebars</strong></a> as the templating engine for my portfolio. It’s minimal, powerful and blends well with express.</p><pre>&lt;p&gt;{{firstname}} {{lastname}}&lt;/p&gt;</pre><p><strong>Web templating</strong> does something very similar. It uses a <strong>templating processor</strong> that takes data from a source of information, typically a database and a template, a generic HTML file with some kind of parameters inside. The processor then merges the data and template to generate a bunch of static web pages or dynamically generates HTML on the fly.</p><h3>Node.js</h3><p><a href="https://nodejs.org/en/"><strong><em>Node.js</em></strong></a> has just revolutionized the world of web development. During its introduction, it shocked the whole world. Today, Node.js is considered by many to be the coolest thing. Node.js is a different way of doing web development. Rather than writing an application and using a web server to transfer your code to a browser, the application and the web server are one and the same thing.</p><h3>Popular contenders</h3><p>Node.js w/ express supports a lot of HTML templating engines. Some popular choices are:</p><ol><li>Pug</li><li>Mustache</li><li>Handlebars</li><li>Marko</li><li>EJS</li></ol><h3>Installation</h3><p>Install using npm:</p><pre>$ npm install express-handlebars</pre><h3>Usage</h3><p>This view engine uses sensible defaults that leverage the “Express-way” of structuring an app’s views. This makes it trivial to use in basic apps:</p><h3>Basic Usage</h3><p><strong>Directory Structure:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*SeQI2-WsvblkefGHubol2w.png" /><figcaption><a href="https://github.com/JosueYenga/express_handlebars">https://github.com/JosueYenga/express_handlebars</a></figcaption></figure><p><strong>app.js:</strong></p><p>Creates a super simple Express app which shows the basic way to register a Handlebars view engine using this package.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D3IXJPhjPBv55uVYWysjJg.png" /></figure><p><strong>views/layouts/layout.handlebars:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ks2V4RXli8wfJpHMNlUclg.png" /></figure><p>Let’s test this out by typing the command below on the command prompt:</p><pre>$ npm run start </pre><p>If everything works fine we should be able to see the message “App listening to port 3000” on the console and if we open this URL “ http://localhost:3000/” in the browser we should be able to see a nice shiny “Hello World !” on the page.</p><h3>Templates</h3><p>In the <strong>views/</strong> folder, create a , index<em>.handlebars</em>, and error<em>.handlebars </em>with the following content:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*0WmwOwdpiQ1gX4FB4J4rEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KjlxU05jPEQ0lXtRkkNObA.png" /></figure><h3>Summary</h3><p>In this article, we talked about using templates in web development. Then, we zoomed in on using Node.js and Express, and introduced Handlebars.js. Handlebars.js is cool, as it lets you separate logic from layout and you can use it server-side (which is where we focused on), as well as client-side. Moreover, you will still be able to use HTML for your views and layouts, unlike with other templating processors.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35235f682f39" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/using-handlebars-with-node-js-35235f682f39">Using Handlebars with Node.js</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an API With Node.js]]></title>
            <link>https://medium.com/analytics-vidhya/building-an-api-with-node-j-part-1-4fa35071312b?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fa35071312b</guid>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Sat, 14 Mar 2020 00:46:52 GMT</pubDate>
            <atom:updated>2020-07-20T04:51:55.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjsQpIJtKIFJStyzdwrXgw.jpeg" /></figure><p>With the Node.js environment installed and ready to run, we will explore the<br>creation of our REST API application. This type of application is currently being developed by numerous projects and companies, as it provides the benefit of creating an application that focuses solely on<br>on the data feed of any client-side application.</p><p>Nowadays, it is quite common to create web applications and or mobile applications that consume data from one or more APIs.</p><p>This makes several the types of client applications consult the same server focused on data processing. In addition, it also allows that each application — client or server — is worked on by different teams. We will first build an API, but throughout the last chapters we will build a simple client-side web application to consume data from our API.</p><p>To start developing the API, we<br>is going to use a very popular web frame called<a href="https://expressjs.com/"><strong><em> Express.</em></strong></a></p><h3>Introduction to Express</h3><p>Express is a minimalist web framework that was highly inspired in Sinatra framework from Ruby language. With this module, you can create from small applications to large and complex ones. This framework allows you to build APIs and also to create simple web sites.</p><p>It’s focused to work with <strong>views</strong> , <strong>routes</strong> and<strong> controllers</strong> , only <strong>models</strong> is not handled by this framework, giving you the freedom to use any persistence framework without creating any incompatibility or conflict in the application.</p><p>This is a big advantage, because there’re a lot of ODM<br><em>(Object Data Mapper)</em> and also ORM<em> (Object Relational Mapping)</em> available. You can use anyone with Express without problem, you just need to load this kind of module, write some models and<br>use them inside the<strong> controllers</strong> ,<strong> routes</strong> or <strong>views</strong> .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ixzMLtoAsR8KvniO6FYMQ.png" /></figure><p>To sum up, you can see a list of Express main features bellow:<br>• Robust routing;<br>• Easily integratable with a lot of template engines;<br>• Minimalist code;<br>• Works with middlewares concept;<br>• A huge list of 3rd-party middlewares to integrate;<br>• Content negotiation;<br>• Adopt standards and best practices of REST APIs;</p><h3><strong>Initiation of the pilot project</strong></h3><p>What about creating a project in practice? From this first part, we will explore a few on how to create a REST API using some Node.js frames.<br>Our application will be a simple task manager, it will be divided into two projects: API and Web application. Our API will be called Build_Api_Node_part1 and will have the following characteristics :</p><ul><li>List of tasks;</li><li>Create, delete and update a task;</li><li>Create, delete and update a user data;</li><li>User authentication;</li><li>API documentation page;</li></ul><h3><strong>Pilot project source code</strong></h3><p>If you are curious to check out the source code of all projects that are going to be explored in this book, just access this link: <a href="https://github.com/Savalone47/node-express-consign-mongodb-server">https://github.com/Savalone47/Build_Api_Node_part1</a></p><p>To begin, we will create our first project called Api_Node , using these commands:</p><blockquote>mkdir Api_Node<br>cd Api_Node<br>npm init -y</blockquote><p>The currenty Node.js version does not support ES6 perfectly, but we can use a module that emulates some of the resources from ES6/ES7 to make our codes cooler. To do this, we are going to install the babel . It’s JavaScript transpiler responsible to convert a ES6/ES7 codes to a ES5 code only when the JavaScript runtime doesn’t recognize some ES6/ES7 features.</p><p>To use all features from ES6/ES7, we are going to install babel-cli and babel-preset-es2015 modules in the project, running this command:</p><blockquote>npm install babel-cli@6.5.1 babel-preset-es2015@6.5.0 — save<br>npm install express@4.17.1 — save<br>npm install consign@0.1.6 — save</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*qzU3-IAJWYdY1uaXEyC9Kw.png" /></figure><p>Now you need to link the preset babel-preset-es2015 to be recognized by the babel-cli , to do this, just create the file .babelrc with this simple code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*XQPW6ompwGKIWHe7KSi2cw.png" /></figure><p>Installing Express, we’ll create our first code. This code is going to load the express module, create a simple endpoint using the GET / via function app.get(“/”) and start the server in the port 3000<br>using the function app.listen() . To do this, create the app.js file using this code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xp9aZ1gYv7NywHYqsmMz6A.png" /></figure><p>Then, open your browser and go to: localhost:3000<br>If nothing goes wrong, a JSON content will be displayed, similar to the image bellow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwvBjd-Gr1OMxLpi6hQiRw.png" /></figure><h3><strong>Apply a simple and static resource</strong></h3><p>REST APIs works with the concept of creates and manipulates resources. These resources are entities that are used for queries, entries, updating and deleting data, by the way, everything is based on manipulating data from resources.</p><p>An API aims to address and unify the data to, in the end, build and show a resource. Initially, we are going to work with static data, but throughout the book we will make some refactorings to integrate a database.</p><p>During this time, static data will only be used to mould an end point. To mold our API, we will include a route via the app.get(“/node”) function, which will return only a static JSON via the res.json() function, which is responsible for rendering json content as output. Here we anticipate the execution of our app.js file, here is how the result will look like :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-aLyNw9sc4Br5vRvxZGng.png" /></figure><h3>Module loading arrangement</h3><p>Indeed, write all endpoints into index.js won’t be a smart move, especially if your application has a lot of them. So, let’s arrange the directories and the loading of all codes according to their responsibilities.</p><p>We are going to apply the<em> MVR (Model-View-Router)</em> pattern to arrange this things. To do it, we’ll use the consign module, which allows to load and inject dependencies easily. So, let’s install!</p><p>With this new module installed, let’s migrate the endpoints from index.js file creating one new files into the new directory named routes . To do this, create the file routes/task.js :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*JliMnwQivxf4_sQoOB6_Tw.png" /></figure><p>Move the endpoint function app.get(“/node”) from app.js to his new file routes/task.js :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*NoaILDWFvWr-j6jUX087TA.png" /></figure><p>To finish this step, edit the app.js to be able to load those routes via consign module and start the server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*ydhXSzjyvDdgfOvoO8nIGw.png" /></figure><p>That’s it, we have just arranged the loading of all <strong>routes</strong>. Note that, at this point we are only focusing on working with VR<em> (view and router) </em>from MVR pattern. In our case, the <strong>JSON</strong> outputs are<br>considered as views which are provided by the routes. The next step will be arranging the <strong>models</strong>. Let’s create the models directory and, back to app.js add one more<em> include() </em>function inside the<em> consign() </em>to allow the loading of the models before the routes . To make this modification clearer,<br>edit the app.js :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*Tlze6O0c4YT46ZEG3nNohA.png" /></figure><p>In this moment, the consign() function won’t load any model, because the directory models doesn’t exists. To fill this gap, let’s temporarily create a model with static data, just to finish this step. To do<br>this, create the file models/task.js and filling with these codes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*BqeKqSFN6m7h499cZQ0pag.png" /></figure><p>To call it in the routes/task.js file, you are going to load this module via app variable. After all, the modules added by consign() function are injected into a main variable, in our case, injected into app via consign().into(app); . To see how to use a loaded module, in this case, we’ll use the<br>app.models.task module, edit the routes/task.js following this code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*CkAHc6eOWhtapNccb1rP_w.png" /></figure><p>To finish these refactorings, let’s create a file, which is going to load all the middlewares and specific settings of Express. Currently, we only have a simple configuration about JSON’s format, which occurs via function app.set(“json spaces”, 4) . But, we are going to include another settings, in<br>this case, it will be the server port calling the app.set(“port”, 3000) function.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fa35071312b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/building-an-api-with-node-j-part-1-4fa35071312b">Building an API With Node.js</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[npm (Node Package Manager)]]></title>
            <link>https://medium.com/@josueyenga/npm-node-package-manager-fffe91f4bd1?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fffe91f4bd1</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[npm]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Sun, 22 Dec 2019 11:34:14 GMT</pubDate>
            <atom:updated>2020-09-20T21:27:26.251Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUEvDUElCz_sfAbzrtddzw.jpeg" /></figure><h4><strong>Website:</strong></h4><p>npm official website is <a href="https://www.npmjs.com/">https://www.npmjs.com/</a>. Using this website you can find packages, view documentation, share and publish packages.</p><h4><strong>Registry:</strong></h4><p>npm registry is a large database consisting of more than half a million packages. Developers download packages from the npm registry and publish their packages to the registry.</p><h4><strong>CLI(Command Line Interface):</strong></h4><p>The is the command line that helps in interacting with the npm for installing, updating and uninstalling packages and managing dependencies.</p><p>The package.json file is the key file for npm package management. It used to set up package <strong><em>dependencies</em></strong> and other things. The package.json is located in the application root directory.</p><p>Here are some essential npm commands:</p><h4><em>npm init</em></h4><p>This will initiate a command line questionnaire that will conclude with the creation of a package.json in the directory in which you initiated the command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*zZk3nmOUjSsbyWb0DFOh0A.gif" /></figure><h4><strong><em>npm install</em></strong></h4><p>Install the dependencies in the local <strong>node_modules</strong> folder reading from <strong><em>package.json.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s1zbLMKXoQ_RvoIwthTUHg.png" /></figure><h4>npm install «package_name»</h4><p>This will create the node_modules directory in your current directory (if one doensn’t exist yet) and will download the package to that directory. – – <em>save </em>option adds the modules to the package.json dependencies.</p><p>– –save flag one can control where the packages are to be installed.<br>– –save-prod<strong> :</strong> Using this packages will appear in Dependencies which is also by default. – –save-dev<strong> :</strong> Using this packages will get appear in devDependencies and will only be used in the.</p><p>If you want to confirm that npm install worked correctly, you should check to see that a node_modules directory exists and that it has a directory for the package(s) that you have installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*5-9btA9DUVydxq_8sYflWA.gif" /></figure><h4>npm uninstall «package_name» – – save</h4><p>This will remove the package from the<strong><em> node_modules</em></strong> and the <strong><em>package.json </em></strong>file. If you want to confirm that npm uninstall worked correctly, you should find the node_modules directory. Ensure that it no longer contains a directory for the package(s) you uninstalled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*7_UcI6CwfEX4PBr97TEoeA.png" /></figure><h4>npm install «package_name» — — global</h4><p>This will install the package globally inside the <strong><em>node_modules</em></strong> directory.</p><h4>npm update</h4><p>This will update the packages in the node_modules directory and the package.json file. During any operations when npm modifies either the node_modules tree or packages.json, the file package-lock.json is generated or modified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*eWOzmdpKKnnyOZU7ovLorg.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fffe91f4bd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Prettier works with ESLint]]></title>
            <link>https://cryptocurrencyhub.io/how-prettier-works-with-eslint-fe006880e094?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe006880e094</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[airbnb]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[eslint-config]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 20:41:59 GMT</pubDate>
            <atom:updated>2020-07-21T16:30:53.698Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qkVaJyTfshYdWBFrTMAsDA.jpeg" /></figure><p>Prettier takes care of formatting your code, ESLint takes care of your code style. The former does everything automatically for you. If you have set up Prettier, you can configure it to format your file when you save it. This way, you don’t have to worry about formatting your code anymore.</p><p><a href="https://eslint.org/"><strong><em>ESLint</em></strong> </a>is by far the most popular JavaScript linter. It statically analyzes your code to help you detect formatting issues and find code inconsistencies.</p><p><a href="https://prettier.io/"><strong><em>Prettier</em></strong></a>, while similar to ESLint by formatting your code, does not check your code quality. It just serves as a code formatter. It does this job pretty well though by natively supporting JavaScript but also JSX, Flow, TypeScript, HTML, JSON, CSS and many more languages.</p><h3>How To Combine ESlint And Prettier</h3><p>make sure you have installed Prettier and ESLint. You can install them per project or globally like this:</p><blockquote>npm install -g prettier eslint</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4gY6HMOsFAO0u5TySI4aKw.jpeg" /></figure><p>I would advise you to install them globally, as I use them in each of my projects. That way, I don’t have to worry about installing them for each project. However, if you are working on a team project, it makes sense to install both packages on your project as well.</p><p><em>NB: If you install ESLint globally once, you must run eslint — init from the command line for your project. This gives you a command line installation prompt to review a dynamic configuration of ESLint for each project. In addition, it comes with a local installation of ESLint for your project.</em></p><h3>Trending Cryptocurrency Hub Articles:</h3><blockquote><a href="https://cryptocurrencyhub.io/blockchain-for-dummies-in-4-minutes-ec2d2071457c">1. Blockchain for Dummies in 4 minutes</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/introduction-to-cryptocurrencies-dogecoin-the-most-bizarre-coin-in-the-cryptocurrency-world-c777a2e9cf14">2. Introduction to Cryptocurrencies: Dogecoin, the Most Bizarre Coin in the Cryptocurrency World</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/google-enters-the-blockchain-sector-through-a-partnership-f0927bc14db1">3. Google Enters The Blockchain Sector Through A Partnership</a></blockquote><blockquote><a href="https://cryptocurrencyhub.io/blockchain-use-case-trade-finance-cda650052582">4. Blockchain use case: Trade Finance</a></blockquote><p>Second, install the<a href="https://prettier.io/"> <strong><em>Prettier</em></strong> </a>and<strong><em> </em></strong><a href="https://eslint.org/"><strong><em>ESLint</em></strong> </a>extension/plugin for your editor/IDE. For example, in VSCode, you can find the Prettier and ESLint extensions on their market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8UfR0kGwEgm8CQ4l53_-ew.png" /></figure><p>Thirdly, install two other packages that are responsible for combining Prettier and ESLint :</p><blockquote>npm install — save-dev eslint-config-prettier eslint-plugin-prettier</blockquote><p>Whereas the<a href="https://github.com/prettier/eslint-config-prettier"><strong><em> former</em></strong></a><strong><em> </em></strong>turns off all ESLint rules that could conflict with Prettier, the<a href="https://github.com/prettier/eslint-plugin-prettier"> <strong><em>latter</em></strong> </a>integrates the Prettier rules into ESLint rules.</p><p>Last but not least, set the Prettier rules in your ESLint configuration. Therefore, create an .eslintrc.json file in the root directory of your project and give it the following configuration:</p><pre>{</pre><pre>  &quot;extends&quot;: [&quot;prettier&quot;],<br>  &quot;plugins&quot;: [&quot;prettier&quot;],<br>  &quot;rules&quot;: {<br>      &quot;prettier/prettier&quot;: [&quot;error&quot;]<br>  },</pre><pre>}</pre><p>That’s it. That’s it. You are ready to use Prettier and ESLint in your project without worrying about conflicts. ESLint knows all of your Prettier rules by incorporating all of the rules it applies and removing any rules that might conflict with it. Now it should not prevent you from improving the style and structure of your code. If you need to exclude folders/files from your ESLint rules, you can add them in an .eslintignore file (e.g. node_modules/).</p><p>In VSCode showed you how to configure Prettier for formatting when saving a file and uses the following configuration in a .prettierrc file in the root directory of your project :</p><pre>{</pre><pre>  &quot;semi&quot;: true,<br>  &quot;trailingComma&quot;: &quot;all&quot;,<br>  &quot;singleQuote&quot;: true,<br>  &quot;printWidth&quot;: 70,</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2z6aZWdYsRuSp3FA5-OUA.jpeg" /></figure><p>Prettier makes sure that semicolons and commas at the end of the line are respected, that only single quotation marks are used and that the line length is set to the given number of characters. On the other hand, ESLint needs a lot of configuration from you, because it is not as sharp as Prettier. Therefore, instead of adding all the ESLint rules ourselves, we can use the most popular code style guide for JavaScript published by Airbnb. You can install it with all its dependencies :</p><blockquote>npx install-peerdeps — dev eslint-config-airbnb</blockquote><p>Afterward, integrate it in your <em>.eslintrc.json</em> file:</p><pre>{</pre><pre>  &quot;extends&quot;: [&quot;airbnb&quot;, &quot;prettier&quot;],<br>  &quot;plugins&quot;: [&quot;prettier&quot;],<br>   &quot;rules&quot;: {<br>       &quot;prettier/prettier&quot;: [&quot;error&quot;]<br>     },<br>}</pre><p>here are the two configuration files for Prettier and ESLint can be adapted to your needs. If you need to add rules, you can do so with both files. If you need to disable a rule from the Airbnb style guide, you can do so in the ESLint configuration.</p><h3>Don’t forget to give us your 👏 !</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*nOxuUSC4AxqWjuQN" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fikehfc%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fcrypto%3Ffbclid%3DIwAR21qa1rA-tRluviP4tLa5avDklNFY34mg5aK5elSnw1k8oaStOIoXvTjLY&amp;image=http%3A%2F%2Fapi.screenshotlayer.com%2Fapi%2Fcapture%3Faccess_key%3Dfe59908dad3baab69ffab249a2224b03%26viewport%3D1024x612%26width%3D1000%26url%3Dhttps%253A%252F%252Fupscri.be%252Fikehfc%253Fscreenshot&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/974d07603b9c9ad19d749b8dbe54e438/href">https://medium.com/media/974d07603b9c9ad19d749b8dbe54e438/href</a></iframe><figure><a href="https://www.facebook.com/groups/556761034656722/"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*2f7OqE2AJK1KSrhkmD9ZMw.png" /></a></figure><figure><a href="https://upscri.be/crypto"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*v-PpfkSWHbvlWWamSVHHWg.png" /></a></figure><figure><a href="https://docs.google.com/forms/d/1apzYQHO6Qdt7ng5yUPFO_LG4ABWFBwUl6FSRo25zozY/edit"><img alt="" src="https://cdn-images-1.medium.com/max/255/1*Wt2auqISiEAOZxJ-I7brDQ.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe006880e094" width="1" height="1" alt=""><hr><p><a href="https://cryptocurrencyhub.io/how-prettier-works-with-eslint-fe006880e094">How Prettier works with ESLint</a> was originally published in <a href="https://cryptocurrencyhub.io/">Crypto Currency Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction à Node.js]]></title>
            <link>https://medium.com/@josueyenga/introduction-%C3%A0-node-js-34b14708cab9?source=rss-6b86e4df33e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/34b14708cab9</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[node-for-begginners]]></category>
            <category><![CDATA[node-js-development]]></category>
            <dc:creator><![CDATA[Josue Yenga]]></dc:creator>
            <pubDate>Wed, 20 Nov 2019 10:07:40 GMT</pubDate>
            <atom:updated>2020-07-02T21:04:41.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ctRjv5OAkdAFtLCHLhblVw.jpeg" /></figure><h3>Introduction to Node.js</h3><p>Node.js is an open source, cross-platform JavaScript runtime environment. It is a popular tool for almost any type of project!</p><p>Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside the browser. This allows Node.js to be very powerful.</p><p>A Node.js application is executed in a single process, without creating a new thread for each request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevents blocking of JavaScript code. Typically, Node.js libraries are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jPZyV3WxmxDWG2FOwuOdlA.png" /></figure><p>When Node.js needs to perform an input/output operation, such as reading over the network, accessing a database or file system, instead of blocking the thread and wasting pending processor cycles, Node.js resumes operations when the response is returned.</p><p>This allows Node.js to handle thousands of simultaneous connections to a single server without introducing the burden of managing simultaneous <strong><em>threads,</em></strong> which could be a major source of bugs.</p><p>Node.js has a unique advantage because millions of frontend developers who write JavaScript for the browser are now able to write server-side code in addition to client-side code without having to learn a completely different language.</p><p>In Node.js, the new <strong><em>ECMAScript</em></strong> standards can be used without any problems, as you don’t have to wait for all your users to update their browsers. You are therefore responsible for choosing which version of <strong><em>ECMAScript</em></strong> to use by modifying the version of Node.js You can also enable specific experimental features by running Node.js with flags.</p><h3>A large number of libraries</h3><p>With its simple structure, <em>npm</em> has fostered the proliferation of the Node.js ecosystem. At present, the<em> npm </em>registry hosts over 1,000,000 open source packages that you can use freely.</p><h3>A Node.js application example</h3><p>The most common example, Hello World from Node.js, is a web server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*LL4YLOhEojXbhTxz4VuLKw.png" /></figure><p>This code includes first the Node.js the <a href="https://nodejs.org/api/http.html"><em>httpmodule</em></a><em>, n</em>ode.js has a fantastic <a href="https://nodejs.org/api/"><em>standard library,</em></a> including first class networking support. The createServer() method of http creates a new HTTP server and returns it.</p><p>The server is configured to listen on the specified port and host name. When the server is ready, the callback function is called. In this case, it informs us that the server is running.</p><p>Each time a new request is received, the <a href="https://nodejs.org/api/http.html#http_event_request"><em>request event</em></a> is called, providing two objects: a request (an<a href="https://nodejs.org/api/http.html#http_class_http_incomingmessage"><em> http.IncomingMessageobject</em></a>) and a response (an <a href="https://nodejs.org/api/http.html#http_class_http_serverresponse"><em>http.ServerResponseobject</em></a>).</p><p>These 2 objects are essential to manage the HTTP call.</p><p>The first provides the details of the application. In this simple example, this is not used, but you can access request headers and request data. The second is used to send data back to the caller.</p><p>Well, in this case with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*JBc3pC7ZlndEy7f2TeviNQ.png" /></figure><p>we set the status Code property to 200 to indicate a successful response, let’s define the Content-Type header:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*jz_QxELcylnFxUlpkfkYAg.png" /></figure><p>and we finish closing the response, adding the content as an argument to end():</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*AACA4XRGmV03rNq9obw1jw.png" /></figure><h3>Node.js Frameworks and tools</h3><p>Node.js is a low-level platform. In order to make things easy and exciting for developers, thousands of libraries have been built on Node.js by the community.</p><p>Many of those established over time as popular options. The following is a non-exhaustive list of those worth learning:</p><p><a href="https://adonisjs.com/"><strong><em>AdonisJs</em></strong></a>: A full-stack framework strongly focused on ergonomics, stability and developer confidence. Adonis is one of the fastest Web frameworks of Node.js.</p><p><a href="https://expressjs.com/"><strong><em>Express</em></strong></a><strong><em>:</em></strong> It provides one of the simplest and most powerful ways to create a web server. Its minimalist, no-nonsense approach, focused on the essential features of a server, is the key to its success.</p><p><a href="https://www.fastify.io/"><strong><em>Fastify</em></strong></a>: A web framework strongly focused on delivering the best developer experience with the least overhead and a powerful plugin architecture. Fastify is one of the fastest web frameworks in Node.js.</p><p><a href="https://hapi.dev/"><strong><em>hapi</em></strong></a>: A rich framework for creating applications and services that allows developers to focus on writing reusable application logic instead of spending time building infrastructure.</p><p><a href="https://koajs.com/"><strong><em>koa</em></strong></a>: Built by the same team as Express, it aims to be even simpler and smaller, based on years of knowledge. The new project was born out of the need to create incompatible changes without disrupting the existing community.</p><p><a href="https://www.meteor.com/"><strong><em>Meteor</em></strong></a>: An incredibly powerful full-stack framework that offers you an isomorphic approach to building applications with JavaScript, sharing code on the client and server. Once a standard all-in-one tool, it now integrates the <em>React</em> ,<em> Vue</em> and <em>Angular</em> frontend libraries. Can also be used to create mobile applications.</p><p><a href="https://github.com/zeit/micro"><strong><em>Micro</em></strong></a>: It provides a very lightweight server for creating asynchronous HTTP microservices.</p><p><a href="https://nestjs.com/"><strong><em>NestJS</em></strong></a>: A progressive Node.js framework based on <em>TypeScript</em> for building efficient, reliable and scalable enterprise-class server-side applications.</p><p><a href="https://nextjs.org/"><strong><em>Next.js</em></strong></a>: A framework to render React applications on the server side.</p><p><a href="https://nx.dev/"><strong><em>Nx</em></strong></a>: It powers the Angular CLI, which allows you to build full-stack applications using NestJS, Express and Angular and easily share code between backends and frontends.</p><p><a href="https://socket.io/"><strong><em>Socket.io</em></strong></a><strong><em>:</em></strong> A real-time communication engine to build network applications.</p><p>Node.js saves us from wasting time by allowing us to do other things while waiting for the long actions to be finished!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34b14708cab9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>