<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>zachfedor</title>
    <description>Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - Antoine de Saint-Exupery
</description>
    <link>http://zachfedor.github.io/</link>
    <atom:link href="http://zachfedor.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 25 Sep 2024 18:10:10 -0400</pubDate>
    <lastBuildDate>Wed, 25 Sep 2024 18:10:10 -0400</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>JavaScript: From Zero To Dangerous</title>
        <description>&lt;p&gt;This was the first talk in a series (hopefully) on modern JavaScript aimed at introducing the language to absolute beginners. The slides are below and you can follow along with an audio recording of the event. Check &lt;a href=&quot;https://www.meetup.com/lancaster-front-end/&quot;&gt;the Meetup.com page&lt;/a&gt; to catch the next one!&lt;/p&gt;

&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;https://slides.com/zachfedor/dangerous-js#/&quot;&gt;View the Slides&lt;/a&gt;&lt;/p&gt;

&lt;audio src=&quot;https://zachfedor-audio.s3.amazonaws.com/20190605-js-from-zero-to-dangerous+-+6%3A6%3A19%2C+15.06.mp3&quot; controls=&quot;&quot;&gt;
  Sorry, but your browser doesn&apos;t support the &lt;code&gt;audio&lt;/code&gt; element.
&lt;/audio&gt;

</description>
        <pubDate>Wed, 05 Jun 2019 00:00:00 -0400</pubDate>
        <link>http://zachfedor.github.io/2019/06/javascript-from-zero-to-dangerous</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2019/06/javascript-from-zero-to-dangerous</guid>
        
        
        <category>developer</category>
        
      </item>
    
      <item>
        <title>On What I Know About Willpower</title>
        <description>&lt;blockquote&gt;
  &lt;p&gt;Control exerted to do something or restrain impulses.&lt;/p&gt;

  &lt;p&gt;&lt;span&gt;– &lt;cite&gt;Oxford English Dictionary&lt;/cite&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Willpower is a much studied phenomenon. I’ve read about how &lt;a href=&quot;https://en.wikipedia.org/wiki/Ego_depletion&quot;&gt;I have a finite amount&lt;/a&gt; of it and how it can be &lt;a href=&quot;https://www.npr.org/2011/09/18/140516974/resistance-training-for-your-willpower-muscles&quot;&gt;exercised like a muscle&lt;/a&gt; to get more. And I’ve read about how &lt;a href=&quot;https://digest.bps.org.uk/2015/06/24/new-research-challenges-the-idea-that-willpower-is-a-limited-resource/&quot;&gt;both of those studies were bunk&lt;/a&gt; and now we really know how it works. I’ve read about famous people with more of it than me. I’ve read about famous people with less of it, too. There’s studies about which foods give you more of it, which smells lessen it, and everything in between.&lt;/p&gt;

&lt;p&gt;I give up.&lt;/p&gt;

