<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Code Mentor's Newsletter]]></title><description><![CDATA[Getting a better understanding of software technology and how to become a better programmer]]></description><link>https://www.codementornewsletter.com</link><image><url>https://substackcdn.com/image/fetch/$s_!C3nK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8386a9d-1166-4945-a2f7-6afd518603a0_256x256.png</url><title>Code Mentor&apos;s Newsletter</title><link>https://www.codementornewsletter.com</link></image><generator>Substack</generator><lastBuildDate>Fri, 03 Apr 2026 21:11:59 GMT</lastBuildDate><atom:link href="https://www.codementornewsletter.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Bryan]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[codementor@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[codementor@substack.com]]></itunes:email><itunes:name><![CDATA[Bryan]]></itunes:name></itunes:owner><itunes:author><![CDATA[Bryan]]></itunes:author><googleplay:owner><![CDATA[codementor@substack.com]]></googleplay:owner><googleplay:email><![CDATA[codementor@substack.com]]></googleplay:email><googleplay:author><![CDATA[Bryan]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[🚀 Building a Robust Solution: The Power of What We Didn't Build 🛠️]]></title><description><![CDATA[In the world of problem-solving, we often focus on the solutions we create.]]></description><link>https://www.codementornewsletter.com/p/building-a-robust-solution-the-power</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/building-a-robust-solution-the-power</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Wed, 04 Oct 2023 01:52:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!C3nK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8386a9d-1166-4945-a2f7-6afd518603a0_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the world of problem-solving, we often focus on the solutions we create. But arguable is even more powerful what we didn't have to build to solve the same problem.</p><p><strong>&#128161; Engineering</strong> lies not just in what we solve, but in what we optimize and streamline. Sometimes, the most elegant solution is the one that eliminates unnecessary complexity and conserves resources.</p><p><strong>&#127775; Think about it:</strong> every line of code, every component, and every feature carries a cost. By identifying what we can omit or simplify, we not only save time and resources but also reduce the risk of bugs and maintenance overhead.</p><p>In the process of building a robust solution, consider these key ideas:</p><p>1&#65039;&#8419; <strong>Minimalism</strong>: Embrace simplicity. Trim the fat. Achieve more with less.</p><p>2&#65039;&#8419; <strong>Elegance</strong>: Seek elegant, efficient solutions that elegantly address complex problems.</p><p>3&#65039;&#8419; <strong>Resource Efficiency</strong>: Optimize your solution for scalability and performance.</p><p>4&#65039;&#8419; <strong>User-Centricity</strong>: Ensure that every feature adds genuine value for your users.</p><p>5&#65039;&#8419; <strong>Agility</strong>: Build with flexibility in mind. Adapt to changing needs without excess baggage.</p><p>6&#65039;&#8419; <strong>Future problems:</strong> Avoid addressing issues that haven't arisen yet.</p><p></p><p>Remember, engineering isn't always about creating something entirely new. It's about finding better ways to solve problems, and sometimes that means focusing on what we don't need to build.</p><p></p><p>Let's embark on the journey of creating solutions that are not only robust but also lean and efficient. By doing so, we not only drive greater impact but also reduce the burden of unnecessary maintenance, allowing us to focus our resources where they truly matter.</p><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.codementornewsletter.com/subscribe?"><span>Subscribe now</span></a></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Managing Up - The best formula to get a promotion]]></title><description><![CDATA[As a software engineer, I always wanted to be a good Senior developer and unconsciously I&#8217;ve done several of the things I&#8217;d mention here that could have got me there sooner if I knew about them instead of by instinct doing them.]]></description><link>https://www.codementornewsletter.com/p/managing-up-the-best-formula-to-get</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/managing-up-the-best-formula-to-get</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Sun, 02 Jul 2023 02:16:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!C3nK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8386a9d-1166-4945-a2f7-6afd518603a0_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As a software engineer, I always wanted to be a good Senior developer and unconsciously I&#8217;ve done several of the things I&#8217;d mention here that could have got me there sooner if I knew about them instead of by instinct doing them.</p><p>I came across the concept of managing up and if you look at it in Google you&#8217;d get:</p><div class="pullquote"><p><strong>Being the most effective employee you can be, creates value for your boss and your company</strong>.</p></div><p></p><p>The statement above can be broken down into two major pieces</p><ol><li><p>Being a self-manage person</p></li><li><p>Delivering value</p></li></ol><p>So let&#8217;s start with the first one.</p><h2>Being a self-manage person</h2><p>It means that you know what you are supposed to be doing, you know what would be the next thing to do and more importantly, you know what you should NOT do.</p><p>So if you need to ask your boss what you should do, it&#8217;s a clear indicator that you can improve in that area.</p><p>Let&#8217;s look at examples of what things you can do depending on your role within the company.</p><div><hr></div><p><strong>Bad &#128683;</strong></p><p>If you&#8217;re a <strong>junior developer</strong> that completed a ticket in the sprint and you ask your manager what else you can work on?</p><p>Why is bad? Because you gave the manager more work to do, now he/she needs to go and see what ticket to assign you. </p><p><strong>Good &#9989;</strong></p><p>If you&#8217;re a <strong>junior developer</strong> that completed a ticket in the sprint, then ideally you look at the top things in the backlog and tell your manager, &#8220;Is ok if I pick the ticket XYZ?&#8221;</p><p>Why is good? You looked for something to work on next and also informed and ask for approval from your manager.</p><div><hr></div><p><strong>Bad &#128683;</strong></p><p>If you&#8217;re a <strong>mid developer</strong> and during the standup call someone else, maybe a junior developer said that&#8217;s block and that needs help &#8230;but you <strong>don&#8217;t offer</strong> to help</p><p>Why is bad? The manager needs to find someone to help the developer get unblocked.</p><p><strong>Good &#9989;</strong></p><p>If you&#8217;re a <strong>mid developer</strong> and during the standup call someone else, maybe a junior developer said that&#8217;s block and that needs help and you <strong>offer</strong> to help?</p><p>Why is good? First, the manager starts to notice that you&#8217;re actively involved in the meetings and that you proactively offer to help others. And secondly, that&#8217;s a good opportunity to start mentoring other developers.</p><div><hr></div><p><strong>Bad &#128683;</strong></p><p>If you&#8217;re a <strong>senior developer</strong> that only brings problems to the table.</p><p>Why is bad? Because you gave the manager problems and he/she might need to find ways to solve them</p><p><strong>Good &#9989;</strong></p><p>If you&#8217;re a <strong>senior developer</strong> that only brings problems to the table with a set of possible solutions.</p><p>Why is good? With your expertise, you identified problems and went beyond and also looked for possible solutions to work on and fix those problems</p><p></p><h2>Delivering Value</h2><p>The whole point of delivering value is to genuinely help your manager with the tasks he/she does and ideally automate them if possible. So you&#8217;re targeting to help your immediate manager.</p><p>The second thing it&#8217;s to identify problems worth solving and for this, you can ask your manager for a 1-1 and openly offer your help with different tasks that might consume his/her time.</p><p>For example, if the manager needs to create reports manually, you might help on automating the report. If the manager needs metrics about something, created them, etc, etc.</p><p>And finally, once you know what you can help your manager and you get permission, you need to do it.</p><p></p><h2>Conclusion</h2><p>If you&#8217;re still thinking about why this would help you grow, your manager has a huge influence on whom or not gets promoted, and certainly by helping your manager you&#8217;d ease the work and you&#8217;d become a key member to help the team be self-managed.</p><p>Also, since it&#8217;s a collaborative environment being excellent only at writing code is just a small piece, you certainly would need more skills to become a Senior, Staff, etc.</p><p>If you&#8217;re interested in what other skills to improve you can read <a href="https://skamille.medium.com/an-incomplete-list-of-skills-senior-engineers-need-beyond-coding-8ed4a521b29f">this</a> as well.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[🔑 Demystifying the Single Responsibility Principle (SOLID) 🔑]]></title><description><![CDATA[It's time to clarify one of the most common misconceptions surrounding the Single Responsibility Principle (SRP).]]></description><link>https://www.codementornewsletter.com/p/demystifying-the-single-responsibility</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/demystifying-the-single-responsibility</guid><pubDate>Wed, 24 May 2023 18:55:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!C3nK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8386a9d-1166-4945-a2f7-6afd518603a0_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It's time to clarify one of the most common misconceptions surrounding the Single Responsibility Principle (SRP). Many of us believe that <strong>SRP is all about doing only one thing.</strong> While it&#8217;s a key aspect, SRP goes beyond that, emphasizing a critical aspect of code design: change management, and to be totally honest I used to explain it that way too &#128532; until I read about the original intent from Robert C. Martin &#128522;</p><blockquote><p>The essence of SRP lies in the principle that a piece of code, whether it's a class, file, or module, <strong>should have only one reason to change</strong>. In other words, it should respond to modifications initiated by a single actor or a single kind of change.</p></blockquote><p></p><p>&#129343; Let's dive deeper into the concept:</p><p>1&#65039;&#8419; Responsibly managing change: SRP advocates for separating concerns, enabling us to isolate and encapsulate parts of our code that are likely to change due to different reasons. By assigning specific responsibilities to each component, we ensure that changes initiated by one actor or reason do not affect unrelated parts of the codebase.</p><p>2&#65039;&#8419; Enabling maintainability: Embracing SRP fosters maintainable codebases. When each component has a clear, well-defined responsibility, it becomes easier to understand, test, and modify specific parts of the system without unintended side effects. This promotes modularity, reusability, and reduces the risk of introducing bugs when making changes.</p><p>3&#65039;&#8419; Promoting code readability: SRP improves the readability of our code. When each class, file, or module has a single responsibility, it becomes easier to comprehend its purpose and functionality. This enhances collaboration among team members, simplifies debugging, and contributes to the overall quality of the codebase.</p><p>&#128640; Implementing SRP effectively:</p><p>&#9989; Identify potential actors of change: Analyze your codebase to identify the various actors or reasons that might initiate modifications. These can include business requirements, user interface changes, performance improvements, etc.</p><p>&#9989; Encapsulate responsibilities: Once you've identified the actors, encapsulate their responsibilities into separate components. Each component should have a well-defined purpose and handle changes initiated by a specific actor or reason.</p><p>&#9989; Balance granularity and cohesion: Strive for an appropriate balance between granularity and cohesion. While it's important to have focused components, overly granular ones can lead to unnecessary complexity. Aim for cohesive components that encapsulate related responsibilities.</p><p>&#9989; Embrace iterative refinement: The SRP is not a one-time process; it evolves with your codebase. Regularly review your components, ensuring they adhere to the principle and refactor as needed. Iteratively refining your codebase helps maintain a healthy and adaptable architecture.</p><h3>Let's dive into an illustration:</h3><p>Imagine we're developing an educational application that involves a user model representing individuals who interact with the app.</p><p>Later on, a new requirement emerges, asking for the ability of certain users (teachers) to create new courses.</p><p>At this point, you're faced with a critical decision. If you fail to ask the right questions, you may end up extending the user model to accommodate the new requirement for teachers.</p><p>As time passes, the application grows, and we encounter another type of user, students. Unfortunately, we end up including them in the user model as well.</p><p>While you might convince yourself that you have different functions performing distinct tasks for each user type and that you're adhering to SRP, it's actually incorrect. The user model can change due to various actors, such as admin, teachers, or students, leading to an improper application of SRP.</p><p>This situation worsens when the company expands, and different teams oversee different areas, like admin, teachers, or students. Since everything is consolidated in one place, two main problems arise: making a change that only affects teachers but unintentionally alters the behavior of other user types, or encountering merge conflicts when working on code influenced by requirements from different actors.</p><p>However, this scenario shouldn't be surprising, as it's what we're used to. So, let's reconsider the same scenario with the correct application of SRP.</p><p>In our educational app, we have the user model and a new requirement arises to handle teachers.</p><p>Instead of directly incorporating the code into the user model, you pause and ask yourself:</p><p>1&#65039;&#8419; Are the user and teacher related? </p><p>2&#65039;&#8419; Could a new requirement apply solely to users or teachers?</p><p>3&#65039;&#8419; Does changing the user impact the teacher, and vice versa? Is that desirable or undesirable?</p><p>4&#65039;&#8419; In terms of the user interface, should we treat users and teachers identically?</p><p>If, at this point, you determine that they are distinct or that multiple actors can influence the code, it's a clear indication to separate them.</p><p>After answering these questions, you decide to split the teachers into separate classes, files, or modules.</p><p>By the time the student features are introduced, we already have a code structure that encourages placing them in different locations. Even if you're uncertain, you can repeat the process of questioning whether more than one actor can potentially change the code you're considering placing in the user model, and proceed accordingly.</p><p></p><p></p><p>&#129309; By embracing the true essence of the Single Responsibility Principle, we can enhance our codebases, promote maintainability, and foster collaboration among development teams.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Why developers should collaborate with Product Managers]]></title><description><![CDATA[Nowadays we are seeing layoffs everywhere and providing value to the product you&#8217;re building is key.]]></description><link>https://www.codementornewsletter.com/p/why-developers-should-collaborate</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/why-developers-should-collaborate</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Sun, 09 Apr 2023 00:29:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!C3nK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8386a9d-1166-4945-a2f7-6afd518603a0_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Nowadays we are seeing layoffs everywhere and providing value to the product you&#8217;re building is key.</p><p>So let&#8217;s start by examining some KPIs that leadership might be looking at to determine if your team adds value!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><ol><li><p>Productivity: This KPI measures how efficiently the team is working.</p><ol><li><p>Track metrics such as the number of tasks completed.</p></li><li><p>Bugs created/fixed.</p></li></ol></li><li><p>Quality: Quality is an important KPI for any team that creates a software product team. </p><ol><li><p>Bugs found in testing</p></li><li><p>Customer satisfaction scores</p></li><li><p>Feedback from stakeholders to determine the quality of the team's work.</p></li></ol></li><li><p>Time to market: This KPI measures how quickly the team can deliver products to market.</p><ol><li><p>The time it takes to release a new product</p></li><li><p>The number of product releases per year</p></li><li><p>Speed of feature delivery</p></li></ol></li><li><p>Innovation: Innovation is an important KPI for teams that are working on new products or features.</p><ol><li><p>Product ideas generated</p></li><li><p>The number of successful new product launches</p></li><li><p>Product/features adoption.</p></li></ol></li></ol><p>As you already identified some of those KPIs would be dependent on what the Product Manager decides to build, the time it takes the development team to build, and if they add value to the user and business.</p><p>Now let&#8217;s say that you don&#8217;t collaborate with your PM and he/she can come to the team with a solution to be built. This carries a lot of problems like:</p><ol><li><p>What if a solution for those ideas cannot be made by the current team's capabilities?</p><ol><li><p>For instance, what if we need AI experts?</p></li></ol></li><li><p>What if the idea takes months to be built?</p><ol><li><p>Delay time to value.</p></li><li><p>Risk of shifting business priorities and in the end the team didn&#8217;t deliver anything.</p></li></ol></li><li><p>What if it&#8217;s an unfeasible idea?</p></li><li><p>Does it depend on external teams/vendors?</p></li><li><p>What if the proposed solution doesn&#8217;t solve the problem?</p></li></ol><p></p><h3>If you already reach this point, let me tell you. They added you too late in the process!</h3><p>Collaboration between product managers and developers is crucial for the success of any software development project. Product managers and developers have different roles, but both play important roles in creating and delivering high-quality software products.</p><p>There are two actions you can take to improve this situation:</p><ol><li><p>Define clear roles and responsibilities</p><ol><li><p>Product managers should focus on defining the product vision, goals, and requirements, while developers should focus on designing and building the product. Clearly defining each person's role will help to avoid confusion and ensure that everyone is working towards the same goal.</p></li></ol></li><li><p>Ask the PM to involve you early in the process.</p><ol><li><p>Developers have valuable insights into the technical feasibility of product features and can provide feedback on the design and implementation of product requirements. Product managers should involve developers in the product planning process to ensure that the product requirements are feasible and to get their input on the best way to implement features.</p></li></ol></li><li><p>Communicate regularly</p><ol><li><p>Effective communication is essential for successful collaboration. Product managers and developers should communicate regularly to ensure that they are on the same page. Product managers should keep developers informed of any changes in product requirements or priorities, and developers should provide regular updates on the status of development.</p></li></ol></li><li><p>Emphasize teamwork</p><ol><li><p>Collaboration between product managers and developers should be based on teamwork. Both parties should work together to achieve a common goal and should be willing to compromise and make adjustments when necessary. Teamwork fosters a sense of shared ownership and accountability, which can lead to better outcomes.</p></li></ol></li><li><p>Develop a product mindset</p><ol><li><p>Start to wonder if the things you build provide value to the end user and how much time it would take. how are you going to roll out the features? and so on.</p></li></ol></li></ol><p></p><p>Ideally, when the PM involves you, there is a clear problem statement and business constraints.</p><p>With that information, you can provide input in any technical constraints.</p><p>And once you have all of that information and it&#8217;s crystal clear, all parts can start to brainstorm solutions for the problem.</p><blockquote><ul><li><p>If you work on a solution and the problem is still unclear, it&#8217;s a red flag you should raise because things can go wrong!</p></li></ul><p>You can define a Value/Complexity matrix to identify what to build <a href="https://productfolio.com/value-vs-complexity/">https://productfolio.com/value-vs-complexity/</a></p></blockquote><p>Once you have a clear what to build the next thing you need to work together on is how to break down the solution and provide deliveries at a maximum of 6 weeks.</p><p><strong>If a project/feature takes a quarter it&#8217;s too risky</strong>, since you would not get any feedback from end users, which means you can be building something that can provide zero value or it&#8217;s the right solution at all.</p><p></p><p>In conclusion, the success of a software development project relies not only on the product manager's responsibilities but also on the collaboration and influence of developers, especially regarding factors such as feasible solutions, time to delivery, feature rollout, and user adoption. Therefore, a strong partnership between product managers and developers is crucial for achieving success in software development projects.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Python... What the GIL?]]></title><description><![CDATA[Are you confused by Python's Global Interpreter lock? or if you're trying to speed up your &#128013; code... you'd know the basics about the GIL is all about.]]></description><link>https://www.codementornewsletter.com/p/python-what-the-gil</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/python-what-the-gil</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Wed, 08 Mar 2023 01:56:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Ztta!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ztta!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ztta!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ztta!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ztta!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ztta!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ztta!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg" width="614" height="406" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:406,&quot;width&quot;:614,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ztta!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ztta!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ztta!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ztta!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5fb47d7-8f36-4703-89ee-e200d87f8081_614x406.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Nowadays computers have multiple CPU cores that help speed up the different applications we run, usually by running tasks in parallel and relying on threads.</p><p>But when we talk about Python &amp; even if you&#8217;re explicitly defining a thread, your code might not take full advantage of all CPU cores, and that&#8217;s where the GIL comes to play.</p><p></p><div class="pullquote"><p>The GIL is a lock that only lets one thread have full control of the Python interpreter.</p></div><p></p><p>Let&#8217;s review the following example: </p><blockquote><p>We run the slow task from the main thread and with a thread.</p><p>The slow task does a loop for 5 seconds before completing it.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!em2z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!em2z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 424w, https://substackcdn.com/image/fetch/$s_!em2z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 848w, https://substackcdn.com/image/fetch/$s_!em2z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 1272w, https://substackcdn.com/image/fetch/$s_!em2z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!em2z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png" width="1456" height="910" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:910,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:428365,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!em2z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 424w, https://substackcdn.com/image/fetch/$s_!em2z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 848w, https://substackcdn.com/image/fetch/$s_!em2z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 1272w, https://substackcdn.com/image/fetch/$s_!em2z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe20fc975-1307-4426-9bf9-175aee73a851_3456x2160.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>As you might expect, it takes roughly 5 seconds</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!89Kl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!89Kl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 424w, https://substackcdn.com/image/fetch/$s_!89Kl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 848w, https://substackcdn.com/image/fetch/$s_!89Kl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 1272w, https://substackcdn.com/image/fetch/$s_!89Kl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!89Kl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png" width="948" height="238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:238,&quot;width&quot;:948,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:44902,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!89Kl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 424w, https://substackcdn.com/image/fetch/$s_!89Kl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 848w, https://substackcdn.com/image/fetch/$s_!89Kl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 1272w, https://substackcdn.com/image/fetch/$s_!89Kl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80e1b757-086c-4f71-a04a-dd4855b8e448_948x238.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>But if we dig deeper, we&#8217;d see that the execution is being switched between the main thread and the thread we created.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KXAN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KXAN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 424w, https://substackcdn.com/image/fetch/$s_!KXAN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 848w, https://substackcdn.com/image/fetch/$s_!KXAN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 1272w, https://substackcdn.com/image/fetch/$s_!KXAN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KXAN!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png" width="1200" height="150" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:182,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:125485,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KXAN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 424w, https://substackcdn.com/image/fetch/$s_!KXAN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 848w, https://substackcdn.com/image/fetch/$s_!KXAN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 1272w, https://substackcdn.com/image/fetch/$s_!KXAN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd2c408f-06c7-439e-aa22-10456d8c663e_3452x432.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>&#8230;and that happens because:</p><ol><li><p>The GIL can be held only by one thread at a time.</p></li><li><p>The thread releases the GIL every 5ms by default.</p></li></ol><p>We can arbitrarily tell Python to release the GIL every 10 seconds by running the following code</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LFg1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LFg1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 424w, https://substackcdn.com/image/fetch/$s_!LFg1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 848w, https://substackcdn.com/image/fetch/$s_!LFg1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 1272w, https://substackcdn.com/image/fetch/$s_!LFg1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LFg1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png" width="1440" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:1440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34584,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LFg1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 424w, https://substackcdn.com/image/fetch/$s_!LFg1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 848w, https://substackcdn.com/image/fetch/$s_!LFg1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 1272w, https://substackcdn.com/image/fetch/$s_!LFg1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd6e5f4a-a61e-406e-b847-cf13f1c0f303_1440x300.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>So, let us run it again, but let python release the GIL <strong>every 10 seconds</strong> and see what happens</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L7-z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L7-z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 424w, https://substackcdn.com/image/fetch/$s_!L7-z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 848w, https://substackcdn.com/image/fetch/$s_!L7-z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 1272w, https://substackcdn.com/image/fetch/$s_!L7-z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L7-z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png" width="1456" height="998" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:998,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:470010,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L7-z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 424w, https://substackcdn.com/image/fetch/$s_!L7-z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 848w, https://substackcdn.com/image/fetch/$s_!L7-z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 1272w, https://substackcdn.com/image/fetch/$s_!L7-z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feff95a65-3b29-4d18-bb2f-7182175b951b_3472x2380.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now the total duration is 10 seconds because we are not letting python make progress in each thread every 5ms.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nZ7M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nZ7M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 424w, https://substackcdn.com/image/fetch/$s_!nZ7M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 848w, https://substackcdn.com/image/fetch/$s_!nZ7M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 1272w, https://substackcdn.com/image/fetch/$s_!nZ7M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nZ7M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png" width="966" height="204" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:204,&quot;width&quot;:966,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33814,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nZ7M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 424w, https://substackcdn.com/image/fetch/$s_!nZ7M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 848w, https://substackcdn.com/image/fetch/$s_!nZ7M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 1272w, https://substackcdn.com/image/fetch/$s_!nZ7M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd0ef8dee-4576-4672-b054-3bf9cb2500d6_966x204.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"></figcaption></figure></div><h2>Crazy right, but here is what you need to remember</h2><ol><li><p>The switch back and forth between threads lets us make progress in all threads, but not at its full potential.</p></li><li><p>There is no guarantee that a thread is going to release the GIL every 5ms.</p></li><li><p>If a thread holds the GIL, other threads can&#8217;t run until the GIL is released.</p></li><li><p>Libraries that rely on CPython require the GIL.</p></li><li><p>Use libraries that use the GIL correctly or rely as few as possible on the CPython.</p><ol><li><p>For example Numpy</p></li></ol></li><li><p>If you write a long-running task, make sure your code does not hold the GIL.</p></li></ol><p></p><p>As a general thought, don&#8217;t try to optimize &#8220;vertically&#8221; if you aren&#8217;t facing the problem yet, in other words, if you want to speed up a task with parallelism, and if you aren&#8217;t getting the expected results, now it&#8217;s a good moment to unveil your GIL knowledge and start to measure how the code is being executed by relying on tools like https://viztracer.readthedocs.io/en/latest/index.html to generate graphs and analyze the execution of your code.</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[The omnipresence and mystery of Unicode]]></title><description><![CDATA[Let&#8217;s start with a trivia]]></description><link>https://www.codementornewsletter.com/p/the-omnipresence-and-unknowing-unicode</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/the-omnipresence-and-unknowing-unicode</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Tue, 06 Dec 2022 16:11:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!U00X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Let&#8217;s start with a trivia</p><p>Do you know what&#8217;s printed in the console after running the following code?</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G2F3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G2F3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 424w, https://substackcdn.com/image/fetch/$s_!G2F3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 848w, https://substackcdn.com/image/fetch/$s_!G2F3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 1272w, https://substackcdn.com/image/fetch/$s_!G2F3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G2F3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png" width="1228" height="268" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:268,&quot;width&quot;:1228,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:72918,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G2F3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 424w, https://substackcdn.com/image/fetch/$s_!G2F3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 848w, https://substackcdn.com/image/fetch/$s_!G2F3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 1272w, https://substackcdn.com/image/fetch/$s_!G2F3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F42c6577f-c7d3-4a8c-acd8-6eefb6191337_1228x268.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>If you don&#8217;t know the answer or if you tried it on your end, you might be surprised by the output you get. But there is a fundamental reason behind it and if you&#8217;re thinking it&#8217;s a gotcha of Javascript &#8230;no, you can replicate it in other programming languages.<br></p><p>In this post, we are going to unveil why the output of the previous snippet is</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b1_d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b1_d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 424w, https://substackcdn.com/image/fetch/$s_!b1_d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 848w, https://substackcdn.com/image/fetch/$s_!b1_d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 1272w, https://substackcdn.com/image/fetch/$s_!b1_d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b1_d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png" width="310" height="58" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:58,&quot;width&quot;:310,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:12797,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!b1_d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 424w, https://substackcdn.com/image/fetch/$s_!b1_d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 848w, https://substackcdn.com/image/fetch/$s_!b1_d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 1272w, https://substackcdn.com/image/fetch/$s_!b1_d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb931a94a-9c5a-44b3-b8f7-190b99c92e7b_310x58.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p></p><h3>History</h3><p>We all know that computers only understand binary. So every character has assigned a number and before Unicode, there were many different systems called <strong>character encodings</strong>.</p><blockquote><p>Have you struggled with typing the &#8216;@&#8217;? </p><p>At some point, we all used the shortcut &#8216;alt + 64&#8217; where &#8216;<strong>64&#8217;</strong> is the number to represent the &#8216;<strong>@&#8217;</strong></p></blockquote><p>There were characters, punctuation, and English/Spanish letters represented in the widely used character encoding called <strong>ASCII </strong>which used 7 bits to represent those characters, but later on, an <strong>Extended ASCII </strong>version that used 8 bits to represent 256 characters was created.</p><p>But ASCII lacked support for pictographic languages like Chinese/Japanese which introduced <strong>Unicode</strong>, the universal character encoding used nowadays to represent things like the emojis I presented at the beginning.</p><blockquote><p>Unicode can represent around 150k different characters.</p></blockquote><p>To recap, Unicode was created to represent and standardize every character and its corresponding number.</p><p>Now before we dive into answering our initial question, let&#8217;s review some terminology</p><h3>Terminology</h3><p><strong>Code space:</strong> a set of numerical values ranging from 0 through 10FFFF called code points</p><p><strong>Unicode plane: </strong>is a range of 65,536 Unicode code points. The entire character set is split into 17 planes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U00X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U00X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!U00X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!U00X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!U00X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U00X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png" width="1080" height="1080" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85112,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!U00X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!U00X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!U00X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!U00X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F60d0b31e-ac73-4a4e-9bd5-6f9c220a1d3b_1080x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Basic Multilingual Plane (BMP):</strong> plane 0 which contains the most commonly used characters like numbers &amp; the alphabet.</p><ul><li><p>U+0041 represents the letter &#8216;A&#8217;</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_VhO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_VhO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!_VhO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!_VhO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!_VhO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_VhO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png" width="1080" height="1080" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:41085,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_VhO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!_VhO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!_VhO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!_VhO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b30353e-8313-4d73-a93f-fac3b264d936_1080x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Astral planes:</strong> planes 1-16 are named <strong>astral planes</strong> or <strong>supplementary planes</strong>. It contains historic scripts and symbols like Egyptian hieroglyphs and emojis.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pHr_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pHr_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!pHr_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!pHr_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!pHr_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pHr_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png" width="1080" height="1080" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40182,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pHr_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!pHr_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!pHr_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!pHr_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9dc45184-a271-4d03-afcc-caeff6f7477d_1080x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Character:</strong> is a unit of information used to organize and represent textual data.</p><ul><li><p>Every character has a name. For example <em><strong>Latin Capital Letter A </strong></em>it&#8217;s used to represent the letter <strong>&#8216;A&#8217;</strong></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ujxp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ujxp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 424w, https://substackcdn.com/image/fetch/$s_!Ujxp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 848w, https://substackcdn.com/image/fetch/$s_!Ujxp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 1272w, https://substackcdn.com/image/fetch/$s_!Ujxp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ujxp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png" width="1456" height="619" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/af3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:619,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91489,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Ujxp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 424w, https://substackcdn.com/image/fetch/$s_!Ujxp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 848w, https://substackcdn.com/image/fetch/$s_!Ujxp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 1272w, https://substackcdn.com/image/fetch/$s_!Ujxp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Faf3d63ea-7ad0-4d62-adf3-a7d0f6013f70_2060x876.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Code point:</strong> a number to represent a Unicode character.</p><ul><li><p>Their format is &#8216;<strong>u+&lt;hex&gt;</strong>&#8217;</p><ul><li><p>U+0041 represents the letter &#8216;A&#8217;</p></li></ul></li><li><p>A code point is encoded as <strong>code units</strong>.</p></li></ul><p></p><p><strong>Code units</strong>: a bit sequence used to encode each character within a given encoding form (to represent the abstract characters) in physical bits.</p><ul><li><p>For instance, The letter A has a code point U+0041, and given the UTF-16 encoding, the <strong>code unit</strong> is 0x0041</p></li></ul><p></p><p><strong>Character Encoding:</strong> transforms abstract <strong>code points</strong> into physical bits: <strong>code units</strong>. In other words, the character encoding translates the Unicode code points to unique code unit sequences.</p><ul><li><p>Popular encodings are UTF-8, UTF-16, and UTF-32.</p></li><li><p>UTF-8 uses 8-bit code units.</p></li><li><p>UTF-16 uses 16-bit code units.</p></li><li><p>UTF-32 uses 32-bit code units.</p></li></ul><div><hr></div><h3>Code point, unit &amp; character Encoding Recap</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HaDg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HaDg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 424w, https://substackcdn.com/image/fetch/$s_!HaDg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 848w, https://substackcdn.com/image/fetch/$s_!HaDg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 1272w, https://substackcdn.com/image/fetch/$s_!HaDg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HaDg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png" width="1005" height="258" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:258,&quot;width&quot;:1005,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:24647,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HaDg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 424w, https://substackcdn.com/image/fetch/$s_!HaDg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 848w, https://substackcdn.com/image/fetch/$s_!HaDg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 1272w, https://substackcdn.com/image/fetch/$s_!HaDg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2d68ff6f-74de-4108-bc55-ac8c1b1570b1_1005x258.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WJLm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WJLm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 424w, https://substackcdn.com/image/fetch/$s_!WJLm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 848w, https://substackcdn.com/image/fetch/$s_!WJLm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 1272w, https://substackcdn.com/image/fetch/$s_!WJLm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WJLm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png" width="1058" height="988" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:988,&quot;width&quot;:1058,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:76289,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WJLm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 424w, https://substackcdn.com/image/fetch/$s_!WJLm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 848w, https://substackcdn.com/image/fetch/$s_!WJLm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 1272w, https://substackcdn.com/image/fetch/$s_!WJLm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8907cc86-41cc-4fb6-8b77-14bd708ccbf4_1058x988.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p></p><p><strong>Grapheme</strong> <strong>or symbol</strong>: a distinctive unit of writing depending on the writing system. In other words how the character is drawn.</p><p><strong>Combining mark:</strong> is a character that applies to the precedent base character to create a new grapheme.</p><ul><li><p>For instance, in the next snippet, the first console.log represents the character &#8216;o&#8217; and the &#8216;&#180;&#8217;, but in the last console.log when combined they represent the letter &#8216;&#243;&#8217;</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tp52!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tp52!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 424w, https://substackcdn.com/image/fetch/$s_!Tp52!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 848w, https://substackcdn.com/image/fetch/$s_!Tp52!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 1272w, https://substackcdn.com/image/fetch/$s_!Tp52!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tp52!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png" width="1456" height="259" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:259,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106879,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Tp52!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 424w, https://substackcdn.com/image/fetch/$s_!Tp52!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 848w, https://substackcdn.com/image/fetch/$s_!Tp52!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 1272w, https://substackcdn.com/image/fetch/$s_!Tp52!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F814a9695-10f2-4ec3-af53-624c1b1c3e2b_2920x520.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>Encoding UTF-16</h3><p>UTF-16 is commonly used in Javascript. And since now we know all terminology around Unicode. Let&#8217;s introduce <strong>surrogate pairs.</strong></p><p>Since UTF-16 uses 16-bit code units and encodes the code points in this way:</p><ul><li><p>The BMP is stored in one code unit because each plane can store 65,536 code points.</p></li><li><p>For the remaining planes (astral planes) we would need around 20 bits to store them.</p></li></ul><p>Since we can&#8217;t store code points from astral planes in 16-bits, there is a surrogate mechanism to store each code point in two 16-bit code units as follows:</p><ul><li><p>The first (high) surrogate is a 16-bit code value in the range U+D800 to U+DBFF.</p></li><li><p>The second (low) surrogate is a 16-bit code value in the range U+DC00 to U+DFFF.</p></li></ul><p>For example</p><ul><li><p>Code point 0x0061 &#8216;a&#8217; is in the BMP and can be represented by a single UTF-16 code unit: 0x0061.</p></li><li><p>Code point 0x1F970 &#8216;&#129392;&#8217; is in an astral plane and represented by two code units: 0xD83E and 0xDD70.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!538A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!538A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 424w, https://substackcdn.com/image/fetch/$s_!538A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 848w, https://substackcdn.com/image/fetch/$s_!538A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 1272w, https://substackcdn.com/image/fetch/$s_!538A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!538A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png" width="1456" height="150" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/eed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:150,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:62285,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!538A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 424w, https://substackcdn.com/image/fetch/$s_!538A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 848w, https://substackcdn.com/image/fetch/$s_!538A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 1272w, https://substackcdn.com/image/fetch/$s_!538A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Feed40cff-d445-4e92-a270-48d48ac0ea89_2920x300.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div><hr></div><h2>The solution to the trivia!</h2><p>If you&#8217;re still here, know we have all information needed to explain the trivia!</p><p>Let&#8217;s start by reviewing the length of the emoji &#128104;&#8205;&#128105;&#8205;&#128102;</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AIw4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AIw4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 424w, https://substackcdn.com/image/fetch/$s_!AIw4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 848w, https://substackcdn.com/image/fetch/$s_!AIw4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 1272w, https://substackcdn.com/image/fetch/$s_!AIw4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AIw4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png" width="1456" height="150" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:150,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:46413,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AIw4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 424w, https://substackcdn.com/image/fetch/$s_!AIw4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 848w, https://substackcdn.com/image/fetch/$s_!AIw4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 1272w, https://substackcdn.com/image/fetch/$s_!AIw4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0e669d02-d3bc-4087-a735-e9f296070b14_2920x300.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Then we get the hex code points for each character</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zyGY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zyGY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 424w, https://substackcdn.com/image/fetch/$s_!zyGY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 848w, https://substackcdn.com/image/fetch/$s_!zyGY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 1272w, https://substackcdn.com/image/fetch/$s_!zyGY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zyGY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png" width="1456" height="158" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:158,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:134203,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zyGY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 424w, https://substackcdn.com/image/fetch/$s_!zyGY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 848w, https://substackcdn.com/image/fetch/$s_!zyGY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 1272w, https://substackcdn.com/image/fetch/$s_!zyGY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8fead88-2abe-47e5-aad5-3d9f6e10466a_3792x412.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>But wait for a second, why are we getting 5 elements if the length of the emoji is 8?</p><blockquote><p>Remember that Astral plane code points are encoded using <strong>two</strong> code units of 16-bit.</p><p>The elements at indexes 0, 2, and 4 are astral codes, so the sum of their length is 6 + the elements at indexes 1 &amp; 3 gives us a total of 8!</p></blockquote><p>Now let&#8217;s view what each code point represents</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OV2D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OV2D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 424w, https://substackcdn.com/image/fetch/$s_!OV2D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 848w, https://substackcdn.com/image/fetch/$s_!OV2D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 1272w, https://substackcdn.com/image/fetch/$s_!OV2D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OV2D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png" width="1456" height="284" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:284,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:138604,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OV2D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 424w, https://substackcdn.com/image/fetch/$s_!OV2D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 848w, https://substackcdn.com/image/fetch/$s_!OV2D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 1272w, https://substackcdn.com/image/fetch/$s_!OV2D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa044cda5-17a8-4fa6-a7ba-00645747a1fa_3792x740.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>And because we know about <strong>combining marks</strong> we know it&#8217;s possible to build something like</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NEmh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NEmh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 424w, https://substackcdn.com/image/fetch/$s_!NEmh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 848w, https://substackcdn.com/image/fetch/$s_!NEmh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 1272w, https://substackcdn.com/image/fetch/$s_!NEmh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NEmh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png" width="1456" height="115" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:115,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:100922,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NEmh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 424w, https://substackcdn.com/image/fetch/$s_!NEmh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 848w, https://substackcdn.com/image/fetch/$s_!NEmh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 1272w, https://substackcdn.com/image/fetch/$s_!NEmh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd459faec-b165-4dc2-a2a4-1968b84fab23_3792x300.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>But maybe you&#8217;re still wondering what that <strong>200d</strong> is about. That character is called <strong>Zero Width Joiner</strong> used to combine characters. And this brings us to some curiosities and final thoughts about the majestic world of Unicode.</p><p></p><h3>Curiosities and final thoughts</h3><ul><li><p>There are characters like Zero Width Joiner or Zero Width that can cause you a lot of trouble when copying &amp; paste things from the internet.</p></li><li><p>Independently if you work with a high-level programming language or low-level one, knowing how Unicode works are fundamental since it&#8217;s used by everyone.</p></li><li><p>In Javascript, characters from the astral plane have a length of 2, for example:</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0Osf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0Osf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 424w, https://substackcdn.com/image/fetch/$s_!0Osf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 848w, https://substackcdn.com/image/fetch/$s_!0Osf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 1272w, https://substackcdn.com/image/fetch/$s_!0Osf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0Osf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png" width="1456" height="150" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:150,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56841,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0Osf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 424w, https://substackcdn.com/image/fetch/$s_!0Osf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 848w, https://substackcdn.com/image/fetch/$s_!0Osf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 1272w, https://substackcdn.com/image/fetch/$s_!0Osf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb64ea35c-ee50-430b-85b2-5c5d9367e2d3_2920x300.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p>In applications like Twitter when the 140-character limit existed, astral codes could cause unexpected problems in terms of space. Since the user doesn&#8217;t care about the size of a character.</p></li><li><p>In Javascript, you can use the surrogates or the code point to represent a given character, for example</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jRFE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jRFE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 424w, https://substackcdn.com/image/fetch/$s_!jRFE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 848w, https://substackcdn.com/image/fetch/$s_!jRFE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 1272w, https://substackcdn.com/image/fetch/$s_!jRFE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jRFE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png" width="696" height="135.75824175824175" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:284,&quot;width&quot;:1456,&quot;resizeWidth&quot;:696,&quot;bytes&quot;:202210,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jRFE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 424w, https://substackcdn.com/image/fetch/$s_!jRFE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 848w, https://substackcdn.com/image/fetch/$s_!jRFE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 1272w, https://substackcdn.com/image/fetch/$s_!jRFE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8f61de3a-4b9e-457b-b0df-f9797a895036_3792x740.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div></li><li><p>Another example of combining marks is the use of skin tones</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oApR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oApR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 424w, https://substackcdn.com/image/fetch/$s_!oApR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 848w, https://substackcdn.com/image/fetch/$s_!oApR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 1272w, https://substackcdn.com/image/fetch/$s_!oApR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oApR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png" width="1456" height="158" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:158,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:122104,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oApR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 424w, https://substackcdn.com/image/fetch/$s_!oApR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 848w, https://substackcdn.com/image/fetch/$s_!oApR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 1272w, https://substackcdn.com/image/fetch/$s_!oApR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1e93c539-ee78-4576-8556-c6619406eeb2_3792x412.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><p>I hope you enjoyed the article and if the next time you are working on a code, where two texts have the EXACT characters but when checking they aren&#8217;t equal, remember that Unicode has some crazy things like Zero Width characters where a hidden character could be messing everything up.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Beyond the Event Loop]]></title><description><![CDATA[Did you know that the event loop is one of many different concurrency models?]]></description><link>https://www.codementornewsletter.com/p/beyond-the-event-loop</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/beyond-the-event-loop</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Wed, 30 Nov 2022 16:16:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CMIN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>At this point, you might be wondering why you should read this article. The answer is simple, to gain technical breadth to become a <em><strong>software architect</strong></em>!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CMIN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CMIN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 424w, https://substackcdn.com/image/fetch/$s_!CMIN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 848w, https://substackcdn.com/image/fetch/$s_!CMIN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 1272w, https://substackcdn.com/image/fetch/$s_!CMIN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CMIN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png" width="430" height="351" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:351,&quot;width&quot;:430,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;(https://nealford.com/memeagora/2015/09/08/knowledge-breadth-versus-depth.html)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="(https://nealford.com/memeagora/2015/09/08/knowledge-breadth-versus-depth.html)" title="(https://nealford.com/memeagora/2015/09/08/knowledge-breadth-versus-depth.html)" srcset="https://substackcdn.com/image/fetch/$s_!CMIN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 424w, https://substackcdn.com/image/fetch/$s_!CMIN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 848w, https://substackcdn.com/image/fetch/$s_!CMIN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 1272w, https://substackcdn.com/image/fetch/$s_!CMIN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe82b311c-3bf4-4612-9197-6fc79b5df193_430x351.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">https://nealford.com/memeagora/2015/09/08/knowledge-breadth-versus-depth.html</figcaption></figure></div><blockquote><p>If you come from Javascript you should be familiar with the Event Loop to prevent the website from being frozen by different tasks like fetching something from the backend. </p></blockquote><p><strong>&#8230;But did you know it&#8217;s just one of many concurrency models?</strong></p><p>Yes, and there are more concurrency models that we will explain later, but let&#8217;s start with the basics.</p><h3>What&#8217;s concurrency?</h3><p>Concurrency is when two or more tasks are executed simultaneously. But simultaneously is not necessary at the same time.</p><div class="pullquote"><p>The simplest example is a single cashier that attends to people from 2 or more lines.</p></div><h3>Event-driven</h3><p>Let&#8217;s start with the Event loop since it&#8217;s what we are familiar with. If you don&#8217;t know anything about the event loop I strongly recommend you watch this video.</p><div id="youtube2-8aGhZQkoFbQ" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;8aGhZQkoFbQ&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/8aGhZQkoFbQ?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h3>Threads &amp; locks</h3><p>The idea here is simple, we span several threads to execute multiple tasks, but this approach is known for several problems like deadlock where thread A cannot complete because it&#8217;s waiting for thread B to finish, but thread B is waiting for A to finish.</p><h3>Functional Programming</h3><p>FP has several principles like immutable state &amp; side effects should be minimal which helps against the problems that threads &amp; locks have.</p><p>Also, FP could be used in multithreaded environments without carrying much about any locking strategy.</p><h3>Actors </h3><p>The actor model focuses on how the components of a system interact with each other and how it should behave.</p><h4>Actor</h4><p>Is a fundamental unit of computation, it can perform actions like:</p><ul><li><p>Create an actor</p></li><li><p>Send a message</p></li><li><p>Define how to handle the next message</p></li></ul><p>The actors are isolated from each other, in other words, don&#8217;t share memory. And each actor has its own &#8220;<strong>mailbox</strong>&#8221;.</p><p>The mailbox is used to receive messages and each message is processed sequentially.</p><blockquote><p><em>Erlang uses the actor model.</em></p></blockquote><h3>Communicating Sequential Processes (CSP)</h3><p><strong>Channels </strong>are used for communication and synchronization. Processes are coupled to the channel.</p><p>A channel writes is blocked until a reader channel reads it. This is an advantage because the channel would hold only one message</p><blockquote><p><em>Go (programming language) implements CSP </em></p></blockquote><p></p><p>At this point, if you were to leave this post, just keep the following three points:</p><ol><li><p>The event loop is just an implementation of the event-driven concurrency model</p></li><li><p>Things to consider when working with different concurrency models:</p><ol><li><p>Sharing state</p></li><li><p>Consistency/inconsistency.</p></li><li><p>Locking strategies</p></li><li><p>Deadlocks</p></li><li><p>Race conditions</p></li></ol></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[What's wrong with React?]]></title><description><![CDATA[Lessons learned from smashing my head during 5 years of writing React]]></description><link>https://www.codementornewsletter.com/p/whats-wrong-with-react</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/whats-wrong-with-react</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Wed, 16 Nov 2022 16:47:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nDu9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It&#8217;s clear that writing clean, testable &amp; decoupled code is way harder and you might look at your own code and be ashamed of how bad it is.</p><p>But before we talk about what you should do in order to improve your react apps. Let&#8217;s understand what&#8217;s wrong with React.</p><div><hr></div><blockquote><p><strong>Disclaimer:</strong> I love the react community &amp; its main contributors. Here are just my two cents on what&#8217;s wrong and what you could do to make your code cleaner.</p></blockquote><p></p><h2>Simplicity</h2><p>For good or bad, I think the root cause of spaghetti code it&#8217;s that they decided to provide a <em><strong>simple library</strong></em> and let the user solve a million questions on their own, for instance:</p><ul><li><p>What routing to use?</p></li><li><p>How to fetch data?</p></li><li><p>Where to store the state?</p></li><li><p>How to store the state?</p></li><li><p>&#8230;and so on</p></li></ul><p>So eventually every React project has its own decisions, in contrast, there is a concept of <em><strong>Convention over configuration (</strong>popularized by Ruby on Rails)</em> where the idea is to provide answers for a lot of those things out of the box.</p><p>In the end, this is a battle between being <em><strong>flexible</strong></em><strong> </strong>or<strong> </strong><em><strong>standard</strong></em>, but lately, I&#8217;ve seen it&#8217;s hurting the community, because it overwhelms the developers, not everyone can configure the tools in a safe and proper way which only brings more problems down the line.</p><h2>Prematurity</h2><p>This is a clear complaint with &#8220;<strong>hooks&#8221;;</strong> they introduced them and got an outstanding adoption but lacked documentation. Then soon enough they started to see their usage and how people <em>overused</em> it or didn&#8217;t use it correctly, so they identified many scenarios that could be corrected with proper documentation, Thanks for the new beta documentation (<a href="https://beta.reactjs.org/">Check it out</a>).</p><p>But that was a mistake they did since they deliver hooks and IMO they didn&#8217;t even have a clear idea of what was the correct way to use which eventually caused a lot of tech debt.</p><h2>Reactivity</h2><p>I&#8217;m the least capable person to talk about reactivity but keeping in sync the state &amp; the DOM it&#8217;s a complex problem to solve, but it&#8217;s even harder to expose an abstraction to all developers that&#8217;s easy to use.</p><p>React with a bunch of hooks/effects make the code hard to read and fully understand the execution because one simple change can result in quite a few executions of the Component Function. So it&#8217;s easy to lose track of the flow because we are never in control of it (which sorta makes sense).</p><p>In contrast, there are other alternatives that have nailed it like Svelte where they abstract that code from the developer which results in more readable and clean code.</p><h2>Performance</h2><p>There is no doubt that React is fast, but the problem is that most of the frameworks focus a lot of effort &amp; discussions around how performant their libraries/frameworks are, but seems like they are putting on the side how easy &amp; scalable writing code with their tools is.</p><p>This point tights back to the complex abstractions and missing some of the conventions over configuration ideas.</p><p></p><p>There are also some gotchas with some patterns that are advocate like the following:</p><h4><strong>High-order components (HOC)</strong></h4><p>were so popular but they could shadow other properties.</p><p>In the following example, does &#8220;<strong>isLoading</strong>&#8221; it&#8217;s referring to <strong>withLoadingUsers</strong> or <strong>withLoadingFriends</strong>?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nDu9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nDu9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 424w, https://substackcdn.com/image/fetch/$s_!nDu9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 848w, https://substackcdn.com/image/fetch/$s_!nDu9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 1272w, https://substackcdn.com/image/fetch/$s_!nDu9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nDu9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png" width="1456" height="732" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e7113626-409f-42c3-833d-e4365bc6d390_1460x734.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132976,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nDu9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 424w, https://substackcdn.com/image/fetch/$s_!nDu9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 848w, https://substackcdn.com/image/fetch/$s_!nDu9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 1272w, https://substackcdn.com/image/fetch/$s_!nDu9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7113626-409f-42c3-833d-e4365bc6d390_1460x734.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>So you might think, nobody is going to do this, since it&#8217;s pretty obvious, but when you have separate files, and ship features in different sprints, it&#8217;s easy for a developer just add another HOC wrapper which might cause more issues.</p><h4><strong>Hooks</strong></h4><p>React components could become huge, so it&#8217;s a good practice to move a lot of that logic into their own hooks, but that just means you&#8217;re moving code to other files and eventually have highly couple hooks with your services because there is no such thing as dependency injection.</p><h3></h3><p>Enough talk about what&#8217;s wrong, if you haven&#8217;t read Clean code, go and read it, that&#8217;s the first step to writing code in any language/framework you use.</p><p>For React, I&#8217;m not going to answer any of the initial questions because you could be using React Context, redux, redux-saga, etc, or Apollo client, react-query, etc.</p><p>But in terms of writing <strong>cleaner react code</strong>, you can start by:</p><ol><li><p>Read the beta documentation <a href="https://beta.reactjs.org/">here</a></p></li><li><p>Create small components</p></li><li><p>Use single responsibility principles with hooks.</p></li><li><p>Use React Context instead of props drill down.</p></li><li><p>Minimize the use of useEffect/memos/callbacks until you really need them.</p></li><li><p>Decouple business logic from React.</p></li><li><p>Augment or create models around your objects. For instance:</p><ol><li><p>Let&#8217;s say you get back a user object with firstName &amp; lastName and you need to render the full name</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y6Wd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 424w, https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 848w, https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 1272w, https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png" width="1456" height="265" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/dbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:265,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:47167,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 424w, https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 848w, https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 1272w, https://substackcdn.com/image/fetch/$s_!Y6Wd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fdbc45da0-efbc-4654-a68a-b7a187ea1bed_1460x266.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The problem with the above snippet is that probably that&#8217;s not the only place you&#8217;d need to display the full name, so eventually, you end up repeating the same code, but what if there is no last name? or whatsoever? you&#8217;d have inconsistency because you might not be fixing or handling different cases the same way.</p><p>A preferred option would be to <strong>augment</strong> the objects with either new properties or a helper method</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TS3b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TS3b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 424w, https://substackcdn.com/image/fetch/$s_!TS3b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 848w, https://substackcdn.com/image/fetch/$s_!TS3b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 1272w, https://substackcdn.com/image/fetch/$s_!TS3b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TS3b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png" width="1456" height="521" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:521,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97700,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TS3b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 424w, https://substackcdn.com/image/fetch/$s_!TS3b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 848w, https://substackcdn.com/image/fetch/$s_!TS3b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 1272w, https://substackcdn.com/image/fetch/$s_!TS3b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F29329cdb-2677-4a4f-9374-5b2601f27df4_1460x522.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li></ol></li></ol><p></p><p>It&#8217;s common to work on code bases that are built wrong, but the main idea is to challenge what&#8217;s the convention and investigate ideas of how to make it cleaner and more readable. As a follow-up action item would be to explore different design approaches like DDD or patterns that could help you make better choices in the future.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Typescript it's ruling the Javascript ecosystem]]></title><description><![CDATA[Why you should learn it ...the right way]]></description><link>https://www.codementornewsletter.com/p/typescript-its-ruling-the-javascript</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/typescript-its-ruling-the-javascript</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Thu, 27 Oct 2022 20:42:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6zIt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you start a new project or create a new file in an existing repository using plain Javascript, you're already introducing technical debt to the project because the default is to work with Typescript instead.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6zIt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6zIt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!6zIt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!6zIt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!6zIt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6zIt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png" width="1080" height="1080" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51274,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6zIt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!6zIt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!6zIt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!6zIt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fec62e845-c3a6-4332-8dd7-8d1f5065303e_1080x1080.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p>At this point, you might disagree with me but the idea of this post it&#8217;s to help you surf the Typescript wave! &#127754;&#127940;&#8205;&#9794;&#65039;</p><p>Typescript&#8217;s like a tsunami that&#8217;s powering most of the new projects and companies are even migrating existing projects.</p><p>But you might be wondering why everyone it&#8217;s using it. So the answer is <em><strong>popularity</strong></em> and all benefits of being strongly typed. </p><p>In our community, once something is popular it becomes the default, what everyone uses, what&#8217;s asked during interview questions, and so on.</p><p>Another concrete benefit is <em><strong>strongly typed</strong></em>, but if you haven&#8217;t used it in another programming language you might be skeptical at this point. So from now on, I&#8217;d tackle each point that you could benefit from being strongly typed.</p><ol><li><p><strong>Explicitly</strong></p><p>There is a phrase in Python&#8217;s Zen:</p><blockquote><p>Explicitly is better than implicit</p></blockquote><p>Let&#8217;s look at the following snippet</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!61-K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!61-K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 424w, https://substackcdn.com/image/fetch/$s_!61-K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 848w, https://substackcdn.com/image/fetch/$s_!61-K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 1272w, https://substackcdn.com/image/fetch/$s_!61-K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!61-K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png" width="1288" height="182" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:182,&quot;width&quot;:1288,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37400,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!61-K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 424w, https://substackcdn.com/image/fetch/$s_!61-K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 848w, https://substackcdn.com/image/fetch/$s_!61-K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 1272w, https://substackcdn.com/image/fetch/$s_!61-K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1143638-2f6c-4fc2-a2c5-09d4596c6e46_1288x182.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Just by reading the code, you can&#8217;t determine what each movie has. This means you don&#8217;t have enough context and eventually would need to exercise the endpoint to know what&#8217;s available or not.</p><p></p><p>On the other hand, let&#8217;s look at a Typescript example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zGS3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zGS3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 424w, https://substackcdn.com/image/fetch/$s_!zGS3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 848w, https://substackcdn.com/image/fetch/$s_!zGS3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 1272w, https://substackcdn.com/image/fetch/$s_!zGS3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zGS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png" width="1456" height="521" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:521,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77410,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zGS3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 424w, https://substackcdn.com/image/fetch/$s_!zGS3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 848w, https://substackcdn.com/image/fetch/$s_!zGS3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 1272w, https://substackcdn.com/image/fetch/$s_!zGS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95ae105-788f-4f3c-a4e4-d29802dc7d60_1460x522.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It&#8217;s clear what movies are and what properties can be used.</p><p></p></li><li><p><strong>Intellisense</strong></p><p>Following the previous example, now the editors have more hints to let us know what properties to use which would speed up our coding and minimize the errors we could introduce by silly things like <em><strong>mispellng</strong></em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a-6D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a-6D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 424w, https://substackcdn.com/image/fetch/$s_!a-6D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 848w, https://substackcdn.com/image/fetch/$s_!a-6D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 1272w, https://substackcdn.com/image/fetch/$s_!a-6D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a-6D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png" width="1456" height="828" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:828,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:147146,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!a-6D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 424w, https://substackcdn.com/image/fetch/$s_!a-6D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 848w, https://substackcdn.com/image/fetch/$s_!a-6D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 1272w, https://substackcdn.com/image/fetch/$s_!a-6D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1072af6b-22b7-468e-81dd-15f15eb0a9d2_1618x920.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p></li><li><p><strong>Spot errors during development</strong></p><p>It&#8217;s quite common to introduce code refactors, change code around, or add new functionality. </p><p>These are things we are used to doing daily and is likely that at some point we do something wrong, and could introduce a bug that lands into production &#129762;</p><p>If you are unfamiliar with the following image, let me present the cost of finding a bug in the different stages.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RiVM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RiVM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 424w, https://substackcdn.com/image/fetch/$s_!RiVM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 848w, https://substackcdn.com/image/fetch/$s_!RiVM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 1272w, https://substackcdn.com/image/fetch/$s_!RiVM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RiVM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png" width="635" height="390" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:635,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Massively reduce the cost of bugs with error tracking &#183; Raygun Blog&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Massively reduce the cost of bugs with error tracking &#183; Raygun Blog" title="Massively reduce the cost of bugs with error tracking &#183; Raygun Blog" srcset="https://substackcdn.com/image/fetch/$s_!RiVM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 424w, https://substackcdn.com/image/fetch/$s_!RiVM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 848w, https://substackcdn.com/image/fetch/$s_!RiVM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 1272w, https://substackcdn.com/image/fetch/$s_!RiVM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F01596135-6b0b-45ed-b1bb-4e9e19bb6058_635x390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">https://raygun.com/blog/massively-reduce-the-cost-of-bugs-with-raygun-error-tracking/</figcaption></figure></div><p>So, it&#8217;s clear that the sooner we spot errors the better and that&#8217;s a key advantage of using Typescript over plain Javascript.</p><p>Typescript would give you feedback as you write code like the following example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TdSz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TdSz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 424w, https://substackcdn.com/image/fetch/$s_!TdSz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 848w, https://substackcdn.com/image/fetch/$s_!TdSz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 1272w, https://substackcdn.com/image/fetch/$s_!TdSz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TdSz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png" width="1456" height="528" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/90167406-3492-4520-a01d-7967fb392350_2124x770.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:528,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:141643,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TdSz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 424w, https://substackcdn.com/image/fetch/$s_!TdSz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 848w, https://substackcdn.com/image/fetch/$s_!TdSz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 1272w, https://substackcdn.com/image/fetch/$s_!TdSz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F90167406-3492-4520-a01d-7967fb392350_2124x770.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li></ol><p></p><p>Like any tool, if you don&#8217;t use it properly it just becomes useless. For that reason in the following section, I&#8217;d share with you common mistakes I&#8217;ve seen during the two years of writing Typescript at my current company</p><ol><li><p><strong>Ignoring errors</strong></p><p>The easiest way to tackle a typescript error is just to ignore it. But soon enough it could become the norm and you see comments like the following spread all over the code base.</p><p><code>//@ts-ignore</code></p><p></p><p><strong>Solution:</strong>  be strict with its usage &amp; request the developers to properly handle them. If they can&#8217;t fix it, probably it&#8217;s a lack of knowledge rather than it being impossible to fix.</p><p></p></li><li><p><strong>Overuse of &#8220;</strong><em><strong>any&#8221;</strong></em></p><p>Any is the same as having no typing in your code, so it becomes useless to have Typescript if your source code is full of any.</p><p></p><p>Solutions:</p><ol><li><p>Set the &#8220;<strong>noImplicitAny</strong>&#8221; true in the typescript configuration</p></li><li><p>Encourage the team to NOT use any since it&#8217;s a bad practice.</p><p></p></li></ol></li><li><p><strong>Repeated types</strong></p><p>We are all familiar with the DRY principle but seems like people tend to forget about it or they are just lazy to either look for places where a type could already exist or refactor the code to elevate a type to a common folder/place.</p><p><br>For example, let&#8217;s say you develop a user table and define a <strong>PaginationType,</strong> then another developer works on another table somewhere else and also defines a <strong>PaginationType.<br></strong>At this point, we have the same type in different places, we aren&#8217;t following the DRY principle and eventually could create inconsistencies.</p><p></p><p>Solution:</p><p>There is no recipe for this particular problem but one thing you could do it&#8217;s to define global types where generic things would live, like types for the user, pagination, filters, etc.</p></li></ol><p></p><p>To recap, definitely Typescript is something you are currently using or soon enough you&#8217;d be working on a project where you have to use it.<br>If you have some experience with strongly typed programming languages, you know the drill, otherwise, I&#8217;d recommend you dive deep into the <a href="https://www.typescriptlang.org/docs/">Typescript Documentation</a> gain experience and learn how to use it appropriately.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[A path for promotion]]></title><description><![CDATA[5 steps to get your next career promotion]]></description><link>https://www.codementornewsletter.com/p/a-path-for-promotion</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/a-path-for-promotion</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Wed, 19 Oct 2022 15:42:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!C3nK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8386a9d-1166-4945-a2f7-6afd518603a0_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Let&#8217;s start this off with a controversial theme, <em><strong>Parents, their children, and the school</strong></em></p><p>Have you seen parents complaining that their kids aren&#8217;t receiving the necessary education at school? Or that they don&#8217;t behave correctly because of their teachers? or any other random comment to excuse themselves?</p><p>If you&#8217;re one of them&#8230; sorry but you as a parent are the only one responsible for your children's education.</p><p>The same happens for us as employees, maybe you&#8217;re complaining that you can&#8217;t grow at your current company, there is no room for improvement, that you&#8217;re the smartest person in the room, etc.,</p><p>All of these bring us to the first step towards leveling up in your career</p><h2>1. You&#8217;re the only one responsible for your growth.</h2><p>Don&#8217;t put your future in the hands of your manager or company. You should take time to learn new stuff, reinforce what you already know, learn from your mistakes, etc.</p><p>Take time to learn the fundamentals, and learn things agnostic to specific technologies, companies, etc since that can be transitory.</p><p>Use deep and shallow learning, if you&#8217;re a Javascript engineer, learn Javascript deeply and learn other things you might not be using more shallow like AWS, microservices, databases, and so on.</p><p>If you don&#8217;t know how to get to the next level look for a coach. It&#8217;s used in sports, you see people with personal trainers, mentors, and coaches.</p><p>The same could be applied in your professional career and get guidance to focus on the right things.</p><blockquote><p>At some point, I was doing Front end stuff HTML. CSS &amp; JS and there was no room for working on backend projects, but instead of complaining to my boss, I dedicated time to learning it and eventually landed a better job where I could use my new skill set.</p></blockquote><h2>2. The title is not correlated with the knowledge</h2><p>Every company has a different standard of what level a Junior, Senior, etc should be.</p><p>And usually, when you get a new promotion you don&#8217;t change what you&#8217;re learning, for instance, it&#8217;s different going from Mid developer to a tech lead, or from a tech lead to an engineer manager.</p><p>So if you have been doing tasks from the next role you can aim, or if luckily the company promoted you to a particular role without you having the experience, it&#8217;s your responsibility to research, study and apply the responsibilities for that role.</p><blockquote><p>I have seen many Sr Software engineers with 3 or 5 years of experience, but quite often they are Seniors because they moved between different companies so quickly that they became Senior based on the salary range they were in, instead of their skills. (At least in Costa Rica).</p><p>And they keep working as usual without doing things like mentoring Jr devs, improving the overall quality of their code, learning how to manage people, etc.</p></blockquote><h2>3. Challenge your own assumptions</h2><p>If I ask you, do you know how to use booleans in your favorite programming language?  Your answer would be yes. In the end, booleans are super simple, it&#8217;s just <strong>True</strong> or <strong>False.</strong></p><p>So if you know how booleans work, you aren&#8217;t going to take time learning new stuff around it because you know everything. But what if I ask you, <em><strong>what are boolean traps</strong></em>? (if you don&#8217;t know read <a href="https://www.30secondsofcode.org/articles/s/javascript-boolean-trap">this</a>).</p><p>The whole point is to make a conscious assessment, identify areas you can improve, and even reevaluate the things you think you know.</p><h2>4. It&#8217;s not a race&#8230;</h2><p>When you enroll in a race, your goal it&#8217;s to be #1.</p><p>But <strong>not</strong> at work, it&#8217;s a collaborative environment which means you can&#8217;t just pretend to grow on your own, sabotage your teammates and get the desired promotion.</p><p>This means you should talk with your team, and try to grow together, by setting a shared commitment, it can be taking a course on Fridays, learning &amp; sharing knowledge, or asking for help &amp; constructive feedback.</p><p>They as outsiders can point you towards areas you should improve that you might not even be aware of.</p><p>Also, it&#8217;s not running faster than the person behind you, it&#8217;s giving them a hand to overcome their challenges <strong>&#8220;</strong><em><strong>Be the Senior dev you wanted as Junior</strong></em><strong>&#8221;</strong>.  You&#8217;d learn a lot when trying to explain things to them. Teaching is harder than you might expect.</p><blockquote><p>Have you tried this and nobody got involved? Talk to your manager, and ask other members outside your team that might be interested.</p></blockquote><h2>5. &#8230; it&#8217;s a journey</h2><p>At the end of the day, companies, roles, titles, and trendy technologies are gone, and what&#8217;s left it&#8217;s your knowledge and the relationships you make.</p><p>Since it&#8217;s a long ride, you should enjoy it to make sure you&#8217;d keep working hard, so you must start making habits for being a lifelong learner, help others along the way and surround yourself with people that go in the same direction.</p><div><hr></div><p></p><p>To finalize, getting better in your profession is the same as being healthy, you need to measure your current shape (<em>assess your skill set</em>), eat healthily &amp; work out (<em>learn &amp; apply the knowledge</em>).</p><p>And at the end of the day the key to success it&#8217;s to <em><strong>enjoy the ride!</strong></em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[5 CSS concepts you MUST know]]></title><description><![CDATA[Hey, Bryan here! Welcome to my newsletter.]]></description><link>https://www.codementornewsletter.com/p/5-css-concepts-you-must-know</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/5-css-concepts-you-must-know</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Tue, 11 Oct 2022 19:33:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Y-zn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Hey,&nbsp;<a href="https://twitter.com/bryancr89">Bryan</a>&nbsp;here!&nbsp;Welcome to my newsletter. Each week I publish content to help you get to the next level in your career. Here we talk about coding, from what a programming language is to how to become an outstanding tech lead. If you have questions, don&#8217;t agree with something, or just want to say &#8220;Hi!&#8221; don&#8217;t hesitate to send me a message &#10084;&#65039;</em></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y-zn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y-zn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 424w, https://substackcdn.com/image/fetch/$s_!Y-zn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 848w, https://substackcdn.com/image/fetch/$s_!Y-zn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 1272w, https://substackcdn.com/image/fetch/$s_!Y-zn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y-zn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png" width="638" height="376" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:376,&quot;width&quot;:638,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;CSS IS AWESOME. There are three conditions that have to&#8230; | by Tharaka  Peiris | Medium&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="CSS IS AWESOME. There are three conditions that have to&#8230; | by Tharaka  Peiris | Medium" title="CSS IS AWESOME. There are three conditions that have to&#8230; | by Tharaka  Peiris | Medium" srcset="https://substackcdn.com/image/fetch/$s_!Y-zn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 424w, https://substackcdn.com/image/fetch/$s_!Y-zn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 848w, https://substackcdn.com/image/fetch/$s_!Y-zn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 1272w, https://substackcdn.com/image/fetch/$s_!Y-zn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffbeffb5b-3c96-41c5-8158-38f4f141812f_638x376.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Do you agree CSS is awesomely hard? yeah we all think the same, but it shouldn&#8217;t be that way! everything it&#8217;s going to be different once you master the fundamental concepts around CSS, those concepts would help you understand why and how the browser renders the elements on the screen.</p><blockquote><p><strong>Clarification:</strong> Knowing CSS wouldn&#8217;t make you better at creating beautiful pages. It would help you convert the designer's work into web pages efficiently.</p></blockquote><h2>Box model</h2><p>CSS treats all elements like boxes. The browser would determine the width &amp; height of the box by computing the props (<em>Content box, Padding box, Border box &amp; Margin box). </em>As shown in the following image</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kpQy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kpQy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 424w, https://substackcdn.com/image/fetch/$s_!kpQy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 848w, https://substackcdn.com/image/fetch/$s_!kpQy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 1272w, https://substackcdn.com/image/fetch/$s_!kpQy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kpQy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png" width="455" height="340" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:340,&quot;width&quot;:455,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Box model&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Box model" title="Box model" srcset="https://substackcdn.com/image/fetch/$s_!kpQy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 424w, https://substackcdn.com/image/fetch/$s_!kpQy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 848w, https://substackcdn.com/image/fetch/$s_!kpQy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 1272w, https://substackcdn.com/image/fetch/$s_!kpQy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc016bf5f-f145-46dc-bbe8-7ce83eea2ee6_455x340.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">https://www.w3.org/TR/CSS2/box.html</figcaption></figure></div><blockquote><p>The browsers apply user agent stylesheets to each HTML element. For instance, most of the elements have a style of <code>display: block; </code>meanwhile, the <code>&lt;span&gt; </code>have a <code>display: inline;</code></p></blockquote><p>Every box would be rendered based on what display property value has, for instance, when using the &#8220;inline&#8221; box, all box properties except the border would be ignored.</p><blockquote><p><strong>Interview Question:</strong> What is the difference between a div and a span?</p><p>Answer: by default the user agent renders the div using the display as a &#8220;block&#8221; meanwhile the span is rendered using &#8220;inline&#8221; and most box properties have no effect in an &#8220;inline&#8221; box.</p></blockquote><h2>Selectors</h2><p>Selectors are used to &#8220;select&#8221; the element(s) you want to apply the style. There are many selectors, the most commons are:</p><ul><li><p>Element Selector: <code>p</code></p></li><li><p>Class selector: <code>.some-class-name</code></p></li><li><p>Id selector: <code>#unique-id</code></p></li><li><p>Data attribute: <code>[data-key='some-value']</code></p></li></ul><p>You are capable of nesting selectors, for instance:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Zyo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Zyo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 424w, https://substackcdn.com/image/fetch/$s_!6Zyo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 848w, https://substackcdn.com/image/fetch/$s_!6Zyo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 1272w, https://substackcdn.com/image/fetch/$s_!6Zyo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Zyo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png" width="602" height="210.7" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/28e2745b-8606-4343-89c4-f3391de621f6_640x224.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:224,&quot;width&quot;:640,&quot;resizeWidth&quot;:602,&quot;bytes&quot;:16687,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Zyo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 424w, https://substackcdn.com/image/fetch/$s_!6Zyo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 848w, https://substackcdn.com/image/fetch/$s_!6Zyo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 1272w, https://substackcdn.com/image/fetch/$s_!6Zyo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F28e2745b-8606-4343-89c4-f3391de621f6_640x224.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In the previous snippet, the browser would get all elements that have a &#8220;div&#8221; and one of the parent element has an id of &#8220;unique-id&#8221;.</p><blockquote><p><strong>&#128680; The browsers read the selectors from right to left! &#128680;</strong></p></blockquote><p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">Here</a> you can check the full list of selectors!</p><h2>Cascading</h2><p>It&#8217;s possible to have different CSS selectors applied to the same element. So there are four rules that determine what CSS would be applied.</p><p><strong>For instance, do you know what background color is going to be used?</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-7HI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-7HI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 424w, https://substackcdn.com/image/fetch/$s_!-7HI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 848w, https://substackcdn.com/image/fetch/$s_!-7HI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 1272w, https://substackcdn.com/image/fetch/$s_!-7HI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-7HI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png" width="640" height="394" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:394,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:26692,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-7HI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 424w, https://substackcdn.com/image/fetch/$s_!-7HI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 848w, https://substackcdn.com/image/fetch/$s_!-7HI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 1272w, https://substackcdn.com/image/fetch/$s_!-7HI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F8232c75c-c7d3-4277-a966-9dd5ba93458a_640x394.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>If you don&#8217;t know the answer, don&#8217;t worry. Here is all you need to know about cascading!</p><p>First, it&#8217;s what&#8217;s the <strong>selector order and position in the source code</strong>, the answer for the previous example it&#8217;s <strong>blue </strong>because the latest appearance predominates.</p><p>Secondly, we have the CSS specificity, but we have an entire section to cover it.</p><p>Third, it&#8217;s the origin of the styles</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9DYN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9DYN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 424w, https://substackcdn.com/image/fetch/$s_!9DYN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 848w, https://substackcdn.com/image/fetch/$s_!9DYN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 1272w, https://substackcdn.com/image/fetch/$s_!9DYN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9DYN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg" width="760" height="319" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:319,&quot;width&quot;:760,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A visual demonstration of the order of origins as also explained in the list.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A visual demonstration of the order of origins as also explained in the list." title="A visual demonstration of the order of origins as also explained in the list." srcset="https://substackcdn.com/image/fetch/$s_!9DYN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 424w, https://substackcdn.com/image/fetch/$s_!9DYN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 848w, https://substackcdn.com/image/fetch/$s_!9DYN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 1272w, https://substackcdn.com/image/fetch/$s_!9DYN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F3fbd60b6-e3fa-4abd-b11b-5895336ebb2f_760x319.svg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image from (https://web.dev/learn/css/the-cascade/)</figcaption></figure></div><p>And lastly, the <code>!important</code> rule that would overwrite more specific selectors.</p><h2>Specificity</h2><p>Each selector has a scoring, and based on it the browsers determine which one has higher relevance. But, a picture is worth a thousand words, so here you can check the score for the different selectors. (Image borrowed, the source is in the caption)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g1_O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g1_O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 424w, https://substackcdn.com/image/fetch/$s_!g1_O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 848w, https://substackcdn.com/image/fetch/$s_!g1_O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 1272w, https://substackcdn.com/image/fetch/$s_!g1_O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g1_O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png" width="1275" height="1650" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1650,&quot;width&quot;:1275,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;CSS Specificity&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="CSS Specificity" title="CSS Specificity" srcset="https://substackcdn.com/image/fetch/$s_!g1_O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 424w, https://substackcdn.com/image/fetch/$s_!g1_O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 848w, https://substackcdn.com/image/fetch/$s_!g1_O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 1272w, https://substackcdn.com/image/fetch/$s_!g1_O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb615e925-9eb6-48a8-9f6e-b845826b5533_1275x1650.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image from (http://www.standardista.com/css3/css-specificity/)</figcaption></figure></div><h2>Layout</h2><p>The main goal of learning about layouts it&#8217;s to know how to arrange the different boxes on the screen. By default, the browser arranges the boxes from top to bottom, left to right, but you&#8217;re capable to change the behavior.</p><p>We briefly talked about the display property and the values &#8220;block&#8221; and &#8220;inline&#8221;. Besides those two, we have &#8220;inline-block&#8221; that lets multiple elements be in the same line, without breaking the content in a &#8220;new line&#8221;.</p><p>And more recently Flexbox and grids are at your disposal, the key difference between the two of them is that Flexbox lets you arrange boxes only in one axis, either horizontally or vertically. Meanwhile, grids let you arrange the boxes in multi-axis.</p><p>You can learn Flexbox <a href="https://flexboxfroggy.com/">here</a> (it&#8217;s a game! &#127918;&#128293;)</p><p>You can learn Grid <a href="https://cssgridgarden.com/">here</a> (can you guess it? oh yeah, it&#8217;s another game)</p><p>There are two more ways to change how the elements are arranged on the page: by using floats, and as the words said, you can either float the element on the left or right side of other content.</p><p>The other option is by using positioning. All elements are default positioned &#8220;relative&#8221; to their parent element. But you can use other values like &#8220;absolute&#8221; that lets you move the box around by using (<em>top, right, bottom, left</em>) properties, where the box would be moved based on the closes ancestor with relative positioning if the browser doesn&#8217;t find one relative element it would use the body element.</p><p>Lastly, have you ever visited a site where you scroll down and the header sticks at the top? The CSS that handles that behavior is a fixed positioning that would always display the box even if you scroll throughout the page.</p><h2>Conclusion</h2><p>I bet you still think that CSS is hard, but the key takeaway for you should be to learn the fundamentals, once you have a good understanding of how things work, you would easily develop, take decisions and solve problems because you know why things are behaving in a certain way.</p><p>You could apply this advice to everything in your career. If you want to learn something in depth let me know in the comments.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Tools needed for writing code]]></title><description><![CDATA[The ecosystem to get into programming]]></description><link>https://www.codementornewsletter.com/p/tools-needed-for-writing-code</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/tools-needed-for-writing-code</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Fri, 30 Sep 2022 15:31:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9Q7_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Hey,&nbsp;<a href="https://twitter.com/bryancr89">Bryan</a>&nbsp;here!&nbsp;Welcome to my newsletter. Each week I publish content to help you get to the next level in your career. Here we talk about coding, from what a programming language is to how to become an outstanding tech lead. If you have questions, don&#8217;t agree with something, or just want to say &#8220;Hi!&#8221; don&#8217;t hesitate to send me a message &#10084;&#65039;</em></p><div><hr></div><h2>Do you want to learn how to program, but aren't sure what tools you need?</h2><p>I&#8217;d walk you through all tools you need to know for writing code. So, let&#8217;s dive in! </p><h2>1. Code Editor</h2><p>Certainly, you can write code in a simple text editor, but an editor with the following features would make you more productive:</p><ul><li><p>IntelliSense (code completion, parameters info, references, code usages, etc)</p></li><li><p>Debugging tools</p></li><li><p>Plugins to integrate with another tech like Databases, Docker, terminal, etc.</p></li><li><p>Linter &amp; auto-formatting.</p></li></ul><p>The choice is going to depend on what programming language you&#8217;re using. But the main options I use are:</p><h4>Visual Studio Code (free):</h4><p>You can use it for a variety of programming languages like Javascript, Node.js, Python, Go, Rust, etc</p><p><strong>Download it:</strong> https://code.visualstudio.com/</p><h4>Webstorm, Pycharm (from Jetbrains):</h4><p>If your company can afford it, it&#8217;s worth trying them. Webstorm is for web development, and Pycharm is for Python. <br>They also have for .NET &amp; Java.</p><p><strong>Download it:</strong> https://www.jetbrains.com/</p><p></p><p>Now that you have an editor, the next step would be to actually create a project. In technologies like web, node.js, or Python, usually we create a folder that contains a bunch of files written in that particular programming language. <strong>That&#8217;s it, there is no rocket science in this part.</strong></p><p>The following image is an example of a personal project, where you can see the project folder called <code>BLOG</code> with a bunch of folders to separate concerns (on the left) and a given file opened (on the right side), the file edit area.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9Q7_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9Q7_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 424w, https://substackcdn.com/image/fetch/$s_!9Q7_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 848w, https://substackcdn.com/image/fetch/$s_!9Q7_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 1272w, https://substackcdn.com/image/fetch/$s_!9Q7_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9Q7_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png" width="1456" height="913" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:913,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:578055,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9Q7_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 424w, https://substackcdn.com/image/fetch/$s_!9Q7_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 848w, https://substackcdn.com/image/fetch/$s_!9Q7_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 1272w, https://substackcdn.com/image/fetch/$s_!9Q7_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2c032d3-ca4f-4531-9e46-cfd18a238532_3456x2168.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>2. Choose a programming language</h2><p>Then you need to decide what programming language you&#8217;re going to use.</p><ul><li><p>Web project: Nowadays would need to download node.js. All of the toolings used to run the server locally, process the files, etc are done with node.js.</p><ul><li><p>Download it from here: https://nodejs.org/en/</p></li><li><p>When installing node.js, npm is installed as well (see package managers)</p></li></ul></li><li><p>Python project</p><ul><li><p>Download it from here: https://www.python.org/downloads/</p></li><li><p>When installing python, pip is installed as well (see package managers)</p></li></ul></li></ul><h4>Package managers</h4><p>Package managers usually are installed along with the programming language and their main goal is to let you download third-party libraries to reference from a given project.</p><p>For javascript/node.js all dependencies are specified in a package.json file whereas in Python you should add them to a requirements.txt file.</p><p>Why do we use it? Imagine you&#8217;re new in the team and need to set up the project, it would be a nightmare to go file by file identifying all dependencies and installing them. So it&#8217;s easier to keep track and install them from one central place.</p><h2>3. Version Control System</h2><p>Have you heard of Git &amp; Github (free for personal usage)? If not, these tools help us keep track of the code, see who changes what files, what were the changes, when the changes were introduced, etc.</p><p>Controlling this is critical in a collaborative environment where many people might be adding/editing/removing multiple files.</p><p>Also, have you ever lost some work that you had on a computer? Maybe you didn&#8217;t save the files and you spill some coffee on your computer and you were not able to recover them.</p><p>If that is the case, when you use a VCS, it&#8217;s guaranteed that there would be no loss, so your code would be safe.</p><p>We aren't going to cover Git here, but you can follow this guide https://www.freecodecamp.org/news/git-and-github-for-beginners/</p><h2>4. Virtual Environments</h2><blockquote><p><em>Years ago, I worked on a Java project that used SDK version 7 and everything was working fine until I tried to access my Bank Account, the site was using Java and the page didn&#8217;t load because I didn&#8217;t have the newer SDK. So I updated it, did some transactions, and head back to work, but to my surprise, the project didn&#8217;t load because I had a newer SDK version!!</em></p></blockquote><p>In programming languages like Node.js &amp; Python, you can use nvm or virtualenv in order to have more than one version of the programming language on your computer without any collision like what happened to me.</p><p>The key benefits are:</p><ul><li><p>Your computer can remain &#8220;clean&#8221; without globally installed packages.</p></li><li><p>You can have several projects using different versions of the programming language.</p></li></ul><p>Resources:</p><p>https://github.com/nvm-sh/nvm</p><p>https://docs.python.org/3/library/venv.html</p><h2>5. Tools for kick-start projects</h2><p>There are many tools that help you create a scaffolding project. For instance create-react-app, Django (python), Yeoman.</p><p>Those tools would create a folder with configuration files and commands to execute and build the code.</p><p>Resources:</p><p>https://reactjs.org/docs/create-a-new-react-app.html</p><p>https://www.djangoproject.com/start/</p><p>https://yeoman.io/</p><h2>6. Execution</h2><p>Did you write the code and want to try it out?</p><p>If you create a simple website you could install a server on your machine https://www.npmjs.com/package/serve and serve the folder directly.</p><p>If you created a python file you can run <code>&#8216;python filename.py'</code></p><p></p><p>At this point, if you feel overwhelmed by how many things could be involved in writing code, I suggest you start with scaffolding, usually those projects have a README.md file with all instructions needed to set up and run the project locally.</p><p>Shoot me a message if you need help setting up your first project! &#128293;</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Dissecting HTML]]></title><description><![CDATA[Everything you should know to make your site fast!]]></description><link>https://www.codementornewsletter.com/p/dissecting-html</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/dissecting-html</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Tue, 20 Sep 2022 16:06:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RAF9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em><strong>NOTE:</strong> If you have some experience with HTML please skip the introduction</em></p><h2>Introduction</h2><p><strong>HTML</strong> stands for HyperText Markup Language. And as I wrote in this <a href="https://www.codementornewsletter.com/p/do-you-know-what-programming-paradigms">programming paradigm</a> article it&#8217;s declarative.</p><p>When you visit a website, the server always responds with an HTML file that it&#8217;s processed to display the content, usually, this file is named <strong>index.html</strong></p><p>If you haven&#8217;t written HTML, don&#8217;t worry, we are going to learn the basics, so let&#8217;s go deeper and understand how&#8217;s the syntax.</p><p>HTML is made of elements that have semantic meaning to represent things like headlines, images, links, paragraphs, ordered lists, bullet lists, and others.</p><p>Each element is wrapped with angle brackets <code>&lt;&gt;</code> and called &#8220;tags&#8221;. Those tags have the following structure:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RAF9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RAF9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 424w, https://substackcdn.com/image/fetch/$s_!RAF9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 848w, https://substackcdn.com/image/fetch/$s_!RAF9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 1272w, https://substackcdn.com/image/fetch/$s_!RAF9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RAF9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png" width="728" height="415.8" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:594,&quot;width&quot;:1040,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:61688,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RAF9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 424w, https://substackcdn.com/image/fetch/$s_!RAF9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 848w, https://substackcdn.com/image/fetch/$s_!RAF9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 1272w, https://substackcdn.com/image/fetch/$s_!RAF9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a04e72-46bc-45d5-b875-ebd96b3c96d1_1040x594.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol><li><p><strong>Opening tag: </strong>in this example <code>p</code> is used to represent a paragraph.</p><ol><li><p>Each tag element can have zero or many attributes. Here, we used the <code>class</code> attribute</p></li></ol></li><li><p><strong>Content:</strong> that could be text or more HTML elements</p></li><li><p><strong>Closing tag</strong></p></li></ol><p>There are other tags called self-closing tags and have the following structure:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZYFK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZYFK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 424w, https://substackcdn.com/image/fetch/$s_!ZYFK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 848w, https://substackcdn.com/image/fetch/$s_!ZYFK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 1272w, https://substackcdn.com/image/fetch/$s_!ZYFK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZYFK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png" width="728" height="411.74488567990375" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:470,&quot;width&quot;:831,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:26095,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZYFK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 424w, https://substackcdn.com/image/fetch/$s_!ZYFK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 848w, https://substackcdn.com/image/fetch/$s_!ZYFK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 1272w, https://substackcdn.com/image/fetch/$s_!ZYFK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5c2d13ed-6b3f-4375-8aca-550cbc16b7fe_831x470.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol><li><p>Self-closing tag. Pay close attention to the <code>&#8220;/&#8221;</code> at the end</p><ol><li><p>Each tag element can have zero or many attributes. Here, we used the <code>class</code> attribute</p></li></ol></li></ol><p></p><h4>Html content structure</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G5LD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G5LD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 424w, https://substackcdn.com/image/fetch/$s_!G5LD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 848w, https://substackcdn.com/image/fetch/$s_!G5LD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 1272w, https://substackcdn.com/image/fetch/$s_!G5LD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G5LD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png" width="728" height="333.957773512476" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/edfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:478,&quot;width&quot;:1042,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:54778,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G5LD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 424w, https://substackcdn.com/image/fetch/$s_!G5LD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 848w, https://substackcdn.com/image/fetch/$s_!G5LD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 1272w, https://substackcdn.com/image/fetch/$s_!G5LD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fedfc4f29-c819-453d-9b27-99cd48a5eb86_1042x478.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><code>&lt;html&gt;</code> is the top level of an HTML document, also known as the <strong>root</strong> element. You can specify a language attribute that tells the idiom used in the content.</p><p>The &lt;<code>head&gt;</code> tag includes metadata that is not rendered on the page like the &lt;<code>title&gt;</code> tag:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-ta9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-ta9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 424w, https://substackcdn.com/image/fetch/$s_!-ta9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 848w, https://substackcdn.com/image/fetch/$s_!-ta9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 1272w, https://substackcdn.com/image/fetch/$s_!-ta9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-ta9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png" width="728" height="98.47945205479452" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:158,&quot;width&quot;:1168,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:58003,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-ta9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 424w, https://substackcdn.com/image/fetch/$s_!-ta9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 848w, https://substackcdn.com/image/fetch/$s_!-ta9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 1272w, https://substackcdn.com/image/fetch/$s_!-ta9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1b215daf-2455-4890-89d4-147240d7aefe_1168x158.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It also includes Javascript, CSS, description of the site, or any other media information used when sharing a link, for instance, When we shared a link on any site like Twitter or Facebook, we see information related to the page because we specified Open Graph meta tags, like the image below. (You can learn more about Open Graph <a href="https://ogp.me/">here</a>)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cAYF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cAYF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!cAYF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!cAYF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!cAYF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cAYF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png" width="728" height="728" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/add0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1080,&quot;width&quot;:1080,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:540183,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cAYF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 424w, https://substackcdn.com/image/fetch/$s_!cAYF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 848w, https://substackcdn.com/image/fetch/$s_!cAYF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!cAYF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fadd0f47e-97f1-4f0c-b03f-46802bda7036_1080x1080.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And finally, we have the <code>body</code> where all content we want our page to display would be inside the body tag.</p><p>Now that you know the basics of HTML, we can learn how the browsers process the HTML, and depending on how you structure the HTML elements you could slow or speed up your site's first render.</p><h2>How does the browser process the HTML?</h2><p>When your site loads, the first file that the browser download and processes are the HTML. The browser receives the bytes, convert them into characters, creates tokens from those characters and generates nodes to create the DOM (Document Object Model) tree.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jfas!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jfas!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 424w, https://substackcdn.com/image/fetch/$s_!Jfas!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 848w, https://substackcdn.com/image/fetch/$s_!Jfas!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 1272w, https://substackcdn.com/image/fetch/$s_!Jfas!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jfas!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png" width="728" height="607.6862745098039" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/e57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:894,&quot;width&quot;:1071,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:280759,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jfas!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 424w, https://substackcdn.com/image/fetch/$s_!Jfas!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 848w, https://substackcdn.com/image/fetch/$s_!Jfas!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 1272w, https://substackcdn.com/image/fetch/$s_!Jfas!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe57d574a-0306-4f7e-8135-60cb6b227396_1071x894.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Ideally, the first line it encounters it&#8217;s the DOCTYPE like the following:</p><pre><code>&lt;!DOCTYPE html&gt;
</code></pre><p>This line tells the browser to follow the relevant specification and also specify what HTML version to render, in this case, HTML 5.</p><p>The moment the browser encounters a CSS tag <code>&lt;link&gt;</code> it blocks the render and triggers a request to obtain the CSS file. Once the CSS file is retrieved, it starts to construct a CSSOM (CSS Object Model) tree, similar to the one that&#8217;s being created for the DOM.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dUkF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dUkF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 424w, https://substackcdn.com/image/fetch/$s_!dUkF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 848w, https://substackcdn.com/image/fetch/$s_!dUkF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 1272w, https://substackcdn.com/image/fetch/$s_!dUkF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dUkF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png" width="728" height="534.4277456647399" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:762,&quot;width&quot;:1038,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:176916,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dUkF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 424w, https://substackcdn.com/image/fetch/$s_!dUkF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 848w, https://substackcdn.com/image/fetch/$s_!dUkF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 1272w, https://substackcdn.com/image/fetch/$s_!dUkF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6440cc2d-d8f0-46a3-b5cd-b96c6bf66e83_1038x762.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The browsers get both trees (DOM &amp; CSSOM) to generate the <strong>Render Tree</strong>, in other words, what&#8217;s finally rendered on the page.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wb-3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wb-3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 424w, https://substackcdn.com/image/fetch/$s_!wb-3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 848w, https://substackcdn.com/image/fetch/$s_!wb-3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 1272w, https://substackcdn.com/image/fetch/$s_!wb-3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wb-3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png" width="728" height="552.6027906976744" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/ffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:816,&quot;width&quot;:1075,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:281734,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wb-3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 424w, https://substackcdn.com/image/fetch/$s_!wb-3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 848w, https://substackcdn.com/image/fetch/$s_!wb-3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 1272w, https://substackcdn.com/image/fetch/$s_!wb-3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fffc96d5c-b812-45b8-ba8b-ea95ab459a43_1075x816.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p>&#128161; Since the CSS blocks the rendering, we need to make sure to deliver it as soon as possible. For that reason you should consider the following suggestions:</p><ol><li><p>Import the styles in the <code>&lt;head&gt;</code></p></li><li><p>Use media attributes <code>media="(min-width: 640px)" /&gt;</code> This is only downloaded for bigger screens.</p></li><li><p>Defer non-critical CSS</p></li><li><p>Determine what&#8217;s the critical CSS and inline it in the HTML head. Use automated tools to do this process. This is going to depend on what technologies you&#8217;re using.</p></li></ol></blockquote><p></p><p>The browsers continue processing the HTML, constructed the CSSOM, and find an image tag with a URL to where to get the image from.</p><p>It triggers a request to obtain the image <strong>WITHOUT</strong> blocking the rendering and continues processing the HTML.</p><p>Then it continues and right before finishing the processing of the entire HTML file it encounters a <code>&lt;script&gt;</code> tag referencing a Javascript file.</p><p>So the browser <strong>BLOCKS</strong> the render again because the browser knows that the DOM or the CSSOM can be modified within Javascript and we didn&#8217;t tell the browser otherwise. So the Javascript file is retrieved, interpret, and executed the code with Just-In-Time compilation. This whole process takes time, so we should be thoughtful with where and how much Javascript we instruct the browser to download in the first render.</p><blockquote><p>&#128161; These techniques would help you speed up Javascript assets:</p><ol><li><p>Put the script at the end.</p></li><li><p>Use attributes like defer or async.</p></li><li><p>Apply code splitting techniques. Do not send a huge bundle file.</p></li><li><p>Use lazy load with code splitting.</p></li></ol></blockquote><p></p><h3>Takeaway</h3><p>Everything you put in the HTML would determine how fast users would access your site. There are studies that show that if a page takes more than 2 seconds to load is likely the user would leave, in other words, first impression matters!</p><p>If you&#8217;re trying to improve the first render review start by reviewing what you send in the HTML.</p><p>Single Page Applications don&#8217;t send the entire HTML, so you might want to do Server-Side Rendering to boost the first load.</p><p>The fewer assets you send with your HTML the better.</p><p>Research how the users are accessing your site if they are using smartphones, and check metrics like the First Contentful Paint, also test the site using slow connections or use your mobile plan instead of a reliable and fast wifi connection to see how fast or slow the page is.</p><p></p><h3>Bonus Question &#127873;</h3><p>Have you seen websites that look odd and suddenly they look pretty?</p><blockquote><p>The reason is that they might put CSS at the bottom of the HTML, so what happened was that the browsers render most of the HTML and at the end, the CSSOM is created and applied to the rendered tree.</p></blockquote><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[¿What you should know about web sites?]]></title><description><![CDATA[General knowledge of how a website is accessed.]]></description><link>https://www.codementornewsletter.com/p/what-you-should-know-about-web-sites</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/what-you-should-know-about-web-sites</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Thu, 15 Sep 2022 16:17:04 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Hey,&nbsp;<a href="https://twitter.com/bryancr89">Bryan</a>&nbsp;here!&nbsp;Welcome to my newsletter. Each week I publish content to help you get to the next level in your career. Here we talk about coding, from what a programming language is to how to become an outstanding tech lead. If you have questions, don&#8217;t agree with something, or just want to say &#8220;Hi!&#8221; don&#8217;t hesitate to send me a message &#10084;&#65039;</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" width="422" height="281.3333333333333" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1080,&quot;resizeWidth&quot;:422,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;computer screen showing google search&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="computer screen showing google search" title="computer screen showing google search" srcset="https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1586125674857-4eb86880905d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwxMHx8Z29vZ2xlfGVufDB8fHx8MTY2MzIwODYyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Can you make a website, but you don&#8217;t know how people around the world can access it? &#129300;</p><p>Or maybe you haven&#8217;t had the chance to build a website from zero to shipping it to production? or maybe someone else it&#8217;s responsible for the configuration and deployment like a DevOps person.</p><p>If you are identified with the above comment or just want to know more, in this article we are going to learn all pieces involved with delivering a site when you access it from your browser, like google.com or facebook.com</p><p>Before we talk about how a website is shown, every website uses a <strong>client/server</strong> architecture where different <strong>clients</strong> like computers, smartphones, etc can communicate with <strong>servers </strong>and these are in charge to fulfill a user request, in our case, showing a website.</p><p>The key piece here is the communication between a client and a server, this is achieved by using certain communication protocols. The protocols more used in web development are:</p><ol><li><p><strong>HTTP/HTTPS:</strong> EVERY time you type a URL like google.com an HTTP request is made and usually the content that the server sends back it&#8217;s the index.html file stored in the server.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rhVc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rhVc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 424w, https://substackcdn.com/image/fetch/$s_!rhVc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 848w, https://substackcdn.com/image/fetch/$s_!rhVc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 1272w, https://substackcdn.com/image/fetch/$s_!rhVc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rhVc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png" width="902" height="252" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:252,&quot;width&quot;:902,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116721,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!rhVc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 424w, https://substackcdn.com/image/fetch/$s_!rhVc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 848w, https://substackcdn.com/image/fetch/$s_!rhVc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 1272w, https://substackcdn.com/image/fetch/$s_!rhVc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F48a3ac3c-3b62-41cf-80b8-c4dfdc2801ca_902x252.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p><strong>WebSockets: </strong>these are used for real-time communication. For instance, when you join Facebook live, everyone is connected to the same event and able to send and receive messages/reactions almost instantly.</p></li><li><p><strong>RTMP</strong> (Real-Time Messaging Protocol): this one is used on sites like Twitch for streaming video content.</p></li></ol><p>Now you know about the web architecture and the most used protocols for communication and we can dive into what you SHOULD know if you are a web developer. </p><p>So let&#8217;s answer some basic questions</p><h2>How someone can access my website?</h2><p>First, we as humans are better with letters &amp; words than numbers. On the other hand, computers are better with numbers. For example, it&#8217;s easier to remember <a href="http://Facebook.com">Facebook.com</a> than their IP address 157.240.233.35</p><p>So, when someone Facebook.com there is a process that converts it into an IP address that let the client communicate with Facebook&#8217;s servers and eventually serves the site.</p><p>This process is made using <strong>DNS</strong> (Domain Name System). You can think of DNS as the old telephone directory or your contact list on your smartphone, where you look for someone&#8217;s name to make a call or send them a message.</p><p>Once the client has the site's IP address, there is a back and forth between the client &amp; server to establish a connection.</p><p>Once the connection is made, the server sends the HTML and the browser it&#8217;s in charge of processing the HTML, CSS &amp; JS to show the content on the screen.</p><h2>Demystify domains</h2><p>If you&#8217;re thinking of buying a domain, you should think primarily about two things, the site name and the TLD (top-level domain), for instance, a &#8220;.gov&#8221; if the site belongs to the government, there are other many TLDs for countries like &#8220;.us&#8221; or &#8220;.org&#8221;, the famous &#8220;.com&#8221;, etc.</p><blockquote><p><strong>google.com</strong> is the main domain where the name is <strong>google</strong> and the TLD is <strong>.com</strong></p></blockquote><p>Now, when we buy a domain we can register as many subdomains that points to different sites by using <strong>CNAME.</strong> For example, sites like <strong>drive.google.com</strong> and <strong>photos.google.com </strong>are subdomains for google.com</p><h2>Where are the websites hosted?</h2><p>If you&#8217;re looking for a place to host your site, you have many options, from hosting it on your computer (make sure to have a public IP address), using hosting services like GoDaddy or DreamHost, or more complex providers like AWS, Google Cloud, etc.</p><p>In the end, the decision is tight to your budget, what technologies you&#8217;re using, and other things like SLA (the promise of uptime for the servers).</p><p>What do we host?</p><p>Independently if you use a Library/Framework like React, Angular or even jQuery, in the end, what&#8217;s generated is HTML, CSS &amp; JS along with other static files like images.</p><h2>Bonus! &#127873;</h2><ol><li><p>When you access a site for the first time, the DNS resolution is stored in different cache layers, so the next time you access the site, we resolve the IP address as soon as possible. These cache layers are:</p><ul><li><p>Browser&#8217;s cache.</p></li><li><p>OS cache.</p></li><li><p>Your router&#8217;s cache.</p></li></ul></li><li><p>There are other architectures besides client/server, for example, peer-to-peer that&#8217;s used in apps like BitTorrent</p></li><li><p>In the following article we are going to dive deep into different types of communication between clients and servers like:</p><ul><li><p>HTTP Push and Pull</p></li><li><p>Ajax Polling</p></li><li><p>Long Polling</p></li><li><p>WebSockets</p></li><li><p>Server sent events</p></li><li><p>Message queues</p></li></ul></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[What are programming paradigms? 🤔]]></title><description><![CDATA[A classification of programming languages]]></description><link>https://www.codementornewsletter.com/p/do-you-know-what-programming-paradigms</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/do-you-know-what-programming-paradigms</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Tue, 13 Sep 2022 00:31:07 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Hey,&nbsp;<a href="https://twitter.com/bryancr89">Bryan</a>&nbsp;here!&nbsp;Welcome to my newsletter. Each week I publish content to help you get to the next level in your career. Here we talk about coding, from what a programming language is to how to become an outstanding tech lead.  If you have questions, don&#8217;t agree with something, or just want to say &#8220;Hi!&#8221; don&#8217;t hesitate to send me a message &#10084;&#65039;.<br>Subscribe to get new posts.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" width="542" height="406.5" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:810,&quot;width&quot;:1080,&quot;resizeWidth&quot;:542,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;written equations on brown wooden board&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="written equations on brown wooden board" title="written equations on brown wooden board" srcset="https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1453733190371-0a9bedd82893?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHw1fHxtYXRofGVufDB8fHx8MTY2MjYwNDY4OA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Programming paradigms are ways to solve problems or tasks.</p><p>Programming languages may stick to particular paradigms, for example, <strong>Haskel</strong> was built around functional programming or languages that are multi-paradigm like Javascript.</p><p>Many paradigms can be broken down into two major categories <strong>Imperative Paradigm</strong> or <strong>Declarative Paradigm</strong>.</p><ul><li><p><strong>Imperative Paradigm: </strong>the focus is on <strong>HOW</strong> to give a set of tasks/instructions to change the system. Can be divided into using:</p><ul><li><p>Procedural</p></li><li><p>Object Oriented Programming</p></li><li><p>Structural</p></li></ul></li><li><p><strong>Declarative Paradigm:</strong> the focus is on the <strong>WHAT</strong> the task is or the what&#8217;s the expected outcome. Can be achieved using:</p><ul><li><p>Logic</p></li><li><p>Functional</p><p></p></li></ul></li></ul><p>For example, let&#8217;s say you want to make a pizza where the main actions are:</p><ol><li><p>Make the base.</p></li><li><p>Make the sauce</p></li><li><p>Roll out the dough</p></li><li><p>Top and bake</p></li></ol><p></p><h3>Imperative</h3><p>We do one task right after the other.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8aox!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8aox!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 424w, https://substackcdn.com/image/fetch/$s_!8aox!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 848w, https://substackcdn.com/image/fetch/$s_!8aox!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 1272w, https://substackcdn.com/image/fetch/$s_!8aox!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8aox!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png" width="841" height="387" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:387,&quot;width&quot;:841,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:38250,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8aox!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 424w, https://substackcdn.com/image/fetch/$s_!8aox!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 848w, https://substackcdn.com/image/fetch/$s_!8aox!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 1272w, https://substackcdn.com/image/fetch/$s_!8aox!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F9314ee37-3285-4cc1-bf85-76c58a170ad3_841x387.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Object Oriented Programming (OOP)</h3><p>The idea of OOP is to represent real-world objects into classes within a given programming language like Pizza, Oven, Client</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nr7B!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nr7B!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 424w, https://substackcdn.com/image/fetch/$s_!nr7B!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 848w, https://substackcdn.com/image/fetch/$s_!nr7B!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 1272w, https://substackcdn.com/image/fetch/$s_!nr7B!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nr7B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png" width="1080" height="617" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:617,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56437,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nr7B!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 424w, https://substackcdn.com/image/fetch/$s_!nr7B!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 848w, https://substackcdn.com/image/fetch/$s_!nr7B!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 1272w, https://substackcdn.com/image/fetch/$s_!nr7B!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F569ac97a-dd1d-46d2-a274-aeb57618bb79_1080x617.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Functional</h3><p>Functional programming follows the same idea of mathematical functions, where functions are first-class citizens, pure functions, etc.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LdZT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LdZT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 424w, https://substackcdn.com/image/fetch/$s_!LdZT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 848w, https://substackcdn.com/image/fetch/$s_!LdZT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 1272w, https://substackcdn.com/image/fetch/$s_!LdZT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LdZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png" width="1082" height="533" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:533,&quot;width&quot;:1082,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:64576,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LdZT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 424w, https://substackcdn.com/image/fetch/$s_!LdZT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 848w, https://substackcdn.com/image/fetch/$s_!LdZT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 1272w, https://substackcdn.com/image/fetch/$s_!LdZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e5a6474-0767-4a74-8aba-654269656ab5_1082x533.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Declarative</h3><p>If you use HTML, React, or SQL, you declare what you want, not how to render or the approach to get the data in the case of SQL.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U5-J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U5-J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 424w, https://substackcdn.com/image/fetch/$s_!U5-J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 848w, https://substackcdn.com/image/fetch/$s_!U5-J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 1272w, https://substackcdn.com/image/fetch/$s_!U5-J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U5-J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png" width="822" height="182" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:182,&quot;width&quot;:822,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:17460,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U5-J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 424w, https://substackcdn.com/image/fetch/$s_!U5-J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 848w, https://substackcdn.com/image/fetch/$s_!U5-J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 1272w, https://substackcdn.com/image/fetch/$s_!U5-J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5a466c0-436b-4950-8b1c-6e8cb4ab1c41_822x182.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><p>This is pure educational knowledge that can take you to a whole different world where you can view crazy programming languages like Prolog, which is a logical language that changes the way how you think about problems and solutions.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[What you should know before writing code?]]></title><description><![CDATA[If you&#8217;re looking for getting started with writing code but you know absolutely nothing about it.]]></description><link>https://www.codementornewsletter.com/p/what-you-should-know-before-writing</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/what-you-should-know-before-writing</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Thu, 08 Sep 2022 17:27:09 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" width="620" height="413.3333333333333" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1080,&quot;resizeWidth&quot;:620,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;closeup photo of computer code screengrab&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="closeup photo of computer code screengrab" title="closeup photo of computer code screengrab" srcset="https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1524666643752-b381eb00effb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwyM3x8d3JpdGUlMjBjb2RlfGVufDB8fHx8MTY2MjYwNDczNQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>If you&#8217;re looking for getting started with writing code but you know absolutely nothing about it. This post is for you.</p><p>I&#8217;d give you an overall idea of the minimum stuff you should know before writing a line of code.</p><p>First at all, any device (computer, smart phone/watch, etc) works with electricity where 1 represents presence of energy and 0 the absence.</p><p>Since those are the only two numbers a device understand, it&#8217;s called Binary system (1 or 0). In the other hand we (humans) use the Decimal System where the number go from through (0-9). Also in order to communicate we use idioms like English / Spanish / etc. But any device use something called &#8220;Machine Language&#8221;.</p><p>For example, when you click like in this post, that&#8217;s converted into a set of machine instructions (impossible for a human to write/understand) that are executed by the devices and the result is persisted. I know, you might be scratching your head, but bare with me and let&#8217;s answer the following question:</p><blockquote><p>How do we write websites like Google / Facebook or applications for your phone if it&#8217;s impossible to write machine language code?</p></blockquote><p>Some clever people create high level programming languages and those languages have characteristics like:</p><ol><li><p>Are human readable</p></li><li><p>Easy to understand</p></li><li><p>The language knows how to convert the human readable instructions we write into machine code that any device can execute and produce a result.</p></li><li><p>Can follow one or multiple programming paradigms <a href="https://www.codementornewsletter.com/p/do-you-know-what-programming-paradigms">(Here we talk more about paradigms)</a></p></li></ol><p>If you still don&#8217;t have an idea of what those programming languages are? Imagine them like learning a new idiom, if you learn Spanish, English or something else, you learn the alphabet, start creating words and eventually full sentences that another person can understand.</p><p>A programming language is the same story, you learn to write sentences (instructions) to communicate with a device.</p><p>Now let&#8217;s do something exciting!, we are going to get our hands dirty and write our first line of code &#128293;</p><ol><li><p>Visit this <a href="https://codepen.io/bryancr89/pen/ZEoEgjL?editors=0010">link</a></p></li><li><p>In the JS tab, write or paste this code:</p><p><code>alert("Hello World")</code></p></li></ol><p>Did you see the following alert?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uDxi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uDxi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 424w, https://substackcdn.com/image/fetch/$s_!uDxi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 848w, https://substackcdn.com/image/fetch/$s_!uDxi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 1272w, https://substackcdn.com/image/fetch/$s_!uDxi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uDxi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png" width="902" height="270" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:270,&quot;width&quot;:902,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uDxi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 424w, https://substackcdn.com/image/fetch/$s_!uDxi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 848w, https://substackcdn.com/image/fetch/$s_!uDxi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 1272w, https://substackcdn.com/image/fetch/$s_!uDxi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F6c6ff2ed-e4f9-4578-8bd5-fb6d9ce03e69_902x270.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>CONGRATS &#127881;&#127881;&#127881;! You just wrote your first line of code instructing the browser to display an alert saying &#8220;Hello World&#8221; exciting, right? now lets break the code down</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nqN-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nqN-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 424w, https://substackcdn.com/image/fetch/$s_!nqN-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 848w, https://substackcdn.com/image/fetch/$s_!nqN-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 1272w, https://substackcdn.com/image/fetch/$s_!nqN-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nqN-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png" width="728" height="461.6585365853659" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c9489a91-a77b-4b39-84c3-69350c395618_820x520.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:520,&quot;width&quot;:820,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:45840,&quot;alt&quot;:&quot;Hello World&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Hello World" title="Hello World" srcset="https://substackcdn.com/image/fetch/$s_!nqN-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 424w, https://substackcdn.com/image/fetch/$s_!nqN-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 848w, https://substackcdn.com/image/fetch/$s_!nqN-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 1272w, https://substackcdn.com/image/fetch/$s_!nqN-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9489a91-a77b-4b39-84c3-69350c395618_820x520.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol><li><p>We wrote a line of code in the programming language named <strong>Javascript.</strong></p></li><li><p>The language has a keyword "<strong>alert</strong>"<strong> </strong>that instructs the browser to open a modal.</p></li><li><p>"alert" is a function that shows whatever message you pass in, like "Hello World".</p><p></p></li></ol><p>For now let&#8217;s move on and dive into file extensions, when you save an image or an audio (the old days) or write a word document, excel file, etc. have you notice the file extension that&#8217;s added to the file?</p><p>If you haven&#8217;t, don&#8217;t worry. Each one of those files have an extension like <code>png</code> or <code>mp3</code> or <code>docx</code>, we use them to represent what kind of file they are and how to process them.</p><p>The same happens with programming languages where each file have its own extension that let you identify the language it was written with. For example</p><p>If you want to write a website, Javascript, CSS, HTML are the technologies you&#8217;d need to use in order to create it and their file extensions are <code>.js .css .html </code>respectively.</p><p>If you want to build a mobile app, you might use Swift <code>(.swift)</code> for Apple devices or Java <code>(.java)</code></p><p>Since the list of programming languages is huge, you are not going to learn all of them. My goal is to help you learn to write code and solve problems independently of the programming language, so if the market change you&#8217;d be able to adjust and be attractive.</p><p>In the following article we are going to know more about programming languages and what paradigms are!.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Top 10 mistakes Junior Devs do]]></title><description><![CDATA[Learn from my mistakes!]]></description><link>https://www.codementornewsletter.com/p/top-10-mistakes-junior-devs-do</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/top-10-mistakes-junior-devs-do</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Mon, 05 Sep 2022 16:55:18 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1></h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" width="708" height="531" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:810,&quot;width&quot;:1080,&quot;resizeWidth&quot;:708,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;brown wooden blocks on white table&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="brown wooden blocks on white table" title="brown wooden blocks on white table" srcset="https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1606235729097-f7b9460abcad?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwzMDAzMzh8MHwxfHNlYXJjaHwzfHxmYWlsfGVufDB8fHx8MTY2MjQxMzc0MQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>Are you a Junior dev trying to get better?</h1><p>I have been working with a lot of Junior devs and through the time I identified 10 common errors they made.</p><p>Read them and let me know if you identify with some of them. But remember</p><blockquote><p>My goal with this list is to help you become better than you were yesterday.</p></blockquote><h2>1. Misreading errors.</h2><p>This seems to be pretty obvious but it's wa...y to frequent that a dev reaches to me asking for help because they are stuck ...and when I see the error my immediate question is</p><blockquote><p>Did you read carefully the error? If so what's the error about?</p></blockquote><p>For instance, simple errors (&#128517;) like:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qNR-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qNR-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 424w, https://substackcdn.com/image/fetch/$s_!qNR-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 848w, https://substackcdn.com/image/fetch/$s_!qNR-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 1272w, https://substackcdn.com/image/fetch/$s_!qNR-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qNR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png" width="880" height="410" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:410,&quot;width&quot;:880,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:16640,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qNR-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 424w, https://substackcdn.com/image/fetch/$s_!qNR-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 848w, https://substackcdn.com/image/fetch/$s_!qNR-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 1272w, https://substackcdn.com/image/fetch/$s_!qNR-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0361de-45f5-4772-a7ed-cce8d877ed19_880x410.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><br>Of course, there are times when the error message is not clear and it's ok to ask for help, but please read and try to understand what's failing.</p><h2>2. Write code as soon as possible.</h2><p>When you're going to work on the next task, check if you start coding ASAP, because that's something you should improve. There are many things you should do before hand to make sure you deliver what's expected, for instance:</p><ul><li><p>Read and understand the scope of the ticket.</p></li><li><p>Clarify ambiguity with your Product Owner/Team Lead.</p></li><li><p>Look for areas in the app that might be impacted or at least you need to test.</p></li><li><p>Etc</p></li></ul><h2>3. Misunderstanding of the ticket's scope</h2><p>This can go in two ways:</p><ul><li><p>Un-fulfillment of all acceptance criteria. In other words, doing less than what was expected.</p></li><li><p>Adding things beyond the scope of the ticket. Doing more than needed.</p></li></ul><h2>4. Mixing new code with refactors.</h2><p>Just with experience you'd know how risky is to introduce new code while refactoring the same area.</p><p>Aim to deliver things separate and if you want to refactor some code because it's awful or any other reason, make sure you know the code well or at least have a decent set of tests before doing the refactor.</p><h2>5. Not taking time to learn your tech stack.</h2><p>If you're new in a company, it's maybe your first job, you want impress your coworkers, so you do your best to deliver as many tickets as possible, but in the long run you aren't going to increase your velocity and you'd be stuck with silly issues because you didn't learn the stack enough.</p><p>Here is one the best quotes that illustrate the idea.</p><blockquote><p>Give me six hours to chop down a tree and I will spend the first four sharpening the axe. &#8212; Abraham Lincoln</p></blockquote><p>Take time to learn your stack, if you work with React, read the documentation &amp; understand what's going on, learn Javascript well, take courses, ...keep learning!.</p><p>Eventually something that could take you a couple of days to complete, you'd be able to do it in a matter of hours.</p><h2>6. Focus on delivery not on quality.</h2><p>Usually the devs I worked with try to finish the tickets ASAP and grab the next one. but I always tell them:</p><blockquote><p>I prefer if you deliver one ticket with zero or few bugs instead of delivering 10 tickets full of bugs.</p></blockquote><h2>7. Not asking questions</h2><p>First at all, if you work on a place where you don't feel welcome to ask questions you should tell your manager or move to a different place.</p><p>A lot of times I get into a meeting with the team, we discuss a new feature and we ask if someone have any questions and the room goes quiet, so we finish the meeting.</p><p>But later on and countless times Jr developers ask me directly questions of things they didn't understand during the meeting.</p><p>So I go ahead and explain to them that asking those same questions during the meeting is more valuable because we can consider even more things and that their input is always welcome.</p><h2>8. Getting stuck</h2><p>This is related to the previous one, if you're stuck with an issue, it's better to raise your hand and ask for help rather than getting block the entire day.<br>But as I said in point #1, make sure you read carefully the error and if you don't have a clue of how to solve it, ask for help.</p><h2>9. Having the same errors all the time.</h2><p>If you have an issue and ask for help, make sure you learn what happen, why it happened and <strong>how to fix it</strong>.</p><p>Because the next time you face the issue, you can solve it in own, and even better, eventually you can help teach someone what happen, why it happened and how to solve it &#128293;.</p><h2>10. Quality is a QA department responsibility.</h2><p>It's quite common that developers rely on the QA to guarantee that we aren't introducing bugs or breaking the app.</p><p>If you get rid of that mindset, and start caring about delivering features with high quality before they reach the QA person, you'd be miles ahead of the others.</p><h1>Conclusion</h1><p>You should be honest and assess yourself. Don't feel ashamed if you have identified with one, two or all of them.<br>Everybody was a Jr dev at some point and I have to admit, I got better at some of them when I get into Senior positions.</p><p>The key is to identify them and be better than yesterday &#10084;&#65039;.</p><p>I hope you enjoyed! Did you identify with some of them? Let me know in the comments</p><p>Also you can follow me on <a href="https://twitter.com/bryancr89">twitter</a> where I share more tips to become a better dev.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Code Mentor's Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[My Journey: 14 years of writing code]]></title><description><![CDATA[From not having an email address to excel in programming!]]></description><link>https://www.codementornewsletter.com/p/my-journey-14-years-of-writing-code</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/my-journey-14-years-of-writing-code</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Sun, 04 Sep 2022 15:24:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!yLqO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Believe it or not, this is how I started my journey as a developer:</p><blockquote><p>In 2008 with 19 years old, during the first day at the university I had to fill out the registry form and I didn't have an email address, so I had to go to an Internet Caf&#233; and ask someone to help me create one.<br>I didn't even know that Internet was a thing and of course I thought that I was going to learn how to fix computers &#128514;.</p></blockquote><p>I remember the first programming class where the professor created a simple Hello World program in Schema, ran it and magically a window was opened with the "Hello Word" text in it... and to be honest that blew my mind.</p><p>During those 5 years (yeah I did horrible in a Calculus class) I did well in the programming courses, but struggled with Math and English (yes, as you probably found in the article I'm not a native speaker).</p><p>Then in 2012 I had my first job and the company I worked was known to hire recently graduated students, which was great because all the stuff I learned didn't match the technologies the company used.<br>Soon enough I realized I had to get up to speed and the only way was through reading. There was no Udemy/Coursera/etc back then.<br>We used some &#128293; technologies .NET, Javascript &amp; jQuery.</p><p>Node was getting traction and Javascript was being more popular and I decided to learn Javascript well.<br>For my fortune, Javascript became really popular, a lot of devs used it but didn't know the language well (it was a "joke" language), so I was able to transition to other companies, get a better salary and work on exciting projects.</p><p>Moving forward, I used to work for outsourcing companies offering services to US companies, so I kept growing my communication skills along side the technical area. <a href="https://codementor.substack.com/p/become-better-dev">You can read my post on how I became a better developer</a></p><p>From moving between companies I learned in the hard way that, it&#8217;s likely that your current company doesn&#8217;t value you until you get a new job offer.</p><p>And by that I mean, it's easy to get into a new company with a better salary and position than growing where you are.<br>At least that happened to me over an over &#128148;.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yLqO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yLqO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yLqO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yLqO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yLqO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yLqO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg" width="525" height="382" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:382,&quot;width&quot;:525,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:20169,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yLqO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 424w, https://substackcdn.com/image/fetch/$s_!yLqO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 848w, https://substackcdn.com/image/fetch/$s_!yLqO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!yLqO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F0cde1b66-424b-4fba-b6ac-05bbb3cf93f7_525x382.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>To keep the story short I'm currently working for an US based startup with a good environment and salary &#128293;</p><p>And these are the key points that took me to that place:</p><ol><li><p>Even though at the beginning I was totally lost, I focused on learn to learn.</p></li><li><p><strong>Read</strong> is one of the most valuable habits I have.</p></li></ol><blockquote><p>You're going to get behind if you don't keep learning!</p></blockquote><ol><li><p>There is always going be people with less experience than you. So help and teach them, you're going to learn what areas you dominate and which ones you need to improve.</p></li></ol><blockquote><p>I genuinely love to help other devs get better with their craft &#10084;&#65039;</p></blockquote><ol><li><p>Treat others well, they might help you, recommend or bringing you into new and exciting companies.</p></li></ol><p>I hope you enjoyed! You can follow me on <a href="https://twitter.com/bryancr89">twitter</a> and share experiences.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Bryan&#8217;s Newsletter! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How to become a better developer]]></title><description><![CDATA[My path from Junior to Senior developer]]></description><link>https://www.codementornewsletter.com/p/become-better-dev</link><guid isPermaLink="false">https://www.codementornewsletter.com/p/become-better-dev</guid><dc:creator><![CDATA[Bryan]]></dc:creator><pubDate>Sat, 03 Sep 2022 14:47:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!C3nK!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8386a9d-1166-4945-a2f7-6afd518603a0_256x256.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>During my 10+ years of working as developer, once in a while I wonder about</p><blockquote><p>How to become a better developer?</p></blockquote><p>Before we dive into the things that help me grow, this question is quite subjective... anyways I want to share with you a retrospective of what works for me</p><h2>Understand the technologies you use.</h2><p>Everyone agrees that reading code is a good way of learning, but you should go an extra mile and try to understand why and how the code you are reading works in the first place.<br>- Start small by reviewing your team mates PRs carefully and if you don't know something, ask!<br>- Read the official documentation e.g. React docs, nextJS, Django, etc.<br>- It's ok if you only have a high level understanding, e.g if you work with Javascript you should know how the Event loop works, but not the nitty-gritty details.</p><h2>Go beyond copy &amp; paste Stack Overflow solutions</h2><p>I have seen many times developers that have CORS issues and grab the first thing that works from internet. This is terrible because you aren't going to learn why the issue happen, if the first solution you grab is the best one for your specific scenario, etc.<br>- This takes us to the point #1.</p><h2>Care about the code quality</h2><p>Some years ago I thought the QA team was in charge of the overall quality of the product... until I worked for a company with <strong>ZERO</strong> QA's. (I almost panic!!)<br>From that point I started writing unit tests and once in a while I try to do TDD but it could be difficult. If you're like me and also have hard time writing TDD, a good starting point for me was the following:<br>- Before I fixed a bug, I try to reproduce it with a unit test and then fix the code.</p><h2>Errors free mindset</h2><p>If there are many errors causing noise in the linter, monitoring system, etc, at some point people are going to start ignoring them. You should strive to have a culture of error free and when an error arises the default thinking should be, let's fix this!<br>- Do not let anyone commit with lint errors.<br>- If you work with React, console warnings should be fixed.<br>- If your team is in charge of monitoring, encourage fixing any alert triggered.</p><h2>Constant learning</h2><p>I categorize the things I want to learn in either <strong>new technologies</strong> like React, GraphQL, NextJS, etc or <strong>fundamentals</strong> like patterns, principles, etc, and I typically learn about the two of them for instance:</p><ul><li><p>I learnt react, Apollo client, but also learnt about TCP, HTTP, handshakes, etc and how those fundamental protocols affect the web development.</p></li><li><p>I learnt Django and also learnt about ORM patterns like Active Record, Data Mapping, etc.</p></li></ul><p>As general advice, I try to be knowledgable in the different technologies I use on my daily basis and how they interoperate. For instance I don't know that much about networking but I have an idea of how HTTP works, what's latency, bandwidth and how that affects web apps.</p><h2>Quality over velocity</h2><p>I have worked on corporates that moves really slow with releases every quarter and startups with weekly releases, and in both cases there is no point to deliver many tickets per sprint if they cause new bugs or regression issues that impact the end user.<br>The points that I already described are things that initially might slow you down if you're not used to, but the overall outcome it's likely to be with high quality.</p><h2>"When one Teaches, Two Learn" - Robert Heinlein</h2><p>Lastly, <strong>this is what helped me the most</strong>, I always share the new knowledge I gather, this forces me to learn more about certain topic and look for easy ways to explain concepts. You might be surprised of how hard is to explain something you think you know.<br>- Once you explain something, ask for feedback, if someone doesn't understand a given concept that gives you a hint of an area you might not know neither.</p><p>Thanks for reading! You can <a href="https://twitter.com/bryancr89">follow me</a> as I continue sharing tips of how to become a better developer.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.codementornewsletter.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.codementornewsletter.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item></channel></rss>