Developer Productivity, v2

Why Reinvent the Wheel

ThePrimeagen
terminal
Developer Productivity, v2

Check out a free preview of the full Developer Productivity, v2 course

The "Why Reinvent the Wheel" Lesson is part of the full, Developer Productivity, v2 course featured in this preview video. Here's what you'd learn in this lesson:

ThePrimeagen discusses the importance of reinventing the wheel in software development to gain a deeper understanding of how things work and to appreciate the complexity of certain tasks. He also emphasizes the importance of creating a solution that suits your own needs and preferences, rather than relying on generalized solutions.

Preview
Close

Transcript from the "Why Reinvent the Wheel" Lesson

[00:00:00]
>> ThePrimeagen: So I love reinventing the Wheel. It's my favorite pastime. Every single day of my life, if I can spend five to 10 to 20 minutes reinventing some wheel, it makes me happy. A lot of it just comes down to just appreciating what it takes to make software.

[00:00:15]
Every now and then you see this a lot, especially with like younger or newer folks into the industry. Is they'll be like, why can't they just do this, all right? And their head software simple, still. It still has this veneer that it's everything is accomplishable, very easy and very quick, and so you just don't have that fundamental appreciation of how difficult it was.

[00:00:33]
It sounds so easy in principle and in reality, it should be simple. You have a bit of memory. You need to display it. That's all it should be. But we've convinced ourselves to wrap everything in configuration and abstractions that it makes things actually really hard to do, which should seem simple.

[00:00:46]
So I think to the layman person, things feel like they should be easy and often they're very hard. So reinventing the wheel helps cure you of that sickness over, and over, and over again. So I highly recommend that you do that. And you also learn a lot about the topic along the way, right?

[00:01:00]
Whatever you're reinventing, you will learn more about you will become more of an expert on it, and those really kind of hazy boxes that you have drawn in your head will become much more concrete, and you'll understand what's inside of them. And you'll also become a better engineer, because you'll be able to gauge what it takes to build something more and more accurately, because I think that you'll start seeing all these weird corner cases that will inevitably come up.

[00:01:22]
And it's easier for you to have that in your head loaded up because you've already solved a bunch of stuff. Like a really great exercise is building HTTP 1.0 or 1.1 from TCP. Not hard. Most of it's really, really simple, but then you'll realize that there's like, 900 edge cases, and that's where for all the time, and that's what makes making that HTTP server really complicated.

[00:01:43]
And you realize, this is why all this stuff is complicated, just getting the message is simple, but we have all this legacy and crap in the way that makes us have to do all these strange things. And now look at where we're at, and then you just gain a whole new appreciation for things.

[00:01:57]
All right, so my current bash setup, this is obviously subject to change about once a year to twice or once every two years, I try to rethink or readjust or make my stuff better. I never again want to be that meme of the continual pursuit of perfection. I don't have to have things be perfect.

[00:02:13]
I don't really care if things are perfect. I just want them good enough. And I want them to just take care of the 98% of problems. Is I'm fine doing things manually. If it's rare, I try never to automate the rarities. I try to automate the everyday. When I want to go to my editor, I want that to be fast.

[00:02:30]
When I want to go back to my browser, I want that to be fast. I don't want those little things to be fast that are just that just take way too much effort and give you very little of anything. All right, so we're gonna set some goals. I wanna be able to bootstrap my machine that I'll purchase in the future that is Ubuntu based.

[00:02:46]
Now you guys can make it Mac based or Windows based. I'm not sure what Windows uses, any files. I don't know how they work over their PowerShell. I hear PowerShell a lot, and so I'm not gonna even try to be clever. Not gonna try to do multi OS style.

[00:02:57]
But it's not hard when it comes to bash, right? You just Have two scripts, one that does brew install, one does a bash install. You don't have to abstract it into some sort of abstract installer that does platform independent, you're just reinventing Ansible if you go down that route.

[00:03:11]
Just keep things simple. If I need a Mac install script, I'm just gonna create a Mac install version. I just don't use Mac right now and I'm gonna keep on going as long as I can until I'm forced to use some other operating system at some point in my life.

[00:03:22]
I wanna be able to install my favorite libraries. I want to bring down repos that I actively maintain because there's just a set of repos that I prefer to just have locally right away on any machine. I want to be able to build NeoVim from source, I love NeoVim.

[00:03:35]
I wanna be able to use all the tools that I just like. I want them available and I wanna copy. My .files over to my environment. I like them separated. I no longer like to use symlinks to my dot files. I just like the process of this is where I'm going to edit it.

[00:03:52]
So when I go there, I intentionally edit it. I can make sure I commit it. I can make sure everything's up to date. And then I can make sure everything's copied over and everything's good cuz or else, whenever it's really loosey-goosey like that, I tend to forget the little things.

[00:04:04]
I don't navigate to a directory. I don't have all those things set up. And then, boom, I forgot I made all these updates. And then the updates become kind of out there. Or even worse, I create a little file that I need somewhere on my system. And it's not a part of the symlink category group.

[00:04:18]
And it just never makes it into Into my dot files, because I don't have that kind of habit built in. So I just prefer the copy approach. I just think it's the best that's just me. I'm gonna keep on doing it. That's that. I just really just want it all.

[00:04:31]
I just want to be able to automate my system the greatest automation language of all time, which, of course, is bash, the greatest language ever, and rolling your own. There's actually kind of some other versions of this project out there. I've seen like dot bots, like one that it's similar, but it's meant to be very generalized so that everybody can have there.

[00:04:48]
So a lot, again, a lot of configuration over convention. Just not for me. Second, I think there's Yadam is another one. Again, a lot more configuration. It's meant to be the general solution. I'm not trying to make a general solution here, I'm trying to make a solution that I like, that I can hack on, that I can be exactly the way I want.

[00:05:07]
And I'm also not foolish. Anytime you build something just for yourself, it's also up to you to maintain. So don't forget that. You gotta judge what is worthy of your time, and whatever you think is worthy of your time, make sure you do it well and do it great and make it exactly the way you want it.

[00:05:22]
And the things that aren't worthy of your time, don't do it. There's an excellent article, his name's I think it is. If you've heard of his name, I think that's what it is. He has kind of like a theory about when should businesses write software themselves as opposed to using libraries and all that.

[00:05:38]
And his whole argument comes It comes down to if it's business critical, you should write your own, even if there's already one available. If it's what you do, that's the thing you write. And so for me, the thing I do is I develop. So I write my own environment.

[00:05:50]
I feel like that's the business critical use case for me. It's just a approach I like to make right now. And maybe one day I'll change that. And question.
>> Student: I just wanna add that in front of master's case, it's our courses player, it's the environment. So we wrote all of that from scratch.

[00:06:06]
>> ThePrimeagen: Yeah, I think that's the way to go. I personally think that you always build your own Mote by having it exactly the way you want it.
>> Student: Every time we go back to the software, there's not like dependencies to update. It's just like you just add the feature.

[00:06:18]
>> ThePrimeagen: It's true.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now