• 0 Posts
  • 166 Comments
Joined 3 years ago
cake
Cake day: July 3rd, 2023

help-circle
  • No, the author is not confusing them. It’s everyone else that has been confused insofar as they use “REST” to describe APIs that are not actually REST. True REST is a way of architecting networked applications according to a set of constraints, as defined by Roy Fielding in his original dissertation. Here’s an excerpt that sums it up:

    In order to obtain a uniform interface, multiple architectural constraints are needed to guide the behavior of components. REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state.

    Many “REST” APIs do not adhere to these constraints, especially self-descriptive messages and hypermedia as the engine of application state (also known as HATEOAS). Note that this says nothing about HTML: HTML is but one representation of hypermedia, but far from the only one. Hypermedia is something that allows discovery of additional, related resources by way of links between resources. There are a number of ways of doing this, such as RFC 8288 Link Headers or embedding links within one of a resource’s representations (such as a JSON representation).

    It’s a much larger topic than I can fully explain here, but I highly recommend reading Roy Fielding’s dissertation, especially Chapter 5 which talks about REST and what it is.

    I also highly recommend this blog post from Google Cloud’s engineering team, which talks about why you should use links instead of keys to represent relationships in API design: https://cloud.google.com/blog/products/application-development/api-design-why-you-should-use-links-not-keys-to-represent-relationships-in-apis.



  • That’s what Open Telemetry is for, honestly, specifically tracing. I’m in the process of adding tracing for all of our web handlers, http client calls, database transactions/individual queries, and asynchronous jobs. Should give us a pretty good view into the performance of the system, and allow us to monitor for things like performance regressions without any dedicated profiling needed (though we certainly could add additional profiling information through Otel down the road). Since I know you’re a Haskeller (recognize your handle), the hs-opentelemetryecosystem is quite solid and has integrations with a lot of libraries in the wider ecosystem, like wai, persistent, postgresql-simple, conduit, and a bunch more. I haven’t needed to write too much of our own instrumentation, aside from our job system since that’s a bespoke system.


  • We are fully capable of thinking PHP, NPM, and PyPi are trash simultaneously. Though it should also be said that only PHP has had decades of security flaws in the language itself, rather than a package manager.

    It’s just a very poorly designed language with countless footguns and fucking idiotic standard library functions, on top of being a running joke, security-wise.



  • It’s not, they are correct. There are so many telltale signs of AI code it’s not even funny. The most obvious being the absolutely garbage comments that people invariably leave in. And the god awful naming of things.

    But it’s more than that. If you’re in this industry long enough, you get pretty good at reconstructing a real author’s thought process when they wrote the code. Part of understanding code is understanding why it was written the way that it was, which means understanding how the author thought. Sure, there was plenty of garbage code and stupid thinking, but it was still thought and usually had its own kind of internal consistency. AI code has no thought process, no reason. It is pure mimicry, an amalgamation of millions of authors all at once. It has no internal consistency. It produces code no human ever would, because it doesn’t make any fucking sense. It’s like reading an alien language, where the constructs it produces are so aberrant to how any human would ever think that it could be nothing but an LLM.

    I definitely can’t tell you everything about a piece of code by reading it, but I sure as hell can smell an LLM in it, because it fucking stinks.





  • I’m not sure what you mean by “standard DB queue” (perhaps you mean a message queue, I guess?), but yeah Redis (or really, Valkey, now, since Redis tried to change license on everyone) is a very important tool in the toolbox for system design. In-memory databases trade persistence guarantees for raw throughput, and are very well-suited for different workloads than a traditional database is. It’s great for caching, rate-limiting, realtime analytics, leaderboards… Basically anything with ephemeral data or data that can easily be reconstructed from some other source of truth. It’s an optimization tool that can significantly reduce the load on your primary application database for certain workloads (and achieve higher throughput).







  • expr@programming.devtomemes@lemmy.world•Bad news
    link
    fedilink
    arrow-up
    3
    ·
    2 months ago

    Our interview process has the candidate implement a couple (extremely simplistic) API routes, with the specific approach left up to the candidate. It’s more about having something they can talk through and evolve than it is about us looking for any specific approach.

    Basically it exists as a way for us to have a starting point for talking about scalability topics, asking the candidate how they would evolve their implementation as we scale up the system. Does a pretty good job of giving us an idea of how they think through system design problems.


  • I was not talking about your specific lawsuit, or TLS.

    Companies trust other companies all the time, and it’s foundational to most all SLA/SLOs. Any time I’ve voiced concerns around how AI companies are using the data we are giving them (like giving them access to our codebase), it’s brushed off as “we have an agreement with them”. It’s just a load of hogwash. They can and will abuse all data they have access to, just as they have done thus far.

    In this particular case, we are talking about a data center, and it is not at all reasonable to assume that the data that flows to said data center is in any way protected, especially one run by Musk.