« first day (1650 days earlier)      last day (1530 days later) » 

5:00 PM
> In the interface

`Public Sub AddValuesItems(ByVal property_path As String, ParamArray Items() As Variant)`

In the class

```
Private Sub ICxpSimplifier_AddValuesItems(ByVal property_path As String, ParamArray Items() As Variant)
AddValuesItems this_property_path ,items
End sub
```

and

`Public Sub AddValuesItems(ByVal property_path As String, ParamArray Items() as Variant)`
 
grabs all the tables that it has and soon for the access databases, the modules and module versions so i can keep track of if something really needs an update to the modules
 
> > **ParamArray array is passed as a ParamArray argument**
> An array of parameter values ('ParamArray') is being passed as the first element of a 'ParamArray' argument: the invoked procedure will recceive the variant array at the base index of its own parameter array. Procedures taking a 'ParamArray' argument should take steps to verify whether the only element of the array contains another array.

Okay that's tentative wording - and definitely needs some work. But the triggering code would
 
man, im going to have so much infrastructure updates to do
 
> @SteveLaycock that's what I suspected. It's not really to do with the interfaces as @retailcoder pointed out. See my prior comment for workarounds in that case since you are calling a class implementation of the function from the class' implementation of the interface.
 
@KySoto who screams for refactoring? We all scream for it!
;-)
 
5:07 PM
oh just this function i created... 2 years maybe 7 or 8 months ago?
its..
-_-
embarrassing
it works
 
floaty box is back! and in the fuzzy browser, to boot!
 
but its so damned complex i have a hard time understanding whats going on it it
i need to do some stuff where i go create sub functions to handle parts of it
if only to help with readability
 
> Its the implication that is the problem. If I pass a list of variables via an interface I expect the class to receive the same list of variables. That's whatcaught me out. If I were passing a paramarray to another procedure I would know exactly what to expect.
 
@KySoto we've all been there.
 
I know the pain. I have a project that I wrote and it's been just.... "growing".
 
5:09 PM
the function isnt vital
but it ties into something i needed to upgrade
so if im going to work on it
 
and it's hard to justify paying off the tech debt when you have to pay actual bills but it does accumulate, and eventually you must pay off the debt.
 
i need to make it so that it doesnt suck
 
yeah, that's a good approach for paying off large debt.
 
i need it to scrape the module information
since before it was just scraping table and report data
though i never ended up using the report data
 
@Duga Wut? You are calling the class implementation from the interface implementation...
 
5:10 PM
im honestly probably going to chuck it
 
Don't chuck it, duck it!
 
@Duga hmm. not seeing the relevance of interface in this situation.
^^ What @Comintern said
 
but i need to know what applications need to be updated
 
as tempting as it may be, that can be actually a bigger mistake. See: Nutscrape
 
Why do you need to update applications? Just provide a shim until the next time you touch them.
 
5:31 PM
well if for example, i find an older application using the old version of my emailing code that i refactored into a class version, it will take work
i dont actually know all of the applications using that
because of an engineer
and if those older applications arent even using the code libraries at all, it means that im going to need to at some point standardize the save code
 
@Duga I get the impression that this is all a misunderstanding about the specification of ParamArray.
 
5:58 PM
I just had a light bulb moment. (First one all week, I'm excited!)
I've modified my logger (Thanks Mug!!) to allow me to change the logging level while the log's open.
Now that I'm saying this out loud, I'm not so sure it's a bright bulb...
In my error handlers, I was thinking it would be a good idea to change the logging level from whatever it was to Trace so I can get more details as execution completes.
However, since I'm going through and putting an error handler jsut about everywhere with Error level logging that will get logged almost no matter what, I'm not so certain that makes sense anymore.
I'll just go with the "change logging levels on the fly" as the light bulb moment.
Then, I can look at where my last higher level log line came from and put Trace level logging in from there to minimize the amount of log I need to read through.
thanks, self, for being the duck...
I s'pose I should submit a PR for the LogManager.ChangeLogLevel code.
 
heh....
> Another example is the progression of Microsoft dynamic technologies:

DDE
OLE 1.0
OLE 2.0
COM
ActiveX
DCOM
COM?
 
I hear they're working on DEFCOM. Mostly 'cause they need more acronyms.
 
@FreeMan hmm, do I even have that on GH?
 
0
Q: VBA, Code to open workbook and copy pages to master workbook is slow

excelguyI have this code which opens 2 worksbooks, copies a sheet and pastes to master workbook. It is currently taking 3 minutes, can this be done quicker? Ie without opening each workbook to copy ? Takes roughly 3 minutes to do. Sub Load() Dim masterWB As Workbook Dim dailyWB As Workbook Dim lastwe...

 
6:13 PM
@MathieuGuindon I doubt you emailed it to me or pasted it all in chat...
oh, wait! It came in my swag box!!!
;)
 
