WTF Bites





  • Yeah. There is also an old arcade game that had an occasional crash-and-reboot bug. The developer couldn't find the cause. In the end, he added some code that detected it after the reboot and restarted the game on the next level (maybe it added one credit as well, I don't remember the exact details).


  • Discourse touched me in a no-no place

    @Arantor said in WTF Bites:

    the turn based strategy segment that really goes to town on complex

    I've seen the GUIs for controlling physical systems (from nuclear power plants to large physics experiments). They're almost always made by people who believe that the most important thing is to Show All The Things at once. Truly terrifying amounts of complexity, and it probably takes quite a long period of training for anyone to be able to make any real progress on it.

    Most strategy games aren't that complex. Their UIs tend to be learnable within a few days at most.


  • Discourse touched me in a no-no place

    @Zerosquare said in WTF Bites:

    :phb:: Do whatever needs to be done. I don't want to see any crash dialog ever again!
    :wally:: No problem. I'll write an error handler that just exits the application instead.

    The other :wally: alternative is to make the crash handler disable the video driver.



  • @dkf I meant relatively speaking - the strategy segment goes to town far more than the HUD segment of gameplay does, for sure, and most of them have learned by now not to display all the things.

    But industrial stuff is nuts because “show all the things” can be relevant - even if to outsiders it is a dense and impenetrable maze.



  • @Arantor said in WTF Bites:

    But industrial stuff is nuts because “show all the things” can be relevant - even if to outsiders it is a dense and impenetrable maze.

    (the onebox is still showing the question even when being linked to specific answer)



  • @Bulb I like this comment:

    @JBentley, keyboard and mouse is not a user interface, just components for building one. You have to look at how the application assigns meaning to the keys and clicks. And there you have applications friendly to ordinary user whose job is something else and professional applications that are never friendly to beginner. Have you seen PhotoShop? Or Blender? They are huge mess of buttons and functions, but all professionals use them, because they are powerful. And applications have the advantage that a beginner can simply ignore the advanced functionality. In aircraft, you can't. –
    Jan Hudec
    Feb 14 '17 at 9:26

    Blender is a favorite target of people who complain about bad UIs. It's a complex program doing inherently complex things, and it's just not possible to design a simple UI that gives access to the complex things it does. Even if you strip away all the other stuff it does (animation, image/texture creation and manipulation, game logic, compositing, video editing, 2D animation, etc.) and limit it to modeling, it's trying to represent and manipulate 3D objects on a 2D window. Absent a 3D VR/AR interface, that's going to be complex to a newbie. Different kinds of object (meshes, parametric 2D and 3D curves and surfaces, etc.) have different kinds of interactions, which means different UI elements.

    And it isn't even "show all the things." The UI has several pre-defined window layouts optimized for different tasks. And you can save your own layouts that show the stuff you want to see for a particular task.

    Can the UI be improved? Probably. They've already redsigned the UI and moved all the cheese several times in the years I've been using it. (In "minor" releases. "Minor" releases also break plug-ins. Grr.) Can it be made simple and newbie friendly? Almost certainly not, IMHO.



  • @HardwareGeek Yes, exactly. When the complexity is inherent in the task, the UI will have to be complex and there is no way around it.

    Sometimes it would help if they forborne reshuffling stuff around though. Many users have already developed muscle memory and having to re-train it offsets any small improvements in ergonomy. Or it even leads to accidents like ANA B737 near Hamamatsu on Sep 6th 2011, violent left roll while opening cockpit door injures 2 cabin crew.



  • @Bulb said in WTF Bites:

    Sometimes it would help if they forborne reshuffling stuff around though. Many users have already developed muscle memory and having to re-train it offsets any small improvements in ergonomy.

    YES!!!!!


  • Java Dev

    @dkf said in WTF Bites:

    @Arantor said in WTF Bites:

    the turn based strategy segment that really goes to town on complex

    I've seen the GUIs for controlling physical systems (from nuclear power plants to large physics experiments). They're almost always made by people who believe that the most important thing is to Show All The Things at once. Truly terrifying amounts of complexity, and it probably takes quite a long period of training for anyone to be able to make any real progress on it.

    Most strategy games aren't that complex. Their UIs tend to be learnable within a few days at most.

    My dad drives trains for a living, and I've seen the occasional cab from the inside.

    Particularly the older ones tended to have the two most prominent displays be a voltmeter and an ammeter. Which were relevant approximately never.



  • @PleegWat I suspect they are not relevant while things work, but they become really important when things go south, so they are prominent so the engineer quickly notices the indications are off and what kind of fault they may suggest. Newer systems have monitoring logic, so there are appropriate warning lights instead and the voltmeter and ammeter don't need to be prominent any more.

    In aircraft it's similar; in older aircraft you need a bunch of temperature and pressure gauges that never move unless the engine is failing, but then you really need them to be able to recognize the fault. In glass cockpits they were replaced by overtemp/undertemp/overpressure/underpressure indications and a multi-purpose display that switches to show the values when they are non-normal.



  • @PleegWat I've never been in the cab of a real train (not an electric or diesel-electric one, anyway; I was once in the cab of a steam locomotive undergoing maintenance), but I do drive a train in Train Simulator fairly often, and the in-game cabs are pretty accurate reproductions of their IRL counterparts. The ammeter can be relevant when accelerating or decelerating, as it is possible to exceed the maximum allowed current if you try to accelerate too quickly. It really doesn't need to be the most prominent indicator, though.



  • @HardwareGeek said in WTF Bites:

    I was once in the cab of a steam locomotive undergoing maintenance

    There are regular :belt_onion: members, and then there is HardwareGeek...



  • @Zerosquare I'm not that old. This was 2001 or 2002, when Knott's Berry Farm was celebrating the 50th anniversary of Walter Knott's purchase of locomotives and rolling stock from the Denver & Rio Grande railroad (1951) and/or the opening of the railroad at Knott's Berry Farm (1952), and they were offering behind-the-scenes tours. One of the two locomotives happened to be in the shop for its annual boiler inspection and other major maintenance at the time.


  • BINNED

    Windows gets a bit confused about icons sometimes…

    a2a303fc-c08d-493a-a100-37a866a80144-image.png


  • ♿ (Parody)

    @Arantor said in WTF Bites:

    I don’t have my copy of VB5 any more.

    👀
     
     
    :seye:
     
     
    I know a guy.



  • @boomzilla I have thought about dipping my toes back into desktop dev but honestly why would I saddle myself with VB when I can embrace .NET?

    Oh god I drank the kool aid, didn’t I?


  • Discourse touched me in a no-no place

    @Arantor said in WTF Bites:

    why would I saddle myself with VB when I can embrace .NET?

    I don't need either to do desktop dev. Just sayin'…


  • ♿ (Parody)

    @Arantor said in WTF Bites:

    Oh god I drank the kool aid, didn’t I?

    Were there noodles?


  • Notification Spam Recipient

    @Arantor said in WTF Bites:

    @boomzilla I have thought about dipping my toes back into desktop dev but honestly why would I saddle myself with VB when I can embrace .NET?

    Oh god I drank the kool aid, didn’t I?

    Not at all. You'll have the opportunity to work with XAML - I heard it's wonderful.


  • Notification Spam Recipient

    @MrL said in WTF Bites:

    @Arantor said in WTF Bites:

    @boomzilla I have thought about dipping my toes back into desktop dev but honestly why would I saddle myself with VB when I can embrace .NET?

    Oh god I drank the kool aid, didn’t I?

    Not at all. You'll have the opportunity to work with XAML - I heard it's wonderful.

    a66273a3-e4af-4cd3-afc9-e05b2e1af770-image.png



  • @dkf I am curious, what would you suggest for desktop dev?

    (please don’t say Electron please don’t say Electron)


  • 🚽 Regular

    @Arantor said in WTF Bites:

    (please don’t say Electron please don’t say Electron)

    You're just asking for someone to mention NW.js, but I'm not going to be the one.



  • @MrL said in WTF Bites:

    . You'll have the opportunity to work with XAML - I heard it's wonderful.

    Honestly, I find XAML way better than the other desktop/mobile layout formats I've had the displeasure of having to use. I mean, you could have to wrestle with xCode and the abomination of xml that it produces.



  • WTF of my day (so far): In an intersection of two things that are crap, this one features both Visual Studio Code AND node.js. And macs, for a bonus. But also affects the linux versions.

    If you use nvm (the preferred way of running node locally so you can have multiple versions installed without epic pain), it needs to set itself up in the shell. But Visual Studio Code doesn't set tasks (such as compilation) up with a proper shell environment. So that makes using nvm fail. You can put a shell script into your /etc/profile (the mac location) which does the loading for you...but then Visual Studio Code complains that parsing the shell profile took too long and then nothing in the shell works. Until you close VSC and restart it. Then it works just fine. :wtf_owl:

    Oh, and there's an open defect since January 2020 on this topic.



  • @Arantor Based on previous @dkf, possibly Tcl/Tk.



  • @Zecc said in WTF Bites:

    @Arantor said in WTF Bites:

    (please don’t say Electron please don’t say Electron)

    You're just asking for someone to mention NW.js, but I'm not going to be the one.

    Isn’t that basically the same thing though?


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    @Arantor Based on previous @dkf, possibly Tcl/Tk.

    Exactly. It's still got the best layout engines I know. Even though they ought to be reasonably easy to port to other codebases (they don't really require anything that other toolkits don't have) nobody ever seems to have done so. Even pretty sophisticated options like the CSS grid layout feel awkward by comparison. (Complex grid layouts require non-trivial solvers behind the scenes to work right. That's why you don't write your own if you can help it.)



  • @Benjamin-Hall said in WTF Bites:

    WTF of my day (so far): In an intersection of two things that are crap, this one features both Visual Studio Code AND node.js. And macs, for a bonus. But also affects the linux versions.

    If you use nvm (the preferred way of running node locally so you can have multiple versions installed without epic pain), it needs to set itself up in the shell. But Visual Studio Code doesn't set tasks (such as compilation) up with a proper shell environment. So that makes using nvm fail. You can put a shell script into your /etc/profile (the mac location) which does the loading for you...but then Visual Studio Code complains that parsing the shell profile took too long and then nothing in the shell works. Until you close VSC and restart it. Then it works just fine. :wtf_owl:

    Oh, and there's an open defect since January 2020 on this topic.

    I've had something similar happen before, and it could be as much Windows' fault as it is VSCode. Occasionally, the system path will somehow revert to a state where %NVM_HOME% don't get substituted with the actual directory, and nothing can use npm, node etc until the system is rebooted. VSCode would sometimes forget the directories inside its own shell environment, and I've also seen normal VS do the same. At least with those I don't have to shut down everything (sometimes VS helps me out by crashing all by itself)



  • @dkf Tk also has bindings for other languages, if you don't like Tcl, including C/C++, Perl, Python, Java, Haskell, Lisp, and more. (Perl is the only one I've ever used, so I don't know how good or bad any of the others are. How good is the Perl binding? It's Perl; enough said. But it definitely does work, and it's not too difficult to use if you're competent in OO Perl.)



  • @dkf Constraint solvers? I've never really dug that far into layout engines. What little I've seen ... not something you do for funsies on the side if you want to do it properly.



  • @Arantor said in WTF Bites:

    what would you suggest for desktop dev?


  • Discourse touched me in a no-no place

    @Arantor said in WTF Bites:

    what would you suggest for desktop dev?

    f117ea13-adfc-47ff-99d6-90db2a0ab6a0-image.png


  • Discourse touched me in a no-no place

    @HardwareGeek I don't know the Perl bindings very well, but the Python ones are pretty good (so long as you avoid thread shenanigans, but you probably should avoid those in Python anyway). I don't write a lot of desktop apps at the moment — web service integration is more useful — so it isn't a big deal.


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    @dkf Constraint solvers? I've never really dug that far into layout engines. What little I've seen ... not something you do for funsies on the side if you want to do it properly.

    If you've specified that the space has to be split in a certain set of ratios between columns with some minimum widths (plus the starting hints from what the content components are and what space you've actually been given by the parent and/or window manager) then you end up with needing a (fast!) constraint solver to do right. And analogously for the vertical dimension.



  • @dkf said in WTF Bites:

    I don't know the Perl bindings very well

    Somewhere on SourceForge there is a desktop GUI application written entirely in Perl and Tk. (Programming confessions thread is :arrows:.) I haven't touched it in over a decade, but as far as I finished it, it worked quite well.



  • @cvi That's how the Auckland Layout Model works; I remember seeing it being used once, in Haiku OS. But only the once. It's an academic project so Proof of Concept (build the constraints and chuck them at a generic linear programming package) was good enough.



  • @Benjamin-Hall said in WTF Bites:

    nvm (the preferred way of running node locally so you can have multiple versions installed without epic pain)

    I'd consider the proper way to run node locally to be running it in a container. VSCode can do it almost automatically as the remote development - containers plugin has a wizard to set it up.

    I just tend to tweak the user definition at the end and install the `libnss-unknown` library.

    In Docker, the container should be running as the same user as you so you can modify the workspace files both inside and outside of the container. Because the user id is not known when the container is built, visual studio, when starting it, creates an extra layer where it modifies the UID of the user selected by last USER directive to match the calling user—provided running as user is properly turned on in the config.

    Now there is another hack. The libnss-unknown makes the system happy to run under any UID without it having to exist in /etc/passwd. I use that when running the same container on the build machine, because it's easier to set up. But VSCode does not know about libnss-unknown and keeps using its hack.

    Except with docker-compose that is, which I use for my main project currently. There VSCode does not tweak the container, so I just tell it to pass appropriate user id and rely on the libnss-unknown.

    If using podman in rootless mode instead of docker, you may want to set --userns=kee-pid as default option so that the logic setting the same user-id inside the container works compatibly.



  • @Bulb It is, theoretically, in a container (ie in the end it all builds docker containers which run in production/sandbox/etc). Except that since we have a bunch of services, they need to talk to each other. Which means a swarm. And Docker Swarm doesn't support step-through debugging.



  • @Benjamin-Hall I've never used Docker Swarm, but I orchestrate multiple containers in dev with groups of Compose files, wouldn't that get you where you need?

    Rig them up to share a Docker network in the Compose file and you should be good?



  • @Benjamin-Hall But does it build with docker build …, or does it build with npm or nvm or whatever first?

    The point of remote development - containers is that you start a container with whatever toolchain you need, the IDE docker execs the language server inside it and docker execs a shell inside it and you work there instead of directly on your machine. So you can have one project with this version of node and another with different one, and can easily tear down and rebuild them if something breaks. Plus it provides some layer of defence against trojaned npm libraries.



  • @Arantor said in WTF Bites:

    @Benjamin-Hall I've never used Docker Swarm, but I orchestrate multiple containers in dev with groups of Compose files, wouldn't that get you where you need?

    Rig them up to share a Docker network in the Compose file and you should be good?

    That's using docker swarm under the hood. I've never gotten it to actually listen for visual studio debugging before. Plus, having to restart the swarm every time I push a little change to it is obnoxious. Especially since unless you push the container to a registry each time, docker doesn't pick up changes to the container. Which means it'll happily use the old container unless you give it a new name each time. Which means updating the compose file. Or maybe I'm :doing_it_wrong: somewhere.



  • @Benjamin-Hall Node can do remote debugging, so it's a matter of opening some ports somewhere. But I've never done it for node. The language server should do it automatically for the remote development container though.



  • @Bulb said in WTF Bites:

    @Benjamin-Hall But does it build with docker build …, or does it build with npm or nvm or whatever first?

    The point of remote development - containers is that you start a container with whatever toolchain you need, the IDE docker execs the language server inside it and docker execs a shell inside it and you work there instead of directly on your machine. So you can have one project with this version of node and another with different one, and can easily tear down and rebuild them if something breaks. Plus it provides some layer of defence against trojaned npm libraries.

    In the actual, non-hacking around locally version, we do a docker build ... and then run it through a compose file. And minimum I need 5 containers all connected in a particular way.



  • @Benjamin-Hall The point of the remote development is to run the hacking around locally version in a container too. It can also run docker-compose, so you could have it start the other four containers besides the one you are hacking in. But it takes some understanding of the docker-compose hack to set that up. There are also some tools that do the same with kubernetes instead of docker compose, but I never tried them, because the “easy setup” without explaining how it fits together puts me off—when I already have something, I'd need to know what's going to happen.



  • @Bulb I guess it's worth looking in to some time when I'm blocked. How does it handle multiple languages in the same dev container? Right now, my setup is

    • Full set of containers running locally, with one (a PHP project) pointed at a local volume so I can hot-patch things there. Most of the rest are node containers; there is a database container as well, also with a local volume.
    • If I need to change the services (rather than the front end which is the PHP stuff), I point the PHP config at a local address outside the swarm and run the two that need to talk frequently directly in the debugger under a configuration that lets them talk to each other. This special config never gets committed.

    For a while I did it all in the containers, but restarting the swarm every time something changed was obnoxious. And I didn't have nearly as much introspection and debugging capabilities.

    Fortunately, I only need one version of node for my work.



  • @Benjamin-Hall well, I know it's possible to do what you're trying to do because I've done it in the past hooking up VS Code outside the container to PHP Xdebug inside the container running on port 9000, which does support Bulb's theory of it needing to open a port.

    Though I'm still not sure I agree with your assessment about swarm mode. If you're talking about changes to the container, yes, if you stop the container, Compose will default to reusing it but that's because it has no way to know the innards of the container (presumably a change to the Dockerfile) has happened.

    That said, docker stop container && docker rm container... but in any case Compose doesn't need the whole shebang to be turned off and on again unless the container you're running is bound as an explicit dependency of others in which case... not sure I can help you.



  • @Arantor said in WTF Bites:

    @Benjamin-Hall well, I know it's possible to do what you're trying to do because I've done it in the past hooking up VS Code outside the container to PHP Xdebug inside the container running on port 9000, which does support Bulb's theory of it needing to open a port.

    Though I'm still not sure I agree with your assessment about swarm mode. If you're talking about changes to the container, yes, if you stop the container, Compose will default to reusing it but that's because it has no way to know the innards of the container (presumably a change to the Dockerfile) has happened.

    That said, docker stop container && docker rm container... but in any case Compose doesn't need the whole shebang to be turned off and on again unless the container you're running is bound as an explicit dependency of others in which case... not sure I can help you.

    I can point outside vs code to PHP Xdebug. I haven't figured out how to do that with node, however.

    And as far as swarm goes--if I don't use the swarm mode, then I have to test all the ways that's different from swarm mode (because that's what our other environments use). So it's either swarm mode or individual containers connected via hardcoded ports. And I've not figured out how to get VS Code to debug a node container in swarms yet, and there you do have to at least scale the service to 0, remove that container, then scale it back up. That's about 10 more steps than just hitting the stop button and then the start button. And after all, :kneeling_warthog: is the ruling factor here.



  • @Benjamin-Hall said in WTF Bites:

    How does it handle multiple languages in the same dev container?

    Just give it a container with all the relevant tools installed. Which means you'll probably have to write a Dockerfile with a bunch of apt-get installs or yum installs or whatever base distro you use or maybe build instructions assembled from somewhere, but otherwise not a problem.

    And then you need to install the appropriate language plugins, and list them in the devconainer config so they will get reinstalled when you rebuild the container (the language servers and debugger plugin run in the devcontainer as that's where the tools are—vscode copies it's own runtime inside to run them there).


  • Notification Spam Recipient

    @loopback0 said in WTF Bites:

    @Arantor said in WTF Bites:

    what would you suggest for desktop dev?

    f117ea13-adfc-47ff-99d6-90db2a0ab6a0-image.png

    I was intrigued.

    Parents were also encouraged to dress as Kak then rush in on their young, sleeping children at 3am, and screech as loudly as they could: "Don't, don't, don't."

    Well then...


Log in to reply