<?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: Timothy Miller</title>
    <description>The latest articles on DEV Community by Timothy Miller (@webinspectinc).</description>
    <link>https://dev.to/webinspectinc</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%2F301333%2Ffe9bcbf6-58b4-4195-803c-3ff47add98a5.jpeg</url>
      <title>DEV Community: Timothy Miller</title>
      <link>https://dev.to/webinspectinc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/webinspectinc"/>
    <language>en</language>
    <item>
      <title>My Favorite Thing about Obsidian</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 12 Aug 2022 00:00:00 +0000</pubDate>
      <link>https://dev.to/webinspectinc/my-favorite-thing-about-obsidian-2foi</link>
      <guid>https://dev.to/webinspectinc/my-favorite-thing-about-obsidian-2foi</guid>
      <description>&lt;p&gt;The last year I’ve been obsessed with a new tool called &lt;a href="https://obsidian.md/" rel="noopener noreferrer"&gt;Obsidian&lt;/a&gt;. I’ve spent countless hours with it, gleefully creating and refining. It has revolutionized every aspect of how I work and live, and I want to talk about why.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Obsidian?
&lt;/h2&gt;

&lt;p&gt;Obsidian is ostensibly a note taking app. But it’s &lt;em&gt;so much more&lt;/em&gt; than a note taking app.&lt;/p&gt;

&lt;p&gt;It’s the best note taking app I’ve ever used, and it has gradually taken over many different aspects of my work. In fact, it has really become an entire &lt;em&gt;operating system&lt;/em&gt; for my life.&lt;/p&gt;

&lt;h2&gt;
  
  
  Obsidian has become my personal operating system
&lt;/h2&gt;

&lt;p&gt;Obsidian has become:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My personal assistant&lt;/li&gt;
&lt;li&gt;My project manager&lt;/li&gt;
&lt;li&gt;My writing and brainstorming tool&lt;/li&gt;
&lt;li&gt;My friendship tracker&lt;/li&gt;
&lt;li&gt;My system for remembering important dates and events&lt;/li&gt;
&lt;li&gt;My second brain&lt;/li&gt;
&lt;li&gt;My guard dog, keeping safe all my most important dreams, goals, and ideas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Much of this has been revolutionary and life-changing. But most importantly, Obsidian has saved me from the nightmare that is &lt;em&gt;information overload&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Information Overload
&lt;/h2&gt;

&lt;p&gt;We all consume too much information in the 21st century. The internet is a wonderful tool, but it has evolved to encourage &lt;em&gt;gross consumption&lt;/em&gt;, and it’s making us all mentally obese.&lt;/p&gt;

&lt;p&gt;Information gluttony can be just as harmful to your health as overeating, and it has similar side effects: when you consume too much, you cease to enjoy it. It becomes &lt;em&gt;something you do&lt;/em&gt; rather than &lt;em&gt;something you enjoy&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Even the most entertaining YouTube channel ceases to entertain when you overdo it.&lt;/p&gt;

&lt;p&gt;And I’m guilty of it. The act of creation is &lt;em&gt;far&lt;/em&gt; more difficult than consumption. It’s so much easier to sit and watch a video than it is to create one. But satisfaction and fulfillment ultimately rests in &lt;em&gt;creation&lt;/em&gt;, not in consumption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing improves memory
&lt;/h2&gt;

&lt;p&gt;When you consume too much, you also start to forget things. You become a college student again, cramming too much information into your head, and forgetting it all after the test.&lt;/p&gt;

&lt;p&gt;I recently wrote about &lt;a href="https://timothymiller.dev/posts/2022/stop-using-the-padding-hack/" rel="noopener noreferrer"&gt;a new-ish CSS technique&lt;/a&gt; that I haven’t been using as often as I should. I wrote that article &lt;em&gt;specifically&lt;/em&gt; to try to change my own behavior, because I know myself: when I run into a problem that I solved years ago, I tend not to think about it. I use the old solution, rather than looking to see if there’s a better way to do it now.&lt;/p&gt;

&lt;p&gt;But now that I’ve written about it, I don’t think I’ll forget it. Next time I search my brain for the solution to that problem, I hope that I’ll remember the &lt;em&gt;new&lt;/em&gt; solution, rather than the old one.&lt;/p&gt;

&lt;p&gt;This is the magic of writing. When you write about something, you’re forced to really &lt;em&gt;think&lt;/em&gt; about it, and that helps you to remember it. Writing makes you a better problem solver and sharpens your memory.&lt;/p&gt;

&lt;p&gt;And you don’t need a blog to write. You can write for yourself, which not only improves your memory, it has a &lt;a href="https://timothymiller.dev/posts/2022/keeping-up-a-writing-habit/#writing-for-yourself" rel="noopener noreferrer"&gt;host of other benefits&lt;/a&gt;. I personally do both: I start my writing projects in Obsidian, and if they seem useful for other people, I publish them elsewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Association improves memory
&lt;/h2&gt;

&lt;p&gt;But writing isn’t enough. Our brains work by association, and whatever you write about has to be &lt;em&gt;connected&lt;/em&gt; to another idea in order to remember it.&lt;/p&gt;

&lt;p&gt;Obsidian &lt;em&gt;also&lt;/em&gt; works by association, and that’s one of its most powerful features. You can connect any note to any other note by using [[wiki-style links]]. This feature alone is &lt;em&gt;incredibly&lt;/em&gt; powerful.&lt;/p&gt;

&lt;p&gt;Coupling related ideas helps you to create a &lt;em&gt;cognitive scaffolding&lt;/em&gt; that &lt;em&gt;reinforces&lt;/em&gt; your own hardwired memories. This is why people often refer to these types of tools as a “second brain”, because they truly are attempting to create a structure &lt;em&gt;similar&lt;/em&gt; to your own hardwired brain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is Obsidian a second brain?
&lt;/h2&gt;

&lt;p&gt;Honestly I was skeptical of this claim when I first heard it. How could any tool come close to matching our own incredibly powerful (if a bit lazy) brains?&lt;/p&gt;

&lt;p&gt;But now I see what they mean. Obsidian has become an &lt;em&gt;extension&lt;/em&gt; of my brain. Not only does it safeguard important ideas that I want to keep, but it helps to &lt;em&gt;clarify&lt;/em&gt; and &lt;em&gt;strengthen&lt;/em&gt; my own thoughts, memories, and associations.&lt;/p&gt;

&lt;p&gt;Writing alone can do this, but the &lt;em&gt;associations&lt;/em&gt; between thoughts takes it to the next level. I clarify my thoughts through writing, and then I &lt;em&gt;remember&lt;/em&gt; them by connecting them to my web of existing ideas. Then if I &lt;em&gt;do&lt;/em&gt; forget something down the road, I can always find that idea again by looking through my web of related ideas.&lt;/p&gt;

&lt;p&gt;Obsidian also has a &lt;em&gt;visualizer&lt;/em&gt; that shows you a representation of your current web of ideas. Here’s what mine currently looks like:&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%2Ftimothymiller.dev%2Fimg%2F2022%2F2022-08-12_10-41.png" 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%2Ftimothymiller.dev%2Fimg%2F2022%2F2022-08-12_10-41.png" alt="My graph view in Obsidian."&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;My personal graph view in Obsidian. It can be chaotic, but surprisingly useful.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Obsidian
&lt;/h2&gt;

&lt;p&gt;If any of this sounds interesting or valuable to you, then you can try it yourself! It's free for personal use. &lt;a href="https://obsidian.md/" rel="noopener noreferrer"&gt;Download it here&lt;/a&gt;, and start by creating a home note. There are &lt;a href="https://obsidian.rocks/home-notes-in-obsidian-with-examples/" rel="noopener noreferrer"&gt;many different styles of home notes&lt;/a&gt;, but you can start with a simple list of linked notes.&lt;/p&gt;

&lt;p&gt;Nick Milo has an &lt;a href="https://www.youtube.com/watch?v=QgbLb6QCK88" rel="noopener noreferrer"&gt;excellent beginner’s tutorial here&lt;/a&gt;, which I recommend watching. He walks you through the interface and how to get your first vault set up.&lt;/p&gt;

&lt;p&gt;Additionally, I’ll be sharing more details about how I’ve created my own “Life Operating System” over at &lt;a href="https://obsidian.rocks/" rel="noopener noreferrer"&gt;Obsidian Rocks&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>obsidian</category>
      <category>pkm</category>
      <category>secondbrain</category>
    </item>
    <item>
      <title>Stop Using the Padding Hack (for videos)</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 05 Aug 2022 00:00:00 +0000</pubDate>
      <link>https://dev.to/webinspectinc/stop-using-the-padding-hack-1b9i</link>
      <guid>https://dev.to/webinspectinc/stop-using-the-padding-hack-1b9i</guid>
      <description>&lt;p&gt;This is a PSA for myself more than anyone. CSS has come a &lt;em&gt;long&lt;/em&gt; way since I started using it.&lt;/p&gt;

&lt;p&gt;Most of the “hacks” we used in CSS back in 2010 have been replaced with better alternatives. Off the top of my head, here are a few paradigm shifts we’ve made in the last decade:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;We used to use…&lt;/th&gt;
&lt;th&gt;Now we use…&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Floats, absolute positioning, and tables&lt;/td&gt;
&lt;td&gt;Flexbox and CSS grids&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PHP and Sass variables&lt;/td&gt;
&lt;td&gt;CSS custom properties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JS animation libraries&lt;/td&gt;
&lt;td&gt;CSS animations and transitions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Magical numbers for padding&lt;/td&gt;
&lt;td&gt;&lt;code&gt;box-sizing: border-box&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flexible font sizing with JS&lt;/td&gt;
&lt;td&gt;Viewport units&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Today is a great day to be a CSS developer. I used to spend hours (sometimes &lt;em&gt;days&lt;/em&gt;) wrestling with layouts in CSS, but no longer. Most of my layout problems in CSS are resolved with no more than five lines of CSS, and it’s a beautiful thing.&lt;/p&gt;

&lt;p&gt;Centering something in CSS? &lt;a href="https://i.imgur.com/dQEKnZI.jpg"&gt;No longer a meme&lt;/a&gt;. Using Flexbox, centering things is effortless.&lt;/p&gt;