> @SteveLaycock sounds like your interface implementation is invoking some equivalent procedure on the class' default public interface, so you're passing a ParamArray parameter as a ParamArray argument, correct?

e.g.

```vb
Implements Thing

Public Sub DoStuff(ParamArray stuff() As Variant)
Thing_DoStuff stuff
End Sub

Public Sub Thing_DoStuff(ParamArray stuff() As Variant)
'here stuff is only 1 element when invoked from Me.DoStuff
End Sub
```

If that's the case, then the f
 
@Duga I believe it's likely more involved than other inspections typically are
 
It shouldn't be - there'd be a parameter declaration on both sides of the call with a paramarray flag, and didn't you just add a method to the DeclarationFinder to resolve the passed arguments?
 
6:30 PM
yeah
but then do you want the inspection result if you are accounting for that fact and verifying the length of the array and, given 1, verifying whether IsArray is true for the first element?
 
i think so, yes?
 
Why? I can't think of any legitimate reason to do that.
 
cos that'll still be a variant()()
 
> Well yes and no. I understand how paramarray works and I don't have a problem with it. However I mistakenly assumed that the interface would be transparent and not mutate the structure of of the procedure parameter list. Its what happens when you are ' Clever enough to understand you're not clever enough'
 
I'll go on a limb and say that it's always the receiving procedure's responsibility to process the paramarray that it's passed.
 
6:33 PM
^
 
^
 
so we warn on 100% of cases where a paramarray is passed to a paramarray?
 
I would.
 
k
is there a fix?
 
If they think they need to do that, annotate it.
 
6:34 PM
^
The fix would be to change the called function to a Variant
 
sure, but if RD can suggest a better alternative... would be better
 
The only fix I can think of is an intermediate procedure that takes a Variant and trampolines it to the other procedure.
 
The thing is that the Variant fix implies that the procedure ought to be private
else, we are mutating the interface
possibly needs a ... oh, do I dare say it?!?
Extract Method
 
1000V through the keyboard?
 
6:36 PM
OMG He said it!
 
Nope, don't need extract.
The code on the issue could quickfix to this:
Public Sub DoStuff(ParamArray stuff() As Variant)
    DoStuffTrampoline stuff
End Sub

Private Sub DoStuffTrampoline(stuff As Variant)
    Thing_DoStuff stuff
End Sub

Public Sub Thing_DoStuff(ParamArray stuff() As Variant)
'here stuff is only 1 element when invoked from Me.DoStuff
End Sub
Or however that works.
 
but if you originally had 2 public functions?
to use the Variant QF, it really shouldn't be exposed, I think.
 
@Comintern not sure what that changes, really..
other than not passing paramarray to paramarray directly
the real problem is paramarray proc expecting [foo,bar] but getting [[foo,bar]]
and there's no fix for that
 
Let's try that again... Given the original code:
Public Sub Foo(ParamArray bar() As Variant)
  Baz bar
End Sub

Public Sub Baz(ParamArray bar() As Variant)
  'do something....
End Sub
 
the problem is needing to "trampoline" a ParamArray in the first place
ParamArray args should be iterated, not passed around
 
6:41 PM
the most logical QF for that would be:
Public Sub Foo(ParamArray bar() As Variant)
  Doit  bar
End Sub

Public Sub Baz(ParamArray bar() As Variant)
  DoIt bar
End Sub

Private Sub DoIt(Args As Variant)
  'do something...
End Sub
 
agreed, but from a confused user's perspective, it raises eyebrows
I think the best we can do is just explain what's going on, and agitate a big huge red flag
 
