« first day (251 days earlier)      last day (2929 days later) » 

00:01
RELOAD!
[Cardshifter/Cardshifter] 13 commits. 1 opened issue. 1 closed issue. 6 issue comments.
[Cardshifter/cardshifter.github.io] 5 commits. 4 opened issues. 1 closed issue. 14 issue comments.
[retailcoder/Rubberduck] 14 commits. 10 opened issues. 6 closed issues. 17 issue comments.
[skiwi2/GithubHookSEChatService] 1 opened issue. 1 closed issue. 4 issue comments.
[Vogel612/JavaBot] 2 commits.
00:29
Need to code. Too sleepy... Zzzzz....
00:47
brewing
I might implement 3-4 inspections tonight. Take a night off, you earned it!
 
1 hour later…
01:55
0
Q: PowerShell within HTA

user4317867I've put some code together that helps me search an internal ticket system using an HTA application with some TextBoxes and some embedded VBScript that runs PowerShell scripts. The PowerShell scripts are hard coded to a certain directory and I was wondering if there's a better way to accomplish ...

 
1 hour later…
03:02
> Consider this declaration:

Public Const MyConstant = "foo"

Rubberduck will suggest to *explicitly* declare the constant as a `Variant`. But the parse tree *knows* the value assigned is a *string literal* - therefore Rubberduck should have enough information to declare it as a `String`.

Same here:

Dim foo
foo = 123

The parse tree *knows* the assigned value is a number. Rubberduck should declare as `Long`.

Dim bar
bar = #2015-05-15#

