« first day (2062 days earlier)      last day (31 days later) » 
00:00 - 14:0014:00 - 00:00

12:00 AM
[Minesweeper] Games Played: 74, Bombs Used: 41, Moves Performed: 9156, New Users: 14
[rubberduck-vba/Rubberduck] 1 issues opened. 4 issue comments
12:26 AM
am i correctly marking the test annotations with the ITestAnnotation?
public sealed class TestMethodAnnotation : AnnotationBase, ITestAnnotation
that's just an example
12:39 AM
alright, well that rules that out then
ah shit, i think i found a good place to look lol
why do I feel like VBA is considered ‘old tech’ and ‘not worth anyone’s time’ yet still thriving since it gets the job done. I really enjoy NET when working with RD and learning it. But that’s a tremendous hurdle small companies can’t afford to leap over with a dedicated department.
I pretty much answered my own question...
12:54 AM
The other key point is that you need nothing to get a VBA solution.
With a .NET solution, you now have to distribute a dedicated installer, ensure that everyone has the stuff they have to have, and most likely will need an admin privilege to install, etc. etc. etc.
That is (IMO) a big reason why VSTO failed
it simply did not lend itself to sharing very well and that's a big showstopper for the Morts who need to get their TPS report in by Friday 5 PM.
we'll have to see whether Office Script gets anywhere.
Starved for attention by IT groups, individuals turn to Excel to get their work done. Over time, they need more 'behavior' - "oh look, there's an IDE built into Excel!".
@this Morts? All i can think of mortician
VBA becomes 'the way' until an app grows to where the IT dept needs/wants to take over.
yep. that's basically the story of every successful applications.
there's also another facet to this where people whose job isn't related to software development and they try to push development of gigantic VBA projects that are really difficult to maintain without stuff like RD.

im looking at you, system (in the HVAC sense) engineers who i work with, who refuse any and all suggestions from me to use stuff like RD to help them construct something in a sane manner
1:08 AM
The biggest problem, however is that IT see it as failure or mess or what have you.
@jcrizk sounds like he needs a big cold cod slapped on his head hard.
what ends up happening is that i eventually end up adding functionality to the desktop app that i wrote for them lol
but that's more work for me!
i actually ended up learning how to use WiX to create an installer
oof. I have used WiX. Not exactly the easiest thing.
and it was pretty fun when i got it all to work together and have it organized in a way that is easy for people to comprehend
yeah, it was definitely not the easiest thing to learn
but neither was cmake lol
that's a big OOF in my book
1:15 AM
True, that.
My main problem was that to use WiX, you first had to know MSI
how so?
if you didn't grok MSI, then WiX would be frustrating because it's really a thin implementation atop the MSI layer
several of WiX XML actually map to some various MSI feature and WiX discourages scripting (for a good reason), so that it can be really flummoxing if you are excepting to just code your way to bang out an installer.
oh i know what you mean now lol
Maybe I got unlucky but back then (that was probably 7 years ago?) the documentation was not that great and I had to supplement my reading with MSI documentation
yeah, the product.xml that i wrote - to me - is super confusing as to why i needed to do some things a very specific way
1:18 AM
That's exactly because of what MSI requires
i wrote it like half a year ago and found the documentation to be helpful, so im guessing that the documentation has significantly improved since you last tried
I'm sure - I recently did find out there's now a GitHub project for writing WiX with C#
it's amazing what can happen in 7 years lol
back then, the only way to do any custom actions was to write C or C++
i bet the OS project that i started last year is still gonna be just me in like 7 years tho lol
1:22 AM
@this interesting...
1:38 AM
@jcrizk Mug and Rubberduck probably said the same when they first started.
they even started out in VBA + Regex
Needless to say, mistakes has been made and lessons learnt.
really lol
that would seem super complicated
I wasn't around then; you'll have to ask Mat for the war stories.
oh man that blog post is hilarious lol
it got me into the rabbit hole of developer patterns, and i can attribute each one to at least 1 person i interact with at work lol
i'm scared that i might be a mort, but feel i'm more like an elvis
1:49 AM
most of my coworkers seem to fall into this category though

"The last time this one wrote a try/catch block was during the lesson on exception handling."

