« first day (1060 days earlier)      last day (2120 days later) » 

12:01 AM
RELOAD!
[rubberduck-vba/Rubberduck] 2 issue comments.
 
12:25 AM
^ worthy of a @Comintern ping
> In a typical situation where a window procedure is overridden, when Add-in A is unloaded, it would set the window procedure to WndProcO, and then when Add-in B unloads, it would set the window procedure to WndProcA. Both actions are wrong, and the second action would lead to a crash if the add-in containing WndProcA has been unloaded.
could WM_REMOVING_WNDPROC be the droids message we're looking for?
 
1:03 AM
hmm, I can't find any definitions for that constant other than in the referring article, but I did see a message 0x0090 that Spy++ can't identify, but that Google reveals as WM_UAHDESTROYWINDOW 0x0090
could that message be early enough in the teardown? Seems to occur before WM_DESTROY...
 
@ThunderFrame looks like you're onto something :)
 
@Mat'sMug That Outlook article seems to bypass ToolWindows/CustomCodePanes altogether.
> Sending a window a WM_DESTROY message is like prank calling somebody pretending to be the police
 
1:19 AM
lol
> "Ahem, um, yeah, this is the, um, window manager? (stifled laughter) And, um, like, we're just calling you to tell you, um, you're being destroyed. (giggle) So, um, you should like pack up your bags and (snort) sell all your furniture! (raucous laughter)"
 
IKR - but in the VBE, it's more like being SWAT-pranked - you don't get a phonecall, you get a SWAT team clearing the premises.
 
 
3 hours later…
4:41 AM
TIL - You can use CallByName and Application.Run with a document module.
 
 
8 hours later…
12:25 PM
I know the projects you are working on are far more complicated, but I am testing this method and it is cleaning up Excel properly. There is some good reasoning behind it too (from my limited understanding).
 
1:01 PM
The only thing I have found with this process is that all variables (including the excel application) must go out of scope before running through the GC process. I tried declaring the app in the main environment where the methods were being called and this would cause Excel to hang, even if the process ended.
It will work though if the variable pointing to the application is quit and then set to null.
 
 
1 hour later…
2:09 PM
@BrandonBarney interesting indeed!
the problem with Rubberduck is that we're hosted in the COM application, so it's an entirely different issue.. one that's not quite clearly documented anywhere anyway.
 
2:33 PM
What am I doing wrong? I am following the guide on MSDN (msdn.microsoft.com/en-us/library/…) but I cant fix this error (unless I make Records private, but I doubt that is the appropriate fix)
 
what's the squiggly saying if you hover it?
 
Inconsistent accessibility
 
check the definition of the Record class. I suspect it's internal
(it's internal if not specified)
 
Parameter Records[] is less accessible than Record.Records(Records[])
slams forehead
 
^ I know the feeling
 
2:37 PM
Yup, that fixed it. Should've thought of that
 
2:48 PM
Wasnt there a super simple way of taking an object[] and converting it to an enumerable list? Something like List<Record> foo = bar[].Tolist() or am I missing something?
 
what's bar?
an object[]?
 
Yeah. String could work as well
I am focusing on getting it into a collection of individual Record objects. I can worry about data types later
My assumption was that the new constructor could use the position of individual arguments to assume the property values, so first parameter of New would be bar[i, 1], second parameter bar[i, 2], etc.
 
thing is, there's no cheating in .net - data types do matter
 
I could be heading in the completely wrong direction of course
 
e.g. you can't take an object, or String and pretend it's a Record
 
2:52 PM
For my purposes currently using all strings should work just fine. It isnt until I calculate averages and such (in other projects) that I have to worry about ints, doubles, etc.
So I have to create a collection of individual Record objects, and then pass it to a list?
 
that would work
 
Or could I do something like Record[] foo; foo = PivotTable.TableRange1.Value?
 
...and would also make Records pretty much redundant ;-)
 
My goal is to ultimately get to a point where I can query on the data using Linq, and select Records that meet individual property criteria
 
ok
wouldn't foo = PivotTable.TableRange1.Value be a 2D Variant/object array?
 
2:55 PM
Yeah, but I want to make it Linq queryable somehow, so I assumed classes were the way to go.
I just need to figure out how to take a Variant and turn it into a class
 
what's a Record?
that's your class with 110+ auto-properties for each column?
 
It just has properties like "Name, Term, Section, ID"
In this project, just a handful, in others yes
 
ok
so just iterate the source range and for each row you make a new Record
and add that Record to a List<Record>
 
So no need for Records?
 
nope
 
