« first day (1152 days earlier)      last day (2028 days later) » 
00:00 - 19:0019:00 - 00:00

7:02 PM
@ChrisB hello! I grew tired of the too long feedback loop, so I setup AppVeyor to not only build & run the tests on every PR merge, but now also to package an installer for that build and automatically create a new tag for it.
So yeah, it's not 2.1 "stable", but if you want to help with ironing out the wrinkles (e.g. reporting issues of the current build), now you can, without cloning the project and building it yourself!
 
@shadowofsilicon Unfortunately it will stop working if they fix the bug where the JSON is returned to the webpage.
 
@shadowofsilicon phone, but yeah
 
@Mat'sMug So, I implemented your advice from yesterday, but the test still isn't working. I think I need to verify that the ExportSourceFiles method triggered inside the project inside the mock VBE, like this:
vbe.Verify(c => c.ActiveVBProject.ExportSourceFiles(@"C:\Users\Rubberduck\Desktop\ExportAll\"), Times.Once);
 
sighs and kicks the ball around the bureaucracy
 
@shadowofsilicon the string needs to be identical - I'd use a variable here, the same you're setting up the mock folder browser to return with (not a string literal)
 
7:07 PM
I'm now on my fourth contact person for getting SHOWPLAN SSMS permission added so that analysts can use the built-in tools for improving their own queries....
 
could be just the trailing backslash
 
@Mat'sMug I'll convert it but it looks the same
 
Try with It.IsAny<string>()
 
Check the debugger and copy the exact value.
 
@Mat'sMug Nope. Didn't work with any string
 
7:10 PM
@Mat'sMug Got it. Thanks!
 
@shadowofsilicon I don't think you're verifying the right thing
You want to call verify on your mocks
and you don't want the test to actually export anything either
...and you don't want to be testing the mocks themselves
#TestingIsHard
First, is there an interface that wraps up the code that implements the actual export?
That's what you need to mock
If that code also happens to be the code you want to test, you need to refactor a bit
 
ExportSourceFiles is a method of IVBProject
 
Happy happy joy joy Tons of pieces coming together today. #WhyCantEveryDayBeLikeThis
 
Ok so you need a Mock<IVBProject> somewhere. IIRC that is exactly what the MockParser is giving you
 
` var project = projectMock.Build();` ??
 
7:17 PM
yeah
That class needs some additional setup for the ExportSourceFiles method
 
still fails with project.Verify(c => c.ExportSourceFiles(It.IsAny<string>()), Times.Once);
 
Because ExportSourceFiles is never setup
Moq will only track what it's setup to track
 
SMH... that explains the No setups configured. message in the execption lol
 
Doesn't it! ;-)
 
um okay, how do I set that up?
 
7:20 PM
In the mock builder that's building the Mock<IVBProject>
 
@IvenBach Started -> life -> paused.
 
I've done that before.
 
@shadowofsilicon found it?
 
Hello @M.Burns
 
where "life" is also a euphemism for "got lazy"
 
7:22 PM
@Mat'sMug yeah
 
@FreeMan ~.~ Be not lazy but rather industrious.
 
yeah. that ^^
 
@Mat'sMug var project = projectMock.Build().Setup(c => c.ExportSourceFiles(It.IsAny<string>())); ??
 
or insidious...
:)
 
When it's hard to understand just keep smashing your face into the keyboard. Eventually one of the keys will lodge itself into your forehead and you'll have your 'AHA!' moment.
3
For me it was the G and H key together.
 
7:24 PM
lol... not that, just... other things.
not the C & # keys?
 
@IvenBach lmao
 
Now, if you want to be able to specify a path from a test, you'll need to add a string parameter somewhere, or you set it up with any bogus string
@shadowofsilicon no, inside the builder
 
@shadowofsilicon I can understand the L, M, and O keys. They are all on the righthand side. But please inform me how you got the A key included in there?
 
Big forehead
 
There should be a ton and a half of .Setup calls in there... you just need to add one more
 
7:28 PM
@IvenBach from my hand picking up the keyboard to smash it into my face??
 
        public MockProjectBuilder(string name, string filename, string projectId, ProjectProtection protection, Func<IVBE> getVbe, MockVbeBuilder mockVbeBuilder)
        {
            _getVbe = getVbe;
            _mockVbeBuilder = mockVbeBuilder;

            _project = CreateProjectMock(name, filename, protection);

            _project.SetupProperty(m => m.HelpFile);
            _project.SetupGet(m => m.ProjectId).Returns(() => _project.Object.HelpFile);
            _project.Setup(m => m.AssignProjectId())
just add _project.Setup(m => m.ExportSourceFiles(It.IsAny<string>())); to that
and then your .Verify call should work
hmm, most of those can be moved to CreateProjectMock
If houses were built like software,opening the front door using the wrong hand would cause the fifth floor windows to catch fire-@ttjmikkola
4
 
@Mat'sMug project.Setup(c => c.ExportSourceFiles(It.IsAny<string>()));
 
notice m (for "mock") is used literally everywhere for setup calls ;-)
but yeah
 
@Mat'sMug Ok I'll change that
Exception text:
`An exception of type 'Moq.MockException' occurred in Moq.dll but was not handled in user code

Additional information:

Expected invocation on the mock once, but was 0 times: c => c.ExportSourceFiles(It.IsAny<String>())



Configured setups:

c => c.ExportSourceFiles(It.IsAny<String>()), Times.Never`
 
oops, forgot the Times.Once part
wasn't invoked anyway
I need to see your test
 
7:37 PM
I tried that and it cried, but I'll try once I take care of some business... brb
 
I'll have to see what your test is doing, the mock setup looks right
you'll want the "act" part of your test to call the command's Execute method (assuming your SUT is the ExportAllCommand itself), and then the "assert" part only needs to verify that project.ExportSourceFiles was called
...if that's what you have, then you need to debug the test and break in the command's Execute method.
 
@Mat'sMug What do I have to do to be able to test run the slim ducky?
except building it, that is
 
same as RD's initial setup: create a registry key under HKCU/Software/Microsoft/VBE/..
 
Ah, ok
 
and then run regasm.exe (appropriate bitness) to register, once
with /tlb and /codebase switches
you'll want to set RD's loadbehavior to 0, and SD's to 3
I'd like to get it to show the toolwindows with as little fluff as possible, so there's still a bit of trimming work to do there
 
7:57 PM
Do I have to register under SlimDucky.Extension?
 
Yeah. No.SlimDucky.Connect (I used the standard name for IDTExtensibility2 implementations)
 
Thanks
 
Ideally the whole thing could stand in a MCVE on SO once we're done =)
 
Come on, the SlimDucky gives me clean exits.
 
8:13 PM
Turn native debugging on
 
0
Q: Speed up replace if matching criteria and append the rest

iCosminI have 2 sheets with the exact format, 5 columns (Category1, Category2, Category3, Month, Amount) - "Temp" and "Source". My goal is to copy the data from "Source" to a new sheet("Combined"), append the data from "Temp" but replace the rows that are matching on column C and D with the new rows fro...

 
I get an AccessViolationException
(to be fair I otherwise get a clean exit off RD as well)
 
RD ist still crashing Excel on every close.
 
@M.Doerner add-ins manager unload + reload works???
Hmm
 
On RD or on SlimDucky?
 
8:15 PM
SD
 
I have not tried that so far.
 
Still, interesting that you get a clean exit - SD isn't explicitly cleaning up anything yet AFAICT
 
I think this is partly a timing issue.
 
Hmm, could be
Which is weird, given everything is supposed to run a a single thread
 
But I still think we are doing something slightly wrong without knowing it.
 
8:17 PM
^
 
Where do I activate native debbugging?
 
Project properties / debug tab
 
Ah, I was looking in debugging options.
 
@Mat'sMug what happens if regasm.exe is ran more than once?
 
Hm, now I get the native exception, but on startup.
of Excel
 
8:20 PM
@shadowofsilicon nothing. but you don't want to register every single build
@M.Doerner huh
 
Maybe the debugger did something weird.
 
So wait is Excel crashing all by itself???
 
I could continue.
So, something handled the exception.
 
Exit code 0?
 
Now, I got the access violation at exit, after a prompt for the location of some resource file.
 
8:24 PM
@Mat'sMug project.Setup(m => m.ExportSourceFiles(It.IsAny<string>()), Times.Once); gives me an error: No overload for method 'Setup' takes 2 arguments
 
Doing it wrong.
 
@shadowofsilicon use IntelliSense =)
 
