• 0 Posts
  • 88 Comments
Joined 8 months ago
cake
Cake day: June 12th, 2025

help-circle

  • shrug To each their own, I guess.

    I can definitely appreciate that opinion, I just… disagree. I don’t really give 2 shits about a file having some stuff in it that I don’t personally use, so long as it still has a purpose. I.E. I’ll take a little clutter in a file like that, that basically never gets looked at or edited, over the chance of cluttering up the repo itself, or PRs, or history with stuff that has no purpose at all.





  • What you describe seems sound, but I’d say you need a final “decrypt and confirm” pass on each matched result, to work around the hash collisions, especially if you only store partial hashes, like you describe (which also seems sound).

    Also, depending on your database implementation (whether it has good text-search-indexing support), it might make more sense to not recombine the hashed tokens, and instead store them in a 1-to-many mapping table.










  • How should I know or figure out things like this?? When there’s no error and I don’t know why it doesn’t working other than trying different syntax until it works!

    A) MDN. Never use any JS API you’ve never used before without reading the docs on MDN first. JS is kind of a massive pain in the ass to work in, but dear lord, the MDN docs are just the absolute gold standard.

    B) Set yourself up with a rudimentary TypeScript build process. Not like a full managed project under npm or bun or whatever the latest fad is (unless you’ve already got a project setup like this, I guess). Just write your source files in TypeScript instead of JavaScript, setup a .tsconfig file, and run a copy of the TypeScript compiler tsc to convert 'em all to JavaScript. That’ll eliminate entire classes of errors from your code, like your attempts to write to a non-existent .width property, for example.

    If you’re not familiar with TypeScript, it’s built to be exclusively a superset of JavaScript. I.E. it’s just JavaScript with some type annotations. Really, the compiler is less of a compiler, and more of just a static analyzer that trims out the type annotations.

    C) You should probably also look for a JS/TS autocompletion tool, of some kind. I’m not sure what’s out there in that regard, except for Intellisense within Visual Studio, since VS is what we’re given at work. But for someone new to an API, having it be discoverable right in your editor is a DX that can’t be beat.



  • I enjoyed my brief time with gRPC and protobuf, when I was trying them out, and I’d happily use them again, but I think it’s obvious why JSON and REST are more dominant.

    For one, gRPC works great for simple server/client apps, but it makes them VERY tightly coupled. If your product is an API itself, open for public use, tight coupling is a hindrance more than a benefit.

    And more to the point… have you ever tried to DEBUG gRPC traffic? The efficiency of gRPC is top notch, t optimizes for serialization, deserialization, and bandwidth, all at once. But JSON is human readable, and when you throw in HTTP compression, the efficiency is close enough to protobuf to serve the vast majority of scenarios. JSON is just far more practical.



  • Unfortunately, the alternatives are really lacking. JetBrains Rider REALLY feels underbaked. No deal-breaking issues, but lots of little low-impact ones, and lots of design decisions that go against common conventions, for no apparent reason. The “Visual Studio Mode” doesn’t really help.

    On top of that, I’ve had several issues with RUNNING Rider, on account of being on Bazzite, an immutable distro. It was fine on Mint, but Mint had its own troubles with my NVidia card.