« first day (1480 days earlier)      last day (1700 days later) » 

12:00 AM
RELOAD!
[FreezePhoenix/XtraUtils] 3 commits. 352 additions. 65 deletions.
[Zomis/Duga] 1 opened issue.
 
 
6 hours later…
6:16 AM
Helloooo..... I was just reading this answer and it mentioned being to access pointers via Shlwapi.dll . Referenced reading was Not So Lightweight Anyone used this? Worth looking into?
 
6:27 AM
> UnreachableCaseInspection Overview

**100,000ft view:**
1. Acquire/Inspect all `SelectStmtContexts` in the VBA application
2. Walk/Parse through all descendants of a `SelectStmtContext` to determine:
a. The 'Type' of the Select Case Expression (`SelectExpressionContext`)
b. Determine the concrete value for every `RangeClauseContext `in a `CaseClauseContext`
1)Some `RangeClauseContexts` cannot be resolved to a value and are stored as variable `RangeExpressions`
3. Add each `RangeExp
 
7:04 AM
> @MDoerner

> The full version of your code is
>
> `Sheet1.Cells(1,1).Value = 1`

The more I consider this, the more it makes sense. Perhaps it's not a bug in the inspection, but instead the inspection needs to say to use the `value` property if you aren't assigning a range to a range.
 
7:30 AM
@Duga Why is that repo posted to here?
 
8:25 AM
I don't know why I am surprised but I just read that MSHTML uses Internet Exploder in the background. I guess I never gave it enough thought.
 
8:50 AM
> This is a resolver bug. The problem is that the resolver did not recognize the default member access. Otherwise, you would have seen a corresponding inspection result.

This should be fixed for a while now. Unfortunately, you are using a version where the displayed version number is not correct. So I cannot say whether the PR that should have fixed this bug came in before or after this version.
 
@Vogel612 I think Duga always posts status reports for all repositories she is hooked up to. It is just that RD is way more active than all the others.
 
hmm ...
that would make sense, yes.
 
@Duga you might be able to extrapolate from issuedate and date of the PR
 
9:37 AM
> Thank you very much for the overview. Reading it and having a very short look at the code, three things immediately came to my mind:

1. Are you aware that there has already been an expression evaluation engine in the preprocessor? It seems to implement the derivation a bit closer to the VBA specification, but also does not fully get it right.
2. The `ParseTreeExoressionEvaluator` seems to treat all arithmetic operators as operators between `double` variables. This is problematic because VB
 
9:50 AM
Well hello, long time no see. I was wondering about the .NET 4.6 requirement. Why is it needed ?
I'm running a non-SP1 version of Win7 and it means I cannot use .NET 4.6 afaik
 
@this ^
 
10:12 AM
@FlorentUguet the 4.6 requirement was introduced for custom code-analysis features IIRC
 
10:27 AM
Ah, okay
Thanks for the info
Which was the last version until that was added to the project ? That way I can have the very last RD version for that computer
 
that's quite a while back...
but the /releases/latest should be clean.
soo ... 2.2.0 should be good to go
 
10:44 AM
The About page of RD should be reworked (if it hasn't been yet) because it doesn't show the right build number. here, it reports 2.2.6683.21338. The latest release is 2.2.0.3439. The numbering should match I think
 
10:57 AM
@FlorentUguet Could you please tell me what version number the splash screen shows atm?
I guess it also shows the wrong number, now.
PR tried to fix this bug, but apparently it rather broke it harder.
 
Let me see
2.2.0.3129
Splash screen seems fine
 
PR #4079 tried to fix this bug, but apparently it rather broke it harder.
Hm
Wait, from your comment I inferred that you were on the last build.
 
I am not
Because I don't have .NET 4.6
 
The about box should be fixed in the last few versions.
 
I'll see once my company allows me to upgrade to a more recent Windows version
 
11:21 AM
Or to install a more recent .net runtime.
 
I cannot install .NET 4.6
It requires Windows 7 SP1 minimum
 
Oh, I see. That is a problem.
@MathieuGuindon @this When doing the switch to 4.6 you stated that we would still be compatible with Vista and later. That is not exactly true. We lost compatibility with vanilla Windows 7.
Hm, we never supported vanilla Vista and Vista SP1 because we used 4.5.
 
11:36 AM
@M.Doerner correct, we stopped supporting Vanilla Vista the same time we dropped support for office 2000 or maybe even 2004?
Considering that Windows 7 is EOL'd I think this is reasonable
 
Windows 7 SP1 is also pretty common, you can safely assume "Vanilla" 7 is supported
 
Well, as you can see above, we have users on vanilla Windows 7.
 
This is the first computer I ever see that runs Non-SP1 32-bit Win7
 
Isn't running that actually a security issue?
 
I actually reported that to IT multiple times
So it's not my problem anymore. There are official reports from me, so I'm not responsible if an issue arises. IT chose to keep an outdated computer on the company's network
 
11:41 AM
FWIW at this point that's pretty close to malicious negligence to run a vanilla win 7 machine in a corporate network
 
And that's stuff I already reported. But IT doesn't seem to care
We don't have spare computers or Windows licenses anyway
 
how long have you been working on that device?
and is your company more than 50 people strong?
 
6 months. I know it is in the company since 2011 (there's a time stamp indicating when it was installed)
 
~shudder
 
I only use it for Office work (Word/Excel/Access). Most of my work is on off-network computers
Probably why they don't care that much anyway
 
11:57 AM
I did not realize that 4.6 would not work on Windows 7 - When we reviewed the requirement we were more concerned with maintaining the current level of compatibility and I mistaken thought that if it's still supported in Vista (as we used to w/ 4.5) that nothing would change.
 
And yeah, my company here has ~100 people, but the group itself (the network we run on) has idk, 10k people or something, maybe 20-30k
 
That said, I'm scared that there still are RTM Win7 out there. That is also the OS where the ADO is horribly horribly broken that it cannot be shared in an environment with different OSes.
 
What is ADO used for ?
 
it's one of the data access libraries that can be used in various Office program, mainly in Access and Excel
 
Oh, like DAO ?
 
11:59 AM
Yes, DAO is another data access library
they have some overlaps but there are also differences.
 
That I know, that's what I still use, I didn't see what ADO had to offer compared to DAO
 
Probably why you didn't notice then.
If you had used ADO, you would have had problems sharing the file w/ others if they weren't on same Win 7
The ADO fiasco was a huge deal back then. Lot of angry customers railing on MSFT.
 
That's also why you should use experimental technologies at your own risk
Or at least, in a company, try them before using them
I can understand they get angry, but it wouldn't be the first unstable library/feature
 
No, it's not like that at all.
ADO has been shipped w/ Windows for a while. Probably since Windows XP. 2000?
 
Oh, damn
 
12:03 PM
So it is decidedly not experimental and there is an expectation to keep backward compatibility.
 
Hi folks. So... 144 lines to do to complete Czech Translations.
I've noticed that you're planning to release a stable official version? When is that? Could that include this translation? Or should I work at it for the next official release. I can have it done by the end of week. I hope. :-)
 
@SonGokussj4 the release is planned for July
so if you're finishing up, we can definitely put that in the next stable release
 
12:28 PM
Nice. So I will have some time to test it too.
 
@M.Doerner I would like to close off the busy state PR. Do you think we can get that addressed by end of the week?
 
It's quite complicated... Not as easy as I thought it will be. Many expressions don't have "Czech" alternatives... Or they have but I don't know about them. For example 'Property'... :) Or 'Case' or 'Accessor'...
 
12:44 PM
What the actual f*ck.
So there is an EU committee, that regulates vehicle emissions and whatnot. And they task a person who is totally not capable of accomplishing anything remotely coding-related with programming a gearshift calculator (to mirror some long-ish laws regarding the topic). And this person then delivers a kind of simulator, that runs in ACCESS. WTF?
Now (and has been for years) the official, approved-by-the-EU tool is a calculator in Access, that defies about every rule about programming that we know about. This codebase is absolutely atrocious. My VBA compiler just surrendered with a plain Procedure too large.
 
A simulator as in providing visual rendering of gearshift?
 
The procedure in question has 4169 LOC...
Oh, a link if anyone is interested in losing their sanity here and now: wiki.unece.org/display/trans/Gearshift+calculation+tool
The WLTP_GS_calculation_29052018.zip contains a .mdb that seems to be the root of all evil.
Also, I seem to have a slightly older version here. There were complaints about runtime errors (due to a slightly too large procedure), and so they seem to have "patched" this specific problem.
 
The fact that they wrote a 4000 line procedure is a major problem in itself. I also don't understand why they would use Access if it's meant to be used by the public. Not everyone has an Access license.
 
1:04 PM
Some highlights: No indentation over several nested ifs; many variables implicitly Variant; Option Explicit is completely absent (I presume it has left for a nicer place), in consequence more than 1000 variables are assigned without being declared. About 20k LOC, of which 17.7k reside within one module.
Also:
For i = 1 To 1

rstae.MoveNext

Next i
 
@Inarion now I wonder what would happen if somebody went ahead and ran RD on that behemoth of a mess
 
Neat, huh?
 
@Inarion huh?
 
@Vogel612 Guess what I just did. :P
 
@Inarion did the duck commit hari-kari?
 
1:06 PM
@this This kind of idiocy is about everywhere in this monster.
@this Actually, no. I think the duck is tougher than one would think.
 
Nice!
I would, though.
 
probably go back and tell them, "let's write a new application. It's cheaper than fixing this."
 
About 20 cases of Stop used. 1073 cases of Variable used but not assigned. 774 cases of Undeclared variable. 1780 cases of Variable is not assigned. And finally 1574 cases of Variable is not referred to.
Yet somehow it seems to produce correct/acceptable results (or so I've been told).
 
1:11 PM
Unfortunately, those only scratch the surface. Even if we "Fix All Occurrences", it'll still be awful.
@Inarion I'm sure it's because it was written by a genius.
 
@this That is the only plausible explanation. Us mere mortals, we are to far below him to even begin to understand the extent of his brilliant mind.
 
the fine line between genius and madness, I guess
 
and hence why when I see such code by a genius, rewrite is what I usually want to suggest.
 
1:15 PM
He seems to be using tables instead of arrays. As far as I can tell. (Disclaimer: I am no genius.)
 
welp ...
 
tables as in recordsets?
 
1.7k files changed... 260k insertions, 239k deletions.
not sure I'm actually doing stuff right -.-
 
what are you trying to do? remove whitespaces entirely from the project? :p
 
Running this calculation in the runtime version of Access will bombard the unsuspecting user with several dozens of "Do you want to execute this action query?"-like dialogs. "This action will affect 982 records, do you want to continue?"
 
1:19 PM
lol didn't even bother w/ DoCmd.SetWarnings (which in itself is a huge code smell)
at least he's using queries, instead of recordsets.
 
I bet the only reason this is found to be working correctly is because nobody bothered to write comprehensive acceptance tests.
 
1:34 PM
@Duga To clarify I was thinking of only executing the state change inside the write lock only when the conditions are met; if they are not met, exit the write lock and go into the if statement, albeit without the final else clause.
 
1:46 PM
Hm, that should work: evaluate whether there is something on the stack and evaluate the parser state in case nothing is there; then release the write lock followed be requesting the parse in case something has been on the stack.
 
so you think the EvaluateOverallParserState should be also evaluated inside the write lock, not outside as well?
that only is executed if the originalStatus is any other state other than Ready
 
You could actually handle both cases via the evaluation.
 
I see. I shall simplify then.
 
Why should we put it explicitly into the Ready state although some module state no longer reflects that?
 
My intention was to avoid any potential side effects when we enter a busy state from Ready -- it should not effect anything else when we exit the busy and return immediately to Ready.
 
1:52 PM
Not triggering the inspections would be good, but I think that can be a later enhancement.
 
but when we enter busy state from say... ResolvedDeclarations or something, then we must have the side effects because I have no idea how I would tell it to resume.
Alright.
 
The thing is that setting the module state to Ready has the same effect as evaluating it to Ready.
In case we are in the ready state although this is not reflected by the individual states, something has gone wrong already.
 
and regarding the comment about Cancel() just to see I understood the reason why --- it's because we are now funneling everything through to the BeginParse/ParseAll which already does Cancel() but inside the suspension read lock, all other methods no longer need to perform the Cancel(); just invoking BeginParse is eough, right?
 
Yes, the token provided from ParseRequested gets canceled later and is never used.
Do we have a way for a busy action to indicate the states it can run in?
 
I saw that now with one method. The reparse method's Cancel() was from the original code still so I had to think about that more to make sure I wouldn't break the original behavior there.
Well, I decided that's busy requestor's responsibility.
the suspension itself does not care what state it is; only that it will accept the request and execute it and clean up.
in this case, the test engine has to provide the decision whether we will enter the busy action
 
2:00 PM
That is a small problem because the state can have changed while waiting for the write lock.
 
Hmm. I see.
 
If a parse is running and fails, the action will run in an error state.
 
and we don't want to run tests then. Yeah.
 
The action itself cannot check it, because the state will be Busy.
 
Well, the event args for the suspend has a declined argument. I can enhance it so that the requestor will provide an array of allowed parser states.
and immediately after entering the write lock, check the allowed parser states against current parser state from the requestor and determine if we can continue or not.
if we cannot, we report back declination
 
2:03 PM
That sounds sensible.
 
@Duga reminder to myself so I will address that as well. Thanks!
 
 
1 hour later…
3:16 PM
Can the 'Search Results' window for 'Find All References' be re-opened without triggering another search..? It remembers the results of the last search, and so each time it's re-opened, it adds a new tab, even if it's the same search. One can of course can close the extra tabs, but a keystroke to re-open the window would be tres convenient.
 
^ yet another case for a tabbed window.
IMO, closing/opening just feels wrong.
@M.Doerner this comment is now a lie:
// Do not access this from anywhere but ReparseRequested.
// ReparseRequested needs to have a reference to the cancellation token.
protected CancellationTokenSource _currentCancellationTokenSource = new CancellationTokenSource();
ATM, we read its .Token from ParseAll or ParseInternal code paths. This is just fine, right? I will update comment accordingly unless there's some other assumption that might have been violated. (it is also set in few more places as well).
 
3:34 PM
I do like the tabbed window, though. It serves as a sort of intelligent bookmark list. It;s quite useful when I'm jumping between procedures in a module.
 
IMPOV, those tool windows, including the search results work better when they are in a tabbed window, similar to the one we have on the VS.
otherwise, the screen gets too cluttered - it does not make much sense to dock them all to the sides, and managing free floating windows is a giant PITA.
 
I agree. But until I get one of those delicious looking 3840x1080 curved widescreen monitors to hold all these tabbed windows (which I truly want to do), I have limited screen real estate. So I have to make do with Ctrl+Tab and opening/closing windows a lot. =-)
 
@spinjector They mean a sort of collapsible list of tabs at the bottom of the VBE
You can click those tabs to open it up.
Guess which programs I have on my dock.
 
3:57 PM
Ahh ok. Doesn't Visual Studio have that? And Eclipse?
 
That's what we want for the VBE.
Yep.
That's what @this was referring to.
 
Gotcha. <thumbup>
 
4:34 PM
> I think this was fixed but I don't know when. In my settings I see that redundant 'ByRef' is set to "Do Not Show" and "Implicit ByRef parameter" is set to "Hint". If those are the default settings then this issue can be closed.
 
5:34 PM
TIL, I'll know when I find my true love because she'll never get cold.
I guess I should go looking near the equator :P
 
5:51 PM
@this Reading article right now. What does "downlevel OSes" mean? Those operating systems that consumed the newer compiled code?
 
yes. as in I developed it on Win 7, and distributed to users on Win XP.
however, IIRC, the effects were worse than that. It also meant that as soon as the vBA code gets re-compiled on Win7, it never can be used anywhere but on Win7.
 
> @MDoerner Thank you for taking the time to _work_ through the overview.

Regarding 1. Looks like I am guilty of reinventing the wheel a bit (...OK...a lot) here. I looked for inspections and other support code that did what I needed/wanted to do....but missed this body of code completely. Stopped looking and never went back. Ugh.
Regarding 2. Yes, the currently implemented math for VBA Currency would lose some accuracy. I'll revisit the handling of the `Currency` type.
Regarding 3. T
 
6:20 PM
Oh my...
 
> IMO, the merging of expression evaluation engine should happen -- there's an issue for it already (#3969 ) but this is a large project in itself and thus must be its own PR. For that reason, I prefer the 2nd option. As noted in the linked issue, there are some difference and we need to merge the best parts from each engine. I'd rather use the improved version as the base for the merging.
 
-1
Q: VBA procedure too large - how can I resolve?

RobbyI have this set up in a userform. It's too much code for a single Sub, but I'm not sure how I can make it any smaller or break it up. Private Sub UserForm_Activate() Dim LastRow As Integer LastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row Dim B_academy As Long, B_alice As Long, B_american...

 
6:32 PM
:barf: I wish things were set up differently. Much copy paste check/re-checking...
Follow the Ronco model "Set it [up properly], and forget it!"
 
 
2 hours later…
8:12 PM
> I very much prefer option 2. Using a combined evaluation engine would be nice. However, this PR improves more parts of the inspection. In particular, the range and filter handling gets improved, which will not be part of the expression evaluation engine.

Moreover, the expression evaluation from the preprocessor will also need some improvements because some operations depend both on the value type and the declared type; the latter is missing atm.

I will have a look at the current PR in th
> I very much prefer option 2. Using a combined evaluation engine would be nice. However, this PR improves more parts of the inspection. In particular, the range and filter handling gets improved, which will not be part of the expression evaluation engine.

Moreover, the expression evaluation from the preprocessor will also need some improvements because some operations depend both on the value type and the declared type; the latter is missing atm.

I will have a look at the current PR in th
 
9:04 PM
The layout and everything went all wonky.
@this Did your Slack app just break?
 
no but my Azure VM did. Whee!
 
I blame Mr. Kim.
LOL.
 
well, only his haircut could give chunk of silicons terror.
 
9:19 PM
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4131?src=pr&el=h1) Report
> Merging [#4131](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4131?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/b20482c9979f3d0b123900ff3c9dceb154ddda45?src=pr&el=desc) will **decrease** coverage by `0.07%`.
> The diff coverage is `0%`.


```diff
@@ Coverage Diff @@
## next #4131 +/- ##
===========================
 
