« first day (1692 days earlier)      last day (1488 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 8 commits. 3 opened issues. 2 closed issues. 1 issue comment. 1797 additions. 399 deletions.
 
 
1 hour later…
1:06 AM
> Intercepted invocation of 'SheetAccessedUsingStringInspection.DoGetInspectionResults' ran for 13372ms;
Hmmm... I was expecting a bit more that a 35% improvement.
 
1:27 AM
Are you still doing com access?
 
@this Nope. That's more of McDonald's.
They did have ski-ball but I found a better game for ticket payout.
 
@IvenBach Hmm i seeme to remember it using to be a prominent feature back in the 80s
 
I've not seen any ball pits except for McDonald's for a while.
 
but have been told that they are doing away with it for uh, sanitary reasons
 
^
 
1:33 AM
i guess ol'Ronnie doesnt give a fig about kids' health, then.
 
Didn't think he ever has. Look at their food as evidence.
 
 
11 hours later…
12:45 PM
> Ref. #1229
> Ref. #1229
>
**Rubberduck version information**

Version 2.3.1.4457
OS: Microsoft Windows NT 10.0.17763.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.11231.20080
Host Executable: WINWORD.EXE


**Description**
I think this is a VBA problem but I'm reporting here for the sake of completeness.

My project has a couple of hand crafted Interfaces. I'm now trying out the Extract interface command in Rubberduck to implement an interface for a new class. Extracting the interface work
 
1:20 PM
@Duga Is that a bug, or an enhancement request?
 
1:30 PM
holy carp, Batman!!!!
600
Q: Potential employer flew me out for interview, cancels return flight

SnahA company I was interested in just flew me out for an interview. It was on the other side of the country so they paid for my flight and hotel. Unfortunately, the interview went disastrously. I blew every question and I could tell that they didn't like me personally. When I got to the airport ...

 
@FreeMan I think the related question on Law SE is the highest voted question on that site.
 
@Comintern at only 181 votes (as of now)? Interesting. I didn't actually read the Law.SE question until you mentioned that, I just assumed that "lawyering up" would be the first course of action...
I would be most interested in hearing both sides of the story - there are always two sides, and usually each is missing some key details in the telling...
 
Once you get past all the OP blaming...
 
Yeah. Totally bombing an interview as he admits to doing does sound like he may have fudged a bit, but still, that's a really crappy thing to do. I'd be interested in knowing what company it is so I could politely decline all interview opportunities with a link to the story. That's just a really, really bad thing to do to a potential employee, no matter how fluffy his resume may have been.
Plus, I don't want to have to potentially pay for my own return fare, just in case my interview doesn't go as well as hoped.
 
1:46 PM
I found myself agreeing mainly with the standpoint that if the company felt like they were taken advantage of, the should have taken legal action themselves.
I.e., if they thought they were defrauded in paying for airfare, sue the OP instead.
Although I am curious why that ever got beyond a phone interview in the first place.
 
Yeah, that^. Don't just strand the guy - looks bad on you. Sue for misrepresentation, looks bad on him.
I'm guessing a dodgy external recruiter or clueless HR recruiter.
 
Just as likely both.
 
2:07 PM
I should know better than trying to answer programming question on SU
0
A: How to open a default sheet on every sheet add in Excel

FreeManSince you tagged this vba, I thought you were adding the sheet using code, but your comment indicates that you're "clicking the add new sheet button", so I'm not sure which you're after. If you're doing this in code, Google* msdn worksheet.copy for documentation on the command. If you're doin...

 
@FreeMan That's pretty close to being a link-only answer.
Except you told them how to generate the links, instead of just pasting them into the answer.
 
so... +1 for creativity? :)
to be fair, it's a pretty vague question considerably lacking in substance
 
Yeah, but bad question doesn't mean bad answers are allowed.
TBH, I'd -1 it if I wasn't too lazy to log in.
If it's that vague, just VTC too broad or unclear.
 
Valid points. Is it reasonable to VtC on a question you've answered?
 
Yeah.
 
2:44 PM
@FreeMan just out of curiosity - have you been working with the latest pre-release
 