because they're mech. engineer grads who rote-learned how to write c# and matlab code lol
idk how they even got the interop to work, but somehow it just works
2:22 AM
@Cyril I’m a mort when working on the extract interface fix. I try to work with it and fail miserably.
You can’t start out as an Elvis or an Einstein.
You’ll have me for company in Mortville. We’ll progress out of it together.
@Cyril you're here. That already disqualify you as a Mort.
The archetypal Mort is filling up on his daily six-pack while watching reruns of Hee-Haws and Gilligan's Island so that he can forget the dreary duties he did today and will have to drag his sorry butt to work tomorrowin a haze.
im def a Mort as i sit here attempting to fix this issue


but experience has shown me, the natural place for my head is the wall
Asking questions is simply impossible.
@jcrizk Maybe give a bit more details?
sure, im just having trouble discovering why the test that @M.Doerner suggested returns an inspection result, while a similar test ProcedureNotUsed_Ignored_DoesNotReturnResult() does not return an inspection result
can anyone explain what is the difference between an Array, ArrayList, Collection, and List<T>?
2:30 AM
im in RubberduckTests.Inspections.ProcedureNotUsedInspectionTests.cs. The problem is that the test annotations, you can seem them in the test code in the issue, should not be returning an inspection result.
i have read the collective literature on these in VBA/VB.Net and C# and still have basically no idea
i get the generic/non-generic distinction with <T> but not the actual difference in the structure
@this i mean, i try to learn abbout stuff, but catch myself doing either the safe thing i know to do, e.g., quick fix, or finding a more efficient, longevity driven approach which is usually more time than i have lol
@IvenBach always nice to have someone to struggle through it with lol
@jcrizk did you step through code?
im not quite sure what an array is in VBA because i always think of arrays as they are in c/c++.

i would say that a collection in VBA is basically an easier-to-use array.

