Joined devRant on 9/13/2018
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
If your unit test has a bunch of mocked up dependencies which you puppet to do whatever the fuck you want. Something could be improved perhaps
- write a test at a lower level if possible where the dependencies can be abstracted away, or you pass down what you need from them
- write a higher level integration test, i.e. which uses real spring context instead of mock dependencies
But my senior tells me that a unit test will almost always mock all of its dependencies, it should only test the logic in it's tiny atomic piece of work. Mock everythign else out.
Devrant, how do you unit test? I'm looking to learn more on the topic and hear how others do it.4
>admit weakness and knowledge gaps to be helped, to learn and to improve
what a sweet fantasy
>admit weakness and knowledge gaps, get punished for it
thanks world, universe, society, etc
write simple working code with some duplicated code (less than 10 lines) and have compile time safety , NAH
write more complicated code you have to spend time fixing thanks to PR feedback
completely unrelated to work but when i'm a speedreading retard and i meet somebody who is an even bigger speedreading retard, it infuriates me despite the irony of pot calling kettle black
like bruh i gave you what you asked for, READ
i don't want to write the query and tests for query, for the data i need, for this thing we're deleting and the fact that the query and tests on the query would get deleted later
i'd rather just hard code the results i have
yes im lazy1
when you work on a bug about fixing mistakes made on a story completed by somebody else
you then get approached with having to do petty unrelated UX stuff in the neighbouring area and the administrative nonsense with it
fuck u jira2
the amount of time you spend trying to unfuck shit you don't understand while using linux is highly unpleasant
i'm even on ubuntu which should is supposed to be a friendly babbies first linux option
dumbass shit with the desktop environment being borked such that i had to stop using cinnamon and grub boot issues because of dual booting windows 10 on the same drive
something that just werks, can play games, codemonkey, wageslave and isn't windows could be nice (macos fuck off, you don't satisfy the critieria eitehr)4
apple you mongoloids, default background of images should be transparent not white
im too retarded to figure out how to be able to view these fuckign white images (svg file extensions to be specific) ive been given because the fucking default background is white and im too retarded to find a way around it quickly (still working)
"IT juSt WerkZ!!!!1111" - steve jobs dying of an easily prevented early caught cancer or some shit because he doesn't want the minimally invasive surgery that would fix him, but would rather juice cleanse (idk if true, only vaguely remember memes)2
spotify webplayer you're a piece of shit (ublock origin is bae for helping block ads though) that can't recognize i'm online, this is why i'm going back to youtube and searching for random songs i want to listen to
your help articles are also a piece of shit
i can't afford (don't want to pay) premium so i ain't paying for that shit either
if i had the skills and an offer for spotify i'd still take it though4
when you're the unlucky fuck and/or too stupid to get green builds so you get flamed when the flaky automated tests (from before your time, not written by you) rear their head and shit all over you
you then get flamed for not going out of your way for fixing them, as the team verbally agreed to do so, but very rarely if at all has anybody done so (it's not so easy trying to fix something when you don't have consistent steps to reproduce)1
when it takes more effort to writing a bunch of dumbass mocks and stubs so you can have an automated test, than it does to manually test, because you're too retarded to figure out how the fuck easymock is supposed to work, and being awful at your job, also fuck java imports and easymock for being difficult to work with
shout out to my coworkers for requesting more automated tests
can't wait till it all gets deleted anyway because we're going to delete the code we're testing5
I'm too retarded to understand how the fuck to get iframes (of other pages on our site) somebody wrote in the past in our code base to not become the page (the original has 2 other pages on our site "embedded") https://cheatsheetseries.owasp.org/...
Guess I have no choice but to write AJAX to do this dumbass shit.
It's a shame I have no fucking clue how to fuckign front end3
Upgrade some spring.jar files as per ticket.
Bumble fuck cargo program your way into getting the project to be runnable again after fucking with gradle.properties and build.gradle.
Find out that shit doesn't work and now you gotta dug around to see where the fuck logs might be.
Thanks for providing no stack trace or useful information to help me debug spring.2
fuck you onelogin, saml and corporate login for being difficult to setup and understand (still haven't achieved either)
also fuck you outdated documentation
when you drag in a senior to help you and they think you're a retard (true), "just read the docs" (attempted), you have them try to babysit you through the setup and they realize the docs are not up to date/retard proof enough to get a proper setup on your end1
I'm retarded and never learned or was taught how to CSS
What's the simple toggle/config/property to throw onto things in CSS so different rendering engines will render things to look the same?
I just want 1 line of text, an input text box and a button on a web page opened by an app, to look roughly the same on iPhone, android phone and tablet.
Why the fuck did historically shit get fucked up so we have different rendering engines. I just want my fucking 1.5 em/rem to be legibly readable on these different platforms.
an extra special fuck you shout out to apple
time to go down the rabbit hole of who knows what, i dont fucking know what a fucking viewport is yet8
apple you piece of shit just let me have xcode i dont want to make a stupid fucking account, so can you fuck off?
and why do you HAVE to have billing address information to create a fuckign account or am i a retard who cant figure out how to make a fuckign account without providing it because your UI is not retard proof enough
When an internal wiki document you wrote for your personal reference not intended to be used as a guide, gets used as a guide.
Like I intentionally didn't write it well , with no details or explanations, it's what just happened to work for me, on my environment.
Who knows when and if this'll come back to bite us. Hopefully I don't get blamed.
i fuckign hate css and never was taught how to read that shit, guess i should learn
or just cobble something passable together and hope i never need do heavy css nonsense again4
for all the money amazon aws has the web console UI UX is absolute dogshit and constantly chaning, i just want to make the fucking timezone match my local2
when you don't know how to front end css and you get help from your tech leads and now you have to sit through the slow nitpicking of various dogshit mismatched overhangs and pixel jiggling that already exist in your product and may or may not be related to your ticket
well at least at the end of the call they helped you fix the shit for your ticket4
When you do some group programming and let yourself get led wasting an entire day into writing 6 out of ~12 tedious higher level unit tests with lots of data setup and jerry rigging, that turn out to not even test the code changes you made on a ticket that another team is depending on.
But thank you to your tech lead for helping rope you out of that stupid shit with knowledge and clout.
Unfortunately the ticket has your name on it and everybody except the goon squad probably thinks you're a retard for going down that adventure (which was not your idea or desire).
I need to learn how to articulate no this isn't worth it, the complicated monolith software architecture with many different moving parts, among many other things.
Anybody have advice about figuring out how you learn and how to have discipline doing things you don't like (everything related to being a codemonkey) so I can git gud?1
Disclaimer: I am an assclown who makes cobbles shit together and doesn't have a strong/real foundational understanding in the shit I deal with.
So does anybody actually write their tests before they write their code? I see the term TDD (test driven development) bandied around everywhere.
I don't know what the fuck I'm doing or what the solution will be, nor am I confident in it until I've manually tested it seems to be working.
Then I usually write the automated tests if they are easy to do so.
i.e. I won't know what/how to test the thing.....until I make the damn thing
Is this a case of 'git gud' and have the problem "presolved" in your head, before you work on it such that you can already write tests first?
Or is this a case of "aGilE", where everybody says they're agile, maybe does a little bit of scrum (just the pieces they like/find useful, not the entire thing in a dogmatic/religious way), and possibly has never heard of the manifesto https://agilemanifesto.org/13
disclaimer i dont understand css to begin with so you can discard my opinion
You have all these options for width https://developer.mozilla.org/en-US... , but guess what none of them do anything different as you brute force try them all in the chrome debugger. Dunno what cascades except my butthurt
so fuck it ~1000% width works and has an ugly overhang, but fuck front end9
Finally discovered kind of explaining something that baffled me
It really pisses me off as I've taken block scope for granted as a default thing.
I've got an open question to people in the community who know more than me, do most modern languages , scripting or not have block scope?4
please euthanize me, i fucking hate frontend and im sure it hates me back3
archaic jsp (java servlet pages) making life hard to do some fucking widget you gotta populate with some dynamic data
upgrading to a modern front end framework is not something the company is interested in doing (react, angular, whatever the hell's popular these days)
we can hack around it on the backend but we'd have to shuffle a boolean down to get used in one place at the bottom only (straightforward but ugly solution)
i hate my job and i don't know what im doing, fuck front end2
Use simple working code of an if statement and reject bad data with an error.
Get the same result but through properly using springs nested path errors. But it doesn't work so now you need to spend hours in debug hell through spring framework code for something that should be easy, is blocking another team, because I have no idea how to do my fucking job.1
When you're getting roasted and given tasks of fixing and changing some code you didn't write trying to get a PR in, and the person you paired with who wrote it has moved on to other work.
Moreover you'll be stuck taking the blame down the road if they don't fire you, as the policy is to rebase squash merged in PR's so it will all unfortunately be under your name.1