« first day (727 days earlier)      last day (3291 days later) » 

2:00 AM
Yeah, maybe I should "worry" about that.
 
It is like when you are low, they are making you prove yourself.
 
CR has just been so awesome. I like encouraging the community, promoting awesomeness.
23
Only way I really have to do that is with bounties, I thought.
 
@Legato great! we needed a new pinned message on the side bar :)
 
Yeah, you can promote more awesomeness with more rep and the accompanying moderation tools too.
@Legato You earned the pin :)
Hi, @bazola!
Changed your avatar, I see?
Bah, EIOU in scrabble, and only one I and U, 2 E's, and 3 O's.
Good luck this play :(
 
But yeah, I suppose I don't have too much to be handing it out like crazy. Thanks guys. I actually really wanted to go back to some great answers I got that I didn't think got enough credit and award them. @Hosch250 How far are you from the Mug?
 
2:03 AM
OUI works in French
 
32.4K to 6.7K.
 
?
 
He has a time advantage, though.
 
5 more answers and I'll have posted 500
 
Oooh.
 
2:04 AM
I posted first last October, I believe, then backed off until after school ended.
I hope to be really active here once I get my app released again.
 
I slowed down a lot since last July, when I started my new job
 
Congrats on not-really-new-anymore job.
 
But, I should probably get it ready for Win10...
 
thanks! ..although not so new anymore ;)
lol
 
And, I want to write an app that involves a more complex UI, more complex data structures, and an AI.
And, I want to add quizzes to my current app...
And, I need to recharge for the next two semesters...
 
2:06 AM
Woah, sounds fun. Good luck Hosch. I may start writing my first app too. Though I don't know how much time I'll have given my Summer job.
Discovered this today, think it's neat: codecombat.com
 
Yeah, I have to get everything I start done this summer because next summer I have an internship (hopefully at MS), and the next, a real job (and I can get away from the new keyboard).
 
@Hosch250 UI+data structures+AI? try this:
22
A: Weekend-Challenge Reboot

Mat's MugThe Ultimate Tic-Tac-Toetm Tic-Tac-Toe is boring. Let's code The Ultimate Tic-Tac-Toe, a whole different story. Uh, what? Each turn, you mark one of the small squares. When you get three in a row on a small board, you’ve won that board. To win the game, you need to win three smal...

that one was very fun!
(and it's fun to play too, even on paper)
^^ all-XAML
 
Yeah, It seemed like the most fun one, I started with plain tic tac toe, but didn't get the logic to decide the winner down.
That's awesome @Mat'sMug :D
 
the best thing about these challenges, is when you take them as an opportunity to learn something
 
That's exactly why I want to do them. ;D
 
2:13 AM
Sure.
 
Simon Says was fun, too. I learned about XAML animations doing that... and made a circular window.
 
So much awesome.
 
:)
the headache it was...
 
Hmm, I tied in a Scrabble, but I still had letters I could play.
Is it supposed to finish as soon as one person uses all their letters?
 
what word did you come up with, with all your vowels?
 
2:15 AM
That is a different game.
I haven't played that word yet.
 
Perhaps we ought to compile these in a separate thread (history of community challenges)?
 
well, everything is in the meta-tag
hey, thanks @Santa!
 
[metatag-bother:how-do-I-create-a-meta-tag?]
 
[meta-tag:name]
 
I tried that.
 
2:20 AM
^^ links to meta
 
not "metatag", "meta-tag"
 
I forgot to change it back.
It must not have like the "?"
 
0
Q: Simulating an River Ecosystem

user2689931I'm currently working my way through a textbook to enhance my beginner python skills (Goodrich, Data Structures and Algorithms in Python). The first somewhat in depth problem involving OOP was the following: "Write a Python program to simulate an ecosystem containing bears and fish. The ecosyste...

 
punctuation isn't allowed in tag syntax. only hyphens
@CaptainObvious reminds me of some Ocean Simulation post in JAVA.. but better - these animals fight each other!
 
