« first day (290 days earlier)      last day (2890 days later) » 

12:00 AM
RELOAD!
[retailcoder/Rubberduck] 6 commits. 4 issue comments.
 
 
4 hours later…
3:36 AM
ok the good news, ...all declarations are picked up, including methods.
Rubberduck Code Inspections - 22/03/2015 11:35:11 PM
8 issues found.
Error: Variable 'result As String' is never assigned - VBAProject.ThisWorkbook, line 8
Error: Variable 'buzz As Integer = 5' is never assigned - VBAProject.ThisWorkbook, line 6
Error: Variable 'fizz As Integer = 3' is never assigned - VBAProject.ThisWorkbook, line 5
Error: Variable 'Public Sub FizzBuzz()

    Const fizz As Integer = 3
    Const buzz As Integer = 5

    Dim result As String
    Dim value As Integer
    For value = 1 To 100
the less good news... all declarations are picked up, including methods
no biggie though.. I just need to be a little bit more specific with the queries :)
(and figure out why the whole declaration substatement is now showing up as the identifier name)
eh, fixed. way too easy.
 
4:04 AM
oh wow
I think Rubberduck now has the ability to discover unused UDT members
> variable non-usage false positives: fixed.
 
> replaced IdentifierUsageInspector with parseResult.Declarations queries
 
4:46 AM
> fixed selection issue in ParameterCanBeByValInspectionResult.PassParameterByValue()
 
 
6 hours later…
11:15 AM
> Source Control Changes View is Complete
2
 
That merge will be a PITA
I should have named GrammarIsFun, MergingIsFun
 
11:52 AM
Yeah.... I'm not looking forward to that either, but that is life.
How was your weekend Mug?
 
Busy, although I didn't touch my laptop till late Sunday, had my wife's friend over for diner (that never happened - long story), and spent Saturday evening over at my sister's place
You?
 
Not shabby. Kind of lazy. Wife & kids made me watch four of the Harry Potter movies in two days...
 
@RubberDuck GrammarIsFun > Next is one thing. Then there's Next > Master that will be just as fun! :)
lol
I saw Toy Story 3, 4 times yesterday.
 
LOL..........
@Mat'sMug Ouch.
I mean, good movie, but four times? Ouch.
 
Well 3.25 actually ;)
It's okay. I have never seen Frozen!
 
12:07 PM
I've got two girls. I've seen Frozen enough times to know all the words to every song.
It's actually an okay movie. I've just seen it too many times.
 
Hehe... bbl
 
12:33 PM
> What does this mean?
Private WithEvents ScheduleView As Form_SmartScheduleForm
LULZ
At least he's trying. =)
 
 
3 hours later…
3:09 PM
@RubberDuck Did he get it yet? ;)
 
Morning guys
 
@Mat'sMug IDK. Replied to his email trying to explain and offered to do a google hangout with him to explain it better.
Monking @Phrancis.
 
I swear today I'm going to get this shit Sub to work.
 
Today is the day friend. Today is the day.
 
I need to blog about Rubberduck parsing tonight. I'll put it up on RD news.
I love the new API
the indexer isn't actually needed
like, this is how ParameterNotUsedInspection now finds issues:
    var declarations = parseResult.Declarations.Items.Where(declaration =>
        declaration.DeclarationType == DeclarationType.Parameter
        && !(declaration.Context.Parent.Parent is VBAParser.EventStmtContext)
        && !(declaration.Context.Parent.Parent is VBAParser.DeclareStmtContext)
        && !declaration.References.Any());
requires a bit of knowledge of the grammar itself (i.e. the Context.Parent.Parent bit), but generally looks great I find.
oh, and I need to do something.. .hold on...
 
3:25 PM
@Mat'sMug I was just about to mention that. What is that bit?
 
> The Code Explorer currently gets its content by traversing the parse tree. With the new declarations API that becomes completely redundant; the tree view can be generated from the declarations API.
> Once #336 is done, implementing a "Find all references" context menu to the *Code Explorer* will be a breeze.

We also need to add this functionality to the code pane's context menu, which would allow the user to right-click any declaration and bring up a *search results* window that allows navigating to all references of the selected identifier.
 
^^ that @RubberDuck :)
 
every identifier's references are already in declaration.References - we just need to use them :)
 
But what is Context.Parent.Parent?
 
3:32 PM
in that specific case, Context is an ArgContext - it's part of the actual parse tree. ArgContext.Parent is an ArgsListContext, and ArgsListContext.Parent is, per our grammar, an EventSmtContext, DeclareStmtContext, or SubStmtContext, FunctionStmtContext, PropertyGetStmtContext, etc..
so what that code is saying, is "give me all parameters that aren't part of an Event or Declare statement, where you haven't found any references for.
 
