Is clean architecture controversial?
-
@Gustav said in Is clean architecture controversial?:
In practice, once you hit 100% branch coverage you're golden.
Hmm. Yeah, when our software models of hardware hit 100% branch coverage, we only have a few thousand man-hours of work left.
-
..
-
@topspin said in Is clean architecture controversial?:
@Mason_Wheeler said in Is clean architecture controversial?:
@topspin Never heard of it.
It’s quite the saga.
https://what.thedailywtf.com/topic/27286/the-raku-programming-language/
...and I'm in that thread. Looks like I have heard of it afterall. Must have blocked out the traumatic memories.
-
@Gustav said in Is clean architecture controversial?:
Which requires a good project specification.
Funny stuff thread is
-
@Gustav How about
if (a | b | c | d)
? If you hit this line witha = True
, you've covered the branch, but you haven't (necessarily) proven thata
is being calculated correctly, and nothing whatsoever aboutb
,c
, ord
.
-
..
-
..
-
@Gustav said in Is clean architecture controversial?:
@boomzilla said in Is clean architecture controversial?:
@Gustav said in Is clean architecture controversial?:
Which requires a good project specification.
Funny stuff thread is
Riddle me this. If you don't have good specification, what do you test against?
A poorly seen and erratically moving target.
-
@HardwareGeek said in Is clean architecture controversial?:
@Gustav said in Is clean architecture controversial?:
@boomzilla said in Is clean architecture controversial?:
@Gustav said in Is clean architecture controversial?:
Which requires a good project specification.
Funny stuff thread is
Riddle me this. If you don't have good specification, what do you test against?
A poorly seen and erratically moving target.
No no no, get with the times. We call it "Agile" now!
-
..
-
..
-
@Gustav said in Is clean architecture controversial?:
The list of everything that could possibly happen in your program should NEVER be a guesswork.
You can't think of everything, at some point a user will input something that you didn't think of and unexpected things will occur.
-
@Gustav said in Is clean architecture controversial?:
You know what's funny? The problem of infinite possibilities of what the user can do with a program also only exists in theory. In practice, once you hit 100% branch coverage you're golden. And yet, you still think this theory v. practice argument works against my point, not for it.
At my last job, between user selection options, form specific options and system specific options there were over 2000 selectable options. We did a rough calculation one time of all the possible permutations and we came to a number around 5 sextillion if memory serves. A far cry from infinite sure but not practical to test either. We used some heuristics and paired it down to a few thousand that we ran tests for. I would say on average once every other release a bug would be reported related to a combination of options that we had not considered.
There was one that I recall that required 23 different options to be set for the bug to appear.
-
..
-
@Gustav said in Is clean architecture controversial?:
after you already ensured everything works.
We haven't already ensured everything works. Consider that
if
statement above and flesh it out into something more realistic. Suppose that statement is part of the next-state logic for a state machine with states A, B, C, D and E, and a bunch of inputs a, b, c, d, ...next_state = state; // Default: remain in the current state if ((state == A && ((a | b) & c)) || (state == B && (e & f)) || (state == C && ((g | h | i | j | k) & (l | m | n)) || (state == D && ((o | p) & q))) next_state = E;
If you somehow wind up in state E (and there aren't any other bits of logic that get you there), you have covered that branch. There are 20 ways to get there, and one of them works. The other 19? Just because you got to state E along one path doesn't mean you've tested all the ways you should be able to get there, much less anything else associated with the state machine.
Are the values of a, b, c, ... assigned correctly? Branch coverage won't tell whether you've tested all of them.
Does whatever is supposed to happen in state E actually happen? Branch coverage won't tell whether you've tested that. Suppose that it simply assigns values to some outputs. From the branch coverage, you can reasonably assume that you've reached state E and made the assignments (although there are coverage metrics other than branch that prove you've actually been in state E and not just made an assignment to the next_state variable, so you don't have to merely assume it). It doesn't prove you've tested the output values to ensure they're correct.
This is my bread and butter. I've been doing this for 20+ years. We use line/statement coverage (has this line/statement been executed?), branch coverage (has this if/else or switch path been executed?), expression coverage (has every input of this expression changed in a way that affects the output?), toggle coverage (has every individual bit in (this part of) the chip changed both 0–1 and 1–0?), state coverage (has every state of this state machine been entered?), transition coverage (has every path from one state to another been taken?) and functional coverage. Functional coverage doesn't happen automatically; it requires engineering judgement and effort to add coverage reporting events that represent input/state conditions necessary to test a particular aspect of a feature. The spec says that the widget should do foo when xyz happens. Create a coverage reporting event that triggers when xyz happens; if that isn't hit in the coverage report, you haven't actually tested foo, even if all the code paths have been taken.) We're not done until we have high (95%+) scores on all of these coverage metrics.
-
-
@Gustav said in Is clean architecture controversial?:
and that shows superiority of manual testing over automatic testing, system testing over unit testing, or random guesswork over specification how exactly?
I thought it was pretty clear from what I quoted of yours that I was specifically referencing your statements about 100% branch coverage being enough and 'infinite' possibilities being theoretical only.
In practice your testing space can near enough approach infinity that it can't all be tested. So you will have scenarios that are outside testing, you will have scenarios that you never thought of.
Specifically, a WADRIF scenario that's best solved by a fuzzer and a very small set of unit tests (so you can iterate through as many combinations as possible).
I have no idea what WADRIF stands for.
-
..
-
@Gustav said in Is clean architecture controversial?:
I give up. If you can't even make the connection between a sentence that starts with "specifically" and the 7 words immediately before, how can we have any conversation about advanced programming concept.
Typically if you are going to make up your own acronym in that manner you would do something like this:
"we're all doomed, resistance is futile" (WADRIF) and then there is no ambiguity.For someone harping about testing and always knowing what a program can do you don't write very clean sentences.
-
@Gustav said in Is clean architecture controversial?:
@boomzilla said in Is clean architecture controversial?:
@Gustav said in Is clean architecture controversial?:
Which requires a good project specification.
Funny stuff thread is
Riddle me this. If you don't have good specification, what do you test against?
Best guess that we made up after interpreting grunts and smoke signals from the customer.
-
..
-
..
-
@Gustav said in Is clean architecture controversial?:
wouldn't it be a written specification?
You didn't say "a written specification"; you said "a good project specification". A good specification is almost certainly written, but being written is far short of a sufficient condition for being good.
-
..
-
@Gustav You try to get the spec clarified and in the meantime test against what you've got.
-
..
-
@Gustav Maybe, but the odds are not favorable.
-
..
-
-
@Gustav said in Is clean architecture controversial?:
I don't believe you one bit. I'm sure you'd find another way to fuck up the reading, and blame it on me being not clear enough too. And if not you, then someone else. I'm on a 0-80 losing streak in communication right now. It almost feels like y'all doing it on purpose, just to drive me mad. Maybe you already did.
If you think that's bad, you clearly have never interacted with a customer before.
-
..
-
@Gustav said in Is clean architecture controversial?:
When a computer doesn't understand what I'm saying, I can start again with clean slate and make another try. Not so much around here.
Sure you can.
-
@topspin said in Is clean architecture controversial?:
I'm not sure if nobody else found @gribnit's post insightful because you think it was too obvious or if you all just don't read anything he writes, but I think this was quite fitting:
@Gribnit said in Is clean architecture controversial?:
@sockpuppet7 The argument here already has a name: the Harvard vs New Jersey approaches to engineering.
In case it's the latter: he's talking about what's known in the Unix world as Worse is Better, also mentioned here with the problem being "Big Design Up Front".
I didn't get it. I know "worse is better", but if I ever saw it referred to as New Jersey style it didn't stick because I have NFC how this paradigm relates to New Jersey.
-
I see Gustąv pulled a Levicki. Well, almost. How come it so happens to... strongly opinionated people, I wonder?
-
@Applied-Mediocrity said in Is clean architecture controversial?:
@Mason_Wheeler It's the language of the Machine Spirits.
Or the language of drinking spirits to forget that it ever touched your machine.
-
What the hell happened? I have an early night after yesterday's excitement and ye break my new toy.
-
@LaoC said in Is clean architecture controversial?:
@topspin said in Is clean architecture controversial?:
I'm not sure if nobody else found @gribnit's post insightful because you think it was too obvious or if you all just don't read anything he writes, but I think this was quite fitting:
@Gribnit said in Is clean architecture controversial?:
@sockpuppet7 The argument here already has a name: the Harvard vs New Jersey approaches to engineering.
In case it's the latter: he's talking about what's known in the Unix world as Worse is Better, also mentioned here with the problem being "Big Design Up Front".
I didn't get it. I know "worse is better", but if I ever saw it referred to as New Jersey style it didn't stick because I have NFC how this paradigm relates to New Jersey.
Im guessing not just New Jersey, but the really scuzzy bits of the state near the Hudson. (That was the first time I've seen that particular description too.)
The problem with Big Design Up Front in my experience is that it can take so damn long that there is no time to implement the design, let alone provide any sort of feedback on whether the the design satisfies the customer's requirements (probably not!) or handle any of the complexities that you discover when implementing and deploying. Adopting at least some of the techniques from Agile is wise, in that you avoid the huge dangers from general analysis paralysis. Its the more religious aspects of the methodology that are objectionable; it should just be a way of producing programs, not a way of life.
-
@DogsB Gustąv was being Gustąv again, is all. He shouted about the hobby-pony of his from the rooftops again and then got all pissy that, as far as anyone is prepared to give a damn, it doesn't survive contact with the world at large. And instead of being angry at the world he got to blaming the messengers (mind you, they were the usual pricks about it, but what else is new).
This is especially funny considering how he has been arguing in the Garage, without getting too political here, about liberties and freedoms for everyone. Whereas he himself has got all the makings of a Führer - the unyielding belief that the great unwashed just don't get it. He just hasn't had the chance. Dog forbid that he's ever going to be in charge of something big. And if he doesn't destroy himself doing something exceedingly foolish, he just might, and we'll probably hear about it.
I really feel for him. He's very intelligent, but the wisdom is just not there. And what's worse, he doesn't seem capable of it, nor capable to admit it. He also posts LTT videos, which is a clear giveaway
Now, I have neither intelligence nor wisdom. I'm just a burned out husk of a never-were. So what do I know...
-
@Applied-Mediocrity said in Is clean architecture controversial?:
Dog forbid that he's ever going to be in charge of something big.
Why not? I like big things imploding.
-
@Dragoon said in Is clean architecture controversial?:
@Gustav said in Is clean architecture controversial?:
You know what's funny? The problem of infinite possibilities of what the user can do with a program also only exists in theory. In practice, once you hit 100% branch coverage you're golden. And yet, you still think this theory v. practice argument works against my point, not for it.
At my last job, between user selection options, form specific options and system specific options there were over 2000 selectable options. We did a rough calculation one time of all the possible permutations and we came to a number around 5 sextillion if memory serves. A far cry from infinite sure but not practical to test either. We used some heuristics and paired it down to a few thousand that we ran tests for. I would say on average once every other release a bug would be reported related to a combination of options that we had not considered.
There was one that I recall that required 23 different options to be set for the bug to appear.
Usually, some of these options should be independent of each other so you have several sets of smaller groups where you test combinations, without the combinatorial explosion of testing everything with everything.
Sure, it's theoretically possible for a bug to happen only when you right-click on a green hyperlink to https in Februrary, but it's unlikely that all of this is relevant at the same time.
-
@Applied-Mediocrity said in Is clean architecture controversial?:
I see Gustąv pulled a Levicki. Well, almost. How come it so happens to... strongly opinionated people, I wonder?
He's just a tortured soul, forced to interact with us lesser beings.
-
@LaoC said in Is clean architecture controversial?:
@topspin said in Is clean architecture controversial?:
I'm not sure if nobody else found @gribnit's post insightful because you think it was too obvious or if you all just don't read anything he writes, but I think this was quite fitting:
@Gribnit said in Is clean architecture controversial?:
@sockpuppet7 The argument here already has a name: the Harvard vs New Jersey approaches to engineering.
In case it's the latter: he's talking about what's known in the Unix world as Worse is Better, also mentioned here with the problem being "Big Design Up Front".
I didn't get it. I know "worse is better", but if I ever saw it referred to as New Jersey style it didn't stick because I have NFC how this paradigm relates to New Jersey.
The answer in these cases is usually Mercury poisoning.
-
@boomzilla said in Is clean architecture controversial?:
@LaoC said in Is clean architecture controversial?:
@topspin said in Is clean architecture controversial?:
I'm not sure if nobody else found @gribnit's post insightful because you think it was too obvious or if you all just don't read anything he writes, but I think this was quite fitting:
@Gribnit said in Is clean architecture controversial?:
@sockpuppet7 The argument here already has a name: the Harvard vs New Jersey approaches to engineering.
In case it's the latter: he's talking about what's known in the Unix world as Worse is Better, also mentioned here with the problem being "Big Design Up Front".
I didn't get it. I know "worse is better", but if I ever saw it referred to as New Jersey style it didn't stick because I have NFC how this paradigm relates to New Jersey.
The answer in these cases is usually Mercury poisoning.
More like Hermes, actually, poisoning, in this case, I inherited those terms from my 4 bears.
@LaoC said in Is clean architecture controversial?:
I have NFC how this paradigm relates to New Jersey.
Me either. Probably refers to either the IBM or the AT&T labs in the mid 60s?
-
@Applied-Mediocrity said in Is clean architecture controversial?:
Now, I have neither intelligence nor wisdom. I'm just a burned out husk of a never-were. So what do I know...
As a living god, from whom intelligence and wisdom burst forth as shells of matter from a supernova, I can largely confirm your analysis here.
-
@Gribnit said in Is clean architecture controversial?:
As a living god, from whom intelligence and wisdom burst forth as shells of matter from a supernova, I can largely confirm your analysis here.
Intelligence and wisdom are constantly moving away from you? Seems cromulent.
-
-
@Gribnit said in Is clean architecture controversial?:
AT&T labs in the mid 60s?
My dad worked there... That was a cool campus.
-
@topspin said in Is clean architecture controversial?:
Sure, it's theoretically possible for a bug to happen only when you right-click on a green hyperlink to https in Februrary, but it's unlikely that all of this is relevant at the same time.
Time dependent stuff probably wasn't even included in the sextillions yet, that's another big factor if you want to consider it. I've had a unit test fail for a week in November and then go green again. Luckily there were no changes at all during that time, that narrowed it down quickly and it turned out it happened only when DST() was different from DST().
-
@dcon said in Is clean architecture controversial?:
@MrL said in Is clean architecture controversial?:
Why not? I like big things imploding.
Wow, is that a photo of secret hyperpoop trials? Didn't know we got that far.
-
@LaoC said in Is clean architecture controversial?:
Time dependent stuff probably wasn't even included in the sextillions yet, that's another big factor if you want to consider it. I've had a unit test fail for a week in November and then go green again. Luckily there were no changes at all during that time, that narrowed it down quickly and it turned out it happened only when DST() was different from DST().
Not quite what you mean, but one bug I already recalled somewhere else was due to computing an elapsed time as the difference between two "time of day" (i.e. between 0:00 and 23:59), during a process that took several hours to run.
Which meant that when a tester started a run just before going home in the evening, the next morning the test had failed because the elapsed time was unexpectedly negative, but when I immediately started it again to try and see why, it finished successfully in the afternoon.