2:24 AM
I played "ICE" with a double letter on the I and E for 8 points.
I'm being killed.
E: 1, O: 4, P: 1, U: 1 :(
This keeps happening when I play this person :(
 
> Refuctoring The process of taking a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anyone except yourself.
 
Delete worthy? Looks OK worthy?
> Dont see any I/O exception handling or argument null checking.
@Mat'sMug Usually the opposite of, but not mutually exclusive with, refactoring?
 
> sigh . . ...... :< – Jimmy Mar 1 '10 at 6:30
 
@Mat'sMug Scrabble is very arbitrary when it comes to playing in non-English languages ;)
 
2:42 AM
hey, I think I got something that's much cleaner than it was... if it works:
        private Declaration Resolve(VBAParser.ICS_S_MembersCallContext context)
        {
            if (context == null)
            {
                return null;
            }

            var members = context.iCS_S_MemberCall();
            for (var index = 0; index < members.Count; index++)
            {
                var member = members[index];
                if (index < members.Count - 1)
                {
                    var parent = Resolve(member.iCS_S_ProcedureOrArrayCall())
 
Q: "Whats the object-oriented way to become wealthy?"

A: Multiple inheritance
5
Sounds like you, @Mat'sMug:
A guy is standing on the corner of the street smoking one cigarette after another. A lady walking by notices him and says
"Hey, don't you know that those things can kill you? I mean, didn't you see the giant warning on the box?!"
"That's OK" says the guy, puffing casually "I'm a computer programmer"
"So? What's that got to do with anything?"
"We don't care about warnings. We only care about errors."
And every other smoker in this room.
 
lol
 
@Mat'sMug Not a fan of the iCS_S_Foo naming, but otherwise to me it looks pretty good
 
they're grammar rules
"ICS_S" stands for Implicit Call Statement in Statement
 
Ah. Well, sure beats the hell out of Java naming, when you know what it means... var members = context.implicitCallStatementInStatementMemberCall();
thisNeedsAShorterNameThanWhatIsCurrentlyUsedToReferenceIt();
 
2:47 AM
ANTLR grammars generate Java-convention names ;)
 
LOL:
I called the janitor the other day to see what he could do about my dingy linoleum floor. He said he would have been happy to loan me a polisher, but that he hadn't the slightest idea what he had done with it. I told him not to worry about it - that as a programmer it wasn't the first time I had experienced a buffer allocation failure due to a memory error.
 
Janitor must have looked like an ArgumentException after being told that..
 
Lol again.
 
Badum-tsh.
 
I'm here all night, folks!
 
2:50 AM
'night!
and I think this is it, I've solved the goddamn With statements resolution!
        private readonly Stack<Declaration> _withQualifiers = new Stack<Declaration>();
        private bool _isInsideWithBlock;
        private bool _isCurrentWithBlockResolved;

        public override void EnterWithStmt(VBAParser.WithStmtContext context)
        {
            _isInsideWithBlock = true;
            _isCurrentWithBlockResolved = false;

            var implicitCall = context.implicitCallStmt_InStmt();

            Declaration returnType;
            var call = Resolve(implicitCall.iCS_S_ProcedureOrArrayCall())
 
> A query walks into a bar, approaches two tables, and asks: "May I join you?"
 
^^ old one
compiling
fingers crossed
oh crap
 
Hello @EthanBierlein
 
@sᴉɔuɐɹɥԀ Well hello there! :)
 
Hi.
 
2:53 AM
Hello
 
hello!
 
@Mat'sMug No worky?
 
I don't need these two
        _isInsideWithBlock = true;
        _isCurrentWithBlockResolved = false;
 
wtf, blender just automatically opened itself
 
2:55 AM
@sᴉɔuɐɹɥԀ Maybe it's a sign...
OF DEATH
AND TRIANGLES
PLUS FACES
AND THOSE VERTICES
 
TRIANGLES!?
2
 
Δ
yesssss....
 
0
Q: I need help counting the total number of products the user decides to buy and using that to compute the total

romy#include <iostream> #include <string> #include <cmath> #include <iomanip> using namespace std; int main () { string size, flavor1, flavor2, flavor3, order; const string SMALL = "small"; const string MEDIUM = "medium"; const string LARGE = "large"; const string YES = "yes"; ...

 
@CaptainObvious I need help titling this question
 
@CaptainObvious no sir, you need help understanding what this site is all about.
 
2:57 AM
@CaptianObvious Aaand, close as unclear
Aaand, neverming
*nevermind
 
arrow-up == edit ;)
 
200 shot it down pretty damn fast.
 
@sᴉɔuɐɹɥԀ Better watch out... You may be next. Δ
 
@EthanBierlein I have an ongoing record of 0% closed questions ;)
 
@sᴉɔuɐɹɥԀ Same here :)
 
3:00 AM
Even on Stack Overflow! (except for that time I posted a test question for a screenshot of a bug - that got blown to oblivion quite quickly)
 
@sᴉɔuɐɹɥԀ I remember when I started on Stackoverflow about a year ago and didn't quite understand the rules,
@sᴉɔuɐɹɥԀ And then I posted an april fools question a day late with no purpose whatsoever.
 
@EthanBierlein Mine got to -6 before deletion; how low did yours get? ;)
 
