<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daine Mawer</title>
    <description>The latest articles on DEV Community by Daine Mawer (@dainemawer).</description>
    <link>https://dev.to/dainemawer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F176290%2F9a7670e5-9a1b-43ed-b18e-4979e224ded9.jpeg</url>
      <title>DEV Community: Daine Mawer</title>
      <link>https://dev.to/dainemawer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dainemawer"/>
    <language>en</language>
    <item>
      <title>The Rise of No-Code and Low-Code in Frontend Development: Opportunity or Threat?</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Thu, 30 Jan 2025 22:00:00 +0000</pubDate>
      <link>https://dev.to/dainemawer/the-rise-of-no-code-and-low-code-in-frontend-development-opportunity-or-threat-ofa</link>
      <guid>https://dev.to/dainemawer/the-rise-of-no-code-and-low-code-in-frontend-development-opportunity-or-threat-ofa</guid>
      <description>&lt;p&gt;Frontend development is no stranger to change. From monolithic structures to component-based architectures, the field has continuously evolved. But the rise of no-code and low-code platforms has introduced a new kind of disruption—one that promises faster development cycles, reduced costs, and a lower barrier to entry for non-developers.&lt;/p&gt;

&lt;p&gt;So, what does this mean for developers? Are these platforms a tool for collaboration or a potential threat to the profession? Let’s explore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking Down No-Code and Low-Code
&lt;/h2&gt;

&lt;h3&gt;
  
  
  No-Code Platforms
&lt;/h3&gt;

&lt;p&gt;No-code platforms are designed for users with zero programming knowledge. They provide intuitive drag-and-drop interfaces for building web apps, landing pages, and workflows. Tools like Webflow, Bubble, and Zapier fall into this category, enabling users to achieve rapid results without touching a single line of code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Low-Code Platforms
&lt;/h3&gt;

&lt;p&gt;Low-code platforms, on the other hand, are geared toward those with some technical knowledge. They allow for custom scripting and integration with existing systems. Platforms like OutSystems, Mendix, and Retool aim to empower developers and technical teams to build complex applications faster by combining visual development with traditional coding.&lt;/p&gt;

&lt;p&gt;While they cater to different audiences, both no-code and low-code tools are reshaping the software development lifecycle in profound ways.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Developers Should Care
&lt;/h2&gt;

&lt;p&gt;The adoption of no-code and low-code platforms is being driven by a few key trends:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Faster Time-to-Market:&lt;/strong&gt; Businesses can test ideas and launch products at a fraction of the time traditional development requires.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Empowering Non-Technical Teams:&lt;/strong&gt; Teams like marketing and operations can take charge of building their own workflows, reducing dependencies on engineering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost Efficiency:&lt;/strong&gt; Smaller startups and businesses can save money by building MVPs without hiring large development teams.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For developers, these platforms introduce both opportunities and challenges. Let’s take a closer look.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does This Mean for Frontend Developers?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. A Shift in Role
&lt;/h3&gt;

&lt;p&gt;No-code and low-code platforms automate repetitive tasks, enabling developers to focus on more impactful work. Instead of coding UIs or workflows from scratch, developers can step into roles as technical architects who oversee integration, scalability, and customization.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Bridging Technical and Non-Technical Teams
&lt;/h3&gt;

&lt;p&gt;These platforms bring non-developers into the fold, requiring developers to work more closely with them. This collaboration introduces new challenges but also enhances problem-solving and team alignment.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Customization and Extensibility
&lt;/h3&gt;

&lt;p&gt;Even the most advanced platforms have limitations. Developers play a critical role in extending the functionality of these tools by writing custom components, APIs, or integrations that meet unique business requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Focus on Scalability and Performance
&lt;/h3&gt;

&lt;p&gt;No-code solutions often struggle with scaling and optimization. Developers are essential for tackling bottlenecks and ensuring that applications can handle growth effectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where No-Code and Low-Code Fall Short
&lt;/h2&gt;

&lt;p&gt;Despite their benefits, these tools come with challenges that developers are uniquely positioned to solve:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Limited Customization:&lt;/strong&gt; Prebuilt components can hinder flexibility, especially when building applications with unique requirements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability Concerns:&lt;/strong&gt; Many no-code platforms lack the robust infrastructure needed for high-scale applications, leading to performance issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vendor Lock-In:&lt;/strong&gt; Migrating away from proprietary platforms can be costly and time-consuming, creating long-term dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Risks:&lt;/strong&gt; With non-developers building applications, there’s a higher risk of misconfigurations that introduce vulnerabilities.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These shortcomings highlight why developers remain indispensable. Platforms might handle the basics, but the hard problems still require expertise.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Developers Can Embrace No-Code and Low-Code
&lt;/h2&gt;

&lt;p&gt;Instead of viewing these tools as competition, developers can leverage them to streamline workflows and enhance productivity. Here are some ways to embrace the rise of no-code and low-code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Platforms for Prototyping:&lt;/strong&gt; Rapid prototyping with no-code tools can save time and help validate ideas before committing to full-scale development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Focus on High-Value Work:&lt;/strong&gt; Automate repetitive tasks with low-code solutions and dedicate your time to solving complex problems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Become a Hybrid Expert:&lt;/strong&gt; Learn how to integrate no-code platforms with traditional development stacks to build more powerful applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Guide Non-Developers:&lt;/strong&gt; Act as a mentor for non-technical users navigating these platforms, ensuring proper configurations and scalability.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Final Thoughts: Is This the Future of Frontend Development?
&lt;/h2&gt;

&lt;p&gt;No-code and low-code platforms aren’t a threat—they’re a tool. They won’t replace the need for developers, but they will reshape how we work. By automating the mundane and empowering non-developers, these platforms free up developers to focus on high-impact tasks that require expertise and creativity.&lt;/p&gt;

&lt;p&gt;If you’re a frontend developer, now is the time to adapt. Learn how these platforms work, experiment with them, and position yourself as an enabler within your team or organization.&lt;/p&gt;

&lt;p&gt;The future isn’t about choosing between no-code and traditional coding—it’s about leveraging the best of both worlds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dainemawer.com/articles/the-rise-of-no-code-and-low-code-in-frontend-development" rel="noopener noreferrer"&gt;👉 Read the full version of this article on my website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What’s your take on no-code and low-code? Are they an opportunity for growth or a disruption to the developer ecosystem? Let’s discuss in the comments below!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nocode</category>
      <category>frontend</category>
      <category>lowcode</category>
    </item>
    <item>
      <title>Using CSS Custom Properties with Fallbacks for Efficiency</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Tue, 14 May 2024 12:00:00 +0000</pubDate>
      <link>https://dev.to/dainemawer/using-css-custom-properties-with-fallbacks-for-efficiency-3b8p</link>
      <guid>https://dev.to/dainemawer/using-css-custom-properties-with-fallbacks-for-efficiency-3b8p</guid>
      <description>&lt;p&gt;By now, most of us are accustomed to using CSS Custom Properties on projects. Since its introduction in 2017, CSS Custom Properties, also known as CSS variables, have optimised the code we work with and allowed engineers a finer degree of control when managing values within rules.&lt;/p&gt;

&lt;p&gt;CSS Custom Properties can be tricky to deal with and aren’t always as intuitive as one might hope. However, when used right, they can significantly reduce boilerplate code and keep things efficient, making our work more productive.&lt;/p&gt;

&lt;p&gt;While the approach below is not perfect, it works well when writing CSS for building projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Use CSS Custom Properties
&lt;/h3&gt;

&lt;p&gt;As far as my experience goes, I can only think of three possible reasons to implement a CSS Variable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We want to use a given value in more than one place,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We know that a value will change in the future and want to reduce our efforts for refactoring,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We need to store dynamic values from JS execution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this in mind, we can be more assertive about our use cases. Point 3 is less of a concern for this article, but points 1 and 2 are essential. Let's illustrate this using the familiar HTML button element.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Infamous Button
&lt;/h3&gt;

&lt;p&gt;Buttons are notoriously tricky to style consistently for such a simple HTML element. Perhaps it’s because they have several different states and applications, regardless - it's usually the first component we Frontend Engineers take on when it comes to a fresh build. Let's have a look at how we could write the style for a button using CSS Custom Properties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="py"&gt;--color-primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;purple&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="py"&gt;--color-text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="py"&gt;--color-text-inverted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="py"&gt;--color-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;gray&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="py"&gt;--button-bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-primary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="py"&gt;--button-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-text-inverted&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="py"&gt;--button-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-border&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

 &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-bg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-border&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As far as this example goes, from a technical standpoint, it’s great. It’s clean and straightforward and would get a 👍 from me in a code review. But could we optimise it further? Well, yes.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;var()&lt;/code&gt; function in CSS is pretty nifty…we’re used to using it in a somewhat one-dimensional way by just rendering out a value; however, it can be more dynamic. The way to do this is by using a fallback value.&lt;/p&gt;

&lt;p&gt;If we considered the above example, we could rewrite it like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="py"&gt;--color-primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;purple&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="py"&gt;--color-text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="py"&gt;--color-text-inverted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="py"&gt;--color-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;gray&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-bg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-primary&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-border&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-border&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-color&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color-text-inverted&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;padding-block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.875rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;padding-inline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is far cleaner and will lead to the same outcomes as the previous example - with less boilerplate code. Overriding it in a variation makes each locally scoped CSS Variable (effectively) optional. We can easily now optionally define the variables defined in .button as separate variations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.button&lt;/span&gt;&lt;span class="nd"&gt;:where&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;.button-secondary&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--button-bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;orange&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;teal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt;&lt;span class="nd"&gt;:where&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;.button-tertiary&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--button-bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;teal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;orange&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Although this technique is not revolutionary, we care how many lines of compressed text are heading over the wire. The less physical memory a CSS file takes up, the better, which ultimately translates to how many lines of CSS exist. In the first example, we’re looking at almost double the amount of code to achieve the same thing in our optimised example.&lt;/p&gt;

