<?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: Christian Legge</title>
    <description>The latest articles on DEV Community by Christian Legge (@christian_legge).</description>
    <link>https://dev.to/christian_legge</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%2F924601%2Fb338fc67-07a5-408c-be02-1d4d28bd503e.jpg</url>
      <title>DEV Community: Christian Legge</title>
      <link>https://dev.to/christian_legge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/christian_legge"/>
    <language>en</language>
    <item>
      <title>The Unbearable Lightness of Job Searching</title>
      <dc:creator>Christian Legge</dc:creator>
      <pubDate>Sat, 25 Feb 2023 20:28:30 +0000</pubDate>
      <link>https://dev.to/christian_legge/the-unbearable-lightness-of-job-searching-3jl3</link>
      <guid>https://dev.to/christian_legge/the-unbearable-lightness-of-job-searching-3jl3</guid>
      <description>&lt;p&gt;Most of us are familiar with job searching to some extent. If you haven't, you're either supremely lucky or you're too young to worry about it yet, in which case you should click off this post right now because I don't want to give you a needlessly pessimistic view of the world. I've been in the mire of job searching for a while now, and while I totally recognize that my feelings are tainted by my current situation, it doesn't change how I'm feeling now.&lt;/p&gt;

&lt;p&gt;I play a game called &lt;a href="https://oldschool.runescape.com/" rel="noopener noreferrer"&gt;&lt;em&gt;RuneScape&lt;/em&gt;&lt;/a&gt; from time to time. One of the things to do in that game is to fight a boss for a 1/x chance of getting a specific item from it, usually a pretty low chance like 1/128 or 1/300. It's purely random—nothing you do can affect your chances each kill. (It's kind of like gambling, but without the really big downside.) I bring this up because it's common for players to invoke the &lt;a href="https://en.wikipedia.org/wiki/Gambler%27s_fallacy" rel="noopener noreferrer"&gt;gambler's fallacy&lt;/a&gt; when grinding for a specific drop. "I've killed the boss 500 times already, I must be getting close!" Mathematically savvy players point out that you are of course no closer to getting the item after killing the boss 500 times than you were at the beginning of the journey. It's just a dice roll, and the dice have no memory.&lt;/p&gt;

&lt;p&gt;But in my experience, it's really, really, &lt;em&gt;really&lt;/em&gt; hard not to feel like they do. Of &lt;em&gt;course&lt;/em&gt; I'm closer, look at all this progress I've made! 500 attempts at a 1/300 event means I'm due almost twice over—it must be coming soon! I know in my head that it's wrong, but I can't stop myself from feeling that it's right.&lt;/p&gt;




&lt;p&gt;I bring it up because job searching is much the same. Applying for a job is a roll of the dice. There are things you can do to affect your chances of succeeding at a job application, of course, but if it's a public posting, there are a lot of other applicants; you (statistically speaking) probably don't stand out from the pack too much. And even if there were a way to seriously affect your chances with any given job listing—maybe your cover letter skills are out of this world—you still don't know whether the company is a good fit for you or vice versa. If you keep applying, you will &lt;em&gt;eventually&lt;/em&gt; get something. But those failed applications are, broadly, not helping you succeed at future ones. If you feel that all the jobs you applied for and didn't get constitute progress towards getting hired, you are a victim of the gambler's fallacy.&lt;/p&gt;

&lt;p&gt;That's a tough place to be in a position where we're told merits matter. If you're hard-working, if you're good at your job, if you have the experience and the skills, you'll get hired. But when there are orders of magnitude more applicants than available positions, probability takes over. Suddenly there are a whole lot of people who &lt;em&gt;deserve&lt;/em&gt; a job, for whatever that means, and are having a hell of a time finding one. It's easy to start feeling like you're doing something wrong, or that you aren't good enough.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/The_Unbearable_Lightness_of_Being" rel="noopener noreferrer"&gt;&lt;em&gt;The Unbearable Lightness of Being&lt;/em&gt;&lt;/a&gt; is a Czech novel from 1984 by Milan Kundera. He draws on Nietzsche's teachings about the "heaviness" of eternal life—the burden of the eternal consequences of your actions—and rebuts that because we in fact live only one life, there is a cosmic &lt;em&gt;absence&lt;/em&gt; of burden on mankind. We become lighter than air, our movements as free as they are insignificant. If we only have one life to live, might we as well not have lived at all?&lt;/p&gt;