Ohhh.
It's unfortunate that's part of the generated code.
It could be made clearer otherwise, but...
Mar 20 at 0:42, by Mat's Mug
> do not modify generated code. EVER.
 
lol
it's not too bad - one just needs to study a bit of grammar Ctrl+F in the grammar file :)
I like that this whole thing worked exactly as expected... the first time around!
this is how VariableNotAssignedInspection finds issues:
    var declarations = parseResult.Declarations.Items.Where(declaration =>
        declaration.DeclarationType == DeclarationType.Variable
        && !parseResult.Declarations.Items.Any(item =>
            item.IdentifierName == declaration.AsTypeName
            && item.DeclarationType == DeclarationType.UserDefinedType) // UDT variables don't need to be assigned
        && !declaration.IsSelfAssigned
        && !declaration.References.Any(reference => reference.IsAssignment));
I really ♥ this API
I smell a refactor/rename functionality coming :)
2
 
OMG... that would be... unreal.
And I thought I about crapped my pants when I committed from the VBE.
 
@Mat'sMug Dude that would be sick. Eclipse has that and it's awesome!
 
lol
@Phrancis it's the next thing I'm working on!!
@RubberDuck if there aren't any more changes needed to the grammar, GrammarIsFun can be merged into Next tonight.
 
3:44 PM
crosses his fingers
And prepares to build himself a private installer....
 
lol
the one thing that freaks me out is that the debugger won't register by itself. everytime I want to debug, I build, then run a .bat as admin to run regasm.exe on the debug build, then I can launch Excel and attach VS debugger to the EXCEL.EXE process. a PITA, but it works.
I hope I'm not going to break the debugging (on your end) with that merge
 
That's really odd. We'll see what happens I guess.
<lunch>
 
.IsSelfAssigned is bothering me. It stands for things like Dim foo As New Bar... is it clear from the name?
like, the declaration is also an assignment
 
3:59 PM
> The Declarations API is currently only visible through Inspector.FindIssuesAsync: var code = new VBProjectParseResult(_parser.Parse(project)); code.IdentifySymbols(); code.IdentifySymbolUsages(); // surely a bottleneck To be available everywhere, Parse(VBProject) needs to return a VBProjectParseResult object, with the symbols and usages already loaded.
> This is certainly a prerequisite to #337 and #336
 
4:19 PM
> Indeed, VERY similar - from VariableNotUsedInspection: var declarations = parseResult.Declarations.Items.Where(declaration => (declaration.DeclarationType == DeclarationType.Variable) && !declaration.References.Any(reference => !reference.IsAssignment)); Adapting to procedures would look like this: var declarations =...
parseResult.Declarations.Items.Where(declaration => (declaration.DeclarationType == DeclarationType.Function || declaration.DeclarationType == DeclarationType.Procedure) && !declaration.References.Any()); Actually... this should also include PropertyGet, PropertyLet and PropertySet - so the inspection would say "Member is never called".
> This one needs to be tested against code like this: Public Function Foo(ByVal bar As Integer) As Integer Foo = bar End Function Public Sub DoSomething() Dim Foo(1 To 10) As Integer Foo(1) = 42 ' local-scope array assignment End Sub Function Foo is simply not visible to DoSomething, because local array Foo is shadowing it. If there's a bug with this, then function...
IsInScope needs to be amended.
 
4:36 PM
Yes, using prepared statements is a good habit to keep with any DB-accessing code. Remember, database administrators don't deal with bugs, only with regrets! — Phrancis 57 secs ago
 
4:50 PM
@Phrancis Mon Dieu! I wish that wasn't true.
idk where you ever heard that, but I've been quoting it lately.
 
in The 2nd Monitor, Feb 10 at 22:29, by rolfl
The reason that DBA's are often considered to be boring, and bland people without a sense of humor, is because they live with consequences.
@RubberDuck Inspired by that ^^
 
Nice.
@ticker is a busy beaver today.
 
5:44 PM
> 26 + 10 downloads
 
6:05 PM
> I think I’d fancy writing another POJO with 40 attributes, constructors, getters, setters, equals, hashCode, and toString

— Said no one. Ever
 
6:18 PM
Although this may be actual code, without context about what the surrounding code does, and what this code accomplishes (in plain English), I find it difficult for anyone to provide a very meaningful review, hence, "Unclear what you're asking". — RubberDuck 23 secs ago
 
and closed
hi @MichalKrzych!
 
