YouTubevideo· Aug 23, 2024· 8:52· 1,400 views on YouTube

I don't write code the way I used to

Watch on YouTube ↗
0:00

React at a moment you like. The best moments light up here.

transcript

21 moments
  1. no matter how old you are there's probably a lot of things that you do now or maybe you don't do now that younger you would be thinking why are you doing this or why aren't you doing that and yeah those questions could apply to a bunch of things in life and probably the important things of life but what about how you write code or how you think about code or how you think about writing code on today's episode we're going to

  2. be reading a short little article from Brent called I don't write code the way I used to that's Brent Roose Brent BR n DT on GitHub at stitcher. who was also creating the Tempest framework in PHP so stitcher. Brent I don't write code the way I used to August 7th 2024 just some housekeeping before we

  3. get reading the article if you commented on the giveaway that I ran last week on that YouTube video be sure to check your YouTube comments because I'm going to be replying to the winners to show how to claim your prize so let's get back into it I don't write code the way I used to I turned 30 last week and it made me realize I've been coding for more than half of my life now I took a moment to reflect on my programming skills after a decade and realized that 20-year-old me

  4. would probably face palal if he'd seen me write code today first I gave up on most abstractions oh how young me love them for present me abstractions are becoming more and more of a Rarity I just find that 95% of problems don't need abstractions they are better to be solved in place I remember I reached for abstractions whenever a problem could possibly need it instead of when I actually needed it I don't do that anymore second I find myself liking a

  5. functional mindset more and more it's just simpler I find it comfortable to split data and functionality to keep my code AS flat as possible I'm still using classes and objects in their internal state but overall these objects are looking more and more like functions data goes in dat it comes out that's it something I'm less proud of testing is still a struggle I don't really understand why I know testing makes my life easier I know it's good in the long run and still there's always a barrier to cross in part I think it's because of the friction and overhead that comes

  6. with testing Frameworks the setup mocking faking data it's really a shame that testing doesn't come more natural to me I force myself to do it and it always pays off but still next I'm using less fancy short hands I don't care about clever on liners anymore I'd prefer to write a verbose if El over cramming the same functionality in one line of code less is not always more another realization I can't live without static analysis anymore I remember using Sublime for the first two or three years

  7. of my professional programming career but I don't understand how I made that work have I become lazy to rely on my tools I don't think so I think I've optimized my tool chain to serve me better over the years let the computer do the boring things for me I'll focus on the things I like finally I'm still using PHP it has its quirks it's old it shows I know and yet it's okay it gets the job done in fact I like the language much more today than a decade ago I think the past 10 years have been great

  8. for PHP here's to the next 10 cheers I also turned 30 this year but I have not been coding professionally for that long in fact I haven't necessarily had a job coding professionally I've coded in jobs but that hasn't been my full-time job is just coding professionally and so I can agree and become familiar with a lot of these

  9. sentiments but at the same time it's very interesting to me the shift that takes place especially when I myself haven't quite figured out how I like to write code specifically mostly because I feel like I'm still learning how to write code better and I've talked about this at length in other episodes but I love just writing things and just you know putting code on the page and then figuring out okay was that the best way

  10. to do that was that not the best way to do that Etc especially when Brent talks about static analysis for example a lot of people with Livewire volt for example most people don't want to use Live Wire volt because there isn't much tooling around it yet in the sense that you don't really have static analysis because it's not a PHP file it's a blade file but there's PHP in it and then you don't have any kind of like type hints

  11. or any kind of like autocomplete and yet I love it mostly just because I've learned to write better and I think AI also helps me a lot with that aspect of just helping me write the stuff that I would have taken a few extra keystrokes to write but I think the thing that really stuck out to me with an article like this is usually when you get older you think less about oh like what what is other people

  12. thinking about the code I write instead how does it feel to you it's like that Vibe test of are you writing code because you want to write code or in this case he talked about how he's focusing on the things that he likes when it comes to writing code and that's the reason why I love doing the things I I do whether it's making videos or building a program or building a project or application or even just like short

  13. little demos that I make for videos most of the time I learn so much because I'm doing the things that I like because I'm being less fancy about things I'm trying to just get things on the page I'm trying to understand Concepts and so I'm having to Deep dive into certain things but at the same time I'm not necessarily deep diving so that it can be this beautiful code that comes out in the end

  14. and that is the Forefront or the uh Epitaph of a company's project a lot of the things that I do a lot of the way that I wrote code is just so that I can figure things out and so I can learn but so I can make something that I think is fun at the time and that's how I've learned that's how I've learned how to do the things that I do when it comes to testing that's also a struggle for me just because I probably haven't needed

  15. to and I know that most of the time I have this video on the Lille official Channel where I write my first test ever I've never I never written a test before that I haven't actually written a test since then but it's because I think I haven't been in that scenario where I have to be writing these codes to specific standard within a a company well I've put in like specific PRS at different projects and companies that

  16. I've been at it's never okay I need to fit into this particular coding style or I need to make sure I do this with this team it's usually okay here's like a quick 20 30 lines of code that I can just get by with and so I think as I grow older and again I just turned 30 this year as well as I grow older whether it's life code cre ation videos

  17. anything that I do I've learned that I'm prior I like to prioritize what makes the most sense and is just fun for me and usually those are things that I'm you know continuing to learn continue to improve upon continue to expand in my skill set and and I'm have taken that shift away from the stuff that I think looks best or the stuff that I think others might

  18. like more and even just just this YouTube channel in general this podcast and everything that I'm doing it's not really because I think it'll be good content I think it will be it it is but at the same time it's not because I it it's first because I like to do it second because I like to learn I think it improves my personal skill set and then third it's just because I I think the better the more I do those first two

  19. the better it becomes and so I think a lot of the things that Brent was talking about here is really just less about what the Outlook is on his coding style maybe what others had or maybe that he had personally and more about just doing the things that he likes to do focus on the things I like so as you grow older as

  20. you build make create things as you hopefully learn PHP learn laravel as you subscribe to this Channel or follow on the podcast what are the things that you're doing to make sure that you're improving what you like rather than just improving the things that you hope other people like so do that as you build as you make keep creating

  21. [Music]

just you here