« first day (1924 days earlier)      last day (1256 days later) » 
00:00 - 19:0019:00 - 23:00

12:00 AM
The House That Agile Built
 
LOL
 
That building control then condemned...
 
RELOAD!
[rubberduck-vba/Rubberduck] 2 opened issues.
[Minesweeper] Games Played: 81, Bombs Used: 53, Moves Performed: 9372, New Users: 20
 
@mansellan The Castle Shack Bunker Tower House that Agile Built
2
 
ttgtb, gn :-)
 
12:02 AM
'Night!
 
night!
 
 
4 hours later…
4:15 AM
wth
1
Q: Error 438 getting default member in custom class

Ricardo DiazAny help on why the default member is failing in the For Each would be really appreciate it. This is based on this blog post from Doug Glancy: https://yoursumbuddy.com/building-a-workbook-table-class/ 1) Added a Class called cWorkbookTables Dim m_wb As Excel.Workbook Dim m_Tables As Col...

 
4:37 AM
posted on September 12, 2019 by Rubberduck VBA

Whether VBA can do serious OOP isn’t a question – it absolutely can: none of the SOLID principles have implications that disqualify VBA as a language, and this means we can implement dependency injection and inversion of control. A quick summary of these fundamental guidelines, before we peek at DI and IoC: SOLID Single Responsibility… Continue reading Dependency Injection + I

 
@BloggingDuck nice article, but the title doesn't jive w/ the content. This is probably more of SOLID in VBA than DI/IOC in VBA
also in code sample, there's a > showing through.
 
5:03 AM
@this hm, I tried to make it a point to say no more than 2-3 sentences about each solid principle
 
yes and the was more about writing testable code
but nothing that actually demonstrates the DI in VBA?
sorry I mean IOC
 
I felt like that needed some code, but the article was getting lengthy... no?
 
yes can do part two
 
but at least say so. otherwise i feel there’s something missing
 
5:07 AM
right. editing...
 
because the article is a great overview of why we wanna solid and ttd vba
 
ugh ffs wp app won't load the paragraph blocks
I'll edit from desktop tomorrow morning
 
no worries. good night!
 
'night!
 
 
7 hours later…
12:36 PM
@mansellan No it's frickin' not!!! It's the only thing that keeps the 5-10 largest cities in the country from running the entire country. California already makes way too many decisions because they're a large market and manufacturers have to comply with any stupid rule they come up with, which they end up selling to the whole country so CA, by default, makes rules for the whole country.
 
12:53 PM
FWIW, software has a harder job than house builders.
Because if someone is doing an add-on, they can pay for part of the house to be changed for it to fit too.
Software, you get fired if you tell them that and refuse to "just do it".
 
@MathieuGuindon typo in today's blog entry:
Public Property Get IsValid() As Boolean
    IsValid = MySpecialDecimal &gt;= 0 And MySpecialDecimal < 1
End Property
 
@FreeMan Iven pointed that out in my post the other day.
I can't figure out how to fix it.
The less-than's work, but not the greater-than's.
 
also, just noticed
8 hours ago, by this
also in code sample, there's a &gt; showing through.
#LateToTheParty
17 hours ago, by FreeMan
hrm... my server at home just notified me that the power is out and that it's exceeded its set run time so it's shutting itself down.
Seems a car ran into a power pole yesterday afternoon at about 3:55. Took them until almost 8pm to get power restored. Glad the UPSs got all the 'puters shut down gracefully. Though the one for my desktop machine is now beeping non-stop with a warning about "Internal Error". I think that means it's time for a replacement... :/
 
could be the battery, though.
Supposedly, you have to replace the battery periodically
 
Go laptops. They have a built-in UPS.
 
1:01 PM
Do they really?
Rephrase - does laptop + power surge protector really give the same protection as a UPS would have?
Thinking about it, no. You could be plugged into a dirty power source and that can fry your laptop's power supply eventually.
 