&lt;p&gt;I’m not listening to what people tell me about my own willpower. What do they know? Well, probably a lot actually since they’re published in peer reviewed journals. But that’s besides the point. They don’t know me. Sure, I know they’re trying to be helpful, but they can stop. I’m no longer paying them any attention.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Yes, this will take some amount of willpower, and yes, I’m aware of the irony.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;From now on I’m going to start paying attention to my own willpower. Here’s what I think I know:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Hesitation&lt;/strong&gt; is the worst. If I get it in my head to wake up in the morning and instantly swing my feet out of bed, I’m already thinking about what’s next before I have a chance to regret it. If, on the other hand, I delay getting up. If I do some math on the merits of a napping versus getting ready in a hurry. If I wonder how cold it is outside of the covers. If I stop and debate at all, I’m done for. I’m only making it harder on myself for something I have to do eventually.&lt;/li&gt;
  &lt;li&gt;I don’t know if I have a finite amount of willpower or not, but if I &lt;strong&gt;believe&lt;/strong&gt; I have enough, then I do. Likewise, if I believe I’m tapped out, then I’m giving up before I even start trying. It’s a self-fulfilling prophecy, a prophecy that I can make up and start proselytizing to the rest of me.&lt;/li&gt;
  &lt;li&gt;The laws of physics seem to apply to this abstract non-entity. Action begets &lt;strong&gt;momentum&lt;/strong&gt;, and momentum begets action. Conversely, an object at rest tends to stay at rest. If you finished the second half of Newton’s axiom in your head – you know, the “unequal force” bit – then see #1 before you start ruminating on what that force is.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Dress&lt;/strong&gt; for success. My p.j. pants are staying firmly planted to the couch with my ass inside them. If I put on a button down shirt, suddenly I’m a more capable person. If I roll up those sleeves, now I’m ready to get my hands dirty. Literally. Or Figuratively. Whatever. I think this has to do with #2.&lt;/li&gt;
  &lt;li&gt;With great &lt;strong&gt;music&lt;/strong&gt; comes great responsibility. Paul Simon can help me clean the entire house in an afternoon and let’s me call him “Al.” But he and Julio can pull a fast one on me. One minute I’m reading a book and the next I’m humming down by the schoolyard and I don’t know what page I’m on anymore. Use with caution.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Guilt&lt;/strong&gt; is another interesting motivator. &lt;a href=&quot;https://www.writersstore.com/dont-break-the-chain-jerry-seinfeld/&quot;&gt;Don’t Break the Chain&lt;/a&gt; can be a fun game and lead to some proud achievements. But it can subtly turn into a chore. You know what they say about all work and no play.&lt;/li&gt;
  &lt;li&gt;I haven’t quite figured out a &lt;strong&gt;reward&lt;/strong&gt; system. If I fail the goal, then I’m punishing myself maybe even for putting in a good effort. If I pass, then I wonder if I’m cheating myself. Could the goal have been too easy? Could I have accomplished more if I didn’t stop to enjoy the reward? Am I asking too many rhetorical questions? Of course I am. I’ll eat my cake and have it, too. It probably doesn’t have anything to do with willpower anyway.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Moral of the story: I don’t know anything about willpower. You read the thing about the cake, right? But I know that reading about other people’s willpower isn’t going to make any of it rub off on me. I need to figure out what makes me tick and then change my surroundings and actions accordingly. Anything less is doing myself a disservice.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Know Thyself&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;PS - The word “if” appears in this post 17 times. That’s probably too many to be considered &lt;em&gt;good&lt;/em&gt; writing. But what if I never wrote it at all?&lt;/p&gt;

</description>
        <pubDate>Tue, 13 Feb 2018 00:00:00 -0500</pubDate>
        <link>http://zachfedor.github.io/2018/02/on-what-i-know-about-willpower</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2018/02/on-what-i-know-about-willpower</guid>
        
        
        <category>philosopher</category>
        
      </item>
    
      <item>
        <title>On Historical Extrapolations</title>
        <description>&lt;p&gt;I put a lot of weight in history. I read classical literature and philosophy, not for the bragging rights, but for the wisdom that has been willingly passed down to me through time. Okay, so there’s some bragging rights in there, too. But think about it: there are untold numbers of lessons taught, observations made, and proverbs to live by just waiting for you to notice them, hidden in dusty book covers, alphabetized and arranged in nice rows on shelves at free dispensaries. Why limit yourself to one lifetime’s lessons when millions have lived before you and willingly shared their story?&lt;/p&gt;

&lt;p&gt;This is why I love quotes so much. Just like a bog being swallowed by the earth and turned into a diamond over the long course of geologic time, a quote is someone’s entire culminated experience focused into a single statement of learned wisdom. There is one in particular that has been on my mind the past few days precisely because I seem to have forgotten it’s meaning:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;History can never tell the future.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I can’t even remember where I heard it. I think it was a off-handed comment in the Animatrix. An unlikely source, perhaps, but it stuck with me. It’s a nice cautionary statement that I’ve relied on more than once. And I’m relying on it yet again.&lt;/p&gt;

&lt;p&gt;The past few weeks have brought some changes in my life as I found a new job and started to gear up for the life of a digital nomad. And when change comes, I look to others’ experience to see how they have dealt with it, be it talking to friends and family or reading a stranger’s blog post. I may be relying on others’ experience a bit too much, though.&lt;/p&gt;

