« first day (1867 days earlier)      last day (1313 days later) » 
00:00 - 18:0018:00 - 00:00

6:05 PM
@Duga installed FIRST!!!!
 
inner script kiddie escapes momentarily
 
> > When I have searched the Rubberduck source for references it seems to be an easter
egg status (?). As far as I can tell it triggers if there are more than 11
failures in a test, but I might be wrong.

That is correct... the idea being that a useful unit test should `Assert` one thing, i.e. have no more than a single reason to fail.

I'm not against discarding it, but I would think implementing data-driven tests (ref. #3699) would be a better approach than using `Assert` in a loop. Of c
> > When I have searched the Rubberduck source for references it seems to be an easter
egg status (?). As far as I can tell it triggers if there are more than 11
failures in a test, but I might be wrong.

That is correct... the idea being that a useful unit test should `Assert` one thing, i.e. have no more than a single reason to fail.

I'm not against discarding it, but I would think implementing data-driven tests (ref. #1229) would be a better approach than using `Assert` in a loop. Of c
> > When I have searched the Rubberduck source for references it seems to be an easter
egg status (?). As far as I can tell it triggers if there are more than 11
failures in a test, but I might be wrong.

That is correct... the idea being that a useful unit test should `Assert` one thing, i.e. have no more than a single reason to fail.

I'm not against discarding it, but I would think implementing data-driven tests (ref. #1229) would be a better approach than using `Assert` in a loop. Of c
> > When I have searched the Rubberduck source for references it seems to be an easter
egg status (?). As far as I can tell it triggers if there are more than 11
failures in a test, but I might be wrong.

That is correct... the idea being that a useful unit test should `Assert` one thing, i.e. have no more than a single reason to fail.

I'm not against discarding it, but I would think implementing data-driven tests (ref. #1229) would be a better approach than using `Assert` in a loop. Of c
 
6:27 PM
sorry
would be nice to have @Comintern weight in on that one
 
where did Comintern disappear to?
haven't seen him around for a while
 
nobody knows. last year he disappeared for a while, and returned talking about a crazy NDA
we're all hoping it's the same crazy NDA terms
 
I'm pretty sure he's somewhere in a tux, driving a fast sporty car with 2 women in his arms, evading some evil villain bent on world dominion, and drinking a stirred martini meanwhile.
5
 
@this if only he could confirm
lol
 
6:31 PM
He could but then he'd have to kill you.
 
well that's true.
 
My name's Intern. ComIntern.
(doesn't work but what you gonna do...)
 
Isn't it The name's?
or am I misremembering?
still, good laugh
 
seems both were used
 
weird good to know
 
6:34 PM
Apparently the Bond writers weren't consistent.
(I wonder if Ian himself was inconsistent, too)
never read any Bond books, though.
 
> Hmm, well, having some sort of way of supporting DDT would obviously help, but it seems to me like you are adding unnecessary restrictions to dictate how people use your tool.

I agree that in a perfect world with perfect code a unit test should test one thing, hence the name, but sometimes, when your code isn't perfect, you rather go for testing one concept that feels small enough that the test makes sense. Say 10 conditions you feel like should be fulfilled in one scenario, and these 10 th
 
'@SuppressSpectularFail?
 
he's completely right IMO
 
As I recall, one reasoning for the easter egg that Comintern put in was because tests shouldn't be asserting more than once
 
> Hmm, well, having some sort of way of supporting DDT would obviously help, but it seems to me like you are adding unnecessary restrictions to dictate how people use your tool.

I agree that in a perfect world with perfect code a unit test should test one thing, hence the name, but sometimes, when your code isn't perfect, you rather go for testing one concept that feels small enough that the test makes sense. Say 10 conditions you feel like should be fulfilled in one scenario, and these 10 th
 
6:43 PM
Besides, there's the problem of asserting evaluating the entire result, rather than exiting prematurely as soon as something fail
 
@this yeah that was is - except by doing that we are dictacting how people should use our tool
 
while that is true, we are also modeling best practices, no?
 
yeah but there's a blog for that :)
 
so if they say "I know but I can't because I have this crappy junk code", they can just suppress it
 
kind of like we're not restricting where @DefaultMember ought to be
 
6:45 PM
granted but that has more to do wiht the fact that it's very hard to put this in a simple algorithm
 
it's the job of inspections to tell our users their code is doing something weird
 
e.g. we'd have to know that a Item is a member of a class that represents a collection
which is not trivial
 
VB.NET simply throws a compiler error if Default is used on a parameterless member
which is trivial ;-)
 