To find this out, scientists have conducted a variety of tests using bees, the most awesome one being by Chinese scientist, Lijang Zeng and his team, who devised  system comprised of lasers and tiny mirrors glued to bees back in 2001. This experiment was deemed superior to previous tests, as it didn’t need to use tethered bees (which fly differently) and because it contained lasers, which is of course super cool. We’re fairly certain that a laboratory full of Asian scientists firing tiny laser beams at bees covered in shiny body armour is going to be the next big Syfy channel hit, so rememb
LOL.
 
What? African killer bees weren't good enough?
 
3:29 PM
> Does some member (property, sub or function) of your sub have a parameter or return value whose type is the class itself?
> Does some member (property, sub or function) of your class have a parameter or return value whose type is the class itself?
> Yes. The class is self instantiating so uses the Create/Self method of returning an instance of itself (the class has a predeclaredID).
> Note that the pattern leaves the factory method and Self property getter on the class' default interface though.
> This explains the problem. This is a bug indeed since the refactoring is very naive in how the interface gets extracted.

I am not completely sure how to deal with it though. Anyway, we should not extract an interface in a way that members still reference the original class.
> Do you have an example that reproduces the problem? Tried this rather *minimal* example:

**Class1**

```vb
Public Property Get Self() As Class1
Set Self = Me
End Property
```

Ran "extract interface", selected the `Self` getter, confirmed; I got this:

**Class1**

```vb
Implements IClass1

Public Property Get Self() As Class1
Set Self = Me
End Property

Private Property Get IClass1_Self() As Class1
Err.Raise 5 'TODO implement interface member
End Property
`
 
3:50 PM
I'm missing something
 
I just took the SO survey.
I told them to stop pandering to being nice and focus more on removing bad content.
 
meh. I'm still deeply convinced both can be done.
 
Probably.
But I think they should prioritize the 2nd above the 1st.
 
VTC'd here:
If you can edit your question to include a Minimal, Complete, and Verifiable example with code that depicts the general design you have, you'll get awesome answers and ideas. As it stands though, your question is rather impossible to answer without massive speculations about what you've written and how the components relate to each other. But no, there's no way to "force compilation" - you can't have ambiguous identifiers in any scope, that's just how it works. — Mathieu Guindon 22 hours ago
and here:
You'll need to design a UserForm with a ListBox control showing your available filter values, and configure the listbox to render CheckBoxStyle so that each item in the list gets a checkbox. Then you'll need to write a procedure that determines whether the form was cancelled or okayed, and apply the desired filter accordingly (or not). So yes,it's possible... just many, many, many things to cover - more than can reasonably fit an answer box on this site. — Mathieu Guindon 22 hours ago
and countless other places
point is, there's a way to give people helpful feedback while hinting at a better way to ask questions, without being an @$$
 
Closing and down-voting without leaving comments is the best way.
 
3:57 PM
> If you can't say anything nice, don't say anything.
yup
 
I think a VTC should automatically apply a downvote. And reopen should apply an upvote.
And reopening a question removes the VTC auto-downvotes.
 
> I see several options how to deal with members referencing the class type.

1. Do not extract such members at all.
2. Only extract members where this only affects the return type and change the return type to the interface type.
3. Extract all methods and change the class type to the interface type everywhere.

Option 1 is clearly the most restrictive.
Option 3 can lead to members that cannot be implemented because the necessary information is not exposed on the interface.
Option
 
Disagree. I've actually upvoted a bad question that was at -5. Pile-on downvoting is just bad karma ;-)
@Hosch250 that, I can agree with.
downvoters most likely won't see the reopened, edited post
 
@MathieuGuindon Ugh, that just tells them that someone thinks their question is OK, and the rest of the community is bullying them.
I know, because I've been in that position before :P
Fortunately, I got Q banned, so I stepped back and actually learned things.
 
I did also comment though
 
4:00 PM
Back when Q bans actually meant something.
(I got it cleared by not logging into the site for like a year.)
 
I did find it rather hard to ask questions at <100 rep. but then I learned about meta, lurked there, learned how the site works, and never got in trouble.
 
FWIW, I need to put this at the beginning of my tutorial system: If you have a problem, someone else already had it. Look it up on the web. You won't have an original problem for probably 5 years.
 
> Sorry it has taken so long to reply ... Been busy. I will report the issue to the Windows Insider group soon.
Also, there has never been anything but Office 2010 loaded on either computer. Thanks again for your help.
> @MathieuGuindon Did you try in Word?
> @MathieuGuindon Did you try in Word?
 
