« first day (742 days earlier)      last day (3293 days later) » 
00:00 - 08:0008:00 - 00:00

12:00 AM
There are 1361 unanswered questions
@larsks: Code Review is explicitly not for questions about "higher-level architecture and design of software systems", which I believe this question is about. — Qantas 94 Heavy 2 mins ago
 
@Duga there's hope for humanity after all
 
@Mat'sMug give him an upvote!
 
Done :)
 
Case closed. Good mug :)
 
Hosch is hyperactive on RD, seen the summary?
 
12:07 AM
@Mat'sMug I saw that.
 
@Mat'sMug I saw that summary yes. Were all of that @Hosch250?
in TCG Creation, 9 mins ago, by Duga
[retailcoder/Rubberduck] 19 commits. 3 issue comments.
 
Most I believe. He's certainly outpacing me. =)
 
me too (especially on RubberDuck activity :P)
I hope to make some Groovy commits tomorrow
 
Well, you see, I commit a lot so I have backups.
I get it working on sample data, and commit.
Then, I get it working on the real data, and commit.
Then, I start fixing bugs, and commit every few bugs.
So, lots of commits.
 
I also tend to do lots of commits
I also tend to sleep a lot, which I plan to do now.
 
12:17 AM
Lol, I guess we are alike.
 
The sooner I go to bed, the sooner I wake up and the sooner I can start coding!
7
TTGTB :)
 
Yeah, only I go to bed late, and get up late.
Good night!
 
2 a.m. here so it is already late ;)
night
 
Whoa, night!
 
12:42 AM
0
Q: Adding SecureString support to Lib2GitSharp

RubberDuckA library that I use doesn't support SecureString in its credentials for connecting to GitHub, so I'm submitting a pull request to add it. I know it's not idea to pull the actual string out, but the idea here is to minimize the amount of time the string is in memory. Also, allowing client code to...

 
@CaptainObvious, if there are any gurus around, I'd appreciate the sanity check.
 
1:11 AM
hey guys, has anyone worked with git before? If yes, is anyone willing to help me out by importing the project to see if it can be build properly?
I am having weird issue after I imported the project as a maven after cloning the git repositories. All the package structure is messed up. All other maven projects I am able to build fine only this open source project is having issues in terms of structure
 
1:24 AM
I've done Git, but I'm a bit busy right now, and I don't know Maven at all.
Hope you figure it out!
 
yeah scratching my head since morning, trying all the stuffs what I read over the internet
 
Did you clone the project?
 
yes I did cloned it through SmartGit
and then imported as a maven project in eclipse
 
I've worked with Git, but not eclipse or maven.
 
I cannot paste the image here otherwise you would have get the idea what I am talking about in terms of project structure
 
1:27 AM
But, when in doubt, I've found that deleting the local copy and getting a fresh clone helps sometimes.
 
yeah I did that too as well.
I also have opened a SO post as well but nothing got so far on that. stackoverflow.com/questions/30268689/…
Now you will be getting idea what I am talking about in terms of package structure messed up.
 
Does eclipse have any Git integration? Like, can you clone the project directly from eclipse?
 
yeah there is, I have not tried that option yet. I always use SmartGit to clonee it and then import it as maven project and it worked fine always.
I can try out directly importing from eclipse to see whether that helps or not.
 
It might? Idk.
Don't know much about Java.
 
let me try that out
I still see same error
 
1:44 AM
I just love today's xkcd.
 
How'd you break it?
Oh. Love. Damn. Must be tired.
 
@EthanBierlein According to that 8 ball, I'm going to die by cake and roses.
 
0
Q: jQuery selector function in JavaScript

CyzanfarI've reproduced the jQuery selector function in JavaScript: Here are the two rules that come with this function: I.You may not use any JavaScript libraries II. document.querySelector/document.querySelectorAll may not be used var $ = function (selector) { var elements = []; // get starting i...

 
@SirPython According to the 8 ball, I'm going to die at the hands of the spawn of satan, er, santa.
 
And I can't flag as off-topic.... There's no option to go to code review... Anyways, Stack Overflow is the place to diagnose and solve real issues for your code. If you want feedback from fellow programmers on your code that is functional, you are better off at codereview.stackexchange.com. — Zizouz212 36 secs ago
 
2:33 AM
Well, I've just learned that I made a B in operating systems, one of the hardest classes taught at this school.
 
@Jamal Is that good?
Congratulations, if so, condolences otherwise.
 
Oh no, that's excellent. :-) I was expecting a C or a D.
 
Congrats!
 
Thanks!
 
So, you are graduated now?
 