&lt;p&gt;It’s not easy to learn new things constantly and re-learn your profession every year or two, but in the case of CSS, it’s worth it. Nearly everything is easier and faster today than it was five years ago. &lt;sup&gt;&lt;a href="https://timothymiller.dev/posts/2022/stop-using-the-padding-hack/#fn1" id="fnref1"&gt;[1]&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;But there’s a few new CSS features that I &lt;em&gt;haven’t&lt;/em&gt; managed to integrate into my head yet. One of the most obviously beneficial is &lt;em&gt;aspect ratio&lt;/em&gt;. For many years now we’ve used a &lt;em&gt;padding hack&lt;/em&gt; to simulate aspect ratio. This is often used for embedded videos, such as YouTube videos, and it looks like this:&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;.video-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;56.25%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.video-container&lt;/span&gt; &lt;span class="nt"&gt;iframe&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&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 technique was &lt;a href="https://alistapart.com/article/creating-intrinsic-ratios-for-video/"&gt;pioneered in ALA&lt;/a&gt; back in &lt;em&gt;2009&lt;/em&gt;. It’s a good trick, and even today if you search for “responsive videos css” the top results are all this same trick.&lt;/p&gt;

&lt;p&gt;But it’s no longer necessary! The padding hack above simulates a &lt;em&gt;16 / 9&lt;/em&gt; aspect ratio. We use that because that’s what most YouTube videos use. Rather than using the semi-magical &lt;em&gt;56.25%&lt;/em&gt; padding hack, these days you can spell out the exact aspect ratio that you want:&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;.video&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;aspect-ratio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&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 &lt;a href="https://caniuse.com/mdn-css_properties_aspect-ratio"&gt;supported everywhere&lt;/a&gt; (except IE, of course).&lt;/p&gt;

&lt;p&gt;Gosh it's lovely to reduce an 11 line hack down to two easy-to-remember lines. &lt;sup&gt;&lt;a href="https://timothymiller.dev/posts/2022/stop-using-the-padding-hack/#fn2" id="fnref2"&gt;[2]&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;I have undoubtedly searched “responsive videos css” &lt;em&gt;hundreds&lt;/em&gt; of times, because the padding hack was dense, hard to remember, and hard to write. It was always easier to copy/paste from the CSS Tricks article. But no more!&lt;/p&gt;

&lt;p&gt;CSS continues to get better and better over time, and I’m always so happy to leave clunky (albeit brilliant) hacks like the above in the historical dustbin.&lt;/p&gt;




&lt;ol&gt;
&lt;li id="fn1"&gt;
&lt;p&gt;I’m not sold on &lt;a href="https://css-tricks.com/css-logical-properties-and-values/"&gt;Logical Properties&lt;/a&gt; though. In contrast to everything else on this list, Logical Properties are denser, harder to understand, and seem to serve little purpose in most situations. But I digress. &lt;a href="https://timothymiller.dev/posts/2022/stop-using-the-padding-hack/#fnref1"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn2"&gt;
&lt;p&gt;No container element required, either. &lt;a href="https://timothymiller.dev/posts/2022/stop-using-the-padding-hack/#fnref2"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>css</category>
      <category>css4</category>
    </item>
    <item>
      <title>I’m done with LocalWP</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Tue, 28 Jun 2022 00:00:00 +0000</pubDate>
      <link>https://dev.to/webinspectinc/im-done-with-localwp-20lk</link>
      <guid>https://dev.to/webinspectinc/im-done-with-localwp-20lk</guid>
      <description>&lt;p&gt;I hate to say it, but I am abandoning &lt;a href="https://localwp.com/"&gt;Local WP&lt;/a&gt; (formerly by Flywheel). I used it the last couple of years, but I can’t do it anymore. I’m done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;One big reason: databases. It is a &lt;em&gt;huge&lt;/em&gt; pain in the neck importing databases into Local. I don’t have to do it very often, but every time I do it drives me nuts. Database imports have required nasty hacks for &lt;a href="https://cameronjonesweb.com.au/blog/how-to-restore-the-database-of-a-site-on-local-by-flywheel/"&gt;at least four years&lt;/a&gt;, so I don’t expect it to be fixed anytime soon.&lt;/p&gt;

&lt;p&gt;It also seems like the focus of the app has changed. It &lt;em&gt;used&lt;/em&gt; to be a great tool for developing WordPress sites locally, now it seems more like a great &lt;em&gt;integration&lt;/em&gt; for its parent company, WPEngine. I love WPEngine as a platform, but many of my clients use other WordPress hosts, and Local simply isn’t the best option for sites that &lt;em&gt;aren’t&lt;/em&gt; using WPEngine. Even for WPEngine sites, the connector utility is sketchy at best. It’s great when it works, awful when it doesn’t.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do you use instead?
&lt;/h2&gt;

&lt;p&gt;I’m back to my old &lt;a href="https://docs.docker.com/compose/"&gt;Docker Compose&lt;/a&gt; setup, which I made &lt;a href="https://www.youtube.com/watch?v=ksD-w9dtBTE"&gt;a video about several years ago&lt;/a&gt;. I have a boilerplate docker-compose template that I use in every WordPress site, and this allows me to create and destroy my local servers with very simple commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# firing up the server&lt;/span&gt;
docker-compose up

&lt;span class="c"&gt;# shutting down the server&lt;/span&gt;
docker-compose stop

&lt;span class="c"&gt;# destroying the server&lt;/span&gt;
docker-compose &lt;span class="nb"&gt;rm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case you’re curious, here’s what my typical docker compose file looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;2'&lt;/span&gt;

&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
   &lt;span class="na"&gt;mysql&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mysql:5.6&lt;/span&gt;
     &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# this line automatically imports .sql files&lt;/span&gt;
  &lt;span class="c1"&gt;# all I do is drop them into a /db folder&lt;/span&gt;
  &lt;span class="c1"&gt;# and Docker does the rest!&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./db:/docker-entrypoint-initdb.d&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./db/conf:/etc/mysql/conf.d&lt;/span&gt;
     &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always&lt;/span&gt;
     &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3306:3306"&lt;/span&gt;
     &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wordpress&lt;/span&gt;
       &lt;span class="na"&gt;MYSQL_DATABASE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wordpress&lt;/span&gt;
       &lt;span class="na"&gt;MYSQL_USER&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wordpress&lt;/span&gt;
       &lt;span class="na"&gt;MYSQL_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wordpress&lt;/span&gt;

   &lt;span class="c1"&gt;# I usually leave PHP MyAdmin disabled unless I need it&lt;/span&gt;
   &lt;span class="c1"&gt;# myadmin:&lt;/span&gt;
   &lt;span class="c1"&gt;#    image: phpmyadmin/phpmyadmin&lt;/span&gt;
   &lt;span class="c1"&gt;#    ports:&lt;/span&gt;
   &lt;span class="c1"&gt;#       - "8888:80"&lt;/span&gt;
   &lt;span class="c1"&gt;#    depends_on:&lt;/span&gt;
   &lt;span class="c1"&gt;#       - mysql&lt;/span&gt;
   &lt;span class="c1"&gt;#    restart: always&lt;/span&gt;
   &lt;span class="c1"&gt;#    links:&lt;/span&gt;
   &lt;span class="c1"&gt;#       - mysql:db&lt;/span&gt;
   &lt;span class="c1"&gt;#    environment:&lt;/span&gt;
   &lt;span class="c1"&gt;#       MYSQL_USERNAME: wordpress&lt;/span&gt;
   &lt;span class="c1"&gt;#       MYSQL_PASSWORD: wordpress&lt;/span&gt;
   &lt;span class="c1"&gt;#       MYSQL_ROOT_PASSWORD: wordpress&lt;/span&gt;

   &lt;span class="na"&gt;wordpress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mysql&lt;/span&gt;
     &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wordpress:php7.3&lt;/span&gt;
     &lt;span class="na"&gt;links&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mysql:mysql&lt;/span&gt;
     &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./:/var/www/html&lt;/span&gt;
     &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="c1"&gt;# I use a unique port number for each client&lt;/span&gt;
     &lt;span class="c1"&gt;# (you only change the first number, "8000")&lt;/span&gt;
       &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;8000:80&lt;/span&gt;
     &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always&lt;/span&gt;
     &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;WORDPRESS_DB_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wordpress&lt;/span&gt;


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

&lt;/div&gt;



&lt;p&gt;As long as you have Docker installed and running, you can place this file inside your root directory (name it &lt;code&gt;docker-compose.yml&lt;/code&gt;), run &lt;code&gt;docker-compose up&lt;/code&gt; and Docker will do the rest. It will automatically spin up a new server and database, and import any SQL files that it finds in the /db folder. It works like magic, no more frustrations with Local.&lt;/p&gt;

&lt;h2&gt;
  
  
  If Docker is so great, why did I stop using Docker?
&lt;/h2&gt;

&lt;p&gt;Partially because Local was new and shiny, and everyone else was using it. It’s a pretty app, and I like to use pretty apps.&lt;/p&gt;

&lt;p&gt;I also tried it because Docker &lt;em&gt;can&lt;/em&gt; be slow on Macs. Locals wasn’t really much better—they probably use similar tech behind the hood—but I hoped Locals would be better on Macs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://timothymiller.dev/posts/2022/big-updates-to-my-uses-page/"&gt;Now I use a Linux computer full time&lt;/a&gt;, and Docker works like a dream on Linux, so there’s really no downside to switching back to Docker.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Six HTML5 Elements I Should Use More</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 17 Apr 2020 09:49:38 +0000</pubDate>
      <link>https://dev.to/webinspectinc/six-html5-elements-i-should-use-more-2f92</link>
      <guid>https://dev.to/webinspectinc/six-html5-elements-i-should-use-more-2f92</guid>
      <description>&lt;p&gt;HTML5 is a large language, but not a &lt;em&gt;massive&lt;/em&gt; language. I’m not sure if the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element"&gt;MDN HTML elements reference&lt;/a&gt; is comprehensive or not, but if so it looks like there are about 100 valid HTML tags. It’s entirely possible to learn and use all of the valid elements in HTML5, but few of us do.&lt;/p&gt;

&lt;p&gt;Most of these elements are useful on most sites, but if you're like me, you might just forget that they exist. Here are a few elements that I often forget, and strive to use more often.&lt;/p&gt;

