• 0 Posts
  • 28 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle

  • Actually, there is one thing that is an annoyance that I haven’t been able to resolve. I use dvorak as my main layout.

    Sometimes games get the keyboard right and keys are remapped to qwerty layout (and typing still uses dvorak). This case works better than on windows, since playing a game there either required the game itself to recognize keyboard layouts (best case), or remapping the controls (annoying case), or switching to qwerty (frustrating for typing because I’m stronger with dvorak now).

    But sometimes instead it does the opposite and remaps the qwerty bindings to dvorak. As in, even if I swap layouts, wasd are all over the keyboard instead of all together. I need to exit the game, swap layouts to qwerty on the desktop, then relaunch for controls to work properly (and then I can sometimes swap back to dvorak in game and they continue to work). Often, the next time I launch the game, I’ll forget to switch it but it will just work this time.

    And sometimes it behaves like windows did where I can swap the layout in game and keys change as you’d expect.

    I have no idea why it’s inconsistent between these three options or where the “preserve key location despite the layout” feature is even coming from. Anyone have any idea about this?


  • I upgraded my gpu this weekend. Shut down, switched the psu off, swapped the old one out and new one in, booted into bios no issue (to check if I has left pcie on auto or needed to update it), then booted into the desktop (fedora cinnamon). Bam, after login only saw wallpaper, no mouse cursor or other UI.

    Well, at least it’s kinda working. Time to figure out what’s going on. Terminal works. There’s some errors in the log but nothing to do with amdgpu or firmware failed to upload or anything. Software render just shows up as black screen. Reset my cinnamon session and boot back to the same thing. Fuck.

    Then I try moving my mouse way over to the right and it shows up! Oh right. I have my TV plugged in for streaming to it sometimes and it ended up defaulted to the primary display, so my main desktop was only showing up there (and it was off). Right click, display properties, swap my monitor to primary, disable the TV until I turn it on.

    This is about the magnitude of the average problem I need to deal with on Linux. Something isn’t working like I want it to, half the time it’s actually working but I misunderstood something or the default doesn’t match my intent and I need to adjust settings and then it’s perfect or close enough.

    Or the other problem I had yesterday, tried monster hunter world for the first time and it wouldn’t launch. Played satisfactory for a bit instead (new gpu is noticeably smoother yay), then did a quick search, found that a specific version of proton works, switched to that version and it played. That’s the first game that has had such trouble for me.


  • It sounds like you might have some network places set up for windows to use but that are no longer reachable (or something along those lines) because that shouldn’t be taking so long so you might have things timing out in the background.

    Or your internet is slow and it’s taking a long time to communicate with one drive or send its screenshots of your document to their creep department.

    Or maybe a print driver that no longer exists still has an orphaned entry in the registry and it spends some time trying to locate it.

    Or malware has set up hooks for any new window that pops up but the print to pdf dialog is set up in such a way that it churns very inefficiently on that window specifically.

    I joke but any one of those might actually be what’s going on.



  • That’s the worst when your cycle time is very long. You fix a bug in the code, start your test running again and come back to check the next day only to see the exact same bug again and might think that your fix didn’t work and something more esoteric is going on (“maybe it’s a compiler or hardware bug!” (It almost never is)).

    Then you add a bunch of debug prints to really get a good idea of what’s going on and rerun the test. Either you remembered to save and suddenly the mystery bug is gone because the fix is still in the code. Or maybe you forgot to save again and now it looks like it’s not even reaching any of the code you added the prints to.


  • Thing is, if it just guesses what you meant instead of sticking to the standard, you can end up with ambiguous meanings. Like what if you forgot a character that wasn’t a semicolon but inserting a semicolon would turn it into valid code?

    Like:

    x = y z++;

    Inserting a semicolon would turn that into set x to the value of y and then increment z. But maybe the line is missing a plus instead of a semicolon and the intent was to set x to y plus z and then increment z.

    It’s a pain but strict syntax helps avoid frustrating to debug bugs.

    Taking it a step even further, you can make your code more robust by treating warnings similarly to errors. Even though the general cases usually still work despite warnings, they are great for avoiding edge cases that can also be difficult to debug. At least if you take the time to understand what the warning is really about and don’t just google “how to get rid of warning x” and add some casts or something you don’t understand to make the message go away.



  • Buddahriffic@lemmy.worldtoProgrammer Humor@lemmy.mlLearn to code
    link
    fedilink
    arrow-up
    29
    arrow-down
    1
    ·
    4 months ago

    Yeah, that’s something a shitty developer who is bad at debug would say.

    Bugs frustrate me more because I can often guess at why they are happening and how to fix them but can’t just apply the fix myself. Even more frustrating when there’s an update and I’ll think, “oooh maybe they finally fixed that annoying bug!” and then see it again shortly after installing the update.



  • I think you’re overfitting to the average here with your expectations. Especially basing that on the experience level of people who would sign up for help learning how to use Windows products. And even then, the ones learning about copy/paste for the first time will likely make more noise about it then those waiting to see if you’ll teach them something new or any that ended up in your training because their work made them or something.

    While the majority might lack familiarity, the 40 - 80 age range includes tons of people that have been working with computers (windows or otherwise) since before Windows was even a thing, including many who worked on Windows and/or developed applications for it. Experience will range from not knowing what windows is, knowing it’s the OS but not knowing what an OS is, to understanding what goes on in the kernel at a high level of detail.

    There’s a lot of people on Windows just because of inertia and Linux can handle a lot of the use cases. It makes perfect sense to me that someone, once they’ve seen that things aren’t so scary and different on the other side of the fence, would wonder out loud about why they thought their inertia was so strong.

    Your skepticism is more baffling to me than that.




  • How to Win Friends and Influence People by Dale Carnegie should be required reading for everyone. It’s full of things that are so obvious in hindsight but go against our natural instincts so we blunder through attempts to persuade not realizing that we might be increasing resistance rather than decreasing it.

    Like the whole, “you might be right but you’re still an asshole” thing. Being correct just isn’t enough. In some cases you get crucified and then after some time has passed, the point you were trying to convince others of becomes the popular accepted fact. And they might even still hate you after coming around on the point you were trying to make.

    That book won’t turn you into a persuasive guru, but it will help avoid many of the pitfalls that make debates turn ugly or individuals stubborn.

    Or, on the flip side, you can use the inverse of the lessons to become a more effective troll and learn how to act like you’re arguing one thing while really trying to rile people up or convince them of the opposite. I say this not so much to suggest it but because knowing about this can make you less susceptible to it (and it’s already a part of the Russian troll farm MO).


  • Yeah, I was going to mention race conditions as soon as I saw the parent comment. Though I’d guess most cases where the debugger “fixes” the issue while print statements don’t are also race conditions, just the race isn’t tight enough that that extra IO time changes the result.

    Best way to be thorough with concurrency testing IMO involves using synchronization to deliberately check the results of each potential race going either way. Of course, this is an exponential problem if you really want to be thorough (like some races could be based on thread 1 getting one specific instruction in between two specific instructions in thread 2, or maybe a race involves more than 2 threads, which would make it exponentially grow the exponential problem).

    But a trick for print statement debugging race conditions is to keep your message short. Even better if you can just send a dword to some fast logger asynchronously (though be careful to not introduce more race conditions with this!).

    This is one of the reasons why concurrency is hard even for those who understand it well.



  • Yeah, I wish C++ had function/scope epilogs and labeled loops/breaks, too. Those are the cases where the “never use goto” rule can be broken to make better code than adding all of the code that would be required to handle it the “right” way (setting up early exit flags and if statements after each level of nested loop to check the flag).



  • I didn’t expect to click on a VLC appreciation thread agreeing that it’s awesome only to end up maybe switching to MPV based on the comments, but such is life I guess.

    I will remember it just like I will remember winamp, as one of the greats of its time.