« first day (999 days earlier)      last day (2181 days later) » 

7:29 AM
@Comintern I just dumped that TLB - Looks like all of the interfaces for the Controls are there.
[
uuid(b28fa150-0ff0-11cf-a911-00aa0062bb4c),
helpstring("The AmbientProperties object allows access to the ambient properties of the container."),
helpcontext(0x000df648),
dual,
oleautomation
]
interface AmbientProperties
this looks interesting:
[
  uuid(e43fd401-8715-11d1-98e7-00a0c9702442),
  hidden,
  oleautomation
]
interface IVbeRuntimeHost : IUnknown {
	[]
	HRESULT _stdcall get_AppObject(
		[in] GUID#i* pguidTypeInfo,
		[out] IDispatch** ppdispAppObject
	);

};
and the Initialize and Terminate events...
[
  uuid(fcfb3d21-a0fa-1068-a738-08002b3371b5),
  hidden
]
interface IClassModuleEvt : IUnknown#i {
	[id(0xfffffffa), helpstring("Occurs when an application creates an instance of a Class."), helpcontext(0x000df918)]
	HRESULT Initialize();
	[id(0xfffffff9), helpstring("Occurs when an instance of a Class is removed from memory by setting all the variables that refer to the object to Nothing or when the last reference to the object falls out of scope."), helpcontext(0x000df919)]
	HRESULT Terminate();
stupid OLEWOO inserting #i
Jun 6 '16 at 20:06, by Comintern
We'd need to read the VBInternal typelib, but yeah.
 
7:53 AM
huh, I thought VBRUN looked familar.... Here it is as a default reference in VB6:
Pandora wants her box closed and promptly handed back....
2
 
8:18 AM
> Copying Code from the attachment:

```
Attribute VB_Name = "TestCourse"
Option Compare Database
Option Explicit
'@Folder("Entities.Level1.Course")

Option Private Module

'@TestModule
Private Assert As Object

'@ModuleInitialize
Public Sub ModuleInitialize()
'this method runs once per module.
Set Assert = CreateObject("Rubberduck.AssertClass")

End Sub



'@TestMethod
Public Sub TestCreateCourse()
On Error GoTo TestFail

'Arrange:
With Course.
 
8:53 AM
And.... Here's VBRUN referenced in VBA....
ThisWorkbook.VBProject.References.AddFromFile "C:\Windows\SysWOW64\MSVBVM60.dll\3"
 
9:05 AM
  Dim bag As PropertyBag
  Set bag = New PropertyBag

  bag.WriteProperty "Foo", "Bar"

  Dim buffer() As Byte
  buffer = bag.Contents

  Debug.Print LBound(buffer), UBound(buffer) 'Prints  0  35
 
Kaz
9:41 AM
@Mat'sMug I'd say it already is, people just don't know it yet.
2
 
 
3 hours later…
1:10 PM
holy carp! 520+ messages since I left last night! Y'all were chatty!
@ThunderFrame is it sad that as I began to read that I thought of the music streaming service first?
And, for those who actually turn on the spell/grammar check in Outlook/Word, MS is contributing to poor grammar the world over:
3
 
1:33 PM
> @retailcoder could the Option Private Module be hanging us up somehow? Just a stab in the dark.
 
1:48 PM
@Mat'sMug Are these created by installing RD? Would it not be easier (for the first time builder) to either A) install a built RD runtime to get the keys created, or B) create a file (don't recall the type off the top of my head) that will build/set all these keys?
(B) con't) and make that part of the package so they can be downloaded with the rest of the source...
 
2:06 PM
@FreeMan You mean a .reg file? That's actually not a bad idea...
 
^^
 
yea, @Comintern that's what I meant. I'm on the 2nd cup o'java, but it obviously isn't working...
OK, sometime recently, I think I submitted a bug about UnassignedVariableUsage ignoring the '@Ignore command, but I can't find it in either open or closed issues. Is my git-foo not good, or did I never submit it?
I've got a screen shot saved off that I would have used, and I just nearly duplicated the shot (though my original was better), and that's what's held me off from submitting it until I know it's not a dupe/resolved
 
@FreeMan Wait, what? I thought I fixed that.
 
Yeah, see, I thought I'd submitted it, but I can't find the issue report...
I'm still on the released .11 build, so you may have fixed it in Next
guess I'll have to fork & build my own sooner rather than later to keep up with all the new toys & fixes.
if you can find the original issue, @Comintern and/or confirm that it's been fixed anyway, I'll not bother submitting a new issue. If you can't find it, and it still looks broken, I'll put it in.
 
@FreeMan put it in anyway, just to be sure. worst-case we close it as "no-repro" if it's already fixed
 
2:19 PM
^^
Wait, don't.
 
Sure will, ok won't.
 
This is why I put comments with the github issue on unit tests.
2
 
#2668 actually, but yeah, I thought it was familiar...
 
@Comintern status: Merged in Maintenance
@FreeMan you can usually find merged-but-not-released issues in the Maintenance project under the Merged column
 
I was simply searching through the list of all issues for terms that I thought would find it. my githubfoo is not strong
 
2:25 PM
^ easier to browse :)
 
interesting, the QuickFix for Constant is not used turns this:
Const TEMPLATE_OPEN_TEXT As String = "1.xltm" ' "Template1" 'needs to change to "1.xltm"
into this:
' "Template1" 'needs to change to "1.xltm"
is that by design?
 
yes
 
mkay...
 
there's probably room for an enhancement that prompts whether to remove any orphaned comment left there though
 
@Mat'sMug If I'd found the right search terms, I'd have found it either way, though, right?
 
2:27 PM
yeah
 
@Mat'sMug is that a hint since I seem to be in an issue submitting mood? :)
 
=)
 
somebody get @Duga a cup o'joe?
hmmm... If I have Excel & the VBE open, and I open an xlSm, RD automatically reparses. If I open an xlTm, RD does not automatically reparse. ByDesign?
 
If it has code and it isn't protected, no.
 
'protected' meaning cells locked and Review | Protect [worksheet|workbook] enabled?
 
2:39 PM
no, 'protected' as in, can't view the source code in the VBE
 
oh, no, that's not the issue.
how is 'can't view source in VBE` protection set?
 