as for a List<T>, it's similar to a collection in VBA. i can definitely say that each entry must be of the same type T. im not sure if that's the case for collections, though, but it's definitely the case for List<T>
no collections can be heterogenous
2:36 AM
@this yeah i have been. i don't really know how parsers work, but im learning as i go
of course if T is object then...
ok, i couldn't remember if collections were heterogeneous or homogeneous lol
someone hasnt used vba very recently :3
anyways it sounds like they are basically the same thing
no, i've been inundated with writing in other languages both due to school and work
although, when it's pragmatic to make something in VBA i def do it
probably the actual best way to approach it lol
2:39 AM
i work with dozens of people who only use VBA, so i constantly refer them to this project because i know they have tons modules and classes they could be testing better lol
it makes vba so much easier lol
you don't really need to step through the parser
but still, as mat said, once you open the .Net rabbit hole it becomes very alluring to do as little as possible in vba
more important is that you check the inspection itself -- do you know whether the condition you put in (the Any() is working as expecting?
If not, then you need to look in the annotations collection
what is there?
when i did implement that annotation filtering based on a marker interface ITestAnnotation and it was filtering out those annotations, the inspection results still appeared
let me check
so the 1st test case is "@TestMethod(\"TestCategory\")", and i see the TestMethod annotation in that collection in ModuleParseResultsconstructor
that's without filtering the annotations
and then with the filtering, ModuleParseResults.Annotations is null, which is expected
@theVBE-it'srightforme it definitely is lol although im beginning to write more in c/c++/matlab than i am in c# nowadays
3:14 AM
@jcrizk condolences
at least the c++ part
@this when you asked me if the dictionary i was using was Scripting.Dictionary or custom implementation, why was that? is the Scripting.Dictionary not particularly good?
3:40 AM
i kinda like c/c++, but i like the build tools available from VS even more lol
4:20 AM
@jcrizk yes the second time i tried C++ with VS it sucked less because of that
but IDE cant really fix the syntax
i found using c/c++ a lot easier to make stuff with after learning how to use cmake
but learning cmake is akin to voluntarily holding onto hot coals
i dont recommend it lol
it basically does what VS does for you, but you need to configure everything yourself
and also learn enough of the magic to get it to do whatever it is you want it to do
@jcrizk that sounds absolutely miserable
i mean, dont get me wrong. it's really useful. i just think that it's not very intuitive and difficult to learn
4:31 AM
could probably just be said about that language as a whole lol
anwayys back tot he collections question earlier
what do you mean by the structure? i just know how to use them lol
5:03 AM
@jcrizk that is what i meant
like the structure as it relates to usage
basically if collection and arraylist are just effectively list<object> what is the point of having all of them?
in other words they are all different classes but have the same core purpose as a data structure
actually lol i figured out what i needed to figure out simply by asking this on "paper" instead of thinking about them
its funny how frequently that happens
They might have same data structure but the differences can be due to what they provide in their interface. For example, ArrayList is not generic, so you can stuff anything into it but Collection is usually generic, so it can only have a particular type. So ArrayList.
@theVBE-it'srightforme That is why "rubberducking" is a thing. :)
@this yeah i did not understand that conceptually but its becoming increasingly clear
@this so Collection<object> or List<object> are functionally the same as ArrayList?
ArrayList => List
List<Foo> probably is just a List under the hood, but you have compiler enforcing that only a Foo can be added to a List<Foo> whereas List can contain Foo, Bar, Baz.
Thus, data structure could be same but functionalities aren't.
wait there is a List and a List<T> both
5:17 AM
so List is nongeneric like ArrayList?
(I think so. Haven't actually used List but in .NET 1.0/1.1 days there were non-generic versions - ArrayList is nongeneric).
guess the next question!
(what distinguishes ArrayList from List)
I need to correct myself. There is no List
ArrayList is the List.
note that there's IList, but no` List; you have the option of using ArrayList` or SortedList
technically ArrayList => List says that right :3
so ArrayList is the nongeneric standard list
which is effectively the same as a VBA collection
you can actually use ArrayList in VBA just like VBA.Collection. They are almost the same thing.
5:20 AM
except arraylist has more functionality from what i get
so is there any reason to use VBA collection over that?
not have to rely on having .NET installed on your computer?
doesnt everyone?
you also probably don't want to early bind code that depends on .NET stuff, either.
5:22 AM
i still dont see arraylist in vba lol
you need to add a reference
you can use it late bound but then how do you verify the code when compiling?
^ or use it latebound.
something like Set list = CreateObject("System.Collections.ArrayList")
ill pretend i understand the difference between early and late binding ;)
5:23 AM
oh well there's my reason
i mean under the hood
You gonna. It's fairly important.
adding a reference is way too involved for my level of existence
At least it seems to be for Access projects.
you already have to do that for the dictionary!
5:23 AM
who says im even using dictionaries?
see that's why I conditionally compile.
@this <is listening if you have time>
dictionaries are so useful
tbh i probably overuse them
actually speaking of that @this if you didnt see my earlier question, i was curious why you asked if i was using scripting.dictionary specifically
#Const LateBind = 0

#If LateBind Then
Public Function GetMyThings() As Object
Public Function GetMyThings() As Scripting.Dictionary
#End If

  Set GetMyThings = CreateObject("Scripting.Dictionary")
End Function
Sorry - life kind of barged in a bit earlier. :)
@this its all good of course
I asked primarily because some choose to rewrite the implement so that the VBA can run on both Windows and Mac since Scripting library doesn't exist on Mac OS X.
5:26 AM
oh have it in a VBA module
See Tim Hall's VBA-Web (I think that's the name?) for an example of implementation to run on both Windows/Mac
i learned yesterday how dictionaries actually work under the hood and it was interesting
but i still dont think i could implement it without help
If you have no need to run on Mac, no sweat. It's actually preferable to use the native implementation instead of VBA's implementation anyway
oh then yeah i wont bother
tho i am curious
how does it compare to the .Net Dictionary
You could implement a data structure in VBA, yes, but it's not going to be efficient or fast.
Scripting's nongeneric. .NET can be used as generic.
5:28 AM
yeah it's like a hashtable or something under the hood. im not really sure what that is, but it really makes me hungry
@jcrizk hash function is magic thing that takes input and turns out unique integer output
so dictionar is just big array that is mostly empty
you've probably used SHA256, MD5 or various hash functions
then each key gets assigned to index with the hash output
5:29 AM
Mind, that's cryptographic hash functions, not usually used for hashtables
But the principle is similar.
then when you retrieve a key it recalculates from what you feed it and grabs from array index
that is the tl;dr
i could not explain cryptographic ones at all :)
these are all words that im filing under "it works, so dont touch it yet"
basically think of the dictionary class wrapping an array like integer[0, 10000] and having a private hash function
so when you call .Add("a", 1) the dictionary calls GetHash("a") and gets a value of 100
so then it stores 1 in integer[100]
then when you call .Item("a"), it again calls 'GetHash("a"), gets the same value of 100, then returns integer[100] to you
oh that i do know. that's how i figured it was working under the hood
i've just not put too much thought into it yet lol
oh you mean the hash function part?
that is magic :)
also im still glad i explained that because i now understand it perfectly clearly myself
5:35 AM
no not the function. just the overall structure of it basically being a Nx2 array
i get the purpose of the function tho
@this back to what you were saying, is there any advantage in VBA to being able to use the generic versions over the non-generics like they tell you in C#?
here's the thing - you don't have generics anything in VBA.
@jcrizk dictionary is so much easier to get conceptually lol
@this i know i mean wrapping the .NET generic and making that com visible
yeah, that's actually what RD API did
see Declarations class, compare to Declaration class
the one you showed me that was obsoleted?
5:37 AM
I think I only showed you the Declaration but not Declarations
<tries to remember link>
but keep in mind that in VBA world, it's basically an IEnumVARIANT
which means you can do this: Dim v As Variant: For Each v in MyStrongTypedCollection
and that would be legal
so would be Dim o As Object: For Each o In MyStrongTypedCollection
you cant have MyStrongTypedCollection reject that?
because it has to return IEnumVARIANT?
and so would be Dim x As Foo: For Each x In MyNotFoos --- it will compile but cause a runtime error
it simply just doesn't get checked at the compile-time, like in C#
yeah but things compiling and then causing a run-time error is a hallmark of the vba development experience
5:39 AM
and that's why C# is so alluring in comparison.
nah, compiling is always the last step in the development process
so if i had a nice error message that popped up if someone did that so they didnt have to figure out what was causing the run time error that would at least solve the problem a bit
at least my development process
but is there even any reason to have strong typing for vba performance or other considerations wise?
@jcrizk in vba?
5:42 AM
I am not sure whether there is a performance benefit. In fact, even if there were in C#, it might not be there when using COM
okay so there is no point to have a List<T> or Dictionary<T,T> wrapper then
@theVBE-it'srightforme in every language. as soon as i hit compile and i receive no compile errors, then i know it's good to ship
@jcrizk famous last words haha
@jcrizk you'd be surprised at how many ship their code without ever compiling at all
im really not because i work with people who do that
5:44 AM
that is because the VBE doesnt force you to hit the compile button manually <3
and then im baffled about how they get confused about when bugs pop up
one time we inherited a legacy project that would not even compile - they had errors come out of woodwork and they claim that the application "works"....
@theVBE-it'srightforme well, there is some - you do get the semantics and you can ensure that the Add is strongly-typed
"man, i swear i saw it compile though. idk why it wouldn't just run after that"
it's only the enumeration that you need to be careful with.
of course how do i have someone consuming it in VBA tell it what type to use
i guess just an enum in the wrapper?
5:46 AM
like consuming the StronglyTypedCollection in VBA
not following what enum has to do with it
well like how do you tell the wrapper class which strong type you want to use when VBA doesnt let you use a type as a variable
no StronglyTypedCollection<Integer> or w/e
so i was thinking have the factory function take a parameter that is a public enum
like all the public enums on the MSForms for setting different control attributes basically
I'd just create individual collections for each type
e.g. Declarations for Declaration, IdentifierReferences for IdentifierReference and so forth.
okay i need to look at the RD API again
5:50 AM
man this issue still perplexes me lol
can i just find that on the GH?
Mind you, in C#, you absolutely can implement it as a List<whatever>
i think i'll deal with it tomorrow or maybe wednesday lol
cheat: go to github.com/rubberduck/rubberduck-vba
@this ty
@jcrizk what issue
5:50 AM
you'll see a dropdown. By default it'll show next
change the dropdown and select RubberduckAPI
that will show you the old branch with the old Rubberduck.API in the list
@this found it ty
it's an easy issue, so naturally it's difficult
@jcrizk Sorry, I don't have enough clarity.
it's alright lol i just gotta keep banging my head against the wall
5:52 AM
so just compare declaration to declarations basically?
there are few other classes, too
at some point, a lot of it will become clear
but for the purpose of making collections, Declarations suffice.
@jcrizk if you're still stuck, post here again with maybe some screenshots of what you see
and the current code that you have set up in the inspection test
yeah i'll def do that at some point this week when im not doing school work lol
@this oh man i am not following the difference between those two classes at all
5:54 AM
some of the stuff that i've tried make me think "y u no work?"
oh wait lul
so Declaration is the type
then Declarations is the (strongly typed) collection storing it?
@jcrizk yeah i cant help at all lol
it's fine. i feel like im really close to figuring it out though
there's just something that im missing
@this so you are saying basically just have IntegerCollection and StringCollection and so forth they can use the familiar syntax
then internally its just List<int> and List<string> etc
and no need to wrap one for variant or object or w/e because ArrayList accomplishes that
we'll see the actual code this produces
but that helped quite a bit so thank you :)
@jcrizk so frustrating
okay im gonna go try to focus on this
gn all
6:03 AM
1 hour later…
7:28 AM
First full week back at Uni. Hope to pass my classes again this semester. Fairwell sleep. It was nice knowing you for a brief winter break.
7:40 AM
@jcrizk Why do you filter the annotations? What you should filter are the declarations for which a result is generated based on whether they have a test annotation.
8:33 AM
Btw, from where do you get the annotations variables in the code fragment you posted?
I kind of get the impression that you are looking at the wrong thing.
1 hour later…
9:58 AM
10:17 AM
@MathieuGuindon Hi Matt, I've tried the ListArray on my Notebook and I've Encountered error Run-time error '-2146232576 (80131700)' Automation error. From what I've googled, it's because i was missing .NET 3.5. So after install, everything works. Is this often missing from people's PC? I don't want to create addin that's dependable on installing something for non-admins.
10:29 AM
It 'can' be possible I broke something. My question is primary - if there is a new installation of Windows with Office, is it possible that the functionality of ListArrays will not be enabled for them?
2 hours later…
12:06 PM
well, this is fun. AutoComplete sometimes triggers sometimes not...
> 2020-01-28 06:59:45.5546;DEBUG-;Rubberduck.AutoComplete.AutoCompleteService;Keypress was handled by SmartConcatenationHandler.;
The log shows that when it does, it shows nothing when I try and it doesn't. I see nothing in the log in the hot-key handlers about getting any sort of hooking set up, so I guess it doesn't involve that.
Plus, I'm still having issues with my ODBC connection to our Azure data base. :(
By 'declaration', do you mean filtering the inspection results? If so, I think that's what I stumbled upon being what I should try last night, but I couldn't figure out how to implement it.

