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

help-circle
  • In my experience, it’s often the other way around. They’ll say that because everyone else is going to replace certain jobs with AI, they’ll have to do it, too, to stay competitive. If they don’t stay competitive, they might need to fire workers anyways.

    In theory, I could imagine someone employing AI, while from a moral viewpoint supporting a ban of it. One problem is that such a ban would need to be universal for it to not put anyone at a competitive disadvantage, which we can’t achieve with national laws.
    Well, and the other problem is that most people who argument this way then get massive bonuses and also pay bonuses out to investors, so that completely undermines any potential for morals.


  • I like cold-pressed rapeseed oil. It kind of goes with everything and adds a nice taste.

    Olive oil can be nice, but it’s real hit-and-miss how it tastes, so I’ll often end up with a bottle that I don’t like the taste of, which then lasts me forever…

    Edit: I guess, this might be less of an issue, if you’re from a region where olives grow natively. I’m not, so we get imported olive oil from all over Italy and Greece. This afterthought brought to you by me eating a tomato salad with balsamico just now, while only having Greek olive oil at home…


  • 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…


  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlSoftware is like an onion
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    1
    ·
    3 days ago

    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.





  • Ephera@lemmy.mltoMemes@lemmy.mlGetting harder as I get older
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    8 days ago

    Today, a colleague couldn’t do docker login for an internal registry. Constantly got an error which just said “unauthorized”.
    The password couldn’t be the problem, because you actually generate a token on the registry webpage, so we tried all the different ways to spell his username (uppercase, lowercase, e-mail address) and tried different URLs for specifying the registry, tried toggling the VPN, a reboot etc., even though we knew what should work, because the login worked for me.

    Eventually, we gave up and figured there must be some permission problem in the registry. Ten minutes later, he tells me that it works, without doing anything different. Now I’m wondering, if the IT saw our desperate login attempts and quickly fixed the problem. 🫠






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