« first day (2061 days earlier)      last day (1119 days later) » 
00:00 - 20:0020:00 - 00:00

8:07 PM
time to start looking up locations...
 
Dang. I'm going to need to start posting the location to "Wat".
 
and that is where knowledge of your not-very-educational geography becomes useful, too. E.g. send certain people you dislike to a certain town in Austria.
 
@this You mean F***?
 
all i know is, there's a Hell in Michigan.
 
Ninja'ed ^
 
8:11 PM
it actually has "ing" but yeah
hmm so a trip to Austria then to Michigan, then.
 
F***ing was featured in an episode of Grand Tour
 
TBH, that pun is pretty funny, though.
 
was Grand Tour something that aired on prime time?
If so, it would have been hilarious to see how much they had to bleep/blur out
 
On Amazon prime
Before they got to F***ing, they passed through Kissing and Petting
 
Oh, to have the last name of "Kissinger"...
 
8:14 PM
Of course, this has to play in the directions you send to a gal you like...
 
Gross :(
 
@BigBen I guess they skipped the first base, whatever it was.
 
They did end up in Wedding though.
 
@this isn't kissing "first base"? was never up on all the rules of baseball
 
FWIW, nobody really defined what the bases are supposed to be.
 
8:15 PM
whew!
 
en.wikipedia.org/wiki/Wikipedia:Unusual_place_names <-- may be helpful for choosing your map-messages
 
Well, sounds about right to me.
Kissing
Petting
F***ing
Wedding
 
@this where's that video of tina fey talking to those girls abotu "first base" (kissing) and the girl laughed at her and said first base is a**l
important info... don't try to google "movie where girl makes fun of older woman for thinking first base is kissing"
you get... particular results
 
@Hosch250 I've usually heard that the home run is when you get laid; no wedding in the baseball. But who knows.
 
@Hosch250 well they did start in the town of Wank too...
 
8:19 PM
Well, feel free to swap the last two.
 
I mean if you asked Amish, they define first base as a glance, 3rd base as kissing.
 
Not really.
The smart ones get away with it.
 
Back to more SFW topics... When setting up an ODBC connection string, are any of the elements quoted or otherwise delimited? i.e. UID="myusername";PWD="mypassword" vs UID=myusername;PWD=mypassword
 
@Hosch250 arguably, petting would be less intimate than kissing.
 
^ Agree
 
8:20 PM
(presuming that you're not petting in uh, intimate area)
 
@this Depends where you are petting.
 
@Hosch250 yeah, that
 
^
 
@FreeMan Usually no quotes, IIRC.
 
@Hosch250 I dunno... the car, the theater, her parents house... what difference does it make?
 
8:21 PM
@FreeMan you can quote if you want. Useful if they have lame username or password but TBH I've yet to quote them.
 
@FreeMan I thought you had moved on to SFW topics
 
@Hosch250 i was thinking single quote if you intend a value to be input, but not otherwise
 
@Hosch250 that's what I figured. I did see an example on SO of UID={myusername};PWD={mypassword}, and nobody corrected that one...
 
@BigBen he got sucked back in.
 
i think the outlier is a space in the username or password
 
8:22 PM
@BigBen I tried...
 
depending on translator
 
nah, spaces aren't necessarily a problem
a problematic character would be having an equal sign or semicolon in the username or password
that'd mess up the ODBC connection string parsing
 
@this i don't thinking ODBC particularly as trying to get info into/from a view using SharePoint... %20% versus " " is obnoxious
 
@FreeMan it's documented, FWIW
@Cyril Unfortunately it's up to the driver to decide whether to interpret %20 as literal or to decode into " ".
one drive might not mind %20, other driver might go "WHAT IS THAT"
 
copy
 
8:24 PM
Remember, ODBC & OLEDB are basically specification with some API but it's mainly a specifications.
 
I'm getting Invalid connection string attribute with
conn.ConnectionString = "Provider=SQLNCLI11;Server=tcp:[serverID].database.windows.net,1433;Authentication=ActiveDirectoryPassword;Database=[DBName];UID=[myID];PWD=[myPwd];Use Encryption for Data=true;"
 
Translation: you be at mercy of the lame-o's implementation.
um
 
is the Provider the issue? I've seen it in some examples, but not others.
 
I think you want Encrypt=true
Yes it is
5 hours ago, by this
Note that requires you to use ODBC 17 or OLEDB 18.
SQLNCLI11 has no clue what Authentication is for
That's the other fun thing about the connection string. If you pass in a meaningless key-value pair, it won't throw you an error (by specification, it's not supposed to).
 
probably, but still issues. possibly that ^
 
8:26 PM
It'll just silently ignore the meaningless key.
Thus, SQLNCLI proceeds to bonk its head using old fashioned SQL Server authentication which fails since you want to use AD uid/pwd
Time to upgrade your driver, boy!
 
gah. I use SQLNCLI11 elsewhere... must go find what is needed.
 
Do not forget that if you need both ODBC and OLEDB (e.g. Access), you need two separate drivers!
 
is that not installed with office 2016 or do I need to update
 
nope. Ship it yourself.
 
oh goodie. :/
 
8:29 PM
Fun times! :-D
 
That's the ODBC 17, to use w/ DAO.
For ADO, you want OLEDB 18.
 
I knew that! I was just testing to see if you were paying attention.
 
@FreeMan nah, I was half-asleep.
 
@this sigh... thanks.
I presume this means that I should be updating all my Provider=SQLNCLI11; settings throughout my code.
though I'm obviously not using any functionality that isn't supported, I may be shooting future me in the foot (as past me has just done).
and yes, it does hurt
 
8:40 PM
That'd be the case if you need to use the Active Directory uid/pwd. That simply doesn't exist with SQLNCLI11
so you are using a new functionality
and "settings"? You should have only one place to change.
 
yeah... not using anything anywhere else.
and, fortunately, I do set my connection string in one place, so there is only one change to make.
 
Better clean it up so that they all can just ask for a connection, instead of repeating connection string everywhere.
Oh Ok, I misunderstood that bit then.
 
well, what I said was pretty ambiguous and would lead one to assuming that it was set everywhere...
@this wait, does this mean that if I uninstall the SQLNCLI11 driver that Access will stop working unless I install the ODBC 17 driver?
 
well it needs a driver...
and you don't have to uninstall it; you only need to install the 17 and update your connection string
 
9:00 PM
@this OK.
 
9:10 PM
Once I removed "TrustServerCertificate=no;" from the copy/pasta'd connection string, it worked a treat! Thanks @this
 
is there a way within a class to take an outside variable, e.g.:

for i = 1 to 2
CFoo.val = i
foo = CFoo.output
next i
and within class CFoo,

output = val * 2
 
What are you trying to do?
 
trying to make a class to use and am getting errors left and right... just seeing if that's a possibly syntax
 
@FreeMan FYI - you really don't want that attribute set in a production conneciton string
 
9:17 PM
@Cyril I don't understand what you're trying to do with the value.
 
i am attempting to make a class to support a repeated block on a worksheet, and where I loop down my sheet from block to block, i want that iterator captured, as it tells me what line of the block to reference
 
@this yeah... copy/pasta from the SO question I found. Shouldn'ta been there to begin with.
 
so if description is always on cells(i,1), i would want to create a CClass.Description that always takes the value in the cells(i,1)
 
Add a public property that sets the value you want to use.
Public Sub AssignReference(byval startingCell As Range) which stores that reference to a backing field.
 
so property get iterator() // iterator = i ?
was treating val() as that iterator in my terrible example... didn't htink through what "val" was being used as
for i = 1 to 2
    CFoo.Iterator = i
    foo = CFoo.Output
next i
 
9:22 PM
Oh.... That is a bit clearer.
This block is a range of cells?
 
public property get iterator()
    dim i as long
    iterator = i
end property
block is a range of cells, yes
 
Contiguous or non-contiguous?
 
oh shit, i could pass the entire range as the class (set it on each loop) and use the class to be the value in the passed range
contiguous; i think i just had a eureka moment based on your question
 
Rubberducking helps.
6 mins ago, by IvenBach
What are you trying to do?
I ask myself that question a lot more now.
 
i was taking a procedural approach to the concept, not thinking as abstractly as needed... i think
trying to remember the phrase This was using, which i think was related to abstract conceptualizing
@IvenBach i hear you and thanks for the help
 
9:26 PM
If it's a range supply it as an argument. Then loop over every area, if there are multiple areas, and within each area ever cell in that area.
Mind you I'm just a schlub learning myself.
 
currently i loop similar to:

for i = msStart to msEnd Step msStep
    dst.cells(i,1).value = src.cells(i,1).value
    if instr(src,"v2018") then
        dst.cells(i,2).value = src.cells(i+2,2).value)
    else
        dst.cells(i,2).value = src.cells(i+1,2).value)
    end if
next i
thinking i can create a v2018 class and get the info defined in the class
 
Does instr work on a range object? I feel like that's only using the first, top left cell, in the source area.
 
instr() in the example is being used on a worksheet... i should have used src.value
threw in untested code for the example... my bad
 
Do you intend src to be a single cell or a multi-cell area?
 
src and dst (source and destination) will be the workbooks I am pulling from, with checkboxes for each sheetname (different versions of a similar book), whereas the userform will have the user pick each from currently open workbooks and check whcih sheets to use
...let me rephrase that
 
9:33 PM
But are you expecting a sourceCell (single cell) or sourceArea (multi-cell) range?
Like Mug I dislike HN. sourceBook vs sourceRange helps clarify what you're working with.
 
for the instr i was looking at the name of a workbook... my example gets worse by the second. workbooks have version numbers in them
@IvenBach i feel you, now
 
src and dst are vaguely ambiguous and nebulous.
 
true
further exacerbated by my noting that i misused them in my example...
 
Hope I could help.
 
set srcWS = workbooks(combobox1.value).sheets(combobox2)
 
9:39 PM
I'd go with srcSheet and dstSheet, but that's just me :)
 
