« first day (1384 days earlier)      last day (1796 days later) » 
00:00 - 15:0015:00 - 00:00

12:00 AM
@Hosch250 building 92 has all the hoodies you can buy
and lol, it's MVP Global Summit ;-)
 
RELOAD!
[rubberduck-vba/Rubberduck] 5 commits. 8 issue comments. 675 additions. 675 deletions.
[Zomis/Server2] 10 commits. 342 additions. 9 deletions.
 
@MathieuGuindon Building 7 has them for free
 
hehe
There is no building 7
 
:joy:
 
12:06 AM
@Hosch250 New hires get told to go to a meeting in building 7.... are left wandering around campus.
 
Thanks for the tip.
Although, I just might enjoy a day wandering around the campus :)
Or an hour, or until someone "finds" me :P
 
Or a week, given the size of it
 
LOL.
They even have a bus service--or pay for you to use the local bus.
I'm burning about $25 on gas every week. While easily affordable, it's not cheap.
And apparently they even provide housing for some relocating people. Mostly executives.
3 weeks vacation, 10 paid holidays, 10 sick days, and 2 personal days (whatever that is).
 
@MathieuGuindon I know there are multiple solutions, but I recall having seen SyntaxHighLighter used to syntax highlight VBA. The parser/approach is likely not as robust as Rubberduck's, but it might be useful for the blog. It's on GitHub (So we should be able to make a custom brush if required) and WordPress (so you should be able to add it easily).
In fact, now that I think about it, the [Code] blocks you mentioned are probably designed to use it?
@Hosch250 I spend about $80 a week.
 
@ThunderFrame Long drive, or expensive gas?
 
12:12 AM
@Hosch250 both
 
I'd have to refill my tank every 1.5 days to spend that much. You burn a lot of gas.
 
$50/wk here. Being stuck in traffic does that.
 
Yep. I go in early and leave late to avoid traffic.
 
about US$3.80 a gallon
 
Also, it might help that my gas station doesn't go through their gas too fast so I don't get hit with all the fluctuations.
@MathieuGuindon Driving slower than 45 mph or faster than 70 mph really bites your mileage per gallon too.
And if you have a car with an engine that turns off at lights (mine does, except below freezing), that really boosts it.
 
12:17 AM
Gallons, mph... US is messed up. grabs calculator
 
My car, interestingly enough, actually tries to predict your actions. So it can guess if I'm going to be slowing down and cut the gas before I take my foot off.
What do you use? Kilometers per liter?
 
l/100km.. which is arguably backwards amd useless
Anyway gas is around $1.30/l these days
~$4.95/gal
 
That's almost twice what I pay.
 
Half the price of gas is taxes here.
 
@MathieuGuindon IKR - scratches head over US Gallon and UK Gallon
 
12:20 AM
@ThunderFrame oh ffs... I used 3.8l/gal
really, UK has their own as well??
 
Home Time.
 
US has 18.4 cents tax per gallon. Not bad.
 
@MathieuGuindon Yeah, I used 3.8 also, but yeah, UK has their own Gallon, and their own tonne and ton, and oz too IIRC
 
If the US ever drives taxes on gas up like that, there'd be a depression that made the Great Depression look mild.
 
And we have paid-for healthcare ;-)
 
12:22 AM
So do we.
 
lol yeah
 
Most companies will pay a good portion of your healthcare.
 
@Hosch250 paid-for by who?
 
I have a $3000 deductible on medical. All other costs covered.
 
@Hosch250 and if you're not at one of those companies, or the insurer chooses to not cover you because of "pre-existing" conditions?
 
12:24 AM
I have $0 deductible, all costs covered. No job required.
 
@ThunderFrame Most companies here have it.
And most pre-existing conditions are illegal to not cover.
@MathieuGuindon And you pay for it with enough taxes to line every politician in Canada's pocket, from the lowest mayor to the PM.
In addition to the healthcare companies and drug companies.
 
Yup. And I'll never go bankrupt because I need a surgery
 
I just wouldn't have the surgery.
Not that worried about not dying. I'll die soon enough as it is.
 
Tell your appendix to blow up another time, I guess?
 
I'm already well over the ancient average lifespan anyway.
 