project properties -> protection
 
prepares to learn something new!
 
it's thoroughly useless though
I have this pinned workbook which I named CrackerJack.xlsm that I just need to open to run the UnlockVBE procedure which defeats standard VBE project protection
 
oh yeah... I remember something about that. Used it at a previous job to prevent people from snooping around and bypassing the (relatively simple) security.
still annoyed at myself for not taking all that code with me. Lots of very useful routines in there that I'm having to recreate
 
2:43 PM
if your code has anything like If Environ$("UserName") = "daFreeMan" Then, you don't have security, you have a reason to laugh (cry?)
 
I was actually getting the user name via a win32 call if I remember correctly, but it wasn't much more advanced than that.
Wasn't security as much as you get access to these parts, I get access to those parts.
Everything was logged with the userID, so we could trace it.
as I said, relatively simple
 
> @rubberduck203 nope - we'd be getting a COM exception if RD's Application.Run calls failed to locate the test methods.
> The `QuickFix` removes all text from the line up to the start of the comment.

Add a `QuickFix` option that will remove the whole line.
 
@Duga only about 30 minutes... :)
 
3:06 PM
> Closing this issue - performance is drastically improving in 2.0.12; the more expensive inspections have been given attention, and the State.DeclarationFinder cache is now used by most inspections.
 
@Duga That's what you get for stringing multiple declarations on one line!
 
3:25 PM
> Ok. Thanks. Like I said, shot in the dark.
 
3:57 PM
> Sounds like a good place for the code-rewriting API to explicitly test for ...
 
4:25 PM
    For ubd = 1 To 3
    For t = 1 To typ
    For b = 1 To bnd
    For c = 1 To cat
    For i = 1 To cntry
#Fail
 
Not for a long time...
Start....Wait for it..............................................................................‌​.................................................................................‌​.................................................................................‌​.........................................................#Fail
 
5:10 PM
@Mat'sMug I've installed Rubberduck, but i do not see it in my com add ins or vba edtior menu, help? — pokemon_Man 15 mins ago
@Comintern ^^
 
Huh. Registry permissions with the installer? If it's in the registry at all, it should throw up a "Failed to load" messagebox if something goes wrong.
 
the only way it would install successfully and not load is if the user isn't local admin; RD was installed for the admin user. needs the PS1 fix
aka read install instructions
 