&lt;p&gt;A complete lack of burden can have the same effect as a massive one. Can I truly go to sleep happy after a long day of applying for jobs, knowing that unless one of them pans out (and the low chance of that happening), I might as well not have done anything at all? It is not a burden, but a lightness. If I were burdened I would know how to lift it, and I could work to achieve that. As it stands, I can't. I can do things that &lt;em&gt;feel&lt;/em&gt; like I'm working towards something. But what I'm really doing is pulling the handle of a slot machine and hoping something comes out. I'm rubbing my hands and blowing on the dice as much as I can, just like all the best gamblers, but just like all the best gamblers my odds of success are about the same as everyone else's.&lt;/p&gt;




&lt;p&gt;What I don't have in common with most gamblers is the ability to stop. When a gambler resigns themselves to the statistics and quits, they get to go home. I don't get to do that, because I have a ticking time bomb above my head at all times equal to the amount of money in my bank account, and when it hits zero my entire life detonates. I have no logical choice but to keep gambling, each failed attempt leaving me wondering what I'm doing wrong or why I'm not good enough. The truth is, of course, that most job applications don't work out. They can't. I can tell you with certainty I've never bombed a job interview hard enough to make my potential employer say "please stay far far away from our company"—when it doesn't work out, it just means it wasn't a good fit, or they chose someone else, and I don't think that means anyone has done anything wrong. But the human brain likes patterns, and it likes cause and effect. It's borderline impossible not to feel responsible for things that aren't your fault.&lt;/p&gt;