2:44 AM
Officially, I won't know until the 27th. Commencement does not at all indicate graduation.
 
OK.
 
Though, at this point, I absolutely do not see any reason to think that it won't be happening. Still, the dean will be making that decision.
 
Good luck!
 
Now I just have to wait. :-)
 
Just don't make the dean mad :)
So, I suppose you'll be interviewing now?
 
2:48 AM
I won't. I don't plan on dancing across the stage tomorrow. That's high school crap. :P
2
 
I didn't do that when I graduated.
 
I'll be sending out resumes first. As for interviewing, I'll really need to see how that goes. I have no practice with that at all.
 
I finished my Calc book just days before I graduated, and that is about when I started programming - two years ago +- a few weeks.
And, I've never interviewed either, so no I can't help there.
I need to get an email off to the MS recruiter for a potential internship next summer.
 
@Veedrac Thanks Captain Obvious! — blanco cayo 2 days ago
@mjolka you here?
congrats @Jamal :)
 
Thanks!
 
3:17 AM
0
Q: Lemonade Game Java

joanbI am writing the lemonade stand game in java but I am having a bit of trouble trying to figure out the perfect recipe I have most of the code done. except the math logic seems a little off. Please let me know if I can improve the code I would really appreciate it. I've been stuck in this part for...

 
@Mat'sMug hello :)
 
XKCD what-if is a dangerous time-waster
21 hours ago, by mjolka
@Mat'sMug re that question, i think we need to talk about async some time. i'm not 100% on things so i won't post an answer, but hit me up when you want to chat
 
yup yup
so let's look at OnRefreshCodeInspections
only invoked on the UI thread, right?
 
right
 
ok, so why not make it async void? then you can write await RefreshAsync(); Control.SetIssuesStatus(_results.Count, true);
 
3:22 AM
hmm
instead of Task.Run(() => ...)
 
right
private async void OnRefreshCodeInspections(object sender, EventArgs e)
{
    await RefreshAsync();
    Control.SetIssuesStatus(_results.Count, true);
}
 
and async void is only good because that's an event handler right?
 
yep
 
now, first thing it does:
        Control.Invoke((MethodInvoker) delegate
        {
            Control.EnableRefresh(false);
            Control.Cursor = Cursors.WaitCursor;
        });
Nobel prize
moved to handler
 
yeah it would be really nice to be able to remove all calls to Control.Invoke
 
3:27 AM
and removed the finally block
        private async void OnRefreshCodeInspections(object sender, EventArgs e)
        {
            Control.EnableRefresh(false);
            Control.Cursor = Cursors.WaitCursor;

            await RefreshAsync();

            Control.Cursor = Cursors.Default;
            Control.SetIssuesStatus(_issues, true);
            Control.EnableRefresh();
        }
 
i'm not sure how to go about that, though
i would probably keep the finally block
 
