<?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: David Leger</title>
    <description>The latest articles on DEV Community by David Leger (@davejs).</description>
    <link>https://dev.to/davejs</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%2F1015%2Fca27805f-0d5f-4138-aa6c-78d53544141b.jpg</url>
      <title>DEV Community: David Leger</title>
      <link>https://dev.to/davejs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davejs"/>
    <language>en</language>
    <item>
      <title>Kill Your Darlings: Avoiding the Trap of Mild Successes</title>
      <dc:creator>David Leger</dc:creator>
      <pubDate>Fri, 22 Nov 2019 14:45:55 +0000</pubDate>
      <link>https://dev.to/davejs/kill-your-darlings-avoiding-the-trap-of-mild-successes-230b</link>
      <guid>https://dev.to/davejs/kill-your-darlings-avoiding-the-trap-of-mild-successes-230b</guid>
      <description>&lt;p&gt;In a previous post, I shared my &lt;a href="https://davejs.dev/perspectives-on-failure/"&gt;perspective on failure&lt;/a&gt;. I emphasized the lasting negative impact failure can have on us. It can be overwhelming and lead to undue stress if not managed well.&lt;/p&gt;

&lt;p&gt;However, at the very least failure is explicit. It can come in the form of a poor performance review from a manager. A missed deadline. Another person being angry with us. And notably from these examples, our realization of failure is typically forced upon us through means out of our control.&lt;/p&gt;

&lt;p&gt;Although it can be tough to handle, the knowledge of failure gives us permission to move beyond it. It's a bit of a blessing in disguise. Failure is short-term pain, but can also be the spark that triggers radical change which can ultimately propel us to some of our greatest successes. In this post, I want to explore what we should do when the lines aren't so clear cut between failure and success.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mild success is failure in disguise.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Equally, if not more than failure, we should be wary of mild success. Mild success is failure in disguise. It seeds regret. It's settling for &lt;em&gt;good enough&lt;/em&gt; when we are capable of so much more. Mild successes can lead us to spend months, years, or even a lifetime on auto-pilot, instead of seeking new and exciting challenges.&lt;/p&gt;

&lt;p&gt;Let's explore a hypothetical scenario.&lt;/p&gt;

&lt;p&gt;Perhaps you're at your first job out of university. The job is good! You're satisfied and you get paid decently well, especially compared to when you had no income as a student. About a year into the job, you've learned a lot. Things feel good. It's comfortable and you're relatively happy, maybe a little bit bored but you can deal with that. By all accounts, you're successful, and your parents are proud. You've got some complaints, but they're minor. You know there are other jobs out there that seem like a step up, but nah... your current job is pretty good. What more could you ask for?&lt;/p&gt;

&lt;p&gt;This is very likely a mild success.&lt;/p&gt;

&lt;p&gt;It might have been a good job to start with, but this is your first job out of university. It's all you've ever known, so you feel somewhat sentimental about the company and your coworkers. It's your one and only darling job.&lt;/p&gt;

&lt;p&gt;I think it's important to be proactive in identifying when we've achieved a mild success. Identify it. And kill it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In order to achieve great success, we must abandon success that is merely mild.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Kill your darlings.&lt;/em&gt; This is a common piece of advice given to aspiring authors. It's meant to encourage authors to let go of their most precious passages when they don't support the work as a whole. I think this can be more broadly applied to many parts of our lives beyond writing. In order to achieve great success, we must abandon success that is merely mild. Although they can make us happy, mild successes can cause us to stagnate and settle for what's comfortable, preventing us from pursuing what's desirable.&lt;/p&gt;

&lt;p&gt;And yes, that means leaving a job that has become merely comfortable for opportunities that challenge and excite you. In the novel of your life, kill your darlings. Cut out the meandering subplots. No matter how precious, they distract from the overall story you wish to tell.&lt;/p&gt;

&lt;p&gt;Beyond the career example I described, I encourage you to apply this concept to all parts of your life. I suspect you'll find at least one darling worth killing.&lt;/p&gt;

&lt;p&gt;Happy hunting. 🔪&lt;/p&gt;

</description>
      <category>opinion</category>
      <category>success</category>
      <category>failure</category>
      <category>career</category>
    </item>
    <item>
      <title>Job Security in Startup-land</title>
      <dc:creator>David Leger</dc:creator>
      <pubDate>Wed, 20 Nov 2019 23:46:01 +0000</pubDate>
      <link>https://dev.to/davejs/job-security-in-startup-land-3ag5</link>
      <guid>https://dev.to/davejs/job-security-in-startup-land-3ag5</guid>
      <description>&lt;p&gt;When I started my job at &lt;a href="https://manifold.co"&gt;Manifold&lt;/a&gt;, my parents warned me about taking a potentially unstable job. Leaving a stable job at &lt;a href="https://cvent.com"&gt;Cvent&lt;/a&gt; to go work for a Series A startup seemed like a big risk.&lt;/p&gt;