@Duga no that was in Excel. wait it crashes in Word??
 
Arrgh, that was the wrong tab on mobile.
I wanted to write in here.
 
4:07 PM
still got the ping :)
 
Hm, I cannot recreate the error.
To be honest, I have never seen that error before.
 
<~ same
 
Is that a feature of newer office versions?
I am on 2010 x86 here.
 
running 2016 x64 here now, no repro
no repro in Word 2016 either
need a MCVE from OP
 
4:41 PM
@Duga Personally, I think option 1 should be the starting point. We can then light up the option 2 afterwards.
in matters of refactoring, it's probably best for the ducky that it never writes any breaking code.
 
@Hosch250 I realized when taking that survey that I've written my first code more than a decade ago
 
Wow, nice.
 
which kinda blew my mind...
And I've been "professionally coding" for 7 years
 
I might be able to work up an MCVE, but I'm struggling to see why this is a bug. I wouldn't expect extract interface to re-write anything for me other than the interface I attempted to extract. If it can't immediately be compiled, that's way to high a bar for me to find it useful.
 
I did mine in 2013 when I 17.
 
4:51 PM
@Vogel612 Got your rocking lawn and plaid blanket right there, for you. Some sweet iced tea. Now yell at some kids to get off their lawn.
4
 
Been paid for nearly 2 years. I'd say I was professional for about 3 :P
 
the questions around managers were kinda funny...
 
@Comintern speaking of compilability(?) - EIR is probably the most problematic - it's too easy to arrive in an uncompilable state (you didn't implement this member!) so I'm not sure that this is a valid metric for this specific refactoring.
 
> "Do you think your manager knows what they're doing?"
- Depends. I think they're somewhat okay at coding and pretty good at managering and their research. I wouldn't trust them with any C code though.
 
I just did Yes, since my managers are good.
I wouldn't necessarily trust them with .NET programing, but that's not their job.
 
4:55 PM
@this haha
 
My direct manager is really good at SQL.
 
@this Right - in this specific case though, all of the options go too far I think. If the assumption is that the user is in the middle of creating a class interface structure, then it should metaphorically stay off my interface's lawn while I'm doing it.
At some point we need to draw a line and say "if the user wants to do this, the user knows what they are doing".
 
^ agreed
 
So basically a big list of checkboxes and methods and caveat emptor?
 
Yep.
 
4:58 PM
except, a lot don't, and will discover VBA capabilities as they explore RD's functionality
 
I can see why a botched rename would be disastrous
 
Having a project that won't compile because you have circular interface references is a perfect learning opportunity.
 
uh, not with VBE's default error message
:D
it might be as well written in greek
 
perfect "great VBA question on SO" opportunity, too
 
OK, fair point there.
 
5:00 PM
but I can see refactoring dialog warning that the code may not compile
 
@MathieuGuindon TBH, I'd much prefer seeing questions like that...
 
IKR
@this agreed - but for that we need to know how to repro the darned error
 
@this That's why my initial reaction was "is this an enhancement request?"
 
I was thinking of a static label
 
disagree here
 
5:01 PM
Maybe smarten it up later but for now it could be static.
 
"Use this and your code might not compile" means we fkd somewhere. a refactoring shouldn't break the oriignal code, period.
 
I was thinking of something that returned a UDT, but I didn't read the issue closely enough.
 
FWIW I'd prefer to focus on 2.4 for now?
 
aye. translations. scp.
 
Sorry, no SCP for 2.4
That should go into 2.4.1
 
5:02 PM
@MathieuGuindon So if I'm extracting an interface, I need to change all the return types first?
 
2.4 is uh. late.
 
whatevs. I'll do the transations PR first anyway :)
 
But anyway we're also waiting on the field testing, aren't we?
 
@Comintern no, but then again I can't reproduce the compile error, so I've no idea whether the refactoring can even know it's going to break the code
 
Back to the EIR - I was digressing - earlier I was commenting about botched rename being bad thing. Is an incomplete interface implementation really the same thing? Seems not.
If I mess up the extract interface, it's usually undoable
Renaming, OTOH, might not be undoable.
 
5:06 PM
should rename check for unresolved identifiers that have the same name as the target?
 
@Hosch250 What survey?
 
(if so, then it should be previewed & reviewed by the user, not automatically done)
 