combobox2.value? I don't use forms much but renaming your combobox2 to selectedWorksheet would also aid in documenting your userform.
 
^
NAME ALL THE THINGS
 
sourceWorksheet tastes better than the disemvoweled srcSheet. You don't get enough vowels otherwise.
 
src/dst acts as an Apps Hungarian prefix in a case like this though
(note the prefix has nothing to do with the data type of the variable)
but yeah, in source vs src in a fight for clarity, my money is on source :)
arguably the Sheet part of the name is made redundant by the declaration, assuming there is one
so, source and destination make perfectly good names for Range variables, assuming they're declared As Range
 
My VBA naming is a bit verbose by necessity.
His great and all-knowing Mugness taught me of the importance of proper naming.
 
9:44 PM
I sometime do source and target
only so I don't have to type destination
 
Ctrl+Space decremented my frustration coconuter counter once I learned it.
Surreal seeing one of my own inspections results pop up at me.
 
@this I like target
 
@Hosch250 Read your IoC example. Based on what I read you're explaining that the correct way to test and inject dependencies shouldn't break when you change from one implementation to another. If it does that's a sign of the implementation showing though.
 
not necessarily. constructors are implementation details, by definition. so, new set of dependencies == broken test setup, unless your test setup is using an IoC container to wire things up by convention.
 
