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 - "no tests"
-
My morning:
Me: Why did you just delete the failing unit tests?
Intern: I debugged it for a while and found one of the other developers broke it with his recent changes. I couldn't fix it.
Me: Did you let him know he broke it?
Intern: No.
Me: So you just deleted it and decided to pretend the feature isn't broken?
Intern: ... No ... I mean ... well you told us yesterday we needed to have all the tests passing.
(I NEED a stress ball people)30 -
After listening to two of our senior devs play ping pong with a new member of our team for TWO DAYS!
DevA: "Try this.."
Junior: "Didn't work"
DevB: "Try that .."
Junior: "Still not working"
I ask..
Me:"What is the problem?"
Few ums...uhs..awkward seconds of silence
Junior: "App is really slow. Takes several seconds to launch and searching either crashes or takes a really long time."
DevA: "We've isolated the issue with Entity Framework. That application was written back when we used VS2010. Since that application isn't used very often, no one has had to update it since."
DevB: "Weird part is the app takes up over 3 gigs of ram. Its obviously a caching issue. We might have to open up a ticket with Microsoft."
Me: "Or remove EF and use ADO."
DevB: "That would be way too much work. The app is supposed to be fully deprecated and replaced this year."
Me: "Three of you for the past two days seems like a lot of work. If EF is the problem, you remove EF."
DevA: "The solution is way too complicated for that. There are 5 projects and 3 of those have circular dependencies. Its a mess."
DevB: "No fracking kidding...if it were written correctly the first time. There aren't even any fracking tests."
Me:"Pretty sure there are only two tables involved, maybe 3 stored procedures. A simple CRUD app like this should be fairly straight forward."
DevB: "Can't re-write the application, company won't allow it. A redesign of this magnitute could take months. If we can't fix the LINQ query, we'll going to have the DBAs change the structures to make the application faster. I don't see any other way."
Holy frack...he didn't just say that.
Over my lunch hour, I strip down the WPF application to the basics (too much to write about, but the included projects only had one or two files), and created an integration test for refactoring the data access to use ADO. After all the tests and EF removed, the app starts up instantly and searches are also instant. Didn't click through all the UI, but the basics worked.
Sat with Junior, pointed out my changes (the 'why' behind the 'what') ...and he how he could write unit tests around the ViewModel behavior in the UI (and making any changes to the data access as needed).
Today's standup:
Junior: "Employee app is fixed. Had some help removing Entity Framework and how it starts up fast and and searches are instant. Going to write unit tests today to verify the UI behaivor. I'll be able to deploy the application tomorrow."
DevA: "What?! No way! You did all that yesterday?"
Me: "I removed the Entity Framework over my lunch hour. Like I said, its basic CRUD and mostly in stored procedures. All the data points are covered by integration tests, but didn't have time for the unit tests. It's likely I broke some UI behavior, but the unit tests should catch those."
DevB: "I was going to do that today. I knew taking out Entity Framework wouldn't be a big deal."
Holy fracking frack. You fracking lying SOB. Deeeep breath...ahhh...thanks devRant. Flame thrower event diverted.13 -
"Let's do some pair programming! It will be fun!"
... Fuck no.
Either I start coding and you open a beer, or the other way around. And sure, I do not mind doing each other's code reviews. I respect your feedback.
But I can't look over your shoulder while you misspell keywords. When I write code, I search, try, debug and play at a high speed.
I'm an impressionist/surrealist writing messy passionate functions, breaking lots of things with broad paintbrush strokes before finishing it into detailed perfection. I remember all the places in the code I need to work on, and cover everything with tests.
You're a baroque coder, sometimes even a hyperrealist, with your two-finger 10 wpm typing, writing code strictly line-by-line, decorating every statement with the right checks & typehints in advance. You can not keep two functions in your head at the same time. You write tests reluctantly, but you hate that I barely plan. You plan everything, including your pee breaks.
As a coworker I respect you.
But there is no bigger hell than pair programming with you.14 -
Famous last words:
-"This change was so small, so there's no need for tests. I'll just deploy right away."9 -
Testivus On Test Coverage
Early one morning, a programmer asked the great master:
“I am ready to write some unit tests. What code coverage should I aim for?”
The great master replied:
“Don’t worry about coverage, just write some good tests.”
The programmer smiled, bowed, and left.
...
Later that day, a second programmer asked the same question.
The great master pointed at a pot of boiling water and said:
“How many grains of rice should I put in that pot?”
The programmer, looking puzzled, replied:
“How can I possibly tell you? It depends on how many people you need to feed, how hungry they are, what other food you are serving, how much rice you have available, and so on.”
“Exactly,” said the great master.
The second programmer smiled, bowed, and left.
...
Toward the end of the day, a third programmer came and asked the same question about code coverage.
“Eighty percent and no less!” Replied the master in a stern voice, pounding his fist on the table.
The third programmer smiled, bowed, and left.
...
After this last reply, a young apprentice approached the great master:
“Great master, today I overheard you answer the same question about code coverage with three different answers. Why?”
The great master stood up from his chair:
“Come get some fresh tea with me and let’s talk about it.”
After they filled their cups with smoking hot green tea, the great master began to answer:
“The first programmer is new and just getting started with testing. Right now he has a lot of code and no tests. He has a long way to go; focusing on code coverage at this time would be depressing and quite useless. He’s better off just getting used to writing and running some tests. He can worry about coverage later.”
“The second programmer, on the other hand, is quite experience both at programming and testing. When I replied by asking her how many grains of rice I should put in a pot, I helped her realize that the amount of testing necessary depends on a number of factors, and she knows those factors better than I do – it’s her code after all. There is no single, simple, answer, and she’s smart enough to handle the truth and work with that.”
“I see,” said the young apprentice, “but if there is no single simple answer, then why did you answer the third programmer ‘Eighty percent and no less’?”
The great master laughed so hard and loud that his belly, evidence that he drank more than just green tea, flopped up and down.
“The third programmer wants only simple answers – even when there are no simple answers … and then does not follow them anyway.”
The young apprentice and the grizzled great master finished drinking their tea in contemplative silence.
Found on stack overflow https://stackoverflow.com/questions...8 -
New senior dev joined the project today.
Senior dev: "There's no way for me to test my changes before I merge this into develop"
Me: "Can you at least run our test suite?"
An hour later the develop branch is fucked and everyone who has merged it locally has pages of red errors splattered across their screens whenever they run any tests.
Start looking into what the fuck is going on.
Notice that all the errors are related to changes the new guy made.
Ask him if he ran the tests..
Senior dev: "Nah they wouldn't catch anything locally "
Stare at the stream of red text running down my screen.
Normally I wouldn't care but we were trying to prepare a release... RUN THE FUCKING TESTS ASSHOLE.9 -
Had a PR blocked yesterday. Oh god, have I introduced a memory leak? Have I not added unit tests? Is there a bug? What horrible thing have I unknowingly done?
... added comments to some code.
Yep apparently “our code needs to be readable without comments, please remove them”.
Time to move on, no signs of intelligent life here.39 -
When your colleagues have no tests for their code and tell you not to touch it, because it WORKS!14
-
Client: so how could we test this 😬
Me: you know what, send me an email at linuxxx@companyname.com and I can look if I can properly reply! Keep in mind though that this is for one time only, no further questions through that email address!
Client: Yes of course! *sends email*
Me: *tests* - *works fine* - *messages client back through the ticket system*
Client: *proceeds to send two follow up questions to my fucking work email address*
Me: *selects emails* - *marks emails as spam and deletes them*
Fucking seriously?! Cunt.18 -
You start new job and take over huge codebase without tests and documentation.
It turns out programming language is custom language made by previous developer who was the only one maintaining project.
There is no source version control.
Language runs in vm developed in Fortran.
No one cared to this day cause everything was working.
Project is critical for multi billion dollar corporation that sells medical equipment that keep people alive.
You can’t test your code on real devices only on virtual ones that were made using same custom language but you can’t find source code for it.
Previous developer accidentally died before you were hired.
You signed contract with penalties that will ruin your life.
Your first task is to add “small” feature.
Good luck !12 -
CTO: "You must write good tests with high coverage, ideally use TDD. We need confidence in our releases."
Also CTO: *Secretly commits code changes directly to master at 3am, breaks tests, skips CI, publishes, tells no-one*8 -
Doot doot.
My day: Eight lines of refactoring around a 10-character fix for a minor production issue. Some tests. Lots of bloody phone calls and conference calls filled with me laughing and getting talked over. Why? Read on.
My boss's day: Trying very very hard to pin random shit on me (and failing because I'm awesome and fuck him). Six hours of drama and freaking out and chewing and yelling that the whole system is broken because of that minor issue. No reading, lots of misunderstanding, lots of panic. Three-way called me specifically to bitch out another coworker in front of me. (Coworker wasn't really in the wrong.) Called a contractor to his house for testing. Finally learned that everything works perfectly in QA (duh, I fixed it hours ago). Desperately waited for me to push to prod. Didn't care enough to do production tests afterwards.
My day afterwards: hey, this Cloudinary transform feature sounds fun! Oh look, I'm done already. Boo. Ask boss for update. Tests still aren't finished. Okay, whatever. Time for bed.
what a joke.
Oh, I talked to the accountant after all of this bullshit happened. Apparently everyone that has quit in the last six years has done so specifically because of the boss. Every. single. person.
I told him it was going to happen again.
I also told him the boss is a druggie with a taste for psychedelics. (It came up in conversation. Absolutely true, too.) It's hilarious because the company lawyer is the accountant's brother.
So stupid.18 -
Looks like I'm getting fired on Wednesday :)
Long story:
*I add first unit tests to project.
*Boss adds new functionality and breaks all the tests so I can't compile and write more for what I'm working on.
*Boss is very fragile and cannot handle any comment that can possibly be taken as a slight against him.
Me: "I wanted to ask what our policy on unit tests is please? Because we haven't really said how we are treating unit tests, and everyone myself included is not thinking about them. I also haven't added tests when I fixed bugs and this time your changes broke the tests"
Boss 10 minutes later: "I want to speak to you in private".
Boss: "you are too forceful and direct. You said I should have added tests."
Me: "yeah but I didn't mean in a nasty way"
Boss getting louder and more aggressive: "You are too forceful"
Me: "I didn't mean it in a bad way"
Boss: "I didn't want to add tests for that!"
Me: "then why add any tests?"
Boss: "Fine we are not having this conversation now!"
*Boss storms out
I decided I can't speak to the guy about anything without upsetting him spoke to the manager before I quit because I can't work like this.
That resulted in a meeting with my boss, his boss and the head of HR where I ended up savaging him and told them I can't bring up anything as I can never tell if it will offend him and that I spend ages writing emails and trying to document communications because I just can never tell if I will upset him. Also that I cannot bring up any ideas because I can't tell if he will somehow get offended and that I can't even write code because if I change something he wrote at some point he will get angry.
My boss claims that I am extremely forceful and disrespectful and that I am constantly insulting him and his decisions.
We go back over a ton of shit and I refute everything he says. In the end I have to have a meeting with him on Wednesday where we either get things straight, he fires me or I quit.
I think at this point that our relationship is too fucked for him to be my team lead on a 6 man team.
Side note I keep bringing forth ideas because we have one database shared between 6 Devs, no pull requests (apart from mine and another new guy), no test driven development, no backlog, no team driven story pointing, no running tests before merging, no continuous integration setup, no integration tests, no build step on merge, no idea of if we are on track to our deadline other than his gut feeling, no actual unit tests backend - just integration with a test db, no enthusiasm to learn in the team and no hope.21 -
Newspaper: This CEO is one of the top entrepreneurs in the country, a true tech visionary shaping the future.
--- 3 months previous ---
Lead dev: O2 have said they are will pre-install the app on all their Androids but they need documentation from us.
CEO: documentation? on what?
Lead dev: Our unit test coverage, bugs found / fixed, security scan results, performance assessment, if and where its storing any data etc.
CEO: Ah were not doing any of that crap, bloody unit tests, its not necessary, tell them no.
lead dev: ..... eh ok
O2: *approved*
... true visionary, well done to everyone involved.3 -
The past 2 years where I work:
Me: hey let's use git instead of ftp!
Boss: should we?
Some time later: he is loving it...
Me: hey let's use trello instead of excell!!??!
Boss: huumm.. Dunno... Should we?
After much convincing: whole departments are using and loving it....
Me: hey let's move from rackspace to DO!
Boss: huumm... Convince me...
Year latter: everything smooth and muuuch lower prices... Managing 6 servers instead of one...
Me: UNIT TESTS!!!
Boss: nah, this but a waste of time...
For real? Get a grip man, I only encourage solutions tested ( no pun intended, or is it ) by me for a long time...4 -
Ladies and gentlemen, I would like to introduce you to my latest employee, Dave the Duck! Dave is the new head of debugging and took the job to support his out-of-hand caffeine addiction and 72 children (of which paternity tests are still being done on 10). Dave is also wanted in 4 countries as the leader of the popular gang, known as the Dangerous Ducks. Please do no feed Dave, as he is on a strict diet. #DaveTheDuck #ProgrammersTools #ImNotThatCrazy10
-
I've had my share of incompetent coworkers. In order of appearance:
1. A full stack dev. This one guy never, and I mean NEVER uses relationships in their tables. No indexing, no keys, nada. Couple of months later he was baffled why his page took ten seconds to load.
2. The same dev as (1). Requirement was to create some sort of "theme" feature for a web app. Hacked it by putting !important all over the place.
3. The same dev again. He creates several functions that if the data exists returns a view, and if it doesn't, "echo '0'". No, not return 0 or return false or anything, but fucking echo. This was PHP. If posted a rant about this a few months ago.
4. Same dev, has no idea what clean code is. No, not just reusable functions, he doesn't even get indenting right. Some functions have 4 spaces, some 2 tabs, some 6 tabs! And this is inside the same function. God wait until he tries Python...
5. Same dev now suggests that he become the PM. GM approves (very small company). Assigns me to travel to a client since they needed "technical assistance about the API". Was actually there to lead a UAT session.
Intermezzo, that guy went from fullstack dev to PM to sales (yes, one who calls clients to offer products) to business development, to product analyst in the span of two years.
After a year and a half there, I quit.
6. New company, a "QA engineer" who also assumes the role as the product owner. Does absolutely no tests other than "functional tests" in which he NEVER produces any form of documentation. Not even a set of test cases. He goes by "intuition".
7. Same guy as (6), hands me requirements for a feature. By "hands me" I mean he did that verbally. No spec documents, no slack chat, no Trello card. I ended up writing it as a card in Trello. Fast forward to the due date, he flips out because that wasn't what he wanted. Showed him the card. He walked away, without thinking of a solution how this mess should be handled.
Despite all this, I really don't want him (6&7) to leave the company. The devs get really stressed out at this job and he does make a really good person to laugh with/at. -
DST is my arch enemy.
"Why did I get paid for 7 hours instead of 8?"
"Because you worked from 1:00 till 9:00"
"Yeah, that's 8 hours"
"No it wasn't"
"Why does this input field say invalid time for 02:00?"
"Because that time doesn't exist"
"Why are so many tests failing"
"Because they check timestamps and durations which don't make sense in non-continuous time"
October is even worse...6 -
I don't get it
My brain does not have the capacity to understand it
How the fuck does my colleague manage to write 12 classes/interfaces for something so stupidly simple??
Two classes, a hand full of functions, done.
Why do you need this level of abstraction?
To mock the interfaces in unit tests? The unit tests you didn't write because "they're not necessary"?
No one will be able to understand this clusterfuck of a module even though it's entire purpose is "read number and write number elsewhere"...21 -
Interviewer: So here are the technical tests. You have 20min.
Me: We agree I can use the internet?
Interviewer: No, sorry.
Me: Good, I'll make you pen&paper websites then. Seriously!?4 -
Hello, I just want to let you know I'm working on a 15 year old product and it is currently in production.
It uses Angular.js and one of the earliest versions of React.js. I cannot use ES6, we don't have Babel, no JSX syntax, no CSS preprocessor. No webpack.
I must support browser since IE6 with an ES3 syntax. (luckily I got some some polyfills for an ES5 syntax)
When I build a component I have to call React.createClass and React.createElement.
The render() function is basically a nested pile of React.createElement.
There is no documentation for this product, no tests, no anything.
I had to reverse engineer it in order to understand how it works.
The code base uses mixed programming styles and naming conventions, plus thousands of little js files.
Oh and obviously no hot reload, every time I make a change I have to restart everything.
Please, send help.
I'm in danger.
Sincerely,
An underpaid developer
....
I'm not crying, you are crying...19 -
One month ago. By email.
Boss: so, this client A has a problem with one of our devices and he believes that it's a bug in the software.
Me: all right then, what happens?
Boss: well, he says that the parameter P in the option menu does not changes the device's behaviour as it is supposed to. I'll forward you his mail. You will find attached an excell file with the results of his test performed with and without the parameter active.
Me: < read mail, read excell file > well, boss, his tests are performed in completely different conditions, how could he expect to infer a meaningful results from this?
Boss: damn, you are right. Send him a test plan and follow up.
Me: < send detailed test plan >
No answer in a week. Then...
Client: hi, there, I made this tests, I attached the excell with the results, can you check the software now?
Me: < read another bullshit filled excell file with none of the suggested test performed >
You know what? Just download the procedures you are using from the device and send them by mail, specifying the software version you are using so we can perform some tests here in the lab and get yo a solution asap.
No response. For a MONTH.
Super Boss: client A still has his problem, how could possibly be that it takes more than A FUCKING MONTH to solve his issue??
Me:...4 -
One team was delivering for 12 months.
... but definition of done not met. Code crap everywhere. Tests barely there and are total mess.
I inherited mess after previous lead engineer.
I exposed all the issues to the management in a straight way, no sugar coating.
... and now guess who's the bad guy for "complaining" instead of shut up and "making it work"?
P.s.
"Giving accurate report about situation" is seen as "complaining".7 -
Product Owner: "need this doing in 6 months, can you do?"
Me: "we're too busy to start another project at the moment - can you wait about 6 months for it to start, or I'll have to hire more devs"
PO: "I'll just outsource it"
36 months later the company he outsourced to is out of business and hasn't delivered, and I've had their half-finished shit show git repo dumped on me.
No comments, no docs, and no units tests, so no fucking idea what it's supposed to do4 -
As a Java developer, reasons to kill other programmers:
- static mutable variables
- WRITING to static mutable variables
- API call with Framework X didn't work. Add Framework Y along with X and try that. Wrap X in try/catch statement. Catch block fires framework Y.
- six, seven, ten levels of nested code. Zero thought put in organization
- 6K LOC Java files
- spring (singleton? Maybe) object assigning values in static mutable (see pt.1)
- a couple of unit tests in code base that no longer work. Zero unit tests in new code
- unit testing disabled in CI pipeline
- empty catch blocks
- pass mutable data between threads. Modify in various places concurrently.3 -
*job ad* We strongly adhere to TDD
Reality:
Me: yeah but shouldn't we write tests first and then get X finished?
Manager: No takes too much time, we finish X and then we decide if it's worth testing.5 -
No boss... For the fucking millionth time: unit tests are not a waste of time.
You keep testing everything manually and hoping that you tested everything every time and praying that there are no bugs IS THE FUCKING TIME WASTE
My boss just can't fucking wrap his head around automated tests... I'm trying hard... Gonna try harder...6 -
My code broke for no reason.
I added a log statement to see why.
*tests code*
It worked....
What the 何?!5 -
I was asked by our tester and scrum master to ignore some failing unit tests yesterday. The tester literally said "no time for tests, we need the build now". The scrum master is also a tester and agreed. I dont think I can respect either of them as testers anymore.3
-
Why... why the fuck do people write unit tests and then comment out the god damn fucking assertion lines....
Like what the flying fuck? Cool, we can get some code coverage marks but for fuck sake actually let your tests do their fucking job!!!
Oh, the asserts fail?
Well fucking sort that shit out instead of commenting them out.
I don't get it, if you're going to write tests, fucking test something with them, or we'd be better of without them.7 -
FUCKING FUCK JAVASCRIPT AND IT'S FUCKING 10000 DEVDEPENDENCIES.
LET ME FUCKING CODE AND WRITE TESTS AND NOT SPEND FUCKING ONE FUCKITY FUCK WEEK TRYING TO FIGURE OUT HOW TO FUCKING MAKE MOCHA AND KARMA PLAY WITH FUCKING ES6 CODE YOU FUCKING FUCKTARD PIECE OF SHIT TECH.
I NO LONGER FUCKING KNOW WHICH PACKAGES I FUCKING NEED AND WHICH I FUCKING DON'T FUCKING DUMBFUCK FUCKWIT OPEN AND HACKABLE MY BROWN ASS PIECE OF TECHNOLOGY STACK.8 -
My coworker implemented this date extension for no reason. Also handles back before they changed it. He wrote tests too6
-
!dev && feelsbadman
I don't know what to think.
All I know is that I just went reaaaaal close to a disaster.
Friday morning, my "scariest" manager (as in, if you have to meet with him, it's usally for something serious) told me that he needed to see me on monday (so today) with the lead dev, the project manager and the dude who recruited me.
The meeting was like an arena of 4 vs 1, where they all 4 had problem with the work I do, as in I make a lot of small but stupid mistakes that wastes everyone's time. As an excuse, I suffer from sleep apnea so I wake up as tired I am when I go to sleep, and I snore loud as fuck. I've heard some records, it's not even human. (I'm 1m85-ish for 125 kg, it's BIG but with my morphology it's not like I'm a ball of fat)
Anyway. And since it's not the first time they're reproaching me this kind of stuff, they were all... really angry. Because I'm a nice guy, competent and all but not productive enough and easily distracted.
So, when the manager asked me to meet me, it was to fire me. However, during the lunch break, the lead dev found a solution: I get out of the current project I was in until this morning, and I write all the functional tests for all the projects, because they all lack quality and we sometimes deliver regresses.
They proposed me this in a way I could refuse, and I'd get fired because they had no other options. Obviously, I said yes, I'm not stupid enough to decline a possibilty to avoid a monstruous shitstorm that would have cut me my studies, the money for taxes, and a lot of fun to find a job as fast as possible.
But what surprised me the most is that they were genuinely glad I accepted, like, even though I made my shit ton of mistakes, they weren't pleased at all to get rid of me.
And in a way, I'm the one who won in this story, since I don't have to work with Drupal anymore, excepted to parse the website to write my tests, but my nightmare fuel is finally gone *.*
I don't know where to finish with this rant, but I needed to vent this whole thing, to write it somewhere so I can move forward.
I wish y'all a nice week.3 -
I jump on an existing scala project.
git pull && sbt compile test
Tests are failing.
Me: "Hey team, the tests are failing."
Team member: "That cannot be. They were passing for the the last run."
Me: "Did you run them locally?"
Team member: "No, on Jenkins. It was fine."
I check Jenkins.
Me: "What do you mean it's fine. The last successful deployment was on the end of May."
Team member: "The Pull Request checker always went through successfully."
I check how our Jenkins tasks are configured. It's true that the Pull Request Checker runs successfully yet due to a "minor misconfiguration" (aka "major fuckup") the Pull Request Checker only tests a tiny subset of the entire test suite.
Team members were were fine if their Pull Request got the "Success" notification on bitbucket's pull request page. And reviewers trusted that icon as well.
They never checked the master run of the Jenkins task. Where the tests were also failing for over a month.
I'm also highely confused how they did TDD. You know, writing a test first, making it green. (I hope they were just one specific test at a time assuming the others were green. The cynic in me assumes they outsourced running the tests to the Jenkins.)
Gnarf!
Team member having run the tests locally finally realizes: "The tests are broken. Gonna fix them."
Wow. Please, dear fellow developers: It does not kill you to run the entire test suite locally. Just do it. Treat the external test runners as a safety net. Yet always run the test suite locally first.4 -
Today I fell down the rabbit hole.
I've been writing some automated tests which found an asymmetry in our algorithm which I think is caused by an off by 1 in even input dimensions.
Change input to odd dimensions, crash due to out of bounds exception.
Switch to debug mode to try to work out why we crash, failing asserts for default function arguments with no obvious reason beyond a helpful message saying they're unsupported.2 -
When I discovered Clean Code, design patterns, TDD and BDD. It just clicked. Ever since everything build so easy and obviously. I no longer have most of the code problems folks rant here about.
That's when it came to me: it's not enough to know how to write code. To climb off those amateur shoes I must adopt those methodologies, so that the code would be decoupled from me, from my style, and I've got to let tests drive my code rather than vice versa to have a flexible and reliable codebase that is cheap and easy to maintain/extend.40 -
## 4 years ago:
- Principal Architect: We are using IO1 storage type. What if we used GP2?
- Perf team: IDK, let's test it!
*we run tests*
- Perf team: results are OK, but we're exhausting Burst IO capacity, effectively hard-limiting number of tests we can run per day
- PArch: ahhh, I see. Then Gp2 is a no-go.
## 3 years ago
*PArch quits. New one is hired*
- PArch2: We are using IO1 storage type. What if we used GP2?
- Perf team: We've already tested that a while ago, results were THIS and THAT
- PArch2: I see. Let's test it again anyway
- Perf team: *wtf???*
*we run the same tests, we get the same results*
- PArch2: I see, so GP2 is a no-go.
- Perf team: *you think....? How did that thought never cross our minds, we wonder...*
## 2 years ago
*new DBA is hired*
- DBA2: We are using IO1 storage type. What if we used GP2?
- Perf team: We've already tested that a while ago, results were THIS and THAT
- PArch2: We've already tested that a while ago, results were THIS and THAT
- DBA2: I see. Let's test it anyways. I've read somewhere that GP2 might be a better bet
- PArch2: you might be right, let's do that
- Perf team: *wtf???*
*we run the same tests, we get the same results*
- DBA2: I see, so GP2 is a no-go.
- Perf team: *you think....? How did that thought never cross our minds, we wonder...*
## 1 year ago
*DBA manager left; new one was hired*
- MGMT_dba2: We are using IO1 storage type. What if we used GP2?
- ........
Should we even bother bringing up the history.....?11 -
Was in a meeting today with a team I just joined, I asked what they used to write tests.. they said they don't write tests because no one would see them..
This is crazy right?9 -
You guys should really take a look at your YouTube history sometimes (If you use it). It's amazing how I move from one video to another.
Here is what I did yesterday:
- I watched a GOT Season 7 review
- Then for some reason, I watched Underground nuclear test
- Several HD footages of Nuclear tests
- Top 10 Demolitions gone wrong 😕
- "No Planes" in 9/11 attack 😕
- Amber Heard's Sexy Prank 😕
Fucking hell, I need to get back to work ☹️17 -
Our internship and placement tests start from 30th and this is message we got from our coordinators.
😤
(We do have WiFi on campus and in labs ,idk why they aren't letting us use that!!)
They are asking use to use the DONGLES ! who the hell has those, these days !
Uni's response to this : if you can't get your own internet source,then don't give the test. (Translation : we don't give a single flying fuck)
Got my self a Jiofi ,I hope it would work fine.
BUT !!!!!!!!
Often our phones catch no network in the labs ! And if they do,the internet speed is slow.
The tests will go GREAT ! 🙃25 -
I got some work on a new project so I ran the 500, or so, unit tests and it took almost 3 minutes. Everything was mocked and no external dependencies so I got curious as to how on earth they could take so long.
I found some suspicious code doing a while loop over a date range incrementing by 1 day each time. It turned out the tests didn't initialise the start date which defaults to 01/01/0001, and there are 5 scenarios!
I got test execution down to a respectful 10s.5 -
The lead dev left the company two weeks ago. His last hurrah involved committing a bunch of complicated code into our API. The code he writes is generally overly coupled but this particular code is INSANE.
It is so coupled that the tests for it almost mock the entire application end to end. I only found this heap of garbage when the deployment tests were hung after I made a simple change in a totally unrelated file. THEY DIDNT FAIL. JEST GOT INTO A STATE WHERE IT CANT CONCLUDE AND HAS NO ERROR MESSAGES. We are taking about entirely different parts of the code. As far apart in the code as it can get. It took six hours of playing Sherlock Holmes to figure out what was breaking.
He got the most junior developer to approve the garbage PR as well.26 -
> IHateForALiving: I have added markdown on the client! Now the sys admin can use markdown and it's going to be rendered as HTML
> Team leader: ok, I've seen you also included some pics of the tests you made. It's nice, there's no XSS vulnerabilities, now I want you to make sure you didn't introduce any SQL injection too. Post the results of the tests in the tickets, for everybody to see.
I've been trying to extract from him for 15 minutes how sending a text through a markdown renderer on the client is supposed to create a SQL injection on the server, I've been trying to extract from him how showing all of this to the world would improve our reputation.
I miserably failed, I don't know how the fuck am I supposed to test this thing and if I a colleague wasted time to make sure some client-side rendering didn't create a SQL injection I'd make sure to point and laugh at them every time they open their mouth.9 -
TeamLeader: I need you to stop disagreeing with the decision of the management, the people in there are taking their decision for a reason.
IHateForALiving: When integration tests were failing, the management decided to comment out the ingration tests; god knows how many bugs slipped by.
When users had problems with the idiotic migration process the management designed, the management decided to remove down migrations; it took two weeks before the QA team started screaming, as all their machines were filled with garbage data.
I was writing type definitions for my code, you removed it. You effectively ensured the only person capable of working on that particular piece of code would be me.
I have been proposing for 8 months to make a unified scheduled jobs system, you all decided to create at least 5 different -and incompatible- implementations, at least 4 of them are total garbage with setTimeout, there's no way to ever unify them and God willing they never break, if they do there's NO WAY to find out even where tf they're hidden in the code.
Every time you were making one of those bad decision I was the only one warning you of the problems you were creating. The idiotic change of the day is going MongoDB+Angular: I can keep a low profile if you want, but when this blows up you can be damn well sure I'll handle my 2 weeks notice because there's no way on earth I'll be stuck with the aftermath of you lot taking technical decisions you are clearly unable to manage.11 -
We've had a bunch of flaky tests in our repo for a while now that no one could be bothered to fix; we'd just re-run ci until it's green. Today I looked into it and I was inspired to make this meme, because I lived through it.
Adding logs to investigate just lowered the fail rate making investigation more difficult. I do have an idea of what it might be though so, we'll see tomorrow.3 -
"I'm almost done, I'll just need to add tests!"
Booom! You did it, that was a nuke going off in my head.
No, you shouldn't just need to add tests. The tests should have been written from the get go! You most likely won't cover all the cases. You won't know if adding the tests will break your feature, as you had none, as you refactor your untested mess in order to make your code testable.
When reading your mess of a test case and the painful mocking process you went through, I silently cry out into the void: "Why oh why!? All of this suffering could have been avoided!"
Since most of the time, your mocking pain boils down to not understanding what your "unit" in your "unit test" should be.
So let it be said:
- If you want to build a parser for an XML file, then just write a function / class whose *only* purpose is: parse the XML file, return a value object. That's it. Nothing more, nothing less.
- If you want to build a parser for an XML file, it MUST NOT: download a zip, extract that zip, merge all those files to one big file, parse that big file, talk to some other random APIs as a side-effect, and then return a value object.
Because then you suddenly have to mock away a http service and deal with zip files in your test cases.
The http util of your programming language will most likely work. Your unzip library will most likely work. So just assume it working. There are valid use cases where you want to make sure you acutally send a request and get a response, yet I am talking unit test here only.
In the scope of a class, keep the public methods to a reasonable minimum. As for each public method you shall at least create one test case. If you ever have the feeling "I want to test that private method" replace that statement in your head with: "I should extract that functionality to a new class where that method public. I then can create a unit test case a for that." That new service then becomes a dependency in your current service. Problem solved.
Also, mocking away dependencies should a simple process. If your mocking process fills half the screen, your test setup is overly complicated and your class is doing too much.
That's why I currently dig functional programming so much. When you build pure functions without side effects, unit tests are easy to write. Yet you can apply pure functions to OOP as well (to a degree). Embrace immutability.
Sidenote:
It's really not helpful that a lot of developers don't understand the difference between unit, functional acceptance, integration testing. Then they wonder why they can't test something easily, write overly complex test cases, until someone points out to them: No, in the scope of unit tests, we don't need to test our persistance layer. We just assume that it works. We should only test our businsess logic. You know: "Assuming that I get that response from the database, I expect that to happen." You don't need a test db, make a real query against that, in order to test that. (That still is a valid thing to do. Yet not in the scope of unit tests.)rant developer unit test test testing fp oop writing tests get your shit together unit testing unit tests8 -
I think I'm falling in love. With TDD.
I used to be very skeptic about it. You know, the usual reasons: it takes longer to deliver, constant "flow" interruptions, etc, etc. But ever since I've tried it I'm nothing but happy about my choice :)
I'm moving forward, I'm not making any regressions, I'm no longer afraid to make any changes in my code as I know tests will show what exactly I break,.. And most importanty, I have all use-cases with corner-cases defined and "explained" in the code... No more do I have to search in Confluence for how this exact scenario should behave. Everything is here. Everything's in the tests.
It's amazing!
Yeah, it DOES take longer to deliver so if you're hardcore Agile living by "Ship it as soon as it compiles" TDD might be too slow. But if you prefer knowing when your code is covering all the use cases w/o any errors -- TDD is the way.12 -
Boss: Any idea why ColleagueX's code might be blowing out the memory?
Me (internal): Cos he's a fucking retard who can't code for shit, doesn't listen when I tell him to do stuff properly because he's fucking lazy, has no idea what stack and heap are, uses goto everywhere, doesn't know how to debug, doesn't write any unit tests, and generally WASTES MY FUCKING TIME!
Me (external): Probably a memory leak. I'll take a look.2 -
There are 2 node js apps floating around the city...built by me for intranet apps used in a logistics company.
I legit asked a friend if it has been replaced and he said no, that they keep on running like a fucking beast causing no issues whatsoever.
Fascinating. I was legit expecting it to crash a while ago.
Guess mern stacks do scale if you know what you is doing.
Write your unit tests people.2 -
A while back I feel asleep on the couch on the day of the state of the union address.
My deadass mind heard someone asking what the "state of the unit tests" was and I leaped up and said "there aren't any! i'm sorry, it's only a small project anyway".
Thank god no one else was there... 😂 -
Friend of mine: so I wonder how do you test your applications in the startup?
Me: testing? *grabs his coffee laughing*
Actually we have a complete build pipeline from commit/pull-request to dev and production environments. No tests. Really. We are in rapid product development / research state.
We change technologies and approaches like our underwear (and yeah, this is frequently). If we settled some day and understood the basic problems of the whole feature palette, we'll talk about tests again.rant early product development test driven development proof of concept don't make me laugh prototype startup3 -
We made a simple SMS application - when there is alert in a building, SMS is sent to specific range of numbers, based on the alert type. After a month we received invoice of approx. 10K € from the client, my colleague was supposed to pay
.
.
.
.
.
.
.
.
.
.
.
After checking the logs and running tests on module, we found out it was not our fault, client then told us he played with SIM-card while module was sending SMS and somehow he managed to fu*k up. I still don't get it, partially.. Mobile service provider doesn't give a sh!t about sending tons of SMS/hour? No warning, nothing..
Ahh.. Clients, right?7 -
New country, new company, new team, new projects.
I'm supposed to be the TL of a team working on a React project.
A guy in his late 40s celebrates himself as "the senior", he basically just finished watching a youtube thing, React 101 crash course or similar. The other two juniors who did only Wordpress so far venerate him like a god.
The code, of course, is one on the finest pieces of crap I ever had the pleasure to deal with in my life: naturally a bunch of JQuery plugins for everything, no tests, no state management, side effects everywhere, shared state and globals like hell, everything written in ES3/ES5 style, no types, no docs, build and deploy totally manual, deep props drilling at every level... and not to mention the console.log() shipped in prod.
First day, already headache.
Full rewrite start tomorrow.
Hiring real devs as well.4 -
Me: I think we should implement some kind of unit tests.
Lead: No time everything will take twice as long.
* some of my code accidentally breaks some of his *
Lead: I think we should implement some kind of unit tests...4 -
Do you ever have those weeks where you have to fix a bug, then uncover another bug then another then another. Then you realise some functionality is completely missing. You write tests to cover your bug fixes and new functionality. Then you realise tests are broken with your fixes and you have no idea why. Then you get so frustrated you start making silly mistakes. Then your debugger starts playing up.... Yeah that's been my week.5
-
When did it become a trend to give people 4 hour technical tests? As a 32 year old man who commutes to work (1.5-2hrs each way) where do they possibly think I'll ever get that amount of time to complete a "test".
What's wrong with a github link and a face to face chat? A decorated linked in with recommendations?
Why can no one have the confidence to hire a dev?4 -
I'm a jr developer. I started off in automation testing and don't mind it but the testing codebase is cancer, doesn't follow basic Java conventions even basic naming conventions like camelcase, and the tests are super slow using hardcoded Thread.sleep(). Since the automation tests are not automated, I have to run manually. YES manually, every morning I wake up early at 7am to run the 2.5 hour long tests (7am because this before people get to work and when the application goes back online). I run this bitch and monitor them but most of them fail anyways. I also have to write a email report on the results which means I have to explain why shit is failing so I have to debug all this crap. This shit literally eats up an additional 2-3 hours of my work day everyday and the time is not even accounted for. ALSO, since it's running on my laptop, it makes my computer slow most of the day. If I have to debug, I can't have the browser be headless so fuckin chrome browsers be popping up every 2 minutes. I did this for legitimately 8 sprints until I decided enough was enough and bitched about it and the team told me I had no choice. I eventually got them to push towards automating it but it's still in progress so I'm still running this dumb shit. The contractors try to take advantage of me any way they can by giving me mindless bitch work they don't want and they know I don't usually say no since I'm a jr resource. I hate running the fucking automation tumor. Sometimes I go into the meeting rooms alone to scream.
I feel like I'm wasting my life away and not learning as much as I could somewhere else10 -
> raw http request injected in the model
> 400 lines long method, followed by three 300 lines long methods
> no autocomplete, no comments
> code called by the whole application, I mess up once there's at least 150 other components that might break
> no documentation, no tests
> pyramid of doom, 13 levels of indentation
Those are the same people getting all puffed up because the cat dared to sit on my shoulder during a call. Management focused on the real fucking problems, no doubt.rant 1 your mother gorges herself 2 with the most vilesome dicks in the kingdom 3 in rows of 250 each4 -
This happened today
My Manager: How is the progress so far on the search module?
Me(After implementing some crazy shit requirements): It's all set. APIs are working well against the mock in-memory database. I need an actual database to run my unit tests. Where do we have it?
My manager: Let's pretend that there is no database at this moment. Go-ahead with rest of your activities.
Me(IN MY MIND): F*CK you a** hole. You don't know the first thing of software development! Which a** hole promoted you as a manager!!!
Me(TO HIS FACE): Ah.. okay!! As you wish!3 -
JUST SHUT THE FUCK UP AND DONT TOUCH ANYTHING FUCKING IDIOT!
Changes my code while I’m in holidays, deletes the tests that fail and pushes it to master. No backwards compatibility or anything..
Now I can spend a week to revert all his changes because they break lots of stuff and pray that he didn’t mess up the data too much..9 -
Our CTO doesn't believe that tests improve code quality. We have no tests on any level, no testers/QA, no code reviews. Nada. I wonder why production keeps breaking 🤔 Guess I'll start looking for another job 🤷♂️20
-
Once during a standup, I mentioned that I needed to fix some unit tests before the build would be ready. Our tester then said "no time for tests, we need the build now". That was a dark day.
-
Has anyone felt the astonishing effect that is writing a whole bunch of test classes, hitting run for the first time and they all pass.
I'm kinda sitting here staring at my screen in disbelief, either these tests all passed, or I've really missed something and they passed anyway, or it's just a lying piece of shit trying to question my own abilities... all are possible right now.
And no, they are not " assert(1,1) "rant i think it's lying to me tests classes first go all pass i'm a run these again to be sure i don't believe it4 -
The moment when all your tests cases for the first assignment of the term pass, your code is refactored and have adequate comments but you only get a 52/100 because your marker says your code is not "elegant enough" as a feedback.
Yeah, those were his exact words with no specific context or reasons. He didn't even explain when I went to him for explanations. I don't mind a bad grade, I could be wrong and that is fine.
#rantend13 -
git push origin stupid-long-feature-name
git pull origin develop
*Checks through all changes. No major conflicts. Accepts changes.*
npm test
*4 failing tests, none of them in pieces that I touched for my feature.*
*That's funny. QA was loaded from the develop branch, and everything works.*
*Actual data has dates from today. Expected data has dates from a week ago.*
*examines tests*
Why are all these expected dates hard-coded‽
tl;dr The external development team committed 4 tests that would only ever pass on the day they were written.5 -
New job surprise: I will inherit a 900k lines of php code from a contractor dev shop. It is the company erp web app.
It has no version control, tests, architecture or configuration management of any kind.
There are just 1800 bug ridden files with almost no comments in a directory with lots of code duplication.
Also just learned that the contractor was paid a lot monthly for over 2 years for this monster.
I will need a raise quickly. At least management understands that I will need a couple of months to get a semblance of order in this madness.
And to you contractor I have your address and i'll try to restraint myself from vandalizing your house but I can't make any promises.
And fellow developers send help or beers or come and join me to teach this bastard a lesson.5 -
Java dev here. I rewrote an app and replaced a system call to ssh with a modern jaxrs post for uploading a file and (new) some additional data.
I even used a stream.
1 hour in production, first client doesn't get his file. Log says OutOfMemoryError: heap.
Me: wtf? I already use streams.
Looking at the Jersey library. Docs say nothing. An issue from 2013 says: oh if you silly don't use the Apache httpclient addon, we disable chunking and buffer the whole body, because our tests fail with the jdk included http client otherwise.
Me: meh.
No warning in the logs. Thank you soooooo much! Who could have known?4 -
Here is a brief list:
- Idiots from marketing
- idiots from sales
- the lawnmower man (while doing his job)
- sun
- AC off && summer
- no ventilation / fresh air
- civil defense siren tests (we're just next to one...)
- idiots talking to me while I'm on my headphone
- music stops
- phone rings
- light theme
- devRant
- MySql Workbench
- etc2 -
Giant, month-and-a-half-long-ticket.
After learning six or so complicated areas of the system and updating them all to work with the new changes, make them all play nicely, etc. I finally got everything working. 95% spec coverage, though no ui tests because I haven't gotten selenium working. whatever, everything's done and works.
Second dev bases her ticket off of mine and continues working. Work elsewhere continues and there's an official release, so we both merge in master. I run tests, everything passes, and go back to working on other tickets.
She finishes her ticket.
We do end-to-end testing, and everything works perfectly. Time for a demo!
She merges in master again, and pushes her branch to two staging servers. (idk why two.)
Demo starts.
We connect to the staging servers, and... none of the UI changes exist; they aren't running the correct code!
So she runs it locally for a demo instead. Two features in my ticket no longer work. She throws me under the bus. She throws me under the bus again by criticising a rake task I scrapped because she wanted to do it. Then again because I didn't update my branch to master and push it before the demo, despite having no reason to. and despite the demo being of her branch.
Then she continues to show off and brag about how she's like the "legend" (senior dev) she envies. QAbuys it.
I'm having an emotion, and it's called anger.rant unfounded superiority complex people suck anger what the hell did you do to my project? i miss working alone8 -
Job seeking is mentally and emotionally tiring.
Done several skill tests that I think I killed every single one of them.
I've heard "Can you go through your resume?" a million times, 1 company hasn't said yes or no for 1 month, I have at least 2 job interviews a week. Recruiters low balling.
I also feel that being hispanic is more challenging. They think I didn't code anything back when I was living in my country. 10 years of experience reduced to the ones I've been working in the US.
It's been a long and tedious journey.
Thanks for bear with me up to this point...19 -
LARAVEL MEME OF THE DAY
If 60> requests are sent in a short amount of time (and you have Laravel Passport installed) you will not receive an IlluminateResponse instance anymore; you will instead receive a slightly different SymfonyResponse.
Why? For the glory of Satan, of course.
If your code doesn't account for that undocumented garbage, your code will start throwing middle fingers here and there.
Tell me again the productivity joke with Laravel, I've just lost an hour and a half 'cause unit tests were failing and I had no idea why.6 -
I cant express how outraged this makes me feel.
Me to my PM months ago (when I started) "we should upgrade the versions of node and angular when I do the tests (because yes, no tests at all)
Boss:"why? No no"
Our version of node 0.10.40 has no support any longer. But hey, I'm leaving that role :-) good luck new guy if new guy comes....2 -
Fucking first rant here:
So we tried to teach Two new colleagues to typescript and git and testing and stuff and we have a SPOC “which claimed to be very technical”. The SPOC’s task is to keep an eye on the work, and today we have had a review...
After two weeks, the created multiple branches into our git, all with one commit of 400 LOC changed, no merge requestet, issue in Redmine set to “closed”.
Well, by the way they were supposed to write Unit tests for our app.
But I thought, ok, we’ll check their branches.
Their tests all passed (cz) but man, the app didn’t and on compilation there were errors, the app is broken. Damn.
Is it really so far off, that even of They wrote tests, that the app should still work?
AND I THOUGHT IT IS COMMON SENSE. Damn!
Guess how needs to fix it6 -
I have a lab at uni where my lab group have to refactor some code from an open source project. We got assigned some Apache project and jfc that code is a mess. Little to no documentation, hard to navigate, tests that you have no idea what it's testing, and so on. On top of that the teacher expects us to spend more time than we have on it. I'll be glad when this course is over :))5
-
First Rant here.
So I was working on some integration test issues when I found this by accident made by a professional level SW engineer:
@Test
public void testMethod() throws ApiException {
Response res = null;
try {
res = serviceToTest.callMethod();
} catch(Exception e) {
assertNull(res);
}
}
Was wondering why tests were being green after some code changes I've made cuz tests could have not been green afterwards.
Together with a senior (I'm also professional only) I've tried to explain him for a good 1-2hrs why this code is useless and he still did it. Good thing there are no errors in the real implementation from him after fixing the tests as it's code freeze here and we are having go live in a few days 🙃
Also luckily he isn't working on our code anymore and has only been doing so for a few weeks.
Wasted a day with it and gonna check all of his code now before I run in the next surprise.1 -
The ability to understand every codebase immediately to the point where I:
* don't need to rely on the documentation
* know exactly where bugs are
* know how a change (bug fix, new feature, etc.) affects other areas of the project recursively
Obviously because it's a waste of time hunting that occur when modifying a codebase, no matter how carefully one writes tests or tests their code, something could always sneak in because it's not always apparent how a change ripples through your codebase.
It's tiresome and especially annoying when working with core modules1 -
Nobody Unit Tests.
So it's already 1:15am late night and I am all tucked up in bed watching Roy Oshrove talk on unit testing and ways to write correct unit test. My friend walk in and finds me in bed watching this. He seems surprised as what are you doing ??
I replied it is an interesting talk on unit testing.
He says are you mad? Who the hell does unit testing ?
People out there are spitting on unit test code base. And they don't write unit tests.
Nobody unit tests.!!
I stay calm. I know there is no point of arguing. I said I'll sleep in some time.
And he works as developer, a job that I applied an never got because of connections.
I am optimistic someday I'll find a job that I deserve. The developer world is in danger. !!!4 -
"Let the developers consider a conceptual design,” the King said, for about the twentieth time that day._
“No, no!” said the Queen. “Tests first—design afterwards.”
“Stuff and nonsense!” said Alice loudly. “The idea of writing the tests first!”
“Hold your tongue!” said the Queen, turning purple. “How much code have you written recently, anyway?” she sneered.
“I won’t,” said the plucky little Alice. “Tests shouldn’t drive design, design should drive testing. Tests should verify that your code works as it was designed, and that it meets the customer’s requirements, too,” she added, surprised by her own insight. “And when you drive your tests from a conceptual design, you can test smarter instead of harder.”4 -
I got cut from a contracting job yesterday I have 3 weeks left in the contract. They said I worked well with the team, had a great work ethic but didn't think I had strong enough tech skills. In the past this would have hurt my feelings and it does a little but I think my tech skills are fairly high. There were three devs working on 66 apps with no tests, some source control but most of the code in source control was older than code deployed in prod, no automatic builds, people would wait a week before checking in code, others would check in code that would not build. Today the boss asked if I had messed with app pools on the prod iIs server because something was wrong. I said no because never remote into the server. Anyway it is the end of the world and I feel fine.5
-
(As a freelancer I was asked to do a couple of tasks on legacy code)
Let’s check this code, how bad can it be?
- all of the following: unreadable mess, no auto linting
- tests: some are there cause there’s not enough automation, others are poorly named
- frontend: somehow a genius made a react component for every variable in the store which only passes the variable to the child (wtf)
- backend: death by best practices
- ci/cd: “we have it but it’s broken”
Let’s fucking goooo 😎
Diagnosis: my therapist is getting rich
Chances to not cry tonight: close to zero
At least they pay well 🤷♂️5 -
Minimal comments, no tests, push to Master branch... *Cough* though, this is all for personal projects, not team projects.2
-
Today I was working in a university studyspace. Some girl noticed my dark theme IDE, running some tests and such and assumed that I'm a computer guru. She then asked me if I could help her with MS Excel or MS Word. To which I answered "sorry, no". She might've just been trying to start something with me, but that was a deal breaker hahaha (seriously tho, if I were in a better mood I would have helped her)8
-
Maybe in special dedication to @kiki.
I cut the unit tests down in LOC size by roughly 50 - 60 % in most projects.
It's really easy once one sees unit tests not as a dunking pile of copy pasta wild west, but rather as a code base that needs architecture and design.
Some extensions, some annotations, some good old helper classes.
Pooooof.
Why I did this? ...
Because it's fucking annoying when you read a PR with tests and need a fucking diff tool to spot the difference between two tests cause they're 80 % the same.
Yeah. Thx for giving me brain cramps, motherducker.
I'm not an expert in unit tests, but if all test codebases look like the "usual stuff" in our projects...
It's no wonder bugs exist...10 -
Boss: "we're going to take over a project from another company. that's what we know so far - any other questions?"
Me: "do we get the history (svn/git) or just current source? unit tests?"
Other company: "no history for you. no unit tests - app was only tested manually"
Me: *sigh* :'(3 -
Clown manager put three juniors (and ”senior” dev on work visa) on new project.
They will never finish it.
It’s too hard for them with some legacy dynamically created complex database queries which will spook the hell out of them!
But managers like, ”it’s going to be good” and ”making good progress”.
Fuck no! Putting juniors together? With little support? It such a waste. They spent weeks just to get even the slightest progress.
No best practise. No tests. Just hacking away.
It’s a failure of the management! We fail our juniors and they will quit as soon as they get the chance and they feel like they have some wind under their wings.
”It’s going to be good”
Pff. Clowns leading this company.1 -
I opened an issue on a repo telling the owner that placing a "test passing" badge on the readme but not having other tests than an "ExampleTest" and no tests of the actual functionality is bad practice and what he thinks about updating the readme.
The result was a deletion (not close) of the issue and a ban from contributing (issues, PRs) on any of his projects.
And it was not some small "ten persons use this" project but a large boilerplate project with 2.4k github stars and over 800 forks. You would expect a little bit more professionalism of someone with that popularity.4 -
Working on building responsive emailer for a client.
Client: the emailer doesn't seem to work with our email system.
Me: can we have access to your system to do some tests?
Client: No you are not trained in it.
Me: well how are we suppose to fix the problem?
Client: Just keep trying
Me: ......3 -
Why is source code so crappy? May career is not the longest, buy in my 8 years I talked to so many developers and every one told me how important quality, standards, tests and architecture are - but every codebase I've seen is lacking all of it. Everything is running on constant live support.
I don't get it. It is like I live in a world where everyone does know what has to be done, but no-one does it. I suspect it is because people are lazy, lying and won't say no but that's also not a world I want to live in.24 -
No one tests in production like I do..
Just gave the wife a Brazilian wax for the first time.
I guess I could have tried on the dog first but ... No.3 -
I had no idea of how to implement the logic of a ticket. That's why I started with creating some unit tests that failed. Then I continued working until they all passed.
So it works now.
I have still no idea of how I implemented the logic.3 -
After some hardcore coding days I notice: Wait a minute.. I had no coffee. How was that fucking possible? I mean the tests ran green. The client was happy and..
.. and then I woke up. -
Oh, RSpec.
Adding recaptcha tests, I copy a passing login spec
and because I'm bored, I run it again just to check.
I paste in the passing mock
and run it in my new block
and oh no, why are you failing? What the heck!?1 -
> Run 'All Tests' with Coverage
No tests failing
Coverage >95%
Hell yeah! I've tasted TDD and I don't want to look back!2 -
I'd never do anything "risky" in a prod environment if I considered it so at the time, but in retrospect there's *lots* of things considered risky now (both from a security and good practice viewpoint) that were standard practice not long ago:
- Not using any form of version control
- No tests (including no unit tests)
- Not considering XSS vulnerabilities
- Completely ignoring CSRF vulnerabilities
- Storing passwords as unsalted MD5 hashes (heck that was considered very *secure* in the days of plaintext password storage.)
...etc. I'm guilty of all of those previously. I daresay in the future there will be yet more things that may be standard practice now, but become taboos we look back on with similar disdain.1 -
I'm finally writing unit tests consistently thanks to a simple file organization decision.
I'm not doing pure TDD, but at least I'm writing the tests immediately after writing a module, and I make sure they run ok.
What I'm doing is Instead of putting the test files in a "tests" dir at the root of the project, I have the tests right next to the source code.
So if I have a dog.x file, I also have a dog.test.x file next to it.
I'm not inventing gunpowder here. I've seen several people do this.
But it's something that is not generally made a default or advised to do.
Like I said; test frameworks in general go with the classic "tests" dir.
But for me this is day and night in whether I write the tests or not.
Which makes sense. Imagine the classic scenario of the "tests" dir, and you just created a file deep into a hierarchy, let's say src/lib/console/windows/dog.x
This means that if you want to write tests for that, you need to make sure the hierarchy tests/lib/console/windows/dog.test.x exists
If the test file already exists, but you want to access both files, you need to traverse deep for each.
Also, it's actually harder to keep track which files have unit tests and which do not.
Meanwhile, if the test files are next to the source, all these problems disappear.
That doesn't mean there are no other challenges with testing, like testing untestable things, like system calls or http requests, but there are ways to deal with that. -
Our project at work goes live in 3 weeks.
The code base has no automated tests, breaks very often, has never had any level of manual testing
will not be releasing with any form of enforced roles or permissions in our first release now due to no time to enforce, however there is a whole admin api where you can literally change anything in our database including roles.
We also have teams in various countries all working separately on the same solution using microservices with shared nuget packages and they aren't using them properly.
Our pull requests are so big - as much as, 75 file changes - in our fe app that I can't keep up with it and I honestly have no idea if it even works or not due to no automated tests and no time to manually test.
We have no testing team, or qa team of any sort.
Every request into the system has to hit a minimum of 3 different databases via 3 different microservices so 1 request = 4 requests with the load on the servers.
We don't use any file streams so everything is just shoved in the buffer on the server.
Most of the people working on the angular apps cba to learn angular, no one across 2 teams cba to learn git. We use git so they constantly face problems. The guy in charge has 0 experience in angular but makes me do things how he wants architecturally so half the patterns make no sense.
No one looks at the pull requests, they just click approve so they may as well push directly to master.
Unfinished work gets put in for pull request so we don't know if the app is in a release state since aall teams are working independently, but on the same code base.
I sat down and tested the app myself for an hour and found 25 fe only issues, and 5 breaking cross browser issues.
Most of our databases are not normalised. Most of our databases make no sense. 99% of our tables have no indexing since there is no expertise with free time to do it.
No one there understands css properly. Or javascript.
Our. Net core microservices all directly use ef in the controller actions so there is no shared code there.
Our customer facing fe app is not dry because no tests so it was decided it was better this way.
Management has no idea on code state, it seems team lead is lieing to them about things like having any level of tests.
Management hire devs that claim to be experts but then it turns out they have basically no knowledge of what they were hired to do, even don't know what json is or the framework or language they are hired for, but we just leave them to get on with it and again make prs too big to review.
Honestly I have no hope that this will go well now but I am morbidly curious to watch. I've never seen anything like the train wreck that we are about to get experience.5 -
"Alright everyone, we can't keep this up. Every day our builds are breaking because of test failures."
"We could just be more diligent devs and actually write/update tests based on new behavior we introduce to the system?"
"What? No! We're just going to get rid of all tests!"
a few days later
"Guys!!! Everything's on fire now! How didn't we catch these huge breaking changes!"
https://media3.giphy.com/media/...2 -
Holy fucking shit... this didnt happen! IT FUCKING CAMT HAVE! NO NO NO NO! IMPOSSIBLE!
I LOST MY FUCKING BAG! RIGHT BEFORE ONE OF MY MOST IMPORTANT FUCKING TESTS! Ok, a little backstory, everyone in Switzerland or (due to alice's request) german can skip this part:
Here we have something called a "Lehre" (I think its called an apprenticeship or sth?) which usually goes 3-4 years, and in the middle, (end of 2nd) we have a "Teilprüfung" Which is basically a test which you HAVE to pass, if you dont, wait another year, and do it with the Final exams... and if you dont pass, your fucked. very very deep in the ass. And guess where I am? Yes. end of 2nd year. And guess what happened?
I LOST ALL OF MY STUFF! GONE. LOST. IM SO FUCKING SCREWED RIGHT NOW! (I have a small backup tho) BUT THIS IS JUST BAD! VERY FUCKING BAD!
OH GOD...
WHY THE FUCK ISNT THIS A DREAM!
I cant sleep...
send help.
fucking srsly.
send help.4 -
Sometimes, usually during the evening, I lower the lights in the living room, put some of my greatest Scotch in a glass, and stare at this fine and beautiful piece of code I wrote a long time ago that I am really proud of.7
-
IHateForALiving: gentlemen, my unit tests are randomly falling. Sometimes the login procedure just fails for no apparent reason, did any of you encounter this problem?
The very fucking smart colleague®: DID YOU REMEMBER TO PLACE YOUR AUTHORIZATION HEADER
Of course
The authorization header.
To fucking log in.
Because you have to be logged in before you can log in.
That's the standard, of course.3 -
Employer: Hey, we are moving an API update live tomorrow morning that could affect our apps. Can you regression test the apps to make sure they all work?
Me: The API team is pushing code overtop of live endpoints that can break them?
Employer: Yes, we need the updates to work with a new product we are developing.
Me: And nobody thought about versioning these endpoints so we guarantee uptime on all existing services using them now?
Employer: We looked at that but it cost extra and required us to use the cloud solution so we don’t use versioning.
Me: Okkk… I also take it that the API’s don’t have integration tests written?
Employer: What are integration tests? Are unit tests the same thing?
Me: No, so when do I need to regression test all 7 production apps?
Employer: The API’s are moving to production at 4am and we need it signed off by 7am.
Me: I only have 3 hours to regression test 7 production apps at 4am? Each app, if I just skim over them, would take me 2 hours each. I will do my best but that’s a very short time to ensure complete functionality.
Employer: Don’t you have unit tests?1 -
Product Owner keeps demanding developers do items outside of Sprint, deleted story points to get extra items in, signs off holiday for my staff, even hired some unqualified developers, etc. for my team (I'm the Dev Manager). I'm blessed to report into the PMO who backs up the Product Owner, in front my own reports, meaning I have no authority. What would you do?
PMO has decided that if we drag items from Sprint to Backlog when they reach SIT, we have more space for Dev items in the Sprint :-| Though he expects developers to actually do the SIT work, including writing the SIT tests :-|2 -
No wonder my Python code was broken. I called the super function of the wrong ancestor 🙄 Lesson learned: run the tests after every functional change, no matter how trivial it might seem.2
-
Forgot to change code in my api for rate limiting, after development. No unit tests.. because who really needs that right? 🤦♂️🙅♂️🤷♂️lolololol
Long story short, API went to production eventually, and stopped working almost immediately. Rate limiting was set for 2000 requests in a 1 hour time period. Not my finest moment.. fml 🤦♂️ -
Boss: Where should i put this piece of code so the android app will work correctly?
Me: Maybe here and we run some tests.
Boss: What? You built the app so you have to know where I should write the code for the endpoint and your app will work. No time for tests. And no update.
Fuck you boss.3 -
I know I'm writing the correct integration tests when each one I add uncovers a new bug.
Still, it would be nice if just one of them passed first time.1 -
Best:
- optimized a lot of queries and pieces of code
- graduated from the dutch equivalent of community college
- started a new education
- updated our password schema from a shameful algorithm to bcrypt
Worst:
- haven't been able to convince my colleague and bosses to automate stuff
- still no tests
- still a php dev
- still alone
2018:
Come at me with your c++ and robots! I'll fucking master you!1 -
Built a whole test suite around our Laravel app which has been pointed out to exec as slowing down CI and yielding no value to the user.
Arguing it’s ensuring something our users is using doesn’t accidentally break just gets brushed off as incompetence.
Oh well, I’ll just skip tests in CI and continue writing and running tests on my own as I don’t feel confident just cowboy fixing things.2 -
What is it with networking guys refusing to do any kind of fault finding? Pretty much everywhere I've worked they seem to be overpaid address hogs who occasionally want everyone to be proud of them for installing a new switch.
Currently seeing a production issue that's clearly due to spikes in packet loss on a certain part of the network - but oh no, it's always "our tests are fine", "we can establish a route no problem", "this is an application level issue", etc.
No you morons, when a dozen unrelated applications hosted on different cloud services fail because none of them can contact anything in your particular subnet in your data center at the same time, it's a damn networking issue. Sort it out.14 -
WE TEST ON THE STAGING SITE. I DON'T BUST MY ASS WITH A SEPARATE STAGING API AND HTTPS://STAGING.WHATEVERTHEFUCKYOUWANTOBUILD.COM/..., SO THAT YOU CAN MESSAGE ME THAT NOTHING IS WORKING. THAT IS BECAUSE YOU ARE NOT ON THE STAGING SITE. IF I HAVE TO REMIND YOU AGAIN, I AM NEVER TALKING TO A NON TECHNICAL PERSON AGAIN
THIS IS THE FIFTH TIME. ITS LITERALLY LIKE A BROKEN RECORD SO WHY DO I EXPECT ANYTHING TO CHANGE, EVERY CLIENT IS THE SAME, EVERY TIME, GOD I HATE IT MAKE IT STOP4 -
The "unit" in unit test does not mean your ENTIRE APPLICATION. Ever heard of scope!?
I am amazed how often people write overblown test setups, mock hundreds of unrelated services, just to test one tiny bit of logic.
That bit of logic could have been a pure function.
For that pure function you could write a dead simple unit test. Given that input, I expect that output. Nothing more, nothing less. (It helps even more if the pure functions only accepts primitives, like string and numbers, or very simple immutable value objects).
No I don't care that the service is used by another service, as your mocked interaction also doesn't test the service as a whole but you just assume the happy case most of the time anyway. You want to test the entire application? Let's not use unit tests for that but let's use a different kind of test for that (integration test, functional tests, e2e-tests).
If you write code in a way that easily allows for unit testing, your need to mock goes away.rant unit tests test all the things tests you are doing it wrong tdd testing don't mock me unit test1 -
My status update for tomorrow:
"I've done the tests and have the results, now all I have to do is work out what the numbers mean coz I started this task 6 months ago and have spent most of the last 6 months putting out fires elsewhere and have no idea what I was doing".2 -
today, thanks to everyone else being tied up in meetings and forgetting to invite me to those meetings, i actually had a pretty zen day of refactoring and reviving old unit tests that no one ever seemed to know why they didn't work and so they were just skipped over.3
-
I'm facing big issues on one of my apps and luckily a user is helping me doing some tests as I can't reproduce the issue. He just sent me an email and guess what?! He wrote "happy weekend". No. It's not going to be an happy weekend for me.1
-
My tech debt meltdown is happening right now. We are releasing our huge micro service based product next week with no automated testing of any sort. Our front end clients are relatively DRY. No tests and dry = can't change anything = hacks on top of hacks.
Why? Team lead won't listen to me and has beaten me down so I don't care anymore. If it's broken fuck it.2 -
I just found a 980 line long method in one of our legacy code bases.... And I need to add to it. There are no unit tests and I desperately want to refactor that shit....4
-
Not a rant but I spent 30 minutes writing a fix for 2 integration tests while screen sharing. Ran the tests and they both pass first try, no exceptions, typos or silly mistakes. 2 additional unrelated tests also started passing. It felt good.2
-
My Precalculus teacher has such overstrict rules on showing work.
1. On tests, degree signs must be shown in all work. This wouldn't be outrageous except that if the answer is right but a single degree sign is missing in the mandated shown work, the entire question is wrong even with a correct final answer because the "answer doesn't match up with the work".
2. We must show work in the exact form mandated from on class. If even a single step of work is missing or wrong on even one say homework problem, no credit even if the entire rest of the sheet is correct and complete.
3. Never applied to me, but if a homework problem cannot be solved by a student, they must write a sentence describing how far they got and what wasn't doable, or no credit on the entire homework. Did I mention it is checked daily and is 2 unweighted points with 50-100 point tests?
4. On graphing calculator problems, one had to draw a rectangle representing the calculator screen, even for solving systems of equations without explicit drawing graphs as part of the problem, because otherwise, she had "no proof that a calculator was used". It isn't that hard to fake, and it was quite stupid.
5. Reference triangles were required even when completely unnecessary or the answers were assumed copied, even if a better method was shown in work.
And much, much more!4 -
Note to self: Pointing your tests at a non disposable DB will cause very very bad things to happen. No idea what the flying fuck I was thinking - but praise to the data gods it wasn't a production elastic!
-
A course at university made us program a chat server and client with Java RPC (in the days where there was no such thing as stack overflow), without ever teaching us anything about coding.
The grading was based on unit tests executed on a Server the university provided.
The server was down or overloaded most of the time and one could only try to deploy at most 3 times...
There were heuristics in place to find duplicate solutions.
... I have to say, that course took me from "hello world" to developer within a couple of months. Thanks assholes!! :D1 -
No, my friend, you shouldn't put all the methods into a View Controller. Also 4000 lines in a method seems also a bit too much. No wonder you hate unit tests.
-
We use a third party paid company to produce a service and give ongoing support for it, which all our revenue streams depend upon. They are shit and their service is shit. Here's how my conversation about testing went today.
Me: 'hey X wrote an integration test project for the service. It shows the service is broken 50% of the time. We should give their team access to it and have them run it as part of CI'
Colleague: 'They are too shit to setup CI'
PM: 'we are stuck with them so there is no point. It is what it is'
Boss: just ignores me. Not even a reply.
Some days later
Head of QA: 'Hey Dev and QA are broken'
Me: 'because their service is broken. I made so and so suggestion before but it was rejected. We will just have to accept Dev and QA are broken 50% of the time'
Head of QA: 'no we cant'
Me: 'ok so we should setup the tests to run by giving them access'
Head of QA: 'No we shouldn't. The tests can only be used by us and if they break it tells us so we can act on it, or choose not to'
Me: 'We would not want to act immediately on all our revenue streams breaking? Yes we can reverse engineer their client and fix errors as they occur, or we could just have them run the tests and a team our company pays for can stop adding breaking changes to their own API every other day. Right now it has been broken for 2 weeks.'
Head of QA: 'in an ideal world we would have an internal team so you're wrong'
Me: :)
I really don't understand how they can come to such a conclusion. Am I missing something or am I surrounded by total fucking idiots?2 -
The way I was told to write unit tests was particularly terrible.
No mocking of objects or dependencies so the tests ran the actual code in full including updating databases and files. Then at the end of each test there was code to restore all changes back to before the test.
Each test ended up being over 100 lines. Madness.1 -
Overengineering. Finding the right point between overdesign and no design at all. That's where fancy languages and unusual patterns being hit by real world problems, and you need to deal with all that utter mess you created being architecture astronaut. Isn't that funny how you realize that another fancy tool is fundamentally incompatible with the task you need to solve, and you realize it after a month of writing workarounds and hacks.
But on the other hand, duct tape slacking becomes a mess even quicker.
Not being able to promote projects. You may code the shit out of side project and still get zero response, absolutely no impact. That's why your side projects often becomes abandoned.
Oversleeping. You thought tomorrow was productive day, but you wake up oversleeped, your head aches, your mind is not clear and you be like "fuck that, I'm staying in bed watching memes all day". But there's job that has to be done, and that bothers you.
Writing tests. Oh, words can't describe how much I hate writing tests, any kind of. I tried testing so many times in high school, at university, even at production, but it seems like my mind is just doesn't accept it. I know that testing is fundamentally important, but my mind collapses every time I try to write a single fucking test, resulting in terrible headache. I don't know why it's like that, but it is, and I better repl the shit out of pure function than write fucking tests. -
You see that, over there?
That massive, 10-ton bag of dicks sitting there in the corner?
Secure Code Warrior can eat that ENTIRE FUCKING THING!
SO many flaws in their tests... SO much HIGHLY questionable content... utterly RIDICULOUS bullshit code with no comments and no context... asking me fucking Angular questions when I'm doing an Express test... two answers that are IDENTICAL... and a busted-ass site on top of it all.
I hate this motherfucking bullshit SO much, and at this moment I hate my employer even more for forcing me to deal with it.
But, hey, I hope you enjoy no work getting done today since you seem to prefer I do this instead, so I guess I'll just scare my dog some more as I yell about this bullshit.
Fuck you Secure Code Warrior, fuck you very, VERY much.7 -
That feeling when you’ve got a reputation of preciseness etc, and the code you just submitted for review has so many silly little mistakes you just want to do that ostrich thing. Gosh, how can I suddenly suck at my job this bad?
Okay, the changes affect EVERYTHING in our codebase (a major change in core business logic), and there is no way I could’ve tested every possible case by myself without a decent coverage of automated tests - which we obviously don’t have. So yet another argument for it (damn management, won’t you listen?!)… but still, some of the mistakes found during code review make me seem like a complete idiot.7 -
Oh man setting up postfix and dovecot (plus things like rspamd) is a pain in the ass.
But it's worth it, having your own mail server is just quite a good feeling.
Now I just need to find out how to get it to pass the spam filter of Google, despite the server and the DNS zone being well-configured (better than my school's mail server according to tests, but that one still manages to pass. I have no idea why.)9 -
It's been broken in production for two weeks, and you want to tell me it's "drop everything urgent" now? Is it important? Yes. Is it urgent? No.
Also, how the fuck did you not know this was broken for two weeks, and what the hell do you want me to do about it now? It's your codebase, it passed all the tests in staging AFTER I made my changes to the infrastructure.1 -
You may know I love to hate tests. Well not the tests actually, what I hate is the TDD culture.
DBMS schema in my app dictates a key can either have a value, or be omitted - it can't be null, and all queries are written with that in mind (also they're checked compile-time against schema). But tester failed to mock schema validation, inserted a bunch of null keys with mock data, actually wrote assertions to check those keys are null (even though they never should be), and wanted me to add "or null" to my "exists" queries.
No, we don't need more tests, and you're not smart with your "edge cases" argument. DBMS and compiler ensure those null values can never exists in our DB, and they're already well tested by their developers. We need you to stop relying on TDD so much you forget about the practical purpose of the code, and to occasionally break from the whole theoretical independent tests to make sure your testing actually aligns with third-party services some code uses.
And no, we don't need more tests to test your mocks, and tests to test those test, and yo dawg, I heard ...5 -
I don't know why they made so many algorithms, data structures and big O questions during interview, when all they wanted me to do was to maintain some legacy, tight coupled, spaghetti code with no architecture, documentation, tests nor any kind of engineering behind :/1
-
Cocktail for disaster:
- TDD
- Mocking
- Multithreading
- Averagely well written, testable code
- All tests pass
- One test methods still shows some vague stacktrace in a worker thread ❌ but the test passes ✅
- Run only that test method and no stacktrace.
So I've been pulling my hair for the last two days trying to figure out what was throwing in that test method. Turns out that thanks to the multithreading going on, some other, similar method threw the exception in parallel. And apparently a different test method was already running when the exception was finally caught.
🖕
When I discovered that, it was fixed in a minute. 😭1 -
Lead: I want you to make this library we wrote mockable, so that we can write better tests.
Coworker: Ok
...
Lead at the end of the day: How's it going with the library?
CO: Good, I have made all calls to the library mockable.
Lead: you mean inside the library, right?
CO: No, all calls to the library
Lead:3 -
After hours of development, updated code on server, closed ide, out of habbit oppened browser, went to http://localhost/, just to check how api is responding... No response. Restarted server. No response. 30 minutes of random tests/checks, no result at all. 30 nervous minutes later, realized that server was working fine... it's just me who freaking tried to access it via localhost. ffs 0_0
-
I'm about to lose my freaking mind on intellij. Ran my tests yesterday and everything was good. I added a new method and a new test case today and suddenly no tests are found. Well they didn't go anywhere!! "Class not found, empty test suite" ... Lies! I've been messing with configurations for over an hour now. I just want to run my tests...1
-
Fucking fuck sonarcloud and everything about it. Part of the build pipeline for us to deploy code is to ensure that 90% of the code is covered by a unit test. Great in theory, horrible in practice. You think you've written enough tests that actually add value and test a valid piece of functionality but NO, sonarcloud throws a fucking fit because you're at 89.888 then your branch is going nowhere. Because everyone else gets to this stage and writes just enough tests to get the coverage to 90.01% then it becomes a stand off of who will break first; the code coverage threshold or your mental state.4
-
My colleague told me today that companies with shit code quality, complete chaos, no tests of QA of any kind, and poor security practices still make loads of money and are extremely successful so it's all a waste of time.
I detest this idea and I refuse to work like that anymore. But I also think he's right :(8 -
Last saturday, the CEO forced us to update one of the services that we are dependent out without any tests... The people responsible for it very much advised against it but they still did it.
Now, nearly a week later. The literal core feature is still broken with no fix in sight and rolling back is not possible apparently.5 -
A bit confused !
Must prepare an article about network pentest and defense .
Since its a very wide topic and I've been told not to just mention tools , I'm confused about categorizing these tests !
Also the footprinting stage is not likely to have any defense !(no attack is lunched yet :) )
So... Any idea?8 -
After 3 months of working at my current and first job I inherited a spaghetti codebase with files as large as 1000 lines because my mentor left.
Everything works but dare to change a thing. No Unit tests or any sane practices. At least our CI/CD is automated. 😂
Now I am asked to bend the library backwards in order to integrate it with another product. No one helps me and I am slowly starting to feel devastated. 😩5 -
That moment when first coding challenge is a mathematical expression evaluator with custom unary operators but your code does not meet the standard because it did not cure cancer.
The fuck you mean I had no unit tests. You specifically told me that you don't want a lot of code. F@$#&#k -
Holy. Shit. Tests. I am testing. All week. Nothing but tests. I am one with the spec. You know what I realised today? Tests are a bit like life. Life is just one big spec suite that takes 75 years to run. Except there's no prod environment at the end of the DMT tunnel waiting for our green pass docket to say 'take me Lucifer, you absolute visionary: I'm ready'. We're all just a spec with no application. We're doomed. Nothing matters. I need to lie down4
-
You can connect to Docker containers directly via IP in Linux, but not on Mac/Windows (no implementation for the docker0 bridged network adapter).
You can map ports locally, but if you have the same service running, it needs different ports. Furthermore if you run your tests in a container on Jenkins, and you let it launch other containers, it has to connect via IP address because it can't get access to exposed host ports. Also you can't run concurrent tests if you expose host ports.
My boss wanted me to change the tests so it maps the host port and changes from connecting to the IP to localhost if a certain environment variable was present. That's a horrible idea. Tests should be tests and not run differently on different environments. There's no point in having tests otherwise!
Finally found a solution where someone made a container that routed traffic to docker containers via a set of tun adapters and openvpn. It's kinda sad Docker hasn't implemented this natively for Mac/Windows yet.4 -
Spent fucking 11 hrs on fixing a stupid bug in Laravel that caused all my unit tests to fail. Just because that unit testing method has no unit test...
-
I was browsing on this website called ebay-kleinanzeigen.de and got redirected to this wonderful page.
PS: I've no known virus on my phone btw. Made the tests.5 -
Somehow, a contractor left with all our unit tests six months ago. I just inherited this project. It's 200kloc of Django spaghetti, and I have no unit tests.5
-
Working for one of our oldest customer, in some serious old, ugly and outdated code(web service).
The dev db doesn't contain any relevant data.
The QA service points to production, so can't use it for any tests.
My contact, at the customer, is going on vacation tomorrow.
Their pm is going on vacation next Friday.
No time for refactoring, db data updates or otherwise do important and much needed updates.
They want it to be done yesterday.
FML. -
Focus on projects, not tests.
If you want people to be able to code, judge them by their ability to code.
Plus that way your graduates have a portfolio as opposed to a grade list that says nothing about their usefulness in the market.
If you must do tests, at least mimic real world conditions:
- Digital, no paper
- Internet allowed (have rules on copying SO if you must)
- BYOD, let people work in their customised environment -
Went bug hunting only to land in a controller method that's 125+ lines long, riddled with side effects, and.... no tests!
-
I'm faszinated by some dev's ability to write legacy code.
Not maintaining but plainly creating code so horrible, that it can be considered legacy.
I wrote a new API for a silly Application because the old one had hardly anything to do with rest. At all. And despite the code being only 2 years old, it was still unmaintainable.
Now that I'm finish with this task, i got the next generation of the angular Frontend.
A guy wrote a completely new version of the frontend in angular5.
Only untyped variables, no documentation, no tests at all, no idea whats going on where,....
I thought my job was to adjust a few URL's and change some DTO's, but now i have to refactor everything again...
And the pain continues.....3 -
Until today, I had assumed deploying stuff to prod would NOT be one of my responsabilities in this company. Apparently that's not the case.
Had to deploy my code and pray it didn't break anything. Why is this a big deal at all?
Well you see, there is no repository. At all. No git, no svn, not even duplicate folders. No tests, no pipeline. Just a bunch of CPanels.
Had to manually copy files and folders from the development site to the production site and partially copy a database. "Just drag and drop" were the instructions I was given.
As if using CakePHP2, PHP5 and having to parse fucking Excel files wasn't bad enough, now I have to deal with one of the worst ways to deploy code.
Fuck it, I'm switching on the looking-for-job flag on linkedin.5 -
My old boss who somehow has gotten his small team of 4 PHP development contracts with Vodafone and Tesco etc. No QA, no tests, no frameworks allowed.
Sets random deadlines and used to suddenly drop demos on me for projects I'd just started and he had no idea of the state of them. Needless to say one project I was so rushed with no idea what I was actually making (for real) that I got sacked. -
I was browsing through devrant on my phone OP 5t and I noticed a small white pixel near the notification bar
I was shit scared, cause I got a history of damaged LCD with my previous phone.
I tried opening other apps with full screen no change.
Checked lcd test from hardware diagnostics tests.
The white pixel disappeared by itself.2 -
Trying to refactor legacy code can be a real adventure. It's like exploring an ancient ruin, except instead of hidden treasures, you're uncovering cryptic code and dead ends. But the real plot twist comes when you realize there are no unit tests to guide you. It's like trying to navigate a maze blindfolded - you never know when you're going to hit a dead end and end up with a headache! 🤯6
-
You had two additional weeks to improve your project.
You could research different marketing strategies to increase revenue. You could add some new features to attract more users and ensure your existing users are satisfied. Finally, you could optimize performance to make your UI quicker.
But you’ve chosen to write some unit tests. Now that two weeks are gone, you got no new features, no performance improvements and no new marketing strategies while your competitors got them all.
Tests caught obvious bugs that can even be caught by static typing, but you by definition couldn’t write tests that’ll catch unpredictable bugs, so they are still present.
After six months you realize you have to rewrite a major part of your project because your project (surprise-surprise) has to chase market needs to stay relevant. Your tests are thrown into trash along with your old code.
“Having trouble with code quality? Write a lot of tests. And I mean a *lot*. Test every file in isolation. Mock as many imports as possible.
When you're done, your code will still be bad, but now your tests will make sure it's impossible to improve anything in any meaningful way.”12 -
Looking at an old Java project, running java 1.6, test folder doesn't even exist and the "old but gold" java.utils.Date class is used throughout the whole thing. How do I initialise a new date again...? I actually just googled that :D At least the constructor parameters are named nicely... wait.. what...1
-
Fixed a high priority bug today just prior to release. There was 100% test coverage. The tests pass both before and after the change. The product behavior is correct now where it wasn't before. Just one more reminder that test coverage does not equate to either quality or correctness. Tests are alarms (at best), and quality of tests are no better an any chunk of code. All tests have costs, but not all have value. All reasons why I am skeptical of the value of code coverage, TDD, or anything that posits that "all tests are good".6
-
I value our most senior developer. His code is certainly clean and structured. He is the ultimate at KISS. However he's not a fan of testing and instead just says, well, did it compile? No matter how much I show him how great testing is, he comes back with how it's pretty unnecessary. Somehow, in the deep dark parts of the web, he finds articles that comply with his standing. I'm okay with him not making tests, I do it myself. But then when working extending or implementing his code, many of my parts are untestable because the parents are. Oye.6
-
Just had a class where we had to write a heap adding algorithm in Java to reduce rounding error for x amount of floats being added together
After an hour of writing code with no testing anything I finished. Ran the JUnit tests provided by the teacher and it passed all the tests!
Who says it can't work the first time?2 -
Why fucking my coworker push not compilable code on master branch??
Ok we are developing it, no yet release but I can't compile it for my tests.4 -
If coding is fun then your job (Backend Developer) should be fun right?
No.
You have to setup projects which isn't fun.
You have to setup tools which isn't fun.
You have to write unit tests which isn't fun.
You have to learn to use some frameworks which may not be fun.6 -
From the book
Refactoring JavaScript
Turning Bad Code into Good Code
Evan Burchard
HOW CONVERSATIONS ABOUT REFACTORING SHOULD GO UNTIL TESTS ARE WRITTEN
“I refactored login to take email address and username.” “No, you didn’t.”
“I’m refactoring the code to ____”
“No, you aren’t.”
“Before we can add tests, we need to refactor.” “No.”
“Refactoring th–”
“No.”
“Refa–” “No.”7 -
the worst documentation I've dealt with was (sadly) some I wrote myself.
We had a project - build with no maintenance agreement attached. so I half-assed the docs and tests... a year after launch we sign a support agreement and I'm struggling to figure out how the damn thing works! -
That emotional rollercoaster when you refactor a huge mess and finally there are no more compile errors in it. But there are still endless broken tests to fix :(
-
Me 🤗"Since you know the domain far better than me, can I ask you to help me understand if I managed to cover all the edge cases with these UNIT TESTS?
😒" no no no, you don't need to check for those cases, you already do that in your code"
🤗 "I'm sorry, I must have explained myself badly. I have written these UNIT TESTS exactly to ... TEST if those CHECKS in my code work and what I need is you to tell me if there are additional cases ..."
😫"but you don't need to!!! You already have that logic in your code"
😐😵☠ 🦍💊🔫🔪"you know what? I'm gonna give them a second look. Thanks"
And then I moonwalked out of the room -
Spend hours debugging a python script because tests fail. Turns out ftp (the unix binary) adds CR bytes to every byte in a .gz file that looks like a LF on upload (in test setup). Client and server are both linux. 😭
Yes i know switch to binary mode (that fixed it - why not default??). But still WHY CR? Didn't ask for it. No windows in sight.1 -
so what's on the list for today? writing unit tests for a broken php app because NO ONE THOUGHT TO WRITE THEM BEFORE HAND.......
-
God fucking dammit.
I spend the entire day trying to get [this piece of shit] (https://github.com/php-ds/extension) to work and at the end of the day its tests pass, but when I try to instantiate a set, I still get bloody errors.
I mean, am I not punished enough for having no guidance in learning PHP and knowingly having to create an absolute monstrosity just because I don't know how to do it better.
Fuck it, I'm just gonna go cry myself to sleep now and only will start feeling like a failureagain, when I wake up.
sorry for bothering you with my problems.6 -
Just started a new job at a big co.
Expected to implement small new feature, no sweat about 30 LOC. Unfortunately no unit tests, no way to test without real data.
Spend 2 weeks trying to get it to run on the test rack. Lo and behold the entire testing system has been sitting broken for months and nobody knew. Why is all the documentation so vague!???5 -
All code and no tests makes a software buggy, hard to maintain and a pain in the ass to work with.3
-
So I'm returning from parental leave on next week...
One of the projects I'm involved in, was at 10% progress when I left, had planning and documentation made by me, development environment and test suite setup by me and had tests and was being reviewed.
Right now it should be arround 75% progress, no longer is being reviewed, planning is not being followed and no tests have been made since I've left...
Why bother with dumb ass devs!2 -
Use CoffeeScript they said, it will be fun they said.
NO! No, no, no, no!!!
Fuck this.
Converting old library written in coffescript to ES6 is just fucking insane.
I see 1000 lines of code to take me at least several hours if not a whole day.
and tests are yet to come. -
me: I need to install Firefox for automates test
ops: no
me: need it to run tests PO wants tests
ops: you can't as it is a desktop app
me: I need it because our selenium tests depends on it
ops: Firefox needs 200 other packages can't install
me: can I use Docker? and docker'ise Firefox
ops: ... some silence...
me: please
ops: it will complicate things
me: ಠ_ಠ2 -
Due to covid, mgrs decided to fire 10% but could not negotiate schedule increase with internal IT. With no promotions or hikes, few full stacks we have leave.
Now am working with 2 data engg doing cloud java microsvs work while learning. Their first delivery was applauded by their mgr who is under pressure to retain them.
I as arch review their code. No unit tests, print statements all around, shoddy exception handling, variable naming issues. We have Sonar by default in our build. They ignore the report. I ask them about it. Seems mgr told them he is getting a contract person from another team on part time basis to do/fix. I share my confusion.
Mgr calls me up and checks if we can put it as tech debt backlog and deploy to prod !!!1 -
Talk with boss on phone about new billing page for split test.
Create new billing page.
Create split test
Launch.
Checking everything after a few hours. Notice the boss turned off the control on the split test so everything runs to new page. Noticed two other tests that he had turned off variations on also, so no tests are actually splitting, but they're all still eating up our paid clicks.
I'm glad I wasted time setting up the test and goals only for it to not be used.1 -
Finally made my node production server stable enough that I could focus on writing tests*. I start by setting up docker, mocking cognito, preparing the database and everything. Reading up on Node test suites and following a short tut to set up my first unit test. Didn't go smoothly, but it's local and there are no deadlines so who cares. 4 days later, first assert.equal(1+1, 2) passes and I'm happy.
I start writing all sorts of tests, installing everything required into "devDependancies," and getting the joy of having some tests pass on first try with all asserts set up, feels good!
I decide to make a small update to production, so I add a test, run and see it fail, implement the feature, re-run and, it passes!
I push the feature to develop, test it, and it works as intended. Merge that to master and subsequently to one of my ec2 production servers**, and lo and behold, production server is on a bootloop claiming it "Cannot find module `graphql`". But how? I didn't change any production dependencies, and my package lock json is committed so wth?
I google the issue, but can't find anything relevant. The only thing that I could guess was that some dependencies (including graphql) were referenced*** in both, prod and dev, and were omitted when installed on a prod NODE_ENV, but googling that specific issue yielded no results, and I would have thought npm would be clever enough to see that and would always install those dependencies (spoiler: it didn't for me).
With reduced production capacity (having one server down) I decided to npm uninstall all dev dependencies anyway and see what happens. Aaaaand it works.....
So now I have a working production server, but broken local tests, and I'm not sure why npm is behaving like this...
* Yes I see the irony.
** No staging because $$$, also this is a personal project.
*** I am not directly referencing the same thing twice, it's probably a subdependency somewhere.2 -
When you are new to a technology and language, but have to make full use of its feature.
You know, make tests, implement production code, planning deployment, build a CI. All by myself.
No regrets, though. Challenge accepted!1 -
When your project has no unit tests and you just accept that it's non testable anyway. Especially because the company won't put any effort into making a test environment for it.1
-
I've been compiling the project for about 5 hours now, still no successful build due to bad tests generating intermittent test failures...
All I wanted to do was to release the web project to the customer not fucking wrestle Cthulhu!
The worst part is that the release is set up so that you need to release the entire project internally before you can release one part. -
Load tests:
I'm used to do load tests in Visual Studio where it gives which line is exactly your bottleneck. But now I'm using VS Code (visual studio requires enterprise license for load tests :\ no longer have one)
Anyways long story short, what are the best practices for load tests? For me what I'm testing is how much can a given hardware specs handle and when test fails I go back and check if code can be optimized, is this the correct way to do this?7 -
My company never used unit tests. And i would love to educate but i do not know how to unit test properly. I always en up with: if i want to properly test all ins and outs of this class's + operator. I need to add checks for positive number, negative numbers, nan, infinites, nulls etc. Etc. It needs so many tests for something so stupidly simple, that i don't see a way to motivate people to use it.
Am i missing something? Is there a guideline for "ok coverage"? Is testing just that much work and is that why nobody cares until it is too late?
I have been reading a book about working with legacy code. But still i got no answers. Halp!7 -
The typical university project as a group:
- Discuss/Make somebody create the items in Jira: 2 days
- Implementation: 2 hours
- Tests: What are tests? Do I write them in my main method?
- Review/Someone sees the code: 9 hours
- Staging/Production: No one is ever going to use the "software"2 -
The other day I had literally nothing to do at work as I was waiting for some changes on the database so I said: “in the meantime I would like to get acquainted with Angular unit tests so I can go on with development “
My boss: “we have no time for tests “
Well I guess we will have more time for bugs then…3 -
It was the worst local Hackathon. It's not even a Hackathon either, where the whole event spanned over 2 months.
It was a group entry with me and 4 teammates. Each of them did contribute:
Guy A: criticizes what is built and designed
Guy B: offered financial tips on how to make this thing feasible
Guy C: did UI but in graphics. No CSS file, just bits of graphical elements.
Guy D: family commitments
And then there's me, writing documentation, built the entire project, wiki, drove the project, prepared the presentation slides, tests the framework, unit tests, stuck with stupid problems like SSL, localhost, Google Maps Key and the likes.
And we didn't even win, let alone launch this thing, whatever it is, to anywhere. Never doing group projects again.
I'm flying solo for now -
What the fuck is a "pre test"? And why the fuck do you call it if there are no other tests after it? Get your shit together pm!!!!
-
What a coincidence. This will be that day. Not as dev, but as a student. I know this place called DEVrant, but I'm really nervous right now, because of the tests today. I didn't learn and I'm gonna fail all.
But not the tests the only thing I worry about. I hate this world becouse everybody needs to work hard and there is no break. Rarely you can get some air, but one second later you're in the deep again... I don't know what to say or what to do. This will go in my entire life? This is horrible.
I know. I'm just a student. "It will be harder." you say. But I've had enough of this.3 -
Mini witch hunt going on with broken builds last couple of weeks. Change satellite assembly/project A, breaks random unit test that hasn’t been changed for months and the TFS nazi sends out emails demanding the “broken” projects be fixed. Doesn’t matter the unit/integration tests are likely out dated and team responsible for the tests needs to fix it.
Yesterday I deleted some logging code out of a security assembly, broke an integration test that hasn’t needed to be ran since January (test database didn’t exist anymore).
I would have had to re-create the database, re-import the test data (not trivial), re-deploy a service using the test database…blah. All because I removed some logging code.
I deleted the gated check-in TFS build definition. Code check in … no sirens …whew! I win! -
And here I am again, reading test cases that basically boil down to:
$testCase->foo = "bar";
$this->assertEquals($testCase, "bar");
$testCase2->foo = null;
$this->assertNull($testCase2->foo);
Why would anyone feel the need to write these kind of tests? They don't do anything. If I set up my mock a certain way, of course I will have that data, esp. if the unit under test only applies the data AS IS. (Funily enough through another component that already has the relevant dummy tests in place making these tests extra redundant and obsolete.)
You would think that one test case with dummy data suffices, yet no, there are like 30 examples that lie to you about apparent business logic cases, yet in the end the way you set up the mock decides what you will or won't get.
What's the point?6 -
Is it me or most developers just write code so it compiles and passes tests?
No documentation, no standards, no "good practices", no"good design", no software principles, no performance analysis, nothing.1 -
*Executed maven build*
Me: What's this "no tests found?"
Senior: Nevermind it's not important. Just check if your code works.2 -
RANT! Clown VISA developer (you know, the one with ”extensive experience”) has still not finished his task which he was assigned after failing the last one which was easier. I wrote that they would fail and they have not even deployed anything to any environment. Not even dev. They just fuck around on their machines and this VISA guy says some nonsense shit on daily standups using mother fucking big words like it is really some difficult task they are doing. NOTHING has been done. It’s such a moral sink for the team.
When I asked nicely and asked if they have automated test they responded with a yes. So, I just dive into the repo and… no. There is no tests at all.
It is almost like they _think_ that tests automatically ate induced by osmosis or quantum mechanics or something. There is no tests. None. Zero. Why the ”yes”? 🤔
I looked at the commits and I can see no actual brain activity.
It will take a miracle. A miracle I say, to get any productive work out of this guy. What should he do? I mean, what should he actually get paid for? I do not understand. And he walks around in these $400 dollar jackets and coats and shit like he knows stuff.
I am having a really hard time accepting that he actually get paid at all. -
You know what I hate? Git commit messages stating 'fixed tests' or 'fixed docs' or 'fixed integration problems'. You did not fix anything, fuckhead. You updated the code, introducing more bugs as usual. FIXED?! NO, UPDATED! That's what I hate.1
-
Me at the beginning of the project: I should start by writing tests
Me after a couple of days: No time to write tests! GOTTA WRITE THAT CODE
Me now: Oh, yes, I should have written those tests at the beginning2 -
Don't you just love it when gitlab's ci pipelines crash for no apparent reason, causing tests which cannot fail to just magically break down, change logging levels to Just about anything and basically PMS for about 3 hours before it decides it needs to restart completely and when you return the same pipeline which you've been trying to fix for the better part of an entire evening, after regular work hours, it. Fucking. Works. With. No. Changes. To. The. Entire. FUCKING. System.
Waste of a day.3 -
You know you're tired when you're setting up unit tests and you make more mistakes in setting up the tests than in the actual code.
-
I need help for a dev test.
So the company that I work at is hiring a couple of new devs and they’ve put me in charge for test in order to see if the applicants are any good.
When I was hired there were no tests so I don’t have that many ideas for a good one.
Have you guys any good recommendations for a test or what it could consist of?
I’m thinking of having multiple small tests so if one misunderstands the task it’s not the whole test they fail. Would that be a good idea or not?
It’s for senior and junior web developer.
Any idea is greatly appreciated 😀5 -
Why do we take tests on paper? No offense professor, but if all I have is a sheet of paper to program on I'm out of a job!3
-
Context:
I recently joined a team and we are working on a fairly large mobile app using RN, they started a month ago. And I noticed, they don't have any fucking tests and static typings like Typescript.
I have this pretentious team leader that acts like he's the BeSt dEveLopEr in ThE woRld, and act like he always know what he's doing. But in reality, he code like crap, the formatting is shit because the ESLint config is not working, he's not even aware of it until I've fixed it. He's using every BAD Practice available, unused variables and imports are scattered everywhere, etc. And the directory structure is crap and no consistency.
How can I convince this ignorant mofo to use tests and typescript? He believes that adding those will take us longer and cost more money to the client, based on my experience, this is not the case, it's only slow on the first 2 weeks and it is worth it in the long run.13 -
I think their should be like tests or any kind of competition on coding kind of thing in devrant.
Or tips related to coding no matter any language most common mistakes etc.That's my idea tho😅😅😅
What u guys say about this?? -
One of our past dudes. His desk is right beneath mine, and he had the task to write integration tests. Problem: no experience in programming. So I taught him the basics to perform his task.. today it is one of my best friends1
-
Now i am given a task to refactor some piece of Predicate code and then update the unit test so it can be compatible and work with new data
WHAT. Is the Fucking point of unit tests if you have to modify them to adapt to new code anyways???
Unit tests exist just so u can stroke ur sausage??? Just so u can give ur ego an orgasm to tell others "hey look at me how good code i wrote that even unit tests are passing!" ???
I always found unit tests sketchy. almost as if its useless and unnecessary. I still get why they are used (some other dev working on feature 2 might break my shit and unit test can save the day) but if thats the only reason then that doesnt seem like a strong enough reason for me
By now im talking about java!
No wonder i have never seen a single nextjs developer ever write a single unit test. Those people have evolved beyond unit testing just as the nextjs technology itself!
This is why nextjs is the future of web and the Big Daddy Dick King 👑 of technology!8 -
Confession - Testdriven UnitTests
First of all, I regret all and wish there would be no SQL Scripts but an external tool to analyze data, but the project grew hysterically and when I joined the sh*t had already been established...
I had to test some SQL Scripts. As there is no real UnitTest framework which is under development/gets support, the whole suite is kinda buggy.
So I had my script, and had the required input + expected output, but the UnitTest always failed. So I manipulated the framework parameters until the test finally passed.
Shame on me and on the project, but atleast there are tests now... -
Confession: a very important feature of the website I'm developping wasn't working for a certain time. The boss wasn't aware because he doesn't go on the site, and I only found out last week because I needed to implement a new feature that used the previous one. Problem: the bug was only on production, not on local (and of course we don't have test server).
I took advantage of the absence of my boss today to clear the situation by making all of my tests on prod. I hope no customer tried to pass a command today, but it's finally repaired. I am both proud and shameful.3 -
I. Fucking. Hate. Tests.
I am writing a module according to a standard and this standard has a test suite. Awesome...this should make development go pretty smoothly especially since their human-readable "specification" is severely lacking.
I get the module passing most of the tests...however there are few I just can't get my module to pass, no matter what...well fuck.
I go digging deeper into the test cases, compare it to source code. What's this? The tests are fucking wrong. There are several other implementations that use this test suite, how the fuck have they not caught this?
Also come to find out, it is not possible to pass *all* the tests in the suite because some are for older versions that have different functionality.
Got to love a test suite that is incorrect and can't be passed 100%
Maybe they need tests to make sure the tests are working correctly.3 -
A colleague changes the location of a test helper file imported in a bunch of tests. Doesn’t bother to check where that file is imported (except where he’s specifically using it himself).
As a result good dozen tests fail later on. The culprit doesn’t realize. And the rest of us have no clue why.
Multiple people are asked to look into why the tests are failing.
"Ok, who’s working on what?
We’ll create a shared document to track who’s working on what test."
Document is created, people get assigned.
"Hold on, looks like it’s just a faulty import." "Oh yeah same here." "Yeah for me as well."
"Ok we could simply appoint one person to fix all the imports."
"Well I’ve already gone ahead and opened a pull request to fix the test I was appointed to."
"Ah ok, well who can take care of the rest?"
"Wait I also opened a PR."
"Ok so I guess we can each open a PR?" "No we can just have a single branch we can all push to".
"Sure, who’s branch are we using"
"You can use the branch of my PR"
"Guys let me handle this, it’s ridiculous for us to all be doing this separately."
"You’re right, go ahead".
——
The culprit? A senior dev.
What would have literally taken a minute to do (or even no time at all with proper use of the IDE) turned into hours of wasted time. People getting interrupted, having to drop what they were doing to fix the consequences of this guy’s laziness (seriously don’t know what else to call it).
Ok maybe our reaction could have been more efficient, but we never should’ve even gotten to that point in the first place.2 -
Why do I always have to refactor bad written code ? Is this some kind of karma ?
Undocumented, written by a senior but looks like it was a junior, no unit tests, variables with meaningless names, duplicated code and every possible thing you can find in that kind of code.3 -
I write a lot of custom code for a program my company sells and there is no good way to run tests on it. I just spent a bunch of time wondering why the change I made didn't work only to find I accidentally clicked paste shortcut instead of paste when copying the file. I really need to take some time to write a program to copy all my code for me instead of relying on a manual process. I guess a new night and weekend project.
-
Junior front end guy made a backend code, he made even a test.
GET /model/ very nice simple case tested.
NO. MORE. TESTS.
Well, it's the same guy who complained reaaaaally surprised that he had to check http status code after a request.
Im kinda the bad guy because I get upset with that stuff instead of clapping his stupidness2 -
I'm too embarrassed to show my team leaders code to other developers..
unreadable, no tests, parameters hardcoded..
But managers want to "help him grow"..
When do you decide you can't fix a lemon?4 -
There was this one time when we've managed to upload a Debug build to Google Play Store.
On the same day we had to create a new build w/ fixes, have the testers perform smoke tests, then switch to some fairly quick overall tests.
If nothing were to come up during those tests, the build was supposed to be passed over to the submission manager for release.
Things weren't going that smoothly in the beginning, w/ the first two builds being broken in one way or another.
Finally, however, we managed to create a properly working build.
QA hadn't had that much time to test it, but no major problems were identified && given the deadline we had to submit it.
The next workday it turned out that the tester responsible for passing the approved build over to the submission manager gave him the Debug build.
The submission manager none the wiser uploaded that build for release.
Result?
The users who managed to update their game got their save data wiped... sort of.
It looked that way given the Debug build was communicating w/ a different server.
In the aftermath of that situation, we had to repair the damage && upload the correct build as quickly as possible.
Also, ever since then a huge text 'DEBUG' was added to the loading screens of Debug builds to make people very aware of which build they were looking at.
As for any repercussions for the tester responsible for the mess, or the submission manager - I have no idea.
They were both still working there, so at the very least none of them got fired because of this. -
I’m currently working 2 jobs with over 60 hour work weeks in addition to my own SaaS company.
One job is full-time 40 hours, where I am a mid level developer and I just do the waterfall of tickets that is assigned to me. This place is unorganized and has almost no communication within the team.
The second job I am the Senior Dev and project lead. It’s a contract position that I put 20+ hours in on the evenings and weekends. Agile methodology, with a modern tech stack and I promote excellent communication as well as documenting everything.
I’m in a unique position because I’m able to see these differences and compare them side by side. My full-time job doesn’t really know about the second job. I get my work done, and that’s all that matters. This place is a mess. The project lead (CTO) is a helicopter boss that sticks his nose up at any type of formal documentation and practices. No tests are written.. no SIPs or deployment docs.. no stand ups or anything. I must also mention this team has 5 developers and a QA.. my team is only 2 developers and a QA. We get through tickets much faster.. it helps when I go over every single ticket that is created and add requirements and images..
I guess my point is... I’m about to be a full-time contractor because I can’t take this unprofessionalism anymore.
Just because these formalities technical take longer. It does decrease actual time spent developing a project. Spending a couple of hours on tests and requirements can save you days of back and forth in the future. Not to mention... document.. everything.1 -
I'm using typescript and run mocha acceptance tests. I was confused as to why my tests were failing on the Jenkins albeit they passed locally just fine.
I couldn't find the error. Just after making a pause, implementing something else, I realized what the problem was:
As I renamed a folder from `fixtures` to `tapes` my test run on the Jenkins suddenly claimed to not find the files in `fixtures`. Yet in my code base there was no occurrence of the string `fixtures` anymore and then it hit me like a brick wall:
I have old transpiled files in my outDir, the `dist` folder on the jenkins! Locally, I make sure to run `git clean -fd` once in a while, so I never was hit by it it locally. Yet my jenkins had really old files in the `dist` folder. And just running `rm dist/* && tsc` fixed the entire ordeal.
Well, JavaScript is so 2012 and typescript is the new shit, yet transpiling the code can leave to some quite strong headaches.1 -
Be humble. Nobody knows everything.
Keep learning: read books, take Pluralsight courses, go to meetups.
Write unit tests for your code. No really! Write unit tests for your code!
Learn what the SOLID principles are.
Your job does not define who you are, you define who you are.1 -
My experience with a recruiter is for the internship I'm currently half way though the manager that interviewed me said I would be constantly developing tests for code...jumped at this opportunity as I have no prior testing experience 3 months into internship and I haven't seen a single line of code I am studying software development and my skills as a developer are not increasing what so ever I feel but since I'm an intern I'm not sure should I ask to move team or stay put for the rest of my internship and put it down as an experience2
-
Need help in Unit Tests,
I've reached a point where tests randomly fail, but if I run that test alone it never failed.
I do have lots of shared data between test functions of the same test class.
What options do I have?
1. Make each function responsible of seeding data into InMemory database?
2. ??? (I don't know what else I can do)
Any help is great :)18 -
My teacher at UTSA; Dr. Maynard, was the best teacher I have ever had. His tests were tough but fair, he actually took the time to teach instead of reading from a slide deck, and there was no question he didn’t have an answer for.
People once got mad and wrote on a board in the CS lab “if you think Maynard’s exams are too hard, write your name here”. I changed the prompt to say “if you should change your major to business, write your name here”. He thought it was hilarious. -
So there was this project in second year of uni, I was in a team with 2 friends, we had to do a small project to learn programming. I was the most experimented one but still very bad.
One night, I took a few beers and started coding.
I wrote almost all the thing that night, the main functionalities plus the input/output.
But as I was drunk I made some weird decisions:
-naming all the classes in french and all the variables in English
-no tests (who does tests?)
-comments in Spanish
The next morning, when I send the code to my friends (we didn't know about git yet), they started hallucinating. We spent a lot of time refactoring and cleaning.
In the end, as most of the logic was there, we ended up the project a few days before due date and celebrated with more beers 🍺2 -
[java] INFO [Initialization:101] FINISHED. The initialization took: 0d 00h:12m:00s:753ms
[java] INFO [Initialization:101] FINISHED. The updating took: 0d 00h:48m:01s:396ms
BUILD SUCCESSFUL
Total time: 72 minutes 51 seconds
... new (negative) record
... just fyi: no tests have been run, just a regular "hybris initialization" on monday morning ...6 -
I hate deploying this project, it's just nerve wracking. I started it when I was a newbie to web stuff so I didn't know shit. Now it's just a big project with no unit tests, I test it all by hand.
It looks professional though, but the underlying code is just a mess.5 -
Unbelievable. 14 out of 16 runs of integration tests errors unexpectedly with no error message, port was already used (not released from last cycle) or timed-out in the before all hook. Well done whoever wrote this suite!
-
Why does it have to be so difficult to get unit tests to run? Spent about an hour yesterday trying to get a single test class to run and it kept complaining about a compiler error in a completely different module. Went to the file and there was no error. WTF?!
In the end, checking the “delegate build actions to gradle” box made it go away. why..... -
Shitty legacy codebase made by shovelling pile of different shit by some 'cool dude' who left the company 3 years ago. Fixing bugs on this pile of shit all the time, but also I have to document everything as documentation wasn't there at all and fix the whole damn project in the meantime. No linters, no types, ancient libraries that have shitton of issues, hacky behaviours wherever you look, no tests whatsoever.
Except when we want to refactor/rewrite we don't get time for fixing the whole shit as it is worthless - there's no value for customers in that.
the other one was shitty HR talk which consisted of bashing on my technical competencies by computer illiterate troglodyte after which I left the company. They asked me could I stay for 2 more months.
That was that one single NO that felt so great that I will remember it for the rest of my life. -
# Start a new job
## find out, on the first day, that the position you applied (data science)..simply doesn't exists
##find out that the environment is really stressfull and not pleasing as it was depicted during interviews
## quickly find an alternative to quit current job
#Start a third new job (3 months after quitting the first one)
##find out, on the first month, that the code quality is below zero.
###there are no unit tests.
### there is no possibility to create a unit test because the code doesnt folloe any pattern.
###there is no division between backend and frontend.
###there is no division between business logic and db in the backend.
###there is no division between frontend, business logic, and db
###find out that they deliberally built a framework to get frontend and backend togheter
###the project is built over maven, but there are no poms wellformed
###the project is approx 300k java lines....
##lose hope and start to find a new job....1 -
Looking through Java tests, cause I need to pass one for job. And every one of them has a question like:
What's the result of:
boolean b = 42 >= 1024;
if (b = true) System.out.print(1);
else System.out.print(2);
And each time I answer like there is (b == true) and not (b = true).
Cause no one in real life would write = in if statement. Why do they put such question in each and every test.1 -
Windows updates is a huge bitch.
Gotta do some tests on a code, it's already past 5 pm, bit in a rush. But windows updates said no.
Huge fuck you!3 -
!rant
This situation, when you are working as external employee in a company that needs you to test safety-critical systems.
You wait months for "THE" (internal) test tool you have to use to implement your specified tests.
Finally , you meet with the responsible dev guy to let him setup everything.
Me: Hi, I'm here for setting up the test tool for project XY
Dev: Eh? No one (manger) ordered the tool for project XY!
Me: -
when i look at the code structure of the project i work on with my friends, i always think about how to implement the SOLID principles of bob martin for clean code
... and then i think about the clusterfuck of almost unmaintainable code that has been created over time and all the unit testing that doesn't exist at all and how much time and effort it would need to correct that code and how i realize that i don't even understand the principles and how to implement them
... and then i give up and go on coding even more mess
... and then i repeat😅😖😩3 -
New to working with git in a large scale application. I've used it in personal things, but not at an enterprise scale.
"genius" me: git pull origin {{dev branch name}}
"genius" me: why won't any of these tests work?
"genius" me: spends 2 hours working on fixing some tests
actual genius that I work with: Dude, revert that shit and pull from master, the tests will work. Don't pull from {{dev branch name}} because you have no idead what might be there.
This makes sense. Things are started and abandoned in favor of new priorities all the time. At least my PM is pretty cool and didn't freak out that I wasted that couple of hours like at a previous position.
Also, git is far superior to mstfs. Very smooth and easy to use once you get the hang of it.4 -
Considering making a plugin for my test running just for this gif:
Would make failures more interesting3 -
!rant
[Update on previous rant at the bottom]
So I had the technical test last friday. I did not try to implement any automated test as it is not my forte.
I had three hours to showcase my knowledge of data structures and OOP so I did that.
The test was somewhat long actually, so I left out one part that I did not have time to implement: validation of input files.
Today I got feedback, everything went well, they liked my code and I only got two negatives: Error handling and automated tests xD
Now I'm going to the second phase: phone interviews and they are gonna asks the whys of my implementation.
I'll have to explain why I did not implement automated tests and the girl on the phone told me "they didn't like it much that you had no tests because tests are very important for us".
I guess I'll have to come clean and say that I'm not very strong on that but willing to learn, so I didn't want to risk it doing something I'm not really good at.
I hope it ends up well.
prev rant:
https://devrant.com/rants/1607302/...4 -
Working as a Dev for a while now, I tell new people not to bother with it. There is never any job satisfaction as people in charge never understand the basics.
Instead of learning to write efficient code, figure out how to solve real business problems, work towards a maintainable flexible product to quickly deliver value on changing requirements, write automated tests to improve quality, maintainability and prevent live issues - basically do anything a good Dev strives for - you will just constantly end up working for people with no interest beyond the next couple days, on a shit code base that no one can understand, with people that don't want to learn anything about software design and just check boxes off.
Apart from pay this must be the worst career possible in a technical field.4 -
Fuck my integration tests. They fail everytime in another way. Every computer restart other gremlins get into the machine and fuck up the tests another way. I've got no fuckin idea where to even start....2
-
I really hate how steep the learning curve is for testing. I've been writing the same test for a week for a 150 line directive, and it's driving me fucking nuts. Nothing makes sense. No one in the office to help me. Only 10% of engineers here write any tests. I don't know what to do. Overnight they made it a rule that if you want to move up to the next level for software engineers, 80% of your code needs to have unit test coverage. It's just bullshit.3
-
- "You passed all the tests very well, we think you will be a big actor of our developement service. We propose you 28k€/y, and it's the best you could find on the market."
- "No, thank you."
1 week after, found for 38k€/y. -
Why write unit tests? There is no benefit for the customer.
Me while trying to upgrade to an newer version... ┐(͠≖ ͜ʖ͠≖)┌11 -
FE assignment: "Make app that fetches data, shows it in table, lets you update and delete, persists data locally, has nice responsive css and tests, follows best practices. Spend no more than 2-3 hours". I scaffolded everything with chatgpt and still couldn't finish it. I'll just send them an email that I withdraw from the process.3
-
Ok... Can someone explain me this?
Happen a few weeks ago.
My pc would crach on any 3D program or game.
Did some tests, was the graphic card.
Send it to repair (amd, Asus made)
Placed my old Nvidia, installed drivers all good.
My new card came, nothing repaired, nothing found, passed all stress tests.
Placed the card back ok, no OS.
Bios detects both ssds but don't start (windows 10.... Ya tryed Linux but doesn't work for my main past time in pc, Arma 3).
Loaded the USB with the windows instalation, used command line drive C is completely empty but has 160gb used.
Ended ip formating.
GC works perfectly.
So... Wtf happen?8 -
Guys, Im here again to tell you this, you will laugh.
*Stand up meeting*
FE: well we should think a way to test all (he says that because he doesnt test so my tests+ END-TO-END and he can get away with that)
...because IM TOO LAZY TO TEST MY STUFF.
VP ENGINEER: "is it because it's too good that has no bugs? HAHAHAHA (bro laugh type)
ME: O_0 (thinking u better fucking test SOAB) Well, we should have tests in front end, and end to end. THE PYRAMID GUYS?1 -
I want to run a theory by you regarding unit tests.
They make up for the time they cost to implement in the long run, no doubt, because when you're refactoring you can easily check whether you broke something.
But: what if you've got integration tests covering almost the entire codebase? For those to succeed the unit tests must succeed as well. So therefore imho the unit tests are redundant.
The only advantage of also having unit tests seems that they can pinpoint the issue more accurately.
Any other advantages? What am I missing? Any thoughts/comments?9 -
Code with no clear architecture, no documentation, no coding standards, no tests, many security-issues, a lot of hardcoded stuff, written by people forced to use a completely new technology stack and messing up, of course.
But we are not allowed to change anything, of course.
We have to keep coding in that style and with the tools present in the project. For uniformity, of course.
I managed to work on that code for 2 years... Recently it dawned on me that I don't give a crap anymore.
I quit, of course. -
There no tricks to writing tests, there are only tricks to writing testable code. - Misko Hebert(creator of AngularJS)1
-
Looking at jest errors and loads of GitHub and StackOverflow issues, it's no surprise that people claim they don't like testing.
Maybe they would if we got our tooling right.
import { foo } from 'bar';
Nah, that's an unexpected token, jest does not like this syntax.
Using require, like in jest's getting started tutorial isn't compatible with my existing JS libraries exports.
Adding type: "module" in package.json just makes another error message appear instead.
Fucking developer experience!
Why bother with unit tests at all?
How come PHP is 10 years superior to JS when it comes to code quality, unit tests, and static code analysis?
I don't even care about "ES modules". I don't want to "mock" anything either. All I want to do is import a handful of JavaScript functions into another file.
Overengineered web dev stack sucks!3 -
Today I created some reusable clean decent code to replace the random chaos in a huge project and then realised I had 3 options:
1. Sort out every instance to use the new code. This is very high risk because the project is both a shit show and has no tests. I don't have time to manual test or write unit tests on so much stuff.
2. Move over only some so that I can manually test. Still no time to unit test (management is fucked on their priorities). This will fuck the project even more since i will never get time to revisit this and adds yet more inconsistency and chaos to a project on its last legs and has this problem in droves.
3. Leave the project fucked
\_(^^)_/
I'm veering towards option 3 these days.1 -
Struggling to write my Engineering Thesis code. Not because I'm afraid of tech, but because I have no idea what it should do.
I'm testing mobile apps performance, but getting the right idea is pain in the ass. :(
Never been too creative, but always have been over ambitious and lazy.
So the deadline is coming slowly, I have specified my 'tests' (authorization, API connection, heavy calculations, graphics, database handling) and still don't know what my app should do.
And ideas or suggestions what else is to test? -
so I'm the new guy now, my new team write complicated, deep-for-no-reason IFs instead of a switch, gave me a shitload of resources to get up to date with their standards, insisted to every time make sure my code has been tested, then the first deployment I see THEM do breaks production, because a major fucking app had no tests whatsoever, also half of the team has 30+ years of experience in backend, laughs about TS on the server (which is actually fair) and I'm the frontend guy
challenge accepted4 -
I really need help. We are doing some interface files, something like C header files and configurations.
Management is aware of the "unittesting" buzz words and expects me to write unit tests on "header" and configuration files....
I tried to explain that there are no units to be tested, asked which units should be tested but in the end....
What does it actually mean to test definitions of structures, classes and methods?!3 -
Just checked the testing project that came from a group of contractors
Seeing Tests that have no details that have been there for months,
Fuckers have these in here to show test count as high!!!!!!!!!!1 -
Was working with my internship boss to implement an CI but the documentation were cryptic and no fucking support on the forum whatsoever.
So I started working on creating my own CI dubbed Blackjack CI and he posts this on the forum
https://discuss.circleci.com/t/...
But how fucking hard can it be to have fucking propped documation.2 -
So I became a team leader ("promotion").
One of the team is a senior by title, but fuck he is just a refactoring machine. Seeks for architecture design in fucking everything. Even in fucking tests instead of just writing them he is inventing convoluted architectures and systems...
Fuuuuuuck - just write the fucking tests, no one gives a shit if you have a fucking factory in the test case! -
Read this and tell me OOP (or at least C#) isn't broken:
https://levelup.gitconnected.com/5-...
All I want to do is mock System.DateTime is for a few of my tests, and I ended up going down this rabbit hole of absolute horseshit: build a custom class that you can mock in tests, blah blah blah blah, uhhhh... YEAH NO
Such a simple functionality / need, and yet there is no easy way to test for it. Sigh.16 -
Android Studio 3.2b4 once again regressed on "No tests found" bug for Kotlin projects.
I guess someone at big G decided to "comment out failing tests for now and come back to it before the release"
I feel like this rant should be riddled with profanity but at this point I'm not even angry just very disappointed 😥 -
I was having a weird time playing manager because we had none. And the new one kind of sucks and it is too junior for the role. Acting as TL too and had almost no time to code or do PRs. And. Gee. Yesterday I went back to coding after a few months. And I found out that We have a team member that just shits all over the code. Tests that are invalid, basically testing nothing. Methods done apparently for no reason. It took me a good deal of time to sort things thru. And now I'm at a point where I can finally do some reviews. Long day today.1
-
Visual Studio's Test Explorer is a piece of shit.
Maybe the user wants to repeat the last test run without rebuilding? No can do. Maybe the user didn't add or remove any tests, but just needs to rebuild without running test discovery again? Nah. Maybe the user just needs to discover tests from THE ONLY ASSEMBLY WHICH WAS REBUILT? Too frickin' bad.
A 120-second turnaround (30 to build, 90 to discover) just to _start_ a test run is bloody atrocious. Especially when VS decides to run test discovery twice in a row for no given reason.
*sigh*...
I'd use ReSharper's runner, but unfortunately it isn't capable of running xUnit v2 tests when you've designated a custom XUnitTestFramework. -
Anyone ever heard of robot framework? Its the biggest pile of shit i have ever seen! WHY THE FUCK CREATE A TEST FRAMEWORK FOR TESTERS WITHOUT REAL CODE AND JUST KEYWORDS WHEN ITS SO FUCKING COMPLICATED TO USE THAT NO FUCKING TESTER CAN DO ANYTHING WITHOUT HELP OF A DEVELOPER. this shit tests cost me hours each week to fix because every minor change breaks like a a dozend of tests... i dont rant often but everytime i have to fucking take a lool at that shit a start to boil...3
-
Do you guys know of any online course that teaches data structures, algorithms and other competitive stuff, but which is like, semi-online :
- the course would run for ,say 3 months
- the instructor would add videos/livestream on a specific day/days and give the assignment questions/tests
- assignment questions/tests are expected to be completed before the next video, where these questions , along with new concepts are discussed?
I hate those udacity/udemy courses where you have a large playlist of videos open up as you pay. It makes me loose half of my motivation since i know i can watch them later and end up watching them never. Plus there is no competition to motivate
I want this as my job does not allows me to stay sharp in competitive programming and it would be nice to remain in touch with that( without being too much stressed about it).2 -
Wish me luck.
Deploying Blazor app for the first time in prod in about a month.
Did tests. Curent infrastructure can hold around 70 concurent sessions with no problems. (probably more, 70 was the limit in my browser).
I tested each sessiuon with 70.000 line table. (Yep whole 70.000 lines for each session with a virtual scroll).
Shit is fast. Too fast even. I'm waiting for other shoe to drop, but so far in simulated tests it's amazing.
Let's talk in 2 month AFTER prod deploy.4 -
semiRant
The debugging options in VSCodium for when working with golang have certain limitations on them that have made me start writing more tests inside of my codebase (s).
I find this both beautiful and frustrating at the same time since for 1 it has made me(no, forced me) to learn testing on the language as a primary thing rather than an afterthought (judge me all you want) and if this was added by design to force people into properly writing tests then BRAVO.
Well played Mr. Pike and Mr. Thompson, well fucking played you outstanding beautiful bastards. -
Technical lead decides to change some transitively resolved dependencies to Maven with some configurations not existing, 2 days before release to production. Thanks to our none existing regression tests, no users can log in after releasing. Guess who can fix it ASAP (of which business thinks it means, in half an hour)
-
That moment when I realize that my project has a dependency written by a researcher with no tests whatsoever while I spent 2h today writing my tests.
-
I am starting a testing project at work and we have nothing in place.
Should I use a tool like browserstack and try to hold my selenium tests there or bite the bullet and use something like spec flow to write the selenium tests by hand? The advantage being full control, easy way to integrate with CI and easier to integrate to existing workflows (no need for visual studio and a browser open to work on in parallel).
If I do that I will also need some way to do cross browser testing which I guess will require me to export the tests somehow to a cross browser treating service like browserstack. -
"Good job coworker X for making a hotfix, that fixed crashes".
I don't get it. Poor code, no tests, bad QA and at the end of the day people get praised for fixing the crash. Cool, I guess I know how you get promoted.6 -
Honestly when tests finally pass and no bugs are to be seen after a long period of working on something.
-
People that approve pull requests without looking at them!
No tests or so bad they would do more use by not existing, typos, the code follows none of the design practices and the code obviously will not compile and thereby breaks builds in trunk for everyone.
Because of course they only asked one person to review it and then merged it immediately. -
Recently I am on my exams and I need to study well, On the other hand , all of the things I am studying has no link to my dream job !! So why should I study it and not to choose what to study .. Even though, I don’t really care and I keep on programming because it’s what I love ..💕🚶🏻♀️, no worries, I still study too.. I like studying and learning new information but I hate tests and exams,,🙆🏻♀️💔11
-
Scenario: Enabling yet another python test suite on vscode. No big deal.
I start the test init and discovery. Says it cant find the test files. Okay; usually the issue is there's no __init__.py in the test directory. It's okay we can fix that.
Oh wait it's still not working. Okay well this isnt good... After about an hour of searching, i finally find out that the file that vscode is discovering tests with doesnt exist... In fact the whole testing directory doesnt exist!
Okay so now what do i do... Reinstall? Doesnt work. Reinstall and delete the extension directory? Yes! Victory!
Dont know how i got a half-baked extension download but hey... Could've beem worse. -
Unit tests are like the second half of a watermelon. It exists, yet no one needs it.
You only need it if you're a misanthrope who wasn't invited when everyone else ate the first half.5 -
Okay..
So, what do I have here?
A cross platform mobile app with NO unit tests.
😕
I have to write a big new feature from scratch. (Things can't go wrong, right?)
Started working on it, pointed out problems with the UI/UX designs. The design changed multiple times, still I thought I could finish it by the expected date. And, so I did.
The feature went through testing, and they found bugs. (Surprise...?)
It's already kinda scary to touch someone's code that has no unit tests and no comments. And I think, it's all the more difficult to not introduce bugs.
Also, had to work on the weekend to fix the bugs.
I had some good learnings here, but I'm not sure how I can prevent bugs without unit tests and proper feedback cycle. :/4 -
As experienced developers, how do you do time estimation in spite of things being stuck and new, unexpected, stuff coming at you with no extra time? This has happened to me and it's depressing and frustrating to have to ask for an extension again and again. Plus, the code and tests for it get boring.7
-
Does anyone know a good method, or library to match 2 gps locations based on proximity to each-other?
while being fed a few 100 GPS locations per device per hour.
I currently do it by having the client send their Geohash to a database, then request all neighboring hashes around it and all other clients in those hashes, then get their GPS to check for distance.
But this does not seem to work flawlessly, it works on tests and emulators (its for phones) but on real phones it seems to be hit an miss, but no errors, the event just does not seem to fire.4 -
2 weeks+ ago I made a PR into our codebase containing sample refactor that streamlined a significant portion of code. Also, I did refactor only on two handler packages (for MVC folks, that's Controller) as proof of concept, to figure out how convinient / logical the part would be for everyone.
We have rule of 2 approvals for merge (for 5 team members)
While writing refactor, it obviously blown up a lot of unit tests, but still coverage was fairly poor (that stuff was rushed, there was back than no time for unit tests). After my refactor I spent couple of days writing tests that hit fairly sweet (comparatively) coverage. (I managed to bump coverage from low 20s to high 80s, and have less code for tests)
I got first approve pretty much immidietely, other team member was on vacations, and 2 of them forgot.
We generally try to close PRs fairly quickly (usually same day kind of deal), but that one was just.. hanging in there. So I pinged everyone to re-check it to greenlight it but of course, loo and behold, merge conflicts arised. I ended up fixing actual logic (just some method signatures changed, not a big deal) and ran the units.
So, one of that handlers got quite a few of edits, and guess who is pretty much rewriting unit tests for second time now...
Dude, sometimes I question why tf I even bother with these tests... Feels like sabotaging my productivity, especially with bullshit like that3 -
What's the worst part about testing React components? Using the equivalent of fucking stone tools to do your component integration tests! We got errors with no context and errors with no stack trace, just spewing out bullshit! A sample:
The classic "Can't access .root on unmounted test renderer"
The unforgettable and ALWAYS visible "Warning: An update to YourShittyComponent inside a test was not wrapped in act(...)."
We do love it! -
Last saturday, the CEO forced us to update one of the services that we are dependent out without any tests... The people responsible for it very much advised against it but they still did it.
Now, nearly a week later. The literal core feature is still broken with no fix in sight and rolling back is not possible apparently.1 -
Working on a portfolio project - I ran some tests, everything is all good - 100% passing. Computer freezes - pop_os has been giving me shit lately, so I have to restart. Fine.
I get back into code, i re-run pytest - nothing works. Python apparently can't find my modules anymore. I try a few things, nothing. Why? Who the fuck knows - "oh you need this conftest file", "oh you need to remove __init__ from this directory or that one", "oh it's a pytest version iss---" no, no, no - listen here you little shit, it was working two seconds ago. Tell me why and how software I wrote with the most basic ass package structure - literally TWO directories suddenly has no fucking clue how to import the modules. hmm? Even from within the app directory, app.server now no longer recognizes imports from app.main or app.database.
ALL of this worked. It works in new directories without dedicated venvs - it works in new directories with my global python install - it works with any one of my conda envs - it works on other computers - WHY doesn't it work in THIS directory all of a sudden?? Ugh.
What's terrible is that relative imports will probably solve it within the app dir, but the tests dir won't accept them. Moreover, vs code autocompletion can find all the modules, but python itself cannot. Fucking infuriating shit like this is.1 -
I've been working on an issue on and off for the past few weeks. The QA tests failed, so the ball is back in my court again. The data our analysts are testing from comes from a mysterious spreadsheet that no one knows where it came from, while my data is coming from some obscure database table. After asking around it turns out that the table hasn't been maintained for who knows how long, and nobody really knows what the data is used for... I feel like a freaking archaeologist.2
-
Just built out my first app using Cloudflare Workers, Typescript, and DurableObjects. Holy shit, this is nice stuff.
It's taken little to no time to build out:
* JSON API written in Typescript
* JWT verification against my OAuth backend (SAML support too)
* CI Automated Deployments including unit tests
* DurableObject support
* 3rd party HTTP calls + caching (built in to the framework!) to reduce network latency and hiccups.
* Cron-like tasks on each stored object so they can awaken the app on a schedule and update themselves as necessary
* Rapid deployment to new environments
The local testing with coordinated "miniflare" is dreamy too. -
That feeling you get when starting a new scala project. Fresh start! Lessons I have learned:
1) Add a linting tool before the code gets inconsistent to the point where it has thousands of style errors.
2) use test driven development from the start so that refactoring later is a breeze.
3) Write top down, no matter how much I want to implement the algorithms first.
4) write the tests first! -
Recently started a new role as a junior dev(second role). Three weeks in and I'm already starting to loathe the work setup & process.
Last week I was asked to fix a bug due to them not having anything in the pipeline for me(I had finished my allocated tasks for the sprint). There was no spec to this, no visible steps to replicate the error & no tests in place to validate it was working... I thought I had fixed it, even had one of the seniors reviewed it on my PR but also I walked him through my possible solution resulting in us moving forward with the "improved" solution.
After a bank holiday, I've come back to find that the "fix" I had deployed doesn't solve the problem at all. So here I am after 3.5hours of flying blind with a bug that I'm still not able to reproduce, bored and frustrated asf. Not to mention, that the codebase has little to no consistency, a lot of legacy and almost no form of tests.
Am I overreacting to this as junior?1 -
Creating a new class to help implement a new feature. Start with my tests (going full TDD).
Feature gets more urgency given to it, write slightly less tests as deadline approaches (half TDD).
Out of time, any future tests are burnt (no TDD) as I frantically wrap up the class with not even the time to write down a plan, it's live coding at this point.