« first day (1057 days earlier)      last day (2123 days later) » 
00:00 - 18:0018:00 - 00:00

12:01 AM
RELOAD!
[Hosch250/roslyn] 1 commit. 1014 additions.
[retailcoder/Rubberduck] 2 commits. 109 additions. 60 deletions.
[rubberduck-vba/Rubberduck] 2 opened issues. 1 issue comment.
 
12:17 AM
@IvenBach I've been shifting bits a lot lately. The VBA binary is compressed using byte packing and bit-shifts, and I had to write a FAT12 parser over the weekend which was all 12 bit packing. But they're edge cases.
@Hosch250 You wait ages for a bus, and then 2 4 come along at once.
but seriously, most agencies only care about the commission. They'll have you accept a job/rate that isn't appropriate, and they'll have clients accept a candidate that isn't suitable.
 
12:46 AM
@ThunderFrame Is $30/hour appropriate?
That's what they are paying me for the first 90 days.
It's a contract-to-hire position.
After the first 90 days, if the company likes me, they extend me an offer, and if I accept, I start working directly for them.
 
1:11 AM
> Rubberduck.Setup.2.0.13.0.exe (5.83 MiB) - Downloaded 1074 times.
Last updated on 2017-03-12
> Total Downloads 11,312
@Hosch250 sounds fairly decent to get started. That's $55-60K
 
1:23 AM
@Mat'sMug @Hosch250 it's better than working a checkout
but besides, as a graduate, the rate doesn't really matter. It's getting some experience that will add value to your CV, and make the next job attainable.
 
@Mat'sMug The final offer is supposed to be in the range of $60-65, but the recruiter said I might be able to get more.
@ThunderFrame Meh, I have experience. Rubberduck, VSD, and Roslyn.
And soon the F# tooling for VS too.
 
@ThunderFrame that
@Hosch250 expect that to be BS
 
@Mat'sMug Which part of it?
The first bit, or the second bit, or both?
 
both
 
Oh, I forgot the k.
$60-65k/year.
 
1:27 AM
I would expect it to be BS anyway
yeah I got that
 
So, then I turn it down and ask the recruiters to find me another job?
My mom used to work with these recruiters, and she said they are really good.
 
You don't turn it down, you take it and collect experience. 55k is 55k more than what you're making now
 
True.
 
and then it's a nice surprise if the 65k actually materializes after 90 days
 
@Hosch250 True, and good experience it is, but it's not subject to commercial pressures, and it's not typically dealing with all of the politics that comes in a paid job.
 
1:32 AM
but most reasonable people don't expect an 18% increase 3 months in
 
or it's an OTE number including bonus/health/etc.
msdn.microsoft.com/en-us/library/… Up Resources Used by the Task Pane
 
Well, 30/hour is 60k exactly over 50 weeks. I don't think it would be fair to reduce my wage after that time.
 
> The Visual Studio Tools for Office runtime automatically cleans up resources used by the custom task pane when the add-in is unloaded. Do not call the Remove or RemoveAt methods in the ThisAddIn_Shutdown event handler in your project. These methods will throw an ObjectDisposedException, because the Visual Studio Tools for Office runtime cleans up resources used by the CustomTaskPane object before ThisAddIn_Shutdown is called.
 
Unless they make up for it in benefits.
 
@ThunderFrame hey that rings a familiar bell
 
1:35 AM
@Hosch250 typically a contract rate is 20-30% higher than a permanent equivalent.
 
@Hosch250 I counted 35hrs/week*52
 
OK.
@Mat'sMug AFAIK, this is a 40/hour week job.
 
IDK, haven't counted work hours since 2004
 
Well, thanks for all the information, anyway.
 
contracting get's higher daily rate, but overlooked for training/promotion/benefits. Permanents have better job security, but can earn bonuses, have substantial benefits, career planning and progress.
 
1:37 AM
it's the same paycheck every week regardless of how many hours anyway
I think my pay stubs say 37.5hrs,..I should check
 