&lt;p&gt;No matter how much I read and prepare, no matter how much I attempt to turn the unknown into the known, I need to remember that history can never tell the future. Others may have wisdom of similar situations and there is nothing wrong in searching for that wisdom and taking it to heart. But there is something wrong when the pursuit of that wisdom becomes an idol, a false sense of security to ease a troubled mind. No amount of wisdom will shed light into the farthest reaches of my destination. Nor should it.&lt;/p&gt;

&lt;p&gt;I’ll still take the light that it gives, and gladly. But light will never determine the objects it reveals. This is my future and no one knows what it will bring. That’s the scary part. It’s also the interesting part.&lt;/p&gt;

&lt;p&gt;I’m looking forward to it.&lt;/p&gt;
</description>
        <pubDate>Mon, 08 May 2017 00:00:00 -0400</pubDate>
        <link>http://zachfedor.github.io/2017/05/on-historical-extrapolations</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/05/on-historical-extrapolations</guid>
        
        
        <category>philosopher</category>
        
      </item>
    
      <item>
        <title>On The Freedom of Being Wrong</title>
        <description>&lt;p&gt;This afternoon, I was talking about my lifelong attempt to stop being a know-it-all. Even when I was young, I would often upset people with my willingness to share a proudly-earned tidbit of trivial knowledge, which is also known as “proving someone wrong.” It didn’t take long to realize this behavior wouldn’t make friends. Since then, I try to be hyper-aware about how I’m sharing things I think I know while injecting humility into all my arguments. But I’m still human.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;And this was before the internet was omnipresent in our lives, before it started joining us in the bathroom, back when “going online” was still just an activity you did for part of the day, rather than an additional mode of global perception we can activate at any moment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Today, I was talking about how challenging this still is for me even a decade later. This may be harder now because of the changing landscape of how we inform ourselves. It’s so easy to have complex opinions on a broad range of topics, anything from pumpernickel bread recipes to the Syrian conflict, just because the wealth of information at our fingertips.&lt;/p&gt;

&lt;p&gt;Well, the internet served me up a timely article called &lt;a href=&quot;http://www.raptitude.com/2016/02/the-art-of-letting-others-be-right/&quot;&gt;The Art of Letting Others Be Right&lt;/a&gt;. It got me wondering. Maybe stemming the spray of trivia and sprinkling on a bit of tact has been difficult because it is not going far enough. Even after taking some steps to avoid it, I can still get pulled into an argument for the sake of knowledge far too easily.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;It’s not just &lt;em&gt;okay&lt;/em&gt; to engage in these little conflicts, it’s a moral imperative. We can’t just &lt;em&gt;allow&lt;/em&gt; ignorance to go on unopposed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There is freedom in realizing that this moral imperative is our own construct, a rule we apply ourselves to under the misguided notion that we must improve the world around us. What harm is there in a missing Oxford Comma? The world will carry on fine if everyone continues to believe that vikings wore horns on their helmets.&lt;/p&gt;

&lt;p&gt;Of course, discretion is important here. There are plenty of harmful things to speak up about. But for the rest, I will content myself with letting go of my egocentrism, allowing other’s to have their viewpoint, and freeing myself from the burden of information.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;We can still express our views in a thousand other ways that aren’t so indulgent and harsh.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
        <pubDate>Sun, 23 Apr 2017 00:00:00 -0400</pubDate>
        <link>http://zachfedor.github.io/2017/04/on-freedom-of-wrong</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/04/on-freedom-of-wrong</guid>
        
        
        <category>philosopher</category>
        
      </item>
    
      <item>
        <title>On Waking Up Angry</title>
        <description>&lt;p&gt;Have you ever heard the advice “Never go to bed angry”? I love that bit of wisdom. Not only does it bolster relationships, it helps to soothe a busy mind from ruminating on things not worth ruminating about. But you never hear advice about waking up angry.&lt;/p&gt;

&lt;p&gt;I had that problem this morning. And I’m not sure what to do about it.&lt;/p&gt;