I suppose.
 
It's cheaper to replace a UPS than a laptop's power supply.
 
But the laptop battery prevents it from just shutting down if the power goes out.
So at the least you can manually power it down.
So it's safer than just pulling the plug from a server.
 
Yes, that's true and it'll be more tolerant with brownouts as well. The question is whether you'd rather fry the laptop's power supply or the UPS's battery in the process.
 
1:23 PM
APCs web site indicates that it should give some sort of Fault Code. My wife just looked and couldn't find it displayed. I've found a couple of trouble shooting tips that I'll have to try out before replacing. It could be bad batteries, but these are only a year or so old, so unlikely (but still possible).
@this Yes, you do. I've replaced them in most of my UPSs. Used to be the batteries cost about 90% of a new unit, so I just bought new ones. Battery prices have dropped considerably.
Just saw some instructions on making your own battery pack out of a couple of automotive batteries. Might consider doing that! Might get 12-24 hours of run time out of that setup!!
oh well, back to code.
What does this middle one actually do?
Other inspections give more explicit options like "fix all in module" or "fix all in procedure", how does "fix all occurrences in project" differ from "Fix all detected occurrences"?
 
Multiple projects...
 
oh.
especially confusing when there's only one project open...
Inconvenient when using git and wanting to keep changes to one module at a time, too...
 
1:40 PM
> **Justification**
When using source control, keeping fixes to one module at a time can be desirable. This inspection offers options to `Fix all in project`, `Fix all detected occurrences` (which isn't particularly obvious that it's across all open projects, especially with only one project open), or `Disable inspection`. Right-clicking offers the opportunity to fix the single instance.

**Description**
An option to `Fix all in Module` would be very helpful to quickly fix several issues wit
 
@Duga Feature Request seemed to be the best category for it.
 
@FreeMan Just out of curiosity, if you apply a fix to a module and that breaks the dependent module (e.g. the signature has changed and call sites now have to be updated), wouldn't you want to update the call sites before committing the changes to avoid having a broken version in git history?
 
yes. However the specific inspection I called out is flagging the use of Right instead of Right$ (or the other equivalent string slicing functions). I'm not sure how that would break a method signature. Additionally, I'm not advocating removing Fix all detected occurrences, simply adding an additional option.
i.e., this is a RD "suggestion" inspection - either way will work, using the string-returning function is preferable, but shouldn't break things one way or t'other. Unless, of course, you're now returning a String where something's expecting a Variant... Oh, wait, that won't break anything.
 
1:56 PM
Oh yeah I know. I was just curious about that particular scenario.
 
Yeah, I agree 100% that if I'm changing a method signature, I'd prolly want to fix up all the call sites and check it in en-masse. I just don't think this situation falls into that category.
If I'm not seeing something, can you give an @IvenBach trademark crayon scribble explanation of what I'm missing?
;)
oh, you were referring simply to the "keep changes to one module at a time"...
#coffeenoworkee
 
In the case of the changing signature... the horrid thing is that VBIDE might be OK with the changes to the data types.
 
Yeah - that's situationally dependent. If I'm addressing Inspections, I prefer to do it one module at a time when I can. If I'm creating breaking changes, well, fix it all up before checking in.
 
It won't necessarily be a compile-time error but you get a lovely runtime error! How fun!
 
for some values of fun
 
2:05 PM
Anyway, I was thinking that if we provided the "fix in module", it might be a good idea to issue a warning when it's known that an quickfix can break the code when restricted to a module
 
not unreasonable.
Are there any current QFs that could make breaking changes to a method signature?
 
well, rename or reorder parameters would be the obvious examples
where restricting to only the module (esp when the procedure being altered is Public) wouldn't be necessarily safe
there is probably other I'm not thinking of.
 
Refactor|Remove Parameters, Refactor|Reorder Parameters, Refactor|Introduce Parameter aren't QFs (that I'm aware of), and they don't give you a choice but to go fix up the call sites.
 