actually..
        private async void OnRefreshCodeInspections(object sender, EventArgs e)
        {
            Control.EnableRefresh(false);
            Control.Cursor = Cursors.WaitCursor;

            await RefreshAsync();

            Control.SetContent(_results.Select(item => new CodeInspectionResultGridViewItem(item))
                                        .OrderBy(item => item.Component)
                                        .ThenBy(item => item.Line));

            Control.Cursor = Cursors.Default;
and voilà
I'm just adding a null-check and setting _results to null in the catch block
actually, no
            try
            {
                if (VBE != null)
                {
                    if (_parseResults == null || _needsResync)
                    {
                        _inspector.Parse(VBE, this);
                        return;
                    }

                    var parseResults = _parseResults.SingleOrDefault(p => p.Project == VBE.ActiveVBProject);
                    if (parseResults == null || _needsResync)
                    {
                        _inspector.Parse(VBE, this);
now, one problem I have, is that this method gets called more often than I thought it would
and actually, I'm seriously questioning if there's any gain in sharing parse results between features.
it's causing serious issues
e.g. code inspections are running - bring up the Code Explorer; code inspections restart... and "freeze"
 
yeah i'm still not sure how to deal with that
 
well they don't actually freeze, they just remain in "reporting 'inspecting...' status" without doing any real work
easiest is to remove the parser handlers and get the results from the parser instead of from its events
having parseresults-per-feature means unsync'd results between toolwindows
and it's pretty much the best UX I can get I think
 
i feel like the code is more complicated than it could be, because you can't guarantee that the event handlers are being invoked on the UI thread
which i think ties in to the problem of trying to share parse results
 
3:39 AM
should the parser synchronize them?
 
synchronize what?
 
isn't there a way to have the parser only ever raise its events on the UI thread?
nah, I didn't ask that
scratch that
 
i'll keep having a think about it, off to have lunch
 
parser should just be concerned about being thread-safe
later!
 
Man, I wish I knew more about language design. I have so many ideas...
 
3:49 AM
you know BNF notation?
 
Nope.
 
Is this it?
In computer science, BNF (Backus Normal Form or Backus–Naur Form) is one of the two main notation techniques for context-free grammars, often used to describe the syntax of languages used in computing, such as computer programming languages, document formats, instruction sets and communication protocols; the other main technique for writing context-free grammars is the van Wijngaarden form. They are applied wherever exact descriptions of languages are needed: for instance, in official language specifications, in manuals, and in textbooks on programming language theory. Many extensions and variants...
 
yes
if you can define your language's grammar in that notation, you have a nice start :)
Is this answer wrong or just underexposed? (it's Friday night afterall)
0
A: Adding SecureString support to Lib2GitSharp

Mat's MugI don't see a problem with how the SecureString objects are handled - seems pretty solid to me, but I've never used those so I'm possibly missing something that someone else could point out here. Sealed Class I haven't looked at the actual project's source code, but general design guidelines ...

 
I could probably learn a lot of things if I didn't spend so much time playing Kerbal Space Program...
 
3:56 AM
0
Q: JMH Benchmark Metrics Evaluation

Eddie BI'm currently attempting to learn some basic JVM optimization techniques using JMH. As the documentation states Your benchmarks should be peer-reviewed and, I'm not quite sure how to validate the results, I'm asking for a review of the following implementation to determine whether my workflow is...

 
lol
 
Looks underexposed to me.
 
:)
 
4:12 AM
Monking!
 
Monking!
 
I'm afraid to ask, but what does "monking" mean?
 
On phone otherwise i'd link. Mug?
 
19
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Meme: Monking Originator: Morwenn Cultural Height: The 2nd Monitor Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking Examples: A small chat search Variations: Monkernoon, Monkevening, Monknight, ... Important is only that it begins with Monk... ;...

 
That one i think has stuck the best
Along with starring "lol"
4
 
4:21 AM
and Jamalized
 
Anyone interested to check out a good rock band, just saw Phosphene tonight out of Chicago. Got to help them set up gear, and chat with them after the show. Really cool and talented group
 
Any VBE devs here?
I need a VBA event to test my code against.
Also, a Property Get/Let/Set.
 
Was really impressed that a band who opened for Lacuna Coil in a 10K people venue stopped on their tour to play a very small local venue in Indiana
 
@Hosch250 <~ click here
 
Lol.
OK, thanks.
 
4:28 AM
actually...
 
I found a Get/Set on SO.
I feel like upvoting just because it was there.
 
Public Event Foobar(ByVal arg1 As Integer, ByVal arg2 As String)
 
Thanks.
 
@Hosch250 I upvote questions and answers on SO all the time crom Google, if thy helped me
Thy?
 
@Mat'sMug Now, how would I call that event?
 
4:31 AM
Thou shalt vote on SO posts where the post hath helpeth thy problem.
 
Like, this doesn't work:
 
Goodbye.
 
11th commandment
 
Bye.
 
@Hosch250 RaiseEvent Foobar(42, "Monking!")
 
4:32 AM
OK, thanks.
 
the handlers need to be addressed, too
 
Success reported.
 
say the event is declared in Class1
 
OK, then I need a handler.
 
and Class2 needs to handle Class1's event
so Class2 will have a Private WithEvents abc As Class1 field
 
4:34 AM
And?
 
and given abc is the name of the field, and Foobar is the name of the event
 
Public Event Foo(ByVal arg2 As String, ByVal arg1 As Integer)

Public Sub Goo()
    Dim test1 As Integer
    test1 = 3

    Dim test2 As String
    test2 = "rest"

    RaiseEvent Foo("Hi!", 42)
    RaiseEvent Foo(test2, test1)
End Sub
So, it did that for me.
 
the handler will be Private Sub abc_Foobar(ByVal arg1 As Integer, ByVal arg2 As String)
see?
 
In a different file?
Sort of.
 
yes
 
4:35 AM
I know C# handlers.
 
the thing is, the handlers aren't picked up as references of the event declaration
only the RaiseEvent call is
 
So, how do I specify the classes?
 
what do you mean, specify?
 
Create then.
Like, do I have to create the class to put stuff in?
 
@Hosch250 With caution.
 
4:38 AM
yes, I'm pretty sure only a class can handle events.
 
I have a Class object/file/whatever.
Is there any code I need to do other than that?
 
notice the two dropdowns in the code pane window?
 
Yeah.
It picked the class up.
 
if you've declared a WithEvents instance field, you should see that field name in the left-hand dropdown
 
4:41 AM
exactly
 
Only thing is, Class1 doesn't compile.
It crashes on the first line.
It says it doesn't source automation events.
 
wait no
declare the event in Class1, and subscribe to it in Sheet1
 
So now it says event not found at the first Raise
 
only the class that declares the event is allowed raising it
 
I'm saving all this in a file for future use.
 
4:44 AM
basically you had it all reversed
or, well you had it ok, except WithEvents abc As Class1 should be As Sheet1 but I'm not sure that's legal
 
This works:
 
ok now in Sheet1 select abc from the dropdown
 
And changing that to Sheet1 gives the automation error now.
What dropdown?
 
the left one
 
Oh, got it.
 
4:46 AM
that is your event handler
 
You guys are VBEing at the speed of light
 
Excel crashed.
 
It does that.
 
lol
 
I'm using a beta version too.
 
4:47 AM
better play it safe and not involve worksheets here
 
Crashing Excel is astoundingly easy even through the GUI
 
I have no worksheets.
 
Sheet1 is a worksheet...
I'd say create 2 class modules, Class1 and Class2. Class1 defines the event (and optionally raises it), and Class2 declares a WithEvents instance of Class2 (and handles the event)
 
So. I could (1) finish a song, (2) write documentation, (3) watch the final episode of Top Gear, or (4) go to bed. Any suggestions?
 
4:52 AM
On any other given day, sure. But ears are ringing really bad and.. it's Friday night
 
just a suggestion ;)
 
OK, back to where we had it.
Private WithEvents abc As Class1


Private Sub abc_Foo(ByVal arg1 As Integer, ByVal arg2 As String)

End Sub
That is Class2.
Public Event Foo(ByVal arg1 As Integer, ByVal arg2 As String)


Private Sub abc_Foo(ByVal arg1 As Integer, ByVal arg2 As String)

    Dim test1 As Integer
    test1 = 3

    Dim test2 As String
    test2 = "test"

    RaiseEvent Foo("Hi!", 4)
    RaiseEvent Foo(test1, test2)

End Sub
 
looks good
 
And Class1.
So, that's it?
 
although abc_Foo in class1 is confusing, it looks like a handler but it's not
just make it a parameterless Sub DoSomething() that makes the RaiseEvent calls
 
4:55 AM
Whoops.
Public Event Foo(ByVal arg1 As Integer, ByVal arg2 As String)

Private Sub Bar()

    Dim test1 As Integer
    test1 = 3

    Dim test2 As String
    test2 = "test"

    RaiseEvent Foo("Hi!", 4)
    RaiseEvent Foo(test1, test2)

End Sub
 
ok
now save that workbook and keep it handy ;)
the RaiseEvent Foo("Hi!", 4) line should be RaiseEvent Foo(4, "Hi!")
 
Yeah, caught that already.
Now, you were right.
 
about what?
the handler not being picked up?
 
It works on the Raises and the event itself, but not the handlers.
 
4:59 AM
So, more fun stuff ahead.
Midnight here, don't want to mess anything up...
 
still got R# running?
 
But, can't get ready for bed either.
I have it installed, but disabled.
 
Ctrl+T, "declarations" ...nevermind
find the Declarations class
 
Which one?
The _declarations one?
 
there's only one Declarations class
Declarations
the type
 
5:00 AM
Oh, OK.
Declarations.cs?
 
yes
public IEnumerable<Declaration> FindEventProcedures(Declaration withEventsDeclaration)
^^ this is what you want to call
 
OK.
 
that will give you all the event handler procedures, given a WithEvents declaration
 
OK.
 
and you already know how to handle reordering parameters for a Sub declaration ;)
 
5:03 AM
Is there a way to sort of stick a "bookmark" on a line of code?
Yup.
This is getting close to being done, I think.
 
Ctrl+K,Ctrl+K
 
Cool, thanks.
 
yeah, well.. there's interface implementations then
 
Like?
Oh, Ctrl+K, Ctrl+W opens a Bookmarks Pane.
 
Class1 has a DoSomething method right?
 
5:06 AM
It has a Bar() method.
 
or Bar()
whatever
 
There are properties too.
The get/set/let.
 
add a Class3 and stick a DoSomething(foo, bar) in there
just the signature, no need for a body
 
Just like that?
 
then put Implements Class3 in Class2
 
5:07 AM
Can this wait until the events are done?
 
sure
 
My brain is slowing down.
 
just saying, it's the next challenging thing
lol
 
OK.
 
mine too
good news is, the Declarations class has all the methods you need to find interface methods and their implementations
 
5:09 AM
Great.
So, after reading all this test VBA code, I might pick up enough to put it on my resume :)
 
