« first day (2565 days earlier)      last day (128 days later) » 

12:03 AM
[Minesweeper] Games Played: 43, Bombs Used: 29, Moves Performed: 6116, New Users: 4
10 hours later…
10:23 AM
Q: Load new code to arduino without getting self attacked (arduino rubber ducky)

Akshat GuptaI made an arduino rubber ducky recently (using an arduino leonardo) but I am facing a problem now. Let's say I am testing a shutdown script and I have uploaded the script in the arduino. Now when I plug the arduino in any computer, it shuts the computer. Now when I connect the arduino to my own c...

2 hours later…
12:47 PM
@StackDuck wrong duck. Fixed.
1 hour later…
2:08 PM
Hi all! Had a wonderful vacation, I promise to not tell you all about it or share a slide show. :)
1 hour later…
3:10 PM
Returning to work after a mini vacation makes me want a longer vacation.
3:29 PM
In happier news, Canada now leads the world for % with at least one vaccine jab:
3:56 PM
I'm going to suggest to no-one in particular to drop the subject.
For some values of suggest.
4:11 PM
55 messages deleted
@FreeMan now you need to share a slide show!!!
Wow, @Mast, I've never seen you in this chat before. Did someone summon you or do you have some sort of search that alerts you when chat gets derailed from topic?
56 messages moved to Trashcan
@HackSlash I've been here before, just not very often :-)
It's just a bit ironic that the topic was related to control, and heavy handed responses. You come in looking like the thought police.
@HackSlash actually... it wasn't
4:16 PM
@HackSlash That's the risk you take with being a moderator.
Someone will think you've done the wrong move, even if you did everything right.
I may agree that the subject matter doesn't fit this chat and contained quite questionable content. Is there a place where it is documented what sort of talk is not allowed and subject to censorship?
@Mast Your package will be on its way by tomorrow.
"censorship" ...
@HackSlash what you're looking for is the Code of Conduct
4:18 PM
@IvenBach You remembered :-) Thank you.
@Vogel612 Thanks!
that document is obviously open to a certain level of interpretation. In addition it's not uncommon from my experience to remove the "inciting wrinkle" to avoid a problematic issue coming up over and over and over
in some cases that's the only way to deal with people figuratively ripping each other to shreds
@Mast It's been on my Get-Done-Or-Continue-To-Be-Shamed-ToDo-List for long enough.
@Vogel612 "Censorship, the suppression of words, images, or ideas that are "offensive," happens whenever some people succeed in imposing their personal political or moral values on others." aclu.org/other/what-censorship
@HackSlash hmm ... I prefer using the stricter definition as used by German "Verfassungsrechtler" (constitutional lawyers)
4:25 PM
I'm not familiar
According to the Theory of Moderation, I should be leaving a comment as to why I stepped in here and did some rough clean-up. Suffice to say, some topics are a bit sensitive. There was a heated argument going on and the argument had to cease, one way or another. We usually tolerate a lot of off-topicness in the chat rooms and I won't get offended by profanity not aimed at other users (attacking others is still a no-no), but this got out of hand.
If anyone has a problem with that, they can take it up with me.
(Only german by blood, not culture or language)
It only refers to governmental restrictions of free speech
where free speech does not cover demonstrably false statements
That sounds like a common sense thing to have.
@IvenBach ahh, but you see: demonstrably false is not quite that easy
you're pretty much instantly at the "What even is truth, really though?" mess
4:28 PM
Sure, I think it's similar here. Yes, who does the demonstrating of falsehood? In a private forum, like this one, the company can choose to censor anything they want. That's fine. The code of conduct is clear.
Part of it is based on trust.
Moderators should primarily be ambassadors, but sometimes we have to police.
Unfortunately that comes with the territory.
So many users, so many cultures.
Thanks for doing your thing @Mast, it just caught me off guard because I watched it happen live. News to me.
I'd much rather whack spammers than step into conversations like this. But it's both part of the job and both needs to be done.
I've called myself a janitor before. I don't mind.
4:40 PM
Thanks @Mast
5:05 PM
When creating an instance of a mocked class how do I ensure that the mockFoo.Object that is supplied as an argument isn't null?
how are you creating it? Are you testing the creation of the object?
I'm attempting to create a test for adding a component. Specifically testing that the count of vbe.ActiveVBProject.VBComponents.Count is increased because the component is successfully added.
public void Foo()
    var worksheetObject = ("Sheet1", string.Empty, ComponentType.DocObject);

    var vbe = MockVbeBuilder.BuildFromModules(worksheetObject).Object;

    var (state, rewritingManager) = MockParser.CreateAndParseWithRewritingManager(vbe);
    var codePaneComponentSourceCodeHandler = new Rubberduck.VBEditor.SourceCodeHandling.CodeModuleComponentSourceCodeHandler();
    var addComponentBaseService = new AddComponentService(state.ProjectsProvider, codePaneComponentSourceCodeHandler, codePaneComponentSourceCodeHandler);