@sᴉɔuɐɹɥԀ -24, If I remember correctly...
 
ouch!
 
3:02 AM
I take it that you have a well-earned [badge:peer-pressure]?
 
@sᴉɔuɐɹɥԀ @Mat'sMug I actually had a user recommend a "good" way to ask an april fools question.
@Mat'sMug No, it was just deleted within about 10m by a mod.
 
oh, lame
 
I think codereview.stackexchange.com will be a better fit for this question — Arun P Johny just now
 
wait, [badge:peer-pressure] is for answers, right?
 
@Mat'sMug I think so
 
3:04 AM
0
Q: Counting words in a text file

Bruhtasticinclude iosstream include cmath include fstream include string include iomanip ^(this stuff is properly labeled with # and < and > in my actual program but i ran into formatting errors when trying to post this ) using namespace std; int main() { string bruh; cout << "Enter filename:\n...

 
@EthanBierlein You beat CR's worst voted question, it seems. Except, this one was not deleted...
-23
Q: How could I optimize this script?

irywJust wondering if there was someone out there that could offer help in optimizing my script. <?php /** * If you don't understand what this does * you have no hope as a programmer. * */ function usage ( ) { // Ahhh the marvels of echo, such a wonderful tool // yet so advanced that a begin...

 
@ArunPJohny - code review is for code that is working, but the OP wants to solicit improvements. It sounds like this code is not working. — jfriend00 13 secs ago
 
@CaptainObvious I just submitted an edit for this, I don't know whether the includes are written properly, if someone would like to check or whatever
 
@sᴉɔuɐɹɥԀ Oh, I remember looking at that one. At least it's not meta.se's worst voted question. It has about -150 votes.
 
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com. — Justin Niessner 36 secs ago
 
3:08 AM
@sᴉɔuɐɹɥԀ that one should have an historical lock - it's just ...epic
 
@Mat'sMug It's nice to reminisce every now and then how utterly bad a question can be and still be on-topic, and still receive good answers :)
 
@sᴉɔuɐɹɥԀ It's also just funny sometimes to look at questions like that and think, "wow"...
 
@Mat'sMug LOL.
 
@sᴉɔuɐɹɥԀ I believe it's "LOLCODE".
 
3:10 AM
> Down with LOLCODE... LOL.
 
If there's something that's not working as you expect, you need to clarify what that is. If you're just looking for a critique of your code, you'll want to try [codereview](codereview.stackexchange.com). — Chris just now
 
{ actions: { nicotine: true } }
 
@sᴉɔuɐɹɥԀ ???
 
Sorry, been doing a lot of JSON lol.
 
allright that's it. back in 5.
 
3:12 AM
@sᴉɔuɐɹɥԀ That's okay.
@Mat'sMug See ya'
@Mat'sMug 5hrs, 5m, or 5s?
 
85
A: What is your best programmer joke?

soulmerge99 little bugs in the code, 99 bugs in the code, fix one bug, compile again, 100 little bugs in the code. 100 little bugs in the code, ... ... continue until 0 bugs reached

 
^^ hydra code
back
 
Later, dishes time.
 
1
Q: Permutation & Combination Calculator

LegatoWanted to make something for the Community Challenge. It's a simple Permutation & Combination Calculator. I'd like input on: The overall design - any suboptimal choices that could be improved? Naming - This is hard, I know. But is it confusing to follow? Some names seem repetitive, others seem ...

 
oh crap
doesn't look good
> A first chance exception of type 'Rubberduck.Parsing.Listeners.SyntaxErrorException' occurred in Rubberduck.Parsing.dll

Additional information: extraneous input 'with' expecting NEWLINE
#GrammarIsFun
oh, lol
code actually had an illegal extraneous with keyword
 
3:27 AM
Apparently, grammar is fun!
 
damn right
 
Managed to make something before midnight. :]
Jeez.
 