I see
 
6:47 PM
but we're digressing, though - the question si whether we should encourage users to explicitly suppress the easter egg
as opposed to staying silent about them not adhering to best practice
 
I think the easter egg is harmful
it's hiding the reasons for the test failure
 
the way I see it, if we have a '@AllowTestRepeat, it is also a good signpost that refactoring is needed
and yes, I agree that the easter egg in its current form is harmful
 
I'd rather have @TestCase
 
? but that doesn't address the imperfect test scenario?
 
a code quality inspection could address that
 
6:49 PM
yes I think we agree - this needs to be re-made into a code quality inspection
 
complete with its dedicated explanatory details page on the website
 
and i guess that also enables us to support @Ignore TestCaseNotUsed
which still serves the signpost function
Yes, I think I like that better.
 
uh oh, let's start over.
1) we agree that easter egg in its current form is harmful and has to go. However, it did serve a function which is a code quality issue.
 
6:51 PM
2) we agree that we should make a new inspection... could be TestCaseNotUsedInspection
which alerts for loops used in tests
 
wait
oh
just a misnommer then
I'd go with MultipleAssertsInspection
 
so they are encouraged to use @TestCase instead of looping in a test
OK
that's fine
 
and in that case where they are stuck with some loop because of crappy legacy code
 
yeah that works
 
6:52 PM
they annotate @Ignore MulitpleAsserts (?)
 
I suppose
 
then when they refactor, it's easy to find those imperfect tests.
(I never can remember whether the @Ignore annotation uses full name or without the -Inspection suffix)
 
and the xml-docs would include examples showing how a multiple-asserts-in-a-loop test can be turned into a test-case-driven parameterized test
 
Exactly. Win all around.
 
@this it's without the Inspection suffix
yay!
 
6:55 PM
as God as my witness, I thought turkeys could fly
Yeah, it's not Thanksgiving, but a question on Aviation got me thinking about that. Always worth a watch...
 
> Ok, so dev chat recap:

- Easter egg test outcome in its current form is harmful and needs to be removed;
- `@TestCase` annotation and adding support for parameterized test methods needs to be added;
- A new inspection would be flagging tests with more than a single `Assert` call, and/or tests that `Assert` in a loop. The inspection's xml-doc and meta-description would justify the result with the widely-accepted best practice of single test == single assert, and code examples would illustr
> Ok, so dev chat recap:

- Easter egg test outcome in its current form is harmful and needs to be removed;
- `@TestCase` annotation and adding support for parameterized test methods needs to be added;
- A new inspection would be flagging tests with more than a single `Assert` call (excluding `Assert.Inconclusive` and `Assert.Fail`), and/or tests that `Assert` in a loop. The inspection's xml-doc and meta-description would justify the result with the widely-accepted best practice of single te
 
@Duga Assert.Fail is in the template for cleanly failing an errorring test; Assert.Inconclusive is used for validating the test setup.
 
7:29 PM
> Sounds great. I did a bit of reading and couldn't find any good arguments for single test == single asserts, isn't it better to test concepts than semantics? Sure, you should test one thing, but that one thing will in many cases be much more readable if it is done with multiple asserts. E.g. testing if a value is between a range is much more readable by testing two less than asserts than one big logic blob. Oh well, this is not the place for these discussions and if you make it an inspection c
 
