« first day (1566 days earlier)      last day (1614 days later) » 
00:00 - 12:0012:00 - 00:00

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 22 commits. 5 opened issues. 1 closed issue. 23 issue comments. 18514 additions. 6370 deletions.
 
@FreeMan 10? O_O
I was thinking more like 5, and even that's absurd IMHO.
 
Well, frankly, 4???
would 4 be preferable?
 
5 is a nice round number. More aesthetically pleasing than 4.
 
Actually, 5 is a bit odd.
But I can roll with it
 
It's literally odd.
 
12:06 AM
:)
heh, that's an interesting little animated build icon on the status bar.
 
Debating whether I need to add code to calculate the maximum number of lines that we can indent to...
 
Now that I've changed it and I've got a clean build (I did rebuild when I set it to 10, then just Build when I adjusted it back to 5). How do I test?
 
...and survey says "No". If somebody has a module that large they deserve to crash all the things.
@FreeMan Write your first unit test!
 
Hop into RubberduckTests.SmartIndenter.VerticalSpacingTests
@FreeMan I have one of those saved for special refuctoring occassions.
 
12:10 AM
+1
 
close enough
 
The top unit test in there is pretty close to the setup you'll want.
Just copy it, give it a name, change the expected code and LinesBetweenProcedures for the mock.
 
ah! light bulb begins to flicker
 
If it passes, you'll probably want to try it in the real IDE.
If it fails, I took some lazy ass shortcuts when I wrote the settings...
Well, sh!t.
 
12:17 AM
@Comintern 4 is nicer.
5 is prime, but 4 is 2^2.
 
@Hosch250 it's also unique in that it's both the sum and the product and the square all at once.
 
Yep.
4 is the nicest number.
 
Writing the unit test for #4357 means mocking GetProcOfLine, GetProcKindOfLine, GetProcStartLine, and GetProcCountLines.
I'm still partial to 2. Anything over 1 is excessive with commenting IMNSHO.
 
whelp, Comintern piped up first, so 5 it is!
 
lol this conversation is worth framing
 
12:20 AM
I'm tempted to skip the unit test until I re-write the indenter to use the parse tree. Probably less work than writing the stupid test.
 
it would be handy if I could s.LinesBetweenProcesures = MaximumVerticalSpacing to not have to rewrite the test, but it would be hard to dynamically adjust the expected to match... :/
Ok, so I've updated VerticalSpacintTests.csand F6'd. Do I need to run all tests now? It seems reasonable to just run the 18 VerticalSpacingTests, or RubberDuckTests.SmartIndenter at the max...
 
I always run all the tests before I commit.
The indenter gets called on a bunch of different code paths.
 
Ctrl-R,A it is. which also seems to build.
writing tests seems to be somewhat painful, but a not-horrible way of learning one's way around the code. for some totally unknown value of not-horrible
 
OK all tests are green. IIRC something about launching Excel, fire up the VBE then Attach to Process to get my test code running in this VBE instance?
 
12:35 AM
Close.
 
I probably should not have an RD build installed on my machine, though, should I...
 
Not a released one.
 
Yeah, I've got a released build from yesterday. I'll go uninstall.
prolly need to clean the registry, too. It was having issues loading. I think the previous version installed was a 2.1.x release
 
If you keep reasonably even with next, you shouldn't ever need to run the release versions.
 
grr...
 
12:37 AM
Just sync up and compile. ;-)
 
damned be that powershell script
 
that might cause issues...
wish me luck!
 
'luck.
 
duck luck!
interesting, the uninstall asked for my admin pwd.
 
12:39 AM
Did you install as admin? That would explain how you got 2 of them.
 
2.1 had to be admin
 
no, the older one is 2.1.2 - that required admin privs IIRC.
^
now I've got
 
2.2 is obviously current user. IIRC, the current user has a different ID
 
