« first day (261 days earlier)      last day (2919 days later) » 

12:00 AM
RELOAD!
[Cardshifter/cardshifter.github.io] 1 opened issue. 1 closed issue.
[retailcoder/Rubberduck] 14 commits. 3 opened issues. 1 closed issue. 11 issue comments.
 
12:14 AM
> oops forgot to close before @Duga's reload :(
3
> properly implemented IDisposable, Marked Exception classes, serializable, finally refactored Menu subclasses
 
@Duga Not so micro commit.
 
2 little inspections left to implement: ObsoleteGlobalInspection and OptionShouldBeSpecifiedFirstInspection - both are relatively simple, the hard stuff is all done! :)
gotta go, might resume later
 
See ya buddy. I'm gonna keep working on the technical debt.
 
1:00 AM
Most code inspections scheduled for v1.2 are now implemented!
 
1:29 AM
0
Q: VBA Save As Current Filename +01

PlainsWindI'm looking to write a macro to save my current version filename +1 instance of the version. Ex. Current = DailySheet_20150221v01; Save As = DailySheet_20150221v02 Am I on the write line to set a string to DailySheet_today's datei`?

 
@Duga CardShifter got shifted mwahahaha (@SimonAndréForsberg)
 
@Mat'sMug I have to say, I am impressed!
There hasn't been much progress on Cardshifter recently, it is a really big project and I have been the only one working on the main repo lately. Except for some card-balancing and documentation by @Phrancis.
 
I'm just happy to have all these code inspections implemented and working like a charm - beating CardShifter's commit count is just a cherry on top ;)
 
lol
you will probably get used to it
 
lol yeah.. especially seeing everything we planned for v1.3...
 
1:42 AM
I've been quite focused on writing a CV/resume this week, and next week I plan on sending it to a couple of companies, hoping to get a job soon.
 
I'm sure you'll be counting offers by the end of next week!
 
Let's hope so
Depends on how many I send it to, I guess.
noww it is time to count sheep, TTGTB!
 
WHY WHY WHY is the tool window going null?
If I could just figure out when....
 
@SimonAndréForsberg Night!
 
2:06 AM
@Mat'sMug Fixed it.
The menu needs to keep a handle on the presenter so the toolwindow doesn't get garbage collected.
 
@RubberDuck Oh nice!! Well done!
 
Well, one of them is fixed, but now that I know what's wrong, it's an easy fix.
 
 
2 hours later…
4:02 AM
> fixes #169 dockable windows no longer suffer from the bug that drove ducky crazy
 
4:50 AM
> refactored menus one more time
> .....I hate extra whitespace
> Merge branch 'master' of github.com/retailcoder/Rubberduck into UICleanup
[retailcoder/Rubberduck] ckuhn203 created pull request #240: UI Cleanup to merge UICleanup into master
[retailcoder/Rubberduck] ckuhn203 pushed 20 commits to master
> Merge pull request #240 from retailcoder/UICleanup

UI Cleanup - Paying those debts to ourselves.
> Better UI cues and performance now. Closing this issue (for now at least).
 
Goodnight @Duga.
 
 
6 hours later…
10:54 AM
> You've earned the inquisitive badge for posting 30 well received questions on 30 days.
 
 
3 hours later…
1:26 PM
> created new TestEngine
 
1:50 PM
@RubberDuck a new TestEngine? does it not overlap the yet-to-be-used TestExplorerPresenter?
 
Composition my friend.
It's responsible for running the tests. The presenter is responsible for communicating between the TestWindow and the TestEngine.
 
nice
 
2:20 PM
0
Q: Why am I not get getting correct column positions in that parse tree?

Mat's MugSay I have a string like this: var code = "Private Sub DoSomething(ByVal foo As Integer)\r\n DoSomethingElse(foo)\r\nEnd Sub"; When I feed my ANTLR-generated parser with that string, I get a parse tree that looks something like this: [SubStmtContext] [VisibilityContext] [ArgListCon...

 
Yeah. It would really suck to have to CodeModule.Find stuff after parsing it.
 
and it's exactly what we're doing now
(using the QualifiedModuleName)
this may help getting the attention it deserves:
fixing that would fix all selection issues, and then we could set the selection to a specific token anywhere in the IDE
^^ their milestones/labels structure is pretty much like ours! :)
 
3:28 PM
> Implemented ObsoleteGlobalInspection; closes #239
> Merge branch 'master' of github.com/retailcoder/Rubberduck
 
> 89% complete
 
3:53 PM
@RubberDuck when did DAO get added as a reference?
does it need to be there?
(it doesn't build on my end)
I removed it, nothing uses it
 
> implemented ModuleOptionsNotSpecifiedFirstInspection; closes #18 (implemented as a suggestion, no quickfix)
 
> 90% complete, and now all inspections for v1.2 are implemented :)
 
4:18 PM
Deja vu. @Mat'sMug probably when I fixed the Interop references.
So, clean up work then? Not much left eh?
Yeah. Fix any mismatched severities, finish the TestExplorer, build, test, & document.
I think we might beat the deadline.
 
^^ will create a page like this for each inspection, and then edit the "Code Inspections" wiki to link to them
 
5:09 PM
Do you guys want to watch ANTLR releases, etc. in this channel? I believe @Duga is capable of some sorcery
 
@skiwi I starred & followed their repository, but I'm not sure I want to receive notifications for everything going on in there - would @Duga watch comments on issues, etc.?
 
@Mat'sMug Not sure exactly what it does, but I've seen it push a message if a new tag aws created
It's not as extensive as the issue comments etc.
would need to ask @SimonAndréForsberg on what it exactly does ^
 
@Mat'sMug want to follow a repository? @Duga can post whatever you want about it.
 
if it's not too annoying, I'll take it, ...although at that point it would probably be better to have a dedicated RubberduckVBA chatroom
 
5:19 PM
it can watch issue comments and stuff as well, but that's mostly... annoying.
 
@SimonAndréForsberg Wait... it's configurable?
 
@skiwi it's me you're talking to, of course it is!
2
 
> new test engine builds, ready for testing
 
@Mat'sMug what repository is it you want to be informed about and what events are you interested in?
 
> run all works well, others are still buggy
 
@Mat'sMug only releases? or something more?
 
oh, yeah, only releases would be nice
especially given this:
4
Q: Why am I not get getting correct column positions in that parse tree?

Mat's MugSay I have a string like this: var code = "Private Sub DoSomething(ByVal foo As Integer)\r\n DoSomethingElse(foo)\r\nEnd Sub"; When I feed my ANTLR-generated parser with that string, I get a parse tree that looks something like this: [SubStmtContext] [VisibilityContext] [ArgListCon...

 
alright, configured.
A little caveat though: It might not work correctly. Provided as-is. No warranty. Yada yada...
 
lol no problem, thanks!
 
> IMPORTANT Functions consumed by Microsoft Access macros must be Function procedures; when a VBA function is used by a Microsoft Access macro, applying this quickfix can break macros. Assign the function an error code instead (like DoSomething = 0) - Rubberduck will no longer mark the function as non-returning, and functionality will be preserved.
^^ @RubberDuck would that do?
 
0
Q: Trying to get flight data from delta.com using vba

PhilipI am trying to retrieve flight information from delta.com to help automate my workload (I usually have to type in all the flight data daily in excel). So far, this is what I have and it works occasionally. I stepped through it and it seems to jump all over. I figured my ifs are nested wrong? But...

 
> Lastly, I relaise VBA is not the easiest way to do this, and the code will slow down the computer but, I can not upload java or any real language to work computers.
 
@Mat'sMug wat?
 
@skiwi quoted from the off-topic question @StackExchange posted
 
6:21 PM
Yeah @Mat'sMug. That will do. Might want to mention that they can alternatively turn the severity level down
 
...yeah, although it's implicit that every single code inspection can have its severity level configured to DoNotShow
that said if I worked with Access I'd still leave that one on, and assign an error code 0 to my macro functions
it's a good inspection, that can avoid/find bugs
 
@ticker deja-vu
@RubberDuck YESSS!!!
1
A: Why am I not get getting correct column positions in that parse tree?

Sam HarwellThe Token interface does not include a "column stop" property. However, it does include a method getStopIndex() which it sounds like you may be using. The getStartIndex() and getStopIndex() methods return the absolute indexes into the stream (from the beginning of parsing). To get the column with...

 
7:07 PM
Win!!!!
 
> This quickfix simply removes the unused declaration; if Option Explicit is specified, doing this will break any/all usages of the unassigned variable. If Option Explicit is not specified, removing the declaration has no effect.
I don't like this
should that inspection also check to see if there's any usage before it suggests removing the declaration?
 
7:29 PM
@Mat'sMug I'm not sure I understand. If it's never assigned to... Ohhh.
Can we check to see if ...
Yup. You already suggested that.
I'd disable the quick fix if it's never assigned, but is used.
 
7:40 PM
@RubberDuck I think this is begging for an UnassignedVariableUsageInspection implementation.
 
Perhaps.
 
7:57 PM
yes, because then I can have VariableNotAssignedInspection keep its quickfix :)
no wait, that's VariableNotUsedInspection's job. hmm....
if it's not assigned, but its value is retrieved somewhere, then the code is technically already broken. I think this is a case for an Error level - variable is declared and used, but never assigned. Removing the declaration breaks the code, but then the only other solution is to know where, when and what to assign it. so yeah, it's a programming error.
 
8:41 PM
        private void RemoveUsage(VBE vbe)
        {
            var module = vbe.FindCodeModules(QualifiedName).First();
            var selection = QualifiedSelection.Selection;

            var originalCodeLines = module.get_Lines(selection.StartLine, selection.LineCount)
                .Replace("\r\n", " ")
                .Replace("_", string.Empty);

            var originalInstruction = Context.GetText();
            module.DeleteLines(selection.StartLine, selection.LineCount);

            var newInstruction = "TODO";
> var newInstruction = "TODO";
^^ keeps broken code broken
 
9:00 PM
0
Q: VBA: Sort data by date , then by user for an unknown number of rows then summerizing by week and user

brandieThis is the code I have so far: Private Sub SortButton_Click() ' Sort Data by date ' Sort Data by Inspector Dim lastRow As Long 'determin # of rows in sheet Set lastRow = ActiveSheet.UsedRange.Rows.count Columns("A:I").Select ActiveWorkbook.ActiveSheet.Sort.SortFields.Cl...

 
@Mat'sMug it's not true that it's broken code.
Dim foo As Boolean
Bar foo 'legit code <--
 
if a value is not assigned anywhere and that variable is used, ...certainly the code isn't doing that it should be doing, no?
right, assuming Sub Bar(ByRef foo As Boolean)
 
No way to possibly know. Perhaps that book should have been a constant, but...
*bool
 
wait, I'm not checking to see if it's assigned before it's used - I'm only checking to see if it's assigned/used at all!
if Bar receives ByRef foo and doesn't assign it, there's an inspection for that. Parameter can be ByVal - and then foo is still unassigned anywhere...
 
Out params will be problematic. Hard limitation I think.
 
9:12 PM
@RubberDuck but in that specific snippet, foo in Bar foo is picked up as an AmbiguousIdentifierContext under a VariableCallStmtContext - which the tree listener understands as a "usage" ;)
oh wait
yeah it is
 
9:29 PM
Dim foo As Integer

Sub DoFoo()
    'foo = 42
End Sub
> - "Variable value is never used"
> - "Variable is never assigned"
Dim foo As Integer

Sub DoFoo()
    foo = 42
End Sub
> - "Variable value is never used"
 
Hey guys
 
yo
 
Learning some OO stuff (finally) I think I just grasped the concept of a class object. Which is a bit of an epiphany for this poor DB-corrupted brain of mine
2
 
9:53 PM
@Phrancis what is an object?
 
From my understanding (so far) an object would be a self-contained program/function that can be instantiated by some other part of a program, and variables and stuff can be passed to it and returned from it
I feel sure there's a lot more to it :)
 
Not bad. =)
 
well done!
 
Something like this never made sense to me until just now... GallonToLiter gallonToLiter = new GallonToLiter();
 
Not much more really. Data goes in in one form, out in another.
 
9:57 PM
a class is like a blueprint of an object. an object has an interface, that interface is everything the class exposes as public
the class defines the members - those are fields, properties, methods, and other content.
 
Interface == where stuff goes in and out
 
fields are data, methods are actions on that data
fields don't belong as members of an object's interface, because they are implementation details - hence we encapsulate them in properties (getters/setters).
 
Let me digest that for a bit lol.
 
in other words, when you consume an instance of an object, you can only see what that object's interface wants you to see.
 
> Could this rely on the TypeHint Inspection? If a node raises a warning for type hint, ignore the type not declared? Not sure if that would be easier than "a real fix" or not. Just thinking out loud.
> Going to try to squeeze this into 1.2.
 
10:09 PM
@Duga nice!
 
> Most of this work is done in the UI Cleanup branch. Will try to complete for 1.2.
 
@Mat'sMug Is that kind of where public/private come in?
 
exactly
 
public class FooBar {
    public string foo;
    private string bar;
    ...
}
Meaning foo could be access from outside, but not bar?
 
Exactly.
 
10:13 PM
Hah. This is not too obscure after all!
 
Most of its very logical. Except the things that aren't. Even the things that aren't really are once you understand the logic though.
> To understand recursion, one must first understand recursion.
Yeah. The TestExplorer facelift is overdue. Looked pretty much the same yesterday as it did in Nov. github.com/retailcoder/Rubberduck/blob/…
 
I'd like to remove all that remains of the VBA approach
the whole Rubberduck.Reflection rubbish
 
So would I, but there's no denying the native VBIDE stuff is faster.
 
good point
 
10:44 PM
I just found a LINQ construct that reads better with query syntax!
            var byRefParams =
                from parameter in _parameters
                let byRef = ((VBParser.ArgContext) parameter.Context.Parent).BYREF()
                let byVal = ((VBParser.ArgContext) parameter.Context.Parent).BYVAL()
                where byRef != null || (byRef == null && byVal == null)
                select parameter;
 
10:54 PM
> Fixed a bunch of code inspection bugs, changed some severities; I still feel like the variable/parameter usage inspections aren't exactly right. let's document that.
 
ah damn! extract method is broken, it doesn't pick up the value parameter in the fizzbuzz code...
 
11:15 PM
> fixes #199 in a not quite satisfactory way. Selection, failed, and not run update gui at the cost of clearing all of the results form the previous run.
> GUI clears previous results
 
11:46 PM
> 14 minutes to fix that bug
            // bug: fizzbuzz 'value' is "only used in selection" - wrong! it's assigned in the For loop...
            var input = _parentMethodDeclarations.Where(kvp => kvp.Value == ExtractedDeclarationUsage.UsedBeforeSelection).ToList();
 
> VariableReferencesListener now treats For loop variable reference as a usage.
 
^^ sort-of fixed
 
> VariableReferencesListener now treats ForEach and With blocks as variable references, too
 
mkay did I forget anyone?
variable usage inspection is iffy when there's a field with the same name as a local, and then the local is assigned but not the field.
Private value As Integer

Sub DoSomethingElse(ByVal value As Integer)
    value = value
End Sub
^^ this should trigger a warning or something
(VBA happily compiles and proceeds with the no-op assignment)
 

« first day (261 days earlier)      last day (2919 days later) »