12:26 AM
damn
 
And in 10 more years, I'll be at the ancient average adult lifespan.
 
See you.
 
@ThunderFrame Awesome!
 
12:28 AM
@Hosch250 I'm clearly not as diligent as @MathieuGuindon
 
That's silver VBA on SO?
 
Because you haven't even reached bronze on CR.
7 more C# answers for me to get a silver C# badge on CR.
 
hangs head
 
And 19 questions for Socratic.
I've already got the score for my C# silver badge.
 
12:34 AM
 
:(
SO's voting culture?
 
either SO has their benchmarks out of whack, or I'm writing low quality answers :-/
@Hosch250 yep. IIRC, @MathieuGuindon had similar stats (and higher quality answers)
 
> Yeah, I could reword it a bit to clarify the purpose.

RE: reg file, I did mull about that as well, thinking that it could benefit having a shortcut in the start menu to "register" Rubberduck add-in, so when all-user install is run, everyone at least gets that shortcut.

OTOH, it's easy enough to configure the installer above to run in "register-only" mode by detecting that it's already installed, skip the install and simply execute the VBE addin registration.
> Ugh. I never could decide on proper capitalization/spelling for addins. Add-In? addin? add-in? Thingajigmig?
 
@Duga virus-enabler
^ copyright notice is barely visible - definitely unreadable.
I wonder whether the about screen should also show the OS version/bitness, and Host name, version and bitness?
maybe even the VBE.Version for unfamiliar hosts.
 
Yee hawww!
I just found a massive, massive bug in a CR C# question!
Time for a new answer.
 
12:53 AM
@Hosch250 nice!
@ThunderFrame that would be nice. the whole dialog needs a refresher
 
1:13 AM
@ThunderFrame didn't @IvenBach already included that in the copy to clipboard functionality?
@MathieuGuindon I would like your opinion. Generally, we prefer self-documenting code over comment and I'm a solid fan of it. But.... freaking pascal.
I'm seriously thinking I have to comment a fair more because next year, even if I'm here, I'll be all "WTF this guy smoking"
I'm thinking of commenting stuff like how this global variable should e used when it should be mutated, read, etc. that kind of information that is not readily available.
 
1:29 AM
@this Just found your C# question.
 
@this It's in the copy functionality but doesn't display innately. It probably should though.
 
#1, why use [STAThread]?
 
@IvenBach yeah, I seem to recall that we didn't want to load the About dialog w/ junk so it was in copy only?
@Hosch250 because it's a dumb simple console?
 
#2, Either use #if DEBUG or remove the build debug check. TBH, I'd find it less confusing if it was done with #if DEBUG and I had to enable it for release builds.
 
there's no multithreading so if it's not needed, better to make it so?
 
1:31 AM
Rubberduck version: Version 2.1.6648.34736
Operating System: Microsoft Windows NT 10.0.16299.0, x64
Host Product: Microsoft Office 2016 x86
Host Version: 16.0.9029.2253
Host Executable: EXCEL.EXE
 
@this Just leave it. The build isn't stupid.
 
That's what information gets copied.
 
@Hosch250 I'm not 100% sure but I think it was default when you make a new console app
 
And there's no (significant) overhead to not using it.
 
Cool. GTK.
 
1:32 AM
@this Nope. When you make a new console app, it doesn't have any attribute. I just did it myself.
 
@Hosch250 Ha. I realized it way too late. IDK if you saw the note #2
 
@this I did. That's what made me think of it.
 
hmmm. then I'm smoking something. :)
Yeah I have to admit it'd have been less confusing and weird. :)
 
And finally, what happens when this console app grows into something big and I come along and use multithreading and it doesn't work?
 
Back then I was too engrossed in getting the info runtime.
See, that's where a refactoring is needed, no?
 
1:33 AM
How the heck am I to know to look for a [STAThread] attribute at the starting point?
(Although, I might now :P)
 
ah i see what you mean. I'm putting up booby traps
 
Oh my gosh. I just got to the GetDebugData() method.
OK, I'm putting this in a review before someone else does.
 
but that's a interesting thought - I have to think - what'd be the best way to communicate to the descendants that this code was never meant to multithreading? Obviously an attribute isn't going cut it.
Cool. I look forward to it and learning.
 
1:45 AM
@this fine by me... would be nice as xml-doc ;-)
 
