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 - "hacky workaround"
-
Client informs dev team that he is upgrading all his machines from IE8 to IE11.
~700 lines of hacky js and css previously commented as "//Workaround for IE" removed.
Pure satisfaction.6 -
*[style*="width:"],*[width] {max-width:100% !important;}img[width] {height:auto !important;}
* !important feels so hacky but it works!
Old site with ancient code and multiple people not versed in css or even newer html. Decided, ah F it, just workaround that and * all the things!1 -
My JS app can crash IE11. Totally reproducable.
Had a fun debugging session to find out how this is triggered. Happens inside a deeply recursive call in a library I'm using which redraws the DOM.
Found a hacky workaround to avoid that as I see no real solution. It's not like I'm responsible for fixing IE. These are the days where I'm happy I'm mainly a backend dev...4 -
* Customer reports bug.
* I fix the bug.
* This highlights another issue that I haven't got enough resources to fix.
* I revert the fix.
* <insert hacky workaround here>
We have code that invokes undefined behaviour (freeing memory twice), but somehow people have managed to build around it and now it depends upon it to work.
FML. -
Me: hey guys there seems to be an integration problem?
Vendor: hacky workaround
Me: no that’s a hacky workaround, please check the integration
Vendor (sometime later): yeah so we made an engineering change like, a while back, which fundamentally alters stuff.
Me: so shit is fucked because you don’t think customers should be informed ahead of release? Dude do you not want our money? -
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 -
Hacky code post:
property var value: if(editing || !editing) function(othervalue)
I am coding in a property system that only updates an expression if a variable involved emits a signal. Well the function won't get called unless I change a value. I also want to "value" to be updated when editing changes. I also want it to update even if editing doesn't change. So the or-ing of the state of editing.
The result is the function gets called when object is initialized. Then when the editing flag changes it gets updated again. The workaround of doing this is much worse and requires more hacky code. So I am resigned myself to just or-negating the editing value.10 -
Ok, all of us have seen the memes about how nasty Stack Overflow can be, this is why I usually try to find an existing SO post to read instead of making one. This time however, I found an error that I couldn't fix. A nasty C runtime error. I decided to ask a SO question for help, and awaited answers. I came back, and the question had been flagged to require more info, so I added more. I came back later, and someone told me I was doing it the hard way, and I should be using Visual Studio (I'm on Visual Studio Code), which ticks me off, because I don't want to use the hacky way around the problem, then this same person closed the question! They didn't even answer it, they just offered a simple workaround then closed without an answer. Man, SO sucks sometimes.15
-
What's your best hacky bodge that actually worked? Mine was probably adding an item in a list to iterate off when searching for matching accounts or else it crashed. Love you node.js.