6:37 PM
@Mat'sMug hi! whats up
 
I implemented what I'd call a symbol table for Rubberduck
I think I'm ready to tackle refactor/rename with this :)
I'll try to blog about it tonight
3 hours ago, by Mat's Mug
    var declarations = parseResult.Declarations.Items.Where(declaration =>
        declaration.DeclarationType == DeclarationType.Variable
        && !parseResult.Declarations.Items.Any(item =>
            item.IdentifierName == declaration.AsTypeName
            && item.DeclarationType == DeclarationType.UserDefinedType) // UDT variables don't need to be assigned
        && !declaration.IsSelfAssigned
        && !declaration.References.Any(reference => reference.IsAssignment));
^^ gives me all unassiged variables
feels like I AM THE MATRIX!!
so many possibilities...
> right-click on any identifier > find all usages > window pops up with all usages of selected identifier
(instantly)
 
7:06 PM
Ugh I want to get this VBA to work, but I'm in so much pain I can barely think. (Did some boxing with a friend on Saturday, turns out he's much better at it than I am lol)
 
lol
 
I just crashed Excel..... that was fun.
Ugh. Lost my changes to Tree too.
Damn.
 
isn't it under source control? ;)
 
Not yet....
Smart ass Mug.
2
 
lol
 
7:20 PM
=;)-
 
8:02 PM
@RubberDuck I'm not convinced we should delete the 1.21 branch
we could keep it for historical reasons, like, in a year's time, when the code is nowhere what it was then, ..we can look at it and say "damn, look at all the work done!"
 
That's what tags are for. =;)-
But that's fine with me.
 
ah, right. Deleting it then
 
[retailcoder/Rubberduck] retailcoder deleted branch 1.21
 
and gone
 
 
1 hour later…
9:30 PM
GROAN
 
your code works, it's a network permission issue
 
Oh wait, it made the file the first time (no error, but also no data) and the 2nd time it got that error so it must have not been allowed to overwrite it
Need to also add a check for that backslash in the path, it created C:\test_CombinedOutput.txt instead of C:\test\_combinedOutput
 
Is the file hidden or locked?
Damn it I hate #70
 
Negative
Now that's even weirder, because YES THE DIRECTORY EXISTS damnit.
 
Store your FSO in a variable instead of creating a new one all the time. Maybe the first one is locking the file, so the second one can't use it. Which line is actually raising the error?
Are you sure? Debug.Print the path to make sure you have the path you think you do.
 
9:43 PM
Gone.TTGH
 
@Mat'sMug btw. My whole Tree was shit. I replaced it with another version that is shit. I'm starting to hate VB6 with a passion I never thought I would feel. I want constructors and delegates dang it!
Lol.. C ya Mug.
 
> Path: C:\test\
InputFileName: A36952 sales filtered for deductible.txt
OutputFileName: _CombinedOutput.txt
^^ Print
Hm. Better try to debug then
OK this step causes the error:
Do Until InputFileName = ""
    TextLine = TextLine & vbCrLf & CreateObject("scripting.filesystemobject").opentextfile(Path & FileExt).readall
    InputFileName = Dir
Loop
Wait a minute...
FileExt doesn't even exist. No wonder
 
Actually, neither does TextLine ...
It's almost Beer o'Clock finally
3
 
10:42 PM
@RubberDuck Uh.. lol?
.net does that to you :)
 
Lol. It's funny. I started this wanting a better experience, but now that I've got it, I want more.
 
10:59 PM
Got into a bit of an argument at work today. VB vs C# when we upgrade. Wanna guess which I was fighting for?
 
lol VB?
cough
 
Lol.
 
There is no reason to go VB over C#
"It's a smoother transition" is a lie - COM & .NET are completely different things
 
Well, yeah. There is a pretty legit reason. Learning curve for a bunch of people who've spent years in VB6.
 
Going with VB will only make it easier to do things the wrong way
 
11:03 PM
Yeah. They are. No doubt. I think C#
That ^^
continue to do things the wrong way.
 
If you think in VB6 when you write VB.NET, you're headed into a wall
C# was made for writing .net code
 
If you think in VB6 when you write VB6 you're headed into a wall...
 
VB.NET was made to make VB6 coders think they can write .net
 
I think the syntax shock might be enough of an opportunity to beat some good habits in.
 
kids.BeginBathTime()
 
11:07 PM
Yeah... Another Harry Potter movie awaits...
 
11:34 PM
I love that they like to shower :)
They're both in bed. Hopefully they'll... ... nevermind.
 

« first day (290 days earlier)      last day (2890 days later) »