I have to say, there's one thing I like about JavaScript. It's so freaking sloppy, it will let you get away with just about anything!
 
yet I bet the ANTLR grammar for JavaScript isn't half as flaky as the VB6/VBA one
 
I bet you're right
 
3:30 AM
damn, I did nothing good tonight.
Y U NO WORK!!
 
var foo = undefined;
foo = null;
foo = NaN;
foo = 42;
foo = false;
foo = "hello";
console.log(foo + "! hey look, no error!");
> hello! hey look, no error!
 
Dim foo As Variant
Set foo = Nothing
foo = vbEmpty
foo = 42
foo = False
foo = "hello"
Debug.Print foo & "! hey look, no error!"
> hello! hey look, no error!
 
Beautiful :D
 
isn't it!
quack
 
To the other commenters, this code is clearly broken. codereview.stackexchange.com is ONLY for working code that is soliciting improvements so it is NOT appropriate for this code. — jfriend00 43 secs ago
 
3:38 AM
^^ YESSS!!
oh wow
"Can anyone tell me where I am wrong with this code?" is not a specific enough question. We don't know what doesn't work or what it is supposed to do that it is not doing? Your question will be closed shortly unless you clarify. Also, I should advise you that StackOverflow is not an online forum where you post and check back the next day. When you post a question here, you should check back frequently within the first 30 minutes to see if everyone understood your question or if you need to clarify. Otherwise, your question will get closed if it is not clear. — jfriend00 6 mins ago
> StackOverflow is not an online forum where you post and check back the next day.
Amen
 
class test {
	public static void main(String[] args) {
		// none of below actually works!!
		int foo = null;
		foo = 42;
		foo = false;
		foo = "hello";
		System.out.println(foo + "! hey look, all the errors!");
	}
}
@Mat'sMug Wow, nice.
 
Replace int foo with Object foo :P
 
@Legato OMGOSH. That actually compiled and ran!!!
 
quack
 
I feel awesome about how happy that made you.
 
3:46 AM
... goes on to change all Java variable declarations to objects...
 
One big difference between javascript and Java is typing. But literally everything extends from Objects, so doing that would be the equivalent.
Heh
 
... also hides very far away from Simon...
 
wait a minute...
 
@SimonAndréForsberg
 
Uh-oh. I'm in trouble now =;-)
 
3:49 AM
looks like that shit works!
 
Thanks @sᴉɔuɐɹɥԀ.
 
oh but if I change local variable boo to foo VBA compiles it, but my code blows up here
        return matches.SingleOrDefault();
 
// TODO: Change VBE font from Courier New to Consolas
 
I like my VBE vanilla-style ;)
 
Goodnight everyone.
 
