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
Feed
All
Post Types
- Rants
- Jokes/Memes
- Questions
- Collabs
- devRant
- Random
- Undefined
Cancel
All
-
Going to apply to a 2 week software training program at a company I want to work for. Never been so excited. But have to update my CV and website and stuff. Deadline is 15th. Hmm...
Also they only take women or LGTBQ+ or people with less than 3 years of experience... Hmmm.... I wonder if I can get in.7 -
JavaScript has an exciting API for monitoring changes made to HTML elements. The API is called the MutationObserver API, and it was invented at the prestigious W3C—the global organization comprised of our genius software engineer overlords.
Unfortunately, the W3C has a history of occasionally forgetting to proofread new specifications before publishing them, after their large army of monkeys with typewriters have produced working draft specifications, but I'm sure those mistakes are all in the past. The MutationObserver API is receiving praise online. I'm sure it's well designed!
Let's dive in to how it all works.
The API works by calling (1) a specific function of yours any time (2) a specific kind of change is made to (3) a specific HTML element—all three configurable by you.
When a change occurs, your function is passed a collection of information about the change, known as a "record".
If you ask, that record can even include information about the state of the HTML element before the change occurred, available under the `oldValue` property. How convenient!
Oh, and one more thing. If several changes happen in a short window of time, your function may receive a whole list of records—instead of being run once for each change. You know, to save on computer resources.
Anyway, let's start using this powerful API! But wait, what's that?
The record doesn't contain the state of the HTML element when the change occurred?
No problem! That information doesn't have to be included in the record. I can just look at the element as it appears right now.
But what's this, now? I'm receiving a long list of records. I guess lots of changes happened in a short window of time, so all the records are bundled together.
So how do I know what the state was for each record?
If I look at the element as it appears right now, I can only see the end result. That won't tell me what the state was after each individual change.
I guess there's only one way to find out. For each record, I need to look at the next record and check that record's `oldValue` property.
I need to write look-ahead logic just to see the state at each record!
What kind of monkey wro—oh, right. The W3C wrote the MutationObserver API.
Just forget that I asked.1 -
Am I going crazy or is the web dev community on some otherworldly drug?
Now "server-side"-whatever is the coolest thing ever?
To the point where client side validation is not recommended anymore and actively discouraged? Are you kidding me? So, you mean to say after filling a long form with millions of fields, the page will RELOAD when I press submit and after waiting an eternity for your shitty server to respond then and only then will I know what fields are invalid?
GTFO with that bullshit.
How in the world is that good UX/UI?
I've always had this theory that we humans are the dumbest species to ever walk this earth. I mean, serisouly, how is this even a thing?
Imagine if a mobile app had to restart to tell you that your email is invalid in a simple form.
But.. but... but... what if the client has disabled javascript? Then fuck them! Who the fuck cares? What's next? Some dumb user is still using Android 2.1 Eclair and we should make our app support them? Fuck no! Fuck them, they should update.
Newsflash, if Javascript is disabled, then pretty much everything will be broken anyway.
Form validation should be instantenous. This isn't rocket science.
It should happen as the user types so they can see what's valid/invalid in real-time.
This does require effort and consideration, something many devs lack apparently.
This is just ridiculous.12 -
You know how you can tell that a product is well designed, intutive, and user friendly?
If they have an accompanying e-learning platform with thousands and thousands of videos and even more pages of documentation, of course!
From the people who created SQL, comes something that somehow does pretty much the same thing, but is harder to use and easier to gate features behind paywalls! Fuck yeah!3 -
> Press "Push" button in the IDE.
IDE: ❌ Error 😩 Unable to push branch 'dev' to origin
* Ugh. *
> Open console. Type "git push".
Console: All deltas resolved, chief. 🫡 dev -> dev
Why. Another day, another experience to prefer the command line.2 -
OLDIE BUT GOODIE
https://devrant.com/rants/2376967/...
So now that it's been 5 years how are you planning to spend your social credits?5 -
Anyone here ever add hardcoded sentry environment names, no I don't mean hardcoded names, limit the allowed ones? (e.g. not "dev" but "Dev")
Am I the silly one that realized that this is probably not a good way of handling it and created a PR to remove the check?3 -
Statistics. Tbh, it is way more. Didn't use the codeium plugin for a long time. Regarding key presses i'm in the 0.10%. Longest streak is not impressive. 21 on codeium and 40 on github or so.
At this moment I'm very happy with the plugin, it knows me completely. * tab tab tab *. Almost always knows what I want to do. It advanced a lot last year, I did quit a few times on it last year for few months because it often sucked. Now it's perfect. Especially under VIM it's very cool!2 -
My phone screen died very suddenly so I had to power on an extremely old phone to serve as an alarm clock.
What is it with Android and completely dying after a couple years' downtime?
Anyway, I think the only reason I replaced this phone was that it was insufferably slow and the immediate excuse to get rid of it was that the charging port corroded. So glad I keep these things around, even after moving house 4 times.13 -
Fucking finally got xkb and xcb to work after hours of bullshit
Why is it so fucking hard getting a damn keyboard layout on linux 😭11 -
tldr: I no longer like my job.
Several years ago I got hired at this company. It was great. Lots of things to learn. Able to make a big impact. The manager is great. Lots of flexibility. Raises were decent for the most part.
6+ years later. I have nothing to learn. I feel my career is stagnating. I'm quite good at my job but things are boring and there's no challenge. In the end my company has proved to me I do not make enough to justify my skills. I keep being told things are going to change and there will be new opportunities to change roles and learn/grow, but Ive heard that for years and trusted my leadership. They didn't lie to me but there are so many things out of their control that things just never happen.
My manager has become a good friend and I hate to think about leaving but finally just have to accept that all I'm doing is hurting myself and my career.12 -
How is visual studio code's vim emulation this bad? vi/vim is 50 next year, with its behavior codified in the POSIX standard. What takes me 1 line in a vimrc requires a mountain of JSON and learning separate programming language to do this plugin. Who ever maintains this pile of crap should be embarrassed. I just wanted to pay microsoft to use copilot on my own projects.15
-
Okay, I'm really liking VSCode + Vim motions plugin.
I'm genuinely starting to get used to and use the motions correctly and it's only been about a week and a half of practice.
This might be the way1 -