if (!plan.getName().substring(plan.getName().lastIndexOf('.') + 1).equals("zip")) {
~heavy sigh
 
do they pay by keystroke?
 
@MathieuGuindon Pretty sure the marshaller takes care of wrapping and unwrapping the array when you do that. It'd need to verify it though - it's kind of a hack.
Although I like the other QF better - it's a trivial method extraction (the entire method).
 
6:48 PM
@MathieuGuindon for some of R# suggestions, they provide a tooltip for inspections that can't be quick fixed. Do we have something like that?
@Comintern the QF probably should insert a comment, though. Mat's right that it'll raise some eyebrows.
 
Like a tooltip that says "Rubberduck has no clue what you think you're doing there..."
 
close but as an easter egg have few random princess bride quotes.... 1) Inconceivable!, 2) You keep using that word. I do not think it means what you think it means., 3) My name is Rubberduck. You killed my sanity. Prepare to die.
 
InconceivableCodeInspection
 
^
 
@this 2) for variant returning functions that could return a specific type if they didn't return errors
 
6:53 PM
How long has SO had the "List of all 174 SE sites" dropdown? That's horrible UX.
 
@Comintern Forever.
 
Bottomless combobox.
 
searchable bottomless combobox
 
I should write a Google dropdown for that.
 
and you can configure sites to not show up in the combobox
            if (PlanTypes.isPlanTypeURI(plan.getPlanType()).equals(PlanTypes.BUILD)
                && Boolean.parseBoolean(Settings.OPENTOSCA_DEPLOYMENT_TESTS)) {
~more sighing
 
6:57 PM
@this That alone would make RD worth twice the price I paid for it!!!
 
@FreeMan Have you paid in anything except bug reports?
 
Frankly, I'd be good with an inspection with a warning that says "This isn't going to do what you think it's going to do." I recall spending some time trying to figure out what was going on there, as well.
 
only twice? You know it's same as tenfold, right? Heck, go wild and say it's hundredfold! Thousandfold!!!
 
@Hosch250 Hey, now, I fixed up some private member icons to make them more identifiable!
guess I need to submit at least 2 more PRs to be good for my word
 
@MathieuGuindon i'm wondering - have you ever had a scenario where you exposed a class' backing UDT (e.g. for easy passing in via a Init method perhaps)?
 
7:09 PM
nope
wouldn't be legal anyway
 
no, it'd have to be inside a standard module
in this case, I ended converting it to a model class and used that as the original class' backing field.
 
all that just to avoid exposing a Create factory method on the default instance? ;-)
#depends, I guess
if it's a lot of parameters..
but then, I'd have Create only intake the get-only ones
 
I might be passing it in more that once. Haven't thought that far ahead.
 
@this - I did something similar in managing the 5 different kinds of reference information objects and structs in my PR.
The ReferenceModel has a ToReferenceInfo() method that spits out a copy of what would otherwise be a backing struct.
 
Right. I guess it boils down to whether it's a model vs. a configuration
(not sure if "configuration" is the best term for what normally becomes class' private backing fields)
and thinking further, passing a model to Init or Create would be a wee bit funny.
 
7:21 PM
ReSharper Ultimate 2018.3 EAP9 is here, and it has a heap of bug-fixes https://www.jetbrains.com/resharper/eap/
 
@TweetingDuck Hoping some of them address the performance in VS2017.
 
@Comintern i think they stand a better chance of curing world hunger first.
 
EAP = Employee Assistance Program?
 
Early Access.
 
ah...
;)
 
7:28 PM
may require Access.
 
at least it doesn't require PowerPoint
 
That's EAPP I think.
 
Coworker: I’m having computer problems.
ME: delete system32 folder and you’re golden!
 
O_O
The midas touch?
 
> Also me: pull the power cord, all problems solved
 
7:39 PM
> Coworker: I’m having computer problems.
Me: Cool story, bro.
 
can you still hose windows by deleting system32? I figured they already had locked it down by now.
if anyone else want to try it out, be my guest. :-)
 
At work?
 
I'll file a ticket with QA. "Deleting system32 crashes our software. Can you replicate?"
2
 
@Comintern For sale: Computer, never used.
 
@Comintern I wish. My title is “Programmer/IT” and I become first line of defense with problems.
 