&lt;p&gt;Recently I decided to get back into a habit of meditating every morning, so I set myself a goal to do at least 10 minutes every day for 50 days without breaking the chain. Today was day 32, and it was the first time that I had trouble with it.&lt;/p&gt;

&lt;p&gt;Devoid of any grogginess, my head popped off the pillow with immediate clarity and single-minded anger. It was like I had just stormed off after an argument, still fuming with things left unsaid, still formulating the perfect debate. But, I didn’t leave an argument. I didn’t even have one the night before. Maybe I dreamed it.&lt;/p&gt;

&lt;p&gt;That’s not to say I dreamed up the source of my anger. The problem is very real, but unimportant. It’s as impermanent as every other problem. I’m more worried about my response to it. For other problems, I try to change the things I can and accept the things I can’t. With the latter, I can only change my response. But how do I attempt to change the reaction of my sleeping subconscious?&lt;/p&gt;

&lt;p&gt;Sure, 31 days of practicing meditation isn’t much. In time, I’m hopeful that I can quiet my mind after one of these incidents. More practice will allow me to view the source of my anger with acceptance instead of aversion. But that’s only reactive. For prescriptive change, I can try to be aware of potential triggers. More data will certainly help. I might learn that it correlates with worse sleep. Or maybe it’s a weekday only thing and that should warn me about my attitude at work. Or maybe I just haven’t been active enough.&lt;/p&gt;

&lt;p&gt;Either way, the change will come in time. For now I simply have to get through the day, focus on what is truly important and valuable to me, and accept the way things are.&lt;/p&gt;

</description>
        <pubDate>Fri, 31 Mar 2017 00:00:00 -0400</pubDate>
        <link>http://zachfedor.github.io/2017/03/on-waking-up-angry</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/03/on-waking-up-angry</guid>
        
        
        <category>philosopher</category>
        
      </item>
    
      <item>
        <title>On Robert Reich&apos;s Saving Capitalism</title>
        <description>&lt;p&gt;Some friends and I serendipitously started reading the same book at the same time. So we did what anyone would do and started a book club on politics, economics, and philosophy. The book was Robert Reich’s &lt;em&gt;Saving Capitalism&lt;/em&gt;.&lt;/p&gt;

&lt;h2 id=&quot;capitalist-or-closet-socialist&quot;&gt;Capitalist, or Closet Socialist?&lt;/h2&gt;

&lt;p&gt;Certainly, Reich must be a capitalist if he’s writing a book on saving it. And he never mentions seizing the means of production, so he can’t be a socialist. But a lot of his prescribed methods of saving capitalism look mighty close to something Marx would be okay with. And he often glides over the source of all the reasons that we need to save capitalism in the first place, something Marx would not be okay with. There are plenty of reasons, though. More on that later. Anywho, I found myself wanting him to dive deeper into the difference between the two. Maybe he was afraid that it would turn away his audience?&lt;/p&gt;

&lt;h2 id=&quot;who-are-you-writing-to&quot;&gt;Who Are You Writing To?&lt;/h2&gt;

&lt;p&gt;I don’t think the book was preaching to the choir because I don’t really know who the choir even is. I’d be interested to see many other people’s interpretation of this book. Would a libertarian free-market capitalist agree with his points about needing to fix the system? Or would they say it should fix itself, which is contrary to the main message of the book? Would an anarcho-socialist think he is crazy for trying to save a system of wage slavery? Or would they see it as a few steps in the right direction, at least?&lt;/p&gt;

&lt;h2 id=&quot;how-broke-is-too-broke&quot;&gt;How Broke Is Too Broke?&lt;/h2&gt;

&lt;p&gt;If you have a light constitution and swoon in the face of insurmountable odds to fix systemic inequality, then this book might not be for you. Chapter after chapter, statistic after case study, Reich really hammers home on the point that capitalism as we know it is more than a little borked. Some days I didn’t even want to go to book club because it seemed like too much work. Why bother? But I stuck it out, because it’s better than lying down and taking it. And if we don’t fix it now, it’ll only get worse.&lt;/p&gt;