10:01 PM
well, IMPOV, you definitely don't want tests breaking just because you added a parameter to the ctor for injection.
 
FWIW that's our current setup
 
That would be a big problem in RD's tests for example. Hence the need to make sure tests aren't that fragile
you certainly could use a mock IoC which would sidestep that problem.
We don't really; we just use a static method to construct the instance so that if it changes only that one method needs changing.
 
would be is
 
(well, unless there's overloads on it in which case you need to update the overloads, too)
@MathieuGuindon it's now less of a problem because we moved away from newing up everything everywhere into using a static method.
 
yeah but the fact that the static method breaks when ctor args change, is the point I was making :)
reading again, my point missed the mark though. the change from one implementation to another part is the "breaking" part
 
10:09 PM
If done properly there shouldn't be any breaking at all?
The change occurs and #ItJustWorks automagically?
 
@IvenBach depends what we're talking about
if we're talking about swapping FooService for BarService where both implement ISomeService, then yeah sure
 
:+1: That's what I had in mind.
 
if we're talking about adding, removing, or changing a ctor parameter to FooService, breakage is inevitable
 
That kind of breaking change is unavoidable though.
 
hence, breaking change != implementation leaking through
 
10:11 PM
Unless optional arguments are added.
Mkay. Now I grok what you were trying to say.
 