@Mat'sMug Not for the first 90 days.
 
Hmm
 
For the first 90 days, I'm considered an employee of the recruiters.
 
@Mat'sMug IKR - I wonder if there's some way to use a dummy ToolWindow that isn't subclassing or using WPF. If we can reliably have it killed by VBE first, it could tear down the RD ToolWindows?
@Hosch250 the other way of looking at it is $30/hour towards building your experience and funding a move to Alaska out-of-state.
 
@ThunderFrame Can't.
I can't leave the state until my dog dies because I won't be able to bring her with.
 
1:42 AM
Start your developer career with a paid #internship. A few summer positions are still left! Browse jobs →… https://twitter.com/i/web/status/857354676748111873
 
@Hosch250 That's one big sacrifice. I love my dog, but I'd find a way of moving and keeping her.
In my experience, what you do and accomplish in your twenties, will largely determine what you do and accomplish in your thirties, which in turn will largely determine what you do and accomplish in your forties.
 
@ThunderFrame was WPFing all docked TWs a big huge mistake?
sure ain't helping stability any way
 
@ThunderFrame Well, I'm getting a masters.
I'm going to take it part-time and pay for it myself.
 
@Mat'sMug It seems common across the add-in models (VBE, VS, VSTO) that the Windows aren't destroyed on Close, and that the Shutdown event is too late to tidy up. I think the ToolWindows would be OK except for the subClassing... But VBE just doesn't expose a suitable event that can trigger tear-down, and cleaning up the subclassing needs to occur before the ShutDown event.
@Mat'sMug I think I worked out how to write a VSTO add-in that can deploy via ClickOnce and allow a user to use late-bound calls to retrieve data from the add-in. I create a callback in the VBA, and call it from the VSTO add-in, passing in a COMVisible object. The VBA callback then stores that object in a private variable, and other VBA code can then use that variable to call into the object's methods in the VSTO add-in.
it's messy, but it doesn't require anybody to have admin rights... if it works.
 
2:05 AM
@ThunderFrame bingo
 
@Mat'sMug hence the dummy ToolWindow suggestion. Do you remember seeing whether the windows are closed in a particular order (maybe order they were created)?
 
Nope
 
 
1 hour later…
3:24 AM
Just helped a junior coder get 20k more dollars How? She politely asked if they could go higher Always negotiate, friends
Knowing someone is using something you made, and knowing that they can't do their job without it: best feeling in the world. 😊
 
 
1 hour later…
4:40 AM
@Mat'sMug So the moral is, always ask for more, but be prepared (especially in my circumstance) to settle for less?
 
assume the first offer is a bluff
2
 
How much higher should I go for in my bluffing counter-offer?
 
IMO, it's not that you ask for 10% more or 10K more. You assess your worth, and use a number slightly higher than that as your starting point
worst case, they can't meet your offer, you accept their counter, but make it clear that you have expectations for growth
and get commitments around that growth
 
Yeah, I've read about this until my head spins, but I don't know what I'm worth, what the going rates are, or anything.
I figure that 90 days into the job, I should know their systems enough to be hitting my stride, and at that point, I figure I'll be worth close to 70-80k. But again, I'm new to the game, and I may well be estimating high.
 
hmm, I' don't know the US market, but I'm guessing they can probably get somebody with 2-3 years experience for that?
 
4:52 AM
Probably.
But again, I'd guess I'm more experienced and a quicker learner than most people with that experience. RD and Roslyn have trained me in pretty good, I'd say.
And I do have three years of C# experience, and one additional year of C++.
 
I have no doubt, but you have to sell your skills to the company, and that means getting in front of them. Too many companies discard/overlook good candidates because they're too focused on artificial metrics like number of years of experience rather than actual ability
and there's discrimination in the workforce too. Even if you don't hear it, there will be people saying "You're not even 30 yet, you can't possibly know anything". Smart managers won't care and will just choose the best talent (but how do they identify and find that talent), but there's too much bias and group-think at many employers
 
 
2 hours later…
 