7:59 PM
being level-2 for helpdesk tickets is a bliss
 
Especially when I'm in the middle of coding ~.~
 
> I think one reason why a ParamArray parameter on a public member is problematic, especially on an interface, is that you cannot write a decorator for such class. Thus, the natural way to emulate implementation inheritance on in VBA is barred, unless there is a method that takes an explicit array and mirrors the method with the ParamArray.
 
@MathieuGuindon fyi, I'm thinking I'm missing something in regards to the factory and setting the private fields. In the blog, they have examples of public properties that are both gettable and settable.
However to support get-only property, it seems that I have to do something like that....
Interface Ifoo:
'@Folder("Test")
'@Interface

Option Explicit

Public Property Get Something() As String
End Property

Public Sub DoSomething()
End Sub
Predeclared class Foo:
'@Folder("Test")
Option Explicit

Implements IFoo

Private Type TFoo
    Something As String
End Type
Private This As TFoo

Public Property Let Something(NewValue As String)
    This.Something = NewValue
End Property

Public Function Create(Something As String) As IFoo
    Dim Result As Foo
    Set Result = New Foo
    Result.Something = Something
    Set Create = Result
End Function

Private Sub IFoo_DoSomething()
    Debug.Print This.Something
End Sub

Private Property Get IFoo_Something() As String
this works but feels a bit too magic-y due to splitting the members between two "interfaces", and adding a backing field means lot of additions to the implementation to boot. Am I overcomplicating this?
In addition, we can't use LSet since the UDT is private, nor would setting it make sense.
Seems to me that using a model class as the backing field rather than a UDT means that the base class don't have to have more than 2 methods that's off the interface.
 
8:16 PM
@this no, you're right
model class could be all public fields
 
yes that's what I was doing earlier, in fact.
I think that model class instead of a UDT is probably better since it avoids the need to change the base class, at least for this case of needing a class that contains a set of get-only properties.
(well, more specifically "readonly" get-only properties), in the C#'s meaning of readonly.
 
would it be confusing to call them "POCO" aka "Plain Old COM Class"?
 
POCO/POJO is a terminology that's common to C# and Java devs. TBF, I never see any VBA devs use any terminology like that.
 
(a POCO aka "Plain Old CLR Class" in .net is a dumb class whose only role is to carry data, i.e. to expose get+set properties)
@this true
 
In fact, I don't think I ever saw them using classes like that.
when they do use classes, it usually is ...."smart class".
which only make them more horrid.
 
8:25 PM
POCOs do help lighting up the "thinking in terms of objects" bulb though
 
oh totally.
IDK if they'll understand better if we simply refer to them as "model class" vs POCO. Need poll, I guess.
one major problem with using POCO as the backing field, though is that you lose compile-time validation. The Create factory method probably should still have them split as individual parameter if that matters.
NB: the other terminology I've seen is DTO (data transfer object, IIRC). But I think that's mainly with PHP.
 
I agree, however the term "model" is rather.... loaded.
overloaded
 
yeah that is true.
 
wow "DTO" is what I used to call them, pre-C#
 
you actually used them in VB6?
 
8:32 PM
yup. VBA actually.
 
NB #2: it should never have been language specific to start with. Just call them POO.
4
 
LOL
in Java they're "beans"
 
hmm never heard that term before. At least it can be suffixed.
TBH, I'd rather call my model classes with the Model suffix as to remind that its purpose is just that.
 
or ground into powder and infused into hot water
 
That, too.
I just can't see suffixing with Poco or Dto
 
8:36 PM
I used to prefix them with dto ....but that was another era.
 
I think the "plain" part takes precedence there - if it's plain, it shouldn't be decorated with a suffix.
 
so, PlainThing is the model class for a Thing?
 
ThingModel is the model class.
 
@this now picture a domain where you need a Category, Fabric and ...Model classes
 
I might be doing it wrong but normally I have a class that is responsible for something... let's say XMLWriter.... I'm going to have a model named XMLWriterModel
 
8:38 PM
ModelModel is pooetic
 
For a Thing. Not all OO is MVVM.
 
^^
 
(not a typo / bad pun fully intended)
 
The point being, making a model that's named XMLWriter seems... weird.
I figured. ;-) Hence my agreement.
 
