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 - "debugging friday"
-
Yesterday was Friday the 13th, so here is a list of my worst dev nightmares without order of significance:
1) Dealing with multithreaded code, especially on Android
2) Javascript callback hell
3) Dependency hell, especially in Python
4) Segfaults
5) Memory Leaks
6) git conflicts
7) Crazy regexes and string manipulations
8) css. Fuck css.
9) not knowing jack shit about something but expected by others to
produce a result with it.
10) 3+ hours of debugging with no success
Post yours27 -
Today's highlights include:
The offshore team has put code gems in production featuring the example code generated on project startup that you're supposed to delete or overwrite, an API endpoint that just returns the value 5, and various debugging console.logs. it's a delight reading their code.
My boss also forgot the meeting he called me in for so I've been sitting here waiting for 20 minutes when I could have gone home. I'm glad it's friday17 -
It was friday evening and almost everyone in office had left. I was assigned a bug related to some of my code changes. I called my senior to help me debug (has three years of experience, whereas me having only one year exp, who is also a very good friend of mine *always helps in debugging*).
So the code goes
switch (someEnum) {
case One:
doSomething()
// no break
case Two:
t.x = someEnum
break
case Three:
.....
}
I had recently added new enun One and was reciting the code logic to him as we were looking through code.
Him: Hey you haven't set t.x in case One. How did you miss that?
Me: No look, I haven't but a break on it. It will go ahead and set it in next case.
Him: What are you talking about? if the someEnun is One why would it execute Two case. Lets copy that line up there and try it locally.
Me: No no no wait. Are you saying that groovy doesn't need breaks in switch (Me being new to groovy but good with Java).
Him: Why would you need break in switch case even in Java?
Me: *stares at him*
Him: I'm going to execute a psvm right freaking now.
Me: *while he writes the psvm* Why did you think there were breaks in switch in any code?
Him: Shut up. *writes psvm code cursing me everywhere*
*executes code*
No way. Really??
Me: Tell me why do you think are there breaks in switch.
Him: I though they were to get you out of switch block and not execute the default block.
Me: So were you coding switch until now without breaks?
Him: I don't know man. I'm starting to doubt all the switches I have ever written.
Me: Anyway that's not the problem, so moving on.
*a while later*
Him: If a interviewer would ask me how would you rate yourself in Java. I would be like "Well I worked on various projects for 3 years in Java, but didnt know why we put breaks in switch. So you figure it out yourself."
One of the best moments in office.8 -
Me: Right, its Monday, time for a fresh start. Things have been unbearable, but i've nowhere else to go just yet. I gotta just dig deep, ignore everything bad and just get it done, It's all about positivity right? Lets just ignore the little things and keep moving.
*My morning so far, 2 hours in*
Remote dev: (timezone 5 hours earlier than me) Hey so whats the plan for this quarter?
Me: ... I posted a big detailed plan in the group chat on Friday night so you wouldn't be delayed ... but anyway, lets just move on. I need you to work on A, B and C. A is just copying what Android has already done, for B one of the backend guys working next to you is doing this, he'll be able to help you. C is all documented in the ticket.
Remote dev: cool thanks.
Local dev: So I was just chatting with remote dev ... yeah he told me he has no idea what he's suppose to do.
Me: ..... Ok i'll book a video call with him in the morning. Can't do it right now.
==========
Remote dev: Hey i'm helping the BE team do some testing. I found a bug in Android. Homepage says theres no trips. But Offers screen says there is.
Me: Ok so just to confirm, The "available" offers screen has offers to accept, but the white notification on the homepage saying "You have X offers to accept" is not showing up?
Remote dev: Correct!
*debugging for 5 mins*
Remote dev: actually no, the "accepted" offers tab has offers, but the homepage says there are no upcoming offers to work on.
Me: ..... ok, thats very different ... but sure, let me have a look.
Me: Right so the BE are ... again ... sending down expired offers. Looks like the accepted tab isn't catching it and the homepage is.
Remote dev: Right i'll open a ticket for Android.
Me: ... and BE team.
Remote dev: why?
Me: ... because they once again have timezone issues. This keeps causing issues in random places. BE need to fix this everywhere.
Remote dev: right, i'll chat to them and see if they can fix it.
==========
Product: So this ticket xxxxx is clear right?
Me: eh, kind of, so you want us to add feature X to user type A?
Product: correct.
Me: right but I don't see anywhere talking about the time it will take to build the screen for feature X
Product: What do you mean the screen?
Me: ... well, feature X is only accessible on screen Y ... we would have to change screen Y to support user type A ... you know ... so they can ... use the feature
Product: .... hhhhmmm .... i suppose you are right. Well we can't just add screen Y, we'll have to add W and Z, it won't make sense without them.
Me: ... ok sure, but our estimates put us over for this quarter. I don't think we can just add in 3 screens.
Product: No this is a must have.
Me: Ok so we'll have to drop something else.
Product: hhhmmm, don't think we can ... let me get back to you.
==========
Backend team invited me to a meeting at 6am my time on Friday.
==========
... 2 hours into Monday ... there must be vodka around here somewhere -
I tried writing this rant before, but I was (and still am) in too good of a mood so it was lengthy, meandering, and over-specific. so I'll summarize(ish).
summary:
* miscommunication
* working weekends
* incompetence and/or screwy integrations
summary of the summary:
* I can't fix someone else's mess if you don't talk to me!
Summary^3: #TODO: learn telepathy
Shortened rant:
Bossman at work signed up a very lucrative client by promising them something he couldn't deliver because he misunderstood and miscommunicated scope -- anti-fraud, if you've been following my rants.
Their signup (all four...) are screwy and cause issues and nobody knows why. I didn't write the code, have barely even glanced through it, and it uses a third-party (Clover) that's rather screwy.
Bossman has been asking me to do various things concerning the merchant, but has never been around to provide specifics, so I'm left to guess. I've done my best, but due to the aforementioned screwiness, I really have no idea what's going on. I just sort of muddled my way through.
Bossman also asked me, super late on Friday night (after 8:30pm), to rename one of the merchants because there are two with the same name (with different Clover creds, etc.) and that's just confusing. I didn't see the message because late and tired, and he didn't follow up or text/call me until two days later (today, Sunday). I also thought these were strictly for diagnosing and were de-listed. I had no idea the merchant was live and people were actually purchasing things for it. Had I known this I would have freaked out and demanded specifics on Thursday/Friday because wtf? debugging in production? with broken merchants? selling things for real money? scary bad? hello?
Anyway, I didn't see his message until he texted me about it at like 5pm today while I was about 2 hours from my computer. He's understandably frustrated, and I totally don't blame him, but fuck, miscommunication is a serious problem in this company, and that's amazing because it's so freaking small.
But the short version is that I'm likely going to get blamed for all this, Clover screwiness included. Bossman and I set up a call for 10am tomorrow and I'm positive he's going to try pinning it on me. Totally not going to let him, but his social is lv16+ while mine's like. 2 or 3. 😕 I'll see how it goes.
Really though, I should read @rutee07's book and just roast these fuckers.rant weekend work debugging in production miscommunication no call no text still my fault hope you see this it's urgent clover strip club3 -
Debugging a system error with a good team of fellow developers/devops people is fun.
We had an issue on Friday where we were getting a pretty cryptic error in our error reporting system. A couple of developers and I got together with a couple of devops people and we worked it out well as a team and figured out a pretty complex issue in a reasonable amount of time with everyone playing a solid role.
Nobody tried to steal the show and everyone listened to each other's ideas on what the problem might be. Through and through a great debugging session and made me think about bad ones and good ones I've had in the past.4 -
Colleague while reviewing my latest commit.
Him: Hey, RemusWasTaken, why did you leave this debug log in here?
Me: That function won't work unless I leave that line exactly there.
Him: It can't stay, come here so we can fix it.
Three hours of debugging later, this Friday afternoon.
Him: Okay, I give up. Let's leave it there for now.
Me: I did the same thing yesterday. Time well spent.
Nodejs is weird sometimes, or we are incompetent devs.5 -
In today's episode of kidding on SystemD, we have a surprise guest star appearance - Apache Foundation HTTPD server, or as we in the Debian ecosystem call it, the Apache webserver!
So, imagine a situation like this - Its friday afternoon, you have just migrated a bunch of web domains under a new, up to date, system. Everything works just fine, until... You try to generate SSL certificates from Lets Encrypt.
Such a mundane task, done more than a thousand times already... Yet... No matter what you do, nothing works. Apache just returns a HTTP status code 403 - Forbidden.
Of course, what many folk would think of first when it came to a 403 error is - Ooooh, a permission issue somewhere in the directory structure!
So you check it... And re-check it to make sure... And even switch over to the user the webserver runs under, yet... You can access the challenge just fine, what the hell!
So you go deeper... And enable the most verbose level of logging apache is capable of - Trace8. That tells you... Not a whole lot more... Apparently, the webserver was unable to find file specified? But... Its right there, you can see it!
So you go another step deeper and start tracing the process' system calls to see exactly where it calls stat/lstat on the file, and you see that it... Calls lstat and... It... Returns -1? What the hell#2!
So, you compile a custom binary that calls lstat on the first argument given and prints out everything it returns... And... It works fine!
Until now, I chose to omit one important detail that might have given away the issue to the more knowledgeable right away. Our webservers have the URL /.well-known/acme-challenge/, used for ACME challenges, aliased somewhere else on the filesystem - To /tmp/challenges.
See the issue already?
Some *bleep* over at the Debian Package Maintainer group decided that Apache could save very sensitive data into /tmp, so, it would be for the best if they changed something that worked for decades, and enabled a SystemD service unit option "PrivateTmp" for the webserver, by default.
What it does is that, anytime a process started with this option enabled writes to /tmp/*, the call gets hijacked or something, and actually makes the write to a private /tmp/something/tmp/ directory, where something... Appeared as a completely random name, with the "apache2.service" glued at the end.
That was also the only reason why I managed fix this issue - On the umpteenth time of checking the directory structure, I noticed a "systemd-private-foobarbas-apache2.service-cookie42" directory there... That contained nothing but a "tmp" directory with 777 as its permission, owned by the process' user and group.
Overriding that unit file option finally fixed the issue completely.
I have just one question - Why? Why change something that worked for decades? I understand that, in case you save something into /tmp, it may be read by 3rd parties or programs, but I am of the opinion that, if you did that, its only and only your fault if you wrote sensitive data into the temporary directory.
And as far as I am aware, by default, Apache does not actually write anything even remotely sensitive into /tmp, so...
Why. WHY!
I wasted 4 hours of my life debugging this! Only to find out its just another SystemD-enabled "feature" now!
And as much as I love kidding on SystemD, this time, I see it more as a fault of the package maintainers, because... I found no default apache2/httpd service file in the apache repo mirror... So...8 -
Funny how I can go all day not being able to think of anyone that bad, but then when I remember THAT ONE GUY from a group project in college, I can't stop ranting.
highlights:
- He micromanaged our group without adding any value on his end
- Scheduled 2 hour meetings on Friday evenings to show us his work so we could "learn and take notes"
- when the group finally reached out and asked if we could work differently, he completely shut down. like stopped replying and working completely.
- last night we were putting together our presentation, he bailed because he had an 8-HOUR date with someone he just met....nevermind that we had our calendar set a month prior
- prior to that date, he submitted code to our final release that was riddled with bugs, so I stayed up all night debugging and rewriting his parts
</rant>2 -
So we released to production today (Friday), not my decision.
All pages work fine expect for the one page which I added a new feature.
It worked fine in Chrome and Edge. But after release a customer who requested the feature said it doesn't work for him. Screenshot showed he was using IE.
Horror time.. it was evident that it has to be the changes to the JavaScript I did, but why does the whole page doesn't work.
So I started debugging. Nothing works on that page in IE11, it doesn't even load the fucking script file. Then I dared to change mode to IE10, it actually gave me an error in my script file. The bad IE has actually picked a mistake that other browsers didn't.
So, the mistake is fun part too.
I had the following jQuery (or Jake Weary) call
$.getJSON(
'/url',
{
argA: a, argB, b, argC:c
},
function (){
// did something
}
);
In second argument, I accidentally typed comma instead of colon. Chrome and Edge ran the script perfectly passing all the arguments.IE 11 failed to load script without giving any error and only IE 10 gave an error of expecting a colon.
I do not know which browser to blame.
PS I didn't try in Firefox, safari, etc.2 -
Whole day was a debug session with several hundred lines of code and tons of if else conditions.
Found the bug.
Time to go home.
I am done. 🤕6 -
Oracle, what's wrong with you? Why do you have in every minor release of glashfish after 4.1 weird bugs which cost several hours of debugging of the own software until discovering there's a glassfish bug occurring in typical situations but there is no fix in sight.
In 4.1.1 there was a bug in the admin panel which throws a exception if you tried to configure JMS and in 4.1.2 there is a bug which prevent finding and loading a necessary class for using jax-rs despite it's available.
I have do complete an assignemt until friday and such bugs are such a pain since i change so many thing just to find out that my first structure/config/etc. was correct. -
The last 3 days I was working on a module that extends a built-in module to add extra functionalities. It was half a success cause the last feature was causing errors.
After spending all day debugging, I closed the IDE to leave work with disappointment. Then I noticed that the whole platform was throwing the last exception on every page, making it completely unusable.
Took me 5 minutes to fix it, just to make the platform usable again. And then I realized that I actually fixed the whole thing that took me all day to fix.
Leaving work Friday after completing pending long tasks.. Priceless!3 -
FML spent ages debugging why a function wasn't working, looks like I must of duplicated the function by mistake. Then after that I was trying to change the functionality slightly but wasn't working. Only spent half of Friday trying to debug it, luckily I fixed it in like 30 seconds today :P
-
"Hey before we launch, can you reintroduce that bug you fixed on Friday? The other team needs it for debugging."
Why the fuck would you need debugging code in production and why the fuck do we want to readd something that was causing problems? Shaping up to be a great week already. -
A CASE AGAINST BLUE PRISM
Let's review one of the worst weeks I had with Blue Prism
Monday: Yay! Solved one of the problems we've been carrying around for a week before.
One of the robots suddenly became slow. Like, REAL slow. A process that would take 3 minutes per record now takes 45, and that broke apart all the following schedule.
There were no updates on the application server, the production machine, the robot, it just became slow. And not always slow; a process manually run from console room would work, a process in debug room would work, it's just the scheduled part that caused problems.
It turned out, BP didn't seem to like that particular combination of schedulation + process + machine. Moving the process to a different machine seemingly fixed that. IDK why.
Tuesday: One of our processes waits for a code to appear in the page, and when that happens, it memorizes this code. However, now it is always returning blank. Worked for months, now it breaks every single time.
After half a day of debugging a bug which DIDN'T HAPPEN IN DEBUG MODE YET AGAIN, at 11pm I decided to just place a nonsensical timeout in page before reading and call it a day.
WEDNESDAY: a scheduled process didn't start. "No sessions created". Thanks Blue Prism, very cool.
THURSTAY: This time, schedulation did start, but the process is "waiting". As in: it's 9:30 am, the process has been stuck in the same step since 6:00 am. Turns out, it blocked during a navigate stage; you need to send a string to clipboard using the standard BP action for that, then paste and click "enter", but for some reason the standard BP object sent "ORRCO" instead of "ORRICO" to clipboard, which obviously returned no results and then... the process just didn't feel like doing things anymore. No errors, no logs, nothing: just sitting on its ass. Because fuck you that's why.
Friday: another process uses a very moderate amount of scripts to work. Nothing really fancy, just a couple of lines of code to place in page some IDs and selector to help BP do its thing, otherwise selecting these elements would be a nightmare.
But
Failed while invoking javascript method:Exception from HRESULT: 0x80020101-> at mshtml.HTMLWindow2Class.IHTMLWindow2_execScript(String code, String language)
The same script -it's not dynamically generated-worked yesterday, the day before and the day after. But sometimes it will not. Why? The answer, my friend, is blowin'' in the wind -
Story time!
I spend few hours last Friday debugging piece of code I wrote. It was based on working code, also authored by me. It was stuff for sending some data to transmitter, all in Python, nothing horrible or tough.
I wasn't able to understand, why older piece of code works (e.g. data are transmitted) and newer don't even when function bodies were same (I was desperate, so I copied-pasted my own working function there). Both function were in same file, bot syntactically correct, newer one was definitely running but still no transmigration from there.
And then it came, enlightenment at Friday afternoon. I forgot to actually push my prepared packet to radio. Older one was encapsulated in transmitter function and newer one wasn't. I was so focused on possible error in packet creation I forgot to send it?! Seriously?! Unfortunately yes.
Moral of the story? When debugging something, try step back (or up in my case) for a while. -
Spent 4 hours today debugging the polyfill for fetch in IE to discover the latest version of IE11 has a bug in FileReader.
I have no way of getting around it. It simply cuts my text response off by a few hundred characters. I have to come up will a solution by Friday...
Why do we have to still support IE 😭1 -
I'm currently working on a dynamics CRM project which has been going on for almost a year, we're on week 19 of defect rectification brought on by a mixture of the clients abysmal testing and spec writing and the pain of debugging in Dynamics.
This project has left me emotionally and physically drained. I used to love where I worked and the guys I worked with but right now I'm the lowest I've felt in a long time.
I have autism and I really struggle with situations I have little control over, I also pride myself on being able to diagnose and fix problems quickly, I've been working on the same 2 bugs for the last 3 week's. I squashed one on Friday but this other one is persistent and I feel like it's killing me.
I've mentioned my low mood to my boss who could only say "It will be over soon". Well I was supposed to be transferred to a new none dynamics project in September, but yeah that didn't happen.
I really enjoy Angular and I've found this long project has caused my skills in it to rust to the point where even the most basic elements are a struggle.
I hate Dynamics and I hate the prospect of going in tomorrow and facing it again.