• 0 Posts
  • 396 Comments
Joined 1 year ago
cake
Cake day: August 24th, 2023

help-circle







  • For durability and smallest features, a metal unibody types that don’t have seams are great.

    For performance, I opt to have an nvme SATA enclosure that is USB 3.1 capable. Copying 15 GB in a minute or 2 is so satisfying. Plus my god being able to easily change the nvme SATA drive on the fly if needed and it being able to go up to a few TB without loss of performance is just to good

    For price, nothing beats free. Just don’t expect much more than what you get.



  • Yeah Linux still has plenty to work on. It’s unfortunate how limited the support is. If game and app developers could target Linux, then the cost to support and maintain would be lower than they have to do with Windows. Unfortunately, market share and power of defaults work against us.

    If you can, look towards getting a steam deck. At least that is a Linux thing that is pretty decent and portable.




  • Acters@lemmy.worldtoProgramming Humor@lemmy.worldCompareBooleans
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    9 days ago

    I should have created a local variable to store the result variable and return after the if statements. I just couldn’t help to make it look partially nice. My brain just doesn’t think at this high caliber of LOC optimizations.

    New optimized LOC version:

    internal static bool AreBooleansEqual(bool orig, bool val)
    {
        bool result;
        if(orig) 
        {
            if(val)
            {
                result = false;
            }
            else
            {
                result = true;
            }
        }
        else
        {
            if(val)
            {
                result = true;
            }
            else
            {
                result = false;
            }
        }
        return result;
    }
    

    My previous LOC: 12
    New LOC version: 27





  • Acters@lemmy.worldtoProgramming Humor@lemmy.worldCompareBooleans
    link
    fedilink
    English
    arrow-up
    21
    ·
    edit-2
    9 days ago

    Those are rookie lines of code numbers right there.
    I would have done it without the ==

    internal static bool AreBooleansEqual(bool orig, bool val)
    {
        if(orig) 
        {
            if(val)
                return false
            return true
        }
        if(val)
            return true 
        return false
    }
    

    Don’t know why their code returns false when they are equal but I’m not going to dig through old code to refactor to use true instead of false.




  • Depends on vehicle and load requirements too, if your load it just only you and sometimes passengers then getting a car that can do 10% fast charging for only 15 minutes and still go pretty far is great. On the other hand the Silverado EV is best range EV truck available as of 2024.

    The 10 percent challenge from our of spec is best one I found for road tripping scenarios. https://outofspecstudios.com/10-challenge (mobile browser not recommended ) their other graphs are really nice too.

    Unfortunately, the only cars that do get proper range from the 10 percent challenge is just too expensive, such as the Porsche taycan(especially 2025 version being insanely fast charging with efficiency) and Lucid sedans.