• 16 Posts
  • 221 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle

  • Read/Inspect and contribute to FOSS. They’ll be bigger and longer lived than small, personal, and experimental projects.

    Study computer science.

    Work, preferably in an environment with mentors, and long-/continuously-maintained projects.

    Look at alternative approaches and ecosystems. Like .NET (very good docs and guidance), a functional programming language, Rust, or Web.

    That being said, you ask about “should”, but I think if it’s useful for personal utilities that’s good enough as well. Depends on your interest, goals, wants, and where you want to go in the future.


    For me, managing my clan servers and website, reading online, and contributing to FOSS were my biggest contributors to learning and expertise.


  • Formatted, so I can read it

    Exception in thread "main" java.lang.NullPointerException: 
     Cannot invoke "String.toLowerCase()" because the return value of 
    "com.baeldung.java14.npe.HelpfulNullPointerException$PersonalDetails.getEmailAddress()" is null
     at com.baeldung.java14.npe.HelpfulNullPointerException.main(HelpfulNullPointerException.java:10)
    



  • Maybe something to add to the side-bar?

    The linked post doesn’t seem like that good of a reference that I would put it in the sidebar. IMO it could be done better. But if you mean to say, something like it; yeah, the .NET environment is vast and can be confusing, especially when new to it. An overview or reference to one makes sense.

    I suppose the term “.NET” encompasses both, but most of us that write and speak in this space tend to use “.NET Framework” for legacy, and “.NET” for modern .NET.

    there’s the whole “.NET Core” thing

    Before around net7, the open source cross platform non-framework dotnet was called Core. net6/7/8 is the .NET Core technology, but Core was dropped from the naming.

    Now, .NET may refer to that modern dotnet tech, or .NET Framework. Presumably, the latter is referred to only in contexts where it’s obvious that .NET Framework is meant.

    and .NET Standard (2 versions). […] Are those relevant in the world right now, today? Hopefully not really!

    .NET Standard is still relevant for libraries that target/publish for both .NET Framework and net6+. .NET Standard is the cross-platform baseline.


  • If you only care about contributing improvements, no, it doesn’t matter.

    If you want to at least be recognized as an author, and be able to say “I made this”, the license opposes that.

    Waiver of Rights: You waive any rights to claim authorship of the contributions […]

    I don’t know how they intend to accept contributions though. I guess code blocks in tickets or patch files? Forking is not allowed, so the typical fork + branch + create a pull request does not work.


  • I’ve been using TortoiseGit since the beginning, and it covers everything I need. Including advanced use cases. I can access almost all functionality from the log view, which is very nice.

    I’ve tried a few other GUIs, but they were never able to reach parity to that for me. As you say, most offer only a subset of functionalities. Most of the time I even found the main advantage of GUIs in general, a visual log, inferior to TortoiseGit.

    GitButler looks interesting for its new set of functionalities, new approaches. Unfortunately, it doesn’t integrate well on Windows yet. Asking for my key password on every fetch and push is not an acceptable workflow to me.







  • Using early returns and ternary conditional operator changes

    private boolean meetsRiderPreferences(Rider rider, Driver driver) {
        if (driver.rating >= 4.5) {
            if (rider.preferences.includes('Premium Driver')) {
                  return driver.isPremiumDriver;
            } else {
                  return true;
            }
        } else if (driver.rating >= 4.0) {
            return true;
        } else {
            return false;
        }
    }
    

    to

    private boolean meetsRiderPreferences(Rider rider, Driver driver) {
        if (driver.rating < 4.0) return false;
        if (driver.rating < 4.5) return true;
    
        return rider.preferences.includes('Premium Driver') ? driver.isPremiumDriver : true;
    }
    

    dunno if java has them, but in C# switch expressions could put more of a case focus on the cases

    private boolean meetsRiderPreferences(Rider rider, Driver driver) {
        return driver.rating switch {
            < 4.0 => false,
            < 4.5 => true,
            _      => rider.preferences.includes('Premium Driver') ? driver.isPremiumDriver : true,
        };
    }
    

    or with a body expression

    private boolean meetsRiderPreferences(Rider rider, Driver driver) => driver.rating switch {
        < 4.0 => false,
        < 4.5 => true,
        _      => rider.preferences.includes('Premium Driver') ? driver.isPremiumDriver : true,
    };
    

    The conditional has a true result so it can be converted to a simple bool condition as well.

    private boolean meetsRiderPreferences(Rider rider, Driver driver) => driver.rating switch {
        < 4.0 => false,
        < 4.5 => true,
        _      => !rider.preferences.includes('Premium Driver') || driver.isPremiumDriver,
    };
    


  • I’m thankful I am full stack and can do my stuff across borders. I hate the interfaces, waiting for stuff, or being hindered by dissatisfactory (to me anyway) stuff from them. So I’m glad when I have control over the entire stack - from talking to the customer to running production.

    Anything I don’t have control over - most if it doesn’t get done, the rest can be okay or bothersome.

    I hate that I don’t see what the admin set up and does on the infrastructure. It makes it harder to assess issues and potential issues and how they could correlate with infrastructure changes and activities…