Set it up like that.
Then do project.Verify(m => m.ExportSourceFiles(It.IsAny<string>()), Times.Once) at the end
 
@M.Doerner MSDN talks about a CreateToolWindow2 method... It's for VS extensibility but it's the same IDTExtensibility2 interface... I wonder...
 
Hm, my Excel really likes to access a null pointer at startup.
 
8:30 PM
#TIL You have to choose each tab to print color/BW social.technet.microsoft.com/Forums/ie/en-US/…. Came up with a quick&dirty solution.
Sub BlackAndWhiteFromIndexTillEnd(ByVal startIndex As Long, ByVal inBlackAndWhite As Boolean)
    Dim wsCounter As Long
    For wsCounter = startIndex To ThisWorkbook.Worksheets.Count
        ThisWorkbook.Worksheets(wsCounter).PageSetup.BlackAndWhite = inBlackAndWhite
    Next
End Sub
 
wow docking in the VBE is ... special
 
I'm sorry @Mat'sMug or @Hosch250 but neither of your comments are being helpful at the moment. Intellisense isn't helping me and if I knew how to "set it up like that" I would already be doing it. It seems that is is time I show you everything I got so far:
 
@M.Doerner I think you're right, I'm looking at a clean exit
The program '[8852] EXCEL.EXE' has exited with code 0 (0x0).
(despite the AccessViolation)
@shadowofsilicon the parsing is superfluous
 
