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 - "0 bug"
-
This is the expected Binary ++ post from me :P
So, today I go to devRant and see 1's and 0's as my ++'s. I assume it might be a bug, but nope. Turns out it's one of the neat ways of meeting April Fools :)
Thanks to whoever had the idea. It genuinely made me smile.6 -
Random fact #0
Back in the days of SEGA Saturn, SEGA was really picky in terms of the game stability. All the games that we're about to be released had to pass a series of tests, like for instance they had to run for almost a week without any crash non stop on a real hardware, or withstand cartridge tilting. If it failed, SEGA wouldn't license it and developer had to fix the bugs and re-send it again.
To fool SEGA testers, game devs we're adding exception screens with the fake "hidden content". Like in Sonic 3D Blast, it presented a screen in the image below and then the level select screen.
So yeah, it's not a bug - it's a feature11 -
Most satisfying bug I've fixed?
Fixed a n+1 issue with a web service retrieving price information. I initially wrote the service, but it was taken over by a couple of 'world class' monday-morning-quarterbacks.
The "Worst code I've ever seen" ... "I can't believe this crap compiles" types that never met anyone else's code that was any good.
After a few months (yes months) and heavy refactoring, the service still returned price information for a product. Pass the service a list of product numbers, service returns the price, availability, etc, that was it.
After a very proud and boisterous deployment, over the next couple of days the service seemed to get slower and slower. DBAs started to complain that the service was causing unusually high wait times, locks, and CPU spikes causing problems for other applications. The usual finger pointing began which ended up with "If PaperTrail had written the service 'correctly' the first time, we wouldn't be in this mess."
Only mattered that I initially wrote the service and no one seemed to care about the two geniuses that took months changing the code.
The dev manager was able to justify a complete re-write of the service using 'proper development methodologies' including budgeting devs, DBAs, server resources, etc..etc. with a projected year+ completion date.
My 'BS Meter' goes off, so I open up the code, maybe 5 minutes...tada...found it. The corresponding stored procedure accepts a list of product numbers and a price type (1=Retail, 2=Dealer, and so on). If you pass 0, the stored procedure returns all the prices.
Code basically looked like this..
public List<Prices> GetPrices(List<Product> products, int priceTypeId)
{
foreach (var item in products)
{
List<int> productIdsParameter = new List<int>();
productIdsParameter.Add(item.ProductID);
List<Price> prices = dataProvider.GetPrices(productIdsParameter, 0);
foreach (var price in prices)
{
if (price.PriceTypeID == priceTypeId)
{
prices = dataProvider.GetPrices(productIdsParameter, price.PriceTypeID);
return prices;
}
* Omitting the other 'WTF?' code to handle the zero price type
}
}
}
I removed the double stored procedure call, updated the method signature to only accept the list of product numbers (which it was before the 'major refactor'), deployed the service to dev (the issue was reproducible in our dev environment) and had the DBA monitor.
The two devs and the manager are grumbling and mocking the changes (they never looked, they assumed I wrote some threading monstrosity) then the DBA walks up..
DBA: "We're good. You hit the database pretty hard and the CPU never moved. Execution plans, locks, all good to go."
<dba starts to walk away>
DevMgr: "No fucking way! Putting that code in a thread wouldn't have fix it"
Me: "Um, I didn't use threads"
Dev1: "You had to. There was no way you made that code run faster without threads"
Dev2: "It runs fine in dev, but there is no way that level of threading will work in production with thousands of requests. I've got unit tests that prove our design is perfect."
Me: "I looked at what the code was doing and removed what it shouldn't be doing. That's it."
DBA: "If the database is happy with the changes, I'm happy. Good job. Get that service deployed tomorrow and lets move on"
Me: "You'll remove the recommendation for a complete re-write of the service?"
DevMgr: "Hell no! The re-write moves forward. This, whatever you did, changes nothing."
DBA: "Hell yes it does!! I've got too much on my plate already to play babysitter with you assholes. I'm done and no one on my team will waste any more time on this. Am I clear?"
Seeing the dev manager face turn red and the other two devs look completely dumbfounded was the most satisfying bug I've fixed.5 -
!rant & story_time
This happend to the startup I was working for at ~2011. I was a junior Android dev, working on a very popular app.
During experiments for a new feature, I discovered that the system AlarmManager has a serious bug - you can set a repeating alarm with interval=0ms. If your app takes more then 1 ms to handle the Intent, then the AlarmManager will start to fill up the intent Queue, with unexpected results to the OS. causing it to slow down, and reboot when it ran out of Ram. Why? my guess was that because the AlarmManager was part of the OS, then any issues caused by it caused the system process to ran out of ram, crashing it, and the whole system with it. the real kicker was that even after a reboot, the AlarmManager still had Intents queued, causing the device to bootloop for a while, untill the queue was cleared. My boss decided to report the problem to google, as this was an issue in the OS. I built an example app, that caused the crash 10-30 seconds after starting, and submitted to Google. Google responded later that day with "not an issue, no one will ever do this".
Well... At this point I decided to review the autoupdate feature in our app, to make sure this will not happen to us. We just released a new feature where a user can set an update schedule option in the app settings - where you could setup a daily, weekly, or hourly update for the app. after reviewing it, It looked good, and the issue was not triggered in the manual QA I did. So, it was all good. And we released an updated version to the store.
After we did an update-install, we discoverd that, there was a provlem reading the previous version SharedPrefs value for the update schdule settings, and the value defaulted to 0...
the result was, our app caused all our users to go into a bootloop, and because the alarm was reset when the devices booted up, the bootloop could only be solved in a factory reset, or removing our app, before the device rebooted, and then waiting a few reboot cycles.
We lost 50 places in the market, and it took us 6 months to get back to where we were.
It was not my fault, but it sucked big time!4 -
So I once had a job as a C# developer at a company that rewrote its legacy software in .Net after years of running VB3 code - the project had originally started in 1994 and ran on Windows 3.11.
As one of the only two guys in the team that actually knew VB I was eventually put in charge of bug for bug compatibility. Since our software did some financial estimations that were impossible to do without it (because they were not well defined), our clients didn't much care if the results were slightly wrong, as long as they were exactly compatible with the previous version - compatibility proved the results were correct.
This job mostly consisted of finding rounding errors caused by the old VB3 code, but that's not what I'm here to talk about today.
One day, after dealing with many smaller functions, I felt I was ready to finally tackle the most complicated function in our code. This was a beast of a function, called Calc, which was called from everywhere in the code, did a whole bunch of calculations, and returned a single number. It consisted of 500 or so lines of spaghetti.
This function had a very peculiar structure:
Function Calc(...)
...
If SomeVariable Then
...
If Not SomeVariable Then
...
(the most important bit of calculation happened here)
...
End If
...
End If
...
End Function
But for some reason it actually worked. For days I tried to find out what's going on, where the SomeVariable was being changed or how the nesting indentation was actually wrong and didn't match the source, but to no avail. Eventually, though, after many days, I did find the answer.
SomeVariable = 1
Somehow, the makers of VB3 though it would be a good idea for Not X to be calculated as (-1 - X). So if a variable was not a boolean (-1 for True, 0 for False), both X and Not X could be truthy, non-zero values.
And kids these days complain about JavaScript's handling of ==...7 -
Shalom my dudes!
A quick GT from my college years:
>be me
>barely knew how to program but eager to learn more and more
>end of first semester, teacher assigns a couple of classic games for extra points
>battleship, pacman, sudoku, tetris, etc. All done in C
>end up with tetris
>2 days later I have the final build, including all the tech shit like walljump
>start thinking to myself "this looks really fucking ugly, what's wrong with me??"
>look up graphic libraries for C when a light flashes on my computer screen
>*NCURSES*
>the next 2 weeks were a montage of me learning linux, understanding ncurses and redoing my code (plus bug fixing)
>presentation day
>palms are spaghetti
>knees? Spaghetti
>arms? Spaghetti
>class is impressed with my work
>professor comes up to the board and tells me that I get a 0 because it wasn't "pure C"
>clenched my jaw and walked towards the dean office
>"hey, mind if I show you something?"
>open my laptop and show him the game
>he's having a blast since every time you do a 5 row crunch (a tetris), a piece of clothing of a random model comes off
>explain to him what happened in the classroom
>he looks at my code, runs it on a plagiarism checker and tells me that he will edit the grade himself
> a week later there's a 10 on my grading area
>feelsgoodman6 -
You guys made my whole day for the first time since I joined. (yes all of you!)
1) I had a 'fight' with a guy I'm making a startup with. Had to explain some of the story of my life, just to clarify that I'm not evil or generally unwilling to understand - regarding me, having the need to keep using practices
2) I've found that a whole niche-community of people seems to ignore the rest of the community and won't tag along. Having spent several months to be able to help, and receiving shit or absolutely nothing, for finally trying
3) Was in a bad mood the moment I woke up, because I fought with my girlfriend last night because she fails to communicate simple things and won't realise it.
Sorry for the bad punctuation, I tried and smartphones aren't a nice way to edit such things.
So my rant is basically a thank you! Not a rant.. But still, I think you people are the best for being so relatable and making me laugh, and feel like there's more of 'my kind'.
I also just fixed a bug in my app by (finally!) asking the framework maintainer what's up, and got a response which made no sense in a logical manner.. That's a rant for another day, I'll aggregate all the 0 fucks given, when I'm finally able to leave this thing behind, and give you a proper curse-filled shit stack of the nonsense I'm experiencing!
The bug would still live if I weren't so energized by devRant
EDIT: '!' != ','1 -
While writing a raytracing engine for my university project (a fairly long and complex program in C++), there was a subtle bug that, under very specific conditions, the ray energy calculation would return 0 or NaN, and the corresponding pixel would be slightly dimmer than it should be.
Now you might think that this is a trifling problem, but when it happened to random pixels across the screen at random times it would manifest as noise, and as you might know, people who render stuff Absolutely. Hate. Noise. It wouldn't do. Not acceptable.
So I worked at that thing for three whole days and finally located the bug, a tiny gotcha-type thing in a numerical routine in one corner of the module that handled multiple importance sampling (basically, mixing different sampling strategies).
Frustrating, exhausting, and easily the most gruelling bug hunt I've ever done. Utterly worth it when I fixed it. And what's even better, I found and squashed two other bugs I hadn't even noticed, lol -
When defining a range, let's say from 1 to 3, I expect:
[1, 2, 3]
Yet most range functions I come across, e.g. lodash, will do:
_.range(1, 3)
=> [1, 2]
And their definition will say: "Creates an array of numbers ... progressing from start up to, but not including, end."
Yet why the fuck not including end? What don't I understand about the concept of a frigging range that you won't include the end?
The only thing I can come up with that's this is related to the array's-indexes-start with-0-thing and someone did not want to substract `-1` when preparing a for loop over an 10 items array with range(0,10), even though they do not want a range of 0 to 10, they want a range from 0 to 9. (And they should not use a for loop here to begin with but a foreach construct anyway.)
So the length of your array does not match the final index of your array.
Bohhoo.
Yet now we can have ranges with very weird steps, and now you always have to consider your proper maximum, leading to code like:
var start = 10;
var max = 50;
var step = 10;
_.range(start, max + step, step)
=> [10, 20, 30, 40, 50]
and during code review this would scream "bug!" in my face.
And it's not only lodash doing that, but also python and dart.
Except php. Php's range is inclusive. Good job php.4 -
So we're working on a few initial apps for a hackercamp and finetuning the OS. We've been coding for like 17-18 hours trying to finish this off without a day 1 patch on the event itself, when someone starts swearing like a sailor. We walk past him take a look at his code and see that he's started an array at 3 instead of 0. He's one of the more experienced members on the team so this is a lack of sleep bug rather than a not knowing. To this day whenever someone makes an array error in their code someone always shouts "Arrays start at 3 right"!
Maybe not the most satisfying bugs but man is it funny as hell. -
Thank God the week 233 rants are over - was getting sick of elitist internet losers.
The worst security bug I saw was when I first started work as a dev in Angular almost year ago. Despite the code being a couple of years old, the links to the data on firebase had 0 rules concerning user access, all data basically publicly available, the API keys were uploaded on GitHub, and even the auth guard didn't work. A proper mess that still gives me the night spooks to this day.3 -
So my laptop is a Lenovo y50-70 and it's quite good. The keyboard is amazing compared to most other Laptops I've tried the screen is nice, it's durable and it's got some decent specs. With it (and also my desktop) I dual boot Kubuntu and Windows 10.
About three years ago I decided I wanted to reinstall both OS' since they were starting to get cluggered. Lo and behold I wasn't able to do that because, and I quote: "EFI USB Device boot failed".
Hours were spent trying to Google different things to the point where I was even desperate enough to go beyond page 0 on the different searches with (as you might have guessed), no luck. "Fuck that" I thought. It worked and I could clean it manually anyway.
Fast forward to the last part of August this year where I upgraded my Kubuntu from 17.10 to 18.04 and shit got weird. You can read more about it here:
https://reddit.com/r/kde/...
but the TL;DR is in the link. Windows was also quite annoing as well (but don't take my word for it).
As you might understand it made me really frustrated. I couldn't update my BIOS since they were already at the current version, but one way or another I had to fix it. After a while was almost about to give up when I decided to give this:
https://forums.lenovo.com/t5/...
https://bugs.launchpad.net/ubuntu/...
a go. It was weird though. Like imagine the conversation:
"Can't boot from USB bro, what do I do?"
"Just update your kernel, bro"
Well IT. FUCKING. WORKED.
So I imideatly installed Linux and have just now bothered installing Windows (since all of the teachers are vacation so I had plenty of time to set it all up).
But got damn.4 -
Just another big rant story full of WTFs and completely true.
The company I work for atm is like the landlord for a big german city. We build houses and flats and rent them to normal people, just that we want to be very cheap and most nearly all our tenants are jobless.
So the company hired a lot of software-dev-companies to manage everything.
The company I want to talk about is "ABI...", a 40-man big software company. ABI sold us different software, e.g. a datawarehouse for our ERP System they "invented" for 300K or the software we talk about today: a document management system. It has workflows, a 100 year-save archive system, a history feature etc.
The software itself, called ELO (you can google it if you want) is a component based software in which every company that is a "partner" can develop things into, like ABI did for our company.
Since 2013 we pay ABI 150€ / hour (most of the time it feels like 300€ / hour, because if you want something done from a dev from ABI you first have to talk to the project manager of him and of course pay him too). They did thousand of hours in all that years for my company.
In 2017 they started to talk about a module in ELO called Invoice-Module. With that you can manage all your paper invoices digital, like scan that piece of paper, then OCR it, then fill formular data, add data and at the end you can send it to the ERP system automatically and we can pay the invoice automatically. "Digitization" is the key word.
After 1.5 years of project planning and a 3 month test phase, we talked to them and decided to go live at 01.01.2019. We are talking about already ~ 200 hours planning and work just from ABI for this (do the math. No. Please dont...).
I joined my actual company in October 2018 and I should "just overview" the project a bit, I mean, hey, they planned it since 1.5 years - how bad can it be, right?
In the first week of 2019 we found 25 bugs and users reporting around 50 feature requests, around 30 of them of such high need that they can't do their daily work with the invoices like they did before without ELO.
In the first three weeks of 2019 we where around 70 bugs deep, 20 of them fixed, with nearly 70 feature requests, 5 done. Around 10 bugs where so high, that the complete system would not work any more if they dont get fixed.
Want examples?
- Delete a Invoice (right click -> delete, no super deep hiding menu), and the server crashed until someone restarts it.
- missing dropdown of tax rate, everything was 19% (in germany 99,9% of all invoices are 19%, 7% or 0%).
But the biggest thing was, that the complete webservice send to ERP wasn't even finished in the code.
So that means we had around 600 invoices to pay with nearly 300.000€ of cash in the first 3 weeks and we couldn't even pay 1 cent - as a urban company!
Shortly after receiving and starting to discussing this high prio request with ABI the project manager of my assigned dev told me he will be gone the next day. He is getting married. And honeymoon. 1 Week. So: Wish him luck, when will his replacement here?
Deep breath.
Deep breath.
There was no replacement. They just had 1 developer. As a 40-people-software-house they had exactly one developer which knows ELO, which they sold to A LOT of companies.
He came back, 1 week gone, we asked for a meeting, they told us "oh, he is now in other ELO projects planned, we can offer you time from him in 4 weeks earliest".
To cut a long story short (it's to late for that, right?) we fought around 3 month with ABI to even rescue this project in any thinkable way. The solution mid February was, that I (software dev) would visit crash courses in ELO to be the second developer ABI didnt had, even without working for ABI....
Now its may and we decided to cut strings with ABI in ELO and switch to a new company who knows ELO. There where around 10 meetings on CEO-level to make this a "good" cut and not a bad cut, because we can't afford to scare them (think about the 300K tool they sold us...).
01.06.2019 we should start with the new company. 2 days before I found out, by accident, that there was a password on the project file on the server for one of the ELO services. I called my boss and my CEO. No one knows anything about it. I found out, that ABI sneaked into this folder, while working on another thing a week ago, and set this password to lock us out. OF OUR OWN FCKING FILE.
Without this password we are not able to fix any bug, develop any feature or even change an image within ELO, regardless, that we paid thausend of hours for that.
When we asked ABI about this, his CEO told us, it is "their property" and they will not remove it.
When I asked my CEO about it, they told me to do nothing, we can't scare them, we need them for the 300K tool.
No punt.
No finish.
Just the project file with a password still there today6 -
another day another downvote to 0 on a stackoverflow post of a bug that is confirmed and reproducible
🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡7 -
This is a very mild rant about character limit saying that there are >0 characters left when writing comments, then refusing to submit.
I'm so fucking infuriated! I almost raised an eyebrow in anger! What the fuck, my life is literally ruined, this bug is making my toilet visits insignificantly worse!4 -
I hate myself so much right now. I just spent an hour finding the bug in the following:
var counter=0
while(1){
if(counter%2==0){
doStuff()
counter++
}
}
Because I thought it was a bug in doStuff().8 -
Quick Tutorial: How to find a missing bug.
0) Wake up & have breakfast
1) Goto work
2) Do your job until the end of the working day
3) Make a backup
4) Shutdown your PC
5) Stand up
6) Go to the office door
7) Grab the door
8) Now the phone rings
9) Turn and go back
10) Take the phone
11) Now you get the bug report
This is a well approved method.
It always works!3 -
Inspired by @shahriyer 's rant about floating point math:
I had a bug related to this in JavaScript recently. I have an infinite scrolling table that I load data into once the user has scrolled to the bottom. For this I use scrollHeight, scrollTop, and clientHeight. I subtract scrollTop from scrollHeight and check to see if the result is equal to clientHeight. If it is, the user has hit the bottom of the scrolling area and I can load new data. Simple, right?
Well, one day about a week and a half ago, it stopped working for one of our product managers. He'd scroll and nothing would happen. It was so strange. I noticed everything looked a bit small on his screen in Chrome, so I had him hit Ctrl+0 to reset his zoom level and try again.
It. Fucking. Worked.
So we log what I dubbed The Dumbest Bug Ever™ and put it in the next sprint.
Middle of this week, I started looking into the code that handled the scrolling check. I logged to the console every variable associated with it every time a scroll event was fired. Then I zoomed out and did it.
Turns out, when you zoom, you're no longer 100% guaranteed to be working with integers. scrollTop was now a float, but clientHeight was still an integer, so the comparison was always false and no loading of new data ever occurred. I tried round, floor, and ceil on the result of scrollHeight - scrollTop, but it was still inconsistent.
The solution I used was to round the difference of scrollHeight - scrollTop _and_ clientHeight to the lowest 10 before comparing them, to ensure an accurate comparison.
Inspired by this rant: https://devrant.com/rants/1356488/...2 -
Front-end Dev: I got a bug but I don't understand! I've copied all the codes! :(
Me: Where did you copy the codes from? :0
Front-end Dev: From begining to the end!!
Me:...... -
+++ Windows 10 NTFS file system corruption 0-Day will be fixed soon +++
https://bleepingcomputer.com/news/...2 -
This is what they teach in management schools apparently
0 bugs - Dev doesn’t exist
1 bug - There’s a bug!
2 bugs - There’s many bugs
3 bugs - There’s so many bugs
4+ bugs - The app is full of bugs5 -
Spend past 2 days trying to hunt down a bug...
I forgot `0` evaluates as `false` so this statement always returned `false` if `id` was `0` >.>12 -
In an encryption-module, I had a bug, that caused my PC to crash, every time I tried to encrypt something.
Turns out, the loop, that appends
0-Bytes to the string, to make it Block-Cipher compatible,
Had an logical-bug in its exit-condition, that caused it to run infinitely and allocate an infinite amount of memory. -
What idiot uses 0 for a success response!!! Integrating with a 3rd party I found a bug in our code that uses the default value for an int when the external server can't be reached.
As it happens 0 is the default integer in most languages so no surprise when our system accepted the 3rd party as a success when it blew up 😒4 -
So recently a 0-day exploit was discovered in WP plugin Kaswara Modern WP Bakery Page (https://zdnet.com/article/...).
A customer's shared hosting space was taken down (about 6 websites) after this vulnerability had been exploited and although we removed the malicious code, & changed credentials the hosting company demands we update ALL Wordpress plugins to latest AND provide them a virus scan report of our local PC before putting the webspace back online??? WTF???
That just strikes me as outrageous. Thoughts?10 -
Fuck me sideways, it took me so long to figure out what caused a certain bug. Thanks python
>>> list = [[0] * 2] * 2
>>> list
[[0, 0], [0, 0]]
>>> list[0][0] = 1
>>> list
[[1, 0], [1, 0]]9 -
lol nvidia-bug-report.sh
it collected an xorg log that is not the current one.
For some reason, my arch openbox logs to $HOME/.local/share/xorg/Xorg.0.log.
What a goddamn trainwreck. I'm not necessarily saying it's nvidia's fault. But it is a trainwreck.4 -
I ranted about it already.
```c++
if (vec.size() > 0) { // or whatever
cout << vec.size();
// ....
}
```
Its output was zero. And before you ask, it was a single thread program.
Aince it was for my thesis and I was in a hurry I didn't care too much for it.
Yet I think that it was a bug in clang. I removed that piece of code, compiled, rewritten it a bit differently and worked as expected. Never looked back.9 -
rant?
When you want to write the unit test that demonstrates a subtle bug, but before recreating the same preconditions you end up writing 15 other tests, testing a lot of other stuff too, that in turn show other bugs, and skyrocketing the coverage (that was sitting at 0% actually).
Like I wanted to repair a hole in my umbrella to not get wet, and built a house instead. -
Check out my current scenario:
I have to show some progress in fixing a bug to management in the morning..
I tried to sleep early, so that I cud fix it before the standup..
but I couldn't sleep, so I thought of fixing the issue now itself..
Sat down to fix, got stuck with a stupid blocking issue, did all the wrong things to debug it, wasted 3 hours, found the issue fix (not related to the main bug at all)
nd now going to sleep..
It's like:
Distance covered = 1000kms
Displacement = 0!!!!4 -
They tell me to only review security in the security reviews I'm doing (and if I bring to attention that they're implementing a weak encryption so even though they're not using it at the moment it might cause issues so be careful with that they say to only review security 😵) and then I see this mssql in a where:
AND ISNULL(field, 0) IS NULL
And I think wtf, should I report that? I did and it's a bug and they're thanking me now....
God dammit it's hard to "review security" here...3 -
Is it OK to punch a game dev who codes stupid numeric bugs?
So my wife got into Stardew Valley, that admittedly awesome comfort game farming simulator.
She went pretty far in the game, and found some item that was supposed to highly increase the damage she could inflict onto cute little monster thingies.
It didn't work as intended.
Since equipping the piece of shit all her hits did 0 damage. She tossed the item away but the problem persisted. And on and on...
She took to the googles to try and find some explanation, and apparently that is a fairly common bug for mobile devs.
Then she called in the big guns (that is how I'm calling myself in this case, you will see why).
Apparently there is some buggy piece of shitcode somewhere in the game with a numerical insecure routine that overflows the attack modifier. I.e. if it was supposed to increase from 1.990 to 2.010, it actually went all the way down to -0.4.
She was lucky her attacks weren't increasing the monsters' HP.
We found a forum post where some dude said that he managed to edit the game save file and reset the negative-value attack increase modifier variable. Seems easy enough at first, but my wife uses iOS. Nothing is ever so straightforward with apple stuff.
We did get to the save file, she emailed it to me (the file has no extension and no line breaks in it, so we facepalm'd on a couple attempts at editing it directly).
I finally manage to get it into my personal 11-yo laptop... that won't open a single line file that big.
Cue the python terminal. Easy enough to read the file into a string var and search for the buggy XML tag. Edit the value and overwrite into a new file. Send it back to her by email. Figure out how to overwrite the file in iOS.
Some tense moments while the game reloads... and it works!!!! Got some serious hubby goodwill points here.
Srsly, this troubleshoot process is not for technophobes. It is out of reach to pretty much every non-techy user.
And now back to the original question: If I ever manage to find the kid who coded a game-breaking numerically unsafe routine and shipped it as if every test in the planet had waved it bye-bye, can I punch them? Or maybe buy them a beer, let's see how I get to cash that hubby goodwill tonight :)7 -
Got our snazzy new HP Elitebooks from IT. Nice lil laptops.
Guess how many apps they installed for us off the list of "Applications Devs Need" that was submitted with the original request that they asked us to provide.
Goddamn 0. 0 Apps installed. ”Instead here is admin access, install what you want.”
Being a PC guy I don't mind setting up a new environment but things like Office365 and Adobe CC could of been installed for me, I don't have the licence info offhand so now I gotta bug IT again and why ask for a list if your not going to install any of them?? Ugh. I don't have time to sit here while Adobe installs the whole suite....
/rant
What's the first thing you install on your new PC? I find I grab ConEMU first.6 -
Today in Windows Clang misadventures from one past wtf
I have 0 fucking clue what is happening, so I am starting to think that this is a windows 11 only bug.
If I (say for example) compile all of my headers into a .dll and then link them to my executable program, an executable will be generated.
If I use the dll to be linked into my executable, but DON'T use any of the code inside, then no executable is generated.
I need to at least use something from within the headers that I create into the main program for it to build and actually throw out an executable.
I could argue that doing this would be the proper way to setup a project in some scenarios, managing your headers and what not.
The only bad part is that it essentially removes the ability for newcomers to just install clang and hello the fucking world into existence.
Mind you, using the Mingw installation is possible still. I-just-don't-fuckig-understand-why-the-fucking-official-build WORKS
THIS is why people are trying to jump into other languages. My dude's shit is solved, but this fucking infuriates me. ANd go on, try googling "clang not building executable" and see how this shit is nowhere to be fucking found sdfksakjdfa3 -
bitter reflections from a bitter dev on hacktoberfest this year (in the past 2 hours of trying to find issues my IQ has at least halved):
- DefinitelyTyped - used to be my bread and butter to complete hacktoberfest; now, not sure if actual issue, or person just doesn't know how to use typescript (found a multiple such issues that were actually non-issues, the type they were asking for was right there, no pull request needed)
- avoid "issues" on no code / low code tools, these are toxic issues with titles like "I EXPLAIN BUG HERE", then probably not even a bug / more a feature request or clueless clown
- if your entire contributor team has the same character styled profile pic + background, i can't take you seriously; if your identity is so closely tied with what github team you are on... uh, i mean cmon what is this kindergarten? (also love the fact that an anon managed to get themselves mixed in hahahaha they ruined it perfectly!)
- most 'hacktoberfest' issue finders themselves are broken or don't load anything
- people claim issues and then never return YAWN
- the hacktoberfest discord: the projects channel is mostly people promoting their garbage repo WHICH HAS 0 OPEN ISSUES IN THE FIRST PLACE AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA and then OTHER people promoting their own portfolio on hacktoberfest???!! 😂😂😂😂 yeah bro i'm gonna help you with your own portfolio site GTFO
from what i've seen, i think i can start working approximately 5 minutes a day and be more successful than these absolute 🎪🤡🤹♂️ devs
sure, there is being a beginner, and there is being a clown salesmen trying to get people to do work for you... i mean wtf is going on
i WANT to help and contribute, but this year its really a struggle to find anything worthwhile to contribute to!
somehow the spark is gone... this might be my last Hacktoberfest... let me just return to my wisky and be in peace4 -
The fucking worst part of my job is when I get thrown an error on a bug I'm trying to fix and it doesn't even contain an error message. For example, I'll try to verify a self signed certificate but I get an error and literally the only error thrown is [Error 0], no fucking message. If you try to track down the error in the docs they don't even fucking list errors. Times like these make me wish I could castrate people with my1
-
This error, which took me a long time to find, demonstrates the importance of useful variable names.
Using the Wolfram Language:
pp = {};
For[i = 0, i <= Max[p], i++, If[Count[p, i] != 0, pp = Join[pp, {{i, Count[pp, i]}}], -1]];
pp
Outputs:
{{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}, {13, 0}, {14, 0}, {15, 0}, {16, 0}, {17, 0}, {18, 0}, {19, 0}, {20, 0}, {21, 0}, {22, 0}, {23, 0}, {24, 0}, {25, 0}, {26, 0}, {27, 0}, {28, 0}, {29, 0}, {30, 0}, {31, 0}, {32, 0}, {33, 0}, {34, 0}, {35, 0}, {36, 0}, {37, 0}, {38, 0}, {39, 0}, {40, 0}, {41, 0}, {42, 0}, {43, 0}, {44, 0}, {45, 0}, {46, 0}, {47, 0}, {48, 0}, {49, 0}, {50, 0}, {51, 0}, {52, 0}, {53, 0}, {54, 0}, {55, 0}, {56, 0}, {57, 0}, {58, 0}, {59, 0}, {60, 0}, {61, 0}, {62, 0}, {63, 0}, {64, 0}, {65, 0}, {66, 0}, {67, 0}, {68, 0}, {69, 0}, {70, 0}, {71, 0}, {72, 0}, {73, 0}, {74, 0}, {75, 0}, {76, 0}, {77, 0}, {78, 0}, {79, 0}, {80, 0}, {81, 0}, {82, 0}, {83, 0}, {84, 0}, {85, 0}, {86, 0}, {87, 0}, {88, 0}, {89, 0}, {90, 0}, {91, 0}, {92, 0}, {93, 0}, {94, 0}, {95, 0}, {96, 0}, {97, 0}, {98, 0}, {99, 0}, {100, 0}, {101, 0}, {103, 0}, {104, 0}, {105, 0}, {106, 0}, {107, 0}, {108, 0}, {111, 0}, {112, 0}, {116, 0}, {118, 0}, {122, 0}, {125, 0}, {136, 0}, {137, 0}}
As opposed to the expected output, which should have no 0s as the second values in any of the tuples.
I spent a large amount of time examining the code to generate p before realizing that the bug was in this line.3 -
Today I read a great article on mutation tests, how to use and why they are important. It looks like a great thing, but...
I have never wrote any unit test in any of my jobs. Nobody in my workplace does that. And now it seems like 100% test coverage is not enough (I remind you, that I have 0%), they all should mutate to check if the quality of unit tests is high.
It seems that I'm left behind. I played with tests in my free time, but it seems the more you write them, the better you get at it, so I should be writing them in my job, where I code most of my time. Not only that, of course, I would also want to ensure that what I'm working on is bug-free.
Still, it will be impossible to introduce unit tests to my project, because they are novelty to the whole team and our deadlines are tight. The other thing is, we are supposed to write minimum viable product, as it is a demo for a client, and every line of code matters. Some might say that we are delusional that after we finish demo we will make things the right way.
Did any one of you have a situation like this? How did you change your boss and team's mind?8 -
executing back to back awkward experimental snippet successfully.... a dream come true... thinking 💭 of making loop of that day.
-
Heard nothing back from an interview I attended 3 weeks ago. I'm sure this sort of thing is common, but it's never happened to me before.
It's so shitty and unprofessional.
The interview was a joke anyway, bouncing between business questions (strictly non-technical, as I learned that one of the interviewers thought Bootstrap and JS were the same), a written test for a Junior (testing to see if you knew arrays started at 0), then random technical questions which didn't allow me to prove what I could actually do.
So what the fuck are you recruiting for here, a business person, Junior, Mid or Senior developer?!
Total fucking bullshit.
Surely the best way to test a candidate is to let them try to fix a recent bug from your app?
Annoying because I know I can do the job.
Fuck you and your shitty fucking questions. -
"Most memorable bug you fixed?"
A recent instance happened in one of my Scratch projects, and the bug involved "Infinities."
I had an opportunity to teach kids programming, and it involved Scratch. So, to have something to show those kids at least, I decided to make a small game.
In that game, I had an object that takes some time before appearing after being cloned (i.e., instantiated.) The duration was calculated by dividing a constant with a variable:
[Wait for ((3) / (variable)) seconds]
The bug is that I forgot about the case where 'variable' can be 0, which is classic and insignificant.
Well, the thing is that I learned two things the hard way:
1: Scratch is very flexible about integers and floats (e.g., at one second, it looks like an integer, but one operation later, it's a float.)
2: Scratch does not provide any 'runtime errors' that can crash the project.
In other languages, similar "wait" methods take "milliseconds" in an integer, so it would have barfed out a "DivideByZeroException" or something. But Scratch was so robust against project-crashing behavior that it literally waited for f*<king "infinity seconds," effectively hanging that clone without warning or runtime errors. This masked my bug. It took way too long to debug that s#!+.
Don't blanket-mask any errors. -
Found a bug today that made me groan in frustration.
It appears that the official elasticsearch debian package checks if the system's init daemon is systemd by... Checking if systemctl binary is available.
Issue is... Systems might contain that binary while using a different init, as the binary is part of the "systemd" package.
To actually switch to systemd however, the package systemd-sysv has to be installed, which creates a link from /bin/init to systemd's main executable.
What happens when your system doesnt use systemd then? The postinstall/preremove scripts fail as systemctl fails to talk to the system bus, and thus, the installation is marked as failed!
Oversights like this are exactly the reason behind my systemd dislike. We never wanted the systemd package, but another key package suddenly added it as a dependency one day...
Now to see if this is reported as a bug already, and if not, to report it myself...
(also, who checks for init by looking for the init's management utility?! Its like I checked if sysvinit is installed by checking if update-rc.d is installed!
And not like figuring out the system's init daemon is hard anyway! Just check /bin/init, or, better yet, check for process with pid 0!)1 -
After inputting all of the defect info into the bug tracking tool, QA writes a quick summary of their findings and goes home.
Love explaining to mgmt why developers could not fix bugs because they had no access to the bug tracking software.
1 day.... X number of bugs... 0 progress -
I displayed "score: 0" on the dashboard and on the review list, tester noted it as a bug stating; it should have been "score: 0.0" and not "score: 0" because the score is precision based.
You can say this is a half cup full and half cup empty scenario but I will call this silly cup full and brain cup empty!3 -
Implemented a feature against a "restful" json api. The feature works, test-driven development ftw.
Yet on the run with the live api: certain important fields all only contain the value `0`.
Confused I asked around what's going on, expected a bug in the api. Now I've been told that those fields never worked and the relevant information has to be gathered by either querying against a (deprecated!) mysql database. Or use a different endpoint increasing the http request overhead by factor over 1000.
We call it team work. -
This got me fucked up. Listen yo.
So we have this issue on our modal right. The issue keeps poppin. It's a hotfix because its in prod. So my senior and I were on it. After a few hours, I showed him the part of the code that is buggy. It's 50 lines of code of nested if-else, else-if. And so we're still fighting it. He redid everything since we're using angular2 he did a subject, behavior-subject all that bs and I was still trying to understand what's the bug, because it's happening on the second click and so I did my own thing and found the cause bug and showed it to him, its this:
setTimeout( () => {}, 0)
the bootstrap-modal doesn't allow async inside it (I dont why, its in the package). So he explained to me why it's there. So I did my own thing again and find a workaround which I did, a one-line of angular property, showed it to him he didn't accept it because we'll still have to redo it with subjects and he was on it. I said ok. Went back to my previous issue. The director came in and ask for a fixed, my senior came up to me and told me to push my fix. Alright no problem. So we good now. Went back to our thing bla bla bla, then got an email that we will have a meeting, So we went, bla bla bla. The internal team wants a support for mobile, senior said no problem bla bla bla, after the meeting he approaches me and said (THIS IS WHERE IT GOT FUCKED UP) we wont be supporting bootstrap4 anymore because of the modal issue and since we're going to support mobile and BOOTSTRAP4 grid system is NONINTUITIVE we are moving to material design because the grid system is easier. I was blown away man. we have more than 100 components and just because of that modal and mobile support shit he decided to abandon bootstrap. Mater of fact its the modal its his code. I'm not expert in frontend but I looked at the material design implementation its the same thing other than the class names. OHHH LAWD!3 -
Wanted to add alerting for systemd services in Prometheus today, which spontaneously turned out to be a huge pain in the lower human backend.
For some reason, on Ubuntu 16.04 systemd adds services without unit files for software, that isn't even installed on the damn server (in this case for mysql-server / mysql-common and mysql-client are installed) and lists them as "not-found" and "inactive". The prometheus node exporter that we use, has a little bug in the systemd collector that makes sure that the states of *all* services are collected - even those without a unit file.
so those metrics are pulled by prometheus and now I have to take with those faulty metrics in the condition logic of the alert, because I'm trying to trigger that one on a service which is listed with state "active" = 0 or "failed" = 1.
now guess. right! If the unit file doesn't exist, the regarded systemd service is marked as "inactive", which is another possible state of the metrics in the node exporter. the problem is that the value 1 for state "inactive" means, that "active" has the value 0 (not even wrong) and the alert is triggered.
so systemd fucks up somehow, the node exporter collector fucks up because systemd fucked up and I have to unfuck this with some crazy horse shit logic. w.t.f. to that.
the only good news is, that it works like a charm on Ubuntu 18.04, as far, as I can tell.
while writing this little rant, I thought of a solution.
I could try to change the alert condition to state "active" = 0 AND "failed" = 1.. but that will wait till tomorrow.
one does not simply patch monitoring conditions at midnight..3 -
The bug: Some string values for an identifier property in the data objects are being sent from our frontend prefixed with a '0'. Sometimes. When it happens, it usually gets stripped away again by the time it's passed to our backend. But not always.
This 0 is never explicitly set anywhere. I even searched for a few variants of " = 0" in both the frontend and backend projects without receiving any results. You might already be suspecting where this is going.
So it turns out.
The data object which holds this value is being initialized in the aspnet (don't ask) backend and passed to the frontend, which then hydrates it. This value is always an integer number, albeit incidentally so which is why string is used as the actual type. When this object is initialized, it's hardcoded with an anonymous type where this property is set as int because I guess someone figured "it's always an int though". Being a typed language, primitive scalars can't be null objects which means the property's value becomes the concrete int 0.
Okay weird. I can think of better ways of doing this but let's just set it to string as I can't start overhauling things right now. Let's just go find where this value is somehow concatenated into the incoming parameter.
You see, this happens because at the point where the frontend sets this value, it may be an int or string depending on where it came from, and I guess someone figured that in order to cast it to string you just go prop += arg seeing as the prop is empty string and all. Because explicitly casting it or - as much as I get a rash whenever I see it - going prop = "" + arg would be too verbose and unoriginal.
Bonus round: How come the 0 only sometimes made it all the way to our backend? The thing is that this bug has been fixed before. The fix is that because this string is "always" an int, you can parse it to int before passing it to the backend in case it has leading zeroes. This path is only taken in certain views because someone forgot to copypaste their fix into all the places this is repeated.
Sometimes you find a bug and you are just somehow more grumpy after fixing it.1 -
The platform team who provides all other teams with common framework emails everybody we need to upgrade the framework to new version. Let’s say version 1.a.0. They say it brings crucial security features and all pipelines using old versions would be blocked. My colleague created a story to upgrade all of our 10 microservices. When I got to it in a couple of days for some fucking reason they already rolled out 1.a.1 and didn’t inform anybody, the pipelines just logged warning u need to use 1.a.1. Alright, I did the upgrade to 1.a.1 and merged ducking everything in 10 fucking microservices. In a couple of days at morning they roll our 1.a.2 and require everybody to upgrade ducking degenerates as they found a high severity bug. I wanted to start again but was lazy and did nothing all day to learn that at 6pm the fuckers roll out 1.a.3!!! And again require everyone to upgrade!1!1!1eleven
Ten fuxkibg microservices. Goddamit write some unit tests, do friends&family, do fucking tests on small group of your inner clients before rolling out this shit that everybody must to use.
Spat at the display -
This weeks a joke right 😂, the recent day 0 Microsoft bug that allows anyone to get hacked, and allow someone to do whatever the hell they want.(as you can pretend to be any program on the computer)
Or the super user hack on Linux recently patched... Day 0....
The fact 80% of devs implement oauth incorrectly... So their user accounts are hackable...
Need I go on?1 -
Just started doing my project for Java Class, a Polynomial Calculator App.
Get it done, get a dozen errors. Fix every bug. Find other bugs when inputting.
Brainstorm 5 minutes and realize I could change the way I write the polynomial at input.
Change 20 lines of code that do String, Split, Run through the split and check for coefficient and power, parse them to float in an array to specific positiona - to 5 simple lines.
Program works fine. No more previous errors.
Have the great idea to add the following:
-If you divide the Polynomial by 0 output "Are you retarded?"
P.s. I'm happy about my first project even if I hate Java.4 -
Time since the last bug caused by blindly copying code in a if/else and forgetting to change a variable: 0 Hours.
-
I was working on a bug in a parser for the response from an api which returns 'n/a' when a certain measurement isn't available. The code was "if ($value == 'n/a')" and when this was true the value was rejected (language is php).
Some of you may instantly understand the problem here. I didn't. Some of the measurements were 0 which is ok, but for some reason it didn't accept them.
Then I discovered the bitter truth:
0 == 'n/a' is true!
Apparently php tries to convert the string to a number to compare it and if it fails it returns false, so false == 0
😞3 -
I found the weirdest UI bug.
I have a side nav bar, that opens on button click. The way it is implemented: a navbar, that is positioned a lot to the left (120% of it's width). On click, it transitions to 0%.
When I zoom in very close without the sidebar opened on an image, some text from the sidebar is visible.
Pretty weird..1 -
//not a rant
Ok so weird bug. Fellow C# people, help me out.
//already made it work so no I don't need to post it on SO
I write a Switch Case block based on the user's combo-box selection id.
if id 0, add everything to the mainpage grid
if 1, a foreach loop filtering out the ones with a certain attribute of the object as false and adding em to the grid on the mainpage
if 2, similar scenario as 1.
Countless times I had a null exception with the "count" variable being the number of items in the post which, wasn't null. there was no other variable that was being initialized from within the block, so I had no idea what was causing it.
Moving to an if-else statement doing the same thing, same issue.
In the end I created 2 empty lists before the switch case and filled them up and then another loop filling the mainpage grid with the now-filled list.
In the end im doing the same thing, with no issues, but I don't understand why adding it directly caused an error, what was null?
I wanna understand the working that might be causing this.. if anyone else came across this, would be glad to hear from you8 -
When you have a customer that is a pain and you have to do a new contract since months but they are no replying but at same time there is a bug in a plugin they are using.
They are not updating their plugins in production but only after a test in staging.
In production there aren't write permission from web server side, so only they have access.
And the plugin has a 0-day. -
It's so frustrating to explain rxjs pitfalls to the manager.
To avoid the diamond problems and glitches caused by combineLatest and debounceTime(0), I decided to use single stream with nested reactivity.
Then the manager asked me to use withLatestFrom instead of combineLatest.
Sure withLatestFrom makes sense to the original author, when the original author is able to remember the reactive graph and put proper dependencies to combineLasted/withLatestFrom accordingly, but anyone else who touches the component later needs to retrace the reactive graph to avoid the glitch. Sometimes it's just impossible when many dependencies are derived from combineLatest+debounceTime(0). When no one is trained to code reactively, I don't expect people to know where to put a dependency. After many trials and errors, the only way to avoid the diamond problem is to use nested reactivity where child streams are created within root stream each time root stream emits.
The mentioned manager put all sorts of side effects in observable chains. The manager keeps saying the stream is too large when their subscription functions (sometimes nested) are way worse with litered mutations everywhere. Anything in observable can be traced by go to definition but tracing side effects usually requires global searches.
Recently, he put startWith to the end of a synced stream to fix a bug where button would collapse when there is no content (initial null emission). Rather than fixing the default height, he thinks using startWith(defaultLabel) is a good idea. Of course, he doesn't know that a synced stream should only emit 1 value on new subscription and that extra emitted value will cause rxjs glich down the pipe.
I hate corporate jobs -
Trying to fix an urgent issue with our Xamarin iOS app and a known bug in Xamarin "IOException: Sharing violation on path /Assets.xcassets/AppIcon.appiconset/Icon-1024.png" is blocking me.
Luckily I still have my old laptop from my last upgrade on standby, boot it up and it's not using the affected version of Xamarin. 😃
Instead this one has the also know "/ios/release/mono/mini/mini-arm64.c:5439, condition `native_offset % 4 == 0' not met" blocking issue when debugging. 🤦♂️
I just want to do some work. ☹3