Date literal.
03:19
> This one started out as an innocent little static class for some IParseTree extension methods. It's now bloated with nested types - various VisualBasic6BaseListener implementations, that ought to be extrated into their own file and made public.
[retailcoder/Rubberduck] retailcoder opened issue [#198: Remove [ComVisible(false)] attributes sprinkled everywhere](github.com/retailcoder/Rubberduck/issues/198)
> The assembly itself is no longer COM-visible; these attributes can (should) be removed.
 
1 hour later…
04:31
> added ObsoleteInstructionsListener; will be used for both #34 (use of obsolete Call statement) and #129 (use of obsolete Let statement).
> Implemented inspections for obsolete Let and Call statements. todo: implement quickfixes.
04:45
> Repro:

1. Create failing test.

Assert.IsTrue False

2. Run All Tests /or Just the one test that is meant to fail.
3. Fix code so that it passes.

Assert.IsTrue True

4. Select `Failed Tests` from the run menu.

The test runs, as confirmed with a break point, but the Test Explorer continues to report failure. The same issue is present if running the "Selected Test" after failure. I've not tested the inverse. Run All Tests works fine.

Build: 1.1.5497.13430
 
1 hour later…
05:58
> Yes Please! Gets my vote. Hell, I'll implement it myself if I have to.
> Type hints are a relic from the dinosaurian ancestors of VBA. Kill with fire. Dim SomeInteger% Dim SomeLong& Dim SomeDecimal@ Dim SomeSingle! Dim SomeDouble# Dim SomeString$ Replace with explicit type declarations: Dim SomeInteger As Integer Dim SomeLong As Long Dim SomeDecimal As Decimal Dim SomeSingle As Single Dim SomeDouble As Double Dim SomeString As String
> removed illegal PLUS_EQ and MINUS_EQ operators from grammar.
> implemented quick-fixes; closes #34 and #129.
06:48
> With version 1.2, every code inspection we could think of (for now) are implemented. Time to document them all, and explain the reasoning behind each quick-fix.
> implemented OptionBaseInspection. closes #20.
 
7 hours later…
14:13
Next fun VBA project: Create a queue on top of arrays.
 
1 hour later…
15:15
@RubberDuck OptionBaseInspection can break original code - we'll need to rebase all arrays to not introduce errors by removing Option Base 1... I'm not sure I want that one in 1.2 just yet.
That's fine. Just defer it.
15:32
> Simply removing Option Base 1 can break the code if any implicitly-based array is declared. We need to think of a refactoring to address this before this issue can be closed. Deferring this feature to a future release.
> This should also include type hints in signatures:

Private Sub DoSomething(ByVal SomeString$)

Should turn into

Private Sub DoSomething(ByVal SomeString As String)
@RubberDuck would it break the code inspections configs if I added a member to CodeInspectionType? I'd like to add LanguageOpportunities and have ObsoleteCallStatementUsageInspection, ObsoleteLetStatementUsageInspection and ObsoleteCommentSyntaxInspection in there, as well as OptionBaseInspection and TypeHintUsageInspection
@Mat'sMug It will not so long as it's not marked with an attribute to be exported.
If it needs to be configurable, then obviously some changes need to be made.
nope - it's just to put them in proper buckets ;)
Worst case, it frak's someone's config file.
and that would make it self-recover right?
15:42
Yes. It should.
But it wouldn't even do that.
This is the only relevant Code if you modify the actual CodeInspection class.
private void EnableCodeInspections(Configuration config)
{
    foreach (var inspection in _inspections)
    {
        foreach (var setting in config.UserSettings.CodeInspectionSettings.CodeInspections)
        {
            if (inspection.Name == setting.Name)
            {
                inspection.Severity = setting.Severity;
            }
        }
    }
}
I never got around to cleaning these up with an interface due to the reflection.
I still think they should share an interface of some sort though.
The actual inspection would use IInspection in addition to some other interface. Then the reflection could look for that other interface.
IConfigurableInspection?
Maybe.
IConfigurableInspection : IInspection
15:44
Well... no.
Ignore the terrible name, but it would be more like.
`ICodeInspection : IInspection`
because the *real* inspection does things the configuration type doesn't need to know about.
ah, right
IInspection : IInspectionModel
That ^
15:48
> Add a button to the Code Inspections window and toolbar, to export all inspection results to a text file for sharing, and another to copy them to clipboard, in point-form, markdown-formatted text, for pasting onto a [Code Review Stack Exchange](http://www.codereview.stackexchange.com) (just an example) post/answer.

- [ ] Export to text file
- [ ] Copy to clipboard
@RubberDuck thoughts? ^^
BOO!
> This is doable. See [this conversation](http://chat.stackexchange.com/rooms/14929/conversation/extracting-common-interface-for-iinspection-and-codeinspection).

Long story short, both `CodeInspection` (the configuration class) and `IInspection` need to share an `IInspectionModel` interface.

IInspection : IInspectionModel
CodeInspection : IInspectionModel
@Mat'sMug I like it. Good idea.
<Meeting>
15:56
oh, fun
Hmm this is actually not too ugly for Access SQL...
SELECT DISTINCT
  '01-Jan' AS [Month]
, (
    SELECT SUM(Contract_Count13)
    FROM Entry_Type_Raw_Data
    WHERE Program_Name4 LIKE 'Carrier*'
    AND Creation_Date_Month3 = 'January'
    AND Sale_Type1 = 'Dealer Sale'
  ) / (
    SELECT SUM(Contract_Count)
    FROM Top5_Raw_Data
    WHERE Program_Name LIKE 'Carrier*'
    AND Creation_Date_Month = 'January'
  ) AS [% Carrier USA&CAN]

FROM Entry_Type_Raw_Data
  INNER JOIN Top5_Raw_Data
  ON Entry_Type_Raw_Data.Program_Name4 = Top5_Raw_Data.Program_Name
Hey Simon just made 0.5 official release of Cardshifter, in case you guys would like to try it :)
nice! congrats @TeamCardshifter!
2
@Mat'sMug thank you thank you
16:32
@SimonAndréForsberg saw that?
44 mins ago, by Duga
> Add a button to the Code Inspections window and toolbar, to export all inspection results to a text file for sharing, and another to copy them to clipboard, in point-form, markdown-formatted text, for pasting onto a [Code Review Stack Exchange](http://www.codereview.stackexchange.com) (just an example) post/answer.

- [ ] Export to text file
- [ ] Copy to clipboard
#it's-a-start
nope, didn't see that
nice
1. Copy OP's code into the VBE
2. Run Rubberduck Code Inspections
3. Copy results
4. Paste into CR answer
@Mat'sMug LOL
</Meeting>
@Mat'sMug Lazy reviewing. I like it. Frees me up to shred review more important issues with code.
Nice question
1
Q: `Is` operator does not return true for two range variables that point to the same cell

dimitrisI have a custom class named imera in which I include a range property nameddate_cell`. When creating a collection of imera's, every imera's date_cell is set to reference to a specific cell in excel. While attempting to search within the collection by date_cell: Option Explicit Public imeraCol ...

17:19
That silent moment of satisfaction when you get to show your boss they made an error calculating their stats by hand, and that your SQL formulas do a much more reliable job of calculating stats ;D
Very nice @Phrancis! Grats!
17:35
0
A: How would I go back to a certain line Visual Basic 2013?

Mat's MugDon't. You've already implemented way too much functionality in that click handler, stop right there! Extract Methods You need to refactor a little bit here - extract a method for this part: TextBox2.Show() TextBox2.Text = ("Completed without any faults : If error occurs resort to readme i...

^^ poor soul
> My Rubberduck version is1.1.5497.13430. I think it is the latest downloadable. I send you a screenshot (there are 5 issues, all for typed constants recognized as implicitly Variant). My environment: Windows 7 Home Premium 64-bit MS Access 97 I wait for the 1.2 version. Thank you for your reply. Il 11/02/2015 18:24, Mathieu Guindon ha scritto: > > I cannot reproduce this behavior with build 1.1.5457.13537. However this: > > |Public Const qdfCodCatasto = "vbCodCatasto" > | > > Doesn't yield...
any inspection result, when it should. > |VariableTypeNotDeclaredInspection| works as intended in the current > master > <https://github.com/retailcoder/Rubberduck/blob/master/RetailCoder.VBE/Inspectio‌​ns/VariableTypeNotDeclaredInspection.cs> > - this issue is considered as fixed now, stay tuned for release of > version 1.2 <https://github.com/retailcoder/Rubberduck/milestones>, > scheduled for the end of the month: all code inspections of v1.1 have > been reimplemented, and several new ones...
are coming. > > See opened |[code-inspection]| issues under the Version 1.2 > milestone > <https://github.com/retailcoder/Rubberduck/issues?q=is%3Aopen+milestone%3A%22Ver‌​sion+1.2%22> > to follow progress. > > --- > Reply to this email directly or view it on GitHub > <https://github.com/retailcoder/Rubberduck/issues/194#issuecomment-73923356>. >
@RubberDuck MS Access 97!! ^^^
> :+1 Awesome! Thanks for your feedback - we haven't tested anything with Office 97, feel free to report more issues after upgrading to v1.2, thanks for your feedback!
@Mat'sMug @RubberDuck Gaze at the horror of Access SQL. 1000 LOC for something that would only be a dozen or two in any "real" SQL engine ;D
@Phrancis see the Rubberduck user there? He's using Access 97 - you're lucky enough to use the latest version at least! :p
17:48
I guess 2007 is not that bad
Poor soul... 97 was bad. Binary all the things Microsoft did. Oh, and DLL hell was a very real thing. The bad ol' days it 'twas.
but VBA was thriving! and Visual Basic 6.0 was the most popular programming language in the world!
glad to see our ducky works with Office 97
@Mat'sMug Me too!
I figured it would, but had no way to test.
@RubberDuck the Unit Testing issues, good for v1.3?
(i.e. killing TestEngine)
@Mat'sMug Yeah. Makes sense to clean up while we're making changes.
Hopefully I'm done with this project today and I can get back to duck.
Just been drained at the EoD.
18:02
hell, cleaning up the unit testing just might fix every undocumented feature there is with it
And introduce a few more =;)-
But don't forget, we don't have bugs. We have undocumented features.
> We have no bugs. Use this tag to indicate you've found an undocumented feature with side-effects.
I also really like this.
> [discussion] - Use this tag when you need a rubberduck to talk to.
> I like this API, but it introduces some difficulties. As currently defined, none of the classes have default constructors. COM exposure requires default constructors, and things normally passed into a constructor are set via properties. I think I'll introduce a layer of abstraction in between the classes we'll use internally and the ones that get exposed to COM Interop. Only trouble with that is naming becomes a problem. The naming issue may be able to be overcome by using ProgId...
attributes though.
@Duga @Mat'sMug speaking of Rubberducking....
@Phrancis Nice!
Glad I could offer something constructive to the project.
Looking forward to trying it later.
> Note: not applicable to array and ParamArray parameters.
@RubberDuck bazola should have his server up later today, I probably will be on this evening so just ping me in chat if you want to play
18:27
Oh! Cool.
Maybe. I really need to get some work done on Rubberduck too. Mat's been towing the line while I've been..... well, actually working for a change.
18:53
lol
I think I've opened 2 new issues for every issue I've closed....
Issues == typeOf(Hydra)
19:36
Looks like I'm down to the weird little bugs that drive a person crazy...
20:14
0
A: VBA function IFERROR THEN GO TO LINE X

Mat's MugIFERROR is an Excel function. You don't use that to handle VBA runtime errors. What you need is an On Error GoTo statement, and a control flow that goes something like this: Public Sub Foo() On Error GoTo ErrHandler Dim result As String TryGetResult: result = GetResult(ActiveCell....

^^ reviewing OP's code... couldn't help it
> I suggest default-sorting by Project, then Module and then by Priority. User should be able to simply click a column header to sort by priority regardless of project/module.
> Consider a function: Public Function Foo(ByVal bar As String) As Integer Foo = 42 End Function Then a function call: Foo "bar" Either the function has side-effects and should be a procedure, or not using the returned value is a programming error. Rubberduck should warn about the function's return value not being used; formal definition would be something like "a function call that isn't on the right-hand side of a local variable assignment". Possible quick-fix: - [ ] Introduce...
variable: this introduces a local declaration on the line immediately above the function call, and an assignment of that variable with the function call on the right-hand side of the = operator.
20:54
updated #196:
> - [ ] Number literals: either `Long` or `Double` (if value has decimals)
- [ ] String literals: `String`
- [ ] Date literals: `Date`
- [ ] Assigned value is `Set`: `Object` is still vague, but better than a `Variant`.
- [ ] Right-hand side of the assignment is a native function call. Use the [hard-coded] return type of that known native function. e.g. `CInt` function will always return an `Integer`; `MsgBox` calls return a `Long`, etc.
- [ ] Right-hand side of the assignment is a function defined in the active VBProject. Use the function's return type to determine the type of the assigne
> Otherwise, give up and leave as a Variant
=)
Speaking of giving up.....
sql = "SELECT STORENUM, STORENUM AS STORE " & _
      "FROM table ORDER BY STORENUM"

'Yeah, I know I selected store num twice, but combobox autocompletes don't work unless you do.
sounds reasonable
Nope... that doesn't do it either. SOB....
Cast it to text maybe... after a smoke.
> This should only be a "hint" (i.e. not a "warning" or a "suggestion") - even if a variable is explicitly declared as a Variant, there's probably a better type that can be used for it. Rubberduck should hint at that.
21:10
Yup. Has to be a gd string....
Jan 20 at 19:29, by RubberDuck
God I hate Access.
hmm
0
Q: VBA code certification

Apttus X-AuthorI am looking for a third party company similar to Veracode who can provide VBA code certification. Basically my server needs to process Excel files and some of them might have macro code and I want to make sure Macro enabled files are safe to use in my server environment. My plan is to ask my cus...

21:26
VTC'd ^. Looking for a resource.
21:48
Needs some filters and an export button.....
21:59
@Mat'sMug I just deleted about 30 emails from the repo. If you needed feedback on anything, but ping me here with a link. Otherwise, I'll look later.
Gonna finally sit back down tonight and work on it now that this other project is working (mostly)
hey no problem man, you did most of January's work!
There are exactly 4,472,891 ways of implementing this. What's your code looking like? — Mat's Mug 6 secs ago
22:41
That got an upvote and a star. =)

« first day (251 days earlier)      last day (2929 days later) »