« first day (2014 days earlier)      last day (1166 days later) » 

7:00 PM
On mine, the underscore is right next to backspace
and thus is 2nd farthest key for my right pinky to reach
 
for me it's right next to the right shift, soo ..
or rather: between right shift and period / colon
 
@IvenBach gotta admit seeing comments with words like "implicit access modifiers" and "use meaningful names" on SO lately, fills me with joy =)
Wow @FunThomas, will you squeak if I squeeze you? Except for the redundant instruction separator, everything you mentioned is a Rubberduck code inspection! — Mathieu Guindon 42 secs ago
 
> **What**
Bring to the users attention that they're implicitly accessing a member.
Inspection: CodeQuality.

**Why**
Using `WorksheetFunction.FooBar` or anything else that's on the hidden `Global` member deprives users of knowing *where* they're accessing the member from. Them knowing that a hidden member is providing this member educates them.

**Example**
This code should trigger the inspection:

```vb
Public Sub Foo()
Debug.Print WorksheetFunction.Text(2 / 16, "# ??/??")
End
 
iGuessThatWorks_but_i_undersstand_that_dependng_on_frequesncy_of_use_and_commonality_that_one_is_fast_than_the_other
 
7:10 PM
@this butifyoudon'tcareaboutanyspacesorcapitalizationyoucantypeevenfaster.
 
underscore is shift+space for me, but i think that's a profile thing
@IvenBach true
 
@IvenBach ew,nothat'shardIneedtoactuallyconsciouslydecidetonotpressthespacebar
 
^
 
@Vogel612 preplanning for project? check!
 
Using the spacebar is just so ingrained it's kissing-your-sister-nasty not to use it.
 
7:11 PM
@IvenBach depends where you're from
 
Obviously you never had a sister.
 
it may even be preferable
 
^^ Uh.....
 
Don't worry, I've not kissed mine since I was about 3.
 
hosch knows how to hillbilly
 
7:12 PM
LOL
 
@Hosch250 daddy put a stop to the tongue once and for all... it was not appropriate for walmart
 
I have no siblings so I can make those kinds of jokes ignorantly.
 
I've never been lovey to my siblings since about then. Parents either.
I am to my pets. My dog gets kissed, and is allowed to kiss me on the mouth.
 
@Hosch250 i hear you; i have a mother and a father and when i need their attention, they have names
 
My family hates it, but meh.
 
7:14 PM
my son likes to kiss on the mouth... it's a little gross, but we need to cut him of that habit before he starts school
 
LOL.
 
gross like, he's a snot-nosed kid and it gets in your mustache
 
If I ever get a wife, I'll probably be all lovey over her too, but most humans I've seen are unattractive and disgusting.
 
trying to get him to do a goodnight kiss on the cheek
@Hosch250 have you tried getting out of minnesota? rimshot
 
Actually, yes.
I'm saving up to go to the Dakotas.
 
7:16 PM
 
copy; was teasing, but glad to see a desire for change
 
> I'd call that ImplicitlyQualifiedMemberCallInspection I think
 
@Cyril lol
 
oh, how're you holding up that way, @MathieuGuindon? i've heard you're supposed to be like -20 C from the polar vortex
or at least toronto; not "quite" you
 
Who's pretty knowledgeable about creating new inspections? I should start learning how to make them so I can tackle my own requests.
 
7:23 PM
I've made a few
 
@MathieuGuindon That's an understatement, LOL.
@IvenBach It's super easy. Just implement a couple interfaces.
Only trouble is you need to manually build the project every time you change something to test it.
Because it doesn't automatically detect changes to that project because it isn't directly referenced, or something like that.
IIRC, it's copied using a post-build script.
 
Isn't a manual build required anyways? What am I not understanding?
 
nope, that was before Vogel flipped the dependencies around
ignore @Hosch250, he hasn't touched RD for too long :)
 
@IvenBach it used to be that the inspections were loaded like a plugin
so when you F5'd they were not automatically built, because the project was not referenced anywhere
 
Wholly ignorant as to how plugin's work.
 
7:26 PM
@MathieuGuindon LOL.
 
that's no longer true, so it's automatically built when you F5 debug
plugins are loaded after the program is started, which implies that the executable can't link against the plugin.
this in turn means that you can't have a compile-time dependency from the entry-point to the plugin.
and that means that when you build the entry-point, the plugin isn't automatically built as well
 
@MathieuGuindon Another thing I forgot about .doccls exports. When you export the project they don't export with any attributes. When you export them individually they do include them. ?
 
sounds likea bug TBH
 
the bug would be them exporting with attributes.. they won't import back, so they shouldn't be there in the exported file
 
Mkay. Opening ticket.
 
7:31 PM
okay, ignore me, I evidently have no clue what I'm talking about
 
Do any of us?
 
@Vogel612 hm?
 
> **Rubberduck version information**
Version 2.4.1.20935
OS: Microsoft Windows NT 10.0.18362.0, x64
Host Product: Microsoft Office 2013 x86
Host Version: 15.0.5023.1000
Host Executable: EXCEL.EXE

**Description**
Exporting a project leaves out attributes for .doccls files. When a single document is exported the attributes are included.

**To Reproduce**
Steps to reproduce the behavior:
1. Export a newly created Excel workbook.
2. Review the .doccls files to see that no attributes ar
 
Hoorei for cobaloration!
 
and that just made me realize the VBA macro that's exporting modules for source control, has the exact same bug
One more thing - the VBIDE API will export module/member attributes for document modules, but since they can't be imported back in, they shouldn't be exported at all - FYI Rubberduck's bulk-export functionality doesn't have this problem, but exporting individual modules doesMathieu Guindon ♦ 59 secs ago
 
8:08 PM
@this I was wondering what was wrong with liquid crystal displays. Then it hit me.
@Hosch250 hates people
 
@FreeMan well, LCDs are the LCDs of monitors...
 
@this that... hurts to read
 
@Vogel612 got log -p -# is another one I like.
 
what's the -# do?
 
1, 2, 3, ...
With my derpy brain if I see -1 I think that's the only argument that flag can take.
The -# registers as 'Any Number'.
git log -S "FooBar" checks for commits that include the string. One I already have some uses for.
I've nobody else to share this cool functionality with.
 
8:25 PM
Hi again :)
 
@IvenBach Setting up an alias for this is harder than I'd thought.
 
8:42 PM
private var as boolean defaults to true?!
 
@Cyril huh, in what world?
 
it's supposed to be false... but in something i just wrote, it's defaulting to true
 
Boolean initialize as false.
 
 #define TRUE FALSE // happy debugging suckers
^ ?
 
i cannot figure out why... just did a quick test:

private var as boolean

sub
    debug.print var
end sub
shows up as false, but when i put it into a larger subroutine, it just showed up as true
 
8:43 PM
@MathieuGuindon What's your address Mug? That's durty...
 
...wait, i think i know my problem... i didn't set it to false when i exited the sub, after testing a true condition... gdi
 
@Cyril something tells me there's more to this "larger subroutine" story ;-)
 
got myself worked up without describing what i'm doing to myself
cus it's global... yeah
 
bittenByGlobals++;
 
git config --global alias.pickaxe 'log -S' is failing when I try to use git pickaxe "FooBar"
@Vogel612 Any ideas git guru?
I know it's there. git config --global --list tells me so.
 
8:48 PM
wouldn't you need a space between the -S and the closing '?
 
I've tried that and same error.
 
#noclue
besides the only git alias worth making is git fukitall or git nukedis
 
> Fatal: No such path 'FooBar' in HEAD
 
interesting... you must not be too far off
 
Explicitly writing it out git log -S "FooBar" with either " or ' works.
Felt I've done enough due diligence to work it out myself before asking.
Rather than using static cell references that are prone to breaking I use named ranges. Rather than using FooSheet.Range("Bar") everywhere I use a property for the sheet itself: Public Property Get Bar() as Range.
The problem I'm running into is that I have to navigate between workbooks. My dev workbook contains the named range. I may have to do a fix on one that doesn't have it. Is it sensible to use a unit test to check the named range exists?
'Module TestNamedRangeExist.bas
'@TestMethod("Uncategorized")
Private Sub FooSheet_Bar_Exists()
    On Error GoTo TestFail

    'Arrange:
    Dim namedRange As Range
    Set namedRange = Sheet36.Names("Bar").RefersToRange

    'Act:

    'Assert:
    Assert.IsTrue Not namedRange Is Nothing

TestExit:
    Exit Sub
TestFail:
    Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description
End Sub
 
9:06 PM
it's kind of an integration test, but if the absence of a "Bar" name breaks stuff, then it's a good test to have
 
'@TestMethod("Integration") being the more appropriate annotation then.
 
:+1:
or '@TestMethod("HostDocumentValidation"), or similar
 
My previous test of counting the number of named ranges on a sheet was a failure from the start. #GottaStartSomewhere
`@TestMethod("HostDocumentContainsPrerequisitesForFunctionality") is a bit verbose but tolerable for present-Iven
Slight verbosity trumps ambiguity.
 
