• 1 Post
  • 78 Comments
Joined 2 years ago
cake
Cake day: July 4th, 2023

help-circle
  • It seems like the author thought stack traces are underrated because people don’t like exceptions and don’t always throw. It seems like they don’t understand why people don’t like exceptions, and think that stack traces should be there for every case where the author thinks should be an exception, and ties the desire to avoid exceptions to some strawman use case — a nice looking output — and called it “modern error handling”.

    Error / exception handling is separate from stack traces. You don’t need to have an exception to have a stack trace, and stack traces aren’t just used for exceptions.

    They also seem to not understand why people make do without stack traces in a microservice architecture. That’s simply not true. First off, you can still get stack traces of individual services. And secondly, if you build your services to accept, eg, something like a tracing ID, and print it along your logs, you essentially have a stack traces across services. In a web service, you can track the work done by all your systems for a single request from the client.

    Now, onto why exceptions are somewhat disliked. Let’s just get the simple stuff out of the way: they’re generally bad for performance; they’re invisible to the method caller until they run into the problem, meaning you can’t ever ship updates that you’re confident won’t fall over disgracefully; try-catch hell, etc.

    For a slightly more philosophical answer, why aren’t your exceptions just cases you need to handle? The try-catch pattern essentially builds up a separate channel of logic where your program needs to operate in but is expressed or recorded in very fragmented ways, forcing devs to have to pop open every function to look at why something is thrown, and hope that somewhere down the stack, no new exceptions are being thrown and not handled. The logic behind exceptions becomes second-class citizens that programmers can easily forget, instead of being front and centre. Can’t divide by 0? Tell me instead of setting me on a separate handling path. Why should I try-catch every single method call, or even property access? Don’t wait for the user to hit the call and just tell me that something is supposed to be impossible, or if I should handle the case where it doesn’t hold any values, right as I compile (dynamic languages can’t really do that).


  • Don’t think I saw these mentioned so here ya go:

    • Little Kitty, Big City
    • Any of the Atelier games if you don’t mind anime, though the upcoming one may not be as relaxing in terms of its story.
    • Timberborn, though some might feel stressed about handling droughts. You can turn the difficulty down and it’ll just be a cute diorama where you build a city (or cities) with beavers.

    And this is extra but grab your friends and family and play some couch co-op. It can help get your mind off things and just enjoy being in company of loved ones.

    Aand if you want to eventually find something that will keep you hopeful in the face of despair, in a healthy way, I recommend the first part of Honkai Impact 3rd. It’s long, has lots of depressing moments, enough to make fans call it Depression Impact. The story touches on themes of existential horror, suicide, duty, death of loved ones, humans who have no morals and believe that all rights and wrongs as transient, cosmological threats, etc. Despite all that, I’d actually say that it’s a story about hope, and what can lay the foundations for hope. It’s definitely fan-service-y, and it’s a gacha game, but very much ignorable and playable without investing any money in it. It’s also made by a Chinese company, but maybe that can help with recalibrating perceptions on Chinese people, instead of what we’ve come to know through their government. Of course, if you’re susceptible to gambling addictions, please feel free to ignore this recommendation.


  • Uneducated 2 cents. afaik the publishers have some kind of “part ownership”, where they can pull it out from the store whenever. The “anti-piracy” feature you get with DRMs is why many publishers actually like them tho. The part ownership thing is just icing on the cake. So no, a good chunk of publishers won’t be furious at all. DRM gives what publishers want and more, at the expense of the consumers in a way that most wouldn’t realize.

    And if anything, I think it makes more sense to think that these publishers are also just granting Amazon some kind of “license” to sell their e-books.

    Amazon would absolutely be destroying their relationship with a publisher though, if they decide to block the selling or access of a book to large group of people who are would-be buyers. But, at the end of the day, publishers want to know how much they’re making from putting their e-books on Amazon, and as long as that revenue is enough to satisfy their needs, they don’t need to care too much about the odd customer who had their book revoked, and they would generally be pretty shielded from any sort of disputes as long as Amazon is making those revoking calls.


  • This was pointed out in another comment but I will basically echo it to just give that call a boost: Point your instructor to well-regarded sources for introversion and extroversion, and let them know that the labelling in their note is not only inaccurate, it falsely attaches a wrongly defined word onto problematic behaviours that have nothing to do with what introversion and extroversion is, which is not good because it propagates a false narrative.

    If your instructor doesn’t seem cooperative and insists on being correct, talk to other instructors that you trust, or even go to those with more authority to tell them about the issue. If you can’t get anyone to actually do something, I suggest you change schools immediately, and call the school out for what they did.

    Maybe it’s just one of those days, but I have no tolerance for this sort of false narrative being spread, even if the original intention is innocuous, and especially in a school. Being forced to act in a certain way that deviates from one’s personality to not be perceived as a problematic person, especially over a badly-informed opinion, can have lasting negative consequences to children and adolescents. I’m tired of seeing introverted friends and family members suffer over the fact that they’re introverts, to the point where they will deny being an introvert and even echo these sorts of statements in order to blend in.



  • You could create an account that blocks off communities for news and technology, and any other communities that have a high likelihood of reporting on current events. Just switch to the account on days where you just don’t want to read such news, for any respectable reason you may have (it’s understandable, it can be draining).

    This should be a no-brainer, but Lemmy doesn’t really filter stuff out by default, unless the admins decide so. So as long as you’ve created an account on a fairly managed instance, and given that the current news cycle, especially in the Western & English-speaking world, you won’t be able to escape Trump and Musk, especially when they’re dominating headlines due to how they are literally affecting the lives of millions, if not billions, of people.




  • You come from a healthy background is what I’m hearing. And that’s good, and I don’t mean that in a derogatory way. What you have there is absolutely the right mindset to have. These tools are made by humans, who have their own set of problems they want to solve with their tools. It may not be the best tool, but it can work pretty damn well.

    However, it’s also not uncommon to see communities rage and fight over the superiority of their tools, if not just to shun those that they think are inferior. It’s a blatantly childish or tribalistic behaviour, depending on how you look at humanity. And you’ll see this outside of programming too; in the office, in town, on the streets. People engage in this behaviour so that they can show that “I am on your side”, for the side where they think is the right or superior side, based on factors like a perception of group size, a perception of power, a perception of closeness. It appeals to a common human desire to belong to a strong group. It appeals to the human desire to feel safe. And when you start looking at it that way, that’s not too different from how animals behave. It’s important to note that not all humans have the same amount of desire for this sort of tribe, or would give into that desire to engage in such behaviours, but it’s not surprising to see.

    In any case, this article is essentially a callout to the sort of toxic behaviour done for the sake of feeling superior, that exists within the programming community, to a point where some may even say is a major subculture.


  • This. Any time someone’s tries to tell me that AGI will come in the next 5 years given what we’ve seen, I roll my eyes. I don’t see a pathway where LLMs become what’s needed for AGI. It may be a part of it, but it would be non-critical at best. If you can’t reduce hallucinations down to being virtually indistinguishable from misunderstanding a sentence due to vagueness, it’s useless for AGI.

    Our distance from true AGI (not some goalpost moved by corporate interests) has not significantly moved from before LLMs became a thing, in my very harsh opinion, bar the knowledge and research being done by those who are actually working towards AGI. Just like how we’ve always thought AI would come one day, maybe soon, before 2020, it’s no different now. LLMs alone barely closes that gap. It gives us that illusion at best.







  • You’re speaking prophetically there and I simply do not agree with that prophecy.

    If you and your team think you need to extend that bash script to do more, stop and consider writing it in some other languages. You’ve move the goalpost, so don’t expect that you can just build on your previous strategy and that it’ll work.

    If your “problem” stems from “well your colleagues will not likely be able to read or write bash well enough”, well then just don’t write it in bash.


  • I’m going to downvote your comment based on that first quote reply, because I think that’s an extreme take that’s unwarranted. You’ve essentially dissed people who use it for CI/CD and suggested that their pipeline is not robust because of their choice of using Bash at all.

    And judging by your second comment, I can see that you have very strong opinions against bash for reasons that I don’t find convincing, other than what seems to me like irrational hatred from being rather uninformed. It’s fine being uninformed, but I suggest you tame your opinions and expectations with that.

    About shared libraries, many popular languages, Python being a pretty good example, do rely on these to get performance that would be really hard to get from their own interpreters / compilers, or if re-implementing it in the language would be pretty pointless given the existence of a shared library, which would be much better scrutinized, is audited, and is battle-tested. libcrypto is one example. Pandas depends on NumPy, which depends on, I believe, libblas and liblapack, both written in C, and I think one if not both of these offer a cli to get answers as well. libssh is depended upon by many programming languages with an ssh library (though there are also people who choose to implement their own libssh in their language of choice). Any vulnerabilities found in these shared libraries would affect all libraries that depend on them, regardless of the programming language you use.

    If production only implies systems in a user’s path and not anything else about production data, then sure, my example is not production. That said though, I wouldn’t use bash for anything that’s in a user’s path. Those need to stay around, possible change frequently, and not go down. Bash is not your language for that and that’s fine. You’re attacking a strawman that you’ve constructed here though.

    If your temporary small script morphs into a monster and you’re still using bash, bash isn’t at fault. You and your team are. You’ve all failed to anticipate that change and misunderstood the “temporary” nature of your script, and allowed your “temporary thing” to become permanent. That’s a management issue, not a language choice. You’ve moved that goalpost and failed to change your strategy to hit that goal.

    You could use Deno, but then my point stands. You have to write a function to handle the case where an env var isn’t provided, that’s boilerplate. You have to get a library for, say, accessing contents in Azure or AWS, set that up, figure out how that api works, etc, while you could already do that with the awscli and probably already did it to check if you could get what you want. What’s the syntax for mkdir? What’s it for mkdir -p? What about other options? If you already use the terminal frequently, some of these are your basic bread and butter and you know them probably by heart. Unless you start doing that with Deno, you won’t reach the level of familiarity you can get with the shell (whichever shell you use ofc).

    And many argue against bash with regards to error handling. You don’t always need something that proper language has. You don’t always need to handle every possible error state differently, assuming you have multiple. Did it fail? Can you tolerate that failure? Yup? Good. No? Can you do something else to get what you want or make it tolerable? Yes? Good. No? Maybe you don’t want to use bash then.


  • But not everything needs to scale, at least, if you don’t buy into the doctrine that everything has to be designed and written to live forever. If robust, scalable solutions is the nature of your work and there’s nothing else that can exist, then yeah, Bash likely have no place in that world. If you need any kind of handling more complicated than just getting an error and doing something else, then Bash is not it.

    Just because Bash isn’t designed for something you want to do, doesn’t mean it sucks. It’s just not the right tool. Just because you don’t practice law, doesn’t mean you suck; you just don’t do law. You can say that you suck at law though.


  • People have really been singing praises of Powershell huh. I should give that a try some time.

    But yeah, we wield tools that each come with their own risks and caveats, and none of them are perfect for everything, but some are easier (including writing it and addressing fallovers for it) to use in certain situations than others.

    It’s just hard to tell if people’s fear/disdain/disgust/insert-negative-reaction towards bash is rational or more… tribal, and why I decided to ask. It’s hard to shake away the feeling of “this shouldn’t just be me, right?”


  • Seems like something that can happen in any languages, though yeah, bash doesn’t make it easier, and it’ll depend on what the cli tool would return given the error (eg does it return some code in stdout or stderr, or some non-zero exit code). Depending on the library (in the language of choice), you may still have to handle such errors manually, eg adding the necessary logic to retry.

    And in such a case, I guess it would be prudent to either make sure that the data can be retrieved again, or push it somewhere a bit more permanent (shared fs, or object storage), sort of in a dead-letter-esque style. Seems like the lesson here is to have a fall over plan. The failure mode is not something a proper language and library would necessarily help discover more easily though.