4 hours later…
Kaz
10:53 AM
@Hosch250 Word of advice. Getting a raise once you've joined is an order of magnitude harder than getting one before you start.
Because for obvious reasons, once you've joined, you've made it clear what price you will already settle for.
 
Kaz
11:05 AM
Exactly the same logic is behind why you never give a number first.
Or, if you do, why that number should be as high as you think you can go without being summarily dismissed.
 
 
1 hour later…
12:21 PM
@Hosch250 Why can't you bring your dog out of state?
@Kaz I made that exact mistake in my current role. I was already within the company, different department though. My hiring manager has a DBA. I got two interviews and was told I would hear back later, and also that there were more candidates they were interested in. After asking for only a few grand more than what I was making I learned I was the only candidate. This guy was ecstatic to get someone for that price who could automate everything his team needed.
Even worse, I was teaching my co-workers on the job within two weeks, and a month in I was transferred to a new role because I had automated everything and I did nothing all day.
 
Kaz
1:16 PM
@BrandonBarney Sounds like your manager doesn't appreciate the value of having an effective automation engineer. IMO, the correct response to "I've automated my entire job away" should be: "Awesome, lets move you up to the next organisational level and see what you can do to an entire department".
 
1:30 PM
@ThunderFrame aye, and late-bound only
and it's one entry point, so the entire COM API would have to be exposed through it
IMO it's good to know, but not good enough for RD
I mean, we want IntelliSense/autocomplete... discoverability
 
@Kaz That is actually exactly what happened lol. My new team is automation for the entire department. When my new boss first got me he gave me an automation project, expecting to have to teach me more advanced vba. He ended up realizing he couldn't teach me anything, and now I am training him and my coworker. The difficulty though is I locked myself into a low salary right before the new budget negotiation, and the official transition of me going to the new role is taking months.
@Kaz TLDR Not being a good negotiator locked me out of financial groth, but thankfully didnt lock me out of career growth.
 
2:18 PM
@BrandonBarney Basically, you don't want to buy a house until you've held your job for a while.
 
^ as someone that's currently buying a house, I can relate to that
 
Most apartments and rentals apparently won't accept dogs, and the insurance companies won't let them accept German Shepherds.
So, I'm stuck at home for now.
 
Ahhh ok. I thought it was a literal 'Dog can't leave the state' thing, not a housing thing.
 
Nope.
 
Makes a lot more sense
I just bought a house though, so I hope I love this job for a long time :)
 
2:22 PM
If it was in a place like near the MS/Boeing compounds and I had a job with one of them out in Washington, I might be willing to buy early, but I'd still need to wait for a while to get my local credit better.
 
In my case my wife is making a decent paycheck, we have lived in the area for our whole lives, and we hated the apartment we were in. It was just a given to a degree.
 
I've lived in this house my whole life, and I'm ready for some change.
I'd like to see the southern swamps, the south-eastern plains, the Rockies and/or Appalachians, and the sea someday.
 
That is definitely the downside to buying, we are now stuck in the state unless we decide to sell, and that would be a pain
 
As for living places, I want a place with a lot of sun, but that has some shade too.
Preferably close enough to the city to work there, but far enough that I am out in the semi-country at least.
Back to work on Roslyn.
 
Yeah, for sure. Did the city thing for two years and that was enough (and New England cities dont really count)
Well, NH cities
 
2:42 PM
You know you're not a city person at all if you don't like NH cities ha
You all give good career advice @Mat'sMug @ThunderFrame @Kaz @BrandonBarney
 
my life is complete
 
Kaz
3:02 PM
From the front page of an exam paper I recently saw:
"Your Answer Sheet will be read only by a dumb machine. Do not write or doodle on the sheet except to mark your chosen options. The machine 'sees' all black pencil markings even if they are in the wrong places. If you mark the sheet in the wrong place, or leave bits of rubber stuck to the page, the machine will 'see' a mark and interpret this mark in its own way."
 
bits of rubber?
 
@Mat'sMug What completed your life? (imgur blocked at work)
 