@Mat'sMug Can I go now? ;)
 
After I get it working for everything, I need to let the user click in any child context and choose reorder, and figure out what to reorder, instead of just the name of the thing to be reordered (like in the signature on a variable).
 
@Phrancis nice!
 
And, drag/drop would be nice.
 
Afternoon
 
5:13 AM
hi @Quill!
 
@Quill In the wee-est of the wee hours of the morning :)
Just 13 minutes into the day.
 
1:13AM here
 
3:13pm here
 
I don't know how you guys stay up so late.
I'm exhausted, and I get up hours later than you too.
 
it's not how late I stay up, it's how early I manage to get up!
 
5:14 AM
Yeah.
One of my sisters seems to get along on just 6-7 hours of sleep.
If I get just 9 or so regularly, I get less done in the day at worse quality than if I got up an hour later.
Hi, @Quill
 
@Mat'sMug Why thank you, though there are probably bigger problems I don't see
 
All the Australians are coming in.
 
I think it's getting comfortably past lunch time in Australia, actually
 
@Hosch250 that's a sign Canadians should be asleep right?
 
I guess (and Americans).
 
5:18 AM
^me. 01:18 here
But hey, it's Friday night Saturday morning!
 
Yeah, Friday!
I'm out of school now too, so I can actually take a break.
 