3:00 PM
awesome, Ill give it a shot
 
 
1 hour later…
4:15 PM
> I'm getting the same issue as well. Any thing I need to do to help with troubleshooting?
 
 
2 hours later…
6:05 PM
@Duga problem isn't the troubleshooting, it's implementing the fix...
 
 
1 hour later…
7:22 PM
@Hosch250 finished operators. Next reading assignment?
 
7:42 PM
@IvenBach exceptions IIRC
that would cover try, catch, finally, and throw keywords, as well as System.Exception and a number of derived exception types
oh, and the handful of exceptions that can't be caught, too.
so at the end of this you should be familiar with: stack traces, rethrowing, when a finally block runs, in what order to catch exceptions, and which exception type you should never throw.
and you should be able to know when to throw NotImplementedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentNullException, ...that's about all the built-in exception types you typically throw manually (YMMV).
and then you should be able to make your own exception types, too
bonus points if you can tell me how the framework is able to throw an OutOfMemoryException when the system is, well, out of memory
 
Reads next assignment for Iven. Quits C#
 
lol
you'll come to love exceptions. okay, it's a love/hate thing. but compared to handling VBA errors, ...they're just worlds apart.
 
They seem like it lol
In all honesty, it is fun so far. All I have written is a basic query app that takes existing data and filters it to one criterion then exports it, but I am hoping that within a few weeks the outcome of the app will be far more robust
 
and it will
 
7:58 PM
 
that would be a good start I think
 
@BrandonBarney I explicitly asked for assistance since I come from a non-programming background.
 
No worries lol, I will likely be in the same position as I get into the more advanced stuff
 
I have figured out a bit by floundering but now that I've enough of a basic understanding I can read MSDN and somewhat teach myself.
It was smash face into keyboard why doesn't this work.
Now it's Read, smash face, ask why, read, ask wtf, read, and then lightbulb.
 
8:09 PM
lol
 
@puzzlepiece87 :+1: Although you forgot the Lightbulb
It's the dim-able one. The longer I study the dimmer my mind gets.
 
^ teamwork
Ha yes, you're fast outpacing me and I see the late night dedication you have
 
I've years of frustration pent up that I can direct my studying at. TLDR = medical bills.
 
Oof, sorry
Related, an article today about escaping poverty in the US basically says the best shot is to have 20 years straight of good luck. Medical bills not included.
I hope you're well and have better luck soon
 
Things are slowly improving, slowly.
 
9:01 PM
@Mat'sMug I reached the next stage of bureaucracy. Can you help me answer this question?
 
what question?
 
"Does this software interact with any servers, existing systems, tools, or privileged access accounts?"
 
Rubberduck?
 
Does RD do a version check on startup?
 
yes
you can disable it
 
9:02 PM
Okay, good to know
and then what privileges does the add-in need? It needs administrator privileges to be able to do its COM addin work, right?
 
it only needs admin privs on install, to correctly register the COM types. there's no privs required to run it.
 
Also helpful, thank you
Adding both to this questionaire
 
the version check code is here
 
@puzzlepiece87 I just completed a similar form - I noted that RD phones home for a version check, and it is also capable of git with 3rd party servers
 
hits http://rubberduckvba.com/Build/Version/Stable with a single HTTP GET request on startup
oh, right, git remotes (duh!)
 
9:08 PM
@Mat'sMug Fantastic, thank you.
@ThunderFrame Also helpful!
Which open source license did you use again? I apologize, I asked this a few weeks back.
Can the git part be disabled?
 
GPLv3
not right now, but if it's not setup then it's not going to work
...also looking at the issues list there's a non-zero chance that it's not going to work even if you set it up, but that's another story
I'd like to take the source control part out of the core assembly eventually, so expect it to eventually ship as a plug-in / separate download
 
Thank you!
 
@puzzlepiece87 local git is still better than no source control at all IMO, so it could be a good idea to still set it up even without a remote.
you can consider it a "power-undo" that can reset all changes made since the last "checkpoint" (/commit)
 
Yup, agreed
 
and then mention that the VBE's undo will stop working after 10 steps or so
when source control ships as a separate download, expect there to be git and SVN support
 
9:17 PM
and CVS, oh wait
 
This isn't my responsibility to know (that's the approval team) but to sanity check my future pleading, nothing in GPLv3 would remotely require me to share things I work on with Rubberduck VBA with the world?
 
absolutely not
the license does quite explicitly state that the software is provided as-is in the hope that it will be useful, with no guarantee whatsoever
 
@puzzlepiece87 just if you use the Rubberduck Reflection API, IIUC 😒
because extremely strong copyleft...
on that note gotta publish a repo..
 