exactly 42 of my SO answers contain the string "rubberduck"
 
@Mat'sMug pencil eraser fragments
 
or ducky shreds
 
3:13 PM
@Mat'sMug Ah, you've had a good run.
Shall we throw you a retirement party at the party tree?
@Mat'sMug lol I'm a bit slow :P
^ still doesn't know what chat channel he's in, apparently
BEHOLD query plan cacheing (caching?) that is actually working thanks to @Mat'sMug! First run 3 min, second run 1 min.
I thought it was already working before for the record
 
Kaz
@puzzlepiece87 Caching
 
3:47 PM
@puzzlepiece87 any missing indexes? 3 minutes is pretty much 6-8 times my "acceptable threshold" for query performance
 
It's like a 9 step query
But I'll double-check just in case
 
> The hotkeys seem to work regardless of whether or not the program is in the foreground. i.e. When I press Ctrl+T in another program, the find symbol popup opens up in the background and stops the code from running.
> Hmm, that's a regression. The hotkeys are supposed to disengage whenever the VBE is no longer the active window.
 
@Mat'sMug Looks like I'm all set on indices thankfully.
 
it's the temp tables then
I'm pretty sure there's a way to get the results in under 10 seconds
 
Yeah, I just recounted, there's 11 of them
 
3:59 PM
temp tables aren't indexed
 
(Depending on which logic the query follows)
 
how many rows in the temps?
 
--#DRS1: Index
create nonclustered index Idx_DRS1
	on #DRS1(RejectedClm);
 
and the query plan shows the index is hit?
 
@Mat'sMug Up to 10s of thousands in each one.
Let me check
Ah, this is annoying
It's only letting me insert 1000 values at a time with the new method
I'll run it with 1000 to check the query plan and then figure out a workaround later
 
4:03 PM
what happens if the temp tables are actual tables instead?
how often is the source data updated?
you could have a SQL Agent job run overnight (or every hour, ...whatever) to recreate the working tables and do most of the work, and then the actual user-facing query would just pick up the results and filter
 
> When the Indent Current Procedure feature is used while the Rubberduck code parser is unable to complete without failing, all of the UserForms are removed from the project.
 
The source data is updated daily - I bet it would be better for actual tables, but I don't have actual power to create them
But maybe we should look into getting them created
It would help us resolve issues without people having to run reports and act on the results
Am I doing something wrong if I can't see the execution plan?
When I did Query --> Display Estimated Execution Plan I got:
SHOWPLAN permission denied in database (database name).
 
ask the DBA (or whoever is in charge of the server) to create a schema that you would own, where you could CREATE TABLE and DROP TABLE and TRUNCATE TABLE, and if part of your job is to write queries and make them efficient, you require SHOWPLAN permission everywhere ffs
 
I don't know enough about the SHOWPLAN permission to know if it's awkward/counter productive to not let analysts see execution plans.
 
yes
 
4:11 PM
That was my guess.
Okay, I'll figure that out
 
if you can't get an execution plan for a query you're supposed to write, then they can't complain it's inefficient
 
Agreed unless there's some edge case of SHOWPLAN permission that would allow me to do something they don't want
 
nope
 
Like I know Oracle permissions are dumb and they can't give me permission to write temp tables without giving me permission to write to other tables, is the way I currently understand it
(So I can only do CTEs in Oracle, which is frustrating)
 
oh
I thought this was SQL Server
 
4:14 PM
No no, it is
 
kk
 
I'm just saying sometimes there are dumb situations which prevent otherwise sane requests from getting approved, in my experience
 
there shouldn't be any issue with a sandbox schema for you to play with
 
4:28 PM
Thank you again for the help.
 
4:38 PM
Thanks for the edit but With Me entirely redundant? Never heard that before. — Kostas K. 2 mins ago
I just had an inspection idea
 
Oh, Stack Overflow. May thy be an endless source of bad code to write inspections and quickfixes for.
 
5:03 PM
Is there a super simple way of checking if a certain sheet name already exists? Or is the best way to just On Error, or to loop through all sheets?
VBA
 