@Hosch250 You must be on the other side of those fly-over states
 
But I won't - Rubberduck is calling me :)
Well, Saturday :)
Nah, 12:19 here.
 
Ah ok, Central time
 
Yeah.
@Mat'sMug You know how you have Find All References?
It would be nice to have a Go To Definition too.
 
5:22 AM
what about it?
Shift+F2
 
Oh, already built in?
 
yeah
 
OK.
 
what's missing is Go To Implementation on interface methods though
 
I guess I don't know the VBE...
 
5:23 AM
and yet you've just implemented 80% of a crazy ass refactoring for it
 
Refactoring for what?
 
lol
"reorder parameters" is a refactoring...
 
Yeah, I know.
You mean, refactoring a definition we can't get to?
 
huh?
 
I still don't get what "it" is.
Oh, the VBE.
OK, I'm next in line to get ready for bed.
See you.
 
5:27 AM
later!
 
So...
Maybe I'll go watch Top Gear for a bit now, then GTB :)
I'll say one thing real quick:
> Please clarify your specific problem or add additional details to highlight exactly what you need.
(VTC as unclear default response)
I think "specific problem" should be replaced with some better wording, since CR is not really about "specific problems"
Should I post something on meta?
Or has this already been addressed?
 
5:43 AM
@mjolka talk about simplified!
        private async Task RefreshAsync()
        {
            try
            {
                var projectParseResult = await _inspector.Parse(VBE.ActiveVBProject, this);
                _results = await _inspector.FindIssuesAsync(projectParseResult);
            }
            catch (COMException)
            {
                // burp
            }
        }
now all I'm missing is the cancellation mechanism
 
5:56 AM
Are you having a specific problem or error? Otherwise, if you're just looking for feedback on your (working) code you should ask on Code Review rather than StackOverflow. — hopper 52 secs ago
 
@Duga We're getting there!
I'm still here...
in TCG Creation, 2 days ago, by rolfl
stack is crack.
o.o
TTRGTB
 
6:20 AM
now all I'm missing is a cancel button :)
 
6:31 AM
@RubberDuck: good issue! Will you work on it yourself?
My occupation yesterday
professional photographer with my cheap phone
 
4
Q: Adding SecureString support to Lib2GitSharp

RubberDuckA library that I use doesn't support SecureString in its credentials for connecting to GitHub, so I'm submitting a pull request to add it. I know it's not ideal to pull the actual string out, but the idea here is to minimize the amount of time the string is in memory. Also, allowing client code t...

that issue?
 
oh
lol
WBTTGTB
 
 
1 hour later…
7:56 AM
Monking
 
I wonder if you couldn't vastly improve the js rendering time. Re-using the Float32 buffer and the imageData is one way, but more generally it could be interesting to post a stripped down version of your code on codereview to get advices on optimisations. — GameAlchemist 7 secs ago
 
00:00 - 08:0008:00 - 00:00

« first day (742 days earlier)      last day (3293 days later) »