&lt;p&gt;So, yeah. It’s a bit depressing. But it lit a fire under my ass to do something about it.&lt;/p&gt;
</description>
        <pubDate>Thu, 30 Mar 2017 00:00:00 -0400</pubDate>
        <link>http://zachfedor.github.io/2017/03/saving-capitalism</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/03/saving-capitalism</guid>
        
        
        <category>story teller</category>
        
      </item>
    
      <item>
        <title>On William Gibson&apos;s Neuromancer</title>
        <description>&lt;p&gt;I might do a separate write up on this at some point, but I’m starting a new thing where I write down some thoughts as soon as I finish a book. This isn’t meant to be any sort of literary criticism or book review, check my &lt;a href=&quot;https://www.goodreads.com/user/show/17803915-0dyss3us&quot;&gt;goodreads account&lt;/a&gt; for that. Here I just want to share things that a book makes me ponder while reading it. Maybe you’ll ponder them too.&lt;/p&gt;

&lt;p&gt;Without further ado, here are my three thought’s on William Gibson’s &lt;em&gt;Neuromancer&lt;/em&gt; because I just finished it this morning.&lt;/p&gt;

&lt;h2 id=&quot;origin-of-cyberpunk&quot;&gt;Origin of Cyberpunk&lt;/h2&gt;

&lt;p&gt;This point might be hotly contested, but the book came out 5 years before I was born so I’m allowed to be young and naïve here. I grew up with the internet, my idea of the quintessential sci-fi is The Matrix, and Cyberpunk was always a genre. That was my context when I started reading. So I had to constantly keep reminding myself that none of these things existed in 1984. Gibson’s story was groundbreaking, but if I wasn’t careful, it very quickly turned into cliché. It only seemed like a cliché because everything I grew up on was steeped in this novel, but that didn’t stop me from thinking it. It took me over half the book to shake that context off and appreciate it for what it was at the time.&lt;/p&gt;

&lt;h2 id=&quot;sci-fi-escapism&quot;&gt;Sci-Fi Escapism&lt;/h2&gt;

&lt;p&gt;Judge me on another point here, but I admit that I often read as an escape. I mean, they don’t call it “Fantasy” for nothing. So when I want a book for escaping, I will always reach for fantasy over sci-fi. This book is a classic example of why I make that choice. Fantasy, more often than not, tends to value immersion of the reader into a world of character and plot, which is perfect for an escapist. Sci-fi, however, will often sacrifice immersion for innovation. The world of science fiction is intentionally distant in a way that is much harder to grasp than fantasy. When an author makes up half the words in a sentence to tell me what the character is doing without actually explaining it, I’m not immersed, I’m excluded. Only the author knows what’s going on, and he or she refuses to tell me. I can’t escape into a book like that. I just get annoyed and think they’re trying to sound cool without doing any of the work to prove it (bonus points for those that do, though!).&lt;/p&gt;

&lt;h2 id=&quot;hidden-agenda&quot;&gt;Hidden Agenda&lt;/h2&gt;

&lt;p&gt;My favorite aspect of this book was the constant interplay between Case and his puppet master Wintermute. Case and I both knew that the strings are being pulled for him at every stop, and I couldn’t wait to figure out why. This point redeemed the book from my last two thoughts. It was the main reason I finished it. I don’t want to spoil it, though, so I’ll stop writing now.&lt;/p&gt;

</description>
        <pubDate>Sun, 19 Mar 2017 00:00:00 -0400</pubDate>
        <link>http://zachfedor.github.io/2017/03/neuromancer</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/03/neuromancer</guid>
        
        
        <category>story teller</category>
        
      </item>
    
      <item>
        <title>Absolute Paths for React Components</title>
        <description>&lt;p&gt;Today, I was working on a new React project at work and got really annoyed at writing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;import Component from &apos;../../some/other/directory&apos;;&lt;/code&gt;. I got even more annoyed when my guessed path was wrong. And then I had to move some components around and do it all over again.&lt;/p&gt;