I can't remember but I thought I saw them used as QF. I might be making it up.
 
#DontRecall
 
2:10 PM
Remove is a QF.
For unused parameter.
Reorder isn't.
Introduce isn't as far as I'm aware, but it actually could be.
 
but it calls the Remove refactoring which, by default, fixes all call sites.
 
We could detect call-sites with N+X parameters and offer an Introduce on each of the parameters at the call-site.
Then it would grab that parameter, take a name, auto-detect the type if possible, and create a new parameter.
@FreeMan Yes, it kind of has to.
Otherwise, you might as well do it manually.
 
Also, of note: my request is not a general purpose, across the board request to add 'all in module` to every QF - It is specific to the one identified. If that's not clear enough, I will add more text to make it so.
 
Yeah. That's probably why we didn't provide the "fix in module". I totally get the reasoning behind why one'd want to lestrict fixing to only one module
Just that if a QF can't be because it alters the call site or whatever, that should be warned so the user can make an informed decision
 
Yeah, might not be a bad idea there, if it won't break anything else.
 
2:13 PM
Can't have them going "HEY WHY U BROKE MY CODE"
 
the title of the request is "Additional options for Use of variant-returning string function inspection"... I'm certain that's not the exact name of the inspection, but it not "Additional options for all inspections"...
 
I know, but I always generalize. If we're going to do that, we might as well consider other inspections where it makes sense to.
 
changing one Right to Right$, changing a dozen here and there or changing all of them won't break anything.
 
It's actually more work and problematic to special case a single inspection.
so we want to deal with it as a class
 
but it's already sorta special cased by not having that option
 
2:15 PM
@this Really?
I thought this scope was specified on the quick fix.
It's a set of bool flags on the quick fix last I saw.
 
which all QF share?
 
my understanding was that all the inspections have the appropriate set of QFs, not one of each possibility
 
meaning, if we add a new flag, all QF gets it....
 
@this No, they override them each on their own.
The flags go into the base class, and each QF overrides them.
 
two random inspections - different set of QFs. Pretty standard stuff...
and a different set of options on the right-click menu for that first one:
TBH, it would make more sense (to me, at least) if all options were on the context menu and as links at the bottom of the description. I'm not sure about the logic of breaking them up into 2 unique groups. But that's a discussion for a different day.
 
Ok then. Ignore my comment RE: work. Still seems to me more logical to consider it in a group rather than just adding it only for one inspection. It can't be the only one inspection that would benefit from such addition.
@FreeMan I kind of agree, but we really want to have custom panes sooner than later which would address several other UX shortcomings....
 
TFW you play a video on your phone.
And it reaches 2 minutes, and the video is only 45 seconds long...
And you've only seen 2 frames of it...
 
@this I do recall hearing that... that means things like red-squggly-underlines and context menus of inspections and QFs directly in the code pane, right?
 
yeah
 
♫ and the wind whispered Avalon ♫
2
 
2:34 PM
@Hosch250 try adding rabbit ears. I hear it helps.
 
lol
silly rabbit, trix are for kids!
 
@this I should ask my coworker.
He has a phone with a rabbit case.
 
probably has a 4G antenna buried in one of the ears and a BT antenna in the other to greatly improve reception.
 
I wonder :)
 
a friend of mine (claimed to have) managed to somehow hook up his cell phone's BT antenna to his car's antenna. Said he could leave the phone in the car and walk all around his house and neighborhood chatting on his BT headset.
 
2:40 PM
@FreeMan @this WP isn't letting me fix it for some reason.
 
@FreeMan soooo, a mobile car phone....
#Not80sAtAll
@MathieuGuindon Hosch said he had the same problem on his site
I guess because WP.
 
^
updated
 
Much better intro
reports all ads clickbaits
 
@MathieuGuindon get a bigger hammer
@this pretty much. Not unhandy, and, considering mid-naughties, not bad tech...
OK, I'm missing something really obvious:
'@Interface
Option Compare Database
Option Explicit

