« first day (1055 days earlier)      last day (2125 days later) » 

12:00 AM
RELOAD!
[Hosch250/CheckersTreasury] 1 commit. 1 addition. 1 deletion.
[rubberduck-vba/Rubberduck] 2 opened issues. 1 closed issue. 11 issue comments.
 
12:44 AM
> Rubberduck.Setup.2.0.13.0.exe (5.83 MiB) - Downloaded 1023 times.
Last updated on 2017-03-12
> Total Downloads 11,259
 
0
Q: Can I use my VSTO & VBA excel addins with Office365?

tejpratapAll the questions/answers I have seen so far are old and do not provide a definitive answer. Also what can I use locally and what can I use online?

that'd be NO, right?, for all versions?
 
 
1 hour later…
2:02 AM
@ThunderFrame desktop would be yes, web-based would be no
 
 
1 hour later…
3:29 AM
BWAHAHAHA I WIN!!
public override void ExitSubStmt(VBAParser.SubStmtContext context)
{
    if (_currentScopeAttributes.Any())
    {
        _attributes.Add(_currentScope, _currentScopeAttributes);
        context.AddAttributes(_currentScopeAttributes);
    }
}
I don't need to work out the members' attributes anymore, the SubStmtContext itself has them right there :)
 
3:45 AM
        public override void ExitAnnotation(VBAParser.AnnotationContext context)
        {
            _currentMember?.Annotate(context);
        }
okay, I ♥ C# 6
 
@Mat'sMug You there?
 
not for long
 
How are gist codes shared?
 
no idea, never used one
 
Ok. @Hosch250 told me to make one to share my looping examples.
 
I'll check it later.
I installed the Creators update, and it didn't find a bunch of my drivers.
Now I need to install a touchscreen driver, a Bluetooth driver, a sound driver, a graphics driver...
 
Sounds like fun.
 
I think I'll start with my browser.
 
4:13 AM
TTGTB
 
OK, Windows can find the drivers--I just need to tell it to update.
And it has a tool like flux built in now!
 