optional arguments don't play well with DI
 
#MandateAllTheThings. Disallow options.
 
optional arguments are basically just another way to go about method overloading
and overloading constructors in DI gets very confusing, very fast
you want one single constructor, not 200 options :)
 
Does a method with an optional parameter ultimately compile down to 2 methods?
 
I don't think so
but, before C# supported optional args, you had to write an overload
 
10:14 PM
What actually happens to most stuff once compilation is run still eludes me.
 
doesn't matter
it eludes most mortals too
<~ this mortal as well
 
:gasp: Not possible.
 
you could always compile both and examine the generated IL code
 
I don't actually know how to do that though. Brain tickle of disasm.exe is as far as I've gotten.
 
R# has an IL viewer tool
 
10:25 PM
actually DI works fine with optionals, it's just that the language support in C# for optional arguments makes it a royal pain in the butt for DI Containers
IIUC optional arguments are basically compiled down to overloadings
and different ctor overloads and DI don't go well together
 
^
even with poor man's DI, multiple ctors send contradicting messages
 
@IvenBach <uninformedArmchairCompilerDesigner>I don't expect overloads to compile into one method. If anything, the lower you go, the more methods you see. </uninformedArmchairCompilerDesigner>
 
makes sense
 
What is a constructor? It's a special method that is called by convention when you` new` something up.
 
the alternative to overloads is something like python's *args, **kwargs, which is a fucking mess
 
10:27 PM
@MathieuGuindon I've heard "poor man's DI" in your article and tweets recently. What's the difference between that and actual DI?
 
What is a overload? It's a special method that wraps another method.
It's really all in the compiler's head.
 
@IvenBach it is "actual DI".... only, without an IoC container doing all the newing up automagically
 
The machine itself is absurdly dumber than a bucket of nuts.
 
i.e. the DI you can do in VBA
 
@this :shoos-away-lower-level-details: get get. Away with you details. Away. I know there are methods that are called. What's beneath them is a solid foundation certainly not made of lower level details.
 
10:28 PM
@this i always have to explain this to people whenever i hear "man computers are so smart nowadays"
 
@MathieuGuindon So poor man's VBA man's DI is the Create(...) function you showed me which returns the type it's on?
 
@IvenBach I think if you look hard enough, you'll find a 2 among 0s and 1s.
@MathieuGuindon So why not "manual"?
 
hey, just going with Seemann's wording. Blame the DI guru!
 
he probably only see men, not cars.
 
recently he's been tweeting about changing it to "pure DI" though
 
I guess that makes more sense to call it "pure DI"
Btu I'll admit that it got me pause because I nowadays think DI === IoC, which technically isn't true but dang, find me a DI without IoC....
@IvenBach :-)
 
more than enough of that in old codebases
 
@IvenBach the Create function is a factory method. When it's off a stateless default instance as I've shown, it's basically a static factory method. The purpose of that method is to perform the dependency injection, because VBA doesn't have ctors and can't do ctor injection, so instead we do property injection via a parameterized factory method.
the "poor man's DI" part is the calling code
 
You can do DI, even with a proper IoC container without getting the IoC out of it
 
the part that gets to New up the actual dependencies / arguments it passes to the factory method
 
10:33 PM
^^^ TYVM for that explicit clarification.
And it is that factory method that returns to the call site, which is termed as "poor man's DI".
 
The ugly thing about that is it's precisely the area that's most sensitive to changes.
Need a new factory method or change something about a class/interface? Chances are it that it's the factory method that get creamed in the process and you have to fix it.
even if VBA can't have IoC, the next best thing is to have a means of auto-generating the factory classes/modules.
 
The term "pure DI" is used as all that is occurring is the dependency is being delivered.
 
so that you have less of a maintenance burden when you change something.
Pop quiz, @IvenBach - what exactly does Castle Windsor (or any IoC for that matter) does for us to provide DI?
 