@Mat'sMug I figured but was waiting to ask until after it worked
 
setup looks right (unclear why you have both _folderBrowser field and local mockFolderBrowser though)
did you try debugging the test and breaking in the command's Execute implementation?
@shadowofsilicon where's the command? can't find ExportAllCommand.cs in RD.UI.Commands
> Sorry, forked repositories are not currently searchable.
stupid GitHub
 
8:41 PM
@Mat'sMug Yup, only the master.
 
I'm expecting an ExportAllCommand.cs file here
 
oh
 
although namespace Rubberduck.UI.Command is in the file; does source file location matter too?
 
no, but R# will give me a warning for namespace mismatching folder location
 
8:44 PM
OK I understand, was going to move it during the cleanup phase.
 
I mean, no, as far as compiling is concerned. namespaces should match folder locations :)
ok
I don't think this is a safe assumption to make: _folderBrowser.RootFolder = @"C:\";
 
@Mat'sMug again, a detail to come back to after it works
 
        if (result == DialogResult.OK)
        {
            project.ExportSourceFiles(_folderBrowser.SelectedPath);
        }
is your mock dialog setup to return DialogResult.OK?
if not, that's why your test is failing
(debugging the test and stepping through would have found that)
mockFolderBrowser.Setup(m => m.ShowDialog).Returns(() => DialogResult.OK);
and the cancel test sets it up to return DialogResult.Cancel
 
@Mat'sMug ok, ok... I accept your lashes with the wet noodle lol
I added the DialogResult.OK and it's still failing... stepping through it now
 
lol
94
Q: Sunsetting Documentation