hmmm. that's a thought. I will do so.
I learned another useless programmning language. Maybe I should go for COBOL next.
well, in fact, I wished I had learnt COBOL when I was a kid. I'd be making lot of dough by now. :D Maybe I'll get lucky and VBA'll be the next COBOL. unlikely :p
2
 
Also, pretty sure is for completely unrelated topics.
@this Not hard to learn given your skills.
 
@this Fixing broken/legacy VBA pays pretty well.... "We have this critical business function, and then 2 buses came along at once, and obliterated our support team. It runs daily, but it's now taking 14 hours, but our SLA requires 12 hours".
VBA Professional Rubberduck steps in, and reduces the runtime to 16 seconds.
 
Also, answer posted. Feel free to argue.
 
:+1:, thanks!
 
1:59 AM
@this Did I miss the Pascal reference (no pun intended)?
 
it's what Inno setup uses.
i basically had to learn it to customize it to the point you saw earlier in GH
granted it wasn't too bad but.... it's quirky.
and it doesn't help that the documentation is a bit too sparse on example. "Look somewhere for an example" it tends to do.
still Inno Setup is much better than WiX's.
 
@this Sounds like my performance reviews...
 
WiX's documentation is basically "if you don't know MSBuild, you shouldn't be reading this"
assumes wayyy too much from the user.
not too unlike unix's man pages, in fact.
LOL
 
@this Bootstrapping not permitted
 
it is now.
 
2:03 AM
Hehe.
 
you know about Burn?
 
I need to learn MSBuild soon.
I've been using it, but I don't properly appreciate it.
 
it's nice. Once you get it working.
AIUI, the appreciation comes from the fact that being all XML and declarative, it's much better for a project under source control.
and it makes it easier for you to script your build this way
but... whatever. It's NOT easy to use.
 
Would understanding MSBuild help understand AppVoyer builds?
 
well, AV does more than just MSBuild, really.
think of AV as just a virtual machine you use to run scripts, no more, no less. It just happens to run MSBuild script among other things.
so if you have a simple setup, you might not even need to care about MSBuild at all. VS is pretty good at hiding that detail.
But once you're invested in building a MSI format, golly gee, you better know your MSBuild.
 
2:08 AM
@this I think I used Turbo Pascal in my final year of high school.... I remember using Records... Also wrote a TLB in Delphi in about 2000 (I'm told it's still being used today), but that was surprisingly drag-and-drop + wizards.
 
OK, I'm going to bed. See you tomorrow.
 
'night
I'll try to come up with some more interview questions for you
 
Thanks.
@MathieuGuindon @this I'd appreciate your input too.
 
gn!
if you wanna, I can give you interview tomorrow evening
but mind, i usually do tech interview, not sure if that's what they're doing
 
Informational interview.
I may not have time. I only had time the last couple days because I'm under quarantine.
 
2:13 AM
yeah not my bailiwick but I will toss my thought along by tomorrow
oh, dear. I do hope you get better, however.
rest well.
 
Other family members are coming down now anyway, so I'll probably have to take over my chores and then some tomorrow.
@this Basically better. Just a cold.
Minor cough and some tiredness is all that's left.
Hoping I don't pick up another one--Rigoletto is on Saturday :)
 
@this - got an installer I can try? I have a fresh 32-bit Win 7 Pro with Office.
 
2:30 AM
cool - let me post it on GH
please note i haven't completely tested everything
 
> Uploading another installer version for testing per @ThunderFrame 's request:

[Rubberduck.Setup.zip](https://github.com/rubberduck-vba/Rubberduck/files/1831876/Rubberduck.Setup.zip)
 
if it blows up your new shiny machine, don't be mad, bro, ok?
:p
 
it's a VM.... It'll get nuked anyway
 
:+1:
still if I manage to melt your hardware... don't blame me. Blame Inno Setup, k?
 
I run VirtualBox VMs instead of MS VMs, because I love Oracle VirtualBox lets me run Mac OS (and you can'r run VirtualBox while MS' HyperVisor is enabled).... My hardware will likely melt from having Oracle software on it before it fails because of Inno Setup.
Waiting for 300 MS updates to apply - testing is probably better done once those are done, and is likely to be a while...
 
2:40 AM
cool. I use VMWare myself.
 
2:50 AM
I still remember the first time I saw bootup screenshots of a VM, and being amazed. Went and bought a copy of VirtualPC (before MS bought Connectix), which you could run Linux on, until MS bought it and removed that feature bug.
 
3:07 AM
wasn't it an emulator back then?
 
@this I forget... it certainly wasn't as complex as today's versions
but if it lets you play DOOM at work, who cares?
 
TBH I am not sure when virtualization was when but I remember looking at connectix and eveyrone told me to forget it, it was slow, etc, etc
but thinking about it, it was for Mac and back then it was on motorola so that might be why
 
@this "Happy Rubberducking..."
 
heh. yeah would be much more catchy than completing...
 
or, even more casually: "Phew, nothing seems to have gone wrong, and your IT support desk isn't freaking out. Happy Rubberducking."
 
3:18 AM
that'd be more apropos in the per-user mode
 
Would something like this ever be possible?
    Dim RD As Object

    Set RD = CreateObject("Rubberduck.Extension")
    RD.Init Application.VBE
 
no
you can CreateObject it just fine
but it has no methods that's accessible to VBA
because it implements the IDTExtensibility2 which AFAIK, is nowhere defined
I even tried calling OnConnect via late-binding, didn't work, either.
so basically, all you can do is just.... create it.
I suppose we could provide a Init method on a different interface... but what does that buy us?
 
3:36 AM
> Also has AutoExec and AutoNew, but they don't seem to fire in all versions of Word.
 
i'm probably blind but I don't see where he defined the Init/Uninit
I don't doubt it can be done but again, what does that buys us?
a manual override button?
 
@this Office 97 compatibility ;-P
 
I wonder if they really can run RD on a 97.....
probably not if 97's missing other interfaces and if RD's codebase makes too many assumptions.
 
> RunOld is deprecated (and doesn't take arguments). RD should prompt the user to use Run.
 
oh, like that click event for instance
 
@this IIRC, we already manage around that for SolidWorks (SW uses the old CommandBars)
Which is why RD should work in VB5 and VB6 (once the other VB specific problems are resolved)
eg. there's no Mask in the older CommandBarButtons, and RD works around that too.
 
I see.
 
@this Office 97 VBE doesn't have an Add-ins menu command, so there's seemingly no way to add a VBE add-in.
 
hmmm. could that also solve Mac Office's problem.....
lol
i doubt it'd even work anyway. Too much to port.
 
            if (!HasPictureProperty)
            {
                using (var image = CreateTransparentImage(Picture))
                {
                    Clipboard.SetImage(image);
                    Button.PasteFace();
                    Clipboard.Clear();
                }
                return;
}
 
 
2 hours later…
5:29 AM
[rubberduck-vba/Rubberduck] build for commit 4b65a829 on unknown branch: AppVeyor build failed
BUILD FAILURE!
[rubberduck-vba/Rubberduck] build for commit 4b65a829 on unknown branch: 55.98% (target 0%)
 
 
2 hours later…
 
1 hour later…
8:29 AM
 
8:40 AM
> Consider the following code, where `Sheet1` is passed as a `Worksheet` object:
```vb
Public Sub Foo()
Debug.Print GetQuotedWorksheetName(Sheet1)
End Sub

Private Function GetQuotedWorksheetName(ByRef myWorksheet As Worksheet) As String
GetQuotedWorksheetName = """" & myWorksheet.Name & """"
End Function
```

`Worksheet.Name` is the only property accessed within the `GetQuotedWorksheetName` function, so the function's parameter could be changed to `String`. That makes the fun
 
 
1 hour later…
10:09 AM
> As mentioned in #3834, the rewriter leaves some redundand whitespace after removing pieces of code. The quick fix tests for the linked PR expect that whitespace, but it just doesn't feel right.
 
10:35 AM
@Hosch250 one more question for you: I like applying my skills where I have strengths, but I also enjoy learning new things and taking on new challenges. What opportunities can MS/this role offer me to leverage my current and future skillsets, so that I can be most productive and grow at the same time?
And if you're feeling brave/cocky/brazen: I've always found school/college to be quite easy, and I feel like I outperform in my current role. What challenges and opportunities can Microsoft offer me if I can prove my abilities and exceed expectations?
^ That second one might require some finessing, and may or may not suit your personal interview style. It's a fine line between unchecked arrogance and unbridled ambition....
2
 
 
1 hour later…
11:53 AM
 
12:36 PM
@this - I love trashing COBOL as much as the next guy (maybe even more so!). However, I had to take a COBOL class in college (yes it was that long ago) and it was taught by the only instructor in the CS dept who'd ever actually coded for a living. Her approach was totally different - "Sure, every test is open book - nobody memorizes all this stuff. However, you have to know where in the book to look, because there's never enough time to look everything up - on the test or at work."
It also led to my first post-college job, so I guess it's got that going for it, too.
 
@FreeMan Ha, that's funny - I know a former Access MVP who also had similar classes like your -- all tests were open book but you better know where to find it. She argued that it helped made her a better programmer because it taught the importance of reading and using the documentation... as opposed to randomly bumbling around.
 
Yes, sadly, I've reverted to the random bumbling. COBOL was is easy - you don't write code, the comments are compiled & executed.
 
lol
 
12:51 PM
OK, possibly dumb question: Thank heavens for rubberducking! as I was typing up the potentially embarrassingly dumb question, the answer hit me. Thanks guys! :)
 
> I see that the RequiredLibrary attribute is now used. Great! However, I don't see an additional attribute or flag to indicate that the inspection should only run only when Excel is the host (and not on any other hosts)? This will generate broken code on non-Excel hosts that references Excel.
 
  Dim downloadStatus As WebDownloaderStatus
  Set downloadStatus = New WebDownloaderStatus
  Dim Downloader As IWebDownloader
  Set Downloader = SnapSurveyWebDownloader.Create(Chrome, downloadStatus.downloadStatus)
                                                          ^^^^^^ Seems somewhat repetative.
Naming stuff is hard
'Why yes, I did stutter, why do you ask?
Is it reasonable to have status codes of, say negative values = all is good, continue and positive values = something's gone wrong, back off? The have Public Property Get okToContinue as Boolean that returns If Status < 0 then True Else False?
or am I going about this all wrong?
 
the flip is more common, i think
look at HRESULT for example
0 = no error, >0 = ok but some FYIs, <0 = you done screwed up, boy
 
1:06 PM
I'm good with either way... is it reasonable for the FYI section to be an indicator of where in the process I am, so that if I hit an error, I can log the current value of status then interpret the tea leaves later? So, not really a warning status of >0, but more of an informational you are here.
 
> @bclothier Yes, that is not implemented yet. I'll probably need to spend some time figuring this out. I don't think this functionality is avaliable to us at the moment. I guess we can either postpone merging this PR until it is ready or add such functionality in a future PR.

@retailcoder, the decision is up to you.
 
@FreeMan That's exactly the method I used in college. Most tests were open-book, but I sure as heck had to know where to find it in the book.
Only had trouble with one class--IT project management...
That book was horrible for "indexing" in my mind.
There weren't very many headers to check where I was, etc.
@ThunderFrame I feel that that's just an extension of the first. They are both about growth.
So, I'd probably just make the first a little more pushy instead of asking both.
 
star shower!
 
@MathieuGuindon your trip to the motherboard definitely had nothing to do with it. :)
 
