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

help-circle
  • 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.




  • Don’t think you can do any ‘better’ than your lactose-intolerant cop-out.

    This is going to sound Buddhist AF, but the problem is that in most cases, it’s not the vegans introducing the conflict, but rather this conflict existing within the people who take offense.
    They don’t feel steadfast in their morals and often don’t feel confident in their identity or self-worth either, so when someone comes along who does something they perceive as morally superior, then this confronts them with their internal conflict, which makes them feel like they’re being attacked.

    So, the two ways to avoid the conflict, as others already suggested, are:

    • Never bring up that you’re vegan, or
    • Give them a reason why you can do the morally superior thing more easily than them.

    That you’re lactose-intolerant is perfect. Especially with many people not understanding what that entails precisely, you can say that you can’t eat many foods anyways, so might as well go vegan. Or that it’s even sometimes easier to just pick the vegan variant, as you’ll know no dairy is in there.
    This is still not easy to use as a cop-out. You’ll regularly encounter people who might take offense, and you’ve got basically just two sentences or so, to defuse that situation. This is why many vegans stop caring, if someone wants to be offended. It’s too tiresome to be a people-pleaser.


  • Right, so this is the part where I get to sound like a smart ass, because I snuck a “tons of” into there.

    What you do always need, is tests serving as a specification of the intended behavior, to document it for your team members and your future self.
    But the thing that static typing is an alternative to, is integration tests for many code paths. For example, in dynamic languages you have no reassurance that a call to your database library still works, unless you have an integration test which actually calls into the database. Similarly, you hardly know whether the many error-handling code paths are working, unless you write tests for those, too.
    In static languages, we don’t test this stuff outside of the specification-like integration tests, because the database library and the error handling library are already separately tested, and the type system ensures that we interface with them correctly.


  • Eh, it’s most definitely part of it, but the biggest time sink that I expect when working with Python is fixing the build system every two weeks on different devs’ PCs. I do imagine, if you eventually find a solution that works on most PCs that this workload will go down, but we had a substantial Python part in my previous project and over the course of the 1½ years that we worked on it, it really felt like we were making negative progress. Near the end of it, I couldn’t use PyCharm anymore, because I couldn’t figure out for the life of me, how to make it recognize the dependencies again.






  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlI love Rust
    link
    fedilink
    English
    arrow-up
    2
    ·
    17 days ago

    Well, because I’m of a very different opinion about its readability. If you know the format, then sure, you can mostly read it as expected. But our logs are often something that customers or sysadmins will want to read. If it says Retrying in PT5S... in there, they’ll think that’s a bug, rather than a duration.

    And yeah, I almost figured it was for de-/serialization. I guess, that’s something where I disagree with the designers of Java.
    In my opinion, you don’t ever want to rely on the implicit behavior of the language for your serialization needs, but rather want to explicitly write down how you’re serializing. You want to make a conscious decision and document that it’s the ISO 8601 format, so that if you need to hook up another language, you have a chance to use the same format. Or, if you need to change the format, so that you can change the one serialization function, rather than having to find all the places where a .toString() happens.

    Admittedly, the Java devs were between a rock and a hard place, due to them having to implement .toString() and the meaning of .toString() being kind of undefined, i.e. it’s never stated whether this is a format for serialization, for debugging or for displaying to the user. And then I guess, because it didn’t explicitly say “for debugging” on there, they felt it was important to go with a standard format.


  • The article is misleading. The official statement is that, because of our Nazi past, we have a special relationship with both the international Court of Justice and with Israel, so we’re just not going to formulate a decision until Netanyahu actually plans to visit Germany. In effect, this means that Netanyahu cannot visit Germany, because there is a non-zero chance of him getting arrested.

    In a press conference, when repeatedly asked to clarify this statement, the speaker explained why this statement is so neutral once more and then said “I could get carried away, saying I find it hard to imagine that arrests might be carried out in Germany on this basis”.

    So, it’s formulated as:

    • his opinion
    • that he’s explicitly saying, he’s not actually saying it,
    • and after repeatedly pointing out that the official position is not that.



  • For me, the biggest red flag is that they decided to create their own protocol when the Fediverse is well on its way with the ActivityPub protocol. They claimed, they decided against ActivityPub, because they expect to be able to come up with something technologically better.

    I don’t doubt for a second that some of their techies might have wet dreams about that, but it wouldn’t get financed, if their management and investors didn’t see an angle for making money off of it.

    Which is ultimately what this is. Yet another venture-capital-backed company trying to get enough users on board, to the point where network effects prevent the users from leaving, and then the investors will want their money back manifold.

    If they open up the protocol too much, the network isn’t under their exclusive control anymore and they lose the ability to squeeze users for money, so I cannot see them following through with their promises of actually making it decentralized.