&lt;p&gt;That’s when I decided to fix it.&lt;/p&gt;

&lt;p&gt;I did some searching to see what options I had. There were plenty, but a lot seemed like poor solutions or relied on Webpack configuration. Since we used &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create-react-app&lt;/code&gt; to bootstrap this project, the latter wasn’t an option. We’ve been prepared to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;eject&lt;/code&gt; when necessary, but I was reticent to pull the trigger just for this.&lt;/p&gt;

&lt;p&gt;Luckily, I found this &lt;a href=&quot;https://github.com/facebookincubator/create-react-app/pull/1712&quot;&gt;pull request&lt;/a&gt; opened six days ago. Apparently, cra’s tooling already supports absolute imports out of the box, they just don’t advertise it. This PR just adds some documentation.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;create a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.env&lt;/code&gt; file in the project root&lt;/li&gt;
  &lt;li&gt;in it, add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NODE_PATH=src&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;remove the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.env&lt;/code&gt; file from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gitignore&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Start serving your app and test it out on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;src/index.js&lt;/code&gt;. You can change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;import App from &apos;./App&apos;;&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;import App from &apos;App&apos;;&lt;/code&gt; and it should still work!&lt;/p&gt;

&lt;p&gt;It might not seem like a huge change with this example, but the implications are huge. Say you have a deeply nested component at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/src/path/to/my/Component.js&lt;/code&gt;. Now you can import it in any other file of your app with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;import Component from &apos;path/to/my/Component&apos;;&lt;/code&gt;. Hurray! No more &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;..&lt;/code&gt;s or guessed file paths. And if you ever have to move that component, you can do a global find and replace for the new import path.&lt;/p&gt;

&lt;p&gt;Breathe easy knowing your app is a little more future-proofed.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;Update: 2017-03-21&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A little while later, I tacked on some extra linting for code style to help the team out. It’s a little annoying without access to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create-react-app&lt;/code&gt;’s config files, but it worked. However, Airbnb’s eslint config doesn’t like my absolute imports. I thought the rules were important and didn’t want to ignore them, but I couldn’t figure out how to fix it without breaking into webpack’s config. So we have these everywhere now…&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;react&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/* eslint-disable import/no-unresolved, import/no-estraneous-dependencies */&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;MyComponent&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;path/to/MyComponent&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;OtherComponent.css&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;/* eslint-enable import/no-unresolved, import/no-estraneous-dependencies */&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/facebookincubator/create-react-app/pull/1712&quot;&gt;create-react-app PR #1712&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Thu, 09 Mar 2017 00:00:00 -0500</pubDate>
        <link>http://zachfedor.github.io/2017/03/absolute-paths-react-components</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/03/absolute-paths-react-components</guid>
        
        
        <category>developer</category>
        
      </item>
    
      <item>
        <title>Switching to rbenv</title>
        <description>&lt;p&gt;My company just switched from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rvm&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv&lt;/code&gt; and I had some issues in transit. I figured I’d add my setup here just in case, and I might as well do some research while I was at it.&lt;/p&gt;

&lt;h2 id=&quot;why-rbenv&quot;&gt;Why rbenv?&lt;/h2&gt;

&lt;p&gt;First and foremost, we needed a way to control Ruby versions between all of our active projects. We’re an agency, we need to juggle projects at various ages without conflicting environments. But why switch from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rvm&lt;/code&gt;, the Ruby Version Manager? Because &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rvm&lt;/code&gt; does a lot more than handle versions. We want to follow the Unix philosophy of doing one thing well.&lt;/p&gt;

&lt;h2 id=&quot;how-does-it-work&quot;&gt;How does it work?&lt;/h2&gt;

