<?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: Nik Wakelin</title>
    <description>The latest articles on DEV Community by Nik Wakelin (@nikz).</description>
    <link>https://dev.to/nikz</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%2F472566%2Fbac9d8ee-55fc-4e56-b672-5738f1c7eaa0.jpeg</url>
      <title>DEV Community: Nik Wakelin</title>
      <link>https://dev.to/nikz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikz"/>
    <language>en</language>
    <item>
      <title>Multiple Output files with cssbundling-rails and Tailwind</title>
      <dc:creator>Nik Wakelin</dc:creator>
      <pubDate>Tue, 14 Dec 2021 22:20:19 +0000</pubDate>
      <link>https://dev.to/nikz/multiple-output-files-with-cssbundling-rails-and-tailwind-3b4k</link>
      <guid>https://dev.to/nikz/multiple-output-files-with-cssbundling-rails-and-tailwind-3b4k</guid>
      <description>&lt;p&gt;The default &lt;code&gt;build:css&lt;/code&gt; for &lt;a href="https://github.com/rails/cssbundling-rails"&gt;cssbundling-rails&lt;/a&gt; using Tailwind will take &lt;code&gt;app/stylesheets/application.tailwind.css&lt;/code&gt; and output it to &lt;code&gt;app/assets/builds/application.css&lt;/code&gt; ready for inclusion using the asset pipeline.&lt;/p&gt;

&lt;p&gt;However, often you’ll want multiple entry points or output files - say, one for your application and one for your public site that’s a bit smaller. &lt;/p&gt;

&lt;p&gt;You could change the command in &lt;code&gt;package.json&lt;/code&gt; to use &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; and join two calls to the Tailwind CLI, but this approach has a couple of issues - &lt;code&gt;cssbundling-rails&lt;/code&gt; is expecting to be able to append &lt;code&gt;--watch&lt;/code&gt; to commands that are run in development so that rebuilds happen as you change files, AND use the command to prep your css once before running a deploy or integration test. &lt;/p&gt;

&lt;p&gt;Enter &lt;a href="https://www.npmjs.com/package/npm-run-all"&gt;npm-run-all&lt;/a&gt;, which will let you run commands with a glob-style syntax, in parallel, and passing through arguments. Just change the "scripts" section of your &lt;code&gt;package.json&lt;/code&gt; to include tasks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build:css"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm-run-all --parallel &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;build:css:* {@}&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; --"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build:css:application"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build:css:static"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tailwindcss -i ./app/assets/stylesheets/static-pages.tailwind.css -o ./app/assets/builds/static-pages.css"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now when you run &lt;code&gt;yarn build:css&lt;/code&gt; you’ll end up with two output files in your build (in this case, "application.css" and "static-pages.css") and when you want to run it in watch mode, &lt;code&gt;yarn build:css --watch&lt;/code&gt; will pass that argument down to each individual build and run them in parallel.&lt;/p&gt;

&lt;p&gt;It’s the &lt;code&gt;build:css&lt;/code&gt; command that's doing the magic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"npm-run-all --parallel \"build:css:* {@}\" --"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Essentially this is saying "run anything matching &lt;code&gt;build:css:*&lt;/code&gt;, in parallel, and passing all arguments through from the original invocation" (that's the &lt;code&gt;{@}&lt;/code&gt; syntax from &lt;code&gt;npm-run-all&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>css</category>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>You should be keeping a list of everything you’ve shipped</title>
      <dc:creator>Nik Wakelin</dc:creator>
      <pubDate>Mon, 19 Apr 2021 22:51:06 +0000</pubDate>
      <link>https://dev.to/finished/you-should-be-keeping-a-list-of-everything-you-ve-shipped-499e</link>
      <guid>https://dev.to/finished/you-should-be-keeping-a-list-of-everything-you-ve-shipped-499e</guid>
      <description>&lt;p&gt;Here’s a &lt;a href="https://www.amazon.com/Tiny-Habits-Changes-Change-Everything-ebook/dp/B07LC9KDP5"&gt;tiny habit&lt;/a&gt; that will take you less than a minute every week but could change your life (yes, maybe even more than finally starting to meditate!)&lt;/p&gt;

&lt;p&gt;On Friday, at 4.30pm, write down &lt;strong&gt;everything you shipped that week&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As this ✨ magic list ✨ grows, it’ll become one of your &lt;strong&gt;strongest career tools.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Remember what you did last summer
&lt;/h2&gt;

&lt;p&gt;The dreaded “&lt;em&gt;self review&lt;/em&gt;”. Easily the worst part of any performance review cycle. Do you go full used-car-sales and breathlessly extol your virtues, or go middle-of-the-road and risk missing out on that promotion you’ve earned?&lt;/p&gt;