@MathieuGuindon nop
 
8:39 PM
no?
 
beans are usually everything but POJos
 
Beans are the things you get injected from your DI
at least most commonly..
 
and also, one more thing - in general, there are usually at least one model that correspond to a class using it.
 
of course there's more than one kind of bean out there
 
8:40 PM
I'm allergic to hard beans, and coffee beans smell like the sewage treatment plant. Does that mean I can't use Java? :P
 
@this XmlModel doesn't sound weird though, but what's the difference between that an XmlDoc, other than implying that it's geared toward a particular architecture?
 
Green beans are OK, though.
 
so "spill the beans" means "memory leak" then
2
 
@MathieuGuindon Pretty much :)
 
suffixing the Model to the one-trick pony model simplifies the brainwork for naming.
 
8:41 PM
But if it's otherwise obvious, why not go with obvious?
I mean TextFileModel sounds ridiculous.
 
@Comintern XmlDocument implies it's an object, and possibly a expensive one at that. XmlModel might work but then again, could be ambiguous.
hmm but calling it TextFile that's not a handle to a open text file is confusing, no?
 
From the same token XmlModel implies that your expensive thingy is cheap.
 
unrelatedly: major-ish whoopsies at SE:
Apparently the API bypasses validation, @Vogel612 (mobile app). I'll look into it. — Shog9 ♦ 48 mins ago
 
If in doubt, RTFModel
 
nothing that's too bad, but still... outright bypassing validation
 
8:43 PM
Mind you, I agree with you that if there's a obvious name, we'll use that; no need to go all HN on all possible classes. Especially when it's a model that's used by several different consumers.
But it seems that lot of times, the model end up being used by only one consumer.
so the <consumer>Model simplifies the naming nomenclature. #Lazy
@Comintern Not sure how you arrive to that conclusion.
 
FWIW I totally support this scheme. I just have a thing with ModelModel
 
Oh, I'd totally have a cow myself.
might as well break down and call it ModelData(if there's already a non-model class named Model)
 
@this Just because something is called Model doesn't mean that it doesn't have a crapload of overhead.
Modeling an XML document is just as heavy if you call it a document.
 
That is true. In this situation, they've violated a convention.
 
@Comintern org.w3c.xml.Document
 
8:47 PM
That's the problem with any conventions; they're.... convention.
 
welcome to JAVA where the convention is to violate convention
 
See: COM.
 
hmm now I'm imagining running a JAVA COM server....
 
JNI probably can do stuff like that, soo ....
 
8:48 PM
Convention Obviously Mandatory
 
if that's not a hell for the programmers, I don't know what its.
@Vogel612 not a matter of whether it can but rather whether it should be. And it shouldn't be. Especially not out of free choice.
 
> "You were so preoccupied with thinking whether you could that you didn't stop to think whether you should."
2
 
^that applies to so many things in life
 
9:17 PM
huh, how about that. seems we still have a Prime Minister, for now...
 
is it customary for you to be scurrying around without a PM?
 
It seems so these days, #Brexit
She just survived a no-confidence vote
 
congratulations?
 
Meh, just get it over with, mkay?
 
lol
 
9:21 PM
@Hosch250 uh, thanks?
 
:)
I mean, the brexiting.
 
@Vogel612 would love to! everyone's soooo bored of it now...
 
@Hosch250 not sure what's gonna be over faster. the brexiting or the trumping
 
The entire episode makes me want a couple new series of "The Thick of It".
 
Me either.
 
9:23 PM
driving, bbl
 
Last election had terrible candidates. And nobody is stopping to think about how to make next time better; they are all just flame throwing.
 
LOL, that chatroom is where flamewars almost start.
 
@Hosch250 i think that's a natural consequence of our broken electoral system. It's guaranteed to produce most loser-ish losers to choose between.
That's how we managed to go from GWB to Obama to Trump.
 
LOL.
I was too young to know much about GWB, but I'm not sure he was that terrible.
 
9:34 PM
oh definitely. He's awful.
 
Like?
 
@this You haven't realized we presently are living the movie Idiocracy? President Camacho!
 
Patriot act for one.
 
Agreed there.
 
