• 16 Posts
  • 677 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle



  • I always thought, it worked quite well to have different areas with weaker or stronger enemies. That way, you have challenges to match to your character’s strength, but you still have a form of progression and you get shown your power-level when you pass through a low-level area again. Downside for game studios is that this requires good world building, to guide players where they should or should not go. And yeah, that wasn’t exactly Oblivion’s strong suit with mostly everything looking like a high-fantasy meadow…


  • I don’t know about New Vegas, but the trick with Morrowind is that when the guy tells you, you need to go to a cave west of town, that you then get lost, run into a naked barbarian and help get his clothes back, then you run into a lady who got robbed, but fell in love with the robber, so you help reunite them, and then you’re halfway across the map and have long forgotten that you were supposed to find a cave, but you had a much better time than you could have had in that cave.

    Also, the cave might be south of town. It happens. 🙃






  • Yeah, I guess, at some level this is satirizing that technical interviews almost demand golf code. When you’re writing such a small program, there’s an upper limit of how good “good code” can be. To look better than other candidates, you need to apply ‘clever’ (derogatory) strategies, where you solve it with a slightly more efficient solution. No one would care about this efficiency in a real-world scenario…




  • I think, your expectations are off for what a native integration would achieve. A kernel which has both a Linux API and a Windows API would be an insane maintenance effort. You’d naturally want the Windows APIs to simply be translated to the respective Linux API calls. This is what WINE does.
    In theory, if it’s directly integrated, you could do some dirtier stuff, i.e. call kernel-internal APIs, but you want to avoid that as much as possible, since those kernel-internal APIs are not nearly as stable as the public APIs.
    It should also be said that writing kernel-level code is hard. You cannot ever crash, you cannot ever make mistakes when managing memory, you cannot allow yourself any vulnerabilities. Again, you want to avoid writing kernel-level code, if you can.

    WINE has some additional ugly workarounds, like a virtualized filesystem. There’s not terribly much you can do about that. Windows applications may simply expect certain folders to be in certain paths. You can’t directly map that to a UNIX filesystem.

    As far as I can tell, pretty much the only advantage of natively integrating it, would be that it’s installed by default, which can be achieved in other ways (distros), and due to those ugly workarounds will not be popular at all. As much as I’m touting its horn right now, I do not want WINE on my system, unless I need it.

    It’s easy to be frustrated with WINE, because it does not handle all applications perfectly, and then think that the approach is just wrong. But yeah, no, some really smart folks came up with that approach. It’s just insanely hard to get the exact (undocumented) behavior of the Windows kernel APIs correct, whether you do a mapping or implement them natively.



  • On KDE, there’s actually a separate feature which provides essentially virtual desktops with changing wallpapers (and widgets and a few other things), which is called “Activities”. You can also then use multiple virtual desktops per Activity.

    I think, that’s kind of the main reason: Many people use virtual desktops differently.
    For some folks, they represent different larger topics, where the Activities feature would match very well.
    For others, virtual desktops are more like a second monitor, so they just want to see different windows, nothing more. In fact, some desktop environments like GNOME, create and destroy virtual desktops per demand. They couldn’t really remember the wallpaper for those workspaces.


  • I mean, yeah, I wrote it kind of humorously up there, but I do actually think state diagrams are a good idea and modelling the known error paths is part of real software engineering.

    However, I’ve never been in a project where anyone knew nearly enough about what we’re supposed to build, to be able to draw a state diagram before we got started. We would rather do a refactoring halfway through and then we would design a state machine to fit the requirements…


  • One time, we were drawing a state diagram of how the core loop in our application should behave. So, you know, first you have the preparation state, then when that succeeds, you go to the getting-things-ready state, then into the actual doing-things state, then the result-reporting state and so on. So, there was exactly one happy path.

    Then we figured, we should also diagram all the error scenarios. If an error occurs in the preparation state, we should transition to the result-reporting state. But if an error occurs in the getting-things-ready state, we’ll need to go to an intermediate cleanup state before we go to the result-reporting state, and so on.
    As we added more and more error paths, the arrows had to curve more and more, until the whole diagram eventually looked like an onion. That’s when I knew, we were doing real software engineering. 🙃





  • That honestly feels like a random, implicit thing a very shallow-thought-through esolang would do …

    Nope, you’re far from the truth there. Most functional programming languages have this feature, but it’s also definitely not shallowly-thought-through, as it’s essentially an extension of how maths works.

    Basically, in most cases when you see braces { } (excluding things like for-loops and imports), you can think of them as an expression, where the whole brace-scope will evaluate to just one value, similar to how “3+5” evaluates to a value. That one value is this last value at the end of the brace-scope.

    So, to give a very simple example:
    { 3 + 5 } / 4 evaluates to
    { 8 } / 4, so then the whole brace scope evaluates, which gives us
    8 / 4 and that’s then
    2.

    In maths notation, you know that as (3+5)/4, with parentheses instead of braces.
    Within this simple example, they do the exact same thing (and Rust does also allow you to use parentheses for this purpose).

    Where braces and parentheses differ, is that braces allow you to write multiple statements within them, so in theory, you could do:

    {
        let x = 3;
        x + 5
    } / 4
    

    Obviously, this is where this simple maths example largely stops making sense, but in real-world programming, there’s a lot of use-cases for this.

    It does take some getting-used-to, when you’re coming from hardcore procedural languages like C/C++, but yeah, it’s really not new for anyone who knows maths.