&lt;p&gt;And that leaves me—us, all of us—here, where the best course of action is to fail, fail, and fail again, each one a gut punch that steels you a little more in your belief that maybe you don't deserve to succeed. The only way out is to get lucky, and not everyone can. We can look in all directions for something, anything, we can do to lift the burden, but in truth we can't, because the burden isn't really there. It isn't a burden, but a lightness. A lightness that comes when your movements are as free as they are insignificant. The feeling of needing to do something, but being unable to do anything—the unbearable lightness of job searching.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://christianlegge.dev/blog/2023-02-25" rel="noopener noreferrer"&gt;&lt;em&gt;This post is cross-posted from my personal blog.&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cryptocurrency</category>
      <category>blockchain</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Light-speed frontend prototyping with create-vite-tailwind</title>
      <dc:creator>Christian Legge</dc:creator>
      <pubDate>Sun, 11 Sep 2022 23:58:29 +0000</pubDate>
      <link>https://dev.to/christian_legge/light-speed-frontend-prototyping-with-create-vite-tailwind-585j</link>
      <guid>https://dev.to/christian_legge/light-speed-frontend-prototyping-with-create-vite-tailwind-585j</guid>
      <description>&lt;p&gt;&lt;em&gt;(tl;dr: &lt;a href="https://www.npmjs.com/package/create-vite-tailwind"&gt;create-vite-tailwind on npm&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As someone trying to get into pivot into full stack web development following &lt;a href="https://www.cnn.com/2022/08/31/tech/snapchat-layoffs/index.html"&gt;a recent job loss&lt;/a&gt;, I knew I would have to spend time building some frontend to prove myself to prospective employers. &lt;a href="https://www.frontendmentor.io"&gt;Frontend Mentor&lt;/a&gt; seemed like a great addition to the portfolio - professional grade designs that look great and offer a wide range of opportunities to learn various frontend techniques, on top of getting a little practice in a designer-developer workflow, albeit a very one-sided one. So I set out to build some of these projects.&lt;/p&gt;

&lt;p&gt;I've spent a lot of time building web apps using the old "save a change, restart the server, refresh the browser" loop. And if you have too, I don't have to tell you how hard it is to go back to that once you've seen the light of browser sync/hot reload/etc. One of the fastest build tools out right now is &lt;a href="https://vitejs.dev/"&gt;Vite&lt;/a&gt;, which is an absolute treat to use and I recommend you try it out if you haven't.&lt;/p&gt;

&lt;p&gt;But something else I (and a lot of other people) have been really excited about is &lt;a href="https://tailwindcss.com/"&gt;TailwindCSS&lt;/a&gt;, which (among other things) offers fantastic developer experience. You rarely, if ever, have to write bespoke CSS, instead using Tailwind's plethora of utility classes to style your elements however you want. Writing frontend with Tailwind really feels like hitting the ground running - there's a lot of friction in writing CSS classes that for the most part is completely taken care of by Tailwind.&lt;/p&gt;




&lt;p&gt;The problem, though, is getting them to work together. While it's true that Tailwind really shines with a component-based framework like React or Vue, sometimes that isn't what you want, and I found that they were unnecessary for the Frontend Mentor flow, where you really focus on design and less on functionality. I don't know if I'm the only person who thought this was a missing piece, but even &lt;a href="https://tailwindcss.com/docs/guides/vite"&gt;the official Tailwind docs&lt;/a&gt; only offer guides on installing with Vite when using React or Vue. &lt;/p&gt;

&lt;p&gt;As an aside, Tailwind does have a &lt;a href="https://tailwindcss.com/docs/installation/play-cdn"&gt;play CDN&lt;/a&gt; that you can link in your HTML and use &lt;em&gt;most&lt;/em&gt; of Tailwind, but it's still missing some important details like modifier classes (&lt;code&gt;hover:&lt;/code&gt;, &lt;code&gt;active:&lt;/code&gt;, responsive widths, etc.) so it really didn't solve my problem.&lt;/p&gt;

&lt;p&gt;Since this was something I could see a lot of use for, &lt;a href="https://www.npmjs.com/package/create-vite-tailwind"&gt;I created an npm initializer package&lt;/a&gt; to suit the use case. On top of automatically installing and configuring Tailwind, it's &lt;strong&gt;extremely minimal&lt;/strong&gt;, containing only those files necessary for a quick prototype. This package is very much aimed at prototypes and other simple use cases.&lt;/p&gt;




&lt;p&gt;To jumpstart a project using this package, just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ yarn create vite-tailwind &amp;lt;name&amp;gt;
$ cd &amp;lt;name&amp;gt;
$ yarn dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you're up and running in less than 30 seconds, with all the fast refresh and Tailwind magic you could want. (You can also use the corresponding &lt;code&gt;npm&lt;/code&gt; commands, but I recommend &lt;code&gt;yarn&lt;/code&gt;, again for its speed.)&lt;/p&gt;

&lt;p&gt;It's a pretty simple package that I haven't noticed any issues with yet, but it's major version 0 for now. If you do notice an issue, or have a suggestion, I welcome all sorts of &lt;a href="https://github.com/scatter-dev/create-vite-tailwind/issues"&gt;issues on GitHub&lt;/a&gt; (I did get a comment about optionally including UI frameworks like Daisy, which I'm super open to if people would use it) - or PRs!&lt;/p&gt;




&lt;p&gt;Bonus: while writing this post, &lt;a href="https://github.com/browserslist/caniuse-lite/issues/100"&gt;caniuse-lite made a breaking change that completely broke this package, among many others&lt;/a&gt;. Thanks to &lt;a href="https://github.com/ai"&gt;Andrey&lt;/a&gt; of PostCSS and autoprefixer for fixing so quickly!&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1569109701438361602-856" src="https://platform.twitter.com/embed/Tweet.html?id=1569109701438361602"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1569109701438361602-856');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1569109701438361602&amp;amp;theme=dark"
  }



&lt;/p&gt;

</description>
      <category>npm</category>
      <category>webdev</category>
      <category>vite</category>
      <category>tailwindcss</category>
    </item>
  </channel>
</rss>