The test I have so far.
The line addStdModuleCommand.Execute(codeExplorerItemViewModel.Object); results in a null being passed as the argument. a mocked object being passed.
As execution proceeds down the call stack... Hrm.
I think I found it. AddComponent(parameter as CodeExplorerItemViewModel); has parameter correctly typed as the mocked object.
Trying to rubberduck myself to comprehension.
that should actually work.
because the .Object should be an instance of an anonymous subclass of CodeExplorerItemViewModel
I'm assuming that the as operator is unable to cast it to the type of CodeExplorerItemViewModel which is where the null argument comesfrom.
I don't follow you Vogel. Where is the anonymous subclass coming from?
5:13 PM
You can't override the implementation of a class "only for some objects"
so you need to get an implementation of your own
@IvenBach docs.microsoft.com/en-us/dotnet/csharp/language-reference/…: If the conversion is not possible, the as operator returns null. Unlike a cast expression, the as operator never throws an exception.
@IvenBach if you drop parameter is CodeExplorerViewModel into the watch expressions, that should return true.
which means that casting with as should succeed
It returns null. I derped.
I was using as.
Both parameter IS CodeExplorerItemViewModel and parameter IS CodeExplorerViewModel return false.
ICodeExplorerNode != CodeExplorerItemViewModel
I'm assuming that is because the declaration of the mock var codeExplorerItemViewModel = new Mock<ICodeExplorerNode>(); is typed to ICodeExplorerNode.
5:18 PM
yup ... I missed that because I derped :D
inferred the mock generic type from the name...
I think I had an error on Setup when I tried typing it as CodeExplorerItemViewModel. Non-virtual mumble mumble reason.
> System.NotSupportedException: 'Invalid setup on a non-virtual (overridable in VB) member: node => node.Parent'
there are restrictions when you mock a concrete class
question: Why do you need a mock in the first place?
which is why we like using interfaces - much easier to mock.
the object you pass to the Add command could just as well be a normal object.
Something like addStdModuleCommand.Execute(new CodeExplorerComponentViewModel(parentNode, null, null, vbe)); could work
5:24 PM
I'm not sure if I need the mock or not.
6:07 PM
I've just installed the latest release version of RD and have read the EULA for the first time. It's reassuring to know that, in the event of damages, "You may exercise the option of visiting a nearby pond and feeding the ducks." 😁
6:37 PM
I'm using a concrete instance of CodeExplorerCustomFolderViewModel as an argument.
When within the implementation the parameter is cast to an ICodeExplorerNode the property on that type is accessed and throws an error since the first access property is null.
I think I need to figure out how the property QualifiedSelection is normally assigned on the type and provide it a value.
That requires creating and assigning the Declaration type that's provided to the ctor for the CECustomFolderVM.
7:09 PM
VS2019 is required for RD these days, right?
I beileve yes.
7:55 PM
thx. Had to reboot for Win10 updates...
I presume a full uninstall of VS2017 is in order as well?
They can happily coexist, but I haven't had reason to use VS2017 in years.
i ended up uninstalling because VS are freaking hogs when it comes to disk space
but yes, no problem having multiple versions.... if you have space to spare.
Yeah, I'm uninstalling. Funny, I have to update the installer to uninstall. ?
Don't see a reason to keep old stuff around.
yeah VS installer is.... an eager beaver.
8:37 PM
It defaults to installing .NET 4.6. I'm reasonably certain that at some point or other I've installed newer .NET versions, do I need newer .NET Dev Tools?
@IvenBach Provided as argument. Issue now is I need to figure out how the actual implementation's parent-most node has its QualifiedSelection set.
also, I've selected .NET desktop development and Data storage and processing (mostly just because). I presume that's all I need?
and yeah, 11.35GB is a bit of a pig...
2 hours later…
10:37 PM
@IvenBach I don't believe I'm capable, at present, of understanding the mocking well enough to test the functionality.
11:30 PM
Welp... I have the test written and it matches expectations. ¿The problem? I don't fully/adequately understand how the dialogFactory gets is result.
Come back to it tomorrow with a rested mind and pick each piece apart to understand.

« first day (2565 days earlier)      last day (128 days later) »