« first day (1624 days earlier)      last day (1556 days later) » 

9:09 PM
TTGH - have a great weekend
 
@Comintern Yep. Half German though. Fun fact, both of my grandfathers fought in WWII. Just not on the same side :-)
 
TFW you have a consistently reproducible bug that only happens on one particular file on one particular machine and you have no clue why.
 
my grandmother on my dads side told me (now she could be full of it and i dont know it) that we are related to en.wikipedia.org/wiki/John_Bradshaw_(judge)
 
You go back far enough and were all related.
 
9:26 PM
$("input").focus(function(){
  alert('ur screwed...');
});
Use jQuery for it.
Oops, wrong room.
 
boy did you pick the wrong guy to say "VBA doesn't do OOP" to..
Factories to the rescue - paired with a stateless default instance and a get-only interface, you get to do Dim aluminum As IMaterial: Set aluminum = Material.Create("AL", 169.34). Here's a whole Battleship game written in full-blown OOP, 100% VBA. Factory methods, adapter patterns, Model-View-Controller architecture... looks clean AF to me. the only thing VBA doesn't do is class inheritance. — Mathieu Guindon 18 secs ago
 
@MathieuGuindon Achievement-Unlocked: Trigger the Mug!
 
Walked into the C# lang design room.
 
Am I right in thinking that interfaces don't inherit though? If so, that's pretty limiting for polylmorphism in VB[A]?
 
@IvenBach "Get mugged by the Mug" seems to ring better
 
9:31 PM
like IFoo : IBar? yeah no, can't do that.
 
> Pick a side randomly and defend it to the death!
> OK, @HaloFour, I tossed a coin and it came up tails. So henceforth, I'm going to dedicate my life to arguing for optional semicolons! They are awesome and everyone who says otherwise is a jellyfish.
> Hey, what's wrong with jellyfish? They're delicious deep fried.
> Deep frying all my opponents seems a little extreme. But if that’s what it takes...
> And dipped in chili sauce. Opponents are always better dipped in chili sauce.
 
still, you can do : IFoo, IBar
doesn't limit polymorphism at all, just inheritance
 
What make it annoying is that you'll have to do the casts
One workaround is to expose a IBar and IFoo property on the class
for easy casting
 
Public Property Get AsFoo() As IFoo, Public Property Get AsBar() As IBar
neat
 
oooh, didn't even think of As fluent naming. Even better.
 
9:34 PM
@MathieuGuindon sorry yeah, poor choice of words. Makes heavy polymorphism more cumbersome.
 
somewhat... how often do we extend an interface with another in C#? and how often is it actually warranted to do so vs just taking a shortcut?
 
Heh, you haven't seen some of the c# i've had to endure over the years... ;-)
 
~sigh
 
Vogel is thinking of his Java.
 
really the only thing I'd wish for in VBA/VB6, is class inheritance. it's frustrating that there can be a Sheet1 object that's clearly inheriting a Workbook class, but user code can't do that.
 
9:38 PM
"Show Test Explorer: Ctrl+E, T"
"Add Task marker: Ctrl+E, T"
 
Now, me, on the other hand... I have the opposite problem.
Too few interfaces.
 
@Hosch250 nope... it VS
 
hopefully the coffee kind, not the language. ;-)
 
@this it's 10 pm, no more java today.
of either kind
 
9:38 PM
@Vogel612 Oh. OK. I thought that was responding to mansellan.
@Vogel612 Get a flight to Java.
 
nah, though that would be appropriate as well for some cases
 
@Vogel612 apparently Microsoft enabled the "Read-User-Mind" feature
 
Then you can have it around the clock, even in your sleep.
 
@Hosch250 gosh no, don't have the pocket change around
 
@Vogel612 You know what's good?
 
9:39 PM
now I'm envisioning a Java programmer living in Java drinking Java coffee.
 
@Vogel612 in their defence, they have a few shortcuts to configure...
 
Run tests in scope: CTRL-T,R
Debug tests in scope: CTRL-T,R
 
he's literally drowning in Java.
 
I rewired debug to CTRL-T,D
 
9:40 PM
(You can do that, you know.)
 
^^ guess which button is not clickable
 
LOL.
Does a build fix it?
Also, tweet it at them.
 
my build is bork rn, because apparently Powershell wants to be annoying to me
@MathieuGuindon ya, but almost all windows are on a Ctrl+W,* chord
of course test related windows are not. Who'd be consistent
instead Ctrl+W, T is Show Task List
which is okay, I guess...
 
The test ones aren't under the View dropdown.
 
but it's still bad...
 
9:43 PM
They are under the Test dropdown.
 
@Hosch250 yea... I know. totally discoverable ~cough
 
Caught me out for a couple years.
 
just like the Options being under "Tools"
 
@Hosch250 that screenshot is definitely @drunkvs-worthy
 
30 minutes to quit work.
And nothing to do.
Something will come up in 15 minutes, and I'll have to stay late.
 
9:45 PM
hang on... why did my build pass now?
 
@Hosch250 time to get the booze out of that desk drawer!
 
-.- up to date -> post build action not run
@this soo ... 61 failing tests. Anything I need to know before getting my hands dirty?
nice... Ctrl+Shift+T to go to file is a thing now
 
for the refactoring dialog, right?
 
yeap
 
ok, that # is a lie
you have only have .... 500?
I excluded the other unit tests in the interim
 
9:51 PM
61 f, 33 s, 3804 p, 25 i
failed, skipped, passed, ignored
 
to focus on the renaming refactor (which was the most complex one, thinking that if I got the hardest one out of the way, other would be piece of cake)
if you look at the csproj, you should see bunch of Excludes, I'm sure.
now.... the frustration is with getting the renaming mock to actually accept the change
 