&lt;p&gt;I've worked at Manifold for almost a year now and in that time many people have asked me if I ever worry about losing my job. My response is always: Yes, but I don't really worry about that. Let me tell you why.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Startup employees have the lowest job security in the tech industry.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For many people, taking a job at a startup is risky. Startups are notorious for having high turnover rates, and more often than not, they go out of business before becoming profitable. Startup employees have the lowest job security in the tech industry. But &lt;strong&gt;job security isn't as important as you might think&lt;/strong&gt;, especially when compared with the experience that comes with working at a startup.&lt;/p&gt;

&lt;p&gt;Instead of job security, I like to focus on career security. What's the difference? Job security is how likely you are to keep your current job. &lt;strong&gt;Career security is how likely you are to find a new job.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So what has working for a startup done for my career security? At Manifold, we're working on some of the toughest unsolved problems in the cloud software industry. Getting the chance to work on these problems has allowed me to refine and expand my skills far beyond the average frontend developer. &lt;strong&gt;I get to work with cutting edge technologies&lt;/strong&gt; like Web Components and GraphQL on a daily basis. Beyond that, &lt;strong&gt;I've been able to explore new skillsets&lt;/strong&gt;: agile coaching, interviewing, product and design, partnership management, and more.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Working for a startup might be risky in the short-term, but it will lead to far more opportunities in the long-term.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These are all things that I would not have been exposed to this early in my career, or ever, working at a larger, more stable company. &lt;strong&gt;Having had these experiences, I'm far more employable than the average frontend developer.&lt;/strong&gt; Working for a startup might be risky in the short-term, but it will lead to far more opportunities in the long-term.&lt;/p&gt;

</description>
      <category>opinion</category>
      <category>startup</category>
      <category>career</category>
    </item>
    <item>
      <title>Maintainable Options Parameters for Functions in JavaScript</title>
      <dc:creator>David Leger</dc:creator>
      <pubDate>Tue, 22 May 2018 16:23:58 +0000</pubDate>
      <link>https://dev.to/davejs/maintainable-options-parameters-for-functions-in-javascript-4ek2</link>
      <guid>https://dev.to/davejs/maintainable-options-parameters-for-functions-in-javascript-4ek2</guid>
      <description>&lt;p&gt;My friend/co-worker Sam Jesso told me that he hates using flags to modify the behaviour of functions. It makes sense. Functions should follow the &lt;a href="https://en.wikipedia.org/wiki/Single_responsibility_principle"&gt;single responsibility principle&lt;/a&gt; and do exactly one thing. It makes testing and maintaining code easier because it keeps functions simple and concise. However, diving into almost any codebase will reveal that we often make exceptions and use flags.&lt;/p&gt;

&lt;p&gt;Whether or not these exceptions are justified is not what I want to discuss. It would be impossible to come up with a set of rules or guidelines for when an exception makes sense because everybody’s code is different. But if you’ve already decided that you want to pass flags into your function, there is a simple trick you can use to make your functions’ interfaces more developer-friendly.&lt;/p&gt;

&lt;p&gt;Rather than treating flags (or options) as separate parameters, we can group them into a single &lt;code&gt;options&lt;/code&gt; object:&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="c1"&gt;// Before&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;inputB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;flagA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;flagB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;flagC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Some input.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Some more input.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// After&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;inputB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;flagA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;flagB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;flagC&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Some input.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Some more input.&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="na"&gt;flagA&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;flagC&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Grouping options into a single object has several advantages over using separate parameters. To better understand these advantages, let’s take a look at a less abstract example...&lt;/p&gt;




&lt;h2&gt;
  
  
  An Example with Formatting Time
&lt;/h2&gt;

&lt;p&gt;Here’s a simple function to get a formatted time string from a &lt;code&gt;Date&lt;/code&gt; object:&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="nx"&gt;formatTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hours&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getHours&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;minutes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getMinutes&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getSeconds&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&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;hours&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="nx"&gt;minutes&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="nx"&gt;seconds&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="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;formatTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;  &lt;span class="c1"&gt;// 01:23:45&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Side note: Yes, I wrote my own version of &lt;code&gt;leftPad&lt;/code&gt; because I’m not pulling in simple dependencies for a blog post. (&lt;a href="https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/"&gt;Also if you don’t cringe when you hear talk of leftPad, take a moment to read this.&lt;/a&gt;)&lt;/em&gt;&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="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;numberOfChars&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;paddedNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;number&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="nx"&gt;numberOfChars&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="nx"&gt;paddedNumber&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="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numberOfChars&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;paddedNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`0&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;paddedNumber&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;paddedNumber&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;&lt;em&gt;And yes, I know how error-prone this is but it works for our implementation here.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Anyway, back to the example.&lt;/p&gt;