9:34 PM
[rubberduck-vba/Rubberduck] build for commit f0b70989 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4131?src=pr&el=h1) Report
> Merging [#4131](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4131?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/b20482c9979f3d0b123900ff3c9dceb154ddda45?src=pr&el=desc) will **decrease** coverage by `0.07%`.
> The diff coverage is `0%`.


```diff
@@ Coverage Diff @@
## next #4131 +/- ##
===========================
[rubberduck-vba/Rubberduck] build for commit f0b70989 on unknown branch: 52.48% (target 0%)
 
10:08 PM
Duck check: I just had "robotic process automation" RPA thrown at me as a "research this" task. Does anyone have any experience with it?
 
well always a first for me. I got an SQL error about mismatch in column count between the insert list and select list. After putting it in the excel side by side, I verified there were exactly same amount of column enumerated in each list. </stumped> Time for a beer.
@IvenBach are you sure it's not just a buzzword spewed by an army of PHBs? ;-)
(never heard of that. only have some vague general notions. Need context)
 
I try not to poo poo on anything I'm unaware of.
 
@this any duplicates?
 
From the 20 mins of reading so far its the "Robots coming for your jobs" stuff.
 
@IvenBach I think that's a Japanese thing, like just-in-time manufacturing
 
10:12 PM
Nope, @ThunderFrame. I used Script As to build the INSERT list and again for SELECT.
after having had that beer and a night's worth of sleep, I'm sure I'll go "doh" tomorrow morning.
@IvenBach might be just me but lately I feel they're just using new words to make old things new again. Nothing new under the sun.
 
I'm of the opinion that only so much can be automated. After that, one's just guessing. And watch out for blind acceptance of stuff one doesn't understand.
 
@this. Congratulations, you made RD beat VSCode to admin free installation
3
 
I didn't even know that VSCode used to require admin installation.
 
and besides, I'm sure VSCode didn't have to deal w/ the COM registration and being an addin to some program.
 
10:39 PM
@this all the more impressive that RD got there first
 
10:58 PM
I wonder if any of our German acquaintances are around.
I'm trying to get a CD from an Austrian group, and they sent me this email:
Bitte um Überweisung von insgesamt 21,50 Euro
(1 x 15,- Euro, zzgl. 6,5 Euro Versandspesen)

auf nachstehendes Konto:
VKB Bank Gmunden
lautend auf: Johann Ortner
IBAN:  AT571860000112041984
BIC:  VKBLAT2L
I get the 21.5 Euros price, I'm just not sure how the international transfer would work with the bank.
Maybe I should ask if they have PayPal instead.
 
Tell them you are an American and demand they speak English to you.
 
I'm not that arrogant, LOL.
 
I honestly don't know how an international bank transfer from outside the EU works. However, I can tell you what the different positions mean.
The first one is the name of the bank.
The second one the account owner
The IBAN is the account identifier, which is unique inside the EU. (Note the AT for Austria.)
The BIC is the identifier of the bank, also unique within the EU.
 
11:16 PM
Thanks.
 
@this en.wikipedia.org/wiki/Robotic_process_automation so old stuff in a new suit. Using the GUI in place of API calls.
 
Btw, you are right about the price. It is €21.5 (€15 for the CD and €6.5 for packaging and transport).
 
Heads up: we're about to send an email out to about 120,000 users who *only* have an OpenID to login to Stack Exchange. We'll be removing OpenID support from our code entirely in 30 days. This is for .NET Core, testability, and our sanity.
 

« first day (1480 days earlier)      last day (1700 days later) »