« first day (1567 days earlier)      last day (1613 days later) » 

7:01 PM
URGH!
My SSIS issue from a couple of days ago where everything was failing in the lookup?
Yeah, the SSIS lookup is case sensitive where as a lookup of the input data in SSMS is not case sensitive.
 
see, that's why I minimize steps I do in SSIS to bare essential
 
Somebody had mentioned something about doing a Character Map Transformation on the data, but it hadn't hit me that Uppercase was the one I needed. :/
 
just pipe the data into staging data, then let SQL do the real grunt work.
 
@FreeMan Would that fall under my guess of collation?
 
@Hosch250 Methodology of most "Senior Enterprise Architechts" IME:
 
7:04 PM
@Comintern Yeah, I'd imagine so. I just didn't equate "collation" with "convert it to bloody uppercase, you fool".
 
I'm also guessing that you have yet to fix a broken package that got a new column in middle.
it's a Oh(No) step operation.
 
Coincidentally I'm fighting with a case-sensitive database right now...
 
@mansellan LOL. :+1:
 
@this In that case, what's the advantage of using SSIS over the stored procedure I've written that does INSTERT INTO temptable SELECT * FROM OPENROWSET()?
Other than the fact that I can say in an interview that I've used SSIS...
@Comintern oh the joy!
 
7:30 PM
Never underestimate the power of saying you've used SSIS...
 
Frankly linked servers and its kind is too fragile.
SSIS is much better at shoving data and shoving it fast.
I'm just saying that you shouldn't do all extra nonsense like lookups, conversions, data cleaning/sanitizing in a SSIS package.
 
@this uh, that's literally the "T" from "ETL"
 
I know. and I'm saying you wanna to do it in SQL.
 
@FreeMan nothing to script, batch execution, and you get to see boxes turn green as the thing runs?
 
Heck, if you insist, you can do Execute SQL task.
Have you ever tried to fix a 20-step package gone bad all just because they changed a column order?
 
7:42 PM
LOL
 
If that's not make-work, I don't know what it is.
 
I'm dealing with about 200, 90-column tables with fields literally named f1...f90, and the source schema is re-generated every single night - column widths can change any time
> Package failed. Metadata mismatched.
or something
 
Yeah, that's exactly why.
 
doesn't happen anymore, because I wrote the source SELECT accordingly instead of assuming things
 
far too much clicking around, IMO.
"source SELECT"? so it's flowing data out?
 
7:44 PM
TBH I wouldn't do that particular package like this today, but it does the job
@this the data source is a MySQL database
 
Ah, that does makes things a bit easier.
 
Can I automate an SSIS package? i.e. once everything is put together, can I call the package from some other bit of (VBA) code so I don't have to fire up VS and load the solution to do it?
 
I think it's worse when you're dealing with non-relational data source.
 
@FreeMan that's the whole point!
 
^
 
7:46 PM
but no, don't do it from VBA
 
Note that from VBA, you do need permissions, somehow.
 
schedule it through SQL Agent
 
That would be better, yes.
 
@MathieuGuindon Just checking, "watching boxes turn green" sounds very hands on.
 
I think he was being fastidious.
 
7:47 PM
@FreeMan that's when you run it in debug mode...
 
although, green boxes was SSIS 2008
 
bah. I always conflate the two.
 
nowadays it's just a little green choeck icon
 
jus' checkin'
 
7:47 PM
fastidious => fussy; facetious => humorous.
I know that. I swear I've looked it up but no, my brain keeps it crossed.
 
conflate -> confuse; inflate -> make bigger
:D
 
@FreeMan People in this room are a million miles and a thousand years ahead of me in skills, but if you need help with scheduling things on your personal computer via Powershell script, I can help :)
 
thanks!
Wait, you mean Task Scheduler ain't the end-all be-all of scheduling?
2 mins ago, by FreeMan
@this facetious?
 
@FreeMan SQL Server Agent is the end-all-be-all of scheduling for anything that needs to run on SQL Server
SSRS schedules create SQL Server Agent jobs
 
cool. Is that part of VS/SSIS install... no, now I need SSRS, too?
wait... we've got something set up on our corporate SSRS install. Now I need to rummage for that email with the login/config details...
 