&lt;h3&gt;
  
  
  New Requirements
&lt;/h3&gt;

&lt;p&gt;We have a function for formatting time and it does a great job. But now we want to have the option switch between 12-hour and 24-hour time. And we also want to exclude seconds in some cases.&lt;/p&gt;

&lt;p&gt;No problem, we can just add some extra parameters to the function:&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="nx"&gt;formatTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;is12Hours&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;showSeconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hours&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;is12Hours&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getHours&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getHours&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;minutes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getMinutes&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;showSeconds&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="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getSeconds&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&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="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="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hours&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="nx"&gt;minutes&lt;/span&gt;&lt;span class="p"&gt;}${&lt;/span&gt;&lt;span class="nx"&gt;seconds&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="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;formatTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// 01:23&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are several issues with this approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The parameters must be passed in a specific order.&lt;/strong&gt; If we want to hide seconds, we must still pass a value for &lt;code&gt;is12Hours&lt;/code&gt; before we can specify one for &lt;code&gt;showSeconds&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The parameters are unnamed.&lt;/strong&gt; If the function is being called far away from the definition, it may not be clear what the parameters mean. We must go to the function definition to find out what the various &lt;code&gt;true&lt;/code&gt;/&lt;code&gt;false&lt;/code&gt; values do.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These issues make the function interface very difficult to read understand and they amplify the potential for human error especially when a function has many options because it’s easy to accidentally skip a parameter or mix up their order.&lt;/p&gt;

&lt;h3&gt;
  
  
  Refactoring with an options object
&lt;/h3&gt;

&lt;p&gt;A simple way to fix these issues is to refactor the function to use an object for flags/options:&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="nx"&gt;formatTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;is12Hours&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;showSeconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&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;const&lt;/span&gt; &lt;span class="nx"&gt;hours&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;is12Hours&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getHours&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getHours&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;minutes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getMinutes&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;showSeconds&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="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getSeconds&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;2&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="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="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hours&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="nx"&gt;leftPad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;minutes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)}${&lt;/span&gt;&lt;span class="nx"&gt;seconds&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="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;formatTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="na"&gt;is12Hours&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="na"&gt;showSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; 
&lt;span class="p"&gt;});&lt;/span&gt;   &lt;span class="c1"&gt;// 01:23&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach solves the issues that exist with passing flags as separate parameters by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exposing the flag names to the interface.&lt;/li&gt;
&lt;li&gt;Forcing developers to label the flags properly.&lt;/li&gt;
&lt;li&gt;Making the ordering of flags irrelevant.&lt;/li&gt;
&lt;li&gt;Allowing exclusion of flags when we want the default behaviour.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition to making the function more readable we’ve also made it maintainable because it’s now easier to add many flags to our &lt;code&gt;formatTime&lt;/code&gt; function without adding more and more nameless booleans, making the function calls unreadable. We could add flags for &lt;code&gt;showMinutes&lt;/code&gt;, &lt;code&gt;showMilliseconds&lt;/code&gt;, or even an option to specify a custom delimiter to replace the default colon. Whatever flags or options we add, the function will remain relatively readable.&lt;/p&gt;




&lt;h2&gt;
  
  
  One More Thing...
&lt;/h2&gt;

&lt;p&gt;Even though we’ve made the function’s interface easy to use and add to doesn’t mean that all the functionality for those parameters should be aggregated into a single function. Use your best judgement and decide when to delegate functionality to helper functions.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>maintainability</category>
    </item>
    <item>
      <title>React Quick Tip: Use Class Properties and Arrow Functions to Avoid Binding `this` to Methods</title>
      <dc:creator>David Leger</dc:creator>
      <pubDate>Mon, 29 Jan 2018 15:19:11 +0000</pubDate>
      <link>https://dev.to/davejs/react-quick-tip-use-class-properties-and-arrow-functions-to-avoid-binding-this-tomethods-10j0</link>
      <guid>https://dev.to/davejs/react-quick-tip-use-class-properties-and-arrow-functions-to-avoid-binding-this-tomethods-10j0</guid>
      <description>&lt;p&gt;When you want to access &lt;code&gt;this&lt;/code&gt; inside a class methods of your React component, you need to bind it to your method:&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;class&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;clicked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handleClick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handleClick&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;handleClick&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;clicked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;render&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handleClick&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Click&lt;/span&gt; &lt;span class="nx"&gt;Me&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&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;Binding this to &lt;code&gt;handleClick&lt;/code&gt; in the constructor allows us to use this.setState from &lt;code&gt;Component&lt;/code&gt; inside &lt;code&gt;handleClick&lt;/code&gt;. Without this binding, &lt;code&gt;this&lt;/code&gt; is re-scoped for &lt;code&gt;handleClick&lt;/code&gt; and loses context of the component’s &lt;code&gt;setState&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;But this is completely unnecessary, extra code!&lt;/p&gt;