&lt;h2&gt;
  
  
  &amp;lt;address&amp;gt; #
&lt;/h2&gt;

&lt;p&gt;My personal rule: almost every website should have an &lt;code&gt;&amp;lt;address&amp;gt;&lt;/code&gt; element. The &lt;code&gt;&amp;lt;address&amp;gt;&lt;/code&gt; element provides contact information, and many of the limitations it used to have no longer apply in HTML5. You can use it for &lt;em&gt;any&lt;/em&gt; contact info, in any context.&lt;/p&gt;

&lt;p&gt;Most of the time I would use this in the footer of the page, where companies usually put their contact info. You can add a physical address, an email address, a phone number, anything that would allow someone to get in touch with the website owner.&lt;/p&gt;

&lt;p&gt;You could also use this at the bottom of articles, to show people how to get in touch with the article author. Contact information is vitally important to have on your site, and &lt;code&gt;&amp;lt;address&amp;gt;&lt;/code&gt; gives you a semantic way to mark it as such.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Accessibility tip:&lt;/em&gt; headers aren't allowed in address elements, so keep that in mind when you're working with these.&lt;/p&gt;

&lt;h2&gt;
  
  
  &amp;lt;details&amp;gt; #
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; elements are &lt;em&gt;neat&lt;/em&gt;. They have so much potential, and yet I rarely see them used on the web.&lt;/p&gt;

&lt;h1&gt;
  
  
  Here's what a details element looks like (click for more) Neat, huh?
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; gives you a bit of interactivity for free. It allows you to hide content behind a single click.&lt;/p&gt;

&lt;p&gt;There are some limitations on what you're able to do styling-wise with these. There are several transitions that you aren't able to animate, such as the open/close animation, which annoys me a bit. But in a pinch, &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; elements work incredibly well and take &lt;em&gt;way&lt;/em&gt; less effort than any of the alternatives. If you're looking for this kind of open/close functionality, you could do a lot worse than a &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; element.&lt;/p&gt;

&lt;h2&gt;
  
  
  &amp;lt;map&amp;gt; #
&lt;/h2&gt;

&lt;p&gt;Gosh I haven’t used a &lt;code&gt;&amp;lt;map&amp;gt;&lt;/code&gt; element in &lt;em&gt;years&lt;/em&gt;. This is another element that adds interactivity to HTML &lt;em&gt;without requiring JavaScript&lt;/em&gt;, which automatically makes it a powerful tool.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;map&amp;gt;&lt;/code&gt; element allows you to add special click targets to images, in any shape you want. So rather than having one link per image, you can have any number of links in any shape you want. For example, you could have a &lt;a href="https://codepen.io/PositionRelativ/full/GmJOGo"&gt;triangle with oddly shaped bricks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The details are a little too complex to go over here, but if you want to try it out, check out the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map"&gt;MDN article&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &amp;lt;dialog&amp;gt; #
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element, also known as a pop-up. Ah, how I love and hate thee so.&lt;/p&gt;

&lt;p&gt;The dialog element is a native way to do pop-ups. If you're like me you've probably built more than a few pop-ups in your day, and you would like a way to do it more easily. &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; is that way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But wait!&lt;/strong&gt; The &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element has &lt;a href="https://caniuse.com/#feat=dialog"&gt;poor browser support&lt;/a&gt; right now. Safari doesn't support it at all, and Firefox only supports it if you turn it on.&lt;/p&gt;

&lt;p&gt;So there’s a good reason not to use the &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element for now. But someday soon, hopefully!&lt;/p&gt;

&lt;h2&gt;
  
  
  &amp;lt;abbr&amp;gt; #
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;abbr&amp;gt;&lt;/code&gt; element is a &lt;em&gt;great&lt;/em&gt; way to make sure your writing is accessible for all. There are a lot of abbreviations in our industry, and trust me, you do &lt;em&gt;not&lt;/em&gt; want people checking Urban Dictionary to figure out what your abbreviation means. Far better to use an &lt;code&gt;&amp;lt;abbr&amp;gt;&lt;/code&gt; element and explicitly tell them.&lt;/p&gt;

&lt;p&gt;I often forget to do this, but it's such great way to keep our content beginner-friendly. Even abbreviations that are easy to find, such as HTML and CSS can benefit from an &lt;code&gt;&amp;lt;abbr&amp;gt;&lt;/code&gt; tag. Just don’t forget to use the "title" attribute on these, that syntax always throws me off:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;abbr title="Hypertext Markup Language"&amp;gt;HTML&amp;lt;/abbr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  &amp;lt;template&amp;gt; #
&lt;/h2&gt;

&lt;p&gt;To be honest, TIL about the &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; element. When building things with JavaScript I pretty often need a small bit of reusable HTML, and that is what the &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; tag is for. This is how I used to do that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script type="html/template"&amp;gt;An old trick that is no longer necessary&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;But using an actual &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; tag is better. More details on its usage over at &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template"&gt;MDN&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One thing to keep in mind: this tag is &lt;em&gt;not&lt;/em&gt; supported in IE, so you'll probably want to hide the element with CSS to prevent it from showing up in those browsers.&lt;/p&gt;

&lt;p&gt;Also, from an accessibility standpoint, you might want an &lt;code&gt;aria-hidden&lt;/code&gt; on there. I would think screen readers would automatically skip template content, but I haven’t tested that, and better safe than sorry.&lt;/p&gt;

</description>
      <category>html</category>
    </item>
    <item>
      <title>Switching to an Ergonomic Colmak Keyboard</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 14 Feb 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/webinspectinc/switching-to-an-ergonomic-colmak-keyboard-3j92</link>
      <guid>https://dev.to/webinspectinc/switching-to-an-ergonomic-colmak-keyboard-3j92</guid>
      <description>&lt;p&gt;I have been programming for over a decade. I have worked with many people who used all sorts of keyboards, from the nerdiest to the normal-est. Never did I think I would become a keyboard nerd. It just isn't something that ever really interested me. I mean it’s just a keyboard, right?&lt;/p&gt;

&lt;p&gt;But then I began to struggle with wrist pain. I’ve probably averaged 6+ hours typing every day for over a decade now, and it turns out that all of that typing has taken its toll.&lt;/p&gt;

&lt;p&gt;I documented much of the history of my wrist pain in a previous post, &lt;a href="https://timothymiller.dev/posts/my-rsi-journey/"&gt;which you can read here&lt;/a&gt;. Now that I’ve been typing both on a mechanical &lt;em&gt;and&lt;/em&gt; Colemak keyboard for a few months now, I am prepared to answer a few of the questions &lt;em&gt;I&lt;/em&gt; had back when I was thinking of making this switch. If you are considering switching keyboard layouts or switching to a more ergonomic keyboard, perhaps some of your questions will be answered here.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an alternate keyboard layout? #
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Qwerty&lt;/em&gt; is the standard keyboard layout that most U.S. computers come with. It’s called Qwerty because the top row of keys spells out "qwertyuiop", and Qwerty is easier to say than that.&lt;/p&gt;

&lt;p&gt;Qwerty was originally designed for typewriters. Typewriters were mechanical machines that occasionally got jammed if you typed letters that were too close together, so the inventors came up with a clever solution: place the most commonly used keys as far apart as usual.&lt;/p&gt;

&lt;p&gt;This was a good design for a typewriter, but a poor one for computers. Qwerty wasn't designed for the work we do today, and many alternate layouts have been devised by clever people. One of the best known is called Dvorak. The one I chose to learn is called Colemak.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why learn Colemak? #
&lt;/h2&gt;

&lt;p&gt;As mentioned above, I have been struggling with wrist pain for a few years now. Part of that is just the sheer number of words I type each week.&lt;/p&gt;

&lt;p&gt;Dvorak was invented in order to help people type more efficiently. It was designed to divide the stain of typing between both hands equally, and to avoid stretching where possible. It is simply more efficient for your hands, and helps you work less.&lt;/p&gt;