4:34 AM
OK, my touchpad (I don't have a touchscreen--that was a typo), bluetooth, and graphics drivers were all installed automatically.
I just need to install my Beats audio driver.
My mouse driver was not installed. That'll happen later, I guess.
Time to go to bed.
Office and VS and Beats can be installed tomorrow.
 
[retailcoder/Rubberduck] retailcoder pushed 21 commits to rd-next (only showing some of them below)
[retailcoder/Rubberduck] MDoerner pushed commit fd3035f1 to rd-next: Made two failing tests pass.
 
</mug>
 
NVM, I can't go to bed just yet.
Are you still around, @IvenBach?
 
Mostly.
 
I noticed a couple thinkgs about your program.
First, you typically don't start a namespace with _, and you typically don't use numbers in it.
 
4:43 AM
I did "99 bottles" and it converted it to "_99_Bottles"
 
You can't have spaces in any identifier.
 
More than likely there will be many taboos that I'll commit in ignorance.
 
Second, _bottleCount is mostly useless, just make that parameter and pass it into the loop functions.
Thirdly, you have i >= 1 in the foreach, and i > 0 in the rest. Choose one style and be consistent.
And finally, the bug:
> string pluralityMinusOne = ((drinksLeft + 1 != 1) ? "s" : string.Empty);
I'm pretty sure you are actually checking the plurality for drinksPlusOne there.
 
@Hosch250 Good catch.
@Hosch250 Replace private string ForLoop() and the _bottleCount field with private string ForLoop(int bottleCount)?
 
Yeah.
 
4:51 AM
ok.
 
I'm out. TTYL.
 
Duh check: There's no difference in the postfix decrement for (int i = bottleCount; i > 0; i--) and prefix increment for (int i = bottleCount; i > 0; --i) is there?
only when using a= --b or a=b-- would it matter.
 
my preference is for the postfix style
 
From what I've seen it's the more standard approach, I think it feels better too.
But I'm correct in my duh check assertion, right?
 
> The result of x++ or x-- is the value of x before the operation, whereas the result of ++x or --x is the value of x after the operation. In either case, x itself has the same value after the operation.
actually, ignore that
 
5:02 AM
But the usage of either only matters when you're assigning while incrementing?
 
 
2 hours later…
7:09 AM
> Of course it is (looks cheap) It was a "quick-and-dirty" job, I needed it a month ago, so I just came with something that will do the job in minimum effort. This is why I am shifting this to you guys. If you want I can send also the VBA code used.
 
Kaz
8:08 AM
@IvenBach I think you're missing a With block there.
 
 
1 hour later…
 
5 hours later…
1:42 PM
@Mat'sMug Are you running x86 Office or x64? I wonder if that is the difference why I always get the crash, but you and @Kaz don't.
 
x64
I do get occasional not-so-clean exits where I need to kill the EXCEL.EXE process though
 
OK.
 
@Duga @ShaiRado lol, I didn't mean to criticize the UI ("looks cheap") - my comment was more aimed at the functionality itself; just a thought about it making it possible to [mis]use it as some kind of source/version control tool, which would be a shame given proper git source control is right there, two clicks away =)
 
Kaz
2:00 PM
@Mat'sMug I got an Excel crash just now. But I don't actually know if that was due to RD or not.
 
@Kaz if it wasn't you I'd say it's probably RD, but knowing your ability to crash Excel...
 
@Mat'sMug That was ThunderFrame and Comintern.
 
in The 2nd Monitor, Sep 7 '15 at 10:07, by Zak
#Times I've crashed Excel today: 7 (and counting)
 
OK.
 
Kaz
@Hosch250 They're great at breaking VBA. I have a habit of crashing Excel even without opening the IDE.
 
2:03 PM
Oh.
 
in The 2nd Monitor, Sep 10 '15 at 16:21, by Zak
I just crashed excel twice because I forgot to add an increment in a do while loop ^^
 
I can crash it with the IDE, but usually not with the main program.
 
you haven't tried hard enough haha
 
Kaz
@Hosch250 I may have tried to open the entire Companies House directory in a single spreadsheet.
 
@Kaz Unless you hire a million people, that should work.
 
Kaz
2:07 PM
@Hosch250 "Companies House" is the UK Registrar of Companies.
 
Oh.
 
Kaz
Said Directory may have contained about 200 Million cells of information.
And been about 700 MB.
Relatedly. I also caused a problem by filling our entire shared Drive with corporate filings.
We had about 300GB free before I started...
They now live on a dedicated external hard drive.
 
shouldn't they live in a dedicated database server?
just sayin'
</smartass>
 
Kaz
@Mat'sMug You vastly overestimate the technical resources I have at my disposal.
 
doesn't matter if it's not "done right" - just have a SQL Server instance setup, and move the data over there. it can always be "made right" when you learn more about SQL Server.
(not without some pain alas)
but 700MB Excel files is definitely a sign
rule of thumb: if your Excel workbook doesn't fit a CD-RW, it's probably too large.
heck, my cutoff is 20MB
 
2:16 PM
Who has a workbook that large? I dont even know how (unless every cell has formatting, even if it isnt used, and there are hundreds of sheets with formatting but no data).
 
dozens of millions of records
it's basically a database
 
Even still, that cant be much more than a gig or two
 
10 mins ago, by Kaz
Said Directory may have contained about 200 Million cells of information.
 
@Kaz runs the finance for the whole GB.
 
200 million cells would make a bit more sense lol
 
2:18 PM
He's having a few problems dealing with the results of Brexit.
 
lol
 
For learning C# in VS. Do I want just an Empty Project? I've works with WF and WPF but I dont imagine those being very applicable for general C# programming.
I've worked*
 
Kaz
@BrandonBarney I do ^^
 
Good enough for me :)
 
@BrandonBarney Console Application.
 
Kaz
2:20 PM
@Hosch250 Interestingly, we've looked at it, and the direct impact of Brexit on our business is very limited.
 