&lt;p&gt;This compound effect has an influential impact on performance and further improves readability and developer experience. If you'd like to play around a bit further, feel free to fork the following Code Pen: &lt;a href="https://codepen.io/iamdainemawer/pen/NWmQZMz"&gt;https://codepen.io/iamdainemawer/pen/NWmQZMz&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Support
&lt;/h3&gt;

&lt;p&gt;Since April 2017, according to &lt;a href="https://web.dev/blog/introducing-baseline"&gt;Google Baseline&lt;/a&gt;, this feature is well-supported across all major browsers. If you're interested to learn more about Baseline, read my post about &lt;a href="https://dainemawer.com/articles/what-is-google-baseline-and-its-impact"&gt;Google Baseline and Its Impact&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can check for browser support by adding the following statement to your CSS stylesheets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@supports&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--css&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://caniuse.com/?search=CSS%20Custom%20Prop"&gt;Can I Use - CSS Nesting&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://w3c.github.io/csswg-drafts/css-nesting/"&gt;CSS Specification - CSS Nesting Module&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties"&gt;MDN - CSS Custom Properties&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/aaronbarker/css-variables-polyfill"&gt;CSS Variables Polyfill&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>What Is Google Baseline and Its Impact?</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Sun, 28 Apr 2024 20:57:35 +0000</pubDate>
      <link>https://dev.to/dainemawer/what-is-google-baseline-and-its-impact-3cmh</link>
      <guid>https://dev.to/dainemawer/what-is-google-baseline-and-its-impact-3cmh</guid>
      <description>&lt;h1&gt;
  
  
  What Is Google Baseline and Its Impact?
&lt;/h1&gt;

&lt;p&gt;For years, web developers of all experience levels have relied on caniuse.com to understand the support of a given feature. This scenario extends to determining backward compatibility or to determining which of the modern browsers supports cutting-edge improvements to web specifications. &lt;/p&gt;

&lt;p&gt;In 2023, Google introduced Baseline to the web community. Baseline aids engineers in determining whether certain features or APIs are safe to use in production-grade web applications. It’s an important platform for interoperability, and considering Google spends a lot of time improving web best practices, it is a very much needed tool to help engineers produce more consistent and efficient experiences.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Google Baseline?
&lt;/h3&gt;

&lt;p&gt;Browsers are constantly evolving, with vendors releasing updates monthly. With more individuals contributing and working on specifications than ever before and a far more transparent dialogue between the main browser vendors (Safari, Firefox, Chrome, Edge), it's become increasingly difficult to track which new features are stable across the landscape.&lt;/p&gt;

&lt;p&gt;Considering the above, as new features are released into browser engines, engineers are often left with an incredibly short time to ramp up, refactor or even strategically plan to introduce new features into their code bases.&lt;/p&gt;

&lt;p&gt;More importantly, as Google is often one of the platforms that push front-end technology forward, it has admittedly accepted that it is partly to blame here. It’s one of the reasons the Chrome team came up with web.dev and developer.chrome.com, as Chrome is often the first browser to land cutting-edge technologies. This has also led to further documentation and conferences on interoperability (see web.dev and interop). &lt;/p&gt;

&lt;p&gt;New features mean documentation, and Google has made strides to ensure MDN has the relevant documentation for newer technologies as they arrive in Chrome.&lt;/p&gt;

&lt;h3&gt;
  
  
  Closing the Vendor Gap
&lt;/h3&gt;

&lt;p&gt;As much as this is great, from Google's perspective, engineers have one very important struggle: the behaviour and consistency of features across vendors and browser engines. This has been a pain point for most engineers, requiring complex planning and solutions often to overcome a particular browser engine's lack of functionality.&lt;/p&gt;

&lt;p&gt;For the last two years, the solution has been Interop 2022 and Interop 2023, a conference and community that helps bridge the gap between browsers to provide a more consistent and performant web. Google's notion will continue to yield fruit as the years go by.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Baseline?
&lt;/h3&gt;

&lt;p&gt;Baseline will become the universal flag of acceptance across browsers and help engineers determine what is fully stable across the landscape and browser vendors for the most recent two versions of each browser.&lt;/p&gt;

&lt;p&gt;This allows us, as production teams, to explain to stakeholders how browser support is tied to Google Baseline, which will shortly exemplify reliability and understanding.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does Baseline Work?
&lt;/h3&gt;

&lt;p&gt;Baseline is already integrated into MDN, web.dev and caniuse.com. &lt;/p&gt;

&lt;p&gt;Baseline also plans to provide a way to see what has become stable across all browser vendors through a year-on-year approach. In 2023, for instance, you can read the following article on web.dev to get an idea of what is considered stable, and supported in the last two major versions across all the browser vendors: &lt;a href="https://web.dev/blog/baseline2023" rel="noopener noreferrer"&gt;Baseline 2023  |  Blog  |  web.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s important for us as engineering teams to keep up with these changes and not get too stuck in old ways that lack the motivation to improve and make our approaches to solutions inefficient. &lt;/p&gt;

&lt;p&gt;Importantly, Baseline has two labels:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Newly available: the feature is finally interoperable&lt;/li&gt;
&lt;li&gt;Widely available: 30 months have passed since the interoperable date.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Baseline considers the major browser vendors to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Safari (macOS and iOS)&lt;/li&gt;
&lt;li&gt;Firefox (Desktop + Android)&lt;/li&gt;
&lt;li&gt;Chrome (Desktop + Android)&lt;/li&gt;
&lt;li&gt;Edge (Desktop)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Effect on Engineering Teams
&lt;/h3&gt;

&lt;p&gt;Perhaps the biggest benefit to engineering teams is that Baseline and its contents remove the guesswork and research required to implement new features. For instance, a Frontend Engineer may want to leverage CSS Grid's new sub-grid feature.&lt;/p&gt;

&lt;p&gt;This new display mode helps engineers define a grid within a grid to have more refined control over layouts. Heading to caniuse.com tells us there’s a global usage percentage of 87.42% - pretty decent, but then we need to go see which browser vendors support / don’t support / partially support the feature.&lt;/p&gt;

&lt;p&gt;CanIUse now displays a Baseline badge which tells us that this feature is “Newly available across major browsers” &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkh27vinfa1431qf8jtn6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkh27vinfa1431qf8jtn6.jpg" alt="CanIUse Baseline integration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Likewise, if you review the documentation for sub-grid on MDN you’ll see a similar banner:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nptkg84017jdukf1mqv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0nptkg84017jdukf1mqv.jpg" alt="MDN Basline integraiton"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, if you review the sub-grid article on web.dev, through what was introduced to Baseline in 2023:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi0cvswvps9rj48933qtc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi0cvswvps9rj48933qtc.jpg" alt="web.dev baseline integration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is intended to make it evidently clear that the latest two browser versions across vendors have full support for the feature. &lt;/p&gt;

&lt;h3&gt;
  
  
  A Word on Evergreen Browsers
&lt;/h3&gt;

&lt;p&gt;This is a topic that I find we do not talk enough about. For most modern users gone are they days of manually updating browsers. Chrome, Firefox, Edge auto update automatically. Safari can be a bit of an outlier in this case. Safari generally updates once a year on each new Mac OS X update, though that is not always a guarantee. &lt;/p&gt;

&lt;p&gt;Regardless, more users than ever use the latest version of browsers. Although we should ensure the features we built to degrade gracefully or progressively enhance, it’s less of a fundamental consideration these days and more of a luxury assumption. Landing somewhere in the middle here has always worked out well. It’s worth remembering before shying away from using features that could save time, money and focus.&lt;/p&gt;

&lt;h3&gt;
  
  
  Useful Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://web.dev/baseline" rel="noopener noreferrer"&gt;Google Baseline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web.dev/blog/introducing-baseline" rel="noopener noreferrer"&gt;Google Baseline Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web.dev/blog/baseline2023" rel="noopener noreferrer"&gt;Baseline 2023&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://web.dev/blog/interop-2022-wrapup" rel="noopener noreferrer"&gt;Interop 2022&lt;/a&gt; / &lt;a href="https://web.dev/blog/interop-2023" rel="noopener noreferrer"&gt;Interop 2023&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>productivity</category>
      <category>css</category>
    </item>
    <item>
      <title>Understanding Chromes Coverage Panel</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Mon, 27 Nov 2023 05:36:17 +0000</pubDate>
      <link>https://dev.to/dainemawer/understanding-chromes-coverage-panel-3mie</link>
      <guid>https://dev.to/dainemawer/understanding-chromes-coverage-panel-3mie</guid>
      <description>&lt;p&gt;When we work on complex projects, JavaScript and CSS often get the jump on us. Before we know it, thousands, if not tens of thousands, of bytes are being transferred and executed in the browser - most of which we do not need to load.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Code Coverage?
&lt;/h3&gt;

&lt;p&gt;Code coverage derives from a computer science concept called "test coverage". From Wikipedia:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Test coverage is a percentage measure of the degree to which the source code of a program is executed when a particular test suite is run.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A program with high test coverage means that more or all of its source code gets executed during unit testing, implying that the code base would have a lower chance of undiscovered bugs.&lt;/p&gt;