@Vogel612 what? that's not even intended, I don't consider API client code to be "derivative work"
 
I'm pretty sure it is tho ...
 
9:20 PM
makes no sense
 
isn't the whole Rubberduck codebase infected with GPL?
because ANTLR and the grammar?
that means the reflection API is also infected, that means everything that uses the API is infected
 
formerly because original .g4 grammar was GPL indeed, but now that the grammar has been pretty much entirely rewritten from scratch the language specs, it's more due to Smart Indenter author/maintainer having agreed to GPL licensing
yeah but the RD resolver literally derives from ANTLR classes generated from that grammar: the correlation is strong. client code is just, well, consuming a public API.
 
@vogel are you saying that If I use a GPL3 text editor to write a document, the document is derivative work? Or, if the text editor has an API, and I consume that API, that consumption-code is derivative work?
 
the latter
 
9:25 PM
god I hate licenses
 
at least that's how I understood GPL...
 
that would make GPL a poor license for just about anything
 
Btw, I know licenses are contentious and I don't mean to soil anyone's afternoon
I am just trying to be prepared for my own difficult conversations with the Software Requests team
@Vogel612, thanks for your input, knowing your perspective on this will help me be prepared for a worst case scenario discussion.
(the one where I desperately hope it's not brought up or interpreted that way)
 
@Vogel612 that means every single RD unit test should be GPL-licensed then?
 
9:28 PM
possibly ...
 
that can't be right
 
I want a new license: CALYDUIRTA (CopyLeft As Long You Don't Use Implicit References To ActiveSheet)
 
I know the lib I used to preprocess files nuked a whole project into GPL
 
lol
what's the alternative? here-take-my-project-and-distribute-it-yourself-and-charge-for-it-and-dont-even-‌​let-me-know-about-it license?
aka MIT
 
@Vogel612 using a regex expression generated by the regex assistant would violate too?
 
9:31 PM
can I patent a regex pattern?
 
hrngh ... I hate licenses.
@ThunderFrame I doubt it. Work created by using the software is not derivative.
@Mat'sMug Apache possibly
 
@Vogel612 So as long as Rubberduck generated the API calls in a TestModule, you're OK?
 
yup, probably
which is pretty stupid, but ...
 
let's define "derivative work" as anything created off the RD source code, shall we?
 
then again IANAL, but usually I'm pretty good with legalese
@Mat'sMug that's the definition.
 
9:34 PM
then client code is not bound to GPL
 
the problem is that the Reflection API is source code
 
no, it's VBA. RD source code is C#. that makes the distinction quite easy to make :)
if you fork RD and expose your own COM API, then that API is (should be) GPL
client VBA code is just as derivative as the contents of a Word document derives from Word
Word is actually a better example than it looks: take Outlook emails - the editor is Word
so if Word was GPL, then Outlook would have to be GPL as well
VBA source code, for Rubberduck, is nothing more than data - and that includes API client code
damn, how can I be 100% sure of that?
starts realizing why there's so many open-source VBIDE add-ins out there
FML, TTGH
 
9:51 PM
It's IP law and Big Content that has got us to the point where an open source license is hard.
 
I'm also not a fan
We're so many miles past encouraging content creation that you can't see the point of reasonable content creation incentives anymore due to the curvature of the Earth
(Admittedly, the curvature of the Earth becomes visible after 50 miles or so :P)
 
I'm currently reading Performance
Write your code initially so that it is correct, follows good design principles, and clearly expresses your intent. Optimize later only if you determine that it is not meeting the performance goals. Code that is optimized for performance is often more difficult to read and maintain. It is generally better to write code that is readable, robust, and maintainable even if it is slightly slower than the most optimized code that you could write.
It's taken me a while, but now I understand a lot of what's been said thanks to the time and effort of the RD team to help me learn. #ItCanBeTaught
 
10:48 PM
@ThunderFrame IP law?
Oh
Yeah
 
11:02 PM
"There are only two kinds of languages: the ones people complain about and the ones nobody uses." - Bjarne Stroustrup
3
I guess that makes #VBA a champion of the first kind https://twitter.com/CodeWisdom/status/859138115767873536
 
11:36 PM
@IvenBach Exceptions and modifiers.
Modifiers will be much simpler, if you want to have a bit of a break. Exceptions are pretty easy, too, though.
Just finished an interview.
We talked about RD a lot, including some about nesting windows and components and frames of WPF, WinForms, ...
Took a whole hour.
 
11:59 PM
@Hosch250 nice!
 

« first day (1060 days earlier)      last day (2120 days later) »