<?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: Dan Fockler</title>
    <description>The latest articles on DEV Community by Dan Fockler (@dfockler).</description>
    <link>https://dev.to/dfockler</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%2F35928%2Fb565d954-1237-4a13-a627-cee8fa844c38.jpeg</url>
      <title>DEV Community: Dan Fockler</title>
      <link>https://dev.to/dfockler</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dfockler"/>
    <language>en</language>
    <item>
      <title>Get your juniors up and running! 🏇🏼</title>
      <dc:creator>Dan Fockler</dc:creator>
      <pubDate>Wed, 06 Nov 2019 18:39:33 +0000</pubDate>
      <link>https://dev.to/dfockler/get-your-juniors-up-and-running-1le3</link>
      <guid>https://dev.to/dfockler/get-your-juniors-up-and-running-1le3</guid>
      <description>&lt;p&gt;In large codebases with new developers it can take a while before people feel comfortable working on projects or tasks by themselves. Getting developers to this stage can take lots of time, but it's worth the effort when many developers can work in parallel. Here are some of the reasons why junior devs may be uncomfortable jumping into the deep end or asking for help soon enough, and ways that you may be able to mitigate these problems and have a more productive happy team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Coder's Block 📖
&lt;/h3&gt;

&lt;p&gt;Similar to writer's block, is coder's block. You know what you need to get done but you can't figure out the right way to get started. This is especially true for junior devs who may not understand the conventions or established patterns of your project very well yet.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to Help
&lt;/h4&gt;

&lt;p&gt;Describe the problem together and write up an outline of all the parts that need to change, even going so far as to pseudo code in functions in the real code and let the junior flesh out the details. Make sure to have a good linter that allows the junior dev to get feedback on style automatically. Encourage them to start with TDD to get a smaller feedback loop to start with.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Too Deep 🚧
&lt;/h3&gt;

&lt;p&gt;This one is similar to Coder's Block, but has a different cause. Sometimes junior devs will take more with a task than they can actually deal with. This can manifest as going days and days with little to no progress made on the task. It causes stress for the whole team because it can seem as if things should be getting done but they aren't, and the junior dev might be afraid to ask for help on the whole item.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to Help
&lt;/h4&gt;

&lt;p&gt;If you can, try and split the task up into smaller sub-pieces and go through the pieces with them to make sure they understand what each of them means and if they have a clear path forward on the task. Regular check-ins on the progress of the item as a team are helpful to ensure that a person isn't stuck and will allow them to describe what help they may need to move forward.&lt;/p&gt;

&lt;h3&gt;
  
  
  Excited puppy syndrome 🐶
&lt;/h3&gt;

&lt;p&gt;High confidence and a lack of experience can cause excited new developers down a some weird paths to solutions that you might not have expected them to go down. Some of these paths will be fine, a few will be great, and others will be... not so great.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to help
&lt;/h4&gt;

&lt;p&gt;Spend time pair programming, and pair code reviewing. It's great to get insight about what the person was thinking, and why they made the choices they did. This will help not only their code, but will also surface ways that you can make the code easier to understand in the future.&lt;/p&gt;

&lt;p&gt;Hopefully with these few tips you can help your new devs be happy and productive quickly.&lt;/p&gt;

</description>
      <category>teams</category>
      <category>productivity</category>
      <category>ownership</category>
      <category>junior</category>
    </item>
    <item>
      <title>Using Custom Properties to ⚡️Supercharge your CSS⚡️</title>
      <dc:creator>Dan Fockler</dc:creator>
      <pubDate>Sun, 03 Mar 2019 01:12:34 +0000</pubDate>
      <link>https://dev.to/dfockler/using-custom-properties-to-supercharge-your-css-1037</link>
      <guid>https://dev.to/dfockler/using-custom-properties-to-supercharge-your-css-1037</guid>
      <description>

&lt;p&gt;If you've been doing web development for a while you've probably heard of SASS. It lets you do cool things like nesting rulesets, and using mixins. What you may not have realized is that plain old CSS now has one of the most obvious features of SASS, ✨VARIABLES✨! In CSS parlance these are called &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/--*"&gt;&lt;em&gt;custom properties&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We know why variables in SASS are useful, but why would they be useful in regular CSS? Let's show some examples.&lt;/p&gt;

&lt;h4&gt;
  
  
  Theming
&lt;/h4&gt;

&lt;p&gt;Imagine you need to show each of your users a custom color on their profile page, (ala Twitter).&lt;/p&gt;

&lt;p&gt;If you use SASS you'll need to generate a custom CSS file for each of your users, &lt;em&gt;YUCK&lt;/em&gt;. 'Oh I'll just use Javascript', you say. That's sustainable if you have a few elements that need to change color, but let's say you have lots of CSS! With custom properties you can do this in a snap.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* user-theme.css */&lt;/span&gt;
&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--custom-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#FF00FF&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* main-theme.css */&lt;/span&gt;
&lt;span class="nc"&gt;.title&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;--custom-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.main-header&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;--custom-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;/* ... lots more css in here */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Custom properties let you generate a tiny CSS file that can easily allow you to dramatically change the style of your page with minimal extra work.&lt;/p&gt;

&lt;h4&gt;
  
  
  Interactive Styling
&lt;/h4&gt;

&lt;p&gt;Another wonderful thing you can do with custom properties, is allowing Javascript to easily modify page styles. Say, adding different color themes or changing text sizes. This becomes trivial using custom properties.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* main.css */&lt;/span&gt;
&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--body-font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&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;--body-font-size&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;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Some HTML input --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;onchange=&lt;/span&gt;&lt;span class="s"&gt;"changeFontSize(value)"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Javascript code&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;changeFontSize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"--body-font-size"&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;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px`&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;h4&gt;
  
  
  Some things you may notice.
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Custom properties must have a variable name that starts with &lt;code&gt;--&lt;/code&gt; per the spec, and to reference them you use the &lt;code&gt;var()&lt;/code&gt; method in your CSS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;:root&lt;/code&gt; element is used in the examples. You can also scope custom properties to a ruleset and they will be scoped based on the cascade, just like other CSS properties.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setting custom properties on the &lt;code&gt;:root&lt;/code&gt; element will let you use the properties in all of your CSS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IE decided to sit this one out and does not support custom properties, but all other browsers, including Edge, do.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Custom properties are a really cool feature for designing dynamic themes and styles using basic CSS and JS. Happy styling! 💇&lt;/p&gt;


</description>
      <category>customproperties</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Programming Intuition</title>
      <dc:creator>Dan Fockler</dc:creator>
      <pubDate>Wed, 09 Jan 2019 21:47:32 +0000</pubDate>
      <link>https://dev.to/dfockler/programming-intuition-3fio</link>
      <guid>https://dev.to/dfockler/programming-intuition-3fio</guid>
      <description>&lt;p&gt;Often when I'm programming I'll have questions or ideas that aren't fully formed logically, but nonetheless help me find bugs or think up code design solutions.&lt;/p&gt;

&lt;p&gt;Does anyone else have these sort of intuitive leaps when programming? How do you cultivate them, and bring them into your work more clearly?&lt;/p&gt;

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