&lt;p&gt;All of this version management is handled with path shims. When you enter a command into your terminal, your shell looks through a series of directories to find the correct program to run. Those directories are in an environment variable called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PATH&lt;/code&gt;. The shell runs the first program to match the command.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv&lt;/code&gt; intercepts this sequence by prepending it’s own directory at the front of your path. Your ruby-based command will hit a shim instead of the actual command. This shim looks up which version of ruby to use and runs the real command with that version of ruby. It will look in the following places for that version:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RBENV_VERSION&lt;/code&gt; environment variable (could be set via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv shell&lt;/code&gt; command)&lt;/li&gt;
  &lt;li&gt;a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ruby-version&lt;/code&gt; file in the directory of the script you are running, or in any of it’s parent directories until it hits &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ruby-version&lt;/code&gt; file in the project directory, or parent directories to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;the global version kept in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.rbenv/version&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The appropriate ruby version is kept in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.rbenv/versions/&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;install-on-macos&quot;&gt;Install on MacOS&lt;/h2&gt;

&lt;p&gt;Assuming you use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;homebrew&lt;/code&gt; and &lt;strong&gt;no other ruby version manager is installed&lt;/strong&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;brew update
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;brew &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;rbenv ruby-build
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rbenv init&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To avoid the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv init&lt;/code&gt; command every time you login to your shell, add the following lines to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.zshrc&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.bashrc&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;eval &quot;$(rbenv init -)&quot;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.zlogin
&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; ~/.zlogin&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;** I forgot to install a new version of ruby and that caused some problems **&lt;/p&gt;
&lt;h1 id=&quot;todo-add-steps-to-find-new-stable-version-install-it-and-use-it-globally&quot;&gt;TODO: add steps to find new stable version, install it, and use it globally&lt;/h1&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Install a new version with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv install &amp;lt;version_number&amp;gt;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Check your current version with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv version&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Install gems as usual, but only for a given ruby version, with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gem install &amp;lt;gem_name&amp;gt;&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Remove ruby versions by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rm -rf&lt;/code&gt;ing the version directory or use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv uninstall &amp;lt;version_number&amp;gt;&lt;/code&gt; command.&lt;/li&gt;
  &lt;li&gt;Use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv local&lt;/code&gt; sub-commands to get, set, or unset an app-specific version.&lt;/li&gt;
  &lt;li&gt;Use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv global&lt;/code&gt; sub-commands for the system default.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/rbenv/rbenv&quot;&gt;rbenv docs&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://robots.thoughtbot.com/using-rbenv-to-manage-rubies-and-gems&quot;&gt;thoughtbot tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Mon, 06 Mar 2017 00:00:00 -0500</pubDate>
        <link>http://zachfedor.github.io/2017/03/switching-to-rbenv</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/03/switching-to-rbenv</guid>
        
        
        <category>developer</category>
        
      </item>
    
      <item>
        <title>MUTech Talk: Introduction To Basics of JavaScript Fundamentals 101</title>
        <description>&lt;p&gt;I just finished giving my presentation at Millersville University’s computer science club’s monthly meeting so here are my slides!&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://slides.com/zachfedor/js-101#/&quot;&gt;Presentation Slides&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/zachfedor/mutech-js101&quot;&gt;Demo Source Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Carlos asked me to do a talk on JavaScript that might complement a new required course for MU computer science majors. I was honored, and because I loved the &lt;a href=&quot;/2016/07/techlancaster-atomic-design&quot;&gt;last presentation I gave there&lt;/a&gt;, I instantly accepted.&lt;/p&gt;

&lt;p&gt;The class is an overview of building a web application and it’s one of the only web-related courses so it’s a lot to bite off for one semester. They cover databases, PHP, and HTML/CSS, but only JS if they can make time for it. Because Carlos is a pretty awesome club president, he wanted a talk to cover all the JavaScript things that this course might not get to.&lt;/p&gt;

&lt;p&gt;Then again, he asked me to do the talk, so maybe we can’t give him too much credit. ;)&lt;/p&gt;

&lt;p&gt;Thanks again for having me, MUTech!&lt;/p&gt;

</description>
        <pubDate>Mon, 27 Feb 2017 00:00:00 -0500</pubDate>
        <link>http://zachfedor.github.io/2017/02/mutech-js101</link>
        <guid isPermaLink="true">http://zachfedor.github.io/2017/02/mutech-js101</guid>
        
        <category>presentation</category>
        
        
        <category>developer</category>
        
      </item>
    
  </channel>
</rss>