As soon as I frigging created it too... lol
 
If you want a library, do a Class library or a Portable library.
@Kaz That's nice for you guys.
 
I just need something to start with that will be generally applicable
 
Kaz
Second-Order effects (like, say, the effect on our clients' businesses) are, regrettably, much more significant.
 
Yeah, Console Application.
 
2:21 PM
you don't want to start with a class library... you want something you can run
so yeah, console app
otherwise with a WinForms or WPF app the UI framework gets in the way of C# & .net
 
Talking about this, @IvenBach we'll look at operators next.
I find that after control structures, knowing the operators and their precedence helps most with understanding code.
 
from BASIC to basics
 
@Mat'sMug Yup.
 
Yeah, i've tried learning .Net before using WPF and Winforms for VB.NET but it is far more difficult to write basic programs that way (at least for what I do) so I never get to spend enough time learning. I just go back to VBA
 
WPF is basically "un-learn everything you know about Windows desktop development"
 
2:23 PM
lol
Definitely what it felt like
 
and then with WinForms you'd get trapped in the same anti-patterns as you would in VBA, unless you've done some Model-View-Presenter setup in VBA
 
Not a clue what that even means
 
in a nutshell, WinForms makes it easy to code everything in the forms' code-behinds
 
I got far enough with WinForms to get buttons to work for an add-in I made for my outlook, but beyond that I have little exposure
 
yeah.. best start with a console application and learn how events (/delegates) work in .net before you start whipping up a form and writing click handlers
don't get me wrong: you can definitely double-click a button in the designer and do pretty much exactly as you would in a VBA UserForm... it's just not a good way to learn things IMO
 
2:27 PM
Definitely, but don't jump into events right away.
 
Makes sense
I have a rough idea of how events work, and I can use some basic events, but yeah ill hold off.
 
actually, it can be educational, but only if you look at all the code that the designer generates for you :)
 
And when I say rough idea I mean button clicking, and dragging forms around on screen.
 
meeting, gotta go
 
See ya
 
3:09 PM
 
Kaz
3:25 PM
Don't you just love it when an anonymous utility function you copied off the internet 2 years ago that has worked flawlessly ever since suddenly starts throwing 1004 errors for no discernable reason.
I've filed this one under: "I have no idea. Do it manually this 1 time. If it happens again, let me know".
 
3:44 PM
@Kaz I do believe you're right.
It was an example for @puzzlepiece87 and I was going off some sample code he provided. I didn't know what was started in the with block and he seemed to understand my explanation.
 
@Duga 350 stars.
2
 
@Hosch250 I'll be ready for more tutoring tonight.
 
Basically, you'll want to get these down, except for the ones working with pointers: msdn.microsoft.com/en-us/library/6a71f45d.aspx
I don't really know pointers, but if I ever need them, I'll probably do them in C++.
No need to show me anything, just write a program that uses each of the non-pointer ones.
 
3:59 PM
@Hosch250 I only know about my own pointer. AKA my index fingers.
 
And for the ??, ?:, ?. and ?[] operators, I'd like you to write them out the long way with if/else blocks too.
After you get these down, I'll show you operator overloading.
And then we'll probably do exceptions, but I haven't decided yet.
And then we'll do some more programs. Maybe ASCII art games, maybe something else.
And while we are doing that, I'll show you unit testing.
GTG now, BBL.
 
4:14 PM
@Kaz implicit ActiveSheet references?
@IvenBach bit-shifting operators, << and >>, to shift bits left and right, respectively
TBH I only ever use them when defining flag enums
e.g. DeclarationType
oh wait, pointers
nah, don't go there
stay in safe territory
just know that unsafe code is possible
 
I know that, it's called VBA silly.
 
lol, nope
you need to wrap a code block with unsafe { ... } if you're going to be playing with pointers in C#
IOW, don't ;-)
 
If there's something that prevents me from doing it I'm unlikely to do so. At least not before I educate myself to a level where I'd be comfortable doing so.
 