:(
 
admin for uninstall is a bug feature in Windows 10
 
12:40 AM
2.1 uninstalled properly
+1 for bugs features!
and... now it can't find the uninstaller for the 2.2 release.
 
Microsoft is a such good lord, showering us with so many free gifts.
 
time to delete directories and clean up the registry, right?
lol
 
wut?
 
I'll let @this handle this one... I'm not entirely sure I've ever run the installer on my dev machine.
 
hmm. do you know if you had installed both 2.1 and 2.2 to same directory?
 
12:43 AM
I'm sure they were - I just went with the defaults.
Didn't even think about uninstalling 2.1 before installing 2.2 earlier this week.
it's been so long that we've had the luxury of the auto-uninstall...
+1 @this
 
yeah that would have messed up the uninstaller
 
I have no ...\local\rubberduck directory
 
Retardation... Password that must be 8-12 characters. :grumble: Why limit them me to only 12 characters? I want a more secure password...
 
since AIUI, InnoSetup creates unique uninstaller for each ARP entry but won't actually check if there's overlapping between ARP entries
 
I still have ..\Roaming\Rubberduck and I need to keep that for my settings, right?
 
12:44 AM
(not that it should --- each ARP entry is an entity unto itself)
yes
\local\Rubberduck is for the current user install.
 
I think you said I needed to scour regedit for anything rubberduck and remove it to potentially clean up the mess?
 
whether you use per-machine or per-user, you always will be using \roaming\rubberduck
that's mainly insurance against uncontrolled COM registration prior 2.2 and more especially on dev machines
 
correct on RegEdit then remove anything that references the duck?
 
Sure.
 
that sounded... confident...
 
12:48 AM
oh, i should probably mention that if you intend to develop RD on the same machine, don't bother installing.
 
yeah, I'm getting that now.
in Computer\HKEY_CLASSES_ROOT\CLSID\{28754D11-10CC-45FD-9F6A-525A65412B7A} I've got a (Default) item. Do I just delete the item or do I need to delete the GUID, too?
 
you would delete the guid and its children
 
cool.
BBIAB
 
Toodles!
 
sigh... references to Rubberduck Source Control
 
12:57 AM
wut
 
yeah, that's 2.1
 
^
 
i'm not sure the uninstaller handled that
it originally was just doing a regasm.exe
 
12:58 AM
which is a mite too uncontrolled
Yes, IIRC, it should have.
but that's not the best design
 
then it should have been handled
 
operative word being should ;-)
 
yeah. easily mishandled though
 
prolly shouldn't delete the entry in the VS key for the LastLoadedSolution...
does this seem right: Computer\HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\ 12.0
 
don't worry about that
 
1:02 AM
ah, there are entries for 14.0, too
 
you only care within the HK**\Software\Classes\** branch
 
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store
contains an entry for c:\programdata\rubberduck\unins000.exe
remove that to remove it from the apps uninstaller?
it also has the reference to ..\AppData\Local\Rubberduck\Installers\unins000.exe
 
yeah that's OK
since you borked it already
 
I think you might have problems uninstalling if you remove that
 
too late... already had problems uninstalling.
 
1:13 AM
although, installer is irrelevant now that you're off a clone
 
^
 
I'm down to this in the installed apps listing:
and it errors saying it can't find ...\appdata\local\rubberduck\installers\unins000.exe
 
that should be left alone, I think...
 
oh ok
right right you uninstalled 2.1
 
1:15 AM
I like that it says the install scope
 
and that borked 2.2
Yeah, it was necessary because I gave per-user and per-machine 2 different app IDs
 
I did try uninstalling 2.2 first. It sorta worked, then uninstalled 2.1 which went away (from the apps listing) completely
"sorta" = what you see in the image above
 
in retrospect maybe that was not necessary but in theory it is possible to have both per-user and per-machine installed
but practically only one of them can work.
kinda like Zaphod's heads.
 