1:55 PM
@this how many of those are MS staff or MVP's?
 
as if I have a mater list of their GH username....
No clue. :\
 
I only assume because you met people there and now they have a face to the GH project
 
could very well be
although, there is a correlation between stars and tweets reaching out of the #VBA hashtag
e.g. @githubhelp and #OSS
 
Hmm the numbers' saying we need to #TweetMoreOften
:p
BTW, the commentary on the pascal code OK? Hard to judge by myself if I've went overboard.
 
2:28 PM
@this the pascal code?
 
inno setup
 
[rubberduck-vba/Rubberduck] build for commit 6aa5790c on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
@Duga bingo I think i know what i need to do to fix this.
 
@this not following. the .iss is gone, there's a powershell script, a bunch of reg key text files, xml, ...what am I looking at?
 
2:35 PM
@MathieuGuindon That's a real installer.
 
for whatever reasons, GH treated it as a deletion + additoin, rather than rename
that's the new .iss file
So, sorry, @Hosch250 not a real installer. :p
 
:sob:
 
if it's any consolation, the powershell script is indeed used to help drive the building of the "semi-real" installer.
TBH it's a bit of Rube goldsberg machine, if you ask me.... :\
we have what.... a powerscript shell that runs in post-build event of a project that executes a DLL built by the same project to generate more files which AV then runs iscc and the iss script #include the autogenerated file into the main .iss script, then builds it.
 