I'm using unsafe to prevent int overflow in the HashCode.ComputeHashCode helper. that's about all.
 
Saying 'dont play with pointers' is like putting a Big red button out there saying 'dont press this after learning what pointers are'
 
4:24 PM
meh.. you very very very likely don't need to use pointers directly for anything in 99.9999% of the C# you'll ever write
 
4:48 PM
@Mat'sMug As promised, here is the link to the repo with my VBA stuff that has some roots in your VBTools repo. github.com/HALTEC/VBA-commons-lib I put all of it under the Apache license.
 
cool :)
 
5:49 PM
"programme" is not correct even in British English when referring to computer software. — Cody Gray yesterday
2
^^ @EBrown ^^
(sorry, had to share that lol)
 
Lmao
 
6:28 PM
What's the difference between an Exception and Error? I've read stackoverflow.com/questions/5813614/… even though I've never touched java.
 
it's pretty Java specific
 
Is there one for VBA?
 
VBA doesn't have any throwables
in VBA an error is essentially a run-time state
in .NET an error exception is an object you can throw (and then catch)
 
Is it taboo to think of Err.Raise as VBA-Landia's version of exceptions?
 
read up about .net exceptions, you'll see how throw new NotSupportedException() differs from Err.Raise 5
 
6:38 PM
I'm attempting to get rid of any hard End in the code and handle them appropriately.
 
Then why Err.Raise at all? What kind of errors are you trying to overcome?
To be more precise, what I mean is most errors you will encounter are predictable. If you think ahead when coding you can catch the majority of errors and try to correct them. Depending on if you are coding for other programmers or non-programmers they may or may not be able to help fix the problem. I tend to think ahead, and if I cant let it error out and put something in a log file that I can use to debug it.
 
I'm updating legacy code that used End in VBA to execution. Rather than having that occur I want some way to indicate why it's being stopped and to gracefully exit.
 
6:53 PM
My personal approach is to use an alert to tell the user the same info that Err.Raise does, but I can include a custom message like "Exiting the routine." or "Come see me if you have this error." Something more useful. I also use a separate routine for handling errors that I am going to end on.
This allows me to change my Error handling approach in one routine, and not in all the subroutines. I just use Boolean function calls. On error, return true, if true goto errorhandler.
Something similar
 
7:30 PM
We'll deal with exceptions after operators.
My system is properly usable again.
 
@IvenBach set up an error handler at every single one of your entry points (macros, workbook/worksheet event handlers, etc.), and msgbox the error (or log it.. whatever)
what you want is for any fatal error anywhere in the call stack to bubble right up to that entry point error handler, so in the procedures called from there, you'll have error handling that handles what can be recovered (e.g. return false), and re-raises (Err.Raise Err.Number) anything that can't, possibly altering the source and/or description so that you get something meaningful to work with. What's recoverable and what isn't is entirely up to your logic.
 
I even got VS (2017) installed again. I'll have to be careful when working on RD.
 
That way you'll always exit the program in the same procedure you started
@Hosch250 no 2015 install?
 
No.
 
they can be side-by-side you know
 
7:35 PM
Yes, I do. I had them side-by-side yesterday.
And ever since 2017 was stable-released.
And before that, I had the preview installed.
 
good thing there's CI on RD then. You break the build with C#7 stuff, you fix it
 
Getting ready to add "Field Can Be Readonly" to VS.
@Mat'sMug Good thing I know how to fix the build ;)
Did I tell you guys I have an interview at 9:30 AM tomorrow?
2
 
You didn't tell me anyway -- best of luck!
 
It's for a junior C# dev position. I'll get more experience with SQL and ASP.NET MVC too.
I got 96% on the C# 4.0 test they had me take, and 52% on the web-dev test.
 
nice!!
 
7:41 PM
What did you get on the VBA portion?
 
I wonder how much I'd score on a web-dev test
 