&lt;p&gt;Code Coverage is different when it comes to JavaScript and CSS. Of course, you can still write unit tests for JavaScript, but within the context of the browser environment, JavaScript and CSS coverage mean the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CSS: what percentage of CSS gets utilised when it loads into the browser? More precisely, what percentage of nodes from the CSSOM get matched to nodes in the DOM?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript: what percentage of JavaScript functionality is executed by the browser?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If we determine just how much of the referenced JavaScript and CSS assets are utilised by the browser, we can refactor or reimplement files to be more conscious of what they try to achieve on the page. If we only load the JavaScript and CSS required for the page, this reduces bundle sizes, transfer sizes and overall Paint time, leading to a great user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Auditing Code Coverage in Chrome
&lt;/h3&gt;

&lt;p&gt;Many Chrome users must be aware of the Code Coverage panel in DevTools. To view it, open DevTools, go to the context menu, click "More tools", and select "Coverage".&lt;/p&gt;

&lt;p&gt;When the panel opens, you have two options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reload the page with a Code Coverage Audit&lt;/li&gt;
&lt;li&gt;Record code coverage attributed to your interactions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After each audit, the panel will list all JavaScript and CSS-loaded resources. Clicking on a line item will display the source code with a vertical bar down the left. Sections of the bar will be coloured green or red.&lt;/p&gt;

&lt;p&gt;Code blocks will be highlighted in red or green when reviewing the Sources panel for each request. Any code block highlighted in red is code that got loaded but not executed by the browser. The line item will also summarise the Total Unused Bytes and a percentage measure of unused code.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to handle poor Code Coverage
&lt;/h3&gt;

&lt;p&gt;Handling poor Code Coverage can be a challenge. It's hard work and may lead you down a path of a complete refactor. I grimace at the word "refactor", so let's chat about some higher-level wins first.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS Wins
&lt;/h3&gt;

&lt;p&gt;Several tools are doing an excellent job of ensuring 100% CSS Code Coverage. PurgeCSS (leveraged by Tailwind) does a great job of removing unused CSS styles. You can implement PurgeCSS into any tech stack, so you are not married to Tailwind if you're not a fan.&lt;/p&gt;

&lt;p&gt;Even WordPress Gutenberg released a nifty filter for only loading Block Library CSS when a block is on the page.&lt;/p&gt;

&lt;p&gt;Using more modern CSS approaches can yield incredible results in the React space. You can leverage CSS Modules, Vanilla Extract and Linaria to help reduce the impact of unused CSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript Wins
&lt;/h3&gt;

&lt;p&gt;There are some minor wins in the actual execution of JavaScript. Optimising code for a high percentage measure is about what approach you're taking to the feature you're trying to build and when and how that feature gets executed in the browser. More often than not, it boils down to planning and architecture.&lt;/p&gt;

&lt;p&gt;It's worthwhile looking into recommended performance best practices like Route-based Code Splitting, Tree Shaking, Dynamic Import, Facade Patterns and Import on Interaction/Visibility.&lt;/p&gt;

&lt;h3&gt;
  
  
  Build Tool Wins
&lt;/h3&gt;

&lt;p&gt;Webpack is a sophisticated build manager that aids in code-splitting, tree-shaking, and other JavaScript wins that can, without a doubt, speed you along on the coverage front. As this space constantly evolves, keep looking for newer versions of build tools or even new build tools offering more performant features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dead Ends / Not Worth The Effort
&lt;/h3&gt;

&lt;p&gt;When it comes to gaining a high percentage measure with code coverage, two scenarios that will stop you dead in your tracks are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;3rd-party JavaScript and CSS&lt;/li&gt;
&lt;li&gt;Frameworks and Libraries.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Generally speaking, we have little control over how third-party scripts execute. In this case, we only have three options:&lt;/p&gt;

&lt;p&gt;retain the script,&lt;br&gt;
remove the script,&lt;br&gt;
determine a way to defer the script execution.&lt;/p&gt;

&lt;p&gt;Frameworks and Libraries are more complex. Removing unused code from even the fastest frameworks is only sometimes possible.&lt;/p&gt;

&lt;p&gt;It's also essential to understand where the necessity of this fits in concerning the state of performance on your site. There's no need to optimise everything if it doesn't yield valuable results.&lt;/p&gt;

&lt;h3&gt;
  
  
  Planning and Refactoring
&lt;/h3&gt;

&lt;p&gt;Technology stacks and architectures are your friends here. Each technology stack will expect something slightly different from you when selectively deciding how to deliver code that receives a high code coverage percentage.&lt;/p&gt;

&lt;p&gt;High Code Coverage is a gateway (in the long term) for bullet-proof performance. Ensure JavaScript code gets written to best performance practices. A well-moulded build configuration and careful planning of site features can also bolster successful attempts at increasing code coverage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;High-percentage code coverage is a great way to ensure a lightweight and performant website. Many tools are available to help you identify, audit and remediate code that may have poorer-than-expected coverage across your site. Remember that your options become limited as soon as you buy into 3rd-party scripts and complex frameworks/libraries.&lt;/p&gt;

&lt;p&gt;The chances of 100% code coverage across both CSS and JavaScript are likely unrealistic. You may also have an incredibly complex site that warrants large payloads, making attaining impactful code coverage more difficult.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>performance</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Set Up NextJS with Storybook using Monorepos</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Mon, 20 Nov 2023 06:10:45 +0000</pubDate>
      <link>https://dev.to/dainemawer/set-up-nextjs-with-storybook-using-monorepos-16nl</link>
      <guid>https://dev.to/dainemawer/set-up-nextjs-with-storybook-using-monorepos-16nl</guid>
      <description>&lt;p&gt;A monorepo is a repository containing multiple related resources managed from an individual repository. Using NPM workspaces, we can build dynamic component libraries that numerous applications can consume, all retained in one version-controlled repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Monorepo's have been gaining traction over the years. Having worked with them for over a year in production environments, I can say one thing: &lt;em&gt;they beat git submodules&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;A typical monorepo will contain multiple packages and projects that are closely related. We can work more efficiently using a monorepo in a way that allows us to move away from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;initializing git submodules (a repo within a repo)&lt;/li&gt;
&lt;li&gt;linking local packages from other locations on the disk that must be updated and installed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NPM supports &lt;code&gt;workspaces&lt;/code&gt;, which effectively allows for a monorepo structure. You'll need to use NPM v7 and above to set up a &lt;code&gt;workspace.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Recently, I embarked on building a suite of components for a NextJS project. I wanted to ensure that I could actively develop components (facilitated by Storybook) so that my NextJS projects could consume those components.&lt;/p&gt;

&lt;p&gt;Historically, NextJS projects have always supported a &lt;code&gt;components&lt;/code&gt; folder. However, NextJS restricts this to the application itself. I aim to treat my component library like any other 3rd-party library I'd want to import into my projects. An architecture of this manner is easily achievable using a mono repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Initialise Project Structure
&lt;/h3&gt;

&lt;p&gt;Our first step is to set up a project structure supporting a monorepo. Create a folder where your monorepo can live:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir my-monorepo &amp;amp;&amp;amp; cd my-monorepo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great. Our next step is to create a &lt;code&gt;package.json&lt;/code&gt; file. We can bootstrap one quickly by running the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That should produce the following output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "my-monorepo",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" &amp;amp;&amp;amp; exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's add some items to our &lt;code&gt;package.json&lt;/code&gt; before installing dependencies. We'll need to add a &lt;code&gt;workspaces&lt;/code&gt; key. Doing so informs NPM where our projects and packages sit.&lt;/p&gt;

&lt;p&gt;NPM comes with a nifty command for adding workspaces; run the below commands and follow the instruction wizard that each command outputs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -w ./packages/component-library
npm init -w ./projects/monorepo-site
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Executing the above will run &lt;code&gt;npm install&lt;/code&gt; for you as well.&lt;br&gt;
At this point, we will see our first fundamental differences between a traditional repo and a monorepo:&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;package.json&lt;/code&gt; exists in the root and within every "workspace." You may notice that there is only one occurrence of &lt;code&gt;node_modules&lt;/code&gt; and &lt;code&gt;package-lock.json.&lt;/code&gt; Now, all workspace dependencies get managed from the root folder.&lt;/p&gt;

&lt;p&gt;Next up, we'll look into how to install workspace-specific dependencies.&lt;/p&gt;
&lt;h3&gt;
  
  
  Install dependencies
&lt;/h3&gt;

