<?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 Johnny Araujo on Medium]]></title>
        <description><![CDATA[Stories by Johnny Araujo on Medium]]></description>
        <link>https://medium.com/@araujjohnny?source=rss-c2a1779f517a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Johnny Araujo on Medium</title>
            <link>https://medium.com/@araujjohnny?source=rss-c2a1779f517a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 03:51:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@araujjohnny/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[Stop Using JavaScript Classes!]]></title>
            <link>https://medium.com/@araujjohnny/stop-using-javascript-classes-d0b6890ef097?source=rss-c2a1779f517a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0b6890ef097</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[object-oriented]]></category>
            <dc:creator><![CDATA[Johnny Araujo]]></dc:creator>
            <pubDate>Wed, 30 Mar 2022 18:06:09 GMT</pubDate>
            <atom:updated>2022-03-30T18:24:47.966Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*uy1GRPDI_j6qZJI3.gif" /></figure><p>Are you mired in a JavaScript codebase full of classes? Are you new to JavaScript and tempted to reuse patterns from object oriented languages? Do you ever wonder if there’s a better way of doing things in JS?</p><p>Fear not! By learning to write idiomatic JavaScript utilizing modules instead of classes, you can write code that is less cumbersome, more readable, easier to maintain, and provides a more pleasant engineering experience overall. In this article, I’ll show you why classes should be avoided in idiomatic JavaScript, and why modules should be your go-to choice.</p><p>*Note: You should be somewhat familiar with <a href="https://www.educative.io/blog/object-oriented-programming">object oriented programing (OOP)</a> and <a href="https://javascript.info/first-steps">JavaScript</a> (JS) before proceeding.</p><h3>The Problem:</h3><p>Below is an example of the kind of JavaScript I often see in the wild:</p><pre>class ContrivedClass {<br>  constructor(db) {<br>    this.db = db<br>  }</pre><pre>  getPerson() {<br>    return this.db.getPerson();<br>  }<br>}</pre><pre>// somewhere else in the code, this class is only called once</pre><pre>const contrivedClass = new ContrivedClass(db);<br>const person = contrivedClass.getPerson();<br>// do something with person</pre><p>Above you see a JavaScript class with only one method and one constructor argument for injecting a dependency, and the class is only ever instantiated once. And my reaction is always the same…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*0k-W7vDT41E6z6FS.gif" /></figure><p>Why is this my reaction? Because in JavaScript, there exists a plethora of better ways to write code, and yet in some codebases, classes seem to dominate more than Michael Jordan in Space Jam! (Sorry, Lebron.)</p><h3>You seem upset. What are classes and why do you have opinions about them?</h3><p>To understand why classes should not be the preferred way of organizing JavaScript code, we must first understand what classes are and where they excel. According to Oracle’s <a href="https://docs.oracle.com/javase/tutorial/java/concepts/index.html">Java documentation</a>, in object-oriented-programming, an <a href="https://docs.oracle.com/javase/tutorial/java/concepts/object.html">object</a> “stores its state in fields (variables in some programming languages) and exposes its behavior through methods (functions in some programming languages). Methods operate on an object’s internal state and serve as the primary mechanism for object-to-object communication”. A <a href="https://docs.oracle.com/javase/tutorial/java/concepts/class.html">class</a>, then, is “the blueprint from which individual objects are created”.</p><p>The structure of the class typically includes instance fields, a constructor, and methods:</p><ul><li>Instance fields hold values as local state for the instantiated class.</li><li>A constructor is a method that receives the arguments the class needs in order to be instantiated and utilizes those arguments to return the instance of the class (the “object”).</li><li>Methods are functions that often manipulate the instantiated class’s data. Methods typically come in 2 forms, public and private:</li><li>Public methods are functions that can be called outside of the instantiated class by other code that utilizes the object.</li><li>Private methods, as noted by their name, cannot be called outside of the instantiated class.</li><li>Private methods are utilized by public methods or even other private methods to accomplish tasks where the implementation details are not relevant to the code using the instantiated class.</li></ul><p>Below is a simple example of how to utilize a class that highlights many aspects of classes that programmers find attractive. The class provides a clear distinction between what the code consuming the class needs to be aware of and what it doesn’t. The class has built-in mechanics for how you write code, store data, manipulate data, and expose data. It’s easily reproducible — just use the new keyword to create another instance of the class to your heart&#39;s content. It even has capabilities for more advanced techniques such as <a href="https://stackify.com/oop-concept-inheritance/">inheritance</a>, which can limit the work required to do similar but distinct tasks, but also has its <a href="https://en.wikipedia.org/wiki/Composition_over_inheritance">drawbacks</a>.</p><pre>class Book {<br> // declare the values you want to store as part of this class<br> author;<br> title;<br> readCount;</pre><pre> // declare how the instance fields will get initialized<br> constructor(author, title) {<br>   this.author = author;<br>   this.title = title;<br>   this.readCount = 0;<br> }</pre><pre> // create a private method that abstracts an implementation detail for use by a public method<br> incrementReadCount() {<br>   this.readCount += 1;<br> }</pre><pre> // create a public method that can be executed outside of the class <br>read() {<br>   console.log(&#39;This is a good book!&#39;);<br>   this.incrementReadCount();<br> }</pre><pre> getReadCount() {<br>   return this.readCount;<br> }<br>}</pre><pre>// somewhere in a different code block</pre><pre>const myFirstBook = new Book(&#39;Jack Beaton&#39;, &#39;Getting To Mars&#39;);<br>myFirstBook.getReadCount(); // 0<br>myFirstBook.read(); // &#39;This is a good book!&#39;<br>myFirstBook.incrementReadCount(); // calling private methods outside the class won&#39;t work in strict OOP languages<br>myFirstBook.read(); // &#39;This is a good book!&#39;<br>myFirstBook.readCount; // directly accessing a class&#39;s private fields won&#39;t work in strict OOP languages<br>myFirstBook.getReadCount(); // 2</pre><h3>Classes seem pretty cool! So what’s so bad about using them in JS?</h3><p>There’s nothing inherently bad about using this pattern in JS. However, the problem I’ve frequently encountered is that this is sometimes the only pattern, or a frequently misused pattern, in a JS codebase. When deciding between what patterns to use, the team should pick the pattern that best addresses the problem being solved in the language being used. But if the OOP pattern of classes is the only way you know how to or like to code, then of course there will be times when using it will make the code harder for others to understand because the pattern is not a natural fit for the problem and/or programming language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*fs5d77ypj8ZYzi9s.gif" /></figure><h3>So what is an alternative to classes in JS?</h3><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules">JS modules</a>, of course.</p><h3>What’s a JS module?</h3><p>In JavaScript, a module is a file that exports features, such as variables, objects, and functions, that can be used elsewhere. They are defined using the export syntax, and code within the module will have scope access to all variables declared in the file in which it was defined. The exported features can then be imported into any other file or module. But code outside of the module will not have access to code in the module that hasn’t been exported.</p><p>The variables you export can take any shape, including a class, as long as it’s a valid JS variable, function, or object. In practice, this means that in a given file, we might declare variables outside of a data structure but still use them within the structure. This is called a <a href="https://www.w3schools.com/js/js_function_closures.asp">closure</a>. In other languages this is not allowed, but JS has robust support for closures.</p><pre>// some js file<br>const a = 1;<br>const b = 2;</pre><pre>export function add() {<br> return a + b;<br>}</pre><pre>// some other js file that imports the add() function<br>add(); // 3</pre><h3>So how might we code the Book data structure using a JS module instead of a class?</h3><p>Like this:</p><pre>// some js file</pre><pre>// the exported function is what other modules will have access to<br>export function createBook(authorName, bookTitle) {<br> // the following variables and functions are declared within the scope of the createBook function so other book instances or code cannot access these variables<br> const author = authorName;<br> const title = bookTitle;<br> let readCount = 0;</pre><pre> function incrementReadCount() {<br>   readCount += 1;<br> }</pre><pre> function read() {<br>   console.log(&#39;This is a good book!&#39;);<br>   incrementReadCount();<br> }</pre><pre> function getReadCount() {<br>   return readCount;<br> }</pre><pre> // only the methods listed as key-value pairs can be accessed by the returned Object<br> return {<br>   read,<br>   getReadCount,<br> };<br>}</pre><pre>// in some other file</pre><pre>const mySecondBook = createBook(&#39;Gabriel Rumbaut&#39;, &#39;Cats Are Better Than Dogs&#39;);<br>mySecondBook.getReadCount(); // 0<br>mySecondBook.read(); // &#39;This is a good book!&#39;<br>mySecondBook.incrementReadCount(); // will throw an error<br>mySecondBook.read(); // &#39;This is a good book!&#39;<br>mySecondBook.readCount; // will also throw an error<br>mySecondBook.getReadCount(); // 2</pre><p>As you can see, all the things we love about classes are in our module, without having to use the class syntax. There’s less boilerplate as instance fields and methods are replaced with simple variables, and their status as public or private is denoted by their inclusion or exclusion in the return of the exported createBook function module. By exporting a function that explicitly returns an object, we are able to forego the new syntax completely.</p><h3>But what about dependency injection?</h3><p>It is true that many like using classes in JS because the constructor function allows for easy <a href="https://en.wikipedia.org/wiki/Dependency_injection">dependency injection</a>, where we pass in dependencies to the new object rather than hard-coding and coupling them to the class. For example, if my class requires making calls to a database, I can configure the constructor to receive a DB instance. This is fine as well, but remember, JS natively allows for the importing of modules created elsewhere! So if you want access to that DB instance, export it as a module and import it in the module where you actually need it. You get all the benefits of dependency injection without classes!</p><pre>// old: db created or imported here and passed into Class<br>const library = new Library(db);</pre><pre>// new: db created or imported here and passed into Module<br>const library = createLibrary(db);</pre><p>Moreover, you might not need dependency injection. Unless you are going to construct different Library instances with different DB instances, importing the DB directly into the module hosting the Library class/function will save you from having to write redundant code across multiple files. If you don’t foreseeably need dependency injection, there’s no need to go out of your way to support it.</p><pre>// alternate #1: db imported within the Class<br>const library = new Library();</pre><pre>// alternate #2: db imported into Module<br>const library = createLibrary();</pre><h3>If I can do everything using modules, why do I need classes?</h3><p>In JavaScript, you don’t! You can write any program you want without utilizing classes or the this keyword ever! Indeed, the class syntax is somewhat new to JavaScript, and object oriented code was written with functions beforehand. The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class syntax</a> is just <a href="https://en.wikipedia.org/wiki/Syntactic_sugar#:~:text=In%20computer%20science%2C%20syntactic%20sugar,style%20that%20some%20may%20prefer.">syntactic sugar</a> over that function-based approach to OOP.</p><h3>So why do I see classes so often?</h3><p>Because prior to ES5, most people <a href="https://medium.com/@_benaston/lesson-1a-the-history-of-javascript-8c1ce3bffb17">didn’t take JS seriously as a language</a>. The inclusion of class syntax in JS was an intentional decision to attract these more experienced programmers and lower the barrier of entry to make JS more popular. It worked extremely well, but at a cost. Since most people learned JS after learning an OOP language like Java, C++, or even Python or Ruby, it was easier to just rewrite what they already knew using JS syntax. And when newbies wanted to learn JS from scratch, they had all this OOP JS code as real life examples for how to implement common structures, so <a href="https://www.johndcook.com/blog/2011/07/19/you-wanted-banana/">they too are now OOP programmers</a>.</p><h3>I get the sense you don’t actually think anyone should use classes in JS.</h3><p>What gave that away 😃? For reasons that <a href="https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/this%20&amp;%20object%20prototypes/README.md#you-dont-know-js-this--object-prototypes">Kyle Simpson</a> lays out in much more detail than I ever could, classes are not first class citizens in JS in the same way that they are in other languages. <strong>Most don’t know this, but under the hood, all classes are functions, and all functions are objects</strong>. (Arrays are objects, too, but that’s besides the point.) As a result, you are better off in most cases just writing objects and functions directly as it is more behaviorally consistent, more pleasant to maintain, less cumbersome to write, and easier to read. That way when your peers look at your code, they aren’t feeling confused like Johnny from Schitts Creek.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*ILnOURk8tbWxx-9O.gif" /></figure><h3>So classes in JS are a choice, not a way of life. I get it. In your opinion then, when should I use them and when should I avoid them?</h3><p><strong>Consider using classes when:</strong></p><ul><li>Most of the team is unfamiliar with modules</li><li>The code you are writing is not expected to be an exemplar of idiomatic JS code</li><li>You want to leverage broadly known patterns that are strongly enforced in a class paradigm (e.g., local state, public/private, etc.)</li><li>You plan on instantiating a given class multiple times</li><li>You don’t always instantiate classes with the same arguments</li><li>You plan on leveraging all or most of a class’s capabilities (i.e., inheritance, dependency injection, etc.)</li></ul><p><strong>Consider avoiding classes when:</strong></p><ul><li>You only instantiate your class once in a given runtime</li><li>Your data structure does not require any local state</li><li>You have minimal public methods</li><li>You aren’t extending your data structure to create new ones</li><li>Your constructors are only used for dependency injection</li><li>Your constructors are always called with the same arguments</li><li>You want to avoid using this</li></ul><h3>But I like using classes in JS. Do you really think I should abandon them?</h3><p>Yes! But more importantly, I just need you to know that you have other options. Not just in coding, but in life. If you challenge basic assumptions about the way you do things, you will discover and learn much more than if you continue to do things as you always have.</p><p>If you still feel strongly about using classes or are under constraints that prevent you from properly implementing modules, that’s fine. If anything, you are in luck because <a href="https://tc39.es/">TC39</a> is adding <a href="https://github.com/tc39/proposals/blob/master/finished-proposals.md">public/private/static</a> syntax into the next version of JS, <a href="https://tc39.es/ecma262/">ES2022</a>. But please be sure to understand the implications of your decision, especially if the classes you write don’t utilize all the benefits that classes have to offer!</p><p>For more information on all the different types of patterns you can use for coding in JavaScript, please see <a href="https://addyosmani.com/resources/essentialjsdesignpatterns/book/">Learning JavaScript Design Patterns by Addy Osmani</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0b6890ef097" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Merits of Pair Programming]]></title>
            <link>https://medium.com/@araujjohnny/the-merits-of-pair-programming-b97a02b9eb65?source=rss-c2a1779f517a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b97a02b9eb65</guid>
            <category><![CDATA[agile-development]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[pair-programming]]></category>
            <dc:creator><![CDATA[Johnny Araujo]]></dc:creator>
            <pubDate>Thu, 29 Mar 2018 14:46:35 GMT</pubDate>
            <atom:updated>2018-03-29T14:46:35.071Z</atom:updated>
            <content:encoded><![CDATA[<p>My teammates and I achieved a huge milestone! A few weeks ago we successfully deployed our first project on Heroku. Having started what Fullstack calls the “senior phase” of our educational program, we were given 10 days to build an e-commerce website where users can browse and purchase items as a logged in user or a guest. Admins needed the ability to add, edit, and delete products, review/edit orders and make other users admins as well. Lastly, we needed to implement Google OAuth and send emails to customers once they completed their purchases. It’s not the most beautiful app in the world, but with all the blood, sweat, and tears we poured into it, we are proud of it. <a href="https://snake-oil-supplies.herokuapp.com/">https://snake-oil-supplies.herokuapp.com/</a></p><p>I attribute our success primarily to capabilities of the team. My 3 teammates are all talented and eager individuals who never gave up on the mission. I also attribute our success to something called pair programming. For those of you unfamiliar, pair programming is a method for completing an assignment in which two individuals work on the same task by conforming to the roles of the driver and the navigator. The driver is the sole controller of the keyboard, and receives instructions from the navigator on what to code. In order to increase general productivity, the pair is required to switch roles in regular intervals. For more information on how productive pair programming is used in a professional environment, click these links:</p><p><strong>Link 1: </strong><a href="https://www.agilealliance.org/glossary/pairing">https://www.agilealliance.org/glossary/pairing</a></p><p><strong>Link 2: </strong><a href="https://www.thoughtworks.com/insights/blog/effective-navigation-in-pair-programming">https://www.thoughtworks.com/insights/blog/effective-navigation-in-pair-programming</a></p><p>Many bootcamps utilize this approach as the primary method for facilitating student learning. The argument maintains that while students “may or may not” encounter pair programming in their future employment, it serves as an excellent conduit for developing and ingraining proper programming practices and knowledge. After completing this e-commerce project, I couldn’t agree more.</p><p>Having already spent 6 weeks learning to code in pairs, our group of four quickly decided to pair program our e-commerce site. Each day we tried to rotate both the partner we were working with, and the functionality we were working on, in an effort to ensure that each team member had an opportunity to work on each part of the development stack. In the beginning, my partner, let’s call him Jerry, and I were focused on organizing and displaying products on the website. Jerry had little-to-no experience using the React-Redux library. In other circumstances, this might hinder productivity of the group, but because we were pair programming,<em> it wasn’t a big deal at all.</em><strong><em> </em></strong>It instead provided an opportunity for learning and collaboration between team members.</p><p>In the interest of project outcomes, it was best to have all team members demonstrate familiarity with all of the tools we were using, so rather than be dismissive and do all the coding myself, we made sure to switch roles often so that I could leverage what I knew and navigate Jerry towards implementing stateful components that would render functional components and dispatch state changes under certain conditions. And when it was my turn to code, Jerry provided me with valuable input, pointed out mistakes, and asked questions whenever there was something he wasn’t clear about. A situation where either Jerry struggled by himself or where I performed the work but committed sloppy mistakes was aptly avoided.</p><blockquote>…when the experience is evenly distributed, the person navigating mainly becomes a real time editor</blockquote><p>The next day, Jerry stayed on the front end so he could solidify his React-Redux skills, and I switched to the back end where the previous pair were implementing how exactly we would be storing user and product information in the database and the conditions under which the app would retrieve and alter said information. My Day 2 partner (we’ll call him Tom) and I were both well versed in using Sequelize and Express but we also had distinct perspectives on how to implement certain features. In this respect, our ability to maintain pair programming navigator/driver roles actually broke down, as neither party was willing to be guided by the other in the event of a disagreement. But I don’t see this as a bad thing. When there is an unequal distribution of experience, the driver and navigator role make sense as both a tool for maximizing productivity and redistributing experience. However when the experience is evenly distributed, the person navigating mainly becomes a real time editor, or as I like to call it, a “human linter”. This is even better because the real-time feedback became crucial to our ability to complete the project within Fullstack’s strict deadlines.</p><p>Tom schooled me on how to best organize the database to balance the needs scalability (my priority) and ease of implementation (as his priority was actually finishing the project on time). I returned the favor by schooling him on the merits of using async-await functions for our express routes in lieu of ES6 promises, in order to reduce the length of the code and increase the readability and control of timing.</p><p>By having another person continuously evaluate code as it was being written, we avoided having to deal with large merging issues stemming from differing philosophies and opinions. <strong>Seldom was there a need or desire to re-write an entire block of code because we were actively taking all views and intersections into account</strong>. And if there was a need to re-write the code, we came to that decision as a team. Best of all, we each became better programmers because we were able to observe each other first hand, and we weren’t afraid to challenge each other if the driver was “heading” down the wrong path.</p><p>I’ll admit, 8 weeks ago pair programming was awkward. I, like many of my peers, had spent a long time coding on my own. It was hard adjusting to people’s personalities and coding styles. Sometimes it was even frustrating because one partner might be terrible at communicating or you might feel embarrassed that you don’t understand the concepts as well as your partner. But ultimately, perspective makes us better programmers, and better people. By exposing ourselves to different schools of thought and experiences, we tend to accomplish tasks better and more efficiently than we would have otherwise. You may be skeptical of the merits of pair programming, but honestly, don’t knock it till you try it. As someone who’s been immersed in this practice for 2 months with great success, I can say with confidence it made me a better programmer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b97a02b9eb65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Bitcoin and Ethereum Are Leveraging Web Mechanics To Solve Their Biggest Problem]]></title>
            <link>https://medium.com/@araujjohnny/how-bitcoin-and-ethereum-are-leveraging-web-mechanics-to-solve-their-biggest-problem-fbecace9dbee?source=rss-c2a1779f517a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbecace9dbee</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[lightning-network]]></category>
            <dc:creator><![CDATA[Johnny Araujo]]></dc:creator>
            <pubDate>Mon, 19 Mar 2018 04:08:18 GMT</pubDate>
            <atom:updated>2018-03-19T04:08:18.482Z</atom:updated>
            <content:encoded><![CDATA[<p>Disclaimer: This is not an endorsement to purchase any token. I am not a financial advisor.</p><p>The prices of cryptocurrencies have fallen dramatically over the last 2 months as regulators all over the world have begun to enact and enforce regulations within their respective jurisdictions.</p><p><strong><em>Good!</em></strong></p><p>The “All-Time High” prices that these tokens were reaching were mainly supported by speculation. The volatility that results is unfortunate for those who are actually using these tokens as intended (after all, some tokens don’t even claim to be currencies), but ultimately, none of these tokens are actually ready mainstream adoption. Bitcoin is 10 years old, and it’s still too complicated for the majority of people to use, let alone understand, which is great because if the masses were actually educated and willing to use Bitcoin as their primary currency, <a href="https://news.bitcoin.com/as-bitcoin-reaches-new-price-highs-network-congestion-and-fees-spike/">BTC</a>, <a href="https://globalcoinreport.com/ethereum-blockchain-congestion-triggers-outrage/">ETH</a>, and all other networks <em>combined</em> wouldn’t be able to handle even 1% of that total traffic. Outside of Bitcoin and Ethereum, most cryptocurrency projects haven’t even launched a Beta product. The result? Speculation is and will continue to be biggest driver of “value” in the short term.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*yE66spsVFkSdSAfsyjb45A.png" /><figcaption>BTC Price Chart. Credit: <a href="https://www.newsbtc.com/2017/11/02/bitcoin-price-watch-wild-ride/">https://www.newsbtc.com/2017/11/02/bitcoin-price-watch-wild-ride/</a></figcaption></figure><p>The long term view however is much brighter. Bitcoin and Ethereum are essentially open-source projects, which means like most other open-source projects, although they may have been released early, they are iterated upon often. The stakeholders for these projects are supremely aware of the limitations of their respective networks, and have been actively developing solutions for years because they know if they don’t deliver a scalable network, their network will cease to exist.</p><p>The most promising solutions for Bitcoin and Ethereum are the addition of 2nd layer networks called <a href="http://blog.lightning.engineering/announcement/2018/03/15/lnd-beta.html">Lightning</a> and <a href="https://medium.com/l4-media/making-sense-of-ethereums-layer-2-scaling-solutions-state-channels-plasma-and-truebit-22cb40dcc2f4">Plasma</a>, respectively. While tailored to the needs of their platform, both projects seek to open off-chain payment channels anchored to the on-chain network. That way, participants in the network can freely send and receive money with other parties without congesting the main network, resulting in a tremendously higher throughput and correspondingly lower costs without sacrificing the security of the network or the funds of the participants.</p><p>The participants interested in opening a channel will make an on-chain request to allocate funds towards open said channel. Once opened, the participants are free to send value back and forth between each other until one of the participants decides to pull their funds out, effectively closing the channel. To anyone who has studied or used <a href="https://www.websocket.org/aboutwebsocket.html">WebSockets</a>, that concept might sound eerily familiar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PgU_eo31J50i7X1Hl7eNTQ.png" /><figcaption>HTTP Vs WebSocket. Credit: <a href="https://medium.com/@joekarlsson/complete-guide-to-node-client-server-communication-b156440c029">https://medium.com/@joekarlsson/complete-guide-to-node-client-server-communication-b156440c029</a></figcaption></figure><p>Whenever a web client wants to retrieve information from a server, an HTTP GET request is sent from the client to server, and the server responds with the requested content. However for some applications, this protocol is cumbersome. For example, if I wanted to make a real-time application over HTTP, I would have to poll the server every time I wanted to see if I received new content. While other solutions were created to address this issue, the best solution to date was the creation of the WebSocket protocol. Now if the client wants to open a full-duplex communication channel, all it has to do is ask the server to switch over to the WebSocket protocol in their initial HTTP request. If the server supports the protocol, it will open the channel, and data will flow back and forth with minimal overhead until either the client or the server closes the channel. The use of WebSockets has exploded since it was standardized in 2011 and it continues to be <a href="https://www.infoworld.com/article/2609720/application-development/9-killer-uses-for-websockets.html">popular for real-time communication</a> through HTML5 apps. Given its similarities, it easy to extrapolate that technology will impact crypto networks if implemented properly.</p><blockquote>…if they don’t deliver a scalable network, their network will cease to exist.</blockquote><p>Now you may be thinking, what good is Lightning or Plasma if I have to open a connection with every person I want to transact with, even if I only plan on transacting with them once? Those situations are covered as well. While the cost of creating a channel is expected to be minimal, it is still largely prohibitive for the main network to support so many channels. After all, each channel is the equivalent of one on-chain transaction, and the entire solution is centered around reducing the number of transactions. In order to account for these, the Lightning and Plasma protocols also intend to allow channel hopping, such that is person A wants to transact with person B, but the two parties don’t have open channels with each other, if a path between the two exists, the transaction will be able to route from open channel to channel until it reaches its’ final destination. Not only that these solutions will support tokens from other blockchains as well.</p><p>If that sounds familiar to you, it’s because once again, the Web already does that! Whether your web client is using the HTTP protocol or the WebSocket Protocol to send data, the <a href="http://searchnetworking.techtarget.com/definition/TCP">transport layer, known as TCP</a>, sets up the connection required to transmit the data over the network layer (IP) which calculates the exact path the packets need to make in order to be routed to their destination. In other words, in order to scale their tokens, Bitcoin and Ethereum are effectively creating their own web to run on top of the Web! If they are successful, the impact would be tremendous for individuals and business who transact frequently with both trusted and untrusted parties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*UjNWtRw4-eBUmM1VgRdPOA.jpeg" /><figcaption>Examples of IP Topology. Credit: <a href="https://image.slidesharecdn.com/netmanias-130925005506-phpapp02/95/ip-backbone-topology-2-638.jpg?cb=1412899354">https://image.slidesharecdn.com/netmanias-130925005506-phpapp02/95/ip-backbone-topology-2-638.jpg?cb=1412899354</a></figcaption></figure><p>The technology behind blockchain is truly remarkable in that it allows for two parties, regardless of location, transaction type, or amount, to transact <a href="https://www.economist.com/news/leaders/21677198-technology-behind-bitcoin-could-transform-how-economy-works-trust-machine">without a centralized and trusted third party intermediary</a>. But cryptocurrencies are worthless if they are unable to scale to mainstream adoption. However if they get there using the technologies outlined above, the conversation will no longer be about whether or not these tokens have value. Rather, the focus will be on the volume of the transactions are and how high they are expected to grow. That is when cryptocurrencies will prove their worth, and they will have the modern web to thank for that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbecace9dbee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Johnny’s Theory of Relativity]]></title>
            <link>https://medium.com/@araujjohnny/johnnys-theory-of-relativity-b8f1f5c5f740?source=rss-c2a1779f517a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8f1f5c5f740</guid>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Johnny Araujo]]></dc:creator>
            <pubDate>Wed, 21 Feb 2018 21:14:11 GMT</pubDate>
            <atom:updated>2018-03-09T04:56:09.273Z</atom:updated>
            <content:encoded><![CDATA[<p>Only a week after being admitted into Fullstack Academy I was already overwhelmed with the amount of information and suggested exercises we were asked to perform. Complete 4 weeks of “Foundations” (re: <a href="https://www.codewars.com/users/masterchef613">developing JS skills</a>), complete the “<a href="https://jaraujo6.github.io/GuessingGameFinal/">Guessing Game</a>” project, create and maintain a blog, create your own website…it was quite the laundry list to complete before even starting the damn program. Perhaps I wasn’t alone in how I choose to prioritize the work, but by the beginning of the junior phase, I had completed what was mandatory (JS/Guessing Game), and had ignored what was not (blog and website).</p><p>The concept of a blog was particularly challenging for me. Once you post something on the interwebz —in the web it stays forever. Open to be dissected and critiqued until the reader feels satisfied and moves on to something else. The possibilities for self-incrimination are endless. I could come off as illiterate, boring, stupid, or worse a jerk. Maybe I would share a critique of my education or previous employment, and all of the sudden, what was intended to be an honest form of reflection and self-expression turns into fodder to chastise the author. Said more concisely, I didn’t want my posts to be held against me. So I avoided it. Aided by how much work Fullstack gave us, avoiding blogging was rather easy. But alas, here I am during “review week”, the brief period between having completed the junior phase of the program and the upcoming senior phase, and I felt compelled enough to actually post an entry to my medium profile.</p><blockquote>Time moves incredibly fast at Fullstack!</blockquote><p>The inspiration for this post came from a visit to my recent employer. I had accumulated several weeks of vacation time leading up to the start my Fullstack cohort, so it was only last Friday that my status as an employee of the City of New York had come to a close. I returned to the office to hand in my ID, but I couldn’t leave without saying hello to several of my former colleagues. They all had the same questions for me: “How is the program going?”, “Where is it?”, and my favorite, “Maybe you can come back when you’re done!” My questions for them were also the same: “How have you been?”, “Have any major changes occurred”, and when applicable, “How are my former projects?”</p><p>There was one thing immediately clear. Time moves incredibly fast at Fullstack! In the time it took me to learn how to: create servers in PostgreSQL/Sequelize, back end routers in Express, front end UI in React, how to manage state using Redux, and several under-the-hood techniques and implementations,<strong> — essentially, build a webapp from scratch —</strong> the status of things at my former employment were largely<em>…the same</em>.</p><p>It wasn’t surprising.</p><p>It’s been long understood by many that project completion in the public sphere can take an incredibly long time for an infinite number of reasons. But the added context being in this bootcamp really emphasized that for me. I find it a bit strange that I can learn so much in so little time, and yet despite how accomplished I feel, I can say with confidence that I still have much to learn. Competency is not a word I take lightly and I am still on my way towards proving my competence as a software engineer. So now I look ahead and start to wish that time could almost slow down a bit, just to make sure I have enough time to accumulate the skills I need to graduate this program and feel confident.</p><p>But perhaps that’s the point of a program like this. Our instructor Gabe once said that agreeing to work in software means to commit to a lifetime of learning. Its an idiom I’ve heard in various forms before but I get it now. There is simply too much to learn to pretend to be satisfied with your progress. Too many improvements to be made, not only for myself, but for others who depend on the apps we use and create. Slowing time down would simply add another barrier in achieving a greater quality of life. Instead, I’ll embrace this fast pace, knowing that I may not come away with every detail, but the growth I will experience will be unparalleled. Here’s to no longer avoiding a healthy challenge (chalice emoji). On to conquering the the most intensive phase of Fullstack, leveraging my newfound skills to build challenging projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8f1f5c5f740" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>