The web-dev covered stuff like C# (I pretty much aced that bit), SQL (I did pretty good on this), AJAX (I did pretty good on that, thanks to the senior project I did), and web dev stuff (I did terrible on that, probably because I skipped most of those questions because I had no idea what they did).
@IvenBach I'm not allowed to do manual labor on this job.
 
@Hosch250 #TheBurnIsReal
 
I'm being hired by an agency to work on a third-party job. If they like me, then they hire me from the agency after 90 days.
 
@IvenBach man I wish every VBA-requiring position had an assessment test.. although......
 
7:47 PM
@Mat'sMug Sure way to make VBA die.
 
Could you imagine being the person reading those tests? There would have to be hundreds if not thousands of people who would still use Select and Activate.
Even worse if the hiring company didnt see that as an issue though.
 
@BrandonBarney that
“When you’re learning a programming language you’re really just learning syntactic sugar on top of a type of thinking”
 
Quite true
But I would also argue that you are also learning the abilities of the language
Type of thinking yes, but the possibilities as well
 
.Select and .Activate is just people thinking as users: click here, select that, copy, click there, paste
 
Yeah, but I think it is part of the fact that VBA is a more user-friendly language to learn. It helps write the code for you. Some people dont know how to get past that.
 
7:51 PM
You can do exactly that (.Select/.Activate crap) in C# as well
 
Why would you? Unless you need something selected of course, but jeeze. If you deliberately do it in C# I would love to know the path you took where you didnt realize the error in your ways lol
 
> I have a Word 2016 project that compiles without error but gives multiple Resolver Errors. The resolver error message isn't too helpful as it just identifies the module. How do I go about tracking the problems.
 
@Duga enable detailed logging, gimme a stack trace
 
@BrandonBarney This should be a stepping stone to learn more, nothing more.
 
> Go to Rubberduck settings, enable ERROR-level logging. Close everything, open up the failing project and reproduce the errors; the log file will contain detailed stack trace information we can use to diagnose the problem.
> Go to Rubberduck settings, enable ERROR-level logging. Close everything, open up the failing project and reproduce the errors; the log file will contain detailed stack trace information we can use to diagnose the problem.
 
8:02 PM
@Duga money is on misplaced line continuations
At this point I should probably put up a blog post about 2.0.13's known issues
resists urge to make some bad play on "13 reasons why"
not really an "urge" anyway
Dim k&
^ somebody shoot this
 
@Mat'sMug BLAM!
 
I'm also quite flabbergasted by Dim k&, given you're not using type hints anywhere. Why not give it an explicit, named type like everything else? — Mat's Mug 21 secs ago
            g = g + 1

            j = q + p - 5
seriously
#ObviouslyHasNoRubberducky
 
8:17 PM
You know, I was thinking the other day. Mr. Fudd must have been fond of spreading Fear, Uncertainty, Doubt, and Death.
 
@Hosch250 you ever see Ozzie Fudd?
 
I was thinking of Elmer.
 
@Mat'sMug Still getting all entry points covered. Progress is being made.
 
8:37 PM
> At error level reporting I get one error

[RubberduckLog.txt](https://github.com/rubberduck-vba/Rubberduck/files/959703/RubberduckLog.txt)
 
9:21 PM
@Mat'sMug ADODB question - there's no way to see the final post-parameter query that SQL Server is executing, right? I assume no because it's all server-side, but I'm having trouble with my parameterized query. I think it's returning no results because it's using the literal question mark rather than my parameter.
(Executing an unparameterized version in SQL Server returns results)
 
did you put the question mark between single quotes?
if so, then that's why it's treated as a literal
 
Okay, double-checking that
Good guess, but no, it seems to be going through cleanly: select distinct claimid as RejectedClm into #DRS1 from (Schema).(Table) (nolock) where claimid in (?);
Function PrepareQueryCommandAndParameters(ByRef cnn As ADODB.Connection, ByVal strParameterizedQuery As String, ByVal strClaimsToQueryThisRunVal As String) As ADODB.Command

    Dim cmdtemp As ADODB.Command
    Set cmdtemp = New ADODB.Command
    With cmdtemp
        .ActiveConnection = cnn
        .CommandTimeout = 0
        .CommandText = strParameterizedQuery

        Dim parClaimsToQueryThisRun As ADODB.Parameter
        Set parClaimsToQueryThisRun = .CreateParameter("ParClaimsToQueryThisRun", adBSTR, adParamInput)
    Set cmd = PrepareQueryCommandAndParameters(cnn, strParameterizedQuery, strClaimsToQueryThisRun)
    Set rst = New ADODB.Recordset
    rst.Open cmd
Let me put this up on SO.
 
okay, in is different
no need to put it up on SO, just look it up on SO =)
2
(it's answered already)
 
okay, thanks :)
(I was searching now)
 