Magic.
 
F
Try again?
 
10:40 PM
It deduces from the method that's invoked the references that need to be newed up.
 
The examples I've looked up for IoC and DI look exactly the same lol
what's the diff? they just seem to be the same thing, but worded differently
 
@jcrizk as I mentioned, they are practically a siamese twin, joined at the hip
 
An IoC framework uses DI.
 
I don't think you really can do IoC and not use DI.
You can use DI without IoC but it's painful
I'll answer after Iven answers the pop quiz.
 
how would you even implement that though?
 
10:42 PM
1 min ago, by IvenBach
It deduces from the method that's invoked the references that need to be newed up.
I forgot to phrase it as a question. Apologies.
 
Sorry, i meant to ask -- and then?
 
The items that are about to be newed up also have their required arguments checked and newed up. This process continues down the chain of newing up references.
 
Inversion of Control / Dependency Inversion ("D" of "SOLID") is the architectural pattern that's needed for DI to be even possible. Dependency Injection is just the name given to the several different ways a dependency can end up being provided to an object/method
at least that's how I understand things
 
At the root of root of the newing up is the heart of the application. I forget the proper #PedanticPete term for it.
 
@IvenBach very good but how?
 
10:44 PM
5 mins ago, by IvenBach
Magic.
I honestly don't know.
 
@MathieuGuindon that's basically what i was thinking about, but couldn't put into words lol
 
That's the part which I don't understand well enough yet.
 
it all comes down to this: automatic code generation.
 
@this no, actually that's not the case here
 
has to be - you're using reflection and a dynamically generated assembly.
 
10:46 PM
Castle doesn't generate all that much code, that's only necessary for the Aspect Oriented parts of it (like automatic factory implementations)
 
I think you still have to generate the code to perform the actual newing up, at least using reflection, no?
 
> Oh, I need to Resolve<IApplication>. looks at IoC config... ok, so I'm giving you an Application object, but wait... it has constructor arguments. looks at constructor arguments ...ok, so I need to Resolve<ISomething> and then I need toResolve<IFoo> so I can pass Something and Foo (again, as per IoC config), and then I can pass that to the Application constructor. But wait! Something has a parameterized constructor! ...
 
most of it boils down to graph traversal and invoking code using reflection
reflection isn't necessarily code generation though
 
Fine, but I was thinking that reflection is basically code gen, but without persistance.
 
no, it's really not
 
10:47 PM
because you're just writing code to execute some code
 
Reflection.Emit can inject executable IL code
 
writing reflection code is metaprogramming, but the code executed is not changed if you don't emit IL
 
"how does reflection work?" -> immediately clicked physics stack exchange
 
other than that, reflection is just like LINQ in that it's a bunch of methods in a namespace, but to inspect .NET objects rather than querying collections
 
Activator.CreateInstance does not emit IL
 
10:49 PM
@jcrizk Code that can examine itself. IE looking at a mirror that gives it a reflection of itself. That's what I presently understand.
 
that's cute and accurate :)
 
thanks, i knew what it was. i was just googling it because i was curious about how to implement it because i figure it would be a pita
 
you're in reflection-land as soon as you work with any object's .GetType() return value
 
@Vogel612 but if you're dealing with objects that could be newed in any arbitrary manner, you still have to resolve the constructor arguments and reflect on them all. I don't know if that can be done with reflection alone.
 
from a Type you can inspect everything there is to know about it
 
10:51 PM
Anyway, in a world with no reflection available, you end up with code generation anyway.
 
true, but C# luckily has reflection :)
 
Let me rephrase -- runtime reflection....
Anyway, so in general, a IoC has to either reflect or generate code to perform the actual newing up
and that's all the magic is.
 
that's definitely true, yea
 
So to answer @jcrizk's question -- I see IoC as simply a way to make DI easier to use by handling the newing up for you whereas DI is just a convention of how you will initialize the objects with the state you want.
 
IoC -> IoC Container
 
10:55 PM
With DI, you ensuring that your consumers don't have to know about concretes to get an interface.
You wouldn't want to do something like var iFoo = new Foo(); in your consuming code. That's coupling.
 