7:52 PM
SSRS is Reporting Services - you don't need it unless you intend to run a report server
 
@puzzlepiece87 I'm 2-1/2 steps ahead. Jog a tad and you'll be walking next to me.
 
expand SQL Agent node in SSMS; if there's a bunch of jobs named with a GUID, they're probably SSRS jobs
 
well, not "a bunch o' jobs with GUIDs", but it exists
that'll be another day. or two. or three...
 
@FreeMan right click agent, new job
it's pretty simple =)
 
got it
 
7:57 PM
you can easily make it run a stored procedure every day at midnight
 
@Comintern - thanks for the Character Map tip. Once I discovered it in the SSIS Toolbox, it was very easy to set up and all is working well at this time!
In this image from my SSIS project, the magnifying glass (in the green box) indicates that the Data Viewer is enabled. If you look really closely in the red box, there's a little bit of white across the blue dataflow path. It looks like it's text, but it's white on white
how do I change the text color and/or background color so I can actually read that?
Its the only data flow that has that, so there's gotta be something there that's different, but I have no idea what
 
@FreeMan NP.
 
@FreeMan uhh create kidneys for it, then punch them a lot?
 
"Give it the beans"?
 
but seriously, ive never seen that. id assume its some sorta customization setting thing-a-ma-bobber
are you working with bids 2008 or the ssis thing for visual studio and everything sql server 2012 and up?
 
8:07 PM
SQL Server 2012. VS 2017, SSDT v15.1.61808.07020 :)
and it seems that I have SSRS 14.0 installed in my VS install
 
@FreeMan hmm, try the dark theme?
 
@MathieuGuindon there is a theme other than dark?
 
at one point there was a bug in VS where SSIS annotations would show up black on black in the dark theme ...I guess they fixed it by making it show white on white in the light theme :)
@KySoto IKR!
 
Dark is default (YAY!). Blue is... hideous. Blue (extra contrast) is... just the same.
 
man... so i got a fun exception
 
8:10 PM
I'm using the dark theme, the SSIS "design window" has a light, not quite white, background and the text is white
 
invalid connection string attribute
oh and it cant evaluate anything
System.Runtime.InteropServices.COMException
  HResult=0x80040E4D
  Message=Invalid connection string attribute
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>
i am about 95% sure i got the correct connection string
i figured id make it a semi constant string so i could easily reuse it whenever i needed
but then it was like... mehhh im a jerk.
private static readonly string _VMFG1ConnectionString = @"Provider=SQLNCLI10;Server=DB2\DB2;Database=VMFG1;Trusted_Connection = yes";
its connecting to SQL server 2008 r2
 
@FreeMan my SSIS designer is dark..
 
hte database name is db2 instance db2
well caps those words
the database name is correct
 
this is what I get:
 
im using windows authentication...
what the eheck
 
8:14 PM
 
@FreeMan that is janky as efff
OH i got an idea
 
wait, that's it! I remember selecting the "janky" option when I installed it!
 
change your theme to some other theme than dark
then change it BACK to dark
see if it nukes whatever stupid preset crap it gives you
 
5 mins ago, by FreeMan
Dark is default (YAY!). Blue is... hideous. Blue (extra contrast) is... just the same.
BTDT, SSDD
Actually, the IT dude may have selected the "janky" option when he installed it for me. I thought I was getting VS Pro or Enterprise. He gave me CE. Which is what I'd already installed previously & furiously uninstalled before I allowed him to connect to my machine...
 
why would he give you community edition.
 
8:17 PM
Probably because I didn't specify Pro/Enterprise.
 
chances are hes breaking hte licence agreement for that version by installing it on yoiur computer
 
I'm sure he is!
 
your business has to make less than 1m/year
 
I'll have to see what the guys down the hall are running, then put in a request specifying which edition.
 
and have less than like 5 devs
 
8:18 PM
@FreeMan CE would be a license breach if this is for enterprise use
 
@KySoto press the up arrow, edit in place
 
@KySoto that
 
ah jeez. i wish id known that like... weeks ago.
 