Private Type api
  URL As String
  apiFunction As String
  UserID As String
  Password As String
  RequestHeaders As Scripting.Dictionary
End Type
Private this As api


'---------------------------------------------------
Implements IRestDriver

Public Function Create(ByVal inURL As String, ByVal inFunction As String, ByVal inUserID As String, ByVal inPassword As String) As IRestDriver

  With New RESTDriver
    'NOTE: Expects no trailing slash in the URL
 
@FreeMan Set apiCall = new RESTDriver.Create
"Variable not defined" sounds like RESTDriver doesn't have @PredeclaredId
 
2:51 PM
@MathieuGuindon as I said, "something really obvious".
thx
@this: V
that one's got Procedure, Module, Project, Detected & Disable...
;)
dead horse: beaten
 
hmm. lemme find another dead horse to beat.
 
:D
 
@FreeMan each QF has a public virtual bool CanFixIn[Module|Project|...] property that every QF can override. If a QF is dangerous or makes no sense to apply across the board, CanFixInProject will be overridden to return false, and the linkbutton for it won't show up
 
41 mins ago, by Hosch250
@this Really?
and on for the next couple of min, @MathieuGuindon
@this, Mug found your next dead horse.
More obviosity being missed:
Private Property Let IRestDriver_RequestHeader(ByVal key As String, ByVal Value As String)
  this.RequestHeaders.Add key, Value
End Property
Private Property Get IRestDriver_RequestHeader(ByVal key As String) As String
  IRestDriver_RequestHeader = this.RequestHeaders(key)
End Property
Why is it only Intelisensing the Geter, not the Leter?
 
because you're not calling the Leter
(or is there a = operator to the right of that?)
 
3:02 PM
no... no =
 
if the member call isn't on the LHS of a = operator, then you're not calling the Property Let member
...also, intellisense for both would be identical anyway
...because the RHS/value argument is provided by the RHS expression
 