lol
IIR that user isn't strong in the RTFM area.
 
5:27 PM
0
Q: Can not see the add in after installing rubberduck?

pokemon_ManI am new to rubberduck and have installed the latest version 2.0.11. After admin installed, I go to excel and check my com-addins and it does now show rubberduck there. I've check my programdata folder and yes, rubberduck is there with all files ect. It is just not showing up on my add in for exc...

 
LOL - I never noticed that the Stack Duck's user image is literally a stack of ducks.
 
Thank you! That fixed that error but it gave me an Error 9 on the first line, wkb2.Sheets(shtName).Range("D2").Value = wkb1.Sheets(shtName).Range("D2") — leetontea 1 min ago
#HalpIveNoClueWhatImDoing
26
Q: Programming language where every function call/block is done in a separate thread?

GrimboxI'm currently creating a programming language for fun where the idea is that every function call/new block (if clauses, loops etc) will work in a separate thread. Instead of creating new Threads the standard should be that it does that automatically, and if you want it to run in the main thread y...

that sounds like a Great Idea
as in... debugging it will be oh so much fun
 
That would be functionally equivalent to this:
4
A: Random without Time-Basis

CominternC Compile with the -pthread flag (or whatever your compiler uses). #include <stdio.h> #include <pthread.h> #define m (unsigned long)2147483647 #define q (unsigned long)127773 #define a (unsigned int)16807 #define r (unsigned int)2836 static unsigned long seed; pthread_t t[20]; int lo, hi, d...

 
5:55 PM
okay this is annoying
why can't they all just fail together
does it show that my patience is running out?
You need to first know what you want the code to be doing... — Mat's Mug 1 min ago
BUILD SUCCEEDED
and TFL
 
[retailcoder/Rubberduck] retailcoder pushed commit 5ff02dd4 to rd-next: fixed NRE when parent module declaration is null
[retailcoder/Rubberduck] retailcoder pushed commit 96a16adf to rd-next: PR#2733 tweaks
 
gosh @Duga, about time!
2
TFL
 
[retailcoder/Rubberduck] comintern pushed commit b11ed83b to rd-next: Fix handling of statement separators in MoveCloserToUsageRefactoring, cover with tests.
[retailcoder/Rubberduck] comintern pushed commit 50ec8a5b to rd-next: Fix null checking in focus events.
[rubberduck-vba/Rubberduck] build for commit 63234532 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
6:16 PM
@Duga wtf... No feedback on the SO answer
 
Why not just use the VBA Right, Mid, Trim, and Left functions to do this before you import the values to the cells to begin with? — Comintern 12 secs ago
 
Q: My parsing code to import data doesn't work. How do I fix this hack I came up with to re-parse it after the fact?
 
6:47 PM
> Yes, that worked. thanks all. I had to register under my name and not under the admin user.
 
Has github.com/rubberduck-vba/Rubberduck/issues/2085 been fixed in the upcoming release? I'm having similar behavior
 
@IvenBach yep
 
I'm having reparse issues when I delete a TestModule with 2.0.11.2453
 
6:52 PM
yeah, it looks like @Comintern's sink tweaks rewrite fixed the flakiness there
 
> I now have another issue, I have the add in ect. but all the controls are grey out like i can't click them when i try to use them such as unit test controls ect?
 
@Mat'sMug Ok. I'll have to await the release of 2.0.12
 
> :+1: See stackoverflow.com/q/41601588/1188513; you need to trigger the initial parse manually - that's now fixed in the current/next build; version 2.0.12 is scheduled to release this weekend!
 
@IvenBach or use your debug build ;-)
 
Can't do that one. At work I don't have VS installed.
 
right
 
@Mat'sMug Needs work. I'm going to scale back the number of events raised after work - it's sluggish as hell right now.
 
we'll be shooting for monthly releases going forward
 
github.com/rubberduck-vba/Rubberduck/wiki/… Signature is immediately preceded by... means the Name?
 
a procedure's signature is basically its declaration, including its parameters and return type
Public Sub TestSomething()
Public Function GetFoo(ByVal bar As Long) As String
the name is just TestSomething or GetFoo
 
7:07 PM
Thanks for clarifying. Learning correct terminology is taxing at times.
 