&lt;p&gt;You can clean up this ugliness by using some new ES6+ features. Here is the same component, rewritten using class properties and arrow functions to avoid binding &lt;code&gt;this&lt;/code&gt; to &lt;code&gt;handleClick&lt;/code&gt;:&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;class&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;clicked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="nx"&gt;handleClick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;clicked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;render&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handleClick&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Click&lt;/span&gt; &lt;span class="nx"&gt;Me&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&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;&lt;strong&gt;Note: You must have transform-class-properties enabled in your own Babel config in order to use class properties. If you’re using Create React App, this is already enabled for you.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does This Work?
&lt;/h2&gt;

&lt;p&gt;This works because of two reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Arrow functions, by their nature, do not re-scope &lt;code&gt;this&lt;/code&gt;, so we don’t need to bind &lt;code&gt;this&lt;/code&gt; in the class constructor.&lt;/li&gt;
&lt;li&gt;JavaScript has first-class functions, meaning functions are treated the same as data. So arrow functions can be assigned to variables, or in this case, to class properties.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Bonus Tip
&lt;/h2&gt;

&lt;p&gt;Notice in the second example, I defined state as a class property as well, negating the need for a constructor.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>tips</category>
    </item>
    <item>
      <title>Why Code Reviews are Important</title>
      <dc:creator>David Leger</dc:creator>
      <pubDate>Mon, 01 May 2017 16:09:33 +0000</pubDate>
      <link>https://dev.to/davejs/why-code-reviews-are-important</link>
      <guid>https://dev.to/davejs/why-code-reviews-are-important</guid>
      <description>&lt;p&gt;Ah code reviews... That dreadful, tedious task that interrupts your focus and takes time away from meaningful work. I can’t count how many times my code has sat in PR (pull request, if you’re unfamiliar with git lingo), lonely and waiting for approval by my fellow developers. It’s understandable that people put off code review for the reasons I mentioned above and many more.&lt;/p&gt;

&lt;p&gt;As a junior developer (which I still am), I felt similarly towards code reviews. I didn’t like doing them. I thought, &lt;em&gt;Why am I reviewing code written by senior developers? It’s not like I’m going to catch any of their errors.&lt;/em&gt; However what I didn’t understand at the time was that the code review was more for me than it was for them.&lt;/p&gt;

&lt;p&gt;This became clear to me while I was reviewing a PR from a senior developer one day. While looking through their code I thought to myself, &lt;em&gt;Wow! This code is really well-written — it’s readable, modular, and well structured...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I was learning React and Redux at the time, and if you know React, you’ll know that everything you do seems a bit weird at first. It’s hard to pick up on best practices on your own (at least I thought so), so being able to see how more experienced developers write components is a great way to learn how to write better code.&lt;/p&gt;

&lt;p&gt;Once I was able to see code reviews as a learning opportunity rather than a check on my coworkers’ code, I was able to gain a lot of value from them. I began challenging my own way of writing code with the approaches of my more experienced coworkers and modifying my our approach along the way. I also began asking questions about why something was done a certain way if I didn’t understand it.&lt;br&gt;
This change in mindset around code reviews meant I was able to pick up React and Redux much more quickly than I expected. &lt;/p&gt;

&lt;p&gt;Within just a couple weeks I was fully up to speed, completing similar amounts of work as the rest of my team and it was mostly because of the things I learned while reviewing the PRs of my coworkers.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>learning</category>
      <category>react</category>
      <category>collaboration</category>
    </item>
    <item>
      <title>Hi, I'm David Leger</title>
      <dc:creator>David Leger</dc:creator>
      <pubDate>Sun, 30 Apr 2017 14:37:33 +0000</pubDate>
      <link>https://dev.to/davejs/hi-im-david-leger</link>
      <guid>https://dev.to/davejs/hi-im-david-leger</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.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%2F5iga2e49iic6gxhtesj4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F5iga2e49iic6gxhtesj4.png" alt="Header reading: David Leger - Coder // Designer // Creator" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have been coding for 7 years.&lt;/p&gt;

&lt;p&gt;You can find me on Twitter (and other platforms) as &lt;a href="https://twitter.com/davidleger95" rel="noopener noreferrer"&gt;@davidleger95&lt;/a&gt; or at my website: &lt;a href="http://www.davidleger.me" rel="noopener noreferrer"&gt;www.davidleger.me&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I live in Fredericton, NB, Canada.&lt;/p&gt;

&lt;p&gt;I work for Cvent.&lt;/p&gt;

&lt;p&gt;I mostly program in these languages: JavaScipt.&lt;/p&gt;

&lt;p&gt;I am currently learning more about making the world a better place through creativity and code.&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