but more important what we need to realize is that all presidents has in fact continued the previous admin's policies.
e.g. GWB continued and expanded upon Clinton's "peacekeeping missions"
Obama continued and expanded upon GWB's military bases and spying on citizens.
Trump continued and expanded on Obama's faux socialized medicine.
All in the spite of them having claimed that once elected they'd do away with those things.
 
9:36 PM
Yup.
 
Tyrants never willingly relinquish their power.
 
George Carlin had it right long ago.
 
@IvenBach Sad as it is, I never actually saw it but I'm sure we're living it.
 
It's hard to sit through the movie.
 
TBH, though, I don't see why people complain about Trump so bad (or Obama, or anyone). The other one would likely be just as good/bad and have the same general policies--except it would be OK because the news they watch would say it was OK because of party lines.
 
9:40 PM
yeah, party lines are totally irrelevant.
Democrats are Pepsi, Republicans Coke.
 
That's a good way to put it!
Even better, since those brands have little mini wars with each other :)
 
Both cause cancer if used in excess.
 
^
 
Best to use sparingly, if at all.
 
but I better put an end... </politics>
 
9:42 PM
^ yeah
 
I missed my chance to make a comment about healthcare on Iven's post :)
So, what's the next big feature for the duck?
 
hmph. now I really want VBA mocking....
 
After the references dialog, I mean.
 
I don't want to write all abstractions and they're all interfaces anyway.
I guess I'll have to make do with some integration tests until then.
 
@Hosch250 proper AC block completion :)
 
9:44 PM
Once the COM side gets done with the code panes, I'm happy to help with that.
If/when I have time.
 
I don't think we need code panes for that, actually.
 
^ that.
 
(not for that feature, at least)
 
the xaml control can be done without hijacking the panes
 
we just need to set up a generic method of ... mocking COM interfaces.
 
9:45 PM
Oh.
Anything done with the parser and multiple errors?
I could maybe pick up that bit again.
 
Nope and that'd be awesome, too.
 
I'm on vacation next week. I'm not interested in web work, so I might do this instead of redesigning the website.
 
damn, that's true - the website needs to be fixed.... before I get stumped with block-completion
also, almost time to migrate the hosting
 
There really isn't a lot of COM work to do - it's basically just a matter of keeping the code panes in sync.
Other than the debugger that is.
 
9:51 PM
@MathieuGuindon I'm happy to help guide you there. I've a lot of experience with ASP.NET MVC now.
But, I'm not interested in hashing out the CSS and the JS (or TS...) with it.
 
thanks :)
 
And, FWIW, the current one is pretty good, except it's not mobile friendly, etc.
 
just checking - we don't seem to have an open issue for CE not highlight the current code pane?
 
doesn't ring a bell
 
That's because I fixed it. ;-)
 
9:53 PM
hmm. not apparently.
 
To quote OP: "I need a user friendly way to store and backup over 400GB of photos". Speaking as someone who is fully comfortable with the command line, hashing, etc., and I think a manual hash comparison procedure is crazy. Let alone a layperson who couldn't even consolidate/organize their photos in the first place. — Alexander yesterday
LOL.
 
it's not highlighting the active code pane right now.
whereas PE does
 
@this Oh wait, I was thinking of the designers.
 
30 minutes before I go home.
Then I have to work late supporting a prod push.
Then I have to come in tomorrow for the secret santa give-out (my normal WFH day).
 
By "not highlight", you mean "setting focus"?
 
9:55 PM
yeah
 
Friday is a company meeting with lots of stuff (including bonuses, etc., if any, announced), followed by a fancy lunch.
 
yes
 
I can take a look after work. I'm already in there - suspect it might be similar to the designer thing.
 
but I fear this may be a bit more involved than that.
we do have an open issue where we need to expand the folder when searching.
That might be needed for the keeping the active code pane highlighted, too... maybe?
(which feels clunky, TBH)
maybe as its own node, apart from tree. IDK.
 
I'm not sure (I'd need to see how it's behaving). It shouldn't be difficult as long as we're getting the correct declaration.
 
9:59 PM
Interesting, I'm not sure what side effects you mean but the problem is solved when I rewrite the code without using As NewTommy 41 secs ago
 

« first day (1650 days earlier)      last day (1530 days later) »