> Thanks!

````
2017-04-26 21:14:13.1116;INFO-2.0.13.32288;Rubberduck.App;Rubberduck version 2.0.13.32288 loading:
Operating System: Microsoft Windows NT 10.0.15063.0 x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.7870.2031
Host Executable: WINWORD.EXE;
2017-04-26 21:14:58.8156;ERROR-2.0.13.32288;Rubberduck.Parsing.VBA.ParseCoordinator;Exception thrown resolving 'Project.clsArcinovaCTDTitle' (thread 7).;System.NullReferenceException: Object reference not set to an ins
 
9:51 PM
Anyone here have any thoughts on C# Udemy courses? They have $10 sale presently and I was thinking of picking a couple up courses.
 
@Mat'sMug Thanks for pointing me in the right direction. You saved me a ton of time of stumbling around before finally learning what was wrong. I still don't completely understand, but I do understand that In clauses are expecting a list of parameters rather than a single parameter, and I have seen some alternative ways of tackling it, including your own: codereview.stackexchange.com/questions/46312/…
See you all tomorrow!
 
I have three headhunters after me.
 
@Hosch250 Nice to feel wanted?
 
All from Robert Half, which is a job placement agency. They said I hit their C# test "out of the ballpark."
 
Working with RD has probably given you a good skillset.
Glad to hear you have possibilities.
Just don't forget your soon-to-be-Guinnea-Pig.
 
10:46 PM
One of the companies I applied for through SO is looking for a junior dev now.
The other one was a senior position.
Apparently, they hire really smart people, do code reviews, unit tests, and keep abreast of newer tech, including F#.
 
What's the difference between C# and F#?
 
Lots.
C# is OOP with a few features based on FP. F# is a functional-first language that also supports OOP.
FP and OOP are two entirely different games. Different like basketball and hockey.
 
I think I understand OOP, but what's FP (functional programming)?
 
Instead of using objects with state, you use functions that take input and return output. Most functional languages have everything immutable.
Functional programming is heavily based on lambda calculus, and is excellent for games and mathematical stuff.
 
I'll have to read a little on lambda calculus then. All new things to me.
 
11:01 PM
Get OOP down first, or you'll end up with a horrible mixup.
 
I cant just learn C# and then happily stick my head in the sand and forget about anything else?
 
Heh, I still have stuff to learn in C#.
I've barely used C# 7, and I've not read the specification for any of them.
 
I just want to be aware of what's out there.
 
11:40 PM
beware of what's out there. JS frameworks are lurking.
 
VBA is lurking.
That reminds me, I told the guy I didn't want to use VBA.
 
> Rubberduck.Setup.2.0.13.0.exe (5.83 MiB) - Downloaded 1051 times.
Last updated on 2017-03-12
 
He said he rarely sees VBA anymore, but he used to 10 years ago.
 
> Total Downloads 11,288
 
@Mat'sMug Should JS be avoided?
 
11:51 PM
@IvenBach I've successfully avoided it for a while.. but if you want to do web it's probably not a good idea to skip it =)
@Hosch250 I rarely do VBA myself. But when I do, I do it with my Rubberduck.
(insert cheezy whatshisname meme here)
 
To a certain extent, yes. It is good at what it does.
 

« first day (1055 days earlier)      last day (2125 days later) »