AFAIU, ninject actually went the other way then most c# IoC containers. It emits expression trees and let's the runtime execute them in order to create the objects.
 
A factory is supposed to hide that detail and return IFoo.
 
That turned out to be rather slow, though.
 
but now your consuming client has to create a FooFactory instance, which can feel like you're just adding layers for sake of adding layers.
 
@this IFoo iFoo = new Foo(); since var would typed it as type Foo and not the interface IFoo which it implements.
 
10:57 PM
:facepalm:
Yes you're absolutely right
 
I had good great exceptional teachers...
 
@M.Doerner there were some magic words, but i think that answered my question as to how could it even be done
 
@M.Doerner How interesting. I'm a bit surprised it came out slower since I understood that once you build the expression tree, you can compile it for faster execution.
Anyway to circle back, because RD knows so much about VBA it has the potential to help generate the DI code to make it a bit less painful to use DI in VBA.
 
wouldn't we need to first be able to spawn a VBA class for that to work?
 
That'd be IoC
we're talking pure DI
 
11:03 PM
ah
 
e.g. automate the factories code and keeping it in synchronization with code changes
 
wah you're like 5 steps ahead! I'd be happy with just a template class for a factory :)
 
@M.Doerner is there a more efficient way to do this?
Annotations = annotations.Where(x => !(x is ITestAnnotation));
 
@MathieuGuindon gonna dream big
 
or, well anyone actually lol
 
11:05 PM
@this avalonMentions++;?
 
@jcrizk Any()
 
@this huh? no, that's something completely different
 
yeah. Dreaming is easy. Implementing it....
 
Any returns a bool :)
 
i think he was just responding to my comment immediately after lol
 
11:06 PM
Do you actually need the annotations?
 
annotations is, tops, 3-4 items, no? write for readability, worry about perf it perf is a problem :)
 
or do you just want to know there's any non-test annotations?
I was assuming you only cared about the presence, not the particulars of non-test annotations.
 
i was just wondering if what i was doing was a bit clunky is all
 
Completely unrelated to the current thread: has anyone tested Office Script at all?
 
Well, if you did in fact need the particulars, Vogel's right - Any() wouldn't be appropriate.
 
11:07 PM
i've been doing a ton of microcontroller programming, so i always think about performance lol
 
= annotations.Where(a => !annotations.OfType<ITestAnnotation>().Contains(a));
not sure that's better
actually, pretty sure it's worse
 
I assumed that if all you want to know is whether there's any non-test annotations, all you want to do is annotations.Any(x => (!x is ITestAnnotation))
 
oh
yeah that would be good
 
that would be cheaper than returning a set of annotations.
 
#Depends
 
11:09 PM
^
 
@jcrizk What exactly do you intent do do?
 
im trying to resolve this

https://github.com/rubberduck-vba/Rubberduck/issues/5281
 
If I get the problem you are coming from you want something like !annotations.OfType<ITestAnnotation>.Any() .
 
yea, that sounds about right
 
11:15 PM
I think that is the least clunky version.
You could do it with an Any and an is or with an All and an is as well.
It should not really matter for performance.
However your original condition seemed to be the wrong way around.
 
@this do Access forms support a ListView control that can do groupings like WinForms does?
@MathieuGuindon I don't think that will help with ListView — michi 9 mins ago
OP is lost in .net docs
I'm thinking Access forms can't do that, but then I don't do Access forms, so..
 
probably thinking of an activex control
Why do you want to use ListView? You need to consider that as an ActiveX control it is very problematic to use due to licensing issues, limited to 32-bit, sensitive to versioning and few more problems. Maybe you should try and state what you are trying to do and we can suggest a solution that doesn't require an obsolete ActiveX control. — this 14 secs ago
there's a reason why several Access developers avoid ActiveX anything
 
thanks!
driving
 
11:44 PM
so i think i was able to get rid of the test annotations from the model parse results by using
Annotations = annotations.Where(x => x is ITestAnnotation);
but i still get results from
InspectionResultsForModules()
is it also checking something else that i probably missed?
 
00:00 - 20:0020:00 - 00:00

« first day (2061 days earlier)      last day (1119 days later) »