i don't htink it should - it shouldn't name them.
 
@IvenBach go to SO. top banner should hit you in the face.
 
If I'm renaming an unresolved identifier, then yes, preview.
 
5:07 PM
MCVE:
'Implementation.cls - instancing doesn't matter.
Implements Interface

'Interface.cls - instancing public
Public Property Get Foo() As Implementation
End Property
 
I'm guessing we don't do that currently. But we do at least leave the unresolved identifier... right?
 
@this I'm thinking of Steve's previous rename issue, where they had late-bound identifiers that RD couldn't possibly resolve, yet should have been part of the rename
 
That's a whole other can of worms.
 
that was the variant thing?
 
@this I think so... but then there's no IdentifierReference for it, so ...it's kind of yeah, a can of worms
@Vogel612 yeah
 
5:08 PM
I could see a checkbox Include unresolved identifiers => preview.
In which case, the burden is now on the user to do the Right Thing™.
 
^^ sounds like a good enhancement issue with difficulty 03
because preview
 
But see, now that's a refactoring that could break code.
 
yes, but it's on the user
 
which is why it's forcing preview
 
5:10 PM
Aye. Now with EIR, it's not automatic, either.
 
R# lets me bust things all to hell if I want to.
 
I still get a preview
 
@MathieuGuindon Thar be it. I rarely go to SO's homepage directly.
 
well, a checklist, rather.
 
can also have a checkbox to look in comments and string literals, while we're at it
@Comintern oh, also when you don't... sometimes.
 
5:11 PM
I thought we already had a feature request for looking in comments.
 
I guess the point is that automatic no-interaction refactoring => MUST NEVER BREAK CODE FOREVER; interactive refactoring => yer on your own, buddy
 
honestly: rename can break things
 
@this yep
 
@Comintern Does R# break code in the case where there's no interaction?
 
I think that's a decent rule in general.
 
5:11 PM
@Vogel612 given late-bound code, yeah.
 
EIR = ???
 
but we expect the user to know that they can break late-bound members because we incessantly nag them about late-binding
 
Extract Interface Rename?
 
@IvenBach Extract Interface Refactoring, I think
 
@IvenBach extract interface refactoring
 
5:12 PM
^
 
Close.
 
@this Yes. Particularly on refactoring loops into Linq statements.
 
haven't run into that before.
 
aight: I'm back to merging changes into my monster PR for work
 
@Comintern that's how I learned LINQ :)
 
5:14 PM
Same.
 
> Yes. I'm working in Word VBA.

I tried the following simple class in my current project