&lt;p&gt;Here’s where your magic “Done” list is crucial. You can rely on it for a dispassionate record of the impact you’ve delivered, combat your &lt;a href="https://en.wikipedia.org/wiki/Recency_bias"&gt;recency bias&lt;/a&gt; (was it last quarter I launched that new service or this one?), and cross-reference with the &lt;a href="https://levels.fyi"&gt;progression framework&lt;/a&gt; for your next level to show off how well you’re nailing it - all backed up by some cold, hard facts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/dZongPVfufls5DcmXr/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/dZongPVfufls5DcmXr/giphy.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Share the love
&lt;/h2&gt;

&lt;p&gt;Kudos is infinitely concentrated - that is, it doesn’t matter how often you share it, it never gets diluted. It pays to share widely, and guess what, your list can help! All it takes is a quick note every time you get an assist - perhaps Sally mentioned an article on JSONB performance, or Jimmy threw together a really detailed PR review. &lt;/p&gt;

&lt;p&gt;This also works no matter what stage of your career you’re at. If you’re early on, acknowledging the help you receive is a great way to get more in the future. &lt;/p&gt;

&lt;p&gt;Conversely, as a senior or staff engineer, you’re expected to have an &lt;a href="https://www.esports.net/wiki/guides/aoe-meaning/"&gt;area of effect&lt;/a&gt;, levelling up everyone around you. When you keep tabs of where you assisted and where you got assistance, you start to lead the team in that behaviour, and show that help is useful no matter how many years you’ve been doing this!&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do you want to grow today?
&lt;/h2&gt;

&lt;p&gt;There’s nothing more satisfying than a completely crossed-off To-Do list…. except perhaps a months- or years- long record of doing that!&lt;/p&gt;

&lt;p&gt;But there’s benefit over and above basking in the glow of tasks well completed, and that’s getting a birds-eye view of your career and the opportunity to map out where you’re going (which, incidentally is why you keep getting asked to do that dang self-review - it’s explicit permission to do a little navel-gazing!)&lt;/p&gt;

&lt;p&gt;Take a good look at where you had impact. Which code flowed from your fingers like you had extenda-robot-coding-hands?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/fsoCk5kgOcYMM/giphy-downsized-large.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/fsoCk5kgOcYMM/giphy-downsized-large.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which code… took a little longer? &lt;/p&gt;

&lt;p&gt;Perhaps you’ve been meaning to learn React, or wanting to dive deep into some tricky networking issues… your 10,000 foot view will only serve to highlight the paths you can take. &lt;/p&gt;

&lt;p&gt;Alright, I’m convinced - how do I make my Finished List great? &lt;/p&gt;

&lt;p&gt;It’s one thing to make the list, it’s a whole other thing to make a valuable list. For instance, you’ve got all your Github commits right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/samantha_gold/status/1005087589894893569"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vdh3BwBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l81cb1an1y406tzlv4b5.jpeg" alt="Github Commit Pac-Man art"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s the problem: not only do they not capture everything you did (did you write a design document? Paired with someone on their laptop?) they also don’t tell a very good story because your commits are about &lt;strong&gt;what&lt;/strong&gt; you did, not &lt;strong&gt;why&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Focus on the value you delivered - less “Removed n+1 query on checkout page” more “Made checkout 25% faster (P99 &amp;lt; 1s)”. &lt;/p&gt;

&lt;p&gt;If you have it, you can even add proof for that extra cherry (or come by later once the experiments are done) : “This led to a 3bp increase in sales”.&lt;/p&gt;

&lt;p&gt;You can also add emphasis with images or videos demonstrating your change in action (&lt;a href="https://getkap.co"&gt;Kap&lt;/a&gt; or &lt;a href="https://cleanshot.com"&gt;Cleanshot X&lt;/a&gt; for macOS are useful tools for this). If a picture is 1,000 words then a video is 30,000 words per second, right!? &lt;/p&gt;

&lt;p&gt;Highlighting your changes with illustrations can make your notes much more digestible for folks in other teams who might not be as familiar with your areas - and it’s much more generally readable for people outside the Product/Tech sphere. Always a good idea to involve those people since often they’ll be the ones on the sharp end of a change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set your reminder now!
&lt;/h2&gt;

&lt;p&gt;Remember, this is most effective when you do it regularly - so set a reminder for Friday afternoon to write it all down and close out your week. And send me a note in a few months (I’m &lt;a href="https://twitter.com/nikz"&gt;@nikz on Twitter&lt;/a&gt;) - it’ll be great to see what you’ve done!&lt;/p&gt;

&lt;p&gt;(PS: We’re working on a tool to make tracking and sharing  easier  - it’s called &lt;a href="https://whatsfinished.com/?ref=dev"&gt;Finished&lt;/a&gt;, and you &lt;a href="https://whatsfinished.com/?ref=dev"&gt;should sign up so we can let you know when it’s ready&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>showdev</category>
      <category>career</category>
    </item>
  </channel>
</rss>
