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

help-circle
  • 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)
    



  • 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…






  • Jira Server is the on-premise Jira, right?

    We had to change to Jira Cloud. (Vendor lock-in, mainly because of time-tracking appendix tools of that.) It’s horrendeous. UI and UX is horrendeous. The DOM is horrendeous. Performance is horrendeous.

    My CSS Hacks to fix the UI to a degree I can reasonably work with it are a lot more work now with the generated DOM class and ids. Sometimes they at least have test IDs which can be used.

    Some things, like the board component quick filter, are not even available anymore.

    The interactivity functionality is irritating and annoying most of the time.

    The browser extension we use further fucking up doesn’t help either of course.

    Don’t even get me started on Confluence. Which can’t even find pages when I type the exact page title, or ranks them low. And editing tables is a hassle beyond belief now that responsive tables (self-sizing) are gone. It’s wasteful on space too of course, with huge spacing.



  • Kissaki@programming.devtoProgramming@programming.devMaking GUIs, how do you pick?
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    9 days ago

    Blazor is incredibly versatile in terms of where and how you run it. The UI is in HTML and CSS, the generated runtime bindings in JavaScript, but you can code the backend as well as frontend logic in C# / .NET / Razor template files.

    It can render on the server or client, even work offline with WebAssembly and Service Worker, and dynamically switch between or combine them.

    You can also integrate it into Windows Forms, WPF, or multi-platform .NET MAUI with Webview2, which will render “as a website” while still binding and integrating into other platform UI and code.


    Your goals of “neat little GUI” and “as portable as possible” may very well be opposing each other.

    Main questions are what do you have (technologies); what are you constraints, and what do you need. Different tech has different UI tech. Overall, most GUI programming is a hassle or mess.

    If you want to dip your toes, use the tech you like, and look for simple GUI techs first. Don’t try to do everything/all platforms at once first.