I was pretty impressed at the speed with which they approved & were ready to install. May have been because the net cost was $0
 
note that there's a time limit, though
 
8:19 PM
you have ~2 minutes to edit or delete a chat post
 
its tedious to go and have to move my hand to my mouse to right click edit
 
arrow-up twice
 
System.IO.FileNotFoundException: C:\Users\ivenbach\AppData\Local\Temp\VisualStudioTestExplorerExtensions\NUnit3TestAdapter.3.10.0/build/net35/NUnit3.TestAdapter.dll
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.PerformShadowCopy(IEnumerable`1 testExtensions)
 
press the up arrow multiple times to get to a previous post
@MathieuGuindon that
 
yeah i saw that
 
8:20 PM
:)
 
which is cool.
 
@IvenBach nuget fail?
 
Merging conflicts from next to see if that fixes it.
 
we're a teaching hospital system, so technically, I think we're not-for-profit, but I'm not sure.
 
That occurred when I was trying to run tests.
 
8:21 PM
so yeah, anyone have an idea why adodb is stupid and telling me my connection string "Has an Invalid Connection String Attribute"?
 
@IvenBach NUnit would be an extension, built-in is MSTest
 
How do I do that?
Where can I get NUnit from?
 
Tools > Extensions IIRC
 
Tools>Extensions and Updates
Do I want to get NUnit 3 Test Adaptenr?
 
no idea
 
8:25 PM
yes you need it
if you like running tests inside VS, that is.
@KySoto are you concatenating any extra stuff to the connection string? Also why the spaces around the = in the Trusted_Connection part?
 
@this no particular reason, but that would be really dumb if that was it
wow....
 
that was it?
 
who'da thunk it
 
i think it's actually the leading space
 
Crazy idea: try changing "Server" for "Data Source", "Database" for "Initial Catalog", and "Trusted_Connection = yes" for "Integrated Security=SSPI"
I never know when to use which, connection strings are so bloody annoying
 
8:28 PM
yeah no, it was the stupid spaces around the = on trusted_connection = yes
 
connection-string ::= empty-string[;] | attribute[;] | attribute; connection-string

empty-string ::=

attribute ::= attribute-keyword=[{]attribute-value[}]

attribute-value ::= character-string

attribute-keyword ::= identifier
 
i just wanted to test if i could have named parameters in my sql code
but it seems you cant
 
you can
 
Just ran the unit tests. 6 are still coming up an not run even when I explicitly run them.
 
8:30 PM
make sure to set NamedParameters to true for the command object.
 
that would be on the driver
 
        cmd = new ADODB.Command
        {
            ActiveConnection = cn,
            NamedParameters = true,
            CommandText = "Select dbo.Work_Order.Part_ID as PartNumber from dbo.Work_Order Where Base_id = @WorkOrder and Sub_ID = '0'",
            CommandType = ADODB.CommandTypeEnum.adCmdText
        };
        cmd.Parameters.Append(cmd.CreateParameter("WorkOrder", ADODB.DataTypeEnum.adVarWChar,ADODB.ParameterDirectionEnum.adParamInput, 10));
        rs = new ADODB.Recordset();
        rs.Open(cmd);
 
Test Name:	TestEngine_ExposesTestMethod_AndRaisesRefresh
Test FullName:	RubberduckTests.UnitTesting.EngineTests.TestEngine_ExposesTestMethod_AndRaisesRefresh
Test Source:	C:\Users\cpaustell\Source\Repos\Rubberduck\RubberduckTests\UnitTesting\EngineTests.cs : line 22
Test Outcome:	Not Run
Test Duration:	0:00:01.364

Result Message:	Parser Error
 
it tells me the parameter name is unrecognized
 
what's wrong with positional params?
 
8:31 PM
so i change hte name on the created parameter to "@WorkOrder"
on some of my queries i need to use the same parameter more than once
 
hm. I'm not 100% sure that works since you are using adCmdText
 
hmm IIRC @name is T-SQL stuff though
 
yeah it doesnt.
 
I think with adCmdText you have to use ? for parameters
why not just use stored procedure?
then you can use named parameters all you like and not worry about SQL in your code?
 
to be honest, im noit good at stored procedures
 
8:32 PM
(FWIW, I always use named parameters. I hate looking at EXEC foo 1, 2, 'bar', 'what is this for?'; and having to map the parameters).
it's not that hard, really!
you already have the batch written up. Just stick it in a BEGIN...END, and you only need a CREATE PROCEDURE ...
 
and a good name
 
^
Also, I want to emphasize this... SQL simply doesn't belong in application code.
Leave SQL code to database and just let the application invoke a procedure or view or function but not direct SQL.
Otherwise, you have created a little personal hell for DBAs. Don't be that guy.
(and if you're also the DBA, you'll thank yourself)
 
It's not unreasonable to look through all the keys. I've seen it many, many times across multiples languages. — S Meaden 29 secs ago
doesn't mean it's right....
 
@KySoto Remove the spaces from Trusted_Connection = yes. It should be Trusted_Connection=yes.
 
back
 
8:43 PM
...and a bit late on that...
 
@Comintern story of my life...
 
sorry one of the VP's was talking to me about that one macro i bitched and whined about here
it IS complete
 
@FreeMan I'll have a reply to that in a couple hours.
 
and everyone loves it
 
8:45 PM
TTFN. I'll try to get back (tonight) to that issue I was working on (a couple nights ago), but we finally got our permit approved, so it's time to replace the porch & build the wife a deck, so it may not happen today.
Of course, the heat index is ~100°, so I'm boiling my tea water outside...
 
so back to what you guys were saying, i've been learning as i go as a DBA and as a programmer interfacing with a DB
and i am just not at all familiar with using stored procedures to get data
 
@Comintern I'll keep an eye out for it
 
Using .NET objects in VBA seems like an excellent way to leak memory if you ask me...
 
@FreeMan 100 C? You'd be breaking all kind of records.
 
@this you'd also be dying
 
8:48 PM
There are worse things you could be doing.
Did I promise a rant earlier? I'm so exhausted I don't even have the energy for that anymore.
 
man this thing really wants to go special snowflake
took out the line that set named parameters, changed my parameter to a ? and now its telling me i have an incorrect syntax near the keyword DEFAULT
 
Aren't you using OLEDB? ? is ODBC syntax.
 
then what do i use?
oh... @1?
or 0 or whatever
 
Not entirely sure - I just use the Sql* object set instead of OLE.
Yeah, looks like straight-up TSQL syntax for those.
@KySoto Wait a sec, is that c#?
 
yeah
im teaching myself c#
but everywhere i go ADODB gives me hell
 
8:56 PM
Don't use ADODB for that. :shudders:
var connect = new SqlConnection("Data Source=SERVER\SERVER;Initial Catalog=DatabaseName;Integrated Security=True");
^ That's what you want.
 
I can see that. Just saying, regardless of what people do in many other languages, that this is not what a hashset is useful for and you might as well be using a plain old array - true in every single one of these other languages too. — Mathieu Guindon 49 secs ago
this is getting out of hand..
 
@Comintern so i want to use var then?
 
is there any particular reason why i would want to use var over sqlconnection as the type?
 
because it's already right there?
 
9:04 PM
@MathieuGuindon What's worse is that the answer he want to accept isn't even O(n) in that it forces it to enumerate at least twice...
 
SqlConnection conn = new SqlConnection() vs. var conn = new SqlConnection()
 
@KySoto What if you need it to be IDbConnection at some point?
 
uhh whats IDbConnection?
 
the interface SqlConnection implements
 
It's the relevant interface that SqlConnection, OleDbConnection, OdbcConnection etc. all implement.
 
9:07 PM
^
@KySoto because C# isn't Java?
 
If you need a flexible adapter, you should code to those interfaces.
 
i.e. type inference is actually neat
also Foo foo = new Foo(); is redundant AF and reads like C# 2.0
<~ strongly biased in favor of "VAR ALL THE THINGS!!"
I just don't get the people that claim it hurts readability. it's pure bogus IMO.
 
Couldn't agree more. It's why they invented tooltips.
 
@MathieuGuindon we have one of those at work... i won't accept that reducing noise hurts readability, quite the opposite.
 
Doesn't this just force it to enumerate twice (and across a marshaling boundary too)? I'm failing to see the advantage over a Scripting.Dictionary or Collection. — Comintern 19 secs ago
Couldn't resist any longer...
 
9:18 PM
besides, you can't do var x; anyway. So it's literally not possible to create ambiguity.
VBA's Variant, OTOH.... glowers
 
Oh plus, it makes it stand out when you see an explicit definition... "hmm, no var, why? Oh, it needs a particular interface not the inferred one"
Even then, as is probably clearer still.
 
@Comintern: well, I love the Scripting.Dictionary and will always use it if it were my choice. But what if you join a team of C# programmers who insist on using .NET types only. — S Meaden 2 mins ago
looks like the C# programmers have little to none experience with COM interop issues
 
@MathieuGuindon uh....
 
I'd probably remind them that if they are going to publish a COM visible assembly that they should assume that the callers aren't going to be managed code? Otherwise, what's the point of exposing your interfaces to COM? — Comintern 22 secs ago
 
I hope they don't use IDisposable
unfortunately one of my COM DLL has to do that. :shudder:
 
9:23 PM
36 mins ago, by Comintern
Using .NET objects in VBA seems like an excellent way to leak memory if you ask me...
 
googles COM IDisposable
 
Private Sub Class_Terminate()
    this.ManagedThing.Dispose
End Sub
 
That's what I do.
still, doesn't feel right since that means remembering one more little thing
 
It's better than a vendor's .NET library that I have to use. It has a .Dispose() method you have to call but doesn't implement IDisposable.
 
lolwut
 
9:26 PM
huh?
 
IKR?
 
to be far, RD has one fake disposable implemetnation
 
No using is a serious PITA to code around.
 
in VBEEvents, IIRC
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=h1) Report
> Merging [#4312](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/6d4087b79e994e25ccdf31be6856ee05e25d2186?src=pr&el=desc) will **decrease** coverage by `4.56%`.
> The diff coverage is `30.77%`.


```diff
@@ Coverage Diff @@
## next #4312 +/- ##
=========================
 
9:27 PM
you have my permission to shoot the bright spark who wrote that atrocity.
 
@Pond I apologize for any inadvertent merge conflicts I may have done in the past. Now I appreciate what source control does that much more.
But at least I figured it out.
 
[rubberduck-vba/Rubberduck] build for commit 57bd6979 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
@IvenBach Duga thinks otherwise. :p
 
:cringe: There's still 6 tests that always come up as Not Run.
What gives?
 
@this You remember correctly. Not entirely sure I understand the point of that. Shouldn't the singleton have the same lifespan as RD?
Was that some sort of DI hack?
 
9:32 PM
yes to DI hack
it was to make more code in ohter RD be testable
 
The 6 tests are all the TestEngine_... tests.
 
and yes you're correct about the lifetime ... it is pretty much tied into the add-in's lifetime
but IIRC, Max said to not tightly couple because it can be used by API, too
and API might not even have the add-in loaded, for instance.
 
We're running an STA though, right?
The API, that is.
 
Uh, not sure.
I don't think we have anything explicit
 
Actually, now that I think about it, we wouldn't need to.
 
9:36 PM
so it'd be using the same apartment it got spawned in, I think.
 
If the consumer is VBA (99%?) then it won't matter.
 
it'd be silly if it wasn't VBA/VB6.
 
If someone calls it from another managed assembly, i.e. another add-in, that's where things would get interesting...
 
"let's use C# to automate the COM API for RD!"
^^
seems backward rube-goldberg-esque
 
IDK, what if they just want a parse without implementing a parser?
 
9:38 PM
@this .Net -> COM -> .Net -> COM #FunTimes :-)
 
so much things to go wrong
@Comintern just reference the RD assembly directly
 
LOL - you could go another couple rounds with that...
 
and think about events!
 
@this Wouldn't that leave you disconnected from the host?
 
you're running a managed assembly. If you're an addin you are already connected to the host
 
9:40 PM
Oh, duh.
Is it Friday yet?
 
not quite
soonish, in 20 minutes you can at least say you have 1 full workday left and thus it's "friday"
 
dammit.
 
(for those in central timezone, at least)
in meanwhile, you can revive the classic:
 
LOL the [intermittent] tag has 0 watchers. Shocking.
 
(for some value of "classic")
 
9:43 PM
What kind of bizarro Hungarian notation is this?
Dim xCombox As OLEObject
Dim xStr As String
Dim xWs As Worksheet
Set xWs = Application.ActiveSheet
 
oh, that's hobgoblin hungarian
you know, for small-minded ones who dwell on consistency.
 
Probably doesn't believe in placing labels on things. It's an act of protest.
Anti-Hungarian
 
those people probably go on food strike.
 
As in "I'm not Hungary"?
 
yeah
sorry, that's actually hunger strike
i was thinking anti-hunger => food strike
it is obviously friday for my brain
 
9:50 PM
Meh, it's Friday in 1h10m. Yay for BST :-)
 
given @FreeMan's 100C heat index, fry day is very appropriate.
 
> @Vogel612, by not providing the option I assume you mean the menu item would be grayed out. I agree completely. I ran into the issue using the default keyboard shortcut so that wouldn't have helped me.

What about playing a sound? This is how VBE deals with a user who, for example, tries to view "Quick Info" on code that doesn't have any "Quick Info". It plays the "Windows Ding" sound.
> Isn't this a false positive bug in the inspection, not a support issue? It looks a lot like issue #4326.
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=h1) Report
> Merging [#4312](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/6d4087b79e994e25ccdf31be6856ee05e25d2186?src=pr&el=desc) will **decrease** coverage by `4.56%`.
> The diff coverage is `30.77%`.


```diff
@@ Coverage Diff @@
## next #4312 +/- ##
=========================
> Isn't this a false positive bug in the inspection, not a support issue? It looks a lot like issue [#4326](https://github.com/rubberduck-vba/Rubberduck/issues/4326).

Also, [#1798](https://github.com/rubberduck-vba/Rubberduck/issues/1798).
> Isn't this a false positive bug in the inspection, not a support issue? It looks a lot like issue #4326 and #1798.
> This is a false positive bug in the inspection. It looks a lot like issue #4326 and #1798.
> Yea that seems more appropriate. I messed up. Thanks for calling this out (and even finding a duplicate 😊)
> No worries : )
[rubberduck-vba/Rubberduck] build for commit be7c8f56 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=h1) Report
> Merging [#4312](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/6d4087b79e994e25ccdf31be6856ee05e25d2186?src=pr&el=desc) will **increase** coverage by `0.03%`.
> The diff coverage is `53.33%`.


```diff
@@ Coverage Diff @@
## next #4312 +/- ##
=======================
[rubberduck-vba/Rubberduck] build for commit be7c8f56 on unknown branch: 56.89% (target 0%)
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=h1) Report
> Merging [#4312](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4312?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/6d4087b79e994e25ccdf31be6856ee05e25d2186?src=pr&el=desc) will **increase** coverage by `0.03%`.
> The diff coverage is `53.33%`.


```diff
@@ Coverage Diff @@
## next #4312 +/- ##
=======================
> This is a FEATURE REQUEST.

After applying any RD fix, the VBE view moves to the top of the module. If I want to view the changed code I have to look for it. It slows me down when I'm applying a number of fixes and checking the results.

My suggestion is for either of the following actions to occur after a fix is applied:

1. Return to the same line of code in the VBE.
2. Return to the/a line of code that was revised by the fix.

This would be nice to have in general but especially
 
10:56 PM
@Duga Is that due to stream re-writing? I didn't think that setting the scroll position was exactly easy.
This is a special case of the knapsack problem, and such is NP-hard. Can you show the code you already have? Which algorithm are you using? — Comintern 3 mins ago
And all the help vampire comments suddenly disappear...
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4292?src=pr&el=h1) Report
> Merging [#4292](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4292?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/6d4087b79e994e25ccdf31be6856ee05e25d2186?src=pr&el=desc) will **decrease** coverage by `4.59%`.
> The diff coverage is `25%`.


```diff
@@ Coverage Diff @@
## next #4292 +/- ##
==========================
 

« first day (1567 days earlier)      last day (1613 days later) »