3:53 AM
'night!
oh idiotic me. I give myself the trouble of tracking _currentScope... and I don't use it to disambiguate multiple matches in a method called GetClosestScopeDeclaration
 
Look how much cuter it looks ;)
 
@sᴉɔuɐɹɥԀ ^^ beat this
 
VBA and Comic Sans, together at last ❤
2
 
@Mat'sMug Awwwwwww so cute
 
the worst part is that.... I don't dislike it!
it seems oddly appropriate
 
4:00 AM
of course, they're microsoft's two greatest inventions :)
 
Mwahahaha
@Mat'sMug You haven't seen the BananaScript AppleScript editor, have you?
 
nope
 
@mjolka that's ..a joke, right?
 
0
Q: underscore.js and jQuery templating

Shivam BhallaWanting to improve my code or structure. How does it look, any comments or suggestions? $(function() { function searchGit() { //grab value of search field var search = $('#search').val(); // Validates entered value if (search.length > 0) { //pull...

 
4:06 AM
@Mat'sMug my ms paint skills are no joke :P
 
(phew)
 
@Mat'sMug Behold... AppleScript.
 
@mjolka how would you go about this one?
 
> tell application AppleScriptEditor to modernize its interface
 
Foo on line 3 isn't the same Foo as on line 4
VBA understands it - Rubberduck needs to understand it too
although at that point it can probably fly as an acceptable edge case
 
4:12 AM
@Mat'sMug do you have information about whether a name refers to a field/property/local variable?
 
yes
well no
lol
grammar picks it up as a VariableOrProcedureCall
#DammitVBA
 
@Mat'sMug ever watch Little Britain? "yeh but no but yeh but no"
 
lol
I meant I know that Foo in Dim Foo As New Class1 is a local variable, and I know that Foo in With Foo refers to that variable, but...
 
@Mat'sMug picks up the local variable as VariableOrProcedureCall, i assume
 
oh wow
yeah
 
4:15 AM
(does VBA have properties?)
 
but I know that the local variable is of type Class1 which is a known type that I store as having DeclarationType.Class
@mjolka yup
I need to "scan" the members of Class1 to correctly resolve the 2nd Foo
 
what does the grammar say the second Foo is?
 
everything is an AmbiguousIdentifier as far as the grammar/lexer is concerned
 
ok
 
<TTGTB />
 
4:21 AM
'night!
 
Likewise :)
 
ah, found it. stupid bug.
        var currentScope = matches.SingleOrDefault(declaration =>
            declaration.Scope == _currentScope
            && (accessorType == DeclarationType.Class
                ? declaration.DeclarationType == DeclarationType.Class
                : accessorType == DeclarationType.PropertySet
                    ? (declaration.DeclarationType != DeclarationType.PropertyGet && declaration.DeclarationType != DeclarationType.PropertyLet)
                    : accessorType == DeclarationType.PropertyLet
the bug is that the procedure is receiving a default/optional parameter accessorType that's Declaration.PropertyGet, so as to disambiguate property getters vs setters - it's only receiving DeclarationType.PropertyLet when the context is an assignment
so the thing resolves to the correct property accessor
but in this case it's a procedure
 
Normally I'd say to move your question to Code Review SE, after reading their 'How-to-ask' and 'what's on topic' section, but really just look up what is OOP. Should be fairly simple from there. — Pierre-Luc Pineault 16 secs ago
This would actually work on Code Review - the code works as intended, and you want to change how it works. As a regular C# reviewer on CR I'd upvote this question. — Mat's Mug 7 secs ago
 
@Mat'sMug dude...
 
1) Make it work.
2) Make it right.
3) Make it fast.
still at 1 ;)
 
4:30 AM
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comDrop 51 secs ago
 
Have a star @Mat'sMug
 
@mjolka don't worry, when I get to 2 there will be a CR post :)
 
@Mat'sMug i think you should set up a ternary jar. same idea as a swear jar.
3
 
lol
any refactoring ideas?
 
i'm looking at it now
 
4:35 AM
probably a bad idea to refactor now, since it doesn't work as intended
actually... it does
damn
 
