• 0 Posts
  • 17 Comments
Joined 2 years ago
cake
Cake day: February 19th, 2024

help-circle

  • HereIAm@lemmy.worldtolinuxmemes@lemmy.worldPreference
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    8 days ago

    So I recently updated pop from 22.04 to 24.04. The only real headache I’ve had is running games through proton. Games now start in windows, which might not even show up at all until I super + F11 to full screen it. The mouse gets stuck in either a corner or the middle, sometimes the cursor works in the menus but stops working on the game itself. Gamescope can fix some of these issues, but alt-tabbing is always an adventure if it breaks the game or not.

    An annoying thing is it is very hard to figure out where an issue lies. Is it wayland, is it Cosmic, is it gamescope, or proton? Any tips or tricks people might have would be appreciated.

    It’s a shame, because I want to like Wayland. i don’t know what magic system 76 worked in x11 but the only issue I had before was some tearing when moving windows around. 2 monitors of different resolution and framerate with nvidia.



  • i and I are acceptable in small loops. But it depends a lot on the language used. If you’re in C or bash maybe it’s fine. But if you’re in a higher level language like C# you usually have built on functions for iterating over something.

    For example you have a list of movies you want to get the rating from, instead of doing

    for (i = 0; i < movies.length; i++)
        var movie = movies[i]
        ....
    

    Its often more readable to do

    movies.forEach { movie -> 
        var rating = movie.rating
        ....
    }
    

    Also if you work with tables it can be very helpful to name your iteration variables as row and column.

    It’s all about making it readable, understandable, and correct. There’s no point having comments if you forget to update them when you change the code. And you better make sure the AI comments on the 2000 lines of three letter variables is correct!






  • The first time I accidentally lost a number of files was when I wrote a script to rename some images from the format ddmmyyyy to yyyy-mm-dd. But I put the parsing and saved the variable only once outside the for loop, so all files ended up overwriting each other. Learnt my lesson to run untested scripts on files without a back up








  • I don’t need a project to explicitly say they are DEI inclusive, I generally don’t care who is contributing, but when you explicitly state you are against it in the README of your project that is just wild. The only divide I’m increasing by saying I don’t support or respect people who choose to, and makes it very clear they are, excluding people based on diversity is a divide they’ve created for themselves. Especially when it’s a fucking open source software project, like wtf does DEI have to do with it that the owner has to bring it up to begin with if not to intentionally hurt someone.