7:40 PM
> - [Official Microsoft guidelines](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-best-practices#avoid-multiple-asserts) "When writing your tests, try to only include one Assert per test."
- [Some stackify blog post](https://stackify.com/unit-testing-basics-best-practices/) (no direct link to the "best practices" section) "I won’t go so far as to say that no test should ever contain a number of assertions other than one. But I will say that your unit test suite should have
> But you also have [this](https://softwareengineering.stackexchange.com/questions/7823/is-it-ok-to-have-multiple-asserts-in-a-single-unit-test) pretty popular stackexchange post where almost every post agrees that they do multiple asserts in an effort to test one feature/behaviour. One assert just seems like a really unnecessary restriction that doesn't necessarily correlate with what you want to achieve, testing one behaviour.

Again, it seems like something to strive for because striving fo
 
8:05 PM
> I think the Stackify article says it best: "Unit testing newbies commonly make a mistake of testing all of the things in one test method." -- basically the "one test, one assert" guideline is there to remind beginners that the *Single Responsibility Principle* also applies to test methods, so that when a test fails, it's immediately apparent why.

The accepted answer on that SE thread also puts it nicely:

> but I do think we should **strive towards** only having single asserts in our test
> But you also have [this](https://softwareengineering.stackexchange.com/questions/7823/is-it-ok-to-have-multiple-asserts-in-a-single-unit-test) pretty popular stackexchange post where almost every post agrees that they do multiple asserts in an effort to test one feature/behaviour. One assert just seems like a really unnecessary restriction that doesn't necessarily correlate with what you want to achieve, testing one behaviour.

Again, it seems like something to strive for because striving fo
> But you also have [this](https://softwareengineering.stackexchange.com/questions/7823/is-it-ok-to-have-multiple-asserts-in-a-single-unit-test) pretty popular stackexchange post where almost every post agrees that they do multiple asserts in an effort to test one feature/behaviour. One assert just seems like a really unnecessary restriction that doesn't necessarily correlate with what you want to achieve, testing one behaviour.

Again, it seems like something to strive for because striving fo
> I agree, sorry, didn't mean to argue, I can get quite passionate on discussing rules for best practices as I feel like they should be guidelines and not rules quite often.

Anyway, reading through what I say I totally agree that the inspection should be there, and I was in essence mostly arguing about whether it should be turned on by default or not. This is obviously not something I should really have strong opinions on as it is very easy for me as an (overly) opinionated user to switch tha
 
8:31 PM
> @Irubataru thanks for your invaluable input, and keep that passion burning!

> You know much better than I do what is best for your users

Not necessarily. The balance is very delicate between *promoting* best practices, and *shoving them down users' throats* :wink:
 
8:47 PM
@Duga <chant>Shove shove shove!</chant>
Couldn't resist. Was in a meeting and needed to release excess snark somehow.
 
@IvenBach I feel that meetings normally lead to excess snark.
 
All things considered, it was a good meeting. Not really applicable to my work though. :+1: for a lunch however.
 
9:16 PM
> Rubberduck has always been a pretty opinionated tool. I suspect it will stay that way until it becomes absolutely clear that no one is going to step up and create an alternative. That is life.

@retailcoder in regards to data driven tests, can we think about how we might implement them so the user has compiler assistance? I like the annotation as a first step, but it’s not as friendly as it could be. I’ll be honest, I don’t really know how we’d do that. I recently helped a friend implement
 
I need to #Breathe. I get to spearhead cyber security training and awareness. I guess that's a good thing. Unless all I really want to do is code.
 
> Rubberduck has always been a pretty opinionated tool. I suspect it will stay that way until it becomes absolutely clear that no one is going to step up and create an alternative. That is life.

@retailcoder in regards to data driven tests, can we think about how we might implement them so the user has compiler assistance? I like the annotation as a first step, but it’s not as friendly as it could be. I’ll be honest, I don’t really know how we’d do that. I recently helped a friend implement
> @rubberduck203 the `@TestMethod` annotation is already parameterized and takes an optional "category" argument, so DDT will require a new annotation; I like `@TestCase` , with the arguments matching the signature of the test method.

It could look like this:

```vb
'@TestMethod("test category")
'@TestCase(1, "foo")
'@TestCase(0, "foo")
'@TestCase(-1, "foo")
'@TestCase(1, "bar")
'@TestCase(0, "bar")
'@TestCase(-1, "bar")
Public Sub SomeTestMethod(ByVal arg1 As Long, ByVal arg2 As St
 
do we get compile-time validation of test cases in NUnit?
I think not.
(at least not beyond verifying that the attribute is well-formed)
My hunch is that it's probably easier to just hijack the Compile menu so that RD can "compile" its annotations to offer a compile-time validation of the annotations which would satisfy Chris' concerns.... (if I understood him correctly)
 
> My initial thought is that what if you have a prime generator and have a lookup for say the first 1000 primes and want the test to just run through all of them as a dummy just to be sure? Or in my case I have a random user input generator to try to catch some scenarios I can't think of myself and want to run this 10000 times to see if I am missing something.
> I would say that the question of a random data generator is a separate question from the question of data driven test. That definitely needs its own issue & discussion, apart from this one here.
> I think allowing parameterized tests with the parameter values supplied by an annotation is a good first step towards enabling data-driven tests. Further enhancements could include adding a `@TestCaseSource` annotation that can be substituted to a plethora of `@TestCase` annotations to load the test cases from a file with a specified format - but the first step is really to just enable parameterized tests.

> *The only way to eat an elephant, is one bite at a time.*
> > @retailcoder in regards to data driven tests, can we think about how we might implement them so the user has compiler assistance?

Looking at NUnit as an example, the only compile-time validation we get is whether the attributes are well-formed. I doubt those will get flagged as a compile-time error:

```
[TestCase("ha ha I am a number!", 42)]
...
public void derp(int someNumber, string someString)
```

But I appreciate the desire to have compile-time validation of the `TestCase a
> hm, I'd just make it an inspection - it's not really different than any other IllegalAnnotation IMO.
 
9:35 PM
@Duga backtick issues? ;-)
 
 
> > @retailcoder in regards to data driven tests, can we think about how we might implement them so the user has compiler assistance?

Looking at NUnit as an example, the only compile-time validation we get is whether the attributes are well-formed. I doubt those will get flagged as a compile-time error:

```
[TestCase("ha ha I am a number!", 42)]
...
public void derp(int someNumber, string someString)
```

But I appreciate the desire to have compile-time validation of the `TestCase a
> > @retailcoder in regards to data driven tests, can we think about how we might implement them so the user has compiler assistance?

Looking at NUnit as an example, the only compile-time validation we get is whether the attributes are well-formed. I doubt those will get flagged as a compile-time error:

```
[TestCase("ha ha I am a number!", 42)]
...
public void derp(int someNumber, string someString)
```

But I appreciate the desire to have compile-time validation of the `TestCase`
 
@MathieuGuindon #BacktickFailure
 
@this I imagine the bacteria helped, LOL.
 
thanks
 
9:36 PM
@this I question the consumability of the whale meat after the first meal.
When that things intestines burst it must have been a hell of a mess to clean up.
 
> > I would say that the question of a random data generator is a separate question from the question of data driven test. That definitely needs its own issue & discussion, apart from this one here.

Agreed, but wouldn't it to some extent be useful if you could find a solution that solves both DDT and some sort of data generated testing (not entirely sure what this paradigm is called when you have computer generated input with bounds for validity).
> > I would say that the question of a random data generator is a separate question from the question of data driven test. That definitely needs its own issue & discussion, apart from this one here.

Agreed, but wouldn't it to some extent be useful if you could find a solution that solves both DDT and some sort of computer generated testing (not entirely sure what this paradigm is called when you have computer generated input with bounds for validity).
 
@IvenBach maybe Ms. Mae had a stomach made of steel?
and no sense of taste?
@Duga I think the keyword is compile-time (e.g. not "parse-time")
 
Heh, feature-request: Gherkin-based BDD test, like SpecFlow
(j/k!)
 
FWIW I'm not sold on the idea of generating [temporary?] code from comments
 
this kind of tie into Hosch's old incomplete PR for keeping on parsing beyond first error
No, I don't think it's necessary and shouldn't be generating any code.
Just validating the well-formedness of the annotation is really enough.
 
9:42 PM
Comments -> code sounds like trouble...
 
um, what is an annotation, then? ;-)
 
taking annotation params and turning them into test args is as far as I'm willing to go, and that's only because the alternative is a massive can of worms that will take forever to implement.
I really don't like the idea of executable comments
 
Me neither.
That's a bit too much like C/C++ macros
which we all know how great they are.
but checking well-formedness of annotations seems reasonable enough.
 
9:45 PM
I just realized - we don't have to hijack the compile buttonf ro that either
just listen for cursor movement away from a line, check if it's an annotation, then parse that.
 
I'll leave it up to you disappoint Chris, then. ;-)
 
I'd really go with an inspection - that way if/when we ever get the results into the code panes, we can have red squiggles under the annotation with a "test case mismatches test method signature" tooltip
 
that presume we solve the bigger problem of making parsing/resolving/inspecting go faster or at least async.
and frankly I don't see that coming before custom panes.
 
which I'm not seeing coming before extract method
;-)
 
9:49 PM
lol
 
but why would custom panes need EM in place?
 
because unicorns :-)
 
they're vastly easier to eat than whales, I suppose.
 
yay, I got PR comments. I knew I'd derp something up. RD is fantastic for learning :-)
something many things
 
9:55 PM
@this just because... v1.4.3 had a semi-working EM refactoring and no custom code panes...
 
fair enough
 
@mansellan Yes. Yes RD is.
 
> Also (sorry for double posting), I am looking at solving the titular issue, i.e. "Unit testing with for loops", and there are generally four scenarios where I find myself doing that:

1. When I have a large lookup table of the results (sure, I could run a regex on it to generate test cases, but that isn't exactly ideal)
2. When I am simply replacing a `SequenceEquals` because it is easier to check the elements individually than create arrays that this method accepts, or if I only want to ch
 
10:12 PM
@IvenBach You've done great, and starting from an earlier spot than me. C# has gotten more complex over the years, when I first used it in v2 there were far fewer abstractions.
But no matter what stage one is at, contributing to a (well-run) OSS project can help one get better.
 
I'm really grateful for all the patience from everyone else as I've learned and continue to learn.
 
seconded!
Question: do we want to expend any effort at all supporting Office Developer Edition? Let me qualify that - ODE is Office + a very small subset of VB6. Support would likely just consist of making some VB6 commands available.
But I ask because it's been discontinued since forever (even though you can hack it back to life with a reg key...)
Actually, let me rephase... If I PR'd some small change that recognised its existence, would it be merged?
 
10:27 PM
I don't follow - why would RD would be affected by existence or non-existence of ODE?
 
Example - ODE lets you add standalone projects. I'm contemplating a feature-request to add 'Add Project' to the VB6 context menu. That could also be exposed to ODE.
ODE adds stuff to the File menu
Another example - CE Add - for ODE standalone projects it can also include "ActiveX designer"
 
Ok, I follow now. I odn't see why not
 
ok cool. Not because I expect many to use it, more because there's bits of the wider OM that we're ignoring atm. Sets off my OCD ;-)
Wonder if a blog post on "How to get Office 2019 Developer Edition" would be appropriate (or legal!) Would basically be 1) Buy ODE 2000 or XP. 2) Install it in a VM 3) Find this reg key 4) Copy it to your Office 2019 machine...
But realistically that might just make people skip step 1, 2 and 3 and google the key value...
So... probably a bad idea.
 
My main concern is with support, given few of us have an ODE install on hand
Is identifying ODE vs non-DE somewhat trivial?
@mansellan wait that works??
 
Not sure, haven't checked. Looks like Office just checks for the reg key at startup (and must validate it too).
@MathieuGuindon Yep. one reg key with a license value.
Well, in 2016 at least. Haven't checked 2019.
They never removed the ODE code.
I was amazed too...
If you want the full horror, you have to regsvr all the "great" wizards they supply. But just one key lights up all the extra menus in the VBE.
 
10:44 PM
@mansellan I'm kinda torn on whether I should share this finding with the Excel team or not...
 
@MathieuGuindon suspect they already know?
 
suspect it's buried in a place nobody went for over a decade?
 
I may be the first person to discover this. Can't imagine many went looking.
 
TBH given how a smashing success it was, I would say it's more of apathy.
If there was really a demand for those features, they would have had cracked it long ago.
 
10:47 PM
Proof that the VBE has been ignored by MS since forever. The "check for license key" would have been in 2000 and XP. So the easiest way to discontinue was just to stop shipping an SKU that set that key.
"That'll do"
 
Saying that, I have to honestly wonder why standalone projects didn't get any tractions back then.
I mean, c'mon, didn't anyone find value in being able to ship VBA in a DLL?
 
AFAIK the price for ODE was ridiculous. You'd do better to buy Office and VB6, and get everything and more.
Well, except some of the aforementioned "great" wizards...
 
Yep IMNSHO, that's why ODE was such a smashing success
and I think you just answered my question
doing it in VB6 made more sense
 
What changed is now that VB6 is dead while VBA isn't.
So all of sudden there's more value in VBA DLL
 
10:49 PM
The wizards look like a bored intern threw them together in an afternoon.
Oh btw, you still want me to send you my copy of ODE 2000? I have XP now, so don't need it.
Less interesting since it seems it doesn't compile 64-bit, that would have been a game-changer.
But perhaps I missed something...
 
oh sure!
OK
wow, gmail parsed that automatically
better delete that if you don't want spams...
 
uh, too late...
@MathieuGuindon can you delete?
 
flag it and a mod will delete it
 
done
 
not sure mat has that privilege (IDK if a owner gets to do that or if that's a mod-only thing)
 
10:57 PM
boom!
 
:thumbsup:
it's a bit unnerving to see how useless the spelt out address is now
 
I don't follow?
 
I shouldn't be surprised but it kind of sucks because that means it's too easy to harvest for spams
 
oh I see
yeah, better obfuscation needed these days :-)
 
i'm referring to the fact that gmail had no trouble parsing the xxx (at) yyyy (dot) com
and made it into a xxx@yyy.com without me having ot fix it.
fortunately, that's only a problem when you have emails on a website, where a evil robot might harvest.
IDK if they have robots harvesting chats but I would think so
 
11:00 PM
oh, I imagine they harvest everything...
got your mail, will ship at the weekend
 
i'm also wondering if there's really any safe way to share emails or passwords eletronically.
normally when I do that, I send an screenshot
 
@mansellan only mods can
 
(usually the case w/ passwords)
but any OCR software can easily parse it.
 
@MathieuGuindon fair enough. they were lightening quick :-)
@MathieuGuindon heh, maybe if you did, they might resurrect it, and add 64-bit?
#dreaming
Either that, or push a forced update that nerfs it completely :-)
 
i can see nerfing happening
primarily to plug any ptoential security holes. :\
 
11:07 PM
you misspelled "ostensibly" :-)
 
lol
 
00:00 - 18:0018:00 - 00:00

« first day (1867 days earlier)      last day (1313 days later) »