@Mat'sMug what is PropertyLet?
 
yeah it does. I wrote that mess just to disambiguate getters vs setters
Property Let is the "setter" accessor for value types
Property Set is only for reference types
 
ok
DeclarationType is an enum?
 
yeah
public enum DeclarationType
{
    Project,
    Module,
    Class,
    Control,
    ModuleOption,
    Procedure,
    Function,
    PropertyGet,
    PropertyLet,
    PropertySet,
    Parameter,
    Variable,
    Constant,
    Enumeration,
    EnumerationMember,
    Event,
    UserDefinedType,
    UserDefinedTypeMember,
    LibraryFunction,
    LineLabel
}
I probably need to add a LibraryProcedure in there, too.. but that's unrelated
 
@mjolka do you know any way to map multiple checkboxes checkes status to a list<bool>() ?
or @Mat'sMug... whoever who have an idea :)
 
4:40 AM
Controls.Where(c => c is CheckBox).Cast<CheckBox>().Select(c => c.Checked).ToList();
 
and the other way around ?
 
what other way around?
 
I have the list and wanna tick the checkboxes
 
you need a dictionary, not a list
so instead of .ToList you call .ToDictionary and use c.Name for a key and c.Checked for a value
 
that's good. already started to make a dictionary but wanted to know if there is a way to say, refer to checkboxes in some sort of index
 
4:42 AM
why would you need that?
 
I got a binary number, and want to make a gui for it
 
dictionary lookup is O(1)
index lookup is O(n)
 
O(1/n)?
 
@Mat'sMug i think this is equivalent
bool Thing(Declaration declaration, DeclarationType accessorType)
{
    if (declaration.Scope != _currentScope)
    {
        return false;
    }

    switch (accessorType)
    {
    case DeclarationType.Class:
        return declaration.DeclarationType == DeclarationType.Class;

    case DeclarationType.PropertySet:
        return declaration.DeclarationType != DeclarationType.PropertyGet && declaration.DeclarationType != DeclarationType.PropertyLet;

    case DeclarationType.PropertyLet:
        return declaration.DeclarationType != DeclarationType.PropertyGet && declaration.DeclarationTy
 
@Mehrad you're looking for index #42. You're looping from 0 and stop at 42. now you're looking for key "Checkbox42". You fetch dictionary entry with key "Checkbox42". which is faster?
 
4:45 AM
dictionary is a good idea
 
@mjolka Ctrl+R,M right? :)
aka "Refactor/Extract Method"
question is... how to name it
IsCurrentScopeMember should do for now
 
0
Q: Please help me make this more "Object Oriented"

JohnI applied for a Application Developer position, they require all their applicants to complete a 1 of 3 programming assignments. I picked one for sales tax calculation. It was quite simple. Write a program the feeds in prices. If the item is a Book, Food or Medical product there is no tax, i...

 
well hello there!
Welcome to Code Review! Buckle up, you're in for a ride! :) — Mat's Mug 6 secs ago
@mjolka testing it right now
        private bool IsCurrentScopeMember(DeclarationType accessorType, Declaration declaration)
        {
            if (declaration.Scope != _currentScope || accessorType != DeclarationType.Class)
            {
                return false;
            }

            switch (accessorType)
            {
                case DeclarationType.Class:
                    return declaration.DeclarationType == DeclarationType.Class;

                case DeclarationType.PropertySet:
                    return declaration.DeclarationType != DeclarationType.PropertyGet && declaration.DeclarationTy
and it works!
now I need to come up with some more funky edge cases...
 
ah yep, i missed that condition, good catch
 
Sub DoSomething()
    Dim Foo As New Class1
    With Foo
        .Foo
        .Bar
    End With
End Sub
didn't take too long
 
4:58 AM
@Mat'sMug what did you mean by "index lookup"?
 
finding index n in a list
 
like x[n] where x is a list?
 

« first day (727 days earlier)      last day (3291 days later) »