Details
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Oh my god why is receiving email so fucking hard? I don't want spamassassin, I don't want antivirus, I don't want accounts or fail2ban or any of that bullshit, I just want all email that is sent to addresses under my server dumped in a database or folder so that I can digest them programmatically or display them in a GUI3
-
University makes us sign our documents electronically. What this means is that we're required to put pictures of our signature onto all sorts of declarations. Since none of the documents we "sign" this way are important it could be okay, but I don't understand why it's beneficial to encourage us to keep a photo of our signature on our computers, paving the way to identity theft.22
-
I am able to work 15 hours on my pet project then take a short walk outside and feel like a balanced man, but even just an hour on a commercial project is a massive effort even though the code is clean, the stack is modern, I'm good friends with the client and I also like the concept. The mere fact that I'm doing it for money takes the fun out of it.3
-
Found next to a TypeScript definition set of 16 overloads, written for all combinations of 4 bivariants.1
-
Immutability is nice and all, but there are languages and tasks where it really doesn't work as well as it should.1
-
This is the kind of shit that I don't want to write.
The kind of shit that should be in an STL so I never have to include it in a project.
Because it doesn't belong in a project.
And it doesn't belong in a dependency tree either.
It belongs in a language. -
I dropped some pasta on my keyboard and while cleaning it up,I accidentally delivered an appropriate assessment of the situation.1
-
[JS]
Which one do you think is faster? Pushing callbacks to an array and iterating them when they're due, or this:
const oldcb = cb;
cb = () => { someNewStuff(); oldcb(); }
The callbacks can never be removed and will finish fast, their order shouldn't matter.8 -
Prettier breaks mixin formatting and there's absolutely no way to configure it.
Disgusting, right?
And this is why "opinionated" is a negative adjective and its positive counterpart is "adaptable".19 -
My local government made a website where you can check whether your registration for covid vaccination has been successful because the bureaucrats keep losing people's applications.3
-
Ever since I started learning about React with Typescript my respect for design patterns that restrict how state can change has grown massively. On the web, nothing happens when you say it should happen; everything always takes a while to execute and there is always a transactional period between validating an action with client-side state and receiving the result from the server, and if you want to account for that everything becomes infinitely more complex and you eventually end up with mutexes.5
-
Neat trick that I discovered today:
Because React.useCallback is a thing, you never need a custom react hook to take a dependency array. You can always express your dependencies by wrapping the callback in useCallback and having useCustom pass the callback itself as its own dependency. -
When elements of an union are distinguished by a boolean, VSCode's Typescript plugin can only do type elimination if I branch by "== true" and not if I just branch by the boolean.
This is because Typescript treats booleans as an union of the constants "true" and "false", and compile-time elimination can only be done if I use syntax that makes sense with unions. Logical evaluation, for some reason, doesn't.
The fact that this issue can even appear is deeply concerning.1 -
I often dream that I discovered a rare edge case in reality that can lead to a crash if corrupted people create any object together. Corrupted state is infectious but due to caching and lazy copying strategies you mainly spread it to previous owners of items you infect. Also I can't edit the code to fix the issue because I'd have to recompile and our world is an in-memory artifact of the current execution.1
-
While a precaching service worker can grossly improve the performance of a SPA, it definitely doesn't improve the speed of development when introduced between the dev's browser and the app to be debugged.3
-
JS has
dynamic object literal keys
String object literal keys
Why aren't template literal keys allowed, and _why_ isn't there a proper error message for them?7 -
Have you ever tried using sqlite3 from npm inside a docker container?
Yeah, it doesn't build on Alpine, despite being among the most popular Linux distros thanks to Docker.1 -
I seem to have built my app and tagged it as caddy:alpine by accident. How does this happen and why does Docker allow you to override images without specifying something as obvious as --override-registry-image on the command line?7
-
Docker compose switches users but doesn't update the home directory. Both switching users and not touching envvars are very sensible default behavior, but the result is that the running service has no write access to $HOME - and many programs don't provide sensible error messages for this rather unlikely scenario.3
-
So Yay just asked me to replace pulseaudio with pipewire. I was hesitant because I have meetings to attend and I don't want to have to fuck around with my audio config once again.
But it simply works.
PipeWire can replace pulseaudio simply by uninstalling pulse and installing pipewire-pulse.
Next I'll see if it can replace JACK as easily. If so, if I no longer have to juggle two fundamentally incompatible audio servers to do audio processing, then FOSS has just solved one of the greatest obstacles in its path to reach feature parity and performance superiority to Windows.7 -
I don't have any experience with cloud providers and I need to get a server for a project.
The website will be up for 3 weeks, access will probably be very uneven, the total user count is somewhat below 2000.
The site will probably be quite interactive and real-time, content may be changing every few seconds for an hour and then remain unchanged for days. I will also need either SSE or websockets for this reason.
What should I consider when selecting a cloud providers? Do you have a good one? My ideal provider would scale resources according to traffic like I've heard AWS does, but I want to hear your opinion first especially considering I know very little about how server load works.1 -
I made my very first pull request to a project of public interest.
It's just a paragraph in the React docs, but still.
I feel like a useful person.11 -
I just bumped into a javascript problem that exceeds the stupidity of previous ones:
Because promises can be retained after they settle, and handlers attached thereafter are pushed on the microtask queue, a promise rejection can't be asserted to be unhandled until the promise in question is GC'd.
Of course this is nuts so engines will conclude that a promise rejection is unhandled if there are no handlers at the moment of rejection.
I hate this language.10 -
Today I spent half an hour trying to figure out why my IDE stops on an exception that is very obviously caught.
I left a breakpoint there because the stack traces behaved weirdly.7 -
Today on fucked up Javascript stuff: Call stacks whose bottom isn't an entry point or event handler2
-
Babel fails about 10% of the time, but if I re-run it it works. What the fuck did I even get myself into, and why aren't elements of a modern javascript toolchain completely deterministic? (webpack, babel, typescript, react)1
-
Network code is hard. Events come all the time and it's really difficult to account for all orderings and uncanny timings. Have you got any advice, book or paper about it that I should read?
I'm using node and websockets btw.7 -
We really need a domain reporting feature (with supervision) that blocks all users who post a link to the given domain. Let's face it, bots are a real issue and they are usually connected with multiple companies. If we could report a domain for employing bots and all bots would be blocked that would be awesome.2