Sub TESTING()
    Dim temp As Variant
    On Error Resume Next
    Set temp = Worksheets("Fake")
    On Error GoTo 0
    Debug.Print IsEmpty(temp)
End Sub
No need to check every worksheet.
 
I was just hoping to avoid the use of 'On Error Resume Next'. It always looks ugly to me. In my case I ended up just doing something like 'On Error Resume Next: Worksheets("SheetName").Delete:On Error GoTo 0. I just need to check if it exists so I can delete it before creating a new sheet with the same name.
 
The negatives are hard for me to comprehend for bit shifting >>
 
Hide it in a dedicated function?
 
^
 
5:17 PM
I need to delete it because I am creating a new one with the same name
And a dedicated function would be serious overkill lol
 
@IvenBach As Worksheet, and then check err.number. that variant seems to only be there to justify the IsEmpty call ;-)
 
lol
Yeah, with Iven's example IsNothing() would be better
 
@BrandonBarney how so? Public Function SheetExists(ByVal name As String, Optional ByVal book As Workbook) As Boolean feels perfectly reasonable to me
 
It is reasonable in other projects, and I have used that same exact kind of function in other cases. In this case though it is literally one subroutine that needs it, and there's four subroutines total.
It would be harder for someone to understand a function call where I would say 'If Exists then Delete' versus 'Force a delete if possible' kind of case. And I do want to avoid error resume, but I would either have to loop through worksheets for the SheetExists, or use something like Iven's (still needing the on-error)
 
tbh such a function probably belongs in an excel add-in
 
5:22 PM
probably lol
It should be a member of Worksheets in my opinion
Worksheets.Exists("Sheetname") would be far more convenient
 
Yeah
 
Same with any other collection, PivotTables, ListObjects, etc.
 
alas, has to be in CommonStuff.bas
 
@Mat'sMug It works doesn't it?
 
5:23 PM
@IvenBach .Activate works doesn't it?
lol
 
@IvenBach "it works" isn't a good metric though :-)
 
sometimes
 
In all fairness, yes it works, but in practicality we should always strive for optimization if we reasonably can
 
I tried. A little too hastily to think it through.
 
Its fine lol
If this was a SO thread though...
Is there any good way of keeping Class files up to date in macros? I have a class file I use consistently, but time after time I find a project that brings a problem to light, or exposes a feature I need, and then ultimately other projects become out of date because of it.
 
5:29 PM
put it in an add-in so it's in one place. distribute the add-in along with the macros, make the macros reference the add-in
other than that... #2989?
 
Does the add-in stay with the workbook? And would not having admin priveleges on some machines be an issue?
And I will gladly use RD once you fix the whole hotkey issue :)
 
I'd think every user can access %appdata%\microsoft\addins on their own machine
 
If it needs to be installed at all, I dont think they can. I also need it to be as simple as 'Heres the macro in an excel workbook'. When I say I am dealing with people with varying technical competency...that can be difficult at times.
 
it just needs to exist
"installed" is a big word full of implications
"dumped there" is more like it
heck, you could have a .ps1 or .bat script that runs on startup and fetches a centralized "latest version" of the add-in and overwrites it in %appdata%
 
That may be worth looking into if I can 'dump' it remotely. I think I know the add-ins folder you are referencing, but I have no way of remotely accessing machines. The best I can currently do is 'take this'. At that point it is easier to just send them the updated version of the workbook
That may work if I can find a network folder that I can use
 
5:35 PM
FWIW I can't repro the hotkey issue with my old broken 2.0.13 post-release debug build I have at work
might have been fixed just after the release
 
Any chance I can get my hands on an installer for that and give it a shot?
 
For the post-release
 
oh
hmm
well, it's a quite broken build lol
 
lol, nvm then
 
5:37 PM
from just a few days before we switched to C#6
inspections don't run
but there's no hotkey issue
 
I can still give it a shot on my machine and see if I still get the hotkey problem
 