lol I find that a wee bit over-specific, but you do you :)
 
okay i should probably stop using answering questions on SO as a way to procrastinate on my own work
its so easy to justify :(
 
9:14 PM
Lurking in chat is my downfall. I learn so much from it that it's too invaluable to give up.
 
@theVBE-it'srightforme same :)
 
@MathieuGuindon you didnt answer the part about performance/unreliability :(
im actually curious
 
im honestly just curious because i dont exactly know what obsolete means in the context
 
it's ...hard. sometimes I get sniped and burn a whole afternoon on SO. then I spend the evening catching up work
 
9:18 PM
That eases my own nerd-sniping regrets.
 
oh, you mean the Call keyword thing
 
oh loool
i just realized what the purpose of that link was
 
my biggest problem with Call is that I've never seen it used consistently
 
@MathieuGuindon wait what is sniping
 
a XKCD reference
 
9:21 PM
oh lololol that is funny
well its unfair for you
when you know so much about vba
 
@MathieuGuindon love the hat...
 
:)
"Warm Welcome (Secret Hat)"
 
@MathieuGuindon - BTW, I am dipping my toes in the C# pool... but then with what I've learned from you & this chat and SO VBA is still very tempting... and then I get sniped... LOL
"New feed items" is my enemy...
thank goodness for multiple monitors
 
@SmileyFtW the alternative would be to have them be posted in the actual chat transcript... which could be even more disruptive :)
at least the ticker feed can be dismissed once in a while
 
