|
GameCube posted:I've spent the past three weeks writing unit tests and every time I finish one somebody changes the functionality and doesn't update the test so I have to go fix it again. I don't think this is how unit tests are supposed to work auto-deny merge requests that have broken tests
|
# ? May 19, 2016 16:29 |
|
|
# ? Jun 5, 2024 07:53 |
|
Bloody posted:auto-deny merge requests that have broken tests then people will just delete the failing tests
|
# ? May 19, 2016 16:56 |
|
and then when it doesn't auto-deny it gives the false impression that everything's cool, when they actually added a bunch of untested logic. oops
|
# ? May 19, 2016 16:58 |
|
GameCube posted:I've spent the past three weeks writing unit tests and every time I finish one somebody changes the functionality and doesn't update the test so I have to go fix it again. I don't think this is how unit tests are supposed to work Do you have a CI server? Set that bugger to send giant flame out messages when tests don't pass and sets the person committing as the owner of that issue. For bonus efficiency and "agile"ness set up some flashing lights and/or sirens as information radiators. Unit tests work best when there can be automated public shaming.
|
# ? May 19, 2016 16:58 |
|
Assert(true)
|
# ? May 19, 2016 17:08 |
|
.NET experts, lend me your ears. When your Exception's internal reason is "An unexpected error occurred" and it's for an API, what the fuckety gently caress does that mean?
|
# ? May 19, 2016 17:08 |
|
Can you post an actual stack trace and error message?
|
# ? May 19, 2016 17:10 |
|
simble posted:Can you post an actual stack trace and error message? quote:Properties.Exception.Data.RequestError {"Reason":"An unexpected error occurred.","Code":null,"Errors":null} fgsfds
|
# ? May 19, 2016 17:33 |
|
Space Whale posted:.NET experts, lend me your ears. it means whoever wrote the code that threw that exception is a lazy bitch and you shouldn't use that api
|
# ? May 19, 2016 17:36 |
|
well i guess whoever wrote the poo poo api you're calling is wrapping useful exceptions into poo poo exceptions. gl with that. you need to ask them what the gently caress actually happens when i call your poo poo api with <your request>
simble fucked around with this message at 17:39 on May 19, 2016 |
# ? May 19, 2016 17:37 |
|
tell them simble from the internet said they're poo poo
|
# ? May 19, 2016 17:38 |
|
an ebay widget hits it for quotes to ship a FOO to the buyer by Zip How exactly does one go about catching exceptions no matter where it happens and just throwing it up to the controller to get logged? Or would I have to do try/catch in EVERY class in the chain from controller -> middle layers -> talk to the icky Database?
|
# ? May 19, 2016 17:39 |
|
i believe i have found evidence of developers committing node_modules directories to source control am i now allowed to murder them? (for the checking-in thing, not for using node in general)
|
# ? May 19, 2016 17:42 |
|
committing node_modules means that your build doesn't break when left-pad is unpublished from npm
|
# ? May 19, 2016 17:48 |
|
Plorkyeran posted:committing node_modules means that your build doesn't break when left-pad is unpublished from npm i'm seeing that there's something called "npm shrinkwrap" that fixes the versions you want to download. does that work?
|
# ? May 19, 2016 17:49 |
|
Symbolic Butt posted:then people will just delete the failing tests so also fail on coverage less than x%
|
# ? May 19, 2016 17:54 |
|
then start firing people
|
# ? May 19, 2016 17:54 |
|
prefect posted:i'm seeing that there's something called "npm shrinkwrap" that fixes the versions you want to download. does that work? no. that just saves the exact version of your deps to a file so that everyone uses the exact same versions rather than the random different versions depending on when you ran npm install, but installing those specific versions still relies on them continuing to actually exist on npm's servers.
|
# ? May 19, 2016 18:01 |
|
Plorkyeran posted:no. that just saves the exact version of your deps to a file so that everyone uses the exact same versions rather than the random different versions depending on when you ran npm install, but installing those specific versions still relies on them continuing to actually exist on npm's servers. ah, but we have an internal server that caches stuff when downloaded, so we should always have a copy of whatever's been downloaded before
|
# ? May 19, 2016 18:01 |
|
you should absolutely be using npm shrinkwrap for all js-using applications unless supporting a range of dependency versions is actually a requirement, though
|
# ? May 19, 2016 18:02 |
|
Plorkyeran posted:you should absolutely be using npm shrinkwrap for all js-using applications unless supporting a range of dependency versions is actually a requirement, though good; i will be pitching that idea at the developers as well. thanks
|
# ? May 19, 2016 18:05 |
|
why is vstest bad
|
# ? May 19, 2016 18:14 |
|
oh you literally only get code coverage if you have VS enterprise lmao gently caress that
|
# ? May 19, 2016 18:17 |
|
excellent - my test passes most of, but not all of, the time
|
# ? May 19, 2016 18:24 |
|
so far i like vs2015's test explorer thing, but my only other experience is running tests from the command line so what do i know
|
# ? May 19, 2016 18:29 |
|
i think i may have uncovered a lingering bug that i thought was fixed thanks to the power of unit testing
|
# ? May 19, 2016 18:44 |
|
simble posted:well i guess whoever wrote the poo poo api you're calling is wrapping useful exceptions into poo poo exceptions. gl with that. you need to ask them what the gently caress actually happens when i call your poo poo api with <your request> There are legitimate arguments for throwing generic faults from a service API. Any information (especially stack traces and the like) provides bad actors with all kinds of useful information when trying to hack a secured api. Basically, if you have to log in to use the API, you shouldn't be showing everyone your underwear when an exception occurs.
|
# ? May 19, 2016 18:59 |
|
Holy balls, I refactored out 1500 lines of unmitigated sql bullshit (including passing unfiltered inputs via string concatenation) and replaced it with about 100 lines of clean, easy-to-maintain EntityFramework code that fixed a whole pile of bugs. Everyone in the company is flipping their poo poo because I added the EF config section and a binding redirect to an updated MySql.Data.dll. Someone loving kill me now. I'm chain-firing email responses to every non-technical piece of poo poo complaining about having to update configs on 50 different client sites. Sorry I made you do your job, dipshits, now maybe you'll spend some time looking into a deployment solution that doesn't suck poo poo, motherfucker. gently caress I'm pissed right now.
|
# ? May 19, 2016 19:04 |
|
Bloody posted:why is vstest bad
|
# ? May 19, 2016 19:11 |
|
so any book i read is just "write unit tests and everything else is easy". how am i supposed to write unit tests for this Web Forms hellmess? only info i can find about it is just "lol, good luck"
|
# ? May 19, 2016 19:42 |
|
Appfabric caching took a poo poo and this is all a consequence of it. My first gut instinct was "something went down". I just didn't have the confidence to drop the mic.
|
# ? May 19, 2016 20:00 |
|
HoboMan posted:so any book i read is just "write unit tests and everything else is easy". if it's an existing web forms site that was written without unit tests in mind, you'd probably need do some major refactoring to split the code into actual testable units you could also build integration tests instead, but idk how practical or useful or maintainable they would be in your case
|
# ? May 19, 2016 20:09 |
|
got late confirmation on a phone interview time, wasn't able to get to a co-working space, AT&T showed me 3 bars while my interviewer called multiple times and left a voicemail so now I look like a terrible person instead of merely a terrible programmer. fml
|
# ? May 19, 2016 20:17 |
|
JawnV6 posted:got late confirmation on a phone interview time, wasn't able to get to a co-working space, AT&T showed me 3 bars while my interviewer called multiple times and left a voicemail you're not terrible because of your phone's service provider
|
# ? May 19, 2016 20:18 |
|
HoboMan posted:so any book i read is just "write unit tests and everything else is easy". Yeah, trying to unit test legacy code that wasn't built with unit testing (or really any design principles) in mind will just be a horrible waste of time. Sometimes, the only thing you can do, is implement in small bite-size chunks. For instance, you have to fix a bug with a grid view. Start by removing the backend code from the presentation layer and put it into its own data access layer (create one if it doesn't exist). Make that layer testable. The trick is that you have to have an eye to long-term health. If you'll never touch a thing ever again, then it might not be worth the refactoring.
|
# ? May 19, 2016 20:31 |
|
DaTroof posted:if it's an existing web forms site that was written without unit tests in mind, you'd probably need do some major refactoring to split the code into actual testable units what i'm hearing here is books telling me how to be a programmer have failed me again and i should put them in the trash where they belong reading: for chumps
|
# ? May 19, 2016 20:32 |
|
JawnV6 posted:got late confirmation on a phone interview time, wasn't able to get to a co-working space, AT&T showed me 3 bars while my interviewer called multiple times and left a voicemail I know you don't need the advice, but I would just call them and explain what happened. I would also say something like, "yeah, I know it sounds lame, but if you'd be willing to reschedule another interview, I'm very interested in showing you how great of a programmer I am." or some such. They either tell you to gently caress off, or they give you a new interview because you suddenly look like someone who is willing to go after the job NO MATTER WHAT and that just has go-getter written all over them.
|
# ? May 19, 2016 20:34 |
|
HoboMan posted:what i'm hearing here is books telling me how to be a programmer have failed me again and i should put them in the trash where they belong Books are important, but you always have to filter programming books through the bullshit that real-world programming entails. Most of them leave out the parts where you have to deal with incompetency in other departments, or legacy code-bases.
|
# ? May 19, 2016 20:35 |
|
Finster Dexter posted:I know you don't need the advice, but I would just call them and explain what happened. I would also say something like, "yeah, I know it sounds lame, but if you'd be willing to reschedule another interview, I'm very interested in showing you how great of a programmer I am." or some such. They either tell you to gently caress off, or they give you a new interview because you suddenly look like someone who is willing to go after the job NO MATTER WHAT and that just has go-getter written all over them. I appreciate it. yeah, I got in touch with the hiring manager and basically said this. he said we wouldn't have time for the full thing and would need to reschedule. arranged a landline for then, shot off an email to the recruiter with the same information. he rescheduled 2 days ago, so we're effectively even, but it's still a couple points marked down in the guy's head that I could've/should've avoided. not that I think I'll be a marginal candidate either way... he seemed mostly surprised I was able to reach him at all. "... and... how did you get this number?"
|
# ? May 19, 2016 20:46 |
|
|
# ? Jun 5, 2024 07:53 |
|
i am confident i have unearthed the source of my bug. thanks testing. thesting. when u design a data link that depends on backpressure to make sure it doesnt gently caress up the state of your system, make sure that backpressure actually works especially when you're somewhere around the threshold for a non-realtime (ie desktop) host to sometimes or, worse yet, usually be slow enough that the backpressure isnt needed. cuz then at some point its gonna just blaze through your poo poo and blow up your fifo or state or whatever and rip u
|
# ? May 19, 2016 20:51 |