Jon Ericson We will stop accepting contributions to Documentation on August 8 On behalf of everyone who worked on Documentation, I want to thank all 15,451 users who contributed. We particularly want to acknowledge the 294 people who tested the private beta and the 2,361 who pounded on the public beta in ...

 
8:57 PM
_folderBrowser = folderBrowserFactory.CreateFolderBrowser("Select a directory to Export Project as Source Files...", true, @"c:\"); is returning null...
 
mockFolderBrowserFactory.Setup(m => m.CreateFolderBrowser(_path)).Returns(mockFolderBrowser.Object);
hmm
okay you have two sets of mocks here. remove one
either the fields or the locals, but you can't have both.
 
projectMock ?
 
you have a _folderBrowser field and a mockFolderBrowser local
in the test
    [TestInitialize]
    public void Initalize()
    {
        _folderBrowser = new Mock<IFolderBrowser>();
 
Oh my gosh.
TFS...
Created branch Foo from Main. Created branch Bar from Foo.
 
hmm that said the fields don't seem to be used. wtf
 
9:02 PM
Now I can't merge Bar into Main. It can only go into Foo.
 
@Hosch250 dafuq
so you delete Bar and then Foo is stuck?
well, now you know to never branch off a feature branch in TFS :)
 
Heck, even MS uses Git now.
Please die, TFS.
2
I should totally start tweeting about every pain point in TFS.
You can bring Bar into Main by force-copying everything over and resolving 1 zillion conflicts.
 
damn, I broke my command. It used to work when I fire up RD but now it doesnt...
 
Team Frustration Server
2
 
Team F*ing server.
 
9:16 PM
Hm, looking at the output of starting and closing Excel with RD with native debugging it seems that we subclass one more window than we release in the end.
More precisely, I see one subclassing without a trace log being written, which gets released afterwards.
 
and we do that subclassing only to clean up after ourselves, don't we?
 
However, the window subclassed for the inspection windows never gets released.
I think as long as we do not release it, it will pump messages to the window subclassing it.
 
with RekeysAllLevelsDeep as (

select
 a.claimid as Rekey
,a.ClaimIDAdjFromOrig as Original
,0 as RekeyLevel

from <base table> (nolock) a

where a.ClaimIDAdjFromOrig is not null
	and a.ClaimIDAdjFromOrig <> a.ClaimID


union all


select
 a.claimid as Rekey
,a.ClaimIDAdjFromOrig as Original
,RekeyLevel + 1

from RekeysAllLevelsDeep

join <base table> (nolock) a
	on RekeysAllLevelsDeep.Original = a.ClaimID

where a.ClaimIDAdjFromOrig is not null
	and a.ClaimIDAdjFromOrig <> a.ClaimID
	and RekeyLevel <= 2
 
yeah, but what if we don't subclass it in the first place?
 
@Mat'sMug a little help? I'm making some dumb mistake I can't find.
 
9:20 PM
Could it be that we actually subclass two windows with the inspection window?
 
@puzzlepiece87 what's the problem?
 
@Mat'sMug Can you explain to me what the parameter is that is passed to the command when it executes? protected override void OnExecute(object parameter)
 
@Mat'sMug Runs forever and doesn't return results.
 
@M.Doerner I've no idea tbh... last person to play with that was comintern
 
In that case, we would destroy the window on the first WM_DESTROY, which is not safe.
 
9:20 PM
If I did it by hand it would return in less than a second per level
That claim number has 3 levels
 
@shadowofsilicon it's required by the ICommand interface
 
Tbh, I am no expert on window handling.
 
I think we're only subclassing to take control on the destruction of things
I'd like to remove all that in SD and see what we get
 
It still looks odd, that we have this additional subclassing without trace log and then the first one never gets released.
Looking at SubclassingWindow, it seems we also do it to handle focus.
 
@Mat'sMug Can I expect it to be something, or is it likely to be null?
TTGH
 
9:25 PM
@shadowofsilicon depends who's calling Execute and whether they're passing a parameter... if you make the command parameter an IVBProject object, then you need to make sure whoever invokes the command is passing that IVBProject parameter. If nothing passes anything, then write the command ignoring the parameter...
typically a code explorer command would pass something, e.g. the active or selected project
it's entirely up to the implementation
 
@Mat'sMug AFK for a bit.
 
k
@M.Doerner I just removed all subclassing, and still get exit code 0
(commented-out actually)
 
@Mat'sMug Try that with big RD.
 
to be fair I get exit code 0 in big RD anyway
 
This is one I should work on. I never get clean exit with RD, either in debug or regular install.
 
9:38 PM
oh, and unloading+reloading works nicely too
@Hosch250 fork SD
 
Leaving work in a few minutes. Not doing anything anyway, so I guess...
 
[rubberduck-vba/SlimDucky] retailcoder pushed commit ac8eb7f8 to master: commented-out all subclassing
 
@Duga lol, timely
interesting
MZ-Tools 8.0.0.168 released introducing collector of ‘ TODO: tasks in code: https://www.mztools.com/blog/mz-tools-8-0-0-168-released-introducing-collector-of-todo-tasks-in-code/
oh gosh, MZ-Tools is embedding its own issue tracker #bleh
 
LOL:
> Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
2
 
wtf?
 
9:42 PM
Migrating the backing database.
 
you could tell someone has been on vacation:
 
@Mat'sMug Do you still get the access violation?
 
yeah, but I think you're right - Excel is handling/swallowing it (I hit continue and exit code is 0)
 
10:01 PM
When I tried it on RD the last time, I got a ton of com exceptions on tear down.
It cannot find coapi.cxx
 
because we're disposing the controls (when Ninject kernel disposes things)
@M.Doerner wtf is that?
 
No idea.
The debugger is asking me for the location.
 
MZ-Tools 8.0.0.168 released introducing collector of ‘ TODO: tasks in code: https://www.mztools.com/blog/mz-tools-8-0-0-168-released-introducing-collector-of-todo-tasks-in-code/
Huh, where did he get that idea?
 
24 mins ago, by Mat's Mug
oh gosh, MZ-Tools is embedding its own issue tracker #bleh
#DoingItWrong
issue tracking goes in an issue tracker, not in code.
...and not in an IDE add-in ffs
 
@Mat'sMug ah - haven't caught up yet
@IvenBach :
Dec 10 '14 at 14:18, by RubberDuck
1) Make it work.
2) Make it right.
3) Make it fast.
 