this isn't trivial scripting; I'm perfectly fine with having "too much" comments there
@this I'll need that documented in the wiki somewhere :)
 
:+1: I'm more concerned about making sure it's easy to read, follow
because if I'm me next year or some poor sod has to do something.... sob
LOL yeah you might be right about documenting the build system.
 
2:42 PM
TFW you get a bug ticket and spend 2 hours to find the data is wrong because someone had A{rest-of-name} FooBar instead of A{some-other-name} FooBar in their data...
And they were checking the data against the second, but it was seeing the first.
 
@Chronocidal remember that InStr has a Compare optional parameter that defaults to vbBinaryCompare. Instead of LCase-ing the two strings, why not just provide a vbTextCompare parameter and make 1 function call instead of 3? — Mathieu Guindon 46 secs ago
#Burn
 
@MathieuGuindon, I think you covered everything but Friend in that answer ;)
 
@CallumDA the one Scott dupe-hammered?
 
Yeah
 
hehe.. Friend is only useful in an add-in project IMO
irks me to see "declare a global variable" as the go-to answer
You can also do Static runCount As IntegerCallumDA 1 hour ago
@CallumDA ^^ glad you saved the day!
 
2:51 PM
Agreed. But since you even noted that Global was deprecated I though you were on a roll and gonna cover every type of declaration haha
 
@CallumDA #define Enemy Friend
 
meh.. I only felt the need to disambiguate "global" there
 
Most of the time tt's difficult to know if OP actually knows what they want or not. Public could well have been exactly what they want
 
> In this example, the code wouldn't work, because the runCount would be reset each time. Of course, the simplest solution would be to declare a global variable instead, but in some cases, I want to avoid that for the sake of simplicity, encapsulation or other reasons.

So, is there any way to have the local variable persist after the procedure has finished running?
 
You'd think if they know enough to recognise there is a different between persisting a local variable and a global variable... they would be able to use google with the right search terms
 
2:53 PM
yeah, but take the fact that searching for VBA often turns up VB.NET results, then the fact that static in VBA doesn't mean what static means in every other language, ...
...you get a legit useful question to put up on SO
 
I guess looking at that quote it was pretty obvious
 
yeah. reads like the textbook use-case for static
 
How does Static usually work?
Oh dear, a new answer just came in on that question
0
A: Having a local variable that persists after the procedure is ended

user6698332Do not use Static (imo). Use Public on module level instead of is more preferable. But much more preferable will be to pass counter to function ByRef. .

 
^ was going to post a link saying "oh look, I've got company"
 
2:56 PM
@Duga Alright, everyone! the pool on whether this builds is now open! Who's going to bet for or against it?
 
@CallumDA it makes a field or member belong to the type (class), rather than an instance of it.
so if you have public static void DoSomething() on Class1, then elsewhere you can invoke it like Class1.DoSomething();, without needing an instance of Class1
and a static field would have a "shared value" in all instances of the type
this can get tricky with threading
 
I see. Very different!
 
@MathieuGuindon - is that the "VBA" implementation or the "every other language" implementation of Static?
 
TBH, I think VB.NET did something right by calling it Shared
 
^ yeah
 
2:59 PM
static just doesn't convey that concept.
 
The word Static seems closer to the meaning of the VBA type.
 
@FreeMan in VBA a static local "sticks" between calls
..which is a completely different thing
 
00:00 - 15:0015:00 - 00:00

« first day (1384 days earlier)      last day (1796 days later) »