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
Search - "gotchas"
-
What the fuck is this one-way interview bullshit?
"The organization you are interviewing with has come up with a series of interview questions that they have requested you to respond to. This is an on-demand interview which means that you'll be recording your video interview answers at your convenience as long as you submit them before the deadline." -- sparkhire.com
Like seriously?
What if I have questions? I have plenty, and I find those questions considerably more important than whatever bullshit gotchas the company wants to annoy me with.
One-way interview.
Fucking really.
At least have the decency to talk to me.rant bullshit root gets angry one-way interview interviewing talk about lazy and unprofessional root swears oh my this just screams 'bad environment'36 -
I’m getting really tired of all these junior-turn-senior devs who can’t write simple code asking ChatGPT to solve everything for them.
I’m having to untangle everything from bizarre organization/flow to obvious gotchas / missed edge cases to ridiculously long math chains (that could be 1/10th the length), or — and I feel so dirty for this — resorting to asking ChatGPT wtf it was thinking when it obviously wrote some of these monstrosities. Which it gets wrong much of the time.
“ALL HAIL CHATGPT!” Proclaims the head of Engineering. “IT’S OUR PRODUCTIVITY SAVIOR! LEVERAGING AI WILL LET US OUTPERFORM THE ENTIRE INDUSTRY!”
Jesus fucking christ.31 -
So;dfjkhijasdfkjq;sdfhjkl;asdf
I copy a line from one spec (to create a user) and paste it in another spec. It works just dandy in the first, and throws MySQL missing column errors in the other.
Fucking what.
This codebase is full of shit like this. Things work in one place but not another, and it’s never obvious why. Tens of thousands of gotchas and quirks. The only way I can get an answer to things like these is to either beg my boss for an explanation, which I’m sure he’s long since tired of, or spend a full day (or more) wading through several rabbit holes filled with raw sewage.
I wasted two hours today trying to get a simple fucking factory to work. And you know what? I just gave up and used the existing admin user. Yeah it’s a bad idea, but it’s fucking good enough.
They can yell if they want.
I have no cares left.rant non-deterministic this train went off the rails long ago so done so tired trainwreck idc puffing billy15 -
I come from PHP and have been using jQuery as a crutch for years. I've dabbled in Node and obviously writing some vanilla JS is unavoidable, but now I'm starting to use ES6 with Babel and VueJS and the more I dig in, the more I hate javascript. Everything is an object (null, array), there seems to be a few gotchas with math (including the one pictured), nothing is strongly typed but types are very important (for instance, you can't loop an object and an array using the same code), and there are a lot of inconsistencies/functions missing. ucwords for instance. Why doesn't that exist? typeof only returns object, but Array.isArray and Object.isObject work fine. I'm going to give typescript a go soon and cross my fingers.20
-
!rant
Interviewed a guy for a senior technical job. I worked hard on making my own questions that hopefully make the interviewee think instead of useless gotchas.
He told me at the end that they were fun questions and this interview was loads better than the rest who just ask questions off of Google.
Having had my share of shitty interviews, this makes me feel so good 😊11 -
!rant
Reduced a page load time from 23.8 seconds to 0.5 seconds by disabling tracking of entities on the page. Felt awesome.4 -
I'm trying out blazor at the moment, building a couple of prototypes. I really need to brush up on my html/css for the view stuff, and of course there are a few gotchas. But other than that, I really think Microsoft has nailed browser apps with this!
Client side, server side, a mix of both, runs in all major browsers + as PWA or Electron.
Wow.
All logic and view manipulation in C#, no JS. And the performance is great.
Just.
Wow.1 -
Why I try to ALWAYS use semicolons in JS:
In short, weird shit happens sometimes
An example:
So I'm doing a small project for freeCodeCamp, working with the Twitch API. I decided to make an array on the fly to append a few elements to a documentFrag in order after setting all my props. Forgot a semicolon. Apparently, Babel transpiles this:
info.innerHTML = (``)
[span, caret, info].forEach(elm => frag.appendChild(elm));
to this if you omit the semicolon:
info.innerHTML = ' '[(span, caret, info)]
this is why you should avoid relying on ASI, you're going to have to remember them in other languages out there, so for your own sanity, might as well get used to them. Just thought I'd share--who knows, might help a JS newb out there somewhere.5 -
Planning on building a Ryzen 5 2400G setup for light gaming/home lab stuff, I need it to run a bunch of VMs and have passable frame rates in games on Linux (I hardly play AAA hard to port games, so should be okay there).
Planning on going full Linux for this, you guys got any tips/warnings/gotchas? Also, have any of you encountered issues with using NVMe SSDs on Linux?7 -
Speaking of JS gotchas. Why is there a null and undefined? I guess undefined doesn't exist, but null is it exists, but is null? Had a bug related to this. I was checking for null, but undefined was getting in there even though I defined the variable as null beforehand. All I can guess is some assignment shoved undefined in there. But that just doesn't make sense to me. So an existing variable can be undefined as well? lol
I am glad this is not my primary language for heavy lifting. Fuck this noise.
I was going to do this as a rant. But it turned into an ironic joke. I am adding an old meme, but it checks out for accuracy.23 -
I just remembered some of the "harmless" dev-related insults I've received over the years:
1) most recently, I shared a tool with an acquaintance cuz it bears the same name as something he put together a while back. Background: this guy likes to come across as having infinite programming knowledge and brags to his fb pals about being an expert in multiple languages. While trying to make sense of the cryptic docs of the package I sent him, he implies I don't know what the iframe or html5 canvas are. Claims not to elaborate what package does cuz the docs is meant for advanced desktop and mobile devs
It hurt because this is one of few people who know I built suphle, yet thinks so lowly
2) as you can tell from the first point, I share links I consider interesting with relevant contacts. I'm also quite vocal about my (mostly contrarian) takes on occurrences within the dev space that I'm familiar with. One day on the laravel board, this dude is reprimanding me and asks me to take the opinions I read on blogs and tabloids with a pinch of salt, implying I didn't form them independently but was influenced by what was written by some stranger online
It hurt because I expected him to know better. I felt I'd sufficiently proven to have actually built things that informed my school of thought
3) the oldest happened many years ago but I remember it now because the perpetrator called me out of the blue last week. I was teaching his boss, who managed an office but preferred to keep his student status hidden, to avoid being thought incompetent. This caller guy just so turned out to be learning js at the time. Fast forward some years, we all disbanded. He'd landed a dev job and was doing well. So I sent him one of those js gotchas, asking him to explain his answer
After he replied, I told him his answer was close enough but it had more to do with js passing closure arguments by reference. Dude responded that he knew that was the correct answer but wasn't aware I knew what closures meant. That stung me like hell back then. I missed his call and didn't know who owned the contact, so I searched my chats and saw that last interaction. Pain all over again3 -
Tools are made for various audiences. Git is the de-facto standard for version management, so it can be complicated because people will still learn it (they more or less have to). Editors aren't as standard and they are to be used from the minute you start learning, so they have to at least be usable without a course or a handbook. I prefer the first type of tool because to use something really good I don't mind reading a book. Programming languages can fall in either category; Python was meant to be used by laics and is therefore very simple, sacrificing a lot for the sake of simplicity. Rust isn't meant to be used by anyone who isn't trained, and it comes with a great book that explains all the most important gotchas. Haskell doesn't have an official book AFAIK, but it has the best wiki I've ever seen in a programming language.
-
Lua users, have you used moonscript?
It's a little language that has it's own interpreter or can be compiled down to Lua and it's absolutely lovely (currently using it with Love2d).
Of course, as with most things, what I love about it also royally pisses me off sometimes.
For starters local has to be declared for variables, unlike lua.
Otherwise the variable goes to _
Also note, that some tutorials literally tell you the opposite.
all variables are local by default
unless you don't declare them
then they go to _ (throwaway)
Some tutorials get this wrong too.
all variables have to be declared local
except tables. failure to declare a table WITHOUT a local will cause things like
table.insert to fail with "nil" values for no god damn reason.
No tutorial I could find mentioned this.
Did you know we call methods with '\'?
By the way, we call methods with '\'.
Why? Who the fuck knows.
Does make writing web routes more natural though.
Variables in the parameters of new are declared and bound for you. Would have loved to know this before hand instead of trying
to bind to them like a fucking idiot.
Fat arrows are used to pass in self for methods.
Unless you're calling a method. Then you use backwards slash. This fact is unhelpful when you're a beginner and dealing with the differences between the *other* arrow, the backslash, the fat arrow, and the fact that functions can be called with or WITHOUT parenthesis.
And on that note..
While learning all this other shit, don't forget parenthesis are optional!
Except when they're not!
..Like when you have a function call among your arguments and have to disambiguate which args belong to the outer call and to the inner call! Why not just be fucking consistent?
But on the plus size, ":" is now used for what it should have been used for in the fucking beginning: binding values to keys.
And on the downside, it's in a language thats built on top of another language that uses it for fucking *method calls*, a completely
different fucking usage.
And better still, to add to that brainfuckery thats lost in the mental translational noise like static on a fucking dialup modem, you define methods with the fat arrow. Wait, was that the single arrow or fat one? Yeah the fat one. Fuck. But not before you do THIS shit..
someShit: =>
yeah, you STILL include the god damn colon just so when you're coming from lua you can do a mental double take. "Why am I passing self twice? Oh right, because fuck me, I decided to use moonscript." It's consistent on that front but it also pisses me off.
A lot of these are actually quality of life improvements disguised as gotchas, but when you're two beers in to a 30 minute headscratcher it sure doesn't fucking feel like it.
Nevertheless, once I moved beyond the gotchas, it was like night and day. Sure moonscripts takes a giant steaming dump all over the lua output, like a schizophrenic alcoholic athena from the head of zeus, but god damn, when it works it just WORKS.
Locals that act like locals? Check.
Sane OOP? Check.
Classes, constructors, easy access to class methods, iterators? Check, check, check, check, check.
I fucking hate ceremony. Configuration over convention is for cunts. And moonscript goes a long ways toward making lua less cunty.
If you've ever felt this way while using lua, please, give moonscript a try.
You'll regret it, but in a good way!6 -
Trying to un-fuck a botched rebase of a months worth of work. It took me a couple days, but it forced me to learn a lot about git's best practises and gotchas. It also taught me not to keep a months worth of work on a single branch!4
-
I thought I had a decent handle on CSS. I can use flexbox and grid to make some decent and responsive webpages, and I'm at least familiar with most of CSS's more common gotchas
But no.
Even in 2021, with years of improvement in the language and browser compatibility, CSS can still fuck you over
I was adding some margin to a div element, and I noticed that the div element's margin seemed to force it's parent to move down too, as if the margin was applied to the parent as well
It took far too many nearly nonsensical google searches to discover that CSS has a nasty little trick called 'margin collapse'
And in true CSS fashion, the way to fix it is a hacky workaround. In this case, if you add a padding of 1px to the parent, the margin collapse doesn't apply.
Fuck CSS. From its weird implementation to its hundreds of gotchas to its hacky workarounds to said gotchas.
Fuck CSS2 -
1. Sets up Airbnb listing for Mom
2. Domain check
3. Email check
4. Okay let’s setup a simple one-pager that we can share
*Uses html5 broilerplate and embeds Airbnb listing - simple*
Checks page, it comes up blank...
WTF!!!??? WHY!? *Checks Console: 1 million errors screaming about Content Security Policy*
Sigh, I can deal with logic errors in backend code. WebDev is just so full of esoterics and gotchas that have nothing to do with you business logic. They make really simple and trivial shit way more painful and harder than they need to be... Ugh3 -
4 really basic questions. Things you can't get through 1st year undergrad without knowing. One was testing you understand references, one testing understanding of inheritance, then exception handling... Then a bit of a tricky one: what happens when you query 2 tables in sql without a join. That took me a second because it's just not something I'm used to doing.
So yeah it's pretty basic stuff. At this point I was used to writing fairly long code snippets and quizzes with lots of gotchas that make the interviewers feel really smart. I think "ok they basically want to make sure I'm not totally useless and they're fine with training me". But noooooo. Being able to answer all that correctly is really impressive. That's never happened before. I'm a fucking prodigy.
So I got the job and I alternate between thinking I'm in Idiocracy and thinking the reception I get is some sort of elaborate joke -
Fucking Fucking Fuck.... fucking acumatica and fucking IIS.
I’m not shitting on CS or ASP but the fucking windows server/IIS implementation. No one should use that shit. Fucking horrendous garbage.
Literally every goddamn thing we do in acumatica has major fucking gotchas.
Today apparently goddamn concurrency is fucked cause IIS and acumatica. I love friggen obscure issues being only documented in a friggen comment on a damn post in a random difficult to search corner of the friggin internet.4 -
Just a couple of things I'm thinking,
Alacritty in my main terminal, but I have a Hyper terminal (secondary, since it's pretty but not as fast) for thoughts.
I'm not even sure if you can call them thoughts. I would say mental diarrhea.
Most of the sentences are ridden with expletives, and very emotional. I attached a picture where you can see that there is
* some special characters, result of me light smashing the keyboard (I say light as in, I'm very angry but not as angry to not appreciate my single computer).
* a final sentence with some really nasty message.
* a lot of gibberish as well, don't use this as a spanish learning tool.
If you're curious about what's causing me grief, it's trying to make jest work with a vue-cli existing project. I encountered a couple of gotchas that ground my gears.
I estimated this bitch ass task to take like 2 hours tops, but I'm like 4 hours on this already, so I'm halfway broken.
Also, another comment:
While seeing the picture of the dutch devrant meetup, I think to myself "man, there's no way I would not feel awkward in that situation.
But then I noticed the beer and was like "oh, that helps".2 -
Full stack devs, who use both: When to you choose GraphQL over REST and vice versa? What has taught you the reasons why?
Just trying to avoid the gotchas on a critical project coming up.4 -
Does anyone know of any good resources for learning to make web apps (specifically HTML and CSS)? I'm not aiming to be a web designer, I just want to learn to make UIs for dashboards and stuff. Are there any particularly good code-alongs for something like that where they explain the caveats and gotchas?6
-
1. Figure out what project needs it
2. Read a primer book (skim), mostly syntax and note the gotchas
3. Start coding
4. Read in detail as reference or Google... While coding -
Unit testing with NSubstitute and Autofac
For the most part, I find it a lot simpler than SimpleInject (hmm) and Moq, which I have used previously.
But there are still some of those 'Oh, for fucks sake!'-gotchas.
I was trying to test a class today where I wanted to substitute all other methods in the class than the one I wanted to test == an actual unit test.
I had previously found out how to do this:
1. Make sure the methods that should be substituted are internal to allow substitution.
2. Substitute class with Substitute.ForPartsOf<T>(args)
3. Set up methods that should not be called with instance.When(a => a.Method()).DoNotCallBase()
This way, you can unit test a class properly and only call the method that you want to test, and also control the return values of the other methods if needed.
So as I said, I have used this before to great effect. But today I just could NOT get it to work! I checked and rechecked everything but the test code kept calling the implementations of the substituted methods!
I even called over another dev for help, but he couldn't see the problem either.
Aargh!
I scoured the internet, but everyone just told me what I already knew: follow the 3 steps, and all is well. Not so!
I ALMOST considered doing the test improperly, as in, increasing the scope beyond that of the method I wanted to test.
But then it hit me... My project was missing this line in AssemblyInfo.cs:
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
I always add a line to make internals visible to the test project, but I had forgotten that NSubstitute needs this line as well to work properly.
Sometimes when a test fails it will tell you that you are missing this line. And sometimes it just doesn't work.
Maybe I will remember this in the future now. Maybe 😅 -
So React is pretty cool. Anyone have any gotchas they ran into with their first React or React Native project?1
-
#Suphle Rant 3: Road to PHP8, Flow travails
Some primer: Flows is a feature that causes the framework to bypass handling the request now but read it from cache. This cache entry is meant to be populated without warming, based on the preceding request. It's sort of like prefetching but done on the back end
While building Suphle, I made some notes on some chapters about caveats and gotchas I may forget while documenting. One such note was that when users make the Flow request, the framework will attempt to determine who user is, using authentication mechanism defined on the first module (of the modular monolith)
Now, I got to this point during documentation and started wondering whether it's impossible for the originating request to have used a different authentication mechanism, which would result in an empty entry for returning user. I *think* it's possible cuz I've got something else called "route mirroring", where web based routes can be converted to API routes. They'll then return JSON, get served under defined API path, use JWT, all automatically. But I just couldn't connect the dots for the life of me, regarding how any of this could impact authentication on the Flow request
While trying to figure out how to write the test for this or whether it was even necessary (since I had no use case), it struck me that since Flow requests are not triggered by an actual user, any code attempting to read authenticated user will see nothing!
I HATE it when I realize there's ambiguity or an oversight, after the amount of attention and suffering devoted. This, along with a chain of personal troubles set off despondency for a couple of days. No appetite for food or talk. Grudgingly refactored in this update over some days. Wrote some tests, not all passed. More pain. May have to convert them to unit tests
For clarity, my expectation is, I built this. Nothing should be impossible for me
Surprisingly, I caught a somewhat lucky break –an ex colleague referred me to the 1st gig I'm getting in 1+ year. It's about writing a plugin for some obscure forum software. I'm not too excited cuz it's poorly documented and I'll have to do a lot of groping, they use arrays instead of objects etc. There's no guarantee I'll find how to implement all client's requirements
While brooding last night, surfing the PHP subreddit, stumbled on a post about using Rector to downgrade a codebase. I've always been interested in the reverse but didn't have any incentive to fret over it. Randomly googled and saw a post promising a codebase can be upgraded with 3 commands in 5 minutes to PHP 8. Piqued my interest around 12:something AM. Stayed up all night upgrading it, replacing PHPSTAN with Psalm, initializing the guy's project, merging Flow auth with master etc. I think it may have taken 5 minutes without the challenge of getting local dev environment to PHP 8
My mood is much lighter than it was, although the battle is not won yet –image tests are failing. For some weird reason, PHP8 can't read generated test images. Hope I can ride on that newfound lease on life to study the forum and get the features working
I have some other rant but this is already a lot to digest in one sitting. See you in rant #4 -
Programming is such:
1. Just want to talk to RabbitMQ from Python
2. End up reading the AMQP specification, looking for gotchas -
Common Man: How do you software developers earn so much? What's the secret of your success?
Software Developer: It's not a secret really. It's like any other job, we make sure we are always needed. So we create a mess and then get paid to solve the mess. How you ask? Software developers create the most complex and useful software. Since it's complex, others learn it and become part of the so called the few experts and then get paid tons as very less experts are there for the software and the creators of the software are also of course experts and in fact considered Guru, because, well, they wrote the complex software. They are geniuses, because it's so hard to write complex software. And many of these experts also create new tools to make the software easier to use, for newbies. They also write articles around it - explanations, tutorials, inner workings and gotchas, and also publish books and videos - in paid tutorial sites, and some videos on YouTube too. -
Heres a good one.
How do I generate a hash that allows me to compare a re-encoded video against the original to verify they are the same so I don't end up with weird gotchas like this length = that length and this filename = that filename
since the file sizes will be completely different ?8 -
Learning to like manjaro, a lot, setting up i3 for a workstation and kubernetes cluster with a couple of manjaro workstations with just the cli installed... few gotchas on the way, get Hyper-V enhanced mode working but get a message session error on dbus launch - easy fix it is already launched by lightdm, the cli install doesn't start the network driver by default but can get a whole 3 node k8s cluster running in under an hour from scratch and forward i3 to a nice, fast, little windows x-server that I got for free with Microsoft reward points.. winning!
-
Thoughts on Apache Cassandra? Seems awesome, but are there any gotchas we should know about before diving in? Currently we use Postgresql for most things.3
-
I'm building a nodejs REST api with jwt token authentication for the first time. So far, it's been as smooth as butter. Any hiccups or gotchas I should worry about?
-
Any recommendations and tips for monorepo setups to share stuff between multiple typescript nuxtjs projects for the frontend and some nestjs backend ones? And all applications are deployed in docker containers.
I feel like I'm going crazy, everything I try is broken, or not fully implemented, or has a shitton of gotchas and customization that must be done on a case by case basis.
This is the most unfun shit I've done in a while.1