&lt;p&gt;Colemak was created for the same reasons, to reduce strain and give people a more comfortable typing experience for the modern age. But it was also designed to be as similar to Qwerty as possible, so it’s easier for long-time Qwerty users (like me) to learn. It’s still far more efficient than Qwerty, and possibly more efficient than Dvorak (although they're very similar), but easier to learn. Also, the most commonly used keyboard shortcuts stay the same, which is a big win for a keyboard shortcut junkie like me. All of this is why I decided to go with Colemak.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can you still type Qwerty after switching to another layout? #
&lt;/h2&gt;

&lt;p&gt;The short answer is: yes! The longer answer:&lt;/p&gt;

&lt;p&gt;It has now been just over two months since I switched to typing a Colemak keyboard layout. To be honest, at the moment I’m not as proficient with &lt;em&gt;either&lt;/em&gt; keyboard layout as I &lt;em&gt;was&lt;/em&gt; with Qwerty. I used to type about 90-110 WPM, now I can type about 60 WPM with either Qwerty or Colemak.&lt;/p&gt;

&lt;p&gt;It’s a very strange experience, learning a new keyboard layout after typing your whole life on Qwerty. At first your brain will rebel, and it will feel like you're trying to write with your off hand. You'll feel clumsy and awkward, and you'll be lucky if you just type the right keys, never mind typing with any speed.&lt;/p&gt;

&lt;p&gt;But as you retrain your brain, it will learn to accept its new role. For me it took about three weeks of conscious effort for the pain to subside. After the third week, my brain accepted its new role more readily, and I was able to type again. Very slowly, but I could at least type on Colemak. It took another month before I could type with a consistent speed.&lt;/p&gt;

&lt;p&gt;As for my Qwerty skills, they went through a metamorphosis as well. In the first three weeks I was forced to type Qwerty at times in order to keep doing my work, but after the third week I switched over to Colemak full-time. It was at this point that I realized I &lt;em&gt;couldn't&lt;/em&gt; type Qwerty anymore. If I tried, my brain tried to use Colemak, and only gibberish came out. Once I was able to type Colemak without as much conscious effort, my Qwerty skills came back, but slower than before. I can now type Qwerty about as quickly as I can type Colemak, but since it isn't my main driver I have lost some speed. Oh well. I’ll get it back one way or another.&lt;/p&gt;

&lt;p&gt;Advocates of Colemak also say it allows you to type faster in the long term. I have yet to see evidence of that, but that wasn't the reason I switched, so I’m not that worried about it. I think my speed will come back with time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Has Colemak helped your wrist pain? #
&lt;/h2&gt;

&lt;p&gt;Yes, I’m happy to report that it has. &lt;em&gt;However&lt;/em&gt;, I made many changes in addition to changing my keyboard layout, so I can't say that this is necessarily what "cured me". I have less pain now due to many different life and work factors &lt;a href="https://timothymiller.dev/posts/my-rsi-journey/"&gt;outlined in a previous article&lt;/a&gt;, and Colemak was one part of that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the deal with mechanical keyboards? #
&lt;/h2&gt;

&lt;p&gt;While I was frustratedly learning Colemak, I was also learning to use a new ergonomic keyboard, called a &lt;a href="https://shop.keyboard.io/"&gt;Keyboardio&lt;/a&gt;. This was a very difficult transition for my poor brain to make, but after putting in the effort, I love where I ended up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UifvaHcA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://timothymiller.dev/img/2020/keyboardio.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UifvaHcA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://timothymiller.dev/img/2020/keyboardio.JPG" alt="My beautiful new Keyboardio"&gt;&lt;/a&gt;My beautiful new Keyboardio.&lt;/p&gt;

&lt;p&gt;The Keyboardio has helped me in many ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s &lt;em&gt;super&lt;/em&gt; customizable. It has numerous plugins, some of which have been invaluable in my journey to heal my wrists. In particular, they have a one-shot plugin that is magical: instead of holding down keys and modifiers to do keyboard shortcuts, you can type them consecutively, allowing you to type ⌘, C, instead of ⌘+C. This is just strictly better for your hands. No more twister for your fingers.&lt;/li&gt;
&lt;li&gt;It is a split keyboard. I have fairly wide shoulders, and I keep the two halves of my keyboard at shoulder width, with a trackball mouse in the middle. I think this has been a big factor allowing my wrists to heal. Typing on a regular keyboard forced my wrists to bend outward, which in the long run wasn't good for them.&lt;/li&gt;
&lt;li&gt;You can also "tent" the keyboard up, so your hands can sit in a more natural position. I have mine tented up as high as it will go.&lt;/li&gt;
&lt;li&gt;Due to the customizability, it’s much easier to add and remove keyboard shortcuts. I use far more shortcuts than I ever have before, which helps me resort to the mouse less, which helps my wrists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Keyboardio is quite an investment at $329 (I got mine on sale for $280, and you can often get them used on the forum), and there are definitely cheaper options that give you many of the same results. But now that I’ve switched, I wouldn't go back for anything. I think the Keyboardio, and the improvements it has allowed me to make, took me 75% of the way to healing my wrists, and for that I am grateful.&lt;/p&gt;

&lt;h2&gt;
  
  
  So... What's the deal with mechanical keyboards? &lt;a href="//#so...-what's-the-deal-with-mechanical-keyboards%3F"&gt;#&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;I honestly don’t know. 😂 I like mine for the ergonomic comforts. I know some like them for the hardware, and get super nerdy about switches and hardware mods and such. I know nothing about that, although I respect those who do. I just like mine because it’s comfortable, and helps with my wrist pain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Are mechanical keyboards better than normal ones? #
&lt;/h2&gt;

&lt;p&gt;I would say, generally speaking, no. Mechanical keyboards are not inherently better as far as I can tell, they're just different. Mechanical keyboards are more customizable in general, they give you better feedback which can make touch typing easier (just think how hard it is to touch type on an iPad screen. Regular keyboards feel like that after typing on a mechanical for a while).&lt;/p&gt;

&lt;p&gt;But there are perks to regular keyboards as well. They're usually thinner, more portable, often times cordless, and ubiquitous. If you're happy with a regular keyboard, there’s really little reason to go mechanical, in my view.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you weren't typing 6+ hours a day, would you learn a new keyboard layout? #
&lt;/h2&gt;

&lt;p&gt;Probably not. I learned it because my wrists hurt and I was desperate for a change. If I didn't type so much, typed a lot on other people's computers, or didn't experience pain from typing, I probably wouldn't switch. I happen to be in a position where I mainly use my own computer, I use it a lot, and my wrists hurt because of that. In this situation, I believe a few weeks of frustrated typing was worth less wear and tear on my arms.&lt;/p&gt;

&lt;p&gt;Knowing Qwerty is important though, because you need to be able to use computers that aren't your own. This is why I never switched before, and why I thought about it very seriously before I did. It’s a pretty big inconvenience to not be able to use other keyboards, and it requires more time to maintain the skills to type with two keyboard layouts. This is a downside, but one I’m willing to live with at this point in my career. For now, I’ll just make sure to use both layouts every week, so that I can maintain my skills with both.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the &lt;em&gt;best&lt;/em&gt; ergonomic keyboard? #
&lt;/h2&gt;

&lt;p&gt;I don’t know. I really like my Keyboardio, but it is the only mechanical keyboard I have ever used, I am no expert.&lt;/p&gt;

&lt;p&gt;However, if you're like me and need one to help with wrist pain, there are a few must-haves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The keys should be in columns, not staggered. This takes more work to get used to, but it’s far easier on the fingers.&lt;/li&gt;
&lt;li&gt;The keyboard should have split capability. The ability to type with your hands at shoulder width is a game changer.&lt;/li&gt;
&lt;li&gt;Related, you should be able to "tent" the two halves. Some ergo keyboards are just built like this, others are adjustable. Adjustable is better, because everyone's hands are unique.&lt;/li&gt;
&lt;li&gt;100% customizable keys is also very useful, if you want to use your mouse less. This way you can customize your board to work smarter instead of harder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The keyboardio checks all of these boxes, but so does the ErgoDox, and many others check &lt;em&gt;most&lt;/em&gt; of these boxes. Many ergo keyboards have staggered keys, which I think is unfortunate.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Summary #
&lt;/h2&gt;

&lt;p&gt;If you struggle with wrist or arm pain, and your career depends on typing, ergonomic keyboards and alternate keyboard layouts are definitely worth investigating. I’ve had good results using them, and I hope they will keep my arms in good shape for many years to come.&lt;/p&gt;

&lt;p&gt;Any questions you have that I didn't answer here? Write a comment below or &lt;a href="https://twitter.com/WebInspectInc"&gt;hit me up on Twitter&lt;/a&gt;, always happy to share what I know.&lt;/p&gt;

</description>
      <category>keyboard</category>
      <category>ergonomics</category>
      <category>rsi</category>
    </item>
    <item>
      <title>CSS4</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 07 Feb 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/webinspectinc/css4-kie</link>
      <guid>https://dev.to/webinspectinc/css4-kie</guid>
      <description>&lt;p&gt;Here's a really fascinating idea from &lt;a href="https://www.quirksmode.org/blog/archives/2020/01/css4_is_here.html"&gt;PPK&lt;/a&gt; and &lt;a href="https://css-tricks.com/css4/"&gt;Chris Coyier&lt;/a&gt;. The idea is that we should promote and think about CSS4 as if it were an actual thing, &lt;a href="https://rachelandrew.co.uk/archives/2016/09/13/why-there-is-no-css4-explaining-css-levels/"&gt;even though it’s not&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I think many of us who love CSS as a language can relate to this idea, especially those of us who lived through the heyday of CSS3. CSS as a language used to get more attention than it currently does, and it’s easy to hope that we could turn that around with a little more TLC.&lt;/p&gt;

&lt;p&gt;I do think CSS deserves more attention, especially with all the excellent work going into the language right now. It’s a more robust language than it’s ever been, and it just keeps getting better, and yet it seems we as an industry are moving away from it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two questions I have:&lt;/strong&gt; would it be worthwhile to try to artificially create more attention for CSS as a language? And if yes, would creating a fictitious name for it help? Let's talk about that.&lt;/p&gt;

&lt;h3&gt;
  
  
  A little history, as I remember it:
&lt;/h3&gt;

&lt;p&gt;CSS3 was popularized shortly after I started my career in web development, and I remember the thrill of working with "new HTML5 and CSS3 features". HTML5 and CSS3 promised to make our lives a lot easier, and at one time many of us were counting down the days until we could make use of this simplicity in real-world projects.&lt;/p&gt;

&lt;p&gt;As I remember it, many of the features that were brought to the table were things we were already doing, and CSS3 was just going to make it much easier than before. For example, let's take border radius: we certainly had round corners on the web before &lt;code&gt;border-radius&lt;/code&gt; was added to CSS, but we had to use a collection of hacks and images to accomplish it. It worked, but not nearly as effortlessly as simply typing &lt;code&gt;border-radius: 3px;&lt;/code&gt;. CSS3 made things easier.&lt;/p&gt;

&lt;p&gt;I think that &lt;em&gt;this&lt;/em&gt; is really why most of us were excited to have these features. Not only did these features save us time and effort in development, but they also made the web faster and more accessible. All we had to do was learn to use these features, and our work would be better and easier as a result.&lt;/p&gt;

&lt;p&gt;It was a fun time to be a web developer, especially for those of us who truly love CSS as a language. CSS was still relatively young and innocent, but this was the beginning, the beginning of a much bigger story.&lt;/p&gt;

&lt;h3&gt;
  
  
  Would a new CSS3 help the industry?
&lt;/h3&gt;

&lt;p&gt;Many of the things stated above were not only true of CSS3, they're also true of CSS progress today.&lt;/p&gt;

&lt;p&gt;Many of the new CSS features coming down the pipe are just reflections of things we’ve already done, just streamlined methods for achieving the same results. But there’s one big difference between now and ten years ago: layout on the web just simply &lt;em&gt;isn't as painful&lt;/em&gt; as it used to be.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;However&lt;/em&gt;, the industry is &lt;em&gt;vastly&lt;/em&gt; different than it was in the CSS3 days. Everything has changed. Sure you can still write vanilla HTML5 and CSS3 and it will work, but most people don't.&lt;/p&gt;

&lt;p&gt;Let's reframe the question:&lt;/p&gt;

&lt;h3&gt;
  
  
  Has web development gotten easier since CSS3?
&lt;/h3&gt;

&lt;p&gt;As a whole, it's hard to say. But we can safely say one thing: &lt;strong&gt;CSS has become &lt;em&gt;much&lt;/em&gt; easier to use in recent years.&lt;/strong&gt; And not only that, there are so many more ways to use CSS.&lt;/p&gt;

&lt;p&gt;Building websites is drastically different now. You really don’t have to work in the core languages (HTML5, CSS, and JS) at all, if you don’t want to. There are so many frameworks, toolkits, pre and post CSS processors, design tools that export CSS, CSS-in-JS solutions, and more: most of these tools promise to solve specific pain points that people see in CSS, JS, and HTML.&lt;/p&gt;

&lt;p&gt;This is a good thing, and helps push the web forward just like CSS3 did, albeit not as directly. All of this tooling truly gives us more options than we’ve ever had before, but it also means less and less interest in the core features of the web.&lt;/p&gt;

&lt;p&gt;Very few people write websites from scratch anymore, so the benefits of core language updates are less tangible to most of us. I honestly think many web developers would be more excited to hear of a new version of React than a new version of CSS: &lt;strong&gt;that’s the reality, and that’s okay.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All of this makes me think that the glory days of CSS are over, and there’s no going back. Just like there was a gold rush for iOS apps back when the iPhone came out, CSS had its time in the sun, and now it has to grow up and get a real job. No marketing push, no matter how big, is going to make people pay attention to a technology that they simply don’t use anymore.&lt;/p&gt;

&lt;h3&gt;
  
  
  However...
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;That doesn't mean we should hang CSS up to dry.&lt;/strong&gt; I do think we could manufacture a &lt;em&gt;smaller&lt;/em&gt; movement. The CSS community &lt;em&gt;has&lt;/em&gt; become more stagnant over the years. Fewer people truly care about it. Those of us that &lt;em&gt;do&lt;/em&gt; care need to be more diligent about learning and teaching new CSS features that might otherwise fly under the radar. If we don’t learn and teach it, who will?&lt;/p&gt;

&lt;p&gt;And as Chris notes in his CSS4 article, there are plenty of new and exciting things to talk about. We just &lt;em&gt;don’t&lt;/em&gt; talk about them as much, because there are so many &lt;em&gt;other&lt;/em&gt; exciting things to talk about.&lt;/p&gt;

&lt;p&gt;As noted on &lt;a href="https://css-tricks.com/css4/#comment-1754085"&gt;CSS-Tricks&lt;/a&gt;, the W3C is semi-annually posting "CSS Snapshots" that describe a year's worth of progress on CSS the language. The latest one is right here, &lt;a href="https://www.w3.org/TR/CSS/"&gt;CSS Snapshot 2018&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This would be a good way to focus our attentions, to make sure nothing flies under the radar. It also gives us a rolling number to use, similar to how JavaScript is now versioned. We would have CSS 2018, CSS 2020, and so on and so forth. Definitely not as pithy as CSS4, but it would have many of the same benefits, plus it's accurate. We can write about the shiny new "up and coming" CSS features in CSS 2020, just like we would write about the nonexistent "CSS4".&lt;/p&gt;

&lt;p&gt;I do think that this alone would be tremendously helpful. Just looking through the CSS 2018 Snapshot, here are a few of the features that I haven’t seen or read much about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logical Properties&lt;/li&gt;
&lt;li&gt;Fonts Level 3&lt;/li&gt;
&lt;li&gt;CSS3 Colors&lt;/li&gt;
&lt;li&gt;CSS3 Namespaces&lt;/li&gt;
&lt;li&gt;CSS4 Media Queries (!!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an excellent place to start. And while I do like the pithiness of CSS4, I do think in the long run it would be better to go with the CSS 2018 vernacular. That way we always have a new version to aspire to, rather than slowly watching CSS4 fade into the background, like we saw with CSS3.&lt;/p&gt;

&lt;p&gt;CSS is dead, long live CSS!&lt;/p&gt;

</description>
      <category>css</category>
      <category>css2018</category>
    </item>
    <item>
      <title>You Are Being Tracked</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Sat, 25 Jan 2020 17:51:22 +0000</pubDate>
      <link>https://dev.to/webinspectinc/you-are-being-tracked-53l7</link>
      <guid>https://dev.to/webinspectinc/you-are-being-tracked-53l7</guid>
      <description>&lt;p&gt;I have never been a big fan of online tracking. I believe that online tracking fundamentally breaks many of the precepts the web was built on, &lt;em&gt;however&lt;/em&gt; as of today, for the first time ever, I am tracking the traffic on &lt;a href="https://timothymiller.dev/"&gt;my own personal website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To explain how I got here, let me tell you some of the main issues I've seen with online tracking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tracking is slow
&lt;/h2&gt;

&lt;p&gt;Online trackers are breathtakingly &lt;em&gt;slow&lt;/em&gt;. Using the internet with an ad-blocker has become common specifically for this reason, I think: people got tired of waiting for their webpages to load. The internet is a &lt;em&gt;noticably&lt;/em&gt; nicer place with ad-blockers and privacy blockers on.&lt;/p&gt;

&lt;p&gt;I don't think this is the fault of any one tracker or tool. It's generally the combination of &lt;em&gt;many&lt;/em&gt; trackers that creates these problems.&lt;/p&gt;

&lt;p&gt;This is a &lt;em&gt;huge&lt;/em&gt; failing for all of us, and we only have ourselves to blame. The sheer number of trackers on most websites are actively breaking the internet, but we continue to add them to every webpage like they're candy. Like candy though, they create serious health issues for our websites, and we should treat them with more caution than we are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Most trackers dig too deep
&lt;/h2&gt;

&lt;p&gt;Online trackers can be an invasion of privacy, especially when taken to their logical extreme. Simple anonomous traffic info is one thing, but many companies believe that &lt;em&gt;more data is always better&lt;/em&gt;, and this contributes to many of the other issues with online tracking. The more we track, the more unnecessary problems we create.&lt;/p&gt;

&lt;p&gt;In the last couple of years I have worked for dozens of companes, and every single one of them has a Google Analytics account that they barely use. Google Analytics is an &lt;em&gt;incredible&lt;/em&gt; tool, but let's just be honest here: the &lt;em&gt;vast&lt;/em&gt; majority of people have no idea how to use all of that data. Most people care about which pages get the most traffic, and maybe some simple e-commerce and email signup metrics. That's it. We don't need to be collecting &lt;em&gt;nearly&lt;/em&gt; as much information as we do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Most trackers “phone home”
&lt;/h2&gt;

&lt;p&gt;Your Google Analytics data is not truly private. Your Facebook tracker is not truly private. Both tools have major marketing companies behind them, and the more they're able to track about a person's online identity, the better they can advertise to them.&lt;/p&gt;

&lt;p&gt;There's nothing inherently wrong with them doing this: they provide incredible tools for free, and as payment they harvest whatever information they need. That's just how it works. But most people don't seem to &lt;em&gt;know&lt;/em&gt; that's how this works. I've heard many people rail against retargeted ads—ads that take your browsing history into account—and then they slap a Facebook pixel on their site, enabling the same behavior they reportedly dislike.&lt;/p&gt;

&lt;h2&gt;
  
  
  Despite the downsides though, data can be useful...
&lt;/h2&gt;

&lt;p&gt;Which is why I now have a &lt;a href="https://www.goatcounter.com/"&gt;GoatCounter&lt;/a&gt; on my own website.&lt;/p&gt;

&lt;p&gt;Up until today I had no idea if anyone was reading my blog or not, but I've always been curious. I've had my eyes peeled for a simple privacy aware tracker, and GoatCounter seems to fit the bill. A few things I like about it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's open source. Security through transparency, I call this. If nothing is hidden, surely there's nothing to hide, right?&lt;/li&gt;
&lt;li&gt;Privacy aware. The creator of this tool has &lt;a href="https://www.arp242.net/dnt.html"&gt;written&lt;/a&gt; &lt;a href="https://www.arp242.net/goatcounter.html"&gt;articles&lt;/a&gt; on his views about online tracking, and his judgement seems sound.&lt;/li&gt;
&lt;li&gt;It's fast, light, and asynchronous. No extra bloat.&lt;/li&gt;
&lt;li&gt;It only tracks four metrics: page views, browser, rough screen size, and rough location. Nothing even remotely identifiable, and each metrics that are easy to use and apply to your project.&lt;/li&gt;
&lt;li&gt;I own my own data. It is fully exportable and deletable at any time. No phoning home, no perpetually saved data. Full control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an experiment, but a good one, I think. I'm excited to see if GoatCounter will be a tool I will continue to use for years to come.&lt;/p&gt;

&lt;h2&gt;
  
  
  One more thing about GoatCounter
&lt;/h2&gt;

&lt;p&gt;A fun thing: you can also make your GoatCounter dashboard public. I don't know if I want to do that or not, but it would be a fun feature for specific projects, I think.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This post was also published at &lt;a href="https://timothymiller.dev/posts/2020/you-are-being-tracked/"&gt;timothymiller.dev&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>tracking</category>
      <category>analytics</category>
      <category>privacy</category>
    </item>
    <item>
      <title>Spend too much time on social media? Try RSS.</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Sat, 18 Jan 2020 13:35:09 +0000</pubDate>
      <link>https://dev.to/webinspectinc/spend-too-much-time-on-social-media-try-rss-1p49</link>
      <guid>https://dev.to/webinspectinc/spend-too-much-time-on-social-media-try-rss-1p49</guid>
      <description>&lt;p&gt;&lt;strong&gt;This post was originally published on &lt;a href="https://timothymiller.dev/posts/2020/getting-back-into-rss/"&gt;timothymiller.dev&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is a noteworthy thing: RSS, a decades old technology, is still alive and well. And after many years away, I am using it once again.&lt;/p&gt;

&lt;p&gt;Inspired by &lt;a href="https://twitter.com/chriscoyier/status/1214606808125341696"&gt;Chris&lt;/a&gt;, I decided to download &lt;a href="https://ranchero.com/netnewswire/"&gt;NetNewsWire&lt;/a&gt; and start with a clean slate. I also picked up &lt;a href="https://feedbin.com/"&gt;Feedbin&lt;/a&gt; for syncing between devices. Best decision I’ve made all year.&lt;/p&gt;

&lt;p&gt;RSS stands for Really Simple Syndication. It became very popular maybe 15 years ago, when &lt;a href="https://www.google.com/reader/about/"&gt;Google Reader&lt;/a&gt; was a thing. Google Reader allowed you to follow your favorite blogs, and it would notify you whenever a new post appeared. The technology was very simple, and that was part of why it was so effective: anyone could understand it, anyone could use it, and by its very nature it only ever showed you what you &lt;em&gt;specifically asked&lt;/em&gt; to see.&lt;/p&gt;

&lt;p&gt;In our modern day of algorithms and media moguls deciding what we see and read on a day to day basis, it feels like a breath of fresh air.&lt;/p&gt;

&lt;p&gt;RSS is not only liberating because I get to choose my own content; it also helps me to consume a &lt;em&gt;far&lt;/em&gt; more diverse set of content. Most of my reading, for the last several years anyway, has come through social media. This is a problem, because social media likes to show us content that we like (or that makes us angry), because then we’ll spent more time on social media.&lt;/p&gt;

&lt;p&gt;RSS doesn't give a darn. All content is equal in the mind of an RSS reader, and thus you see a wider range of content, even content you might disagree with (gasp). This is a very good thing: it broadens your horizons and exercises your mind.&lt;/p&gt;

&lt;p&gt;If you haven’t already, I would encourage you to give RSS a try. If you want to join me on the RSS train, I have a few tips for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find an app that is clean and as simple as possible. If the app isn't easy to use, you probably won’t use it, so make sure it’s &lt;em&gt;nice&lt;/em&gt;. Spend a few dollars if you can afford it. I used Feedly for a while but it didn't really click, if your first choice doesn't work for you, try something else.&lt;/li&gt;
&lt;li&gt;Subscribe to lots of feeds at first, even if they don’t look that interesting to you. Unsubscribing is easy if it isn't a good fit, but you won’t know if it fits until you read a few articles to get a feel for it.&lt;/li&gt;
&lt;li&gt;Jump on your social media and if you see any links that interest you, check if the website has a feed. The more interesting things you can move to your reader, the less time you'll need to spend on social media, and the more &lt;em&gt;actual reading&lt;/em&gt; you'll do.&lt;/li&gt;
&lt;li&gt;If you do any reading online, some (or all) of the sites you regularly read probably have feeds. News networks, blogs, cooking sites, many businesses, most of them have feeds you can follow with RSS. Add your most commonly visited sites into your reader, and you'll get even more out of them.&lt;/li&gt;
&lt;li&gt;You can even get RSS of &lt;a href="https://eggfreckles.net/2020/01/03/youtube-rss/"&gt;YouTube channels&lt;/a&gt;, if, like me, you often avoid YouTube to avoid the algorithm pulling you in. RSS solves that! You can RSS your favorite channels, and cut out the algorithmic middle man.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, here's a few websites with feeds that I enjoy to prime the pump:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://css-tricks.com/"&gt;CSS-Tricks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sixcolors.com/"&gt;Six Colors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://daringfireball.net/"&gt;Daring Fireball&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.frankchimero.com/"&gt;Frank Chimero&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kentcdodds.com/"&gt;Kent C. Dodds&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://swizec.com/blog"&gt;Swizec Teller&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mjtsai.com/blog/"&gt;Michael Tsai&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/feeds/videos.xml?channel_id=UCqJ-Xo29CKyLTjn6z2XwYAw"&gt;Game Maker's Toolkit (YouTube!)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://timothymiller.dev/"&gt;Mine :)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know what your favorites are below!&lt;/p&gt;

</description>
      <category>rss</category>
      <category>opensource</category>
      <category>privacy</category>
      <category>data</category>
    </item>
    <item>
      <title>Killing Cmd-Tab. Your Path to Better Application Switching</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 10 Jan 2020 15:38:40 +0000</pubDate>
      <link>https://dev.to/webinspectinc/killing-cmd-tab-your-path-to-better-application-switching-3bah</link>
      <guid>https://dev.to/webinspectinc/killing-cmd-tab-your-path-to-better-application-switching-3bah</guid>
      <description>&lt;p&gt;&lt;strong&gt;This post was first published on &lt;a href="https://timothymiller.dev/posts/2020/killing-cmd-tab/"&gt;timothymiller.dev&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Last week we talked about creating our own keyboard shortcut "namespace" by &lt;a href="https://dev.to/webinspectinc/creating-worry-free-keyboard-shortcuts-with-the-hyper-key-3m52"&gt;creating a "Hyper" key&lt;/a&gt;. The hyper key doesn't actually exist on Macs, but we were able to fabricate it by using other modifiers that &lt;em&gt;are&lt;/em&gt; supported by the OS.&lt;/p&gt;

&lt;p&gt;This gave us a whole keyboard of shortcuts all to ourselves, and now we just have to figure out what to do with it.&lt;/p&gt;

&lt;p&gt;One of my favorite uses for the Hyper key is what I call painless application switching. What do I mean by "painless"? Why is regular app switching "painful"? Let me explain.&lt;/p&gt;

&lt;p&gt;There are essentially three ways to change applications built in to the Mac operating system: Cmd+Tab, Mission Control, and the Dock. Let's talk about each of them.&lt;/p&gt;

&lt;h4&gt;
  
  
  Cmd+Tab
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9Jxkzbik--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/42vppskw8yctk2s59w3o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9Jxkzbik--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/42vppskw8yctk2s59w3o.png" alt="A rough picture of the Mac cmd+tab app switcher."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;This was the best screenshot I could get. It's surprisingly difficult!&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Cmd-tab is a very finicky way to swap applications. It isn't consistent. The order of the applications changes all the time depending on what app you used most recently. This means that there are only two ways to use the tool: either &lt;em&gt;remember&lt;/em&gt; what order you last used your apps at all times, so you can switch without looking. OR you can press cmd+tab, wait for a second, look at the UI, and then continue tabbing until you reach the desired application. &lt;em&gt;Both&lt;/em&gt; of these methods use more of your brain than they should, and the second method is also &lt;em&gt;slow&lt;/em&gt; and breaks you out of your flow.&lt;/p&gt;

&lt;p&gt;Cmd+Tab works well if you're only using two applications. Beyond that, it breaks. I stopped using cmd+tab when I became a professional developer, because it wasn't a good enough tool for the job. I needed something better.&lt;/p&gt;

&lt;h4&gt;
  
  
  Mission Control
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uiBP47fd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/b1p4o5pehte0kqm21wo8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiBP47fd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/b1p4o5pehte0kqm21wo8.png" alt="A screenshot of the Mac Mission Control interface."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For many years I used Mission Control instead. Mission Control is okay, I would say it requires less thought than cmd+tab in general. But it too has a fatal flaw: it isn't keyboard driven. Mouse driven productivity tools can be helpful, but they're never going to have the pure speed that a keyboard driven solution has. Mission Control is useful in a pinch, but not a reliable productivity tool.&lt;/p&gt;

&lt;h4&gt;
  
  
  Dock
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Uh13yWfA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/t5cs3u6ttfo3b2gxqha8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Uh13yWfA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/t5cs3u6ttfo3b2gxqha8.png" alt="A screenshot of the default Mac dock."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You all know the dock. For most of us it sits at the bottom of our screen, with all the currently running apps, and possibly others of our choosing. The dock has many virtues: it is more consistent than cmd+tab, and has many more actions available than either of the previous solutions. But again, it is not keyboard driven. It’s a good tool to have, but not fast or efficient when it comes to swapping back and forth between applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  There Has to be A Better Way
&lt;/h3&gt;

&lt;p&gt;Back to the Hyper key. Thanks to having this key available to us, we can now set up  &lt;em&gt;truly&lt;/em&gt; fast and predictable application switching. The concept is simple: take your most recently used apps, and assign memorable shortcuts to them using BetterTouchTool, or your application of choice.&lt;/p&gt;

&lt;p&gt;For me, here's my short list of apps I swap between frequently, and my chosen shortcuts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Firefox: hyper+f&lt;/li&gt;
&lt;li&gt;Mail: hyper+m&lt;/li&gt;
&lt;li&gt;Safari: hyper+s&lt;/li&gt;
&lt;li&gt;Sublime Text: hyper+c&lt;/li&gt;
&lt;li&gt;OmniFocus: hyper+o&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The beauty of this approach is its simplicity. You can assign apps as you need them, and give them the most obvious shortcut you can think of. This makes the change to your process small, and the benefits substantial.&lt;/p&gt;

&lt;p&gt;In BetterTouchTool,  here's what that configuration looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LfApsD4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/kdd6yo1j8t386je6hvw5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LfApsD4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/kdd6yo1j8t386je6hvw5.png" alt="A screenshot of the required config for BTT."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;Click to enlarge.&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Setting it up is pretty intuitive. Go to "keyboard shortcuts", add a new shortcut of your choosing, pick the "Launch Application" action, and choose the application you want to launch/switch to. Then rinse and repeat as needed.&lt;/p&gt;

&lt;p&gt;One perk to doing this with BTT is that it will also &lt;em&gt;launch&lt;/em&gt; the app if it isn't already open. Not only better app switching, but better app &lt;em&gt;launching&lt;/em&gt; too.&lt;/p&gt;

&lt;p&gt;There is much more we can do with the Hyper key and BTT, but this is one of my favorite uses. Next week we will talk about window management, which has been a thorn in my side for many years until recently.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>mac</category>
      <category>macbook</category>
      <category>tools</category>
    </item>
    <item>
      <title>Creating Worry-Free Keyboard Shortcuts with the "Hyper" Key</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 03 Jan 2020 15:11:42 +0000</pubDate>
      <link>https://dev.to/webinspectinc/creating-worry-free-keyboard-shortcuts-with-the-hyper-key-3m52</link>
      <guid>https://dev.to/webinspectinc/creating-worry-free-keyboard-shortcuts-with-the-hyper-key-3m52</guid>
      <description>&lt;p&gt;&lt;strong&gt;This post was first published on &lt;a href="https://timothymiller.dev/posts/2020/worry-free-keyboard-shortcuts/"&gt;timothymiller.dev&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Custom keyboard shortcuts have always been an itch I’ve felt unable to scratch.&lt;/p&gt;

&lt;p&gt;I just never quite felt up to the task. I have seen and known people who have customized their computers to the point where they don’t even &lt;em&gt;touch&lt;/em&gt; their mouse. Watching these people work is like watching a magician: windows moving of their own accord, applications launching automatically, whole build processes seemingly materializing out of thin air. Frankly it’s a very intimidating mental image, and one that I’ve never felt I could live up to.&lt;/p&gt;

&lt;p&gt;So I didn't even try. I used a stock keyboard most of my life, and used a mouse whenever it was convenient. Sure I learned &lt;em&gt;some&lt;/em&gt; keyboard shortcuts here and there, but for the most part, I just did what was obvious. I never really put in the time or effort to work &lt;em&gt;smarter&lt;/em&gt;, instead opting to just work longer hours, and spend less time on social media than most people.&lt;/p&gt;

&lt;p&gt;This was a decent strategy, but a suboptimal one. Anyone who spends more than a few hours a day on a computer should put in the effort to make their work experience better. It only makes sense: even if you only shave a few seconds off of your daily routine, it could save you &lt;em&gt;hours&lt;/em&gt; or even &lt;em&gt;days&lt;/em&gt; when compounded over years and years. Not only does it save you time, it also leaves your brain free to think about more important things, like your work.&lt;/p&gt;

&lt;p&gt;You cannot afford to drive your computer sub-optimally for years. Put in the effort to make your computer work for you, and your output in the long term will be drastically higher. Like changing the oil in your car, this is work that just has to be done, or it will fuel the burn out of your engine. Trust me, I’ve been there done that. Changing your oil may be a hassle, but it’s better than the alternative.&lt;/p&gt;

&lt;h3&gt;
  
  
  Changing the oil
&lt;/h3&gt;

&lt;p&gt;So, we know we need to give the computer skills a tune-up, but where do we start?&lt;/p&gt;

&lt;p&gt;Let me tell you what has held me back for &lt;em&gt;years&lt;/em&gt; on this front: I’ve always hesitated to change keyboard shortcuts that don’t work well for me. I’ve always been afraid to change anything, because I feel like I will overwrite an already existing shortcut: something that I use, or something I &lt;em&gt;should&lt;/em&gt; be using.&lt;/p&gt;

&lt;p&gt;This isn't just an idle worry; many times I have made up my mind to add my own custom shortcut, only to realize 15 minutes later that I overwrote something that I use all the time. For some reason it’s just very difficult for me to remember all the shortcuts that I use on a daily basis. They're all in muscle memory, but muscle memory doesn't help much with recall.&lt;/p&gt;

&lt;p&gt;Now, you can use an application like &lt;a href="https://www.ergonis.com/products/keycue/"&gt;KeyCue&lt;/a&gt; to tell you all the shortcuts on your system. Or you could scour your preferences to make sure you aren't missing anything. But both of these solutions are error prone and slow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is an important idea:&lt;/strong&gt; you need to be able to add shortcuts to your computer &lt;em&gt;quickly&lt;/em&gt; and &lt;em&gt;effortlessly&lt;/em&gt;, without thinking about it. Let me tell you why: keyboard shortcuts are &lt;em&gt;the&lt;/em&gt; key to speeding up &lt;em&gt;any&lt;/em&gt; workflow. But our brains aren't very good at figuring out the best way to implement or use them. The best keyboard shortcuts come to you &lt;em&gt;while&lt;/em&gt; you're working, anytime you are needlessly repeating your actions, and in the back of your mind you think "there’s got to be a better way to do this". This is exactly the best time to create a keyboard shortcut, while it’s fresh in your mind. If your process for creating keyboard shortcuts isn't effortless, then you're going to ignore that intuition, and miss out on the biggest workflow wins you've ever seen.&lt;/p&gt;

&lt;p&gt;But how do we make creating keyboard shortcuts effortless? How can we leave behind the problem of managing and overwriting existing shortcuts?&lt;/p&gt;

&lt;p&gt;Enter the hyper key.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Hyper Key
&lt;/h3&gt;

&lt;p&gt;Modern OS X only supports four "modifier" keys, Command, Control, Option, and Shift. This is all we have to work with when creating keyboard shortcuts. Command is certainly the most-often used key for the OS, but the other modifier keys are used fairly frequently as well, for other purposes.&lt;/p&gt;

&lt;p&gt;As we’ve discussed, it’s difficult to come up with many good key combinations with these four modifiers that haven’t already been taken by some system default, or an app on your system. However, as far as I know, there are no system defaults that use all &lt;em&gt;four&lt;/em&gt; modifier keys at once. If we follow that logic, it stands to reason that we have an &lt;em&gt;entire keyboard&lt;/em&gt; of potential shortcuts at our fingers if we simply use all four modifiers at once.&lt;/p&gt;

&lt;p&gt;This doesn't 100% solve our problem, but it comes close. Only the most nimble fingered typist can press all those modifiers at the same time, in &lt;em&gt;addition&lt;/em&gt; to whatever other key you use for your shortcut. Even if you can press all of those keys, it certainly will contort your hand and not give you a very comfortable experience, which is another barrier that we must overcome. So we need to find an easier way to press these modifiers.&lt;/p&gt;

&lt;p&gt;Unfortunately this isn't something we can do with BetterTouchTool, as far as I can tell. However there is a very nice piece of &lt;em&gt;free&lt;/em&gt; software that will allow us to do this, called &lt;a href="https://pqrs.org/osx/karabiner/"&gt;Karabiner-Elements&lt;/a&gt;. If you don’t already have it, I would recommend downloading and installing it.&lt;/p&gt;

&lt;p&gt;Karabiner is a very powerful and flexible piece of software, and has a whole list of different modifications you can make to the modifier keys on your machine. The only one I use, and the one I recommend, is the "change_caps_lock key" rule, which allows you to easily use the hyper key by holding down the caps lock key. There are plenty of other &lt;a href="https://pqrs.org/osx/karabiner/complex_modifications/#modifier-keys"&gt;command modifications&lt;/a&gt;, but if you want the one I use, you can &lt;a href="https://pqrs.org/osx/karabiner/complex_modifications/#caps_lock"&gt;download it at this link&lt;/a&gt; (just click the "import" button after downloading Karabiner).&lt;/p&gt;

&lt;p&gt;Once you've imported that ruleset, congratulations! You now have a Hyper key on your keyboard, ready to accept any custom shortcuts you send its way. This is the first step towards the freedom to &lt;em&gt;truly&lt;/em&gt; customize your keyboard.&lt;/p&gt;

&lt;p&gt;In the next article we will talk about just &lt;em&gt;one&lt;/em&gt; of the improvements this allows us to make to our system: faster and more predictable application switching.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>mac</category>
      <category>macbook</category>
      <category>tools</category>
    </item>
    <item>
      <title>Let's Level Up with BetterTouchTool</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Fri, 27 Dec 2019 22:42:05 +0000</pubDate>
      <link>https://dev.to/webinspectinc/let-s-level-up-with-bettertouchtool-2mjp</link>
      <guid>https://dev.to/webinspectinc/let-s-level-up-with-bettertouchtool-2mjp</guid>
      <description>&lt;p&gt;&lt;a href="https://folivora.ai/"&gt;BetterTouchTool&lt;/a&gt; is likely the first Mac productivity app I ever downloaded. A good friend of mine started using a Mac long before I did, and he introduced me to the wonders of BTT. Ever since my first Mac purchase, BTT has loyally sat on my computer, hiding in the background, only showing its face when asked and wanted. (If only all software could be so discrete &lt;em&gt;cough&lt;/em&gt; Adobe &lt;em&gt;cough&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;In a word I would call BTT "polite software". It really does stay out of your way, and even if you use it every day, you can easily forget about it. That is certainly one of its strengths, but also perhaps a weakness. After all, I have used BTT for nearly a decade, and yet I’ve only used it for one thing: switching tabs.&lt;/p&gt;

&lt;h2&gt;
  
  
  My one use for BTT
&lt;/h2&gt;

&lt;p&gt;I use and switch tabs a &lt;em&gt;lot&lt;/em&gt;. In both my web browser and my code editor, I consistently have more than a dozen tabs open, and I switch between them frequently. I use my mouse quite a bit—more than I should—so I needed a way to switch tabs while using a mouse or a trackpad. BTT makes this very easy. I created four shortcuts for this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trackpad TipTap Left: ⇧⌘[&lt;/li&gt;
&lt;li&gt;Trackpad TipTap Right: ⇧⌘]&lt;/li&gt;
&lt;li&gt;Mouse Button 4: ⇧⌘[&lt;/li&gt;
&lt;li&gt;Mouse Button 3: ⇧⌘]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it. That is all I’ve done with BTT in nearly a decade. It may not seem like much, but those four shortcuts alone have apparently done me a lot of good over the years:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u5B3Btir--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4zouej7ljeshshlqnrku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u5B3Btir--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4zouej7ljeshshlqnrku.png" alt="Screenshot of my BTT useage, which shows over 63,000 uses in the last year."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Note that this is just over the last year. 63,000 tab switches in one year!)&lt;/p&gt;

&lt;h2&gt;
  
  
  There must be more
&lt;/h2&gt;

&lt;p&gt;I've always been aware that BTT can do &lt;em&gt;far&lt;/em&gt; more than these simple shortcuts. But honestly I am &lt;em&gt;terrible&lt;/em&gt; at working to improve my working conditions.&lt;/p&gt;

&lt;p&gt;I’ve always been this way: I willingly power through difficult work just to prove I can, without any thought towards how I could improve the process. Like a child playing in the mud a few feet from a beach, I tend to try to make the most of my current situation, rather than trying to change it. It doesn't matter how much change we’re talking about: I tend to focus on what I consider the "real" work while ignoring simple ways in which I could make my work/life easier.&lt;/p&gt;

&lt;p&gt;But that changes today! I have spent the last couple of months digging into BetterTouchTool. The &lt;a href="https://community.folivora.ai/"&gt;forums&lt;/a&gt;, the &lt;a href="https://docs.bettertouchtool.net/"&gt;documentation&lt;/a&gt;, and the app itself, and let me be the first to tell you: this app is &lt;em&gt;tremendously&lt;/em&gt; powerful. I had no idea just how much this app can do.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small roadmap
&lt;/h2&gt;

&lt;p&gt;This is the start of a series, where I will document many of the things I’ve discovered and found useful about BTT. Consider this article the introduction, and we’ll get down and dirty with the tool starting next week. Just to give you a taste of what is to come, here is a rough outline of some of the topics we will be discussing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.towebinspectinc/creating-worry-free-keyboard-shortcuts-with-the-hyper-key-3m52"&gt;Creating worry-free keyboard shortcuts with the "hyper" key&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Killing alt-tab: your path to better application switching.&lt;/li&gt;
&lt;li&gt;BetterSnapTool: window management you can really sink your &lt;em&gt;keys&lt;/em&gt; into.&lt;/li&gt;
&lt;li&gt;The BTT way of expanding text.&lt;/li&gt;
&lt;li&gt;Stop working for your Touchbar: it’s time to make it work for you.&lt;/li&gt;
&lt;li&gt;Your mouse needs help: tweaks to make your mouse hand more useful.&lt;/li&gt;
&lt;li&gt;...and more to come: this tool is so. dang. powerful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Links to be included as the articles are published)&lt;/p&gt;

&lt;p&gt;If you have any interest in BetterTouchTool, follow along! This series will live here on this site, as well as &lt;a href="https://timothymiller.dev/posts/leveling-up-with-btt/"&gt;my personal site&lt;/a&gt;. Feel free to join in on the conversation, throw your own ideas my way, and let's create a better, more efficient work environment for all of us.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>macbook</category>
      <category>tools</category>
      <category>mac</category>
    </item>
    <item>
      <title>Implementing Dark Mode from the Beginning</title>
      <dc:creator>Timothy Miller</dc:creator>
      <pubDate>Thu, 26 Dec 2019 14:21:06 +0000</pubDate>
      <link>https://dev.to/webinspectinc/implementing-dark-mode-from-the-beginning-mlh</link>
      <guid>https://dev.to/webinspectinc/implementing-dark-mode-from-the-beginning-mlh</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;This post was originally published on &lt;a href="https://timothymiller.dev/posts/implementing-dark-mode-from-the-start/" rel="noopener noreferrer"&gt;timothymiller.dev&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Dark mode. Possibly one of the most developer-flexy features of 2019, now available for viewing on my personal website.&lt;/p&gt;

&lt;p&gt;Before I talk about Dark Mode, I need to talk about the shoulders I’m standing on: I first read about implementing Dark Mode on CSS-Tricks from the indomitable &lt;a href="https://css-tricks.com/dark-modes-with-css/" rel="noopener noreferrer"&gt;Robin Rendle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I also read about &lt;em&gt;designing&lt;/em&gt; for dark mode on &lt;a href="https://stuffandnonsense.co.uk/blog/redesigning-your-product-and-website-for-dark-mode" rel="noopener noreferrer"&gt;Stuff &amp;amp; Nonsense&lt;/a&gt; (best name ever) by Andy Clarke.&lt;/p&gt;

&lt;p&gt;Those two articles are the main inspiration for this article. With that said, let’s talk dark mode.&lt;/p&gt;

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

&lt;p&gt;First of all, Dark Mode is the “common” name for a feature popularized&lt;a href="https://dev.to/moopet/comment/jbo1"&gt;*&lt;/a&gt; by Apple, more technically referred to as the “prefers color scheme” media query. Introduced in &lt;a href="https://drafts.csswg.org/mediaqueries-5/#descdef-media-prefers-color-scheme" rel="noopener noreferrer"&gt;Media Queries Level 5&lt;/a&gt;, this media query allows people to specify if they prefer light backgrounds or dark backgrounds. And it allows us, as website creators, to define what our website looks like with a light or a dark background.&lt;/p&gt;

&lt;p&gt;Dark Mode is intended for use as an accessibility feature, and it’s important to remember that. There are certainly other reasons to use it—I use it, and I have no disability that forces me to do so—but we need to remember that this is an &lt;em&gt;important accessibility tool&lt;/em&gt; and we shouldn't hijack it for our own purposes. Dark mode should make our websites easier to browse at a lower contrast, it should &lt;em&gt;not&lt;/em&gt; be a flashier, edgier, “darker” version of our website.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;Implementing “dark mode” is fairly simple, but it has far reaching implications all across your website. There &lt;em&gt;are&lt;/em&gt; simple ways to do this,&lt;br&gt;
such as cleverly using a &lt;a href="https://dev.wgao19.cc/sun-moon-blending-mode/" rel="noopener noreferrer"&gt;blend mode&lt;/a&gt;, but there’s only one way to make sure your colors are accessible &lt;em&gt;and&lt;/em&gt; look good, and that’s by developing your own theme, using your own hand-picked colors.&lt;/p&gt;

&lt;p&gt;For me, my site only had a couple of colors, so this wasn't difficult. I took the blue that I’ve been using for links, and used that for my background color. Then I &lt;em&gt;substantially&lt;/em&gt; lightened that same blue color, and used it for links.&lt;/p&gt;

&lt;p&gt;Simple:&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjw5voda4gb9jydw1ktfq.png" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjw5voda4gb9jydw1ktfq.png" alt="An image demonstrating the differences between dark and light modes."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next up, readability.&lt;/p&gt;

&lt;p&gt;You may have noticed in the past, when visiting websites with dark backgrounds, that white text on a dark background is hard to read. It starts to look "fuzzy" after a while, where your eyes have trouble focusing on the text. This is generally just a &lt;em&gt;contrast&lt;/em&gt; issue,&lt;br&gt;
light text on a dark background generally appears higher contrast than the reverse. So you want to &lt;em&gt;lower&lt;/em&gt; your contrast ratios in dark mode,&lt;br&gt;
because again, this is an accessibility feature for people looking for &lt;em&gt;lower contrast&lt;/em&gt;. It is a tricky line to walk though, and you need to make sure your contrast isn’t &lt;em&gt;too&lt;/em&gt; low, so you’ll want to use a tool to help you. Lea Verou’s &lt;a href="https://contrast-ratio.com/" rel="noopener noreferrer"&gt;Contrast Ratio tool&lt;/a&gt; is perfect for this, or if you want more info, WebAim has a &lt;a href="https://webaim.org/resources/contrastchecker/" rel="noopener noreferrer"&gt;nice tool&lt;/a&gt; as well.&lt;/p&gt;

&lt;p&gt;For accessibility sake you always want at least a 1:5 ratio for text. But for dark mode, you also don’t want that number to go too high, I would say somewhere between a 1:5 and a 1:15 is going to give you the best results. So I'll quickly run through the colors I have chosen:&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="c"&gt;/* dark mode colors: */&lt;/span&gt;
&lt;span class="nt"&gt;--background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;#082840&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;--text-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;#FFFFFF&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* contrast ratio: 15.13 */&lt;/span&gt;
&lt;span class="nt"&gt;--link-color-normal&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;#75&lt;/span&gt;&lt;span class="nt"&gt;BAED&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* contrast ratio: 7.2 */&lt;/span&gt;
&lt;span class="nt"&gt;--link-color-visited&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;#5&lt;/span&gt;&lt;span class="nt"&gt;EAFEA&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* contrast ratio: 6.33 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Contrast-wise I'm looking good, although the plain text color is still a little high for me. I'll try an off-white:&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="nt"&gt;--text-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;#E0E0E0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;/*&lt;/span&gt; &lt;span class="nt"&gt;contrast&lt;/span&gt; &lt;span class="nt"&gt;ratio&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;11&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;46&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I like it. The off-white looks a little “softer”, easier on the eyes.&lt;/p&gt;

&lt;p&gt;Now implementing dark mode should involve more than just colors. I also made a few typographic changes for dark mode. Using a light-weight font makes a &lt;em&gt;huge&lt;/em&gt; difference when it comes to dark mode, and I also added a tiny bit of word spacing, just to give things a little more breathing room.&lt;/p&gt;

&lt;p&gt;Here’s what those changes look like:&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbsl1uwtxv929i5d0vzxs.png" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbsl1uwtxv929i5d0vzxs.png" alt="An image demonstrating the differences between dark and light modes."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks like pretty minor stuff, but it makes a &lt;em&gt;huge&lt;/em&gt; difference, especially when reading long articles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Varinception!
&lt;/h2&gt;

&lt;p&gt;To wrap it all up, here’s how I structured my CSS variables. I like to be able to use &lt;em&gt;real&lt;/em&gt; color names for my variables—I’ve never been a big fan of the &lt;code&gt;--primary-color&lt;/code&gt; and &lt;code&gt;--secondary-color&lt;/code&gt; school of thought—but I also wanted logical names for links, headings, copy fonts, etc. So I ended up using &lt;em&gt;variables in variables&lt;/em&gt;, a concept I affectionately call varinception.&lt;/p&gt;

&lt;p&gt;Here’s what that looks like:&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="c"&gt;/* add all colors up front */&lt;/span&gt;
  &lt;span class="py"&gt;--red&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#C5004A&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--darkred&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#7F0036&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--lightgray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#e0e0e0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--gray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#C0C0C0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--darkgray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--navy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#17050F&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--blue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#082840&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--mid-blue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#5EAFEA&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--light-blue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#75BAED&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--white&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#E0E0E0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c"&gt;/* varinception! */&lt;/span&gt;
  &lt;span class="py"&gt;--text-color-normal&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;--darkgray&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--bg-color-normal&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;--white&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--link-color-normal&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;--blue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--link-color-visited&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;--navy&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="py"&gt;--header-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--header-line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--header-letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="py"&gt;--copy-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--copy-line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--copy-word-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prefers-color-scheme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;dark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/* I find this readable and easily maintainable */&lt;/span&gt;
    &lt;span class="py"&gt;--text-color-normal&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;--white&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="py"&gt;--bg-color-normal&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;--blue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="py"&gt;--link-color-normal&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;--light-blue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="py"&gt;--link-color-visited&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;--mid-blue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="py"&gt;--header-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--header-line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.7&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--header-letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.025em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="py"&gt;--copy-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--copy-line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.7&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--copy-word-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.05em&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using these variables now requires very little code:&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="nt"&gt;html&lt;/span&gt;&lt;span class="o"&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;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;--text-color-normal&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;--bg-color-normal&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h4&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h5&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;h6&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&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;--header-weight&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="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--header-line-height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;letter-spacing&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;--header-letter-spacing&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;37.5em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&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;--copy-weight&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="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--copy-line-height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;word-spacing&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;--copy-word-spacing&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;And that's that! We now have a fully function and &lt;em&gt;accessible&lt;/em&gt; dark theme for our website.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>html</category>
    </item>
  </channel>
</rss>