lol!
OK, I'm back to the VS\12.0\LastLoadedSolution when searching for Rubberduck.
guess the registry is reasonably cleaned up from RD
just for giggles, should I installed the latest 2.2 I downloaded, then uninstall it, just as a test?
maybe it'll clean up the installed apps listing automagically...
 
1:19 AM
no, for borked uninstaller, hafta to delete the registry for the uninstaller
that's where the ARP entries are built from
 
ok, will go find 'em
ARP=...
 
Add or Remove Programs
 
ahhh...
removed the 2 RD installer references, still in the ARP. :(
will continue searching.
finding photoshop references to the RD icon files now!
 
wait, that key you deleted from doesn't seem right
it's for app comaptiblity
the uninstall path should be in HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\**
 
I'm still finding stuff. I'm sure I'll find that one...
 
dprssn?
 
Set rng = dprssn
 
rng doesn't even narrow down the host application.
 
1:37 AM
At least that one is catching some instances of the function Str.
 
@this how's about HKEY_USERS\...\CurrentVersion\Uninstall?
 
...although Str is kind of a useless function...
 
don't bother with HKEY_USERS
 
:thumbsup:
 
you'll be mucking other profiles or just duplicating what you already did in HKCU/HKLM.
 
1:39 AM
reached the end of the registry. Doing a double check
 
This is why I never run the installer.
 
as a rule you should really never go into HKU
HKCR, HKLM and HKCU are generally all you should muck in.
 
well... we didn't all start out as developers...
 
@Comintern Wise.
 
1:41 AM
@MathieuGuindon 211?
Must have felt guilty about disemvoweling and put the 'o' back in there...
 
nope, purely Hungarian masochism
 
oRng = vbRed And vbYellow
4
 
Mug's own brand of masochism: searching for duplicate questions
 
no, research for a WP draft titled "Clean VBA Code: An Updated Guide"
 
I really don't need a dup hammer...
I usually find dups by googling the question title.
 
1:44 AM
sounds good, if painful...
 
Dim oRange As Range
this has to be my all-time favorite
 
@MathieuGuindon thanks for the bounty; finally updated the post w/ current version of scripts and an extra note.
 
@MathieuGuindon Wait, Outlook has Range, too? /sarcasm
 
Dim oRange As Range

Dim dict As Dictionary
Dim vArray As Variant
Dim vItem As Variant
Dim sKey As String
Dim sValue As String
Dim iCompare_TRUE As Integer

Dim lCnt As Long
Dim lCnt_Rows As Long
why is the dictionary not oDict?
 
1:47 AM
doesn't realize it's an object?
 
feature request: play Home on the range everytime they use a Range
 
@FreeMan sadly, most likely that
 
oh my. So much wrongness.
 
makes wrong code look wrong, doesn't it? :D
 
HTH do you search [vba] "= Nothing"? It ignores =.
 
1:49 AM
if I were a variable I'd take serious offense at being called a Cnt
 
Should it be dicDic then?
 
dict is about as useful as obj
 
@MathieuGuindon unfortunately it can't. It's so wrong that it's impossible to see what's wrong with it.
 
There's a database I frequently run across with a CntBtch field.
How can that not be intentional?
 
1:51 AM
OK... registry is cleaned up
 
OK, Excel right?
Go to the properties for Rubberduck.Deployment, tick the "Start external program" and point it to your Excel executable.
 
@Comintern someone needs to buy vowels, I think.
 
1 hour ago, by FreeMan
OK all tests are green. IIRC something about launching Excel, fire up the VBE then Attach to Process to get my test code running in this VBE instance?
was followed by
1 hour ago, by Comintern
Close.
 
...but no cigar.
 
Yes, Excel
 
1:53 AM
@this had them, sold 'em for a HN prefix
 
59 secs ago, by Comintern
Go to the properties for Rubberduck.Deployment, tick the "Start external program" and point it to your Excel executable.
 
yeah, yeah.. I was busy searching for those messages from an hour ago...
I'm lookin'
 
I'm more patient than I look. Let me know when you get to a minute ago.
 
FWIW, attach works. It's the only way if you have VS running as an admin but don't want to elevate the process.
but f5'ing is pretty convenient, too.
 
1:58 AM
found Rubberduck.Deployment settings, but I'm not seeing a "start external program" check box
 
it's a radio button
under Debug
 
d'oh
found excel.exe
geez...
 
It hides.
We cool with radio buttons there?
As you might have noticed, I lied about not touching the settings.
3
 
I don't mind them, but I kind of was expecting a dropdown for some reason
 
My only thought with that was the length of the text.
The end of line comment style is the only other enum in there, but the descriptions are a bit more concise.
 
2:08 AM
Empty lines: Ignore | Indent | Strip
hmm maybe "strip" is ambiguous
 
The enum is actually Ignore, Remove, Indent
 
#GreatMinds
what's wrong with these names?
TBH "remove" is just as ambiguous though
 
Nothing really, assuming you know what they mean.
 
Have my Start external program set to Excel. f5 is complaining about Output Type of class library cannot be started directly.
@MathieuGuindon Abort | Retry | Fail
 
@FreeMan Rubberduck.Deployment should be the startup project
 
2:11 AM
mkay... rummages about
 
right-click the project, "Set as startup project"
it should be bolded in the project explorer
 
ah!
 
@FreeMan Sold. I'm going with that.
 
ding ding ding!
 
@Comintern curious, what's the default?
 
2:13 AM
Default is ignore because it's the current behavior.
 
@Comintern :D
 
fair enough
 
That way, pulling in the new setting doesn't do anything unexpected.
 
I think you may have sold me on the combo box though. Takes less real estate away from the sample code at the bottom.
 
2:15 AM
Combobox +1
This looks good:
not so much:
 
at least it highlights an invalid value... shouldn't it just cap at Max?
 
there's probably a MaxValue property you could set
 
It's currently just validated. Should probably be bounded though.
 
interesting. it allows me to save it with 6 selected. When I reopen, it's set to 5
 
2:17 AM
(and MinValue while you're at it)
saves the last valid setting, I suppose foot -> mouth
 
@FreeMan The settings object enforces that.
 
that's nice of it.
 
I'd rather have it bounded though
 
on the bright side, IndentModule does leave 5 spaces between methods...
<--- goes off to rummage some more...
 
public virtual int LinesBetweenProcedures
{
    get => _procedureSpacing;
    set => _procedureSpacing = value > MaximumVerticalSpacing ? MaximumVerticalSpacing : Math.Max(value, 0);
}
That should probably be a uint too.
 
2:19 AM
meh
 
rummaging managed
 
could be an enum too. SoTightYouCantReadShit, Normal, Wide, Wider, TooWide, SoSpacedYoullWonderWhatWasInThatMuffin
 
ummm...
?
 
kidding...
 
Forgot OneProcedurePerPage and DigForItSucker.
 
2:22 AM
OhCrapTheresAProcedureViewButtonINeverKnewAboutWhereWereYouAllThisTime
 
lol
That must be right before ForceScrollBarHandleToOnePixelHigh.
 
@Comintern oh, that's where it's saved within limits. got it
 
It has to do that to because you can manually edit the XML file.
Otherwise, when it deserializes you get what's in the file.
 
I think it should be limiting the spinner to 0 - MaximumVerticalSpacing, but it doesn't seem to be working:
                            <controls:NumberPicker Margin="0,-6,0,0"
                                         HorizontalAlignment="Left"
                                         MinNumber="0"
                                         MaxNumber="{x:Static smartIndenter:IndenterSettings.MaximumVerticalSpacing}"
                                         IsEnabled="{Binding ElementName=SpaceProcedures,Path=IsChecked}"
                                         NumValue="{Binding LinesBetweenProcedures,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
from IndenterSettings.xaml
 
2:34 AM
I don't think x:Static works like this
 
seems not
 
expose the value as a property getter on the viewmodel
and just make a normal Binding
 
shuffles off to rummage some more
 
there's probably a xaml error in the output pane about it
 
Looks like there's already a getter/setter in IndenterSettingsViewModel
        private int _procedureSpacing;
        public int LinesBetweenProcedures
        {
            get => _procedureSpacing;
            set
            {
                if (_procedureSpacing != value)
                {
                    _procedureSpacing = value;
                    OnPropertyChanged();
                }
            }
        }
it just needs to be bound instead of x:static?
 
2:38 AM
no, that's the value
you want
 
:/
 
public int MaxLinesBetweenProcedures => _settings.MaximumVerticalSpacing // or whatever
then bind to that
 
ah. ok.
 
the NumValue binding is fine though
 
2:51 AM
@Duga That's going to be slooooow
NVM - it's already slooooow
 
lol
it's not a perf-critical path though
 
No, it really isn't
 
we're talking about the actual functionality, or the CodeString stuff from the comment?
(or both)
 
OK, brain frying. Time to stop & pick up later.
 
kind of a rethoric question though
 
2:55 AM
plus, have to call the kids to work them through some sort of computer issue...
I want to do a git commit and git push to my repo, though, just in case my HD decides to die overnight, right?
 
@MathieuGuindon The GetAccessibleUserDeclarations(declaration) call.
For performance you want to filter first, then check accessibility on the result set.
 
makes sense
 
The IsAccessibleIn* calls are also doing duplicated lookups IIR.
 
much of it kind of reimplements resolver scoping
 
Not horribly concerned given that context though.
If that were an inspection, it might outrun the all the others for time though.
Combined.
 
3:00 AM
yeah.. it's just a check before rename gets performed - even a significantly noticeable delay isn't really a big big deal
except if it slows down the test runs too much :)
I mean, the user just clicked on something and is expecting RD to be "working on it"
doesn't hurt to make it as fast as possible though
 
Meh, The accessibility checks need to be performance tuned in general. Out of scope for individual PRs at this point.
 
I'd like to see the tests leverage the CodeString logic though
 
Agreed. One of these days the tests need a severe overhaul.
 
yeah. a bunch of early tests are hard-coding selections
 
Stuff like this is just wrong:
return IsInProceduralModule(declaration)
           && IsInProceduralModule(candidate)
           && candidate.Accessibility != Accessibility.Private;
The most performant clause is last.
 
3:09 AM
^
make a review comment?
 
That's the existing code.
 
it's everywhere
 
IKR?
 
3:22 AM
Night.
 
3:57 AM
[rubberduck-vba/Rubberduck] build for commit a0cc83b2 on unknown branch: AppVeyor was unable to build non-mergeable pull request
BUILD FAILURE!
 
@Duga Yay!
 
 
2 hours later…
5:42 AM
Duck check: Would a link to a GitHub account or website/blog be applicable as part of work history for a resume?
 
6:20 AM
Night pond.
 
 
3 hours later…
9:16 AM
> Some note to indicate the status of the PR. Due to changes in how dialogs are set up, unit tests need to be re-written to assert that the behavior is equivalent. That is also a challenge because some of unit tests are in fact testing the UI itself, and some of them may no longer applier or needs to be rewritten (rather than merely updated).

To enable the branch to build, a number of unit tests were excluded from the test project temporarily in order to focus on a specific subset of refactor
 
@Duga @Vogel612 hopefully that gives enough context to see where I'm at. If there's anything else not clear, just let me know and I'll fill in the gaps. :)
 
[rubberduck-vba/Rubberduck] build for commit 1323394f on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
@Duga need an option to "push but don't bother building because I know it is broken"....
 
10:12 AM
lol, yea
thanks for adding that context :)
 
10:51 AM
@Comintern Talk about slow. That just hit me this morning...
 
@IvenBach why not under "open-source contributions"?
 
00:00 - 12:0012:00 - 00:00

« first day (1566 days earlier)      last day (1614 days later) »