|
Also, if unit tests are properly written, it should be very easy to figure out where any problems are occurring, instead of trying to trace down the specific broken functionality that's causing an error, especially if you have to go through a fair amount of effort just to reproduce the bug. Ultimately, rules are made to be broken, though. Adhering to ideology instead of common sense is foolish.
|
# ? Aug 23, 2016 02:30 |
|
|
# ? May 11, 2024 13:22 |
|
I like when tests fail with the message "assertion failed."
|
# ? Aug 23, 2016 02:38 |
|
Hughlander posted:You can manage that I think. Or at least prevent new ones from showing. Ahh yes! Yes you can! And I just did! ("debugging" is now my most-vouched skill. =/)
|
# ? Aug 23, 2016 03:04 |
|
This is why you're supposed to use test libraries like Hamcrest matchers / JUnit 4 (in Java) perhaps RSpec or even Cucumber in Ruby land. Something that helps a little when it fails is better for future developers on the codebase. They're a pain in the rear end to write, unfortunately, but if you're doing Java you're not used to anything sane and terse now are you?
|
# ? Aug 23, 2016 03:26 |
|
I like testing. If it's for pre-existing (legacy) code, it helps me understand what's going on more than a read through does, because I'm checking my assumptions. If it's for my own code, it proves that I've done the thing I tried to do. It becomes super annoying if I try to do them all after I write my code, so I use some form of TDD most of the time, but I'm not super strict about it. Integration tests / feature tests are more useful than unit tests, but they're harder to write properly (with isolating behavior from implementation as much as possible). I write a mix of both. As with most work strategies, opinions on testing is reactionary. When I was on a codebase with something like 88% coverage, I was annoyed by the length of time the tests took to run, especially since most of them were super basic unit tests. Oh, get_username returns a string??? You don't say! There were still bugs, and we still had to write regression tests to cover edge cases that weren't covered. However, now that I'm working on a codebase with zero tests, I'm feeling the pain of that. There are lots of functions that don't do what the name implies it should, or that have been mutated and now produce tons of side effects, possibly unintentionally (but who knows). Nothing is validated, and there's nearly zero error handling. Coming from my previous environment, it's a slow and arduous process to update any code, because there's no guarantee that any of it worked in the first place. I end up debugging old code more than writing new code. Maybe testing isn't required for seasoned veterans who know about the common mishaps and avoid them instinctively. I'm not that secure in myself yet, so I'll continue to test.
|
# ? Aug 23, 2016 12:47 |
|
For me it's a LOC thing. Beyond some point, I can't keep the whole structure in my head or know what everything should be doing. If something breaks 2KLOC, I expect it to have better documentation and tests than if it's below that. If something breaks 10KLOC without any tests or documentation, terrible things happened. I generally don't bother writing tests for projects <1KLOC. If a project has 1MM+ LOC and no tests find a new job I guess because it's not worth it.
|
# ? Aug 23, 2016 13:11 |
|
Has anyone actually gotten to the point where a non-developer is writing test specs in something like gherkin and then that becomes the functional spec? I hear fairy tales of that happening but have never even been close to it.
|
# ? Aug 23, 2016 13:27 |
|
Gounads posted:Has anyone actually gotten to the point where a non-developer is writing test specs in something like gherkin and then that becomes the functional spec? I hear fairy tales of that happening but have never even been close to it. Yep, I worked with an internal testing automation team at one gig and I successfully pitched this, where our QA was writing their acceptance criteria in gherkin and then the automation folks took that and filled out the rest of the cucumber tests. It was pretty rad.
|
# ? Aug 23, 2016 13:51 |
|
Were your automation folks the engineers implementing the features, or a team after?
|
# ? Aug 23, 2016 14:04 |
Ever since the day automated testing "clicked" for me, I don't see how it's possible to write a reasonably sized application without proper testing. It's so much simpler than having to manually test everything, and you can be so much more confident in your code when you have a suite of tests that make sure that it runs at least approximately correct. Plus, just the act of testing helps me critically examine my work and find little bits that I missed while developing. It also makes refactoring orders of magnitude easier
|
|
# ? Aug 23, 2016 14:04 |
|
Gounads posted:Has anyone actually gotten to the point where a non-developer is writing test specs in something like gherkin and then that becomes the functional spec? I hear fairy tales of that happening but have never even been close to it.
|
# ? Aug 23, 2016 14:52 |
|
necrobobsledder posted:I've heard of program managers writing down contractual deliverables while a lawyer helps consult on the meaning, and the results of those notes turn into functional requirements that turn into Cucumber tests (because it works with Java). But I also heard they stopped doing it not because it wasn't effective but because the lawyer to help translate the legalese was getting too expensive (yes, the lawyer was paid more than the PM and two engineers by a significant margin, welcome to enterprise). I can't quite tell, is that sarcasm?
|
# ? Aug 23, 2016 15:12 |
|
I saw somebody put into his test plan that he was going to test a certain class, probably because he saw it in the diff, but I jumped in and said, "You don't need to test this; the change is trivial and the compiler already verified it by not blowing up." He proceeded to approve the project, so I deployed it to Test, where he repeated the same steps and closed the issue. Then, a few minutes later, edited into his closing comment that he tested that class.
|
# ? Aug 23, 2016 15:23 |
|
necrobobsledder posted:I've heard of program managers writing down contractual deliverables while a lawyer helps consult on the meaning, and the results of those notes turn into functional requirements that turn into Cucumber tests (because it works with Java). But I also heard they stopped doing it not because it wasn't effective but because the lawyer to help translate the legalese was getting too expensive (yes, the lawyer was paid more than the PM and two engineers by a significant margin, welcome to enterprise). You also can't ask a lawyer to stay longer on a friday evening to crunch for a release deadline, he is a professional. (edit: or she)
|
# ? Aug 23, 2016 17:10 |
|
necrobobsledder posted:I've heard of program managers writing down contractual deliverables while a lawyer helps consult on the meaning, and the results of those notes turn into functional requirements that turn into Cucumber tests (because it works with Java). But I also heard they stopped doing it not because it wasn't effective but because the lawyer to help translate the legalese was getting too expensive (yes, the lawyer was paid more than the PM and two engineers by a significant margin, welcome to enterprise).
|
# ? Aug 23, 2016 17:17 |
|
Gounads posted:I can't quite tell, is that sarcasm? I've seen pure, crystalized bureaucracy so many times in DoD contracting that I don't even question dumbass stories involving only a couple millions of dollars lost, only when someone attaches about 8 zeros do I start giving a crap about whether it might be serious or not. I mean hell, when DHS literally builds a 10-story building for $50MM, uses it for a week to train some random new-hires and give some media presentations, and abandons it despite all the other millions on planning you know it's all just a public works project anyway. Beef posted:You also can't ask a lawyer to stay longer on a friday evening to crunch for a release deadline, he is a professional. Vulture Culture posted:I don't understand why they didn't just cut the lawyer out of this process
|
# ? Aug 23, 2016 20:44 |
|
Gounads posted:Were your automation folks the engineers implementing the features, or a team after? Automation was basically back filling, so they were mostly filling out the rest of the tests to work against what was there. New features were built out by development where the gherkin would need to be passing in order to mark a story as complete. In this way it was nicely separated, with QA writing out gherkin, development building out new features to pass gherkin specs, and automation making sure old features were covered.
|
# ? Aug 23, 2016 23:07 |
|
Gounads posted:Has anyone actually gotten to the point where a non-developer is writing test specs in something like gherkin and then that becomes the functional spec? I hear fairy tales of that happening but have never even been close to it.
|
# ? Aug 23, 2016 23:17 |
|
Sure sure. Unless your company is rolling out a replacement for their old platform (that handles billions in revenue) and the new platform doesn't even have a product manager, so there's nobody to get all those people in the room. So QA just writes gherkins that sort of match something that could be expected, but the debts change the error messages every other week, and aren't actually aware of what QA is writing, so the tests are always failing.
|
# ? Aug 25, 2016 14:46 |
|
leper khan posted:If something breaks 10KLOC without any tests or documentation, terrible things happened.
|
# ? Aug 26, 2016 00:23 |
The Leck posted:Yeah, I've run across this. In a single class.
|
|
# ? Aug 26, 2016 13:29 |
|
How do you get up to 10KLOC in a single class unless your design is extremely subpar?
|
# ? Aug 26, 2016 17:28 |
|
Is that some sort of riddle?
|
# ? Aug 26, 2016 17:29 |
|
PT6A posted:How do you get up to 10KLOC in a single class unless your design is extremely subpar? The answer is probably Minecraft modding. I saw a crash before from a class that had more byte code than the JVM allowed. In a single method.
|
# ? Aug 26, 2016 19:28 |
|
PT6A posted:How do you get up to 10KLOC in a single class unless your design is extremely subpar? You answered your own question.
|
# ? Aug 26, 2016 19:35 |
|
Che Delilas posted:You answered your own question. Still, a 10KLOC class would seem to be the fruit of actual, purposeful commitment to terrible design, instead of something that just happens because no one was paying attention.
|
# ? Aug 26, 2016 20:18 |
"I don't really know what classes are or how object-oriented programming works so I have one giant class named 'Program' and everything is inside it."
|
|
# ? Aug 26, 2016 20:32 |
|
PT6A posted:Still, a 10KLOC class would seem to be the fruit of actual, purposeful commitment to terrible design, instead of something that just happens because no one was paying attention. "gently caress it, I'm not fixing that mess, I'm just getting in and out with my bug fix as fast as possible. Hopefully I am no longer here when the whole thing implodes."
|
# ? Aug 26, 2016 21:12 |
|
PT6A posted:Still, a 10KLOC class would seem to be the fruit of actual, purposeful commitment to terrible design, instead of something that just happens because no one was paying attention. You've never seen a math/physics PhD with one CSC101 course under their belt getting paid big bucks to write financial software? Cause that's how that happens, at least in my personal experience.
|
# ? Aug 26, 2016 21:26 |
|
Skandranon posted:"gently caress it, I'm not fixing that mess, I'm just getting in and out with my bug fix as fast as possible. Hopefully I am no longer here when the whole thing implodes." This; this is the correct answer. - Some idiot creates a gigantic class of poo poo. - Idiot leaves - New guy gets stuck with gigantic class and BUGS ARE AFFECTING PRODUCTION!!!1!!! - New guy never gets enough time to actually fix the class. goto 1 FlapYoJacks fucked around with this message at 21:38 on Aug 26, 2016 |
# ? Aug 26, 2016 21:36 |
|
Error: "1" not defined
|
# ? Aug 26, 2016 22:26 |
|
I kicked a bunch of stuff back to the junior on the team that didn't pass code review. I do the same thing every week when i see him walking around the office and basically goofing off, "hey, could you do me a favor and make sure all the branches you wrote are production ready?" Always says yes I get the branches and its not dry, the test coverage is poor and its taken way too long to get even to this point. He seemed bummed out that half his stuff went back, but this stuff is sure as poo poo not getting into production, my dude. Start implementing best practices more often. The frustrating part is that I keep asking him if his stuff is all gonna pass review and he always says yes but then I see it and its like, dude you made a Rails 101 mistake on the first page wtf is your deal.
|
# ? Aug 26, 2016 22:29 |
|
I'm pretty sure our new product owner is just faking his way through Agile. He accepts stories without verifying them and he wants to have an IPM on an ad hoc basis as needed. And keeps confusing the ice box and back log. Help me.
|
# ? Aug 26, 2016 23:36 |
|
what is an ice box?
|
# ? Aug 27, 2016 02:16 |
|
Pivotal Tracker has an icebox section that I've used for stories as a suggestion box before triage and can still be rejected. That's the only usage of an icebox I've seen in my agile project planning tools anyway.
|
# ? Aug 27, 2016 03:16 |
|
PT6A posted:How do you get up to 10KLOC in a single class unless your design is extremely subpar? Android PackageManagerService.java 20,935 loc There's some fun stuff in AOSP
|
# ? Aug 27, 2016 04:52 |
|
Gul Banana posted:what is an ice box? We always used the icebox as the "we want to make sure everyone's ideas are heard and captured" but until they were promoted to backlog or better they did not get done. Theoretically our PM was supposed to review anything added to the icebox and promote the useful things, but that also never happened. I have worked on a lot of teams that had four devs and fifteen "top priority, in progress" stories though, so take everything with a huge grain of salt.
|
# ? Aug 27, 2016 13:22 |
|
necrobobsledder posted:Pivotal Tracker has an icebox section that I've used for stories as a suggestion box before triage and can still be rejected. That's the only usage of an icebox I've seen in my agile project planning tools anyway. Yeah, I guess it is a Pivotal Tracker invention. In our case, anyone can add stories and bugs to the icebox but only the business owner can move them to the actual backlog and prioritize them.
|
# ? Aug 27, 2016 13:26 |
|
ah. we use a "submitted" state for that
|
# ? Aug 27, 2016 14:50 |
|
|
# ? May 11, 2024 13:22 |
|
ratbert90 posted:This; this is the correct answer.
|
# ? Aug 27, 2016 15:52 |