no it can't... not until I've checked them out..
 
9:25 PM
what do we say to the ticker of death? "not today"
 
Using call keyword is like using a call sign to pick up call girls.
 
@MathieuGuindon so sometimes its used and then in seemingly equivalent cases its not?
 
Ticker Anonymous?
 
@theVBE-it'srightforme the logic I hear is "it makes it easier for me to see procedure calls" ...which makes no sense, because basically everything is a procedure call
 
if we mean ticker = that annoying popdown linking to various SO threads, I really wish it didn't overflow on top of the chat
 
9:26 PM
I've never seen Call MsgBox("some message") either
 
I have...
 
and the one and only legit use-case for a Call keyword is a bloody edge case, too
fetches 2x4...
:)
 
seen it... not used it
 
it was confusing to me many moons ago when parens in VBA were necessary and when not... hence my venturing into Call()
I since learned...
 
9:30 PM
@this I can make it a chat feed, but I believe we went with a ticker to avoid flooding the transcript with SO's carp
 
yeah wouldn't want that.
 
That would be much more disruptive.
 
It's mainly the overflowing behavior that I really dislike
 
Get a vertical monitor. I don't register it at the top anymore.
 
or we can ditch it altogether, and then my workday productivity would skyrocket
 
9:31 PM
^ It's been decided.
 
but but we won't get to see your vein pop out!!
 
and my monthly tag ranking would go inversely proportional
 
@IvenBach I may get a diagonal monitor just in spite.
2
 
Go for a circular monitor.
 
separate floating pane that can be dragged to another monitor space outside of main chat pane?
 
9:33 PM
Makes you feel claustrophobic in a submarine.
 
LOL. Bonus if it comes with that metal ring
and you can open it and smell the briny sea
 
floods keyboard, oops
@ticker "please download my broken macro-enabled workbooks" ya, nope.
 
I want to d'load the internet in Excel. I am new to VBA. How to do it?
 
@MathieuGuindon oh yeah. i think it is realistically stylistic more than anything. just like sometimes when writing english you'll use contractions or not, or in spanish omit the pronouns or not, etc.
i mean from the perspective of the person writing it. whether that is correct or not, of course... :)
what is the one edge case where it is actually necessary?
 
Public Sub Test()
    DoSomething: DoSomething
End Sub

Private Sub DoSomething()
    Static i As Long
    i = i + 1
    Debug.Print i
End Sub
what's the output of Test?
(note: indentation is intentionally misleading)
Public Sub Test()
DoSomething: DoSomething
End Sub

Private Sub DoSomething()
    Static i As Long
    i = i + 1
    Debug.Print i