10:12 PM
@RubberDuck Where'd you learn it from? @ThunderFrame doesn't want to take credit.
 
Apr 9 '15 at 13:01, by Mat's Mug
@RubberDuck We're programmers, we can do anything
2
 
@ThunderFrame #ItsDucksAllTheWayDown
 
or in 2.1.x, it's #DucksAllTheWayRound
 
hahaha. ^ That's a good one.
 
10:15 PM
had to use 2.0.13 the other day - that waiting animation is so boring...
 
I also think of ^ when i hear make it work ... right ... fast.
 
@IvenBach doesn't apply to NASA
 
@ThunderFrame NASA only gets to pick one? :P
 
They pick all 3 and invert all but good.
 
They pick 2 x Good.
 
10:18 PM
Fast => Slow, Cheap => Expensive.
 
@Mat'sMug I'm going to hit up SO for my SQL question. Thanks for all your hard work on RD today!
 
F35 program didn't get to pick any
> By 2014, the program was "$163 billion over budget [and] seven years behind schedule"
 
@ThunderFrame And that's being generous
@ThunderFrame If we're being honest, the F35 program might not even get to pick "works poorly"
 
channel9.msdn.com/Series/Programming-in-C-Jump-Start/…. Any time it feels like an informercial take a drink.
Right you are... Absolutely... But what about...
 
@ThunderFrame It was a huge, hubris-fueled mistake to try to make an everything plane.
 
10:21 PM
Can I do this...
 
Passing parameters in #VBA. Preference?
60% for #ItDepends
 
@Mat'sMug in case you want a crack at it: stackoverflow.com/questions/45448605/…
 
Woot! My top 2 picks were elected!
87
Q: 2017 Community Moderator Election RESULTS

Shog9Well, it's been a crazy month but July has finally come to a close and with it Stack Overflow's 9th moderator election has also concluded. They said it was impossible, but 30 thousand or so voters were able to pick the best two moderators from among many worthy candidates, namely: They'll be...

 
So were mine!
And I actually forgot we were only electing two instead of three.
I'm glad Andy finally broke through!
 
@Mat'sMug what do you mean when "Excel is handling/swallowing it (I hit continue and exit code is 0)"? It sounds like that Excel has something to retain control from your subclass already issued. To my mind sounds like Comintern simply regains an exisiting attention back from what Excel handles.
 
10:30 PM
@puzzlepiece87 ditto
 
@puzzlepiece87 and a valuable lesson for every dev ever.
 
Later all!
 
@RubberDuck Get a job on a white elephant, and live the good life on the taxpayer's dime?
no wait, become a supplier with a Cost-Plus contract, and an open-ended delivery deadline, and live the really good life on the taxpayer's dime?
 
@IvenBach I don't know. Just an old saying. Don't know who said it first.
@ThunderFrame cough not quite the moral I imagined. Lol
 
@Mat'sMug @RubberDuck
 
10:35 PM
@PeterMTaylor same without any subclassing
 
> 1st rule of optimization: Don't.
> 2nd rule of optimization (for experts only): Don't optimize yet.
 
10:57 PM
@IvenBach that's the OOP sense of "interface". Not interface
 