ah
 
@MathieuGuindon Not looking to lose my license to a DUI.
Got an hour to drive home.
 
the way it's supposed to happen, you should have Foo renamed to Goo and the mock should reflect that change
but it just doesn't.
 
oh cool
digging in the entrails of our testing infrastructure
 
9:53 PM
Unfortunately yes
Keep in mind you're dealing wiht a mock IoC
which is a subset of our production IoC
Note also the uh.... what did I call it? one to govern how the mock should be returned by the IoC
let me find that.
oh btw, you have my permission to curse my name forever and more.
and swing an ax... preferably not within hitting distance of me.
 
You should be able to do SetupProperty maybe?
 
yes that is what the test itself tries to do
 
AutoMoqResolver?
 
but it's more involved than that
Yes, that.
 
You brought in automoq?
 
9:56 PM
it's actually AutoMoqFactorySelector you want to look at
@Hosch250 if that's a different package from Moq, no.
 
@this uhhm.... I don't see it in RubberduckTests\Refactoring\MockIoC
 
it's still the Moq, except that I'm using both Moq and CW to handle the ... mocking of the factory.
it's in the AutoMoqResolver file
the 2nd class on the bottom. (it should be its own file)
 
ah.
found it.
 
so - ok I now remember.
in the test we are using mocks, right.
now we're getting things from automagic factory.
but we need the automagic factory to return mocks
well, mocked object rather.
and we need to be able to define the behavior of the mocked objects that are returned by the code that invokes the automatic factory.
this way, the SUT is only the renaming refactoring but we go through the full CW RRR process to verify that the UI behavior is correct.
To avoid showing actualy dialogs/views, we use stubs
Make sense?
 
Can you point me to an example where the factory get set a property, but other code in the same project cannot? — trincot 3 mins ago
dude I literally just said "code against the interface"
 
10:02 PM
@this OK.
 
home time
 
note that it's an abstract class which enable us to control how it should mock the behavior.
come to think of it - I think that's where I'm stuck - getting the stub to return the correct behavior in response to SUT. Because the refactoring class (the SUT) will then check the UI on the view for result and it would be unchanged, causing it to fail the test.
 
TTQW in 10 min. Pre-posting.
So I'm ready to go out the door on the dot.
 
@this I'm pretty sure that's not how mocks work...
uhh... my brain starts to hurt
 
the stubs are for the dialog & view -- the actual UI. The refactoring class is the subject under test.
 
10:09 PM
@Vogel612 I enjoyed that humor far more than I should have.
 
We don't need to test the UI; we only need to ensure it provides the expected user response, so that the SUT is fully tested in same environment as it would have been in production.... at least that's what I thought I was trying to do.
 
yea, the issue is how you set up the UI to be injected into the SUT
 
OK.
 
if my first suspicion is correct, poor man's DI should've been sufficient for that
but I'll need to dig before I can confirm that
soo .... tea
 
OK. I might have been blindsided by the thought that if we got it running through the same pipeline that CW uses to create automagic factory, that would improve the test's coverage.
 
10:15 PM
never chase coverage
coverage is just a tool that can help nailing down bugs, if you know how to use it
 
i'm not talking about the %
 
it can also give a high-level guesstimated overview over how conclusively the project is tested
~confused
 
I'm talking more about coverage in having the same environment as the actual production has.
 
ohhh...
 
because my reasoning was that if I'm going to be using automagic factories, those should be in the unit tests, too
If the unit tests does one way of simulating the UI while the production uses other way to activate UI, then that's a big gap
 
10:18 PM
that's a bit of a red herring...
because DI is not the environment
it's a separate SUT
 
hmm. but the CW code that's involved in activating the dependencies for the SUT does have bearing?
 
no, but why should it in the first place?
CW is not part of the SUT "Rename Refactoring"
it just couples the components together in a certain way
 
because i was seeing it as the "environment" since we are using automagic factories to help activate the dependencies.
TBH, I got that idea from Nancy framework where they provide a full testing framework that ensures that the mocked browser goes through the full stack.
 
hmm ...
let me try rewriting the RenameTests with basic mocks
 
and that made sense to me since that ensure that hwen you're running unit test, you're getting the exact same environment you'd be getting when you actually run Nancy in its production environment.
OK.
 
10:22 PM
nb that I might be talking out of my backside right now, missing something that terribly breaks my assumptions
pun somewhat intended
 
11:12 PM
oh fancy that, it did install the new version of RD
its all yellowy
huh. what does the serialize button do?
 
it's a debug only thing
it's for generating declarations for diagnosis. It also will generate the snapshot & trace of COM objects that are wrapped.
you'll find the output files in the %appdata%\Rubberduck\***
 
@KySoto Push it and find out.
(it actually doesn't generate declarations anymore though)
 
It doesn't?
huh. must have missed the memo. Sworn I saw it generated when I was chasing COM leaks
 
11:27 PM
I serializes the ComProjects
When those get deserialized, the declarations are generated from the deserialized typelib objects now.
Oh crap, that's right - I need to fix a merge conflict.
 
@Comintern thanks for that comment over on SO chat =)
 
NP. People who think VBA isn't OO are tripping.
 
11:42 PM
Will git barf if I move the contents of a folder to a new location? Trying to separate things into their own folders.
This is non-RD related.
Figured it out.
 
@Comintern haters gonna hate...
But they could at least send it in the right direction. I mean... Java is right over there :-)
 
LOL
This merge sucks.
 
11:59 PM
#TIL don't do git add . unless you make sure to run git status after and check for any oddities.
 

« first day (1624 days earlier)      last day (1556 days later) »