huh, that's outdated:
> Method name starting with Test, like TestMethod1
gosh these screenshots are from 1.2
and the PermissiveAssertClass isn't only on the roadmap, it's implemented and released :)
 
is it just me, or did GitHub blue just get bluer?
 
@Mat'sMug <sarcasm>So you don't have all your examples dynamically update with respect to your current build? What is this? Some kind of opensource project?</sarcasm>
 
GitHub has the blues
@IvenBach lol!
 
I'm so grateful you have done all this... You just have no idea!
3
 
7:12 PM
see, that's why we need more contributors - and why people can help regardless of whether they know C# or VBA :)
 
I expose my own stupidity and shortcomings often enough, it's nice to expose others every now and again.
 
LOL
that's part of why I like reviewing other people's code on Code Review :)
 
@ThunderFrame Just you. It got purpler.
 
@Mat'sMug I need it and that's why I started on CR (how I stumbled onto RD). Still at times seeing a huge block of text to 'help' does knock ones self esteem down at times: codereview.stackexchange.com/questions/156495/…
 
@IvenBach Eh, that's a medium block of text on CR.
 
7:23 PM
I like how CR encourages reviewers to be thorough - vs how SO encourages answerers to dump "try this: [code-dump]" copy-pasta answers that don't really explain anything
answering on CR has forever changed how I answer on SO :)
 
¿Wait? Computer Science/Programming isn't blindly Ctrl+C, Ctrl+V! I've been mislead...
 
@IvenBach That's the problem - you forgot the Ctrl+A at the start. It's much more efficient.
 
@Comintern Forgive me, I'm still learning.
 
I find + is the best combo for great code
2
 
7:27 PM
Compiles a lot faster that way.
 
seriously
 
recalls not firstly pressing Ctrl+G, then pressing Ctrl+A, DEL
 
I'm considering dropping my broken branch
@ThunderFrame LOL
 
Is that the one with the inspection refactoring?
 
yeah
correct term would be refuctoring
 
7:28 PM
@IvenBach That's exactly how I've felt hanging around here!
 
@Mat'sMug lol
I've refuctored a lot of code.
 
so yeah, I mean, I'll delete my [next] branch and then re-create it off my [rd-next] which is in sync with the main repo. then I'll start actually refActoring inspections
one by one, not 40 at once
failure is the best teacher
4
 
For unit tests is Arrange for Dim, Act for evaluating, and Assert for Assert.<ValidOptions>?
 
@Mat'sMug If one actually learns from mistakes. Actually, other's failures are an even better teacher.
 
7:32 PM
@Mat'sMug @FreeMan You're smart if you learn from your own mistakes. You're a genius if you learn from the mistakes of others. - IvenBach
 
@IvenBach Then I'm a genius.
 
I got you beat, I'm a smart genius apparently.
 
@IvenBach AAA testing is widely documented; "Arrange" is for whatever setup code you need to create your system under test and its dependencies; "Act" calls the method you want to test, and "Assert" verifies the test's assumptions - ideally a single test would only verify one single thing.
 
Speaking of Arrange, Act, Assert there's probably a couple MB of copied and pasted "Arrange" in the unit tests right now. I'm guilty as hell on that one...
 
yeah
 
7:33 PM
@IvenBach Well, me too, then.
I know some people who are neither.
 
don't we all
 
LOL.
 
^too true
 
^^
 
@Comintern Good thing the copy/pasta is highly correlated with the number of passing tests
 
7:34 PM
pasta = test passes? Cool!!
 
The more you copy/pasta the more your tests pass, right?
 
It's sure a hell of a lot easier than figuring out why the test itself is broken.
 
eh.. the tech debt in the testing project is through the roof tbh
 
I swear half the time I make a change it takes 5x as long to figure out why a failing test that should pass is failing.
 
If you are working on the grammar, that isn't surprising.
 
7:36 PM
grammar tweaks that break stuff, break stuff - mission: accomplished
 
More often, it's been "oh, the serialized declarations have a different filepath now", or "Oh, the expected code in these 150 tests isn't indented correctly".
 
@Mat'sMug As a general rule, when the grammar tweaks break stuff, they also brake stuff.
 
@Comintern yeah that's kind of a PITA
 