I initially tried to filter the annotations because I think you had previously suggested it, but i found that it wasn't doing what I expected it to do; so, I ended up just walking through the debugger looking for something that might give me a clue.
@M.Doerner I got it from the Rubberduck.Parsing.VBA.Parsing.ModuleParseResults constructor. The change I made did actually filter the annotations, but an inspection result still appeared; so i figured i shouldn't be looking at the annotations and began looking elsewhere.
12:38 PM
@Cyril I've been using Brave since you suggested it. One big drawback I've noticed - it doesn't remember a download location per URL like Firefox does. I've got to DL a lot of files, and FF does a great job of remembering "oh, you're at foo.com, so you want this to go to \\server\foo\downloaded" and "hrm, this looks like baz.net, so you want this file to go to c:\downloads\baz stuff crazy", etc.
@SonGokussj4 then you need a custom collection class, or non-mutating arrays. remember the only reason you're looking at this is because you're mutating an array.
12:55 PM
I don't know what's up with Outlook of late, but it seems that it's just randomly crashing about once a week, taking the email I've been working on with it while not having saved a draft. :/
@FreeMan well at least you're not working with Lotus/IBM Notes, which is the world's worst email application.
I have worked with that in the past, and I can 100% confirm your statement!
Ah that makes me feel slightly better
You understand my pain.
1:17 PM
Taxes! Beautiful, lovely taxes! Ah haaa! Ah haaa!
Got my last tax paperwork yesterday.
4 W2s, 2 1099s, and 3 proofs of health insurance (2 haven't come yet, but I only need them if I'm audited; I don't need to send copies of them in).
1 W2 from each employer and a 4th because of my IRA rollover.
A 1099 from my main savings account and another one from my CD.
@IvenBach Pretty much, yeah. Basically, I'm saying don't wrap a dependency inside some code and inject the wrapping code--inject the dependency directly, or make an explicit wrapper over it that can be injected and doesn't do anything except wrap it.
oh wow that's quite a bunch of stuff
@jcrizk Your princess is in another castle.
You should not filter the annotations, but results based on annotations.
The only changes nessesary are in the implementation of the inspection itself.
You can get the parse tree annotations on a declaration via declaration.Annotations.
These basically consist of a parse tree context and the actual annotation you can reach via parseTreeAnnotation.Annotation.
@Hosch250 it's a joy, ain't it?
1:32 PM
Yep :)
any thoughts, Mug?
1 hour ago, by FreeMan
well, this is fun. AutoComplete sometimes triggers sometimes not...
Of course, I get that with the hot keys, too.
1:47 PM
@FreeMan I wonder if that could be requested. not sure i've seen that on vivaldi or chrome
I also like the ctrl-tab switches to the last tab in the foreground, instead of just the next tab in line.
<-- uses a lot of tabs
@FreeMan having just learned about the ctrl+# to quick swap tabs has been wonderful for me
i don't tend to have more than 7 at a time (i work from a SharePoint most of the time, so open up Opportunity location, get the archive folder, the executd folder, and the main documents plus reference links) so i use my tabs 3, 4, 6, & 7 most of the time.
@Hosch250 that sounds like being a constultant... always kind of hated that aspect of it
LOL, not really.
I'm not an independent consultant--I'll only have 1 W2 next year.
(Assuming I don't leave the company...)
but, use intuit/turbotax to get all of the paperwork ready, but DO NOT file it... log onto the gov site and fill out exactly as in the PDF/reviewer and you just filed for free
I started with one company, and then they got bought out.
1:53 PM
So I had 1 W2 from each. Then I have 1 W2 from changing jobs.
This is exactly why I have no intention of becoming an independent consultant, though :)
i think i had 6 W2s in 2015, so that year sucked balls
LOL, ouch.
The 4th W2 is because the company that bought my company out was shutting down the old retirement plan so I had to pull my money out and move it to another plan.
that makes a bit of sense; that was part of how i had 6 W2s
I'm glad I didn't have any "extra" income, like I did last year.
I had to file a separate schedule for a referral bonus I got last year.
1:56 PM
consulted for company A, their preferred vendor designation was removed so my sponsor worked to get another company to pick me up, B, so had each of those W2s, on top of two retainer-W2s and two other 02M gigs at the end of the year
Hey folks, new to Rubberduck, been doing VBA for ~5 months for automation purposes in MS Word, think I'm pretty good at it. Branched out to Excel and then XML/DOM/HTML manipulation about 3 months ago. Happy to be here.
Sounds #fun.
"extra income" doesn't make sense to me... but i think it's become i've never exceeded that $2,500 with it being untaxed
@jclasley welcome to the pond, JC
@jclasley welcome!
Basically, any extra income that wasn't covered by a W2.
Cash from doing odd jobs for a neighbor, or whatever. That kind of thing.
If it's cash, most people don't bother, because it's a pain to track it (both for them and the government) because there's no paper trail.
1:59 PM
true; i remember reading that if it was less than $2,500 in other income you didn't have to file it
For my company, bonuses are classified as extra income and taxed heftily. Pretty unfun to watch your sweet sweet dollhairs disappear at a rate of like 40%
That might be true.
@jclasley Yes, that's another reason I won't work as an independent contractor.
00:00 - 14:0014:00 - 00:00

« first day (2062 days earlier)      last day (31 days later) »