End Sub
^ would look like this in the VBE
output is 1, not 1 followed by 2: DoSomething is only invoked once
the first DoSomething in DoSomething: DoSomething isn't a procedure call, but a line label!
 
9:46 PM
I don't get the ":"
 
Public Sub Test()
    Call DoSomething: DoSomething
End Sub
^ fixes it
@SmileyFtW good. forget it exists!
 
LOL
 
oh goodness i cant even track that
 
@MathieuGuindon I believe with the default VBE setting, you won't even notice the difference in coloring.
 
line labels are colored the same as any other identifier, so yeah
 
9:47 PM
Looking it up now <VEG>
 
Try stepping through the code with the Test.
 
oooo... yeah.. forgot Liine Label
 
but that's not the only use for the colon
 
wait you can call a procedure twice in the same line like that?
 
again, try and step through both variant (one withour the Call and with)
 
9:48 PM
so there: the only place Call actually serves a real purpose, is when you're abusing instruction separators
 
where's that 2x4?
 
@theVBE-it'srightforme the : token is dual-purposed; 1) it separates multiple instructions on the same logical line of code, and 2) it marks a named line label
 
@MathieuGuindon wait does that mean you can use it to add multiple items to a dictionary on a single line
 
I suppose so but... do you want to write obscene obscure code?
 
it means if your entire program fits 1024 characters then you can chain it all up in a single line of code, yes
 
9:51 PM
FWIW, this is what you'd see if you update the VBIDE's horrid color scheme:
 
and then...
1 min ago, by SmileyFtW
where's that 2x4?
 
 
well i would only want to do it if i only had to invoke .Add once
 
@this ah, clever
@theVBE-it'srightforme rule of thumb, you want 1 instruction per logical line of code
 
when there are a preset like 5 things that need to be added it feels wasteful sometimes having each on a separate line
 
9:52 PM
regardless of the language
 
with the default color scheming, you have to really squint to see the difference between keywords & identifiers, and line labels (as well as literal) are all different.
 
in C# you'd use ; to separate instructions
 
but its a general principle for clarity not to do that?
 
still, you'd eat a 2x4 in the forehead if you shoved several on the same line of code.
@theVBE-it'srightforme yes. in a pretty much language-agnostic way.
 
9:53 PM
in most programming languages, the whitespaces has no meaning.
VB and Python both are the oddballs in that newline has a meaning
 
*exceptions: and others
hm, 2 more questions on CR and we start having tag badges for it
 
There's a reason why there's obscure C / C++ contest; you can write really wacky code abusing the fact that you don't need to use whitespace to terminate statements. Some has made an ASCII art out of their code.
 
If you've got multiple .Add lines seems to be begging for a loop
 
its multiple add lines because its a preset thing of data
 
ah but then, what's data doing in code? ;-)
 
9:55 PM
Writing an obfuscated VB code is much harder. Possible but not to the same extent as C/C++
 
<G>
 
separate the data from the code, and poof, problem solves itself!
 
where does the data go?
 
in a table.
says the database guy
 
in a database in Excel!
lol
 
9:55 PM
NOOOOO
 
i know excel is a database :3
 
gets out 4x6
 
wait its not?
i mean
brb editing
 
9:56 PM
I mean, the host document makes a good easy place to store data. text files work too, and ideally, yes, a database
 
that edit haha
 
In Excel, I suppose you can hide a sheet that contains only data to be used for logicizing
 
to be clear: Excel totally sucks as a database
 
well yeah i knew that too
but i thought it technically was one
 
9:57 PM
@MathieuGuindon Which article on your WP site has that example of pulling data from a table - Proxy WS...?
 
Doesn't stop people from using it like one.
 
"There is no worksheet"
 
so data means anything? like even configuration data?
 
I learned a great deal from that one
 
@theVBE-it'srightforme I guess if you redefined the word "database" to mean "a data store" then literally anything is a database.
 
9:58 PM
i was thinking when designing this it was just easier to have it preset in the code
only for certain things
 
However, when people say database, they almost usually mean relational database, which has an engine and querying support.
 
@theVBE-it'srightforme yes. basically what you want to do is, instead of tweaking a constant in code, tweak a knob or change a setting in some hidden sheet, and bam the code just runs with it
 
I used to think that too... LOL
 
typically I'd use ListObject tables on hidden sheets
 

« first day (2014 days earlier)      last day (1166 days later) »