You should have seen the broken tests that weren't implemented for the inspections during my internship.
I fixed probably half a dozen, and I think there are still others.
 
aye, there was 30+ inspections and half of 'em didn't have any tests
 
Bunch of searching for nodes in a specific pattern that didn't have that pattern any more after awgaya re-wrote the grammar.
 
and we're going to be scrapping/rewriting about 95% of the tests between now and 3.0
 
Yeah, there's stuff like that too. I shudder to think what working on the COM collector would have been like if all the tests assumed a full set of declarations.
 
Boy, things are a horrible mess around here. All because 3-4 people can't learn from anyone's mistakes.
 
> @pokemoncvue awesome! Feel free to star us if you like - and make sure you update to 2.0.12 next week, we're releasing a TON of fixes!
 
7:40 PM
I've also run into tests where the only behavior being tested is mocked behavior.
 
@Comintern written by a smart genius, no less!
 
@Comintern Probably some of mine :/
 
Written by all of us smart geniuses. I've done that a couple times myself.
 
^
@Hosch250 I think it's more because 3-4 people are too lazy to refactor/rewrite the entire test suite and restructure things, and prefer working on things that provide "immediate customer value", e.g. bug fixes and features - typical of many, many, many teams and projects.
 
@Mat'sMug I'll do it.
Slow, but I can do it.
What in particular do you want?
 
7:44 PM
foo.Setup(m => m.Bar()).Returns(42); Assert.AreEqual(foo.Object.Bar(), 42); //Yay! Passed!
 
Ninject doing the DI
 
^ That would rock.
 
Uh, is that even halfway possible?
 
of course it is! that's what it's for!
 
I don't think so.
There is no composition root. Test methods have to have an empty argument list.
 
7:46 PM
For unit testing a function. Would I create a test for Each and Every possible combination?
 
If anything we might need some more factories, but you can set up as many kernel configurations as you need.
 
we set it up in RubberduckModule, binding ISomething to Something. we need a test setup ninject module that binds ISomething to some Mock<ISomething>
 
Test modules don't have ctors.
 
so what
 
They aren't designed as classes; they are designed as modules.
 
7:47 PM
Doesn't matter.
 
You can't do ctor-injection without a ctor.
 
you don't ctor-inject the test module
the test module has a base class with a method that does all the wiring, that runs when the test (method? class?) initializes
 
kernel.Get<IFoo>();
Boom.
 
Personally, I don't see what's wrong with the builder the way it is.
 
the fact that its setup is duplicated in 1700 places?
 
7:52 PM
^
 
Would it break rules of unit testing to use a loop to go through all criteria or is it better to write a separate test for each one?
 
That's the thing: it isn't duplicated. We have to pass different code in.
And we have to have separate instances anyway, because the tests change the code.
@IvenBach Separate cases
 
@IvenBach the golden rule is that you want a test to have one single reason to fail :)
 
I can agree we can cut some duplication.
 
Much better to do something like:
//Arrange
GetVBEWithModule("Module1", code);

//Act
...
 
7:54 PM
^^
 
I can make it so we do vbe.createWithModule(code)
Yeah.
I agree we can cut it down to that. But put it in the builder.
 
I'd put it in a base class
 
Make it a static method, or something.
 
I could really care less how convoluted it is to set that up in the called function - it's just that it's in every caller right now.
 
That isn't what base classes are for.
Like I said, unit test designs aren't in classes. They are more in a module design.
This is one of the classic failures of OOP.
 
7:56 PM
FoobarTests : VbeDependentTestBase
not is-a?
 
Just go look at test runners. They work functional-style.
 
Nothing says they have to.
 
I couldn't care less where it's at actually - as long as it's in one place
 
Look. You don't call FoobarTests.GetVBEWithModule.
You call MockVBE.CreateWithModule.
 
base.VBE.VBComponents...
 
7:57 PM
The first option doesn't even make sense.
 
@Mat'sMug I am a hack compared to you, so I will defer to your knowledge. But, I personally would still avoid it, just because my ocd would require it. — Scott Craner 44 secs ago
Scott is way too humble
@Comintern yeah that's what I was thinking
 
@Comintern That is exactly what won't work.
 
Why?
 
The tests actually change the code in the mock modules.
 

« first day (999 days earlier)      last day (2181 days later) »