```
Option Explicit

Implements IClass1

Public Function Create() As Class1

With New Class1

Set Create = .Self

End With

End Function

Public Function Self() As Class1

Set Self = Me

End Function

Public Function Test1() As Variant

End Function

Public Function Test2() As Variant

End Function

Private Function IClass1_T
 
@MathieuGuindon Same x2
 
> I've attached the class module and the resulting interface in case there is anything I've done in the class module that is causing the issue

[LoggerMain.zip](https://github.com/rubberduck-vba/Rubberduck/files/2788388/LoggerMain.zip)
> Is the interface being extracted instanced as PublicNotCreateable? That's the only way I can replicate this, and it's resolved by changing the interface to Private. Not that on my build, the instancing is Private when the interface is created.
> Is the interface being extracted instanced as PublicNotCreateable? That's the only way I can replicate this, and it's resolved by changing the interface to Private. Note that on my build, the instancing is Private when the interface is created.
> I've tried compiling after changing the instancing to private and publicnotcreatable for the class and the interface. I get the circular references error in both cases.
 
Hmmm... Looking at the code OP uploaded - can a class declare an enum? IIR that's illegal for a normal type library.
 
hmm, I've always had private enums in a class
Never tried a public enum on a PublicNotCreatable class, though.
 
5:28 PM
> I just took a look at the code you posted, and the issue is related to `Public Enum ConcernType` and `Public Enum LocationType`. You're exposing these on members of the interface, but they are declared on the implementing class. All you should need to do in this case to make it compile is move the enumerations that are used by the interface to the interface.

I'm thinking we should probably include public `Enum`s in the refactoring.
 
do we have an inspection for that? I'm of mind that a public enum, even for a public class is a code smell
The only place it should be should be the standard module. Avoid all the nonsense about "not a object module" blah blah.
(which also annoys me to no end - nobody else will know what an "object module" is.)
 
@Duga enums should outright be excluded from the checklist
(and UDTs)
 
I don't think we inspect for that.
@MathieuGuindon You mean exclude the properties that use them
 
arguably the enum definition should be moved to the extracted interface...
@Comintern no
 
> Bingo!! Hopefully a useful contribution to Rubberduck. I'm also really appreciative of the time you guys to look at sorting this problem.
 
5:35 PM
I'm not convinced that enum belongs even on the interface.
 
oh but they do
that's where I put them anyway
 
don't you run into "object module" problems?
 
Technically, in COM they don't even belong in a module.
 
5:35 PM
hmm.
 
> Bingo!! Hopefully a useful contribution to Rubberduck. I'm also really appreciative of the time you guys took look at sorting this problem.
> Bingo!! Hopefully a useful contribution to Rubberduck. I'm also really appreciative of the time you guys took to look at sorting this problem.
 
WTH. I just tried it and it compiled.
My memory is one big lie. :(
 
@this is a cake
:)
 
ok, that's good one.
 
The thing with enums in COM is that they aren't enforced strictly like they are in .NET - they're basically just an int. The "enum" is more of a convenient "group of named aliases".
 
5:39 PM
But I swear, there was a case where if you try to use the public enum as part of the document/class module, you will get an "cannot expose on object module blah blah" error.
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Compile error:

Cannot define a Public user-defined type within an object module
---------------------------
OK   Help
---------------------------
 
aye. IMO an enum that needs to be seen on an interface and the classes that implement it, belongs in the interface module - that way it's much easier to find when you later want to add a member to it
 
OK, I conflated enum w/ UDT.
 
(well, without the Code Explorer or Find Symbol to help anyway)
 
hmm I wonder if I ran into another case where enum was problematic on a class module.
Because honestly for both UDT and enums, they get the same treatment from me -- if I want it, they have to go into standard module and I don't like that.
 
Should we inspect for this:
'IClass1
Option Explicit
Public Enum IEnum
    Bar
    Baz
End Enum

Private Function Foo() As IEnum
    Err.Raise 5 'TODO implement interface member
End Function

'Class1
Option Explicit
Implements IClass1

Private Function IClass1_Foo() As Long
    Err.Raise 5 'TODO implement interface member
End Function
^ Compiles.
 
5:42 PM
@this possibly, given a PublicNotCreateable class consuming the enum not defined in a PublicNotCreateable class module
 
In my coding, I almost never use PublicNotCreatable (no good reason to go beyond more than 1 VBA project in general cases)
 
then I can't think of any potential issues :)
 
Yes, @Comintern I think that should be inspected. Note that's not just enum, though.
Probably just me being overly defensive in my coding
 
IIR only the RPC signature needs to match.
 
That's what you get for coding in dynamic implicit black voodoo anything-is-an-unicorn language, I guess.
Yep. So it's OK to have Object instead of MyObject or Access.Form instead of Form_MyThing
 
5:46 PM
@Comintern Just to clarify, in all options I did not intend to change the type in the class itself, only in the freshly created interface.
 
01/23, got 29 SO answers posted in 2019. I should probably slow down a bit.
 
You gotta keep your MVP.
 
looking at @this' MVP profile, I get a growing impression that I'm way over-doing it
 
I might get some more interesting responsibilities at work sooner or later.
 
@M.Doerner OK, that makes more sense. In the OP's case, that would entail changing any enum members declared on the class to Long.
 
5:52 PM
i'm just bad at updating my MVP activities.
in fact, I got an email reminding me to do that sometime before March.
probably should start thinking about updating it.
 
@this March 30th is the deadline
 
@Comintern is the CE supposed to auto-expand folders when searching?
@MathieuGuindon thinks a bit harder
 
@this Yes. Is it not?
 
not in my specific case.
typed in startup, with all folders collapsed. Nothing happens.
(clarify - ony the project node is not collapsed so I can see all the folders & reference nodes)
 
I'm assuming it found a match.
 
5:59 PM
enter in startup, no changes. Yes. I had to manually open the containing folder.
 
00:00 - 18:0018:00 - 00:00

« first day (1692 days earlier)      last day (1488 days later) »