• 1 Post
  • 28 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).



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


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


  • This is almost a strawman argument.

    You don’t have to shell out to a db cli. Most of them will gladly take some SQL and spit out some output. Now that output might be in some tabular format with some pretty borders around them that you have to deal with, if you are about the output within your script, but that’s your choice and so deal with it if it’s within your comfort zone to do so. Now if you don’t care about the output and just want it in some file, that’s pretty straightforward, and it’s not too different from just some cli that spits something out and you’ve redirected that output to a file.

    I’ve mentioned in another comment where if you need to accept input and use that for your queries, psql is absolutely not the tool to use. If you can’t do it properly in bash and tools, just don’t. That’s fine.

    With web API calls, same story really; you may not be all that concerned about the response. Calling a webhook? They’re designed to be a fire and forget, where we’re fine with losing failed connections. Some APIs don’t really follow strict rules with REST, and will gladly include an “ok” as a value in their response to tell you if a request was successful. If knowing that is important to the needs of the program, then, well, there you have it. Otherwise, there are still ways you can get the HTTP code and handle appropriately. If you need to do anything complex with the contents of the response, then you should probably look elsewhere.

    My entire post is not to say that “you can do everything in bash and you should”. My point is that there are many cases where bash seems like a good sufficient tool to get that simple job done, and it can do it more easily with less boilerplate than, say, Python or Ruby.