I'll probably get home tonight and close it as "already fixed, thanks for reporting"
@BrandonBarney you're running current/next?
 
I uninstalled because of the hotkey issue
 
hmm
 
Its unusable for me as is
 
5:39 PM
current next is unusable for anyone that uses line numbers or conditional compilation
that is the single problem that needs to be addressed before we can release 2.0.14 2.1
 
I dont use either of those (well, I dont know what conditional compilation is, so I assume I dont)
 
#If VBA7 Then
 
Nope
Dont use it
 
k
that's #2938
it's kinda stuck in a catch-22 right now
 
5:43 PM
every attempt to get line numbers work with the parser has failed
and there's absolutely no way we can get this to parse:
#If FOOBAR Then
    Public Sub Foo()
#Else
    Public Sub Bar()
#EndIf
    End Sub
What RD sees if FOOBAR is True:
        Public Sub Foo()



        End Sub
 
Very weird
 
grr stupid chat markdown.. whatever
 
we basically replace "dead" code with WS tokens
so when we go and rewrite a module, we'll be wiping out anything that wasn't in the token stream, i.e. line numbers and conditionally-compiled code
 
Excuse me for being dumb here, but is there any way to recognize that it is using this style of markup, and run it through a different parser instead?
 
5:46 PM
all ideas welcome
 
Isn't there a txt file representation of the module code or something?
 
there's just no way to make it "see" both #If and Public Sub
 
Is there any way to get it to recognize that that structure exists?
 
that's just a limitation of the grammar: a parser rule can't be intertwined with another
the parser will literally choke on it
 
Have you seen the VBA codecleaner code by Rob Bevy?
 
5:48 PM
no
but I've seen his Smart Indenter code
we refactored it to death
it's in the RD repo somewhere
 
Check out his CodeCleaner. Its open source. I am sure it is awful, but he essentially exports the VBA project line by line
 
I honsetly have no clue if it will help at all
But maybe there's a way to approach this problem with a middleman of sorts?
 
you can't parse VBA code line by line
 
I dont know what he is doing then
 
5:50 PM
that's one of the reasons Smart Indenter had bugs
 
I have no functionality with VB6 which it is written in
Ultimately my reasoning is just that if there is any way to get something that recognizes the #If Foo then structure. and then go around it, and deal with that specific portion anoher way
 
well, we do
we pre-process the code and literally interpret the conditionals, using a dedicated parser
then we clean up the string and give it to our parser
 
Oh, nevermind then lol
 
that's the problem actually: because the parser only sees WS tokens, the rewriters don't get the full picture, they're missing the bits we removed during pre-processing
 
Why are they removed during pre-processing?
 
5:52 PM
otherwise the parser chokes
we can't parse line numbers
and we can't parse intertwined parser rules
the preprocessor grammar is extremely simplified
it basically only sees preprocessor statements
 
I wish I knew more about C# so I could actually see something like this and take stabs at it. It sounds like a interesting problem lol
 
it is
 
Is the parser you have the only one that can complete this task?
 
I'm pretty sure RD's parser is the single most accurate and reliable VBA parser out there. Everything else that tries to parse VBA code, @ThunderFrame can break
to be fair, @ThunderFrame can break our stuff too
most parsers blow up when you give them line continuations
 
I didn't realize at first that the parser is a built function. I was imagining it as some kind of outsourced thing
 
5:56 PM
^ it's an Antlr4 grammar file
Antlr reads this and generates C# code for us
that generated code is the "parser"
but we have half a dozen of such grammars, for various purposes
mostly pre-processing
 
I'm not gonna even pretend to understand how that grammar file is working
 
and then, we don't just parse/tokenize the code: once we do that, we go and resolve identifier references - if our resolver worked 100% flawlessly, we could write a VBA compiler that outputs C# if we wanted
 
How flawed is it currently?
Besides this issue of course
 
not very
 
Because that would be amazing lol
 
00:00 - 18:0018:00 - 00:00

« first day (1057 days earlier)      last day (2123 days later) »