&lt;p&gt;When installing package or project dependencies, we can still leverage &lt;code&gt;npm install&lt;/code&gt; - however, this needs to be run from the root folder and requires that we pass a &lt;code&gt;-w&lt;/code&gt; flag to the command. Let's run through installing NextJS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save next react react-dom -w monorepo-site
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the command above from the &lt;code&gt;root&lt;/code&gt; of your project folder, where &lt;code&gt;node_modules&lt;/code&gt; and the &lt;code&gt;package-lock.json&lt;/code&gt; can be found. The only thing to call out here is that the value passed to &lt;code&gt;-w&lt;/code&gt; must match the &lt;code&gt;name&lt;/code&gt; field of one of your &lt;code&gt;project&lt;/code&gt; or &lt;code&gt;packages&lt;/code&gt; package.json. In this example, the &lt;code&gt;name&lt;/code&gt; field of &lt;code&gt;projects/monorepo-site/package.json&lt;/code&gt; is &lt;code&gt;monorepo-site.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If all was successful, you should see the dependencies added to &lt;code&gt;projects/monorepo-site/package.json.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"dependencies": {
    "next": "^13.0.6",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repeat this process for any necessary dependencies in &lt;code&gt;packages/component-library&lt;/code&gt; as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup Components and StoryBook
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Please note that this is not a tutorial on how to get set up with Storybook.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's take some steps to get Storybook set up correctly. We'll also create a dummy component to verify that our setup works. As StoryBook isn't a dependency of either &lt;code&gt;packages&lt;/code&gt; or &lt;code&gt;projects,&lt;/code&gt; we can install it in the root of our monorepo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save-dev @storybook/react @storybook/manager-webpack5 @storybook/builder-webpack5 @storybook/addon-postcss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's also add the build commands to the root monorepo package.json:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we'll need to create the &lt;code&gt;.storybook&lt;/code&gt; folder; let's do this and add it to the root of the monorepo. You'll want to add two files to this folder:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;main.js&lt;/li&gt;
&lt;li&gt;preview.js&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;main.js&lt;/code&gt; is where we configure StoryBook's settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
    "stories": [
        "../packages/component-library/**/*.stories.jsx",
    ],
    "addons": [
        {
            name: '@storybook/addon-postcss',
            options: {
                styleLoaderOptions: {},
                cssLoaderOptions: {
                    modules: true,
                    sourceMap: true,
                    importLoaders: 1,
                },
                postcssLoaderOptions: {
                    implementation: require('postcss'),
                },
            },
        }
    ],
    "framework": "@storybook/react",
    "core": {
        "builder": "@storybook/builder-webpack5"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our &lt;code&gt;main.js&lt;/code&gt; file above - we tell StoryBook where to look for component stories. We also include the &lt;code&gt;@storybook/addon-postcss&lt;/code&gt; plugin that supports PostCSS. The extra options you see listed above enabled PostCSS Modules. The last two keys: &lt;code&gt;framework&lt;/code&gt; and &lt;code&gt;core,&lt;/code&gt; allow us to configure StoryBook to use Webpack v5.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;preview.js,&lt;/code&gt; add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const decorators = [
    (Story, context) =&amp;gt; {
        return (
            &amp;lt;div style={{ padding: '1rem', display: 'flex', justifyContent: 'center' }}&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;Story {...context} /&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        );
    }
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;preview.js&lt;/code&gt; file allows us to customize the appearance of stories without affecting the component logic itself. Hence, the name "decorator". I've just added some basic styling here to center the button.&lt;/p&gt;

&lt;p&gt;Next, we need to flesh out our &lt;code&gt;Button&lt;/code&gt; component. In &lt;code&gt;package/component-library,&lt;/code&gt; add a new folder called &lt;code&gt;Button&lt;/code&gt;; in that folder, add the following files:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Button.module.css - handles the styling of the button&lt;/li&gt;
&lt;li&gt;Button.stories.jsx - handles the button story&lt;/li&gt;
&lt;li&gt;Button.jsx - the button component itself&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can find the contents of these files in the repo. Great, we need to see if we can import our component into NextJS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup a NextJS project
&lt;/h3&gt;

&lt;p&gt;We need to return to NextJS quickly to tie everything together meaningfully. First, add a &lt;code&gt;pages&lt;/code&gt; folder to the NextJS site and the scripts needed in &lt;code&gt;package.json&lt;/code&gt; to build NextJS.&lt;/p&gt;

&lt;p&gt;To add the scripts, go to &lt;code&gt;projects/monorepo-site/package.json&lt;/code&gt; and replace the current &lt;code&gt;scripts&lt;/code&gt; field with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;pages&lt;/code&gt; folder, add an &lt;code&gt;index.js&lt;/code&gt; file with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Home = () =&amp;gt; {
    return (
        &amp;lt;main&amp;gt;
            &amp;lt;h1&amp;gt;Hello! This is a NextJS + StoryBook Monorepo&amp;lt;/h1&amp;gt;
        &amp;lt;/main&amp;gt;
    )
}

export default Home

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Add the Component to NextJS
&lt;/h3&gt;

&lt;p&gt;Now, it's time to import our component into NextJS. Let's import the button into &lt;code&gt;projects/monorepo-site/pages/index.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Button from '../../../packages/component-library/Button/Button.jsx'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run &lt;code&gt;npm run dev&lt;/code&gt;, you'll likely run into an error. NextJS does not transpile ES6 JavaScript from &lt;code&gt;node_modules&lt;/code&gt; or any other local folder outside its reach.&lt;/p&gt;

&lt;p&gt;To get around this problem, configure a property in &lt;code&gt;next.config.js&lt;/code&gt; called &lt;code&gt;transpileModules&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const nextConfig = {
    transpileModules: ['component-library']
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the &lt;code&gt;workspace&lt;/code&gt; name, &lt;code&gt;component-library,&lt;/code&gt; is passed, not the path to the folder on the disk. You'll need to restart your dev server.&lt;/p&gt;

&lt;p&gt;Your custom Button component now lives in NextJS and StoryBook and can be iterated upon and tracked in the repo!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You may run into trouble with NextJS asking for React v18 if you use NextJS 13. This tutorial was written using NextJS v12 and React v17.0.2&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Scripts for Convenience
&lt;/h3&gt;

&lt;p&gt;To run our build commands, we'd have to &lt;code&gt;cd&lt;/code&gt; into every &lt;code&gt;project&lt;/code&gt; or &lt;code&gt;package&lt;/code&gt;. Doing so can be time-consuming, so let's add the following &lt;code&gt;scripts&lt;/code&gt; to the &lt;code&gt;package.json&lt;/code&gt; found in the root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "build": "npm run build --workspaces --if-present",
    "dev:monorepo-site": "npm run dev -w monorepo-site",
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's run through these two commands as they differ slightly. Running &lt;code&gt;npm run build&lt;/code&gt; in the root will allow us to fire off individual &lt;code&gt;build&lt;/code&gt; scripts in all workspaces. If the &lt;code&gt;build&lt;/code&gt; task isn't in a &lt;code&gt;package&lt;/code&gt; or &lt;code&gt;project&lt;/code&gt; package.json, it will simply skip it.&lt;/p&gt;

&lt;p&gt;If, at some point, this particular example scaled to have three production sites, all with a &lt;code&gt;build&lt;/code&gt; command, we could run &lt;code&gt;npm run build&lt;/code&gt; from the root, and for each workspace, the build task will execute. Pretty nifty!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm run dev:monorepo-site&lt;/code&gt; is slightly different - this command targets one workspace and fires off the &lt;code&gt;script&lt;/code&gt; defined within that workspace (as long as it exists). Doing so allows us to spin up the &lt;code&gt;dev&lt;/code&gt; server for &lt;code&gt;monorepo-site&lt;/code&gt; from the root without navigating to the folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Let's review where we're at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We initialized a monorepo structure using &lt;code&gt;workspaces&lt;/code&gt; in NPM&lt;/li&gt;
&lt;li&gt;Set up a component library and production site with StoryBook and NextJS.&lt;/li&gt;
&lt;li&gt;Added scripts that will make our developer experience more accessible to manage.&lt;/li&gt;
&lt;li&gt;All our dependencies get managed from the top level, and we do not have to pull in other repos or git submodules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point, we could easily add a new site project or extend our component library. We could also add other &lt;code&gt;packages&lt;/code&gt; that may deal with custom server functionality, CMS integrations, or API support. The possibilities are endless. Now it's time for you to try!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Announcing the CrUX Site Validator</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Tue, 07 Mar 2023 05:11:54 +0000</pubDate>
      <link>https://dev.to/dainemawer/announcing-the-crux-site-validator-mnn</link>
      <guid>https://dev.to/dainemawer/announcing-the-crux-site-validator-mnn</guid>
      <description>&lt;p&gt;Over the past few years, I have worked closely with various performance tools. One issue I often encounter is whether a website is in the CrUX. To clarify, one can run a PageSpeed Insights report to determine this. However, this can be problematic for workflow reasons when creating strategies for clients.&lt;/p&gt;

&lt;p&gt;If a client's website does not meet the eligibility requirements for the CrUX, it becomes challenging to aggregate and visualise data without the help of the CrUX.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the CrUX?
&lt;/h2&gt;

&lt;p&gt;The CrUX or Chrome User Experience Report is the official dataset for Google's Web Vitals program. All data is collected from Google Chrome users worldwide as long as users have opted in.&lt;/p&gt;

&lt;p&gt;There are also eligibility requirements for sites that make it into the CrUX, such as traffic volume and other factors.&lt;/p&gt;

&lt;p&gt;Tools like Page Speed Insights and Search Console use the CrUX to show your site's performance against real user metrics.&lt;/p&gt;

&lt;h2&gt;
  
  
  CrUX Validator
&lt;/h2&gt;

&lt;p&gt;I have developed a straightforward tool that uses the CrUX API to verify if a site is in the CrUX. You will receive an immediate response if the site is not present in the CrUX. However, if it is, the tool includes direct links to the PageSpeed Insights Report and the CrUX Dashboard for that URL.&lt;/p&gt;

&lt;p&gt;You can check out the tool here: &lt;a href="https://dainemawer.com/tools/crux-checker"&gt;https://dainemawer.com/tools/crux-checker&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>webperf</category>
      <category>tooling</category>
    </item>
    <item>
      <title>10 Proven Techniques for More Effective Code Reviews</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Tue, 21 Feb 2023 04:28:26 +0000</pubDate>
      <link>https://dev.to/dainemawer/10-proven-techniques-for-more-effective-code-reviews-ig0</link>
      <guid>https://dev.to/dainemawer/10-proven-techniques-for-more-effective-code-reviews-ig0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Any engineer will tell you performing code reviews is as normal as breathing air in the tech world. Code reviews are integral to the software development lifecycle by ensuring quality, standards, team collaboration, knowledge sharing and learning.&lt;/p&gt;

&lt;p&gt;As much as we know that code reviews are mandatory, the jury is out about how best to dish them out. A code review, in many ways, becomes an intersection of human and machine collaboration. Humans debate and collaborate to better the machine code to ensure its intended function.&lt;/p&gt;

&lt;p&gt;It's this very intersection where the problem begins. Humans have a hard enough time conversing with each other, never mind talking about code that a machine is barely intelligent enough to process. Often, code reviews can become personal, offensive and filled with dread. They can hold up sprints or project deadlines due to stubborn and egotistical mindsets or cause panic in those who don't understand the intended feedback.&lt;/p&gt;

&lt;p&gt;Fortunately, there are ways to overcome these challenges, so here are ten techniques for giving, accepting and working with code reviews:&lt;/p&gt;

&lt;h2&gt;
  
  
  Perform Multiple Reviews Per Feature
&lt;/h2&gt;

&lt;p&gt;One giant misconception about code reviews is that the code should only be reviewed once. It's like arriving at your destination without knowing how you got there. Whereas it's not feasible or efficient to constantly check the same code, it is valuable to be close to the development of that feature on a daily or weekly basis.&lt;/p&gt;

&lt;p&gt;This helps you, as the reviewer, understand what the engineer submitting the code review is trying to achieve; it outlines their thought process and uncovers their struggles.&lt;/p&gt;

&lt;p&gt;I would suggest regular check-ins regarding code reviews, perhaps when a feature is 25% or 75% complete. This gives you multiple opportunities to course correct if need be. Junior developers will also appreciate the guidance, as it will feel like you're building the feature with them.&lt;/p&gt;

&lt;p&gt;As time may not always allow for three rounds of detailed review, doing a brief check-in via a Draft PR for the 25% and 75% milestones may be worthwhile. A thorough review can be performed when the submitting engineer thinks the feature is finished.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define a Clear Process
&lt;/h2&gt;

&lt;p&gt;Before launching into feature development, defining a straightforward process for code reviews can go a long way. This may involve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Who will perform code reviews?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What automated tools will be used?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How often should a code review take place?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What activities will take place during the code review?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What are the steps to submit a code review?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Who is responsible for assigning tickets/code reviews to relevant engineers?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How should developers prepare their branches?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What merge strategy should be used?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Should branches be deleted after merging?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It often helps to define a document that outlines these questions and their answers to help make the team more efficient. Once all members agree on a process, follow it and try not to change it too much.&lt;/p&gt;

&lt;p&gt;Always communicate with the team when there's a process change and ensure complete alignment and understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Focus On Code, Not People
&lt;/h2&gt;

&lt;p&gt;All too often, code reviewers can leave borderline insulting, offensive or rude comments on PRs - written language can be conveyed and interpreted in many different ways, depending on language barriers, culture, and the general mood/sensitivity of the engineer submitting their work.&lt;/p&gt;

&lt;p&gt;Feedback like this can often come back as "too direct" and does not contribute to a cohesive working environment. When addressing feedback on a code review, try to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Keep it light-hearted, kid around a bit, or use emojis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be empathetic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Suggest, rather than instruct: "Perhaps it would be better to…" rather than "You must stop doing…."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid blameful or aggravating language: "A better understanding of the CSS cascade would help make this code more efficient" instead of "You don't understand how the CSS cascade works".&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat every feedback item as a learning experience for the engineer having their work reviewed. Likewise, as the code reviewer, every feedback item you leave is a teaching moment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask Questions; Dont Assume Mistakes
&lt;/h2&gt;

&lt;p&gt;One thing I've found particularly useful in the past is asking a question instead of calling out a mistake. This disarms the situation immediately as your intention is clear; asking a question is less aggressive than pointing out that the code submitted needs refactoring. Asking a question can take many forms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"Can you explain to me how this function works?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Why is this value a String on line 117 but an Array on 120?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"What is the purpose of this variable?"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Asking questions disarms the engineer who submitted the request and helps you understand the logic better. The reviewee will feel like they are teaching you, increasing their self-confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leverage Automated Tooling
&lt;/h2&gt;

&lt;p&gt;Perhaps the most critical point on this list is that as a code reviewer, you do not want to spend time calling out code mistakes that could have been caught with linting tools…especially if the project has them set up already.&lt;/p&gt;

&lt;p&gt;Many platforms offer integrations for automated tooling to run in CI/CD pipelines that can make this a breeze. Github, for instance, allows you to run automated tasks through GitHub Actions, which can fire on pull requests or git push.&lt;/p&gt;

&lt;p&gt;You can also use tools like Husky or Lint-Staged to run linting scripts on only the code that has changed on the branch. This way, code styling, best practices and silly errors can be caught without needing a human eye.&lt;/p&gt;

&lt;p&gt;Of course, automated tools can't catch everything, but I would consider them for the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CSS Code Styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript Code Styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Framework Best Practices&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unit Testing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance / e2e Testing&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Encourage Open Communication and Dialogue
&lt;/h2&gt;

&lt;p&gt;The hierarchical nature of code reviews (reviewer vs reviewee) can inherently stall open communication. The code review format isn't a comfortable platform for clear communication, either. Whereas issues and problems can be easily pinpointed and called out in code, the details may need to be taken offline.&lt;/p&gt;

&lt;p&gt;While having these conversations, it's essential to gauge the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How much time you're spending mentoring, teaching and explaining the issues found in the PR?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The openness of the reviewee. They also have to take the code review process as a learning experience and not get too conscious of the feedback provided.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Actively encourage the challenging of opinion in a way that keeps open dialogue consistent. Less senior team members need to be encouraged to challenge opinions respectfully. This can be done in a 1:1 session or as a team feedback session if the reviewee feels comfortable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do More Than Review
&lt;/h2&gt;

&lt;p&gt;Believe it or not, there is more to code reviews than just reviewing code. A thorough code review means that, as a senior engineer, you take a vested interest in the submitted code. This may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pulling the code down locally and running a production build.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing the feature in the browser, validating the technical approach and ensuring it meets product stakeholder expectations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performing some light but meaningful QA on the feature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Suggesting improvements and providing options for optimising.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thinking ahead and determining if this feature could have a domino effect across the project.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Be aware of these extra responsibilities. As the reviewing engineer, you give the thumbs up for when this code is merged. &lt;/p&gt;

&lt;h2&gt;
  
  
  Use Code Suggestions and Examples
&lt;/h2&gt;

&lt;p&gt;Often, our understanding of feedback can differ from engineer to engineer. This is mainly due to experience; some senior engineers see things more clearly than others.&lt;/p&gt;

&lt;p&gt;In the past, I've received feedback that I haven't entirely understood or that's made me hopelessly lost. Sometimes the feedback required a subtle refactor or update to logic I did not completely understand. &lt;/p&gt;

&lt;p&gt;If a reviewing engineer had provided a clear example of what they wanted to see, I could have been far more efficient in my duties. GitHub has a great feature called Suggested Changes, allowing reviewers to suggest code updates in line with commented feedback.&lt;/p&gt;

&lt;p&gt;Linking to related examples, educational reading, articles or blog posts can also help achieve positive and sought-after results from reviewees in a way that teaches them and allows them to improve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't Sweat The Small Stuff
&lt;/h2&gt;

&lt;p&gt;Sometimes, less experienced engineers get stuck on the things that matter the least. Whether that is tabs vs spaces or how to name variables or functions. Some things don't matter as much as others think they do. &lt;/p&gt;

&lt;p&gt;As a senior engineer on the project, you have the authority to override this. However, it does become a case of "choosing your battles". It's not efficient nor practical to have back and forth on how a constant has been named. &lt;/p&gt;

&lt;p&gt;You need to learn to let certain things go.&lt;/p&gt;

&lt;p&gt;This can be dependent on the technologies or frameworks used. As a general rule of thumb, always prioritise the issues that could cause the most damage in the long run. Naming conventions and other callouts can be tackled later if they do not directly affect the functionality or cause code styles to erode on lint.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement a Code Review Check List
&lt;/h2&gt;

&lt;p&gt;A code review checklist is an essential and effective way of ensuring consistency within each PR. Nowadays, many manual tasks are mainly automated through tests, so you know that a particular task succeeds or fails when a PR is created. &lt;/p&gt;

&lt;p&gt;For other more abstract items, though, a checklist in the PR description can go a long way. You may want to include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A link to the task ticket.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A description of the technical approach or solution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Links to designs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Screenshots of the feature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Instructions on how to test.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A section to confirm functionality, address doubts etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If every engineer takes the time to fill in this section consistently, it provides a meaningful database of progress over time. This can be useful when uncovering where a bug originated. In GitHub, you can use PR Templates to implement a pre-defined setup when a PR is created.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Ensuring more effective code reviews can be a difficult learning curve for senior and junior engineers. Once mastered, engineers can change the direction and output of a team by following simple and tested communication techniques. &lt;/p&gt;

&lt;p&gt;Remember to communicate openly, provide direct feedback on the code, not the person, perform thorough reviews beyond "just reviewing code", and leverage automated tooling to save you from searching for remedial mistakes.&lt;/p&gt;

&lt;p&gt;This article originally appeared on &lt;a href="https://www.dainemawer.com/articles/ten-proven-techniques-for-more-effective-code-reviews"&gt;dainemawer.com&lt;/a&gt;. If you liked this article, please follow me on Twitter at &lt;a href="https://twitter.com/daine_mawer"&gt;@daine_mawer&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>4 Tips for Properly Using the Return Statement in Your Code</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Mon, 13 Feb 2023 04:57:06 +0000</pubDate>
      <link>https://dev.to/dainemawer/4-tips-for-properly-using-the-return-statement-in-your-code-g3o</link>
      <guid>https://dev.to/dainemawer/4-tips-for-properly-using-the-return-statement-in-your-code-g3o</guid>
      <description>&lt;p&gt;The return statement is an often overlooked programming paradigm. It allows you to specify a value to be returned by a function and signals the end of its execution. Using this statement properly can ensure your code runs smoothly and may prevent unexpected bugs. Here are five tips for using the return statement effectively:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use the return statement to end a function or method&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The return statement signals the end of a function or method. When the return statement is encountered, the function immediately terminates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;sayMyName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// end the function&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's worthwhile noting that the return statement is affected by ASI (Automatic Semicolon Insertion). This means that you cannot create a new line after the return statement is called:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* Incorrect - would return nothing and flag an error. */&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cm"&gt;/* Correct - would return the value of name. */&lt;/span&gt;
&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
 &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Return a value of the correct data type:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When using the return statement, make sure to return the correct data type of the intended value. If you fail to return the correct data type, your program will behave unexpectedly and may result in errors. This is due to a feature of JavaScript known as Type Coercion.&lt;/p&gt;

&lt;p&gt;Look out for my articles on Using TypeScript and Getting Started with JavaScript Unit Testing to learn more about how to work around this pitfall confidently.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// correct - returns a number&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// correct - returns a number&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; times &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; is equal to: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// incorrect - returns a string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Return a value that is appropriate for the function&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When writing functions, it is essential to consider what information you need from your data and how it can affect your code. For example, if your function needs to calculate the average of a list of numbers, returning the sum of those numbers would not be correct.&lt;/p&gt;

&lt;p&gt;Make sure you carefully consider what information you need when writing functions and how it can affect your code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;average&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// incorrect - returns the sum of the numbers, not the average&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;average&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// correct - returns the average of the numbers&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When writing a function, it's important to be intentional about the following:&lt;/p&gt;

&lt;p&gt;What the function is intended to do&lt;/p&gt;

&lt;p&gt;What data the function is intended to return&lt;/p&gt;

&lt;p&gt;Is the data returned immutable?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use multiple return statements if necessary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sometimes, you may want to return a value immediately if certain conditions are met. This would apply to using if statements, as well as switch statements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;options&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;option&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;option&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DnD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
     &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;do-not-disturb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Silent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
     &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;silent-mode&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
     &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;no-option-selected&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getOptions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;option&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;option&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DnD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;do-not-disturb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;option&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the options function above, we can omit the break keyword, along with a temporary variable to store the value if we explicitly return within a case - this makes code more readable and saves memory.&lt;/p&gt;

&lt;p&gt;In the getOptions function, we can also always ensure that we return a value regardless of whether a condition is met. If the condition is true, it will execute the return statement within the if - if not, it simply ignores that statement and returns the value of option&lt;/p&gt;

&lt;p&gt;By following these tips, you can use the return statement effectively and ensure that your code runs smoothly and correctly. Proper use of the return statement is an essential part of good programming practice, and taking the time to get it right can save you a lot of headaches in the long run.&lt;/p&gt;

&lt;p&gt;You can read more about the return statement on MDN.&lt;/p&gt;

&lt;p&gt;This blog post was initially published on &lt;a href="https://dainemawer.com" rel="noopener noreferrer"&gt;dainemawer.com&lt;/a&gt;. If you liked this article, please follow me on Twitter at &lt;a href="https://twitter.com/daine_mawer" rel="noopener noreferrer"&gt;@daine_mawer&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Waking Up Early: A Crash Course for Software Engineers</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Tue, 07 Feb 2023 07:24:57 +0000</pubDate>
      <link>https://dev.to/dainemawer/waking-up-early-a-crash-course-for-software-engineers-3db6</link>
      <guid>https://dev.to/dainemawer/waking-up-early-a-crash-course-for-software-engineers-3db6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Let's rewind the clock to the 27th of March, 2020. A year that changed a lot about life as COVID descended upon each and everyone one of us. That day, a Friday, was the first day of the hard lockdown in South Africa. Like many of you reading this article, I was shocked and wondered how long I'd be left to survive the jail sentence handed down to me.&lt;/p&gt;

&lt;p&gt;On the Thursday afternoon before lockdown struck, I was in a bookstore and picked up "The 5 AM Club by Robin Sharma". I was instantly intrigued. I had read one of Robins's books (The Monk Who Sold His Ferrari) some years before and enjoyed his storytelling. I purchased the book and read it through the first weekend of lockdown.&lt;/p&gt;

&lt;p&gt;I had heard about the concept of the 5 AM Club multiple times leading up to that point, always knowing it was something I wanted to find out more about.  Adapting to the 5 AM Club gave me a sense of control, considering how much of my life was now out of my control. &lt;/p&gt;

&lt;p&gt;I wasn't born a night owl. In fact, by 4 PM, I'm usually pretty useless to the world. However, waking up has always been easy for me. I have boundless energy in the morning and, to be honest, quite enjoy the peace in the world during the early hours of the day. I know, right? It's the complete antithesis of what software engineers are accustomed to.&lt;/p&gt;

&lt;p&gt;What if I told you, though, that following the practices of the 5 AM Club has helped me gain two promotions over two years, learn new technologies and languages, and even set up a side hustle or two? There are many benefits to waking up early, both professionally and personally, and I intend to convince you of them!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is The 5 AM Club?
&lt;/h2&gt;

&lt;p&gt;So what exactly is The 5 AM Club? First and foremost, it's a book. However, I would say it's now closer to philosophy or methodology. The 5 AM Club follows the 20/20/20 rule, as set out in the book:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;20 minutes of intense exercise&lt;/li&gt;
&lt;li&gt;20 minutes goal setting&lt;/li&gt;
&lt;li&gt;20 minutes learning a new skill&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While the premise of The 5 AM Club is based on these three tenants, once you understand the reasons for each tenant, you can easily change, arrange and update them to suit your needs or align with your goals.&lt;/p&gt;

&lt;p&gt;As the Dalai Lama said: "…know the rules well so that you can break them effectively."&lt;/p&gt;

&lt;p&gt;Waking up at 5 AM allows you to make space in your day before the world gets busy. The 5 AM Club has gained popularity among business leaders and entrepreneurs, and it can be elegantly applied to the careers of software engineers. Let's discuss some of the significant benefits of practising The 5 AM Club.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of the 5 AM Club
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Achieve your career goals:&lt;/strong&gt; in my own experience, I leveraged the 5 AM Club to achieve my career goals. In 2020, I was a humble Senior Front-end Engineer; a year later, I became a Lead Front-end Engineer and, one year after that, an Associate Director of Front-end Engineering. This was a choice I made, dedicated to my career. Luckily, good fortune came into play, but I used my early morning hours to go the extra mile at work, and it paid off. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Balance your personal life:&lt;/strong&gt; not everything in life is about work. Your health, relationships and family are just as important. I don't have kids, but I have a committed relationship with my partner, two dogs to look after, and a house to run. You can use the early hours to spend time with your partner, exercise together, take the dogs for a walk, and plan travel/life goals. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn a new skill:&lt;/strong&gt; another great way to leverage the 5 AM Club is to spend time learning new skills. Whether that's a new programming language, a new library or a tech stack, even dedicating an hour a day to learning something new that will help your career or personal life can take you very far and make you more valuable in your position.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increase productivity and efficiency:&lt;/strong&gt; as I had focused on my career, waking up before everyone else allowed me to get a jump start on my day. I would deliver project requests or feedback before anyone had even woken up. Code reviews were done before my colleagues were awake, and I could solve difficult bugs in solitude. Trust me; this makes project managers love having you on their team and makes you stand out as an overachiever. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improve your health:&lt;/strong&gt; you can also dedicate the early hours to improving your health. Coupled with intermittent fasting, you can get a head start on weight loss, exercise, planning meals or researching healthy alternatives. In my experience, it allows me to catch waves or run 10km without feeling the pressure of needing to be available on Slack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start a side hustle:&lt;/strong&gt; software engineers have a tremendous competitive edge over many would-be entrepreneurs - they can build and execute websites or applications for free! This makes starting a side hustle easy enough if you have a great idea. The other problem is time, which the 5 AM Club solves. Consistency is key; dedicating an hour or two a day to your side hustle can pay huge benefits in the long run.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Breaking Old Habits
&lt;/h2&gt;

&lt;p&gt;Perhaps the most challenging part of achieving "5 AM Club" status is breaking the habit of waking up late. This barrier to entry is difficult for most people, never mind tired software engineers who have been staring at a screen and debugging complex logic problems.&lt;/p&gt;

&lt;p&gt;Recent studies show that it takes around 28 days to break a habit. Thus, if you're serious about breaking your sleep cycle, it's going to take nearly a month to get used to waking up at 5 AM. This wasn't all that hard, as South Africa has relatively mild seasons. Don't get me wrong; winter is still cold, so I would not advise you to begin forming this habit in the dark. Wait for summer to arrive and let the sun help you out. It's far easier to rise with the sun than without it.&lt;/p&gt;

&lt;p&gt;Be patient with yourself, and begin with the 20/20/20 method. It's far easier to get used to than dedicating yourself to one direct benefit, as listed above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The 5 AM Club has many benefits that can help software developers improve their health, advance their careers, balance their personal lives and help them achieve greatness. Breaking the habit of waking up late will be difficult, but you'll soon reap the benefits of this widespread practice. &lt;/p&gt;

&lt;p&gt;The 5 AM Club is a way of gaining control in a chaotic and disruptive life for all of us. It's a philosophy and practice that can take you as far as you want. Buy the book, read it and start waking up early!&lt;/p&gt;

&lt;p&gt;This blog post was initially published on &lt;a href="https://www.dainemawer.com/articles/waking-up-early-a-crash-course-for-software-engineers"&gt;dainemawer.com&lt;/a&gt;. If you liked this article, please follow me on Twitter at &lt;a href="https://twitter.com/daine_mawer"&gt;@daine_mawer&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>career</category>
    </item>
    <item>
      <title>4 Surprising Benefits of Intermittent Fasting for Software Engineers</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Sun, 22 Jan 2023 20:04:25 +0000</pubDate>
      <link>https://dev.to/dainemawer/4-surprising-benefits-of-intermittent-fasting-for-software-engineers-2cce</link>
      <guid>https://dev.to/dainemawer/4-surprising-benefits-of-intermittent-fasting-for-software-engineers-2cce</guid>
      <description>&lt;p&gt;Introduction&lt;/p&gt;

&lt;p&gt;I spent the last few months of 2022 integrating intermittent fasting into my daily routine. Fasting has gained popularity over recent years as a way to improve health and well-being. In essence, it's a behavioural pattern that requires individuals to only eat for specific "windows" during the day. I've been experimenting with the 16/8 plan; this means I do not eat food for 16 hours a day and then eat pretty much what I want (within reason) for an 8-hour window, which finishes around 20:00.&lt;/p&gt;

&lt;p&gt;Effectively, you land up cutting out breakfast and a morning snack. Intermittent fasting has been shown to have several benefits for the human body.&lt;/p&gt;

&lt;p&gt;Software engineers, plagued by the stereotype of poor eating and collecting bad habits, can uncover some surprising benefits to health and lifestyle when incorporating fasting into their daily routine.&lt;/p&gt;

&lt;p&gt;In this article, I'll run through four essential benefits of intermittent fasting and how they can add value to your life.&lt;/p&gt;

&lt;p&gt;Increased Cognitive Function&lt;/p&gt;

&lt;p&gt;The most significant benefit of intermittent fasting is improved cognitive function. When you fast, your body increases the production of a protein called Brain-Derived Neurotrophic Factor (BDNF), which is associated with improved memory and learning. As any software engineer will tell you, memory and learning come in handy when writing complex code. Software Engineers rely heavily on their mental sharpness and problem-solving skills to do their job and stay on top of their game. More than that, fasting has been shown to increase focus and concentration.&lt;/p&gt;

&lt;p&gt;I'm an avid fan of Dr Andrew Huberman's Podcast, Huberman Labs. He has done a great episode on the Effects of Fasting &amp;amp; Time Restricted Eating on Fat Loss &amp;amp; Health if you want to discover more scientific details about intermittent fasting.&lt;/p&gt;

&lt;p&gt;From my own experience, I feel like I've experienced improved mental capacity and function for months now. For the first week or so, you are distracted by the "hunger" feeling, but your body eventually adapts. When you feel that tinge of hunger, it's not always because you're hungry - generally, it's because you haven't had enough water, or it's habitual.&lt;/p&gt;

&lt;p&gt;Better Time Management&lt;/p&gt;

&lt;p&gt;Perhaps not a direct side effect of fasting, but a benefit nonetheless is the change in time you feel when you begin fasting. You'd be surprised by how much time you spend thinking about, planning and making food during the day. As fasting limits that window to 8 hours in 24 hours, what you eat and when you eat it is dramatically reduced to a small window - generally lunch and dinner.&lt;/p&gt;

&lt;p&gt;After a few weeks of fasting - your cravings for unhealthy snacks disappear, and the amount of time you spend eating and planning snacks/meals reduces dramatically. I've always been a morning person, so I've found that fasting helps me keep my morning routines and rituals incredibly streamlined and focused.&lt;/p&gt;

&lt;p&gt;When you re-focus the time you spend thinking about food, on food items that keep you full longer - nuts, avocado and Low GI items you can stay full longer, eat less, remain healthy and feel better.&lt;/p&gt;

&lt;p&gt;Less Stress and Lighter Mood&lt;/p&gt;

&lt;p&gt;A direct result of fasting is that your body produces less cortisol. Cortisol is a hormone that is generally associated with stress and anxiety. If your body is making less of it, you should naturally feel a reduction in both symptoms. As a double-whammy, your body simultaneously increases the production of endorphins (the happy hormone) which can lift your mood and make you feel happier.&lt;/p&gt;

&lt;p&gt;Although I cheat to a degree with my fasting routine (I have black coffee with a bit of honey when I wake up) - I've also found that fasting has helped me curve my need to drink too much coffee every day. 4 cups of coffee, in terms of caffeine, mainly after noon is enough to heighten anyone stress/anxiety response. I'm down to 2 cups daily and don't drink coffee past 1 PM.&lt;/p&gt;

&lt;p&gt;I've also found that my afternoon sugar crash has disappeared. I noticed this within the first few days of fasting. I have always struggled with the afternoon crash; feeling sluggish, tired, and lethargic was a reality around 4 PM every day. I now feel much better, and though I don't feel like I have "more" energy, I think it's sustained more these days.&lt;/p&gt;

&lt;p&gt;Multiple Health Benefits&lt;/p&gt;

&lt;p&gt;I'm not a medical professional, and I'm sure for everything I list here, there will be an argument against it, but some documented health benefits of controlled, intermittent fasting are:&lt;/p&gt;

&lt;p&gt;Weight-loss&lt;/p&gt;

&lt;p&gt;Reduced inflammation&lt;/p&gt;

&lt;p&gt;Lower blood pressure&lt;/p&gt;

&lt;p&gt;Improved cholesterol levels&lt;/p&gt;

&lt;p&gt;The benefits will vary from person to person, and other than weight loss, I have yet to track the other 3 with any seriousness. I think these benefits are less about the fasting itself and more about the fact that you are simply consuming less "bad" food or food that your body can't use.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;Intermittent fasting is a journey - you can decide whether it's the right fit for your lifestyle. Through my own experience, I've found it to provide considerable benefits to my routine, not only physically but mentally, as well as financially (buying less food, fewer snacks etc.).&lt;/p&gt;

&lt;p&gt;Fasting has many potential benefits: reducing inflammation, lower stress levels, weight loss, and overall well-being. For software engineers who sit all day, focused and passionate about their work, fasting is a valuable practice to introduce into your day-to-day that doesn't require significant commitments or time to see actual, healthy results.&lt;/p&gt;

&lt;p&gt;I'll stress again that I have no medical training and that you should consult your doctor before introducing intermittent fasting into your routine.&lt;/p&gt;

&lt;p&gt;This blog post was initially published on &lt;a href="https://www.dainemawer.com/articles/five-surprising-benefits-of-intermittent-fasting-for-software-engineers" rel="noopener noreferrer"&gt;dainemawer.com&lt;/a&gt;. If you liked this article, please follow me on Twitter at &lt;a href="https://twitter.com/daine_mawer" rel="noopener noreferrer"&gt;@daine_mawer&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>windows</category>
      <category>discuss</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Motivate and Inspire Individual Contributors</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Thu, 19 Jan 2023 22:00:00 +0000</pubDate>
      <link>https://dev.to/dainemawer/how-to-motivate-and-inspire-individual-contributors-4h52</link>
      <guid>https://dev.to/dainemawer/how-to-motivate-and-inspire-individual-contributors-4h52</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Individual Contributors play an essential role within a development team and organisation. Engineering managers are in charge of leading and managing Individual Contributors to successful outcomes while ensuring workplace happiness. More importantly, as most engineering managers were once Individual Contributors, they are uniquely positioned to relate and empathise with the individuals working in their team.&lt;/p&gt;

&lt;p&gt;As each contributor brings their personality to the table, engineering managers sometimes need to adjust their approach to motivate and inspire them when workload increases or pressures build up.&lt;/p&gt;

&lt;p&gt;This article will explore five strategies engineering managers can leverage to inspire and motivate Individual Contributors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Clear Goals and Expectations
&lt;/h2&gt;

&lt;p&gt;Individual Contributors must know what is expected of them. This helps people feel secure and gives them a purpose within the organisation. Once expectations are set, individual contributors can begin to understand their roles and determine how they can contribute to the entire team's success.&lt;/p&gt;

&lt;p&gt;Using SMART goals: Specific, Measurable, Achievable, Relevant, and Time-bound can help guide Individual Contributors to deliver real value on time.&lt;/p&gt;

&lt;p&gt;While project goals are important, personal goals are equally important. You must always be conscious as an engineering leader that individual contributors have ambitions to learn and master technologies that may or may not be related to the current stack they’re working on.&lt;/p&gt;

&lt;p&gt;It's worthwhile setting yearly personal goals so that they feel like they are working towards progressing their career objectives, not just the company's business goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Providing Ongoing Feedback and Support
&lt;/h2&gt;

&lt;p&gt;Continuous and positive feedback helps individual contributors thrive in their position.&lt;/p&gt;

&lt;p&gt;Feedback can be given daily, weekly or monthly through several activities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Async check-ins on Slack&lt;/li&gt;
&lt;li&gt;1:1 Meetings&lt;/li&gt;
&lt;li&gt;Quarterly Goal Realignments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Creating a solid rapport with Individual Contributors can help make this process smoother. Ongoing support can help Individual Contributors better understand their strengths and weaknesses and allow engineering managers to step into mentorship positions when and if needed.&lt;/p&gt;

&lt;p&gt;The most important part of this process is keeping your word as a manager. Don’t commit to helping Individual Contributors meet their goals if six months go by and you haven’t spoken about it once. A level of trust and dependency should be held in the utmost regard. When things get tough, Engineering Managers must remain calm and guide Individual Contributors to the best possible outcomes.&lt;/p&gt;

&lt;p&gt;Furthermore, sometimes Individual Contributors have bad days. Support, in this case, may have nothing to do with work and business goals. It may require you to show more empathy and understanding than usual.&lt;/p&gt;

&lt;h2&gt;
  
  
  Encouraging and Supporting Career Development
&lt;/h2&gt;

&lt;p&gt;It should not be taken for granted that Individual Contributors’ have their own career goals. These goals may often not, or potentially never, align fully with the purposes of the company they work for. Engineering managers must respect that. Showing genuine interest in an individual's career development can naturally motivate them.&lt;/p&gt;

&lt;p&gt;Company policies can go a long way to aiding engineering managers in such goals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Professional Development budgets&lt;/li&gt;
&lt;li&gt;Paid / Sponsored conferences and trips&lt;/li&gt;
&lt;li&gt;Encouraging up-skilling in fields that benefit the individual and the company&lt;/li&gt;
&lt;li&gt;Assigning them responsibility on projects that will help them develop their skills.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whereas having conversations about career trajectories outside the current company may feel awkward and inappropriate, Individual Contributors will likely move on at some point in the future. Their position under your supervision will provide them with skills and experience that will encourage them later in life, so you should treat any Individual Contributor in a way that their tenure with you contributes positively to their career.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recognising and Rewarding Contributions
&lt;/h2&gt;

&lt;p&gt;Recognising and rewarding an individual's hard work can increase morale and motivation. Recognising is more important than rewarding. Public recognition in front of peers or non-technical stakeholders of the company can go a long way. It should be noted that recognition applies to more than just &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;great code:&lt;/li&gt;
&lt;li&gt;great teamwork,&lt;/li&gt;
&lt;li&gt;going above and beyond, and making a concerted effort to improve, can all be recognised in a meaningful way.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hard work and that extra 10% should always be respectfully valued as it highlights Individual Contributors who are passionate about their roles and responsibilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fostering a Positive and Inclusive Work Environment
&lt;/h2&gt;

&lt;p&gt;Attempt to keep dialogues and hard conversations positive and inclusive. Transparent communication across teams and hierarchies can ensure individual contributors feel respected and included in everyday business and technical decisions. It brings team members closer together and breaks down cultural and personal barriers.&lt;/p&gt;

&lt;p&gt;Encourage an environment of making mistakes that can be learned from and address team feedback as often as possible. Perhaps most importantly, if you, as an engineering manager, can establish a well-knit and robust community within your engineering team, it will encourage Individual Contributors to work hard and want to work.&lt;/p&gt;

&lt;p&gt;These are the beginnings of great, grass-root company culture - something which is highly sort after in the tech industry and often separates good companies from great companies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By ensuring Individual Contributors are inspired and motivated to come to work with a positive attitude and a willingness to work hard, the entire business can experience successful delivery of value. Setting SMART business and personal goals for Individual Contributors can help them navigate what's expected of them. Providing ongoing feedback and support can help them feel secure and that someone is on their side if they encounter a challenge.&lt;/p&gt;

&lt;p&gt;Furthermore, creating a positive work environment and celebrating success can help Individual Contributors feel recognised and valued.&lt;/p&gt;

&lt;p&gt;This blog post was originally published on &lt;a href="https://www.dainemawer.com/articles/how-to-inspire-individual-contributors"&gt;dainemawer.com&lt;/a&gt;. If you liked this article, please follow me on Twitter at &lt;a href="https://twitter.com/daine_mawer"&gt;@daine_mawer&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>career</category>
      <category>management</category>
      <category>productivity</category>
    </item>
    <item>
      <title>5 Qualities That Make You A Hireable Senior Engineer</title>
      <dc:creator>Daine Mawer</dc:creator>
      <pubDate>Thu, 13 May 2021 05:58:22 +0000</pubDate>
      <link>https://dev.to/dainemawer/5-qualities-that-make-you-a-hireable-senior-engineer-3j7j</link>
      <guid>https://dev.to/dainemawer/5-qualities-that-make-you-a-hireable-senior-engineer-3j7j</guid>
      <description>&lt;p&gt;As we grow in such a fast-paced industry like technology, we often lose sight of what it takes to get hired. That statement is both true and false. Some of us find ourselves spending long tenures of time at specific companies while the rest of us jump ship rather frequently in order to find greener pastures.&lt;/p&gt;

&lt;p&gt;Through countless hours of learning, failing, and succeeding we eventually reach a point where we are autonomous enough to proactively solve our own challenges. Be that engineering features, tackling a backlog of bugs successfully, or aiding more junior members of the team. These are some of the key points that differentiate less experienced engineers from those who are more experienced.&lt;/p&gt;

&lt;p&gt;However, what does it really boil down to when we label an engineer as "senior"? What should companies be looking for when they advertise the position? And, what qualities should you display in order to grab the attention of recruiters and/or HR departments?&lt;/p&gt;

&lt;p&gt;Here are 5 qualities of senior engineers that I look for and more importantly, rely on:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Arrive at a problem, with a solution.
&lt;/h3&gt;

&lt;p&gt;One of the biggest red flags I see amongst teammates is when an engineer does not come to the party with solutions to a problem. Regardless of whether the solution is correct or the best possible solution for that problem. It's the mindset of providing a solution when faced with a problem that becomes an outstanding quality in a teammate.&lt;/p&gt;

&lt;p&gt;Coming up with your own solutions means that you've given thought to the challenge, in a constructive and pro-active manner. Rather than admitting defeat straight away and declaring "I don't know".&lt;/p&gt;

&lt;p&gt;I can almost guarantee you that the majority of your peers probably have either come across the situation you face or know someone who does, so they're not stressed about the fact that you didn't arrive at the expected outcome, you just showed a willingness to and that's what counts.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. You acknowledge your imposter syndrome.
&lt;/h3&gt;

&lt;p&gt;Everyone has imposter syndrome, everyone. It just occurs at relative degrees. When someone new to web development faces a difficult learning curve they think to themselves: "I will never understand this". It's the same thought and gravity as that of a more experienced engineer thinking: "I have no idea how to write this function in the most performant way possible" or "I have no idea how to ensure that this code runs asynchronously". &lt;/p&gt;

&lt;p&gt;In my opinion, the voice inside your head that tells you you can't do something needs to be countered by a voice outside your head that tells you, you can. That voice can be from a mentor or member of a community that you respect. The most important part of dealing with imposter syndrome is acknowledging the fact that you and I both have it and it's okay because it helps push us to do things we don't think we can do.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. You dive into the unknown.
&lt;/h3&gt;

&lt;p&gt;Perhaps one of the most daring parts of being a senior or lead in a tech company is taking ownership and responsibility for code features that you have very little experience with.&lt;/p&gt;

&lt;p&gt;It can be a real struggle, and there will be times when you feel completely hopeless and paralyzed with confusion. There is always light at the end of the tunnel and there will always be someone who has either been through the same thing or knows how to implement what you're working on. &lt;/p&gt;

&lt;p&gt;It's important to carry on leading in a situation like this.&lt;/p&gt;

&lt;p&gt;Saying: "I don't know how to do this...", followed by: "I'm going to time-box it to 2 hours and see where I land up" or "We should bring in person x to help provide clarity" ensures transparency when it comes to dealing with the situation. &lt;/p&gt;

&lt;h3&gt;
  
  
  4. You don't know everything and admit it.
&lt;/h3&gt;

&lt;p&gt;I haven't spoken much about technical skill here as that can be learnt with repetition and motivation. If you dedicate yourself to learning a new concept or language you will eventually overcome the learning curve and beat it.&lt;/p&gt;

&lt;p&gt;Far too often, companies "go fishing" and look to hire engineers that appear to know almost every computer language available today. No one actually wants to hire that "unicorn". &lt;/p&gt;

&lt;p&gt;Good leaders hire those that can apply their knowledge and skills to challenges. You don't have to know everything about Webpack or Node, or React. Working knowledge is important, and you cannot do your job without it, but every discipline will present a challenge you have no idea how to solve and if you can admit that you are far closer to overcoming it. &lt;/p&gt;

&lt;p&gt;Furthermore, if you never admit that you don't know how to do something, it burns resources, time and patience. 3 things that are very precious.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. You give out and can take criticism.
&lt;/h3&gt;

&lt;p&gt;One of the quickest ways to grow is being able to consume criticism. Be that good or bad. When people identify your shortcomings in a way that allows you to grow and not feel like you've failed, it presents you with an opportunity to better yourself alongside your peers. Sometimes it's really hard to hear, but if you can take it in your stride you will see tremendous amounts of respect headed your way. &lt;/p&gt;

&lt;p&gt;That being said, the way you give out criticism is also really important. No one likes to feel criticised, and the way you handle constructive criticism in code reviews or retrospectives with peers and junior members of the team really shows your worth as a contributing member and leader. &lt;/p&gt;

&lt;p&gt;Today, for just a moment, grab a coffee and think about these 5 points in your career journey. If you place focus on them you will undoubtedly see that your position in a team starts to mould and change, for the better.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>productivity</category>
      <category>motivation</category>
    </item>
  </channel>
</rss>
