• 0 Posts
  • 527 Comments
Joined 2 years ago
cake
Cake day: July 3rd, 2023

help-circle
  • Code readability is important, but in this case I find it less readable. In every language I’ve studied, it’s always taught to imply the previous condition, and often times I hear or read that explicitly stated. When someone writes code that does things differently than the expectation, it can make it more confusing to read. It took me longer to interpret what was happening because what is written breaks from the norm.

    Past readability, this code is now more difficult to maintain. If you want to change one of the age ranges, the code has to be updated in two places rather than one. The changes aren’t difficult, but it would be easy to miss since this isn’t how elif should be written.

    Lastly, this block of code is now half as efficient. It takes twice as many compares to evaluate the condition. This isn’t a complicated block of code, so it’s negligible, but if this same practice were used in something like a game engine where that block loops continuously, the small inefficiencies can compound.



  • Apart from the bias, that’s just bad code. Since else if executes in order and only continues if the previous block is false, the double compare on ages is unnecessary. If age <= 18 is false, then the next line can just be, elif age <= 30. No need to check if it’s also higher than 18.

    This is first semester of coding and any junior dev worth a damn would write this better.

    But also, it’s racist, which is more important, but I can’t pass up an opportunity to highlight how shitty AI is.


  • Unrelated to this OG topic, but I was going on a snowboarding trip a few years ago and got a rental car via Turo, which is basically air bnb for vehicles. I met the owner at the airport and I took off after everything was loaded. 30 some minutes late I get to resort, turn off the vehicle and start getting dressed to hit the slopes. I realized I didn’t have the key, so we called the guy and he still had it. Since the vehicle was running, we were able to leave with no issue. He met us at the mountain to drop off the key.

    I had a similar experience another time on a snowboard trip, where I went down to the vehicle in the morning to warm it up and scrape the windows. I went back in inside grabbed my stuff and stopped at the gas station about a mile down the road. I noticed a light that said no key fob on the dash and thankfully without turning the car off, went back to the hotel and found it in the room. That one would have been tough because I went another hour out and didn’t have someone to call since it was a rental.

    I guess my point is, you shouldn’t be allowed to put a car in drive or reverse if the key fob isn’t detected.








  • The first time I setup Arch from scratch (no archinstall) it took me about 7 hours to get a working desktop environment. A lot of that was figuring what specifics I wanted, like boot loader and desktop environment. If you aren’t already familiar with Linux architecture, the kernel, and basic terminal commands, you will be spending a lot of time on the Arch wiki. If you do already have a decent understanding of these concepts, then you will also spend a lot of time on Arch wiki.

    Honestly, based on this response from you, Arch isn’t this distro for you. It’s work to setup, it’s work to configure, and it’s work to maintain. I jumped straight in myself with basically no Linux experience but about a decade of experience as a sys admin and power user for Windows. It’s been a couple of years and I have no desire to even branch out because I enjoy the tinkering and resources.

    I have an Nvidia GPU and the first 6 months I had issues, but there have significant improvements and now I almost never have any GPU related.

    An example of needing to fiddle with things, I couldn’t get audio to pass through my HDMI the other day when hooking my laptop up to a TV. I had to install a couple missing packages and then I was able to see the HDMI option in my sound settings, so then I could sell that as my output. Arch won’t ever tell you what you need, it just won’t work, so you have to read and figure it out yourself. Fortunately, the community is huge and the Arch wiki is fantastic. There are some shitty neck beards that like to gate keep, but ignore them and your experience will be better.








  • Get off anything news related and tell your girlfriend to knock it off. My wife used to send things or bring it up in conversation, and I tell her I don’t want to discuss any of this, because it pisses me off. It’s extremely selfish of your girlfriend to continue to send things after you’ve expressed your desire to not receive it.