@Mat'sMug Duh check: While it's not part of an IFoo it is viewable/seen from the outside. That's what your saying?
 
@IvenBach no. IFoo's public members are members of an interface. Foo's public members are exposed by any object (/instance) of type Foo - they're on that Foo object's interface
I think it was the introductory chapters of GoF's design patterns book that make it "click" for me. well it's nicely explained there anyway.
All objects present an interface, regardless of what interface their class implements
You have to understand the difference between a class and an object
 
@Mat'sMug but a menu item won't have anything to pass? Or can it?
 
@shadowofsilicon indeed, it can't. Menu items are wired to invoke their commands with a null parameter.
See CommandMenuItemBase
 
@Mat'sMug Duh check: Since Foo : IFoo anything that Foo publicly exposes becomes part of Foo's interface, regardless of whether it's inhereted from IFoo or not.
 
11:09 PM
@Mat'sMug yes yes... light bulb moment
 
Hmm actually it's wired up elsewhere
@IvenBach Foo is just a class, not an object. Anything Foo publicly exposes is part of the interface of any object of that class
An instance of a class is an object
A class is just a blueprint
 
:+1: That's what I was thinking.
You wanted to make sure you explicitly noted the difference between what's the actual interface that's being inherited from.
 
An object's interface is what it's presenting to the outside world
 
@IvenBach I read a few years ago that although the plane is now flying, the main gun isn't ready yet, as there were too many bugs in the over one million lines of code...
 
A class can implement any number of interfaces
@RubberDuck 3rd rule of optimization: roll it back, the performance you're after is definitely elsewhere.
 
11:15 PM
one million lines of code to operate what is essientally an rotary cannon!
 
@shadowofsilicon #IfYouCodeItThere'llBeDelays
 
@puzzlepiece87 The F35 program was a deliberate program to cover the development of another plane(s) that they didn't want to release to the public yet.
 
11:36 PM
@Mat'sMug recent conversation. "Did you guys write up a card to look into widget's performance?" Me: "No. the bottleneck is downstream. We could make widget as fast as we want and it wouldn't make a difference. We carded up the perf for the fubulator."
 
@Hosch250 Can you cite your source, or is this a conspiracy theory along the lines of "Aliens."?
.. or these days, "Russians." lol
 
No source, if I had a source, the other plane would be leaked.
 
@Hosch250 that's actually not too flabbergasting
 
No, the Russians equipment is crappy.
 
@Hosch250 Aliens.
 
11:41 PM
But, here's my "source".
There have been several civilian sightings of strange-looking planes in dogfights with US planes near US bases in the western US, GB, Belgium, and a few other countries.
Which is unsurprising because they are always developing new experimental planes.
The problem is, where is the money coming from?
Well, if you have a bunch of money just disappearing, someone is going to figure something out and send a spy in.
 
@Hosch250 Now that's interesting. Also... Aliens. lol
 
Might even be our own people trying to bust a money laundering ring.
@shadowofsilicon It's been going on since well before the Vietnam war, if you go read Kelly Johnson's book. They usually try to find people and tell them to not leak the information.
 
In .NET, I have a regex that (should) return exactly one named group per match. (?<fooGroup>foo)|(?<barGroup>bar)|(?<otherNonWS>\S+) on text foo the bar in the fizz returns 6 matches. Is there a way that I can get the name of the group, other than by checking if it is "fooGroup", checking if it is "barGroup", and/or checking if it is "otherNonWS"? Or is there some other construct I should be using?
 
So, you need to have a cover for the money being paid to the company making your planes. What better way than to buy a product for them that the world expects to be expensive and have problems?
GTG have supper.
 
@Hosch250 That makes a lot of sense. Do you listen to the No Agenda podcast? Seems like you'd like it.
 
11:47 PM
@spolsky I guess that means #VBA coders will have to use Rubberduck instead... We've put so much valuable info in t… https://twitter.com/i/web/status/892532249329119234
@ThunderFrame get the match by groupname?
 
@Mat'sMug That's dissapointing. Looks like I have a lot of reading to do soon.
 
@Mat'sMug I can return the groupname? and by implication, should there be more than one, the groupnames?
 
IIRC there's a Groups member somewhere
 
00:00 - 19:0019:00 - 00:00

« first day (1152 days earlier)      last day (2028 days later) »