• 17 Posts
  • 161 Comments
Joined 6 years ago
cake
Cake day: May 31st, 2020

help-circle

  • The thing I never understood about PowerShell is that it’s partially more verbose than C#, which is one of the most verbose programming languages in existence. It just feels like you might as well go for a full-fledged programming language at that point.

    The appeal of Bash et al is that the scripting is almost the same as the interactive usage, which you already know. But because PowerShell is so verbose, I’m really not sure people do use it interactively.

    I guess, that code snippet in the article makes somewhat of a difference, in that PowerShell offers better features for interop between processes. But man, that still feels like it could’ve been a library instead…


  • Ephera@lemmy.mltoMemes@lemmy.mlA new insult each and every day
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 months ago

    That’s kind of why I never feel great about buying video games. The price is pretty much entirely arbitrary.
    Like yeah, they did an investment, it is fair that they recuperate that. But the actual price they need to ask of each customer entirely depends on how many customers there are.

    And so, they will always start out asking more than what they expect to need to ask of each customer, which just feels like I’m paying too much.
    But even when they do put it on sale, there’s likely going to be sales in the future where they sell it for even less. It’s not like they need to empty out a warehouse or such, where they put up uniquely low prices. So, even when I could get a game on a sale, I’ll feel like I could also just wait longer…




  • I agree in general, that a crash is much better than silently failing, but well, to give you some of the nuance I’ve already mostly figured out:

    • In a script or CLI, you may never need to move beyond just crashing.
    • In a GUI application or app, a crash may be good (so long as unsaved data can be recovered), but you likely need to collect additional information for what the program was doing when the crash happened.
    • In a backend service, a crash can be problematic when it isn’t actually necessary, since it can be abused for Denial-of-Service attacks. Still infinitely better than failing silently, but yeah, you gotta invest into logging, monitoring and alerting, so you don’t need to crash to make it visible.
    • In a library, you generally don’t want to trigger a crash, unless an irrecoverable error happens, because you don’t know where it’ll be used.

  • Currently implementing error handling for a library I’m building and the process is basically to just throw all of the information I can find into there. It makes the error handling code quite verbose, but there’s no easy way for me to know whether the underlying errors expose that information already, so this is actually easier to deal with. 🫠



  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlCareer Advice
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 months ago

    Last year, money was running out in our project and the guy who had trained me decided he’d take the L and move to another project, so we could continue in the project. And yeah, suddenly I was in the role of the lead developer.

    Like, don’t get me wrong, I would’ve been the one to be moved to another project, if I wasn’t up for the task. It’s not like I was a complete dumbass.
    But it did still feel more like “I guess, we doin’ lead development now” rather than something I had intentionally worked towards.




  • Ephera@lemmy.mltoRPGMemes @ttrpg.networkDoomed
    link
    fedilink
    English
    arrow-up
    7
    ·
    10 months ago

    Yeah, people would understand it, but would look at you funny.
    Partially, because they’re just not used to it. “Hochseil” and “seiltanzen” are composite words, but are also just used commonly, so they have made it into the dictionary as separate entries. Meanwhile, “hochseiltanzen” is merely a neologism at this point.
    But it does also just sound like you’re really shoehorning in that you’re specifically walking on a high wire. Like you’re just bragging about it.

    What’s also kind of funny, is that we have nominalization in German as well, so where a verb (or other word) is used as a noun, and using “das Hochseiltanzen” as a noun does not sound out of place to me. In fact, when I throw “hochseiltanzen” into a search engine, I get four results, all of which use it as a noun and like it’s a completely normal word that does not need explaining.


  • Ephera@lemmy.mltoRPGMemes @ttrpg.networkDoomed
    link
    fedilink
    English
    arrow-up
    27
    ·
    10 months ago

    It certainly isn’t just nouns, you do have classics like “zusammensetzen” (put together) and “verschlimmbessern” (to make something worse, despite attempting to improve it).

    But yeah, I’m having a hard time coming up with a particularly long composite verb that still makes sense.
    Usually, it’s one word + a normal verb to kind of change the meaning of the verb, like “tanzen” means “to dance”, and “seiltanzen” means “to walk on a tightrope” (literally: “to rope-dance”).

    And while you could theoretically extend it, e.g. as “hochseiltanzen” (“Hochseil” is a tightrope that’s high above the ground; literally “high-rope”), we just say “auf dem Hochseil tanzen” instead (“to dance on the high-rope”).
    Or I guess, you’d specify that it’s a Hochseil once and then say “seiltanzen” in the following sentences.


  • I happen to be a software developer, so I hope you’re in for an info dump:

    Webpages are generally designed as documents. You type a URL into your browser, it downloads a webpage document and displays it. This simple concept also allows for hyperlinks and browsing history, which just put another URL into your browser, so that it downloads and displays a different document.

    But it does not work for everything. For example, this meme was brought to you by the web version of Microsoft Teams™, where if you were to switch between pages by downloading entirely separate documents, then you’d get kicked out of calls every time you do so.

    This is why the entirety of MS Teams is using a singular document. It’s a so-called Single-Page Application, SPA (*insert scary music here*).
    When you click on a navigation element, it doesn’t put a new URL into your browser for it to download. Instead, some JavaScript monstrosity starts churning, downloads whatever information it needs and then modifies the displayed document, so that it looks as if you had navigated away.

    To make it extra confusing, it also does typically change the displayed URL, it just doesn’t instruct the browser to download+display the respective document. It does this, because it tries to emulate a normal, document-based webpage, with browser history and where you can link to subpages.

    Well, and this is then why opening in a new tab is often broken. Because there is no link there. It has to emulate the behaviour of a link via JavaScript just as well. If the developers do a bad job at that and never try out shortcuts like middle-click or Ctrl+click, then they may never get implemented.


    Having said all that, there’s also a chance that the devs decided to intentionally hinder opening in a new tab.
    Because MS Teams and other SPAs are JavaScript monstrosities, downloading+displaying the document anew like when opening in a new tab takes an obscene amount of time.
    And having two tabs of it open means that you get two notification sounds for each notification, and users might accidentally join multiple calls.

    But yeah, that I can’t have a call in fullscreen on one monitor and respond to chat messages on another monitor, without jumping through hoops like in the post, that’s just bad either way.


  • Well, in this case I’m merely talking about the webpage not giving access to the right-click menu, as well as to shortcuts like middle-mouse-click and Ctrl+click, which would normally allow you to open parts of it in a new tab.

    If a webpage were to actually check for cookies, to try to detect whether you’ve got two tabs of it open, then yeah, Container Tabs would be a solution for that, since it isolates the cookies.





  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlDiligence
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Yeah, I feel this one. We currently have significantly less dev velocity than the velocity at which requirements come in. So, unless something actually is the highest priority *right now*, there’s a pretty low chance of it ever being worked on.

    And then, yeah, I can be “professional” and say that we’ll work on it when we find time for it. That’s technically not a lie.
    But we both know that it’s not going to happen, so it’s actually better for the customer to take that reality at face value and find another solution.


  • I mean, you should do general logging either way, since you won’t have a debugger attached when running in production. And then you can typically scroll back in the logs, too, when the debugger has paused execution.

    What this meme is talking about, is adding ad-hoc logs to narrow down where an error occurs while developing. So, bullshit logs like console.log("1"), followed by a line of potentially bad code and then console.log("2”). Log lines which you’ll remove again when you’re done debugging…


  • I figured, I’d involuntarily sign up for counter suggestions by posting this. 😅

    Using lib.escape is a good idea, thanks.

    But yeah, basically I want to configure Alacritty and I’m using the respective home-manager module.
    Even more specifically, I want to pass stuff, including a regex, into the settings parameter, which more-or-less just takes the Nix expression that I shove in and then outputs it as TOML on disk.

    As for how I would’ve liked this to work:

    But the TOML is templated with "double-quotes", so I do need to escape the regex after all.

    I did just try to understand how the Alacritty module does the templating and found this gem:

    # TODO: why is this needed? Is there a better way to retain escape sequences?
    "substituteInPlace $out --replace-quiet '\\\\' '\\'"
    

    Source

    So, that doesn’t fill me with a whole lot of confidence. 🙃

    But yeah, it’s working now without me having to write a whole bunch of backslashes, so that’s good enough in my book.


  • I guess, there’s technically nothing which dictates that a debugger has to work by stepping through a program. It could also present you some diagram of variable values changing over time. But yeah, gonna be hard to find a more useful representation than those values being interleaved with your logs, at least for most applications. I have heard of more advanced debuggers being used in gamedev, which makes sense, since logs aren’t nearly as useful there.

    But yeah, given that most people think of the stepping debuggers, them being the default advice does feel emblematic of our industry still shying away from concurrency.