so .RequestHeader("Key", "Value) = vbNullString to force it to use Let, while actually grabbing both parameters to use in the actual Property Let?
#ImLost...
 
you're confused
 
yeah... bad...
 
.RequestHeader("Key") = "value" passes "Key" to the key argument, and "value" to the RHS argument
it's invoking Property Let because it's a value assignment operation
 
3:07 PM
wow...
that make much sense. Now.
hence why the default variable name when the VBE creates it for you is RHS.
 
Prevents some from being complete id10ts
 
indexed properties are always confusing at first
 

We're all idiots

Aug 22 at 19:34, 15 minutes total – 24 messages, 6 users, 0 stars

Bookmarked Aug 22 at 19:52 by Mathieu Guindon

@MathieuGuindon I tried doing something like this in some other code and hacked together a horrible workaround that made it work but I can never figure out how it's working. I now realize what I broke and why.
 
:+1:
the RHS argument must always be the last parameter of the Property Let/Set member, no matter how many index parameters your Property Get wants (the Property Let/Set members' parameter types must be consistent with the Property Get signature if it exists, otherwise code won't compile)
@FreeMan also if you do Set .RequestHeader("Key") = something, but there's no Property Set member for the RequestHeader property, code won't compile either
Let thing.MyProperty = 42 invokes Property Let; Set thing.MyProperty = somethign invokes Property Set
and thing.MyProperty.Foo, or foo = thing.MyProperty, invokes Property Get
 
3:26 PM
yeah. no Set, I was just cornfused and trying things at random. Not the best way, I know, but #coffeenoworkeetodaee
I've got it now. Hopefully, I'll remember it tomorrow (for whatever value of tomorrow is the next time I hit this), and I'll be good to go
 
3:41 PM
Regarding the fix multiple settings on quickfixes, those that use refactorings ehithput a special entry point for them, are all restricted to fixing single instances.
Maybe we should add a separate interface to the refactorings providing the necessary entry point.
 
3:57 PM
Nail + Tire = $$$. Undesirable equation for sure.
 
Yeesh. Not repairable?
 
It is definitely a good morning today.
 
hey, at least it didn't explode at !CA highway speed - you coulda had an almighty accident!
 
It's on my wife's care. Although it's in the tire it's sealed and not leaking. Still drivable this morning.
 
@IvenBach Go to the local full-service gas station. They'll fix it for probably $20.
Look for the mom & pop shops.
Basically what they do is yank it out with a pliers.
Then they have a thing kind of like a screw they shove in and rub it back and forth to rough it up so the glue can grip it good.
Then they take a rubber plug, rub it with rubber glue, and shove it in.
Then they'll top the tire pressure off (you might need to ask them), and it'll be instantly drivable and hold for years if done well.
I had a big bolt go through my tire (technically, my mom's--before I bought my own car), and that's what happened.
My dad can also fix tires, but I'm not sure where all the pieces of his kit are.
He's had patched tires for years too.
You don't even need to take the tire off the car.
TBH, I should just buy my own kit so I don't need to call a tow-truck if it happens.
If it's not leaking, it's definitely repairable, but should be fixed before it blows.
On that note, Ford is trying to sell me another warranty pack to bring my warranty from 3yr/36k mi to 8yr/150k mi.
 
 
1 hour later…
5:25 PM
@Hosch250 of course they are, those are very profitable for them!
@feeds 99 buttons? Yikes!!!
@Hosch250 I've got one of those. Don't think I've ever used it. You do have to be careful - if the puncture is too close to the shoulder, a plug repair is more dangerous than good. It can get you to a tire place to get it replaced if you drive carefully, but... YMMV
Also, Discount Tire will usually repair (at least they do 'round here) for free.
 
is declaring a global i variable common practice? I can't even...
 
yeah. saw that. that's... weird.
 
@MathieuGuindon I've seen it.
 
not just weird, ...catastrophically lazy and stupid
 
It's not common in C-based languages.
More stuff like JS, where all variables are scoped to the function.
Like, you can do a for loop, and the variable isn't scoped to the loop--it's scoped to the function.
So you can't use i in two for loops in a row.
 
5:36 PM
same as VBA
 
That's why everyone hates VBA so much - there are so many misconceptions and cargo cult, that, well, if you're a formally trained programmer, it's just egregious. If you've picked up the ability to write some macros on your own, it's really cool.
@Hosch250 the 2nd loop doesn't declare the starting value?
 
@Hosch250 well you can, but it's reusing a condom variable
 
ewwww
 
^ LOL
 
5:37 PM
That SHOULD be the response for variable reuse.
 
"make it global so you don't have to declare it everywhere you need a loop"
#UltimateReuse
tight scoping? what's that?
 
And then you switch to a language that supports concurrency.
 
yeah
or wonder why the heck people treat VBA as a toy
mind, it was on SU no SO
 
5:54 PM
That place is beyond hope anyway, IMO.
 
6:20 PM
Dear Outlook, Y U KEEP KRASHING????? O365 SUPPOSED TO BE IMPROVMENT!!!
 
@FreeMan send a frown :)
 
yeah, well, it's sending me plenty
 
lol I mean the evil telemetry stuff
ooooh
:lightbulb:
 
I'm not tired anymore. C# 8 ALL THE THINGS!
 
> Another idea: "Send a frown :frowning_face:" and "Send a smile :smiley:" user feedback features, like Microsoft does with e.g. Excel telemetry?
> > - Not right now (pre-selected)

What is the difference between that and "Disabled"? Do we prompt again week later, or something?
 
6:29 PM
@Duga good question
 
> @Hosch250 that would be an installer prompt, so "disable completely" could not even install the Rubberduck.Telemetry assembly, while "not right now" would install it, but leave the setting disabled.
> That'd be a pain if someone toggled it to Enabled after installing with it Disabled. Alternately, would we remove the DLL if they installed in to Enabled, then toggled to Disabled?
 
@Duga huh? if it's not installed, then there's no setting for it..
 
Wouldn't we have an enabled/disabled setting in the settings?
So someone could toggle back and forth?
And it'll not just be "a telemetry module".
It would be more built into other modules.
Like, the inspections (code analysis) module, the UI module.
 
@MathieuGuindon oh! where do I go to send lots of frowns?
sad that we've gotten to the point where all we do is send pictures to one another
 
@FreeMan In the bottom bar, I think?
Might be the very top. They change it sometimes.
Basically it takes a snapshot of the system state and sends it along with any description you have.
I think it also lets you take a screenshot.
 
6:41 PM
@Hosch250 yes, but not if the DLL isn't installed
 
That's my point. Odds are it won't just be a DLL.
 
it has to be
 
Why?
 
otherwise the install can't be conditional
 
I don't think it should be.
 
6:42 PM
i.e. it can't be a straight-up dependency of RD.Core
 
I think it should just set the setting.
It would be nearly impossible to make it be a standalone DLL--how will you actually capture the data then?
 
if IT says you're not getting RD because telemetry, that's a foot-shooter
 
It'll need at least some logic in the DLLs.
 
@Hosch250 huh, pretty simple actually
RD.Core.Telemetry namespace can define the interfaces
RD.Telemetry can implement them
 
And how will you, for example, report that an inspection returned N results, or threw an exception?
 
6:44 PM
49 secs ago, by Mathieu Guindon
RD.Core.Telemetry namespace can define the interfaces
 
Uhh...
 
inject a no-op implementation if the assembly isn't loaded
 
Oh, NVM, I'm missing things.
 
@Hosch250 hrm... not anywhere I can see and searching the "Tell me what you want to do" for "Send feedback" or "feedback" gives me nada...
 
So basically, you need to inject an IInspectionsTelemetry into places.
And the pass data into members.
But still, I don't like started disabled and never being able to enable it.
 
6:46 PM
if the decision was taken on install, then it was taken
 
It should at least be able to download the DLL and install it automatically if the setting gets switched.
Like all the other telemetry things I've seen.
 
> Help make Rubberduck better! Download Rubberduck.Telemetry today!
 
What happens if it starts enabled, and then gets disabled, though? Same problem, basically.
Either you remove the DLL, or you leave it to do nothing.
 
"it gets disabled".... that's the default setting
DLL is there, and switch is off
I don't see what the problem is
 
I don't either.
I'm just saying, if you can disable it and leave the DLL there, I don't see the difference between not having the DLL at install or just toggling it off.
If they are really desperate, they can block us at the network level anyway.
We could even say which URL we publish to. telemetry.rubberduckvba.com, for example.
So they could block us easily.
 
6:52 PM
there's no difference. except when you're in a locked-down corporate environment that freakishly controls everything and they might be ok with RD but not with telemetry
@Hosch250 Azure+HTTPS is a prerequisite for it anyway :)
 
and trust me, some of us work with corporate IT departments that have strange ideas of what's secure and what isn't. (I'm looking at you Cisco AMP for Enpoints and Symantec Endpoint Protection both running on my machine at the same time.)
 
@MathieuGuindon They'd probably be OK with it if it had a setting.
If they're that freaked, they won't allow ANY OSS anyway.
I don't know, though. I don't like big biz.
 
we used to have 3 AVs running at the same time, so this is a great improvement, actually!
 
They do some cool stuff, but so do small, sane companies.
 
point being, telemetry is inherently double-edged, so we need to go out of our way to reassure paranoid users that no telemetry is happening if they said they don't want it
 
6:59 PM
^this
 
the installer setting could be "I'll have none of it, thank you"
 
00:00 - 19:0019:00 - 23:00

« first day (1924 days earlier)      last day (1256 days later) »