Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "unit tests"
We passed a milestone: 250,000 phpunit testcases.
If it weren't for a heavily parallelized build pipeline which splits it out over 20 servers, it would take about 7.5 hours to complete.
Not hating on PHP, and without tests it would truly be hell...
But still, fucking hell, we outgrew PHP.
Not having a solid type system just means you either accept more bugs, or write thousands of unit tests to guard all the foundational cracks in the system.
On the bright side, I get a coffee break after every commit 😄22
Some 'wk306' highlights from different people:
Walk around the office in his underwear, because he forgot he left his trousers in the bathroom
Run a red light outside the office due to not wearing his required glasses. When questioned by co-workers, replied "I don't follow those facist rules"
Asking if we work less will we get paid more, because the project will take longer to do (while in a startup with no funding trying to secure some)
Tell a senior dev to stop testing in his spare time, as we won't be able to release on time if he keeps finding critical security bugs
Telling me "your timezone is not my concern", when asking for help with new tooling so we don't have to be online at the same time
Blaming my team for requesting too much help, leading to his team missing deadlines, in a meeting with very senior managers. When the reason we were requesting help was the handover doc we were given was filled with lies about features being finished and "ready to ship" and lacking any unit tests
Being accused of bullying and harassment to the CEO, because someone asked "did you follow up with X about the partnership they emailed us about". The person who was responsible, forgot 4 times, and saw it as an "attack" to mention it in team meetings
Telling an entire office/building mid November they've secured funding for at least the next year, then announcing in January after the Christmas break that its cheaper to move to India, so they are closing the office in 30 days2
This happened today...
Manager: how long this is going to take?
Dev: 3 months
M: cool! 3 weeks then
D: no.. This is quite complicated and most of us are unfamiliar with the topics. It'll take us 2 weeks just to get started
M: drop the unit tests then. Just get the features done in 3 weeks. We have customers waiting
D: that's a bad idea. We'll end up with unstable co..
M: oh we also need to complete documentation, release guide, and this [shitty feature no one care about]
D: but that is even more complex. We don't have enough ti..
M: just copy it from stackoverflow. It'll only take 5 minutes guys
Worst part? This guy is technically sound and understands our pain really well. He is just acting dumb and trying to put the blame on us when the higher management asks
Second worst part? The whole team keeps silent when I try to convince him somehow and starts ranting after he leaves the call2
Current work project is microservices architecture out of 4 - 8 components.
It is fully Infrastructure as a Code automatized. I just change somewhere code, git pushing
And it automatically invokes Gitlab CI, terraform, ansible, kubernetes helm charts.
Auto checking itself with unit and integration tests in autoredeployed staging env. Then it saves tested results to docker registry and asks for one button verificating click to be rereleased to prod.
I just go for drink or eat food. While all the stuff is happening.
And I am proud that all the infrastructure, backend and frontend I made on my own.
I don't need to remember how to Deploy it. It is all automatized3
I was pressued to shift the blame.
We received an angry email from a customer that some of their data had disappeared. The boss assigns me to this task. This feature is relatively new and we've found some bugs in the past in here. I go through request logs, search the database, run some diagnostics, etc. for about 5 hours and I cannot find the problem. I focus on the bugs that we've had before but they don't seem to be the problem.
I tell the boss "sorry but I checked XYZ and I can't find the problem. I'm out of ideas." But the boss wanted answers by the end of the day. They did not want to admit to the client that we couldn't figure out what's wrong.
By now I was more pressured to find an answer, find something or someone to blame it on, not exactly to find the real solution. So I made up some BS:
"Sometimes, in HTML forms, the number inputs allow you to change the number by scrolling. We have some long forms where the user has to scroll. Perhaps the focus remained on the number input, so when they scrolled down they accidentally changed the number they meant to input."
The boss was happy with that. We explained this to the customer, and there's now a ticket to change type="number" to type="text" in our HTML forms and to validate it in th backend.
A week later another customer shows us a different error. This one is more clear because it had a stack trace, but I realise that this error is what caused our last error. It was pretty obscure, mind you, the unit tests didn't detect it.
I didn't tell the boss that they were connected tho.
With two angry clients in two weeks, I finally convinced the boss to give us more time to write more unit tests with full coverage.
the year is 2050
- Linux is written in Rust and called Windows
- Python 2 market share increased by 2% since 2023
- The latest JS framework to finally solve everything just came out, and this time it’s the real deal. The exact same thing also happened in 2045, 2041, 2037, 2035, 2030 and 2026
- More than 60% of every CPU is hardware JS cores
- React became a separate language
- Sentient Copilot refused to write code in it
- Unit tests are illegal in three states
- Google had changed their motto from “Do The Right Thing” to “Do At Least Something”
- Chrome OS was rewritten in JS
- CSS is Turing-complete29
I AM TIRED
warning: this rant is going to be full of negativity , CAPS, and cursing.
People always think and they always write that programming is an analytical profession. IF YOU CANNOT THINK IN AN ANALYTICAL WAY THIS JOB IS NOT FOR YOU! But the reality could not be farther from the truth.
A LOT of people in this field whether they're technical people or otherwise, just lack any kind of reasoning or "ANALYTICAL" thinking skills. If anything, a lot of of them are delusional and/or they just care about looking COOL. "Because programming is like getting paid to solve puzzles" *insert stupid retarded laugh here*.
A lot of devs out there just read a book or two and read a Medium article by another wannabe, now think they're hot shit. They know what they're doing. They're the gods of "clean" and "modular" design and all companies should be in AWE of their skills paralleled only by those of deities!
Everyone out there and their Neanderthal ancestor from start-up founders to developers think they're the next Google/Amazon/Facebook/*insert fancy shitty tech company*.
Founder? THEY WANT TO MOVE FAST AND GET TO MARKET FAST WITH STUPID DEADLINES! even if it's not necessary. Why? BECAUSE YOU INFERIOR DEVELOPER HAVE NOT READ THE STUPID HOT PILE OF GARBAGE I READ ONLINE BY THE POEPLE I BLINDLY COPY! "IF YOU'RE NOT EMBARRASSED BY THE FIRST VERSION OF YOU APP, YOU DID SOMETHING WRONG" - someone at Amazon.
Well you delusional brainless piece of stupidity, YOU ARE NOT AMAZON. THE FIRST VERSION THAT THIS AMAZON FOUNDER IS EMBARRASSED ABOUT IS WHAT YOU JERK OFF TO AT NIGHT! IT IS WHAT YOU DREAM ABOUT HAVING!
And oh let's not forget the tech stacks that make absolutely no fucking sense and are just a pile of glue and abstraction levels on top of abstraction levels that are being used everywhere. Why? BECAUSE GOOGLE DOES IT THAT WAY DUH!! And when Google (or any other fancy shit company) changes it, the old shitty tech stack that by some miracle you got to work and everyone is writing in, is now all of a sudden OBSOLETE! IT IS OLD. NO ONE IS WRITING SHIT IN THAT ANYMORE!
And oh my god do I get a PTSD every time I hear a stupid fucker saying shit like "clean architecture" "clean shit" "best practice". Because I have yet to see someone whose sentences HAVE TO HAVE one of these words in them, that actually writes anything decent. They say this shit because of some garbage article they read online and in reality when you look at their code it is hot heap of horseshit after eating something rancid. NOTHING IS CLEAN ABOUT IT. NOTHING IS DONE RIGHT. AND OH GOD IF THAT PERSON WAS YOUR TECH MANAGER AND YOU HAVE TO LISTEN TO THEM RUNNING THEIR SHITHOLE ABOUT HOW YOUR SIMPLE CODE IS "NOT CLEAN". And when you think that there might be a valid reason to why they're doing things that way, you get an answer of someone in an interview who's been asked about something they don't know, but they're trying to BS their way to sounding smart and knowledgable. 0 logic 0 reason 0 brain.
Let me give you a couple of examples from my unfortunate encounters in the land of the delusional.
I was working at this start up which is fairly successful and there was this guy responsible for developing the front-end of their website using ReactJS and they're using Redux (WHOSE SOLE PURPOSE IS TO ELIMINATE PASSING ATTRIBUTES FOR THE PURPOSE OF PASSING THEM DOWN THE COMPONENT HIERARCHY AGIAN). This guy kept ranting about their quality and their shit every single time we had a conversation about the code while I was getting to know everything. Also keep in mind he was the one who decided to use Redux. Low and behold there was this component which has THIRTY MOTHERFUCKING SEVEN PROPERTIES WHOSE SOLE PURPOSE IS BE PASSED DOWN AGAIN LIKE 3 TO 4 TIMES!.
This stupid shit kept telling me to write code in a "functional" style. AND ALL HE KNOWS ABOUT FUNCTIONAL PROGRAMMING IS USING MAP, FILTER, REDUCE! And says shit like "WE DONT NEED UNIT TESTS BECAUSE FUNCTIONAL PROGRAMMING HAS NO ERRORS!" Later on I found that he read a book about functional programming in JS and now he fucking thinks he knows what functional programming is! Oh I forgot to mention that the body of his "maps" is like 70 fucking lines of code!
Another fin-tech company I worked at had a quote from Machiavelli's The Prince on EACH FUCKING DESK:
"There is nothing more difficult to take in hand, more perilous to conduct, or more uncertain in its success, than to take the lead in the introduction of a new order of things."
MOTHERFUCKER! NEW ORDER OF THINGS? THERE 10 OTHER COMPANIES DOING THE SAME SHIT ALREADY!
And the one that got on my nerves as a space lover. Is a quote from Kennedy's speech about going to the moon in the 60s "We choose to go to the moon and do the hard things ..."
YOU FUCKING DELUSIONAL CUNT! YOU THINK BUILDING YOUR SHITTY COPY PASTED START UP IS COMPARABLE TO GOING TO THE MOON IN THE 60S?
I am just tired of all those fuckers.13
I just wrote 80+ lines of tests for a 30 line module and I was really mad at myself for wasting my time like that, until I remembered that while writing those tests I did actually catch several really tricky bugs and it didn't even take that long.5
There you are, fiddling with next.js webpack settings, because your isomorphic JS-in-CSS-in-JS SSR fallback from react-native-web to react-dom throws a runtime error on your SSR prerendering server during isomorphic asynchronous data prefetching from Kubernetes backend-for-frontend edge-server with GraphQL.
You have all that tech to display a landing page with an email form, just to send spam emails with ten tracking links and five tracking beacons per email.
Your product can be replaced by an Excel document made in two days.
It was developed in two years by a team of ten developers crunching every day under twelve project managers that can be replaced with a parrot trained to say “Any updates?”
Your evaluation is $5M+. You have 10,000 dependency security warnings, 1000 likes on Product Hunt, 500 comments on Hacker News, and a popular Twitter account.
Your future looks bright. You finish your coffee, crack your knuckles and carry on writing unit tests.5
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
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
Supervisor: YOU NEED TO INCREASE THE COVERAGE OF YOUR UNIT TESTS! THE FILE logger.js DOESN'T HAVE >80% COVERAGE! IMAGINE PICKING THIS UP 6 MONTHS FROM NOW!
Bro. It's a Winston instance.
I am literally exporting a fucking Winston instance with 0 custom logic.
If 6 months from now I take a file and can't understand a Winston instance anymore, you're well within your right to fire me on the spot.2
delete unused code according to IDE
unit with context tests now fail
what is a good alternative industry or career instead of software development8
Unpopular opinion: unit tests are often overrated.
Although a well written test suite is almost essential in some parts of the application (I.E. business logic) I cringe when I see hundreds or thousands of line which “mocks” everything to test a micro service which just does CRUD operations on a database, in cases like that unit tests are just a waste of time because almost every operation involves a mock which may not behave like the real database and often needs to be rewritten when the code undergoes a huge refactoring. In these case a integration test suite is faster to write and way more helpful.7
When I was a junior engineer I used to hate writing unit tests but now I look forward to writing them.
Well written Unit tests will save your life6
This was originally a reply to a rant about the excessive complexity of webdev.
When webdev was simple, it was normal to have the user redownload the whole page everytime you wanted to change something. It was also normal to have the server query the database everytime a new user requested the same page even though nothing could have changed. It was an inefficient sloppy mess that only passed because we had nothing better and because most webpages were built by amateurs.
Today webpages are built like actual programs, with executables downloaded from a static file server and variable data obtained through an API that's preferably stateless by design and has a clever stateful cache. Client side caches are programmable and invalidations can be delivered through any of three widely supported server-client message protocols. It's not to look smart, it's engineering. Although 5G gets a lot of media coverage, most mobile traffic still flows through slow and expensive connections to devices with tiny batteries, and the only reason our ever increasing traffic doesn't break everything is the insanely sophisticated infrastructure we designed to make things as efficient as humanly possible.11
probably every time I see my tests failing.
Each time I am writing tests I'm convincing myself "it's an investment", "spend 2 hours now to save 2 days later", "unit-tests are good".
And each time I'm chasing away ideas like "perhaps they are right, perhaps writing unit tests is a waste of time..", "this code is simple, it should ever break - why test it??", "In the 2 hours I'll spend writing those UT I could build another feature"
Yes, it is terribly annoying to write tests, especially after writing the production code (code-first approach). Why test code that you know works, right?
But after a few weeks, months or years, when the time comes to change your feature: enhance it, refactor it, build an integration with/from it, etc, I feel like a child who found a forgotten favourite candy in his pocket when I see my tests failing.
It means I did a very good job writing them
It means it was not a waste of time
it means these tests will now save me hours or days of trial-and-error change→compile→deploy→test cycles.
So yeah, whenever I see my tests fail, I feel warm and fussy inside :)3
all that decades spent on debuggers, strict typing, static analyzers, fucking unit tests
ima put frogs in my code so they eat bugs
S̸ ̶T̶ ̵O̴ ̴N̵ ̶K̶ ̸S̷
they say kiki get your legs from position: fixed to justify-content: space-around, but they show up with unit tests, and all they're gonna get is display: glock.4
If you're subscribed to me only because of my jokes, feel free to ignore this rant. You won't miss anything.
If not, bear with me.
I was wrong about almost everything I can remember. Preaching so-called “conceptual thinking”, I invented a fantasy world of random anecdotes, which turned into a completely false worldview that shaped my reality. I bashed magical thinking, yet succumbed to it. What I believed to be true was just as magical, wrapped into what sounded like science. In the Dunning-Krueger scheme, I was right there on Peak Stupid.
Random hear-say, stupid concepts I invented, random “knowledge” I picked from YouTube videos, all that was rotting inside my head, one anecdote contradicting another. Ultimately, I think this was the reason of my constant anxiety and pointless, never-ending thought process in background.
If you learned anything factual from me and didn't fact-check it, please forget that immediately. The list includes but is not limited to everything on brain structure, everything on philosophy, almost everything on engineering and architecture, almost everything on systems theory and programming meta stuff (declarative, imperative, etc.)
I admit bashing unit tests. The only reason was me disliking writing them in uni. I wrote like three test cases, disliked it, and the rest was history. Everything else was a rationalization on top. If I was right about something, I was just lucky.
I'm not a CSS prodigy. I know stuff that earns me money and impresses my colleagues, but my knowledge is just one step above basics, in one thousand steps ladder.8
Today i had to revisit my code to change some functionality for an application i made 3 years back.
I wish i could go back in time, refactor the code and write Unit tests.1
Not leaning on unit tests. I usually write them after testing my code manually, and lose time for testing feature by hand.1
Killing people is bad. But, there should be a law to allow killing people who don't write proper unit tests for their code. And also those "team leaders" who approve and merge code without unit tests.
Little backstory. Starts with a question.
What is the most critical part of a quoting tool (tool for resellers to set discounts and margins and create quotations)? The calculations, right?
If one formula is incorrect in one use case, people lose real money. This is the component which the user should be able to trust 100%. Right?
Okay. So this team was supposed to create a calculation engine to support all these calculations. The development was done, and the system was given to the QA team. For the last two months, the QA team finds bugs and assigns those to the development team and the development team fix those and assigns it back to the QA team. But then the QA team realizes that something else has been broken, a different calculation.
Upon investigation, today, I found out that the developers did not write a single unit test for the entire engine. There are at least 2000 different test cases involving the formulas and the QA team was doing all of that manually.
Now, Our continuous integration tool mandates coverage of 75%. What the developer did was to write a dummy test case, so that the entire code was covered.
I really really really really really think that developers should write unit tests, and proper unit tests, for each of the code lines (or, “logical blocks of code”) they write.20
I really need to introduce unit tests.
Btw the module is meant for internal use and the readme is more for eventual collaborators than the general public
- make absurdly large refactoring on
- run unit tests for the first time on this branch and expect dozens of failures
- everything works
- be like WTF!
- git status
> on brach master
And this is how to troll yourself.2
When the CTO/CEO of your "startup" is always AFK and it takes weeks to get anything approved by them (or even secure a meeting with them) and they have almost-exclusive access to production and the admin account for all third party services.
Want to create a new messaging channel? Too bad! What about a new repository for that cool idea you had, or that new microservice you're expected to build. Expect to be blocked for at least a week.
When they also hold themselves solely responsible for security and operations, they've built their own proprietary framework that handles all the authentication, database models and microservice communications.
Speaking of which, there's more than six microservices per developer!
Oh there's a bug or limitation in the framework? Too bad. It's a black box that nobody else in the company can touch. Good luck with the two week lead time on getting anything changed there. Oh and there's no dedicated issue tracker. Have you heard of email?
When the systems and processes in place were designed for "consistency" and "scalability" in mind you can be certain that everything is consistently broken at scale. Each microservice offers:
1. Anemic & non-idempotent CRUD APIs (Can't believe it's not a Database Table™) because the consumer should do all the work.
2. Race Conditions, because transactions are "not portable" (but not to worry, all the code is written as if it were running single threaded on a single machine).
3. Fault Intolerance, just a single failure in a chain of layered microservice calls will leave the requested operation in a partially applied and corrupted state. Ger ready for manual intervention.
4. Completely Redundant Documentation, our web documentation is automatically generated and is always of the form //[FieldName] of the [ObjectName].
5. Happy Path Support, only the intended use cases and fields work, we added a bunch of others because YouAreGoingToNeedIt™ but it won't work when you do need it. The only record of this happy path is the code itself.
Consider this, you're been building a new microservice, you've carefully followed all the unwritten highly specific technical implementation standards enforced by the CTO/CEO (that your aware of). You've decided to write some unit tests, well um.. didn't you know? There's nothing scalable and consistent about running the system locally! That's not built-in to the framework. So just use curl to test your service whilst it is deployed or connected to the development environment. Then you can open a PR and once it has been approved it will be included in the next full deployment (at least a week later).
Most new 'services' feel like the are about one to five days of writing straightforward code followed by weeks to months of integration hell, testing and blocked dependencies.
When confronted/advised about these issues the response from the CTO/CEO
(A) "yes but it's an edge case, the cloud is highly available and reliable, our software doesn't crash frequently".
(B) "yes, that's why I'm thinking about adding [idempotency] to the framework to address that when I'm not so busy" two weeks go by...
(C) "yes, but we are still doing better than all of our competitors".
(D) "oh, but you can just [highly specific sequence of undocumented steps, that probably won't work when you try it].
(E) "yes, let's setup a meeting to go through this in more detail" *doesn't show up to the meeting*.
(F) "oh, but our customers are really happy with our level of [Documentation]".
Sometimes it can feel like a bit of a cult, as all of the project managers (and some of the developers) see the CTO/CEO as a sort of 'programming god' because they are never blocked on anything they work on, they're able to bypass all the limitations and obstacles they've placed in front of the 'ordinary' developers.
There's been several instances where the CTO/CEO will suddenly make widespread changes to the codebase (to enforce some 'standard') without having to go through the same review process as everybody else, these changes will usually break something like the automatic build process or something in the dev environment and its up to the developers to pick up the pieces. I think developers find it intimidating to identify issues in the CTO/CEO's code because it's implicitly defined due to their status as the "gold standard".
It's certainly frustrating but I hope this story serves as a bit of a foil to those who wish they had a more technical CTO/CEO in their organisation. Does anybody else have a similar experience or is this situation an absolute one of a kind?2
(Time to actually code feature + time to debug it + time for unit tests to pass/add) * 1.5
Works great in my case unless there are some big major road blocks
Read this and tell me OOP (or at least C#) isn't broken:
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
In my company we are constricted to have 100% of f̶a̶k̶e̶ coverage with unit test.
Obviously the test suites are not performing and it takes more than 8 minutes to run 3335 tests.
I know that what I'm going to say is super mainstream but there is nothing comparable to the relief that comes from seeing all tests in green after you did a lot of small changes around the code on Friday.4
I hate unit test. I hate testing by code.
I hate the idea to write code that tests code. And that u must update both when u add a feature. Like wtf.
Good debug mode with clear verbose and precise reporting tool and voila.
Drives me nuts thus trending shit.10
#Suphle Rant 3: Road to PHP8, Flow travails
Some primer: Flows is a feature that causes the framework to bypass handling the request now but read it from cache. This cache entry is meant to be populated without warming, based on the preceding request. It's sort of like prefetching but done on the back end
While building Suphle, I made some notes on some chapters about caveats and gotchas I may forget while documenting. One such note was that when users make the Flow request, the framework will attempt to determine who user is, using authentication mechanism defined on the first module (of the modular monolith)
Now, I got to this point during documentation and started wondering whether it's impossible for the originating request to have used a different authentication mechanism, which would result in an empty entry for returning user. I *think* it's possible cuz I've got something else called "route mirroring", where web based routes can be converted to API routes. They'll then return JSON, get served under defined API path, use JWT, all automatically. But I just couldn't connect the dots for the life of me, regarding how any of this could impact authentication on the Flow request
While trying to figure out how to write the test for this or whether it was even necessary (since I had no use case), it struck me that since Flow requests are not triggered by an actual user, any code attempting to read authenticated user will see nothing!
I HATE it when I realize there's ambiguity or an oversight, after the amount of attention and suffering devoted. This, along with a chain of personal troubles set off despondency for a couple of days. No appetite for food or talk. Grudgingly refactored in this update over some days. Wrote some tests, not all passed. More pain. May have to convert them to unit tests
For clarity, my expectation is, I built this. Nothing should be impossible for me
Surprisingly, I caught a somewhat lucky break –an ex colleague referred me to the 1st gig I'm getting in 1+ year. It's about writing a plugin for some obscure forum software. I'm not too excited cuz it's poorly documented and I'll have to do a lot of groping, they use arrays instead of objects etc. There's no guarantee I'll find how to implement all client's requirements
While brooding last night, surfing the PHP subreddit, stumbled on a post about using Rector to downgrade a codebase. I've always been interested in the reverse but didn't have any incentive to fret over it. Randomly googled and saw a post promising a codebase can be upgraded with 3 commands in 5 minutes to PHP 8. Piqued my interest around 12:something AM. Stayed up all night upgrading it, replacing PHPSTAN with Psalm, initializing the guy's project, merging Flow auth with master etc. I think it may have taken 5 minutes without the challenge of getting local dev environment to PHP 8
My mood is much lighter than it was, although the battle is not won yet –image tests are failing. For some weird reason, PHP8 can't read generated test images. Hope I can ride on that newfound lease on life to study the forum and get the features working
I have some other rant but this is already a lot to digest in one sitting. See you in rant #4
The platform team who provides all other teams with common framework emails everybody we need to upgrade the framework to new version. Let’s say version 1.a.0. They say it brings crucial security features and all pipelines using old versions would be blocked. My colleague created a story to upgrade all of our 10 microservices. When I got to it in a couple of days for some fucking reason they already rolled out 1.a.1 and didn’t inform anybody, the pipelines just logged warning u need to use 1.a.1. Alright, I did the upgrade to 1.a.1 and merged ducking everything in 10 fucking microservices. In a couple of days at morning they roll our 1.a.2 and require everybody to upgrade ducking degenerates as they found a high severity bug. I wanted to start again but was lazy and did nothing all day to learn that at 6pm the fuckers roll out 1.a.3!!! And again require everyone to upgrade!1!1!1eleven
Ten fuxkibg microservices. Goddamit write some unit tests, do friends&family, do fucking tests on small group of your inner clients before rolling out this shit that everybody must to use.
Spat at the display
I don't know if I have very high expectations, but joining a company as a Tech Lead and seeing that none of the 100 programmers in the team know the difference between unit and integration tests is kind of a letdown.1
You deliver a new feature. After the functionality, how do you prioritize?
- having clear variable- and function names
- having meaningful and orthographically and grammatically spelled commit messages
- having a clean commit history
- having perfect linted syntax
- having it covered with unit-tests
- having a wonderful documentation6
Unit tests pass locally but fail on the pipeline. After 3rd re-queue, pipeline tests pass. I am so over this bloody week.11
I know unit tests and TDD get a bad wrap but I think they’re both great. The problem is people don’t think about what they’re actually coding.
Today I uncovered a unit test with 100 asserts in it.
And half of them are in a loop.
If unit tests weren’t a thing then the dev who wrote this would still be a shit dev.4
What have you suggested at work which sounded like a good idea at the time, but now sounds like a nightmare?
I inherited a nasty old legacy c# desktop app a few years ago, I was a sql developer so it was a steep learning curve, but I’ve tried to make it better, fixing things as I go.
I had the bright idea of mentioning that I would look at starting to add unit tests etc.
It seemed like a good idea at the time, but now I’m not so sure.3
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
i am feeling angry and frustrated. not sure if it's a person ,or codebase or this bloody job. i have been into the company for 8 months and i feel like someone taking a lot of load while not getting enough team support to do it or any appreciation if i do it right.
i am not a senior by designation, but i do think my manager and my seniors have got their work easy when they see my work . like for eg, if on first release, they told me that i have to update unit tests and documentation, then on every subsequent release i did them by default and mentioning that with a small tick .
but they sure as hell don't make my work easy for me. their codebase is shitty and they don't give me KT, rather expect me to read everything on my own, understand on my own and then do everything on my own, then raise a pr , then merge that pr (once reviewed) , then create a release, then update the docs and finally publish the release and send the notification to the team
well fine, as a beginner dev, i think that's a good exercise, but if not in the coding step, their intervention would be needed in other steps like reviewing merging and releasing. but for those steps they again cause unnecessary delay. my senior is so shitty guy, he will just reply to any of my message after 2-3 hours
and his pr review process is also frustrating. he will keep me on call while reviewing each and every file of my pr and then suggest changes. that's good i guess, but why tf do you need to suggest something every fucking time? if i am doing such a shitty coding that you want me to redo some approach that i thought was correct , why don't you intervene beforehand? when i was messaging you for advice and when you ignored me for 3 hours? another eg : check my comment on root's rant https://devrant.com/rants/5845126/ (am talking about my tl there but he's also similar)
the tasks they give are also very frustrating. i am an android dev by profession, my previous company was a b2c edtech app that used kotlin, java11, a proper hierarchy and other latest Android advancements.
this company's main Android product is a java sdk that other android apps uses. the java code is verbose , repetitive and with a messed up architecture. for one api, the client is able to attach a listener to some service that is 4 layers down the hierarchy , while got other api, the client provides a listener which is kept as a weak reference while internal listeners come back with the values and update this weak reference . neither my team lead nor my seniors have been able to answer about logic for seperation among various files/classes/internal classes and unnecessary division of code makes me puke.
so by now you might have an idea of my situation: ugly codebase, unavailable/ignorant codeowners (my sr and TL) and tight deadlines.
but i haven't told you about the tasks, coz they get even more shittier
- in addition to adding features/ maintaining this horrible codebase , i would sometimes get task to fix queries by client . note that we have tons of customer representatives that would easily get those stupid queries resolced if they did their job correctly
- we also have hybrid and 3rd party sdks like react, flutter etc in total 7 hybrid sdks which uses this Android library as a dependency and have a wrapper written on its public facing apis in an equally horrible code style. that i have to maintain. i did not got much time/kt to learn these techs, but once my sr. half heartedly explained the code and now every thing about those awful sdls is my responsibility. thank god they don't give me the ios and web SDK too
- the worst is the shitty user side docs. I don't know what shit is going there, but we got like 4 people in the docs team and they are supposed to maintain the documentation of sdk, client side. however they have rasied 20 tickets about 20 pages for me to add more stuff there. like what are you guys supposed to do? we create the changelog, release notes , comments in pr , comments in codebase , test cases, test scenarios, fucking working sample apps and their code bases... then why tf are we supposed to do the documentation on an html based website too?? can't you just have a basic knowledge of running the sample, reading the docs and understand what is going around? do i need to be a master of english too in addition to being a frustrated coder?
Would've probably been better off mailing the owning company to let them know one of their software users' usage for a lawsuit on backpay or something. Idk I didn't make the rules. They also messed up the specs for how modular the app needed to be so I had to rewrite the whole thing in 6 months, but this time I took the opportunity to do unit tests so that was nice...
Looking for android dev who could mentor me with more advanced android dev topics (architecture, unit tests, code style and etc.) I am a self tought intermediate dev with 2 years experience (worked in 3 startups). I need help with questions/ocasional code reviews.2