« first day (1089 days earlier)      last day (2910 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
That's the price of friendship.
Be glad, you're doing it right :-)
 
Yeah. It doesn't bother me so much, really.
I don't have anything to do with my time anyway.
 
You could play Hearthstone
Though that's probably not the best option
 
What's that other cardgame, HEX? Did they solve their server issues yet?
 
@Hosch250 if I remember correctly, @Duga only posts 10 commits whenever you push more than 10. I'm not sure what your feature request is, really.
 
HEX isn't interesting enough in my opinion, or maybe it is if you like MtG and paid tournaments more, but then I would actually need to spend money
 
6:07 PM
@skiwi Yeah...I feel like that wouldn't work for me. :P
 
Maybe you could concatenate them into a neat list in one message like that?
 
0
Q: beginner TICTACTOE game for my school projet

Carlos Chui just wanted to know how can i code more efficiently with my project. I know that all the "if's" can be done easier en with less code. Can anyone help me please? thnx $(document).ready(function () { var x = "X", o = "O", move = 0, ...

 
woot! 49,002 rep!
 
@Mat'sMug and way too many mugs on the wall
 
@Mat'sMug I felt the same way when I hit 23000.1 miles on my car yesterday.
I wish I was 1/10 of a mile shorter, that would have been awesome.
 
6:11 PM
Approaching 10K rep on @StackOverflow feels a bit like counting the days left until your birthday for some reason.
> @StackOverflow liked your tweet
 
This question may fit better on Code Review. Double-check the "How do I ask a good question?" section and format your code correctly before submitting it. — Mike C 25 secs ago
 
@CaptainObvious Holy nesting...
 
@Mast The deepest part is 18 deep
 
s/18/too
 
@CaptainObvious Mother of god...the nest.
 
6:15 PM
Whoa.
 
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
2
 
And that, my friend, is a clear indication of an anti-pattern.
 
I don't even think the term "arrow code" can be used here.
It's worse than that.
 
Alarm bells should be ringing in your head somewhere half of that amount.
 
gentle, guys. it's code ;-)
 
6:18 PM
And he's Dutch, judging from his comments.
In fairness, he should start with a real language...
 
The worse the code is, the better the OP will become after applying themselves to learning from our reviews!
 
I'm voting to close this question as off-topic because belongs on another site in the Stack Exchange network (which is not listed as an option): codereview.stackexchange.comochi 57 secs ago
 
@ochi It's not listed for a reason. Please use a more constructive close reason next time. — Mast 13 secs ago
 
Cross-posted on Code Review. This question can be removed. — Mast 52 secs ago
 
6:22 PM
@Mast // BEGIN VAN DE GROTE ELSE lol
 
@Mast "Too broad" is what I normally recommend them.
I closed this question, anyone disagrees?
 
the correct site is not listed for a reason.
 
2
Q: (Java) Dice Rolling Program GUI

LoganGardner15I am working on writing a small program for a game called "Turkey Trouble" that we did in my biology class. The game involves the rolling of two dice. The two numbers are then added and this number corresponds to a list of "events" that will occur in a population of turkeys. I have the code writt...

 
Oh wait, that wasn't actually the big one
 
@SimonForsberg Same here.
 
6:23 PM
@Mast OP is asking for a code review to make it more efficiently - I thought it was self-evident - If that's not enough, I don't know what is - my bad - what other constructive reason should I be adding for next time? — ochi 58 secs ago
 
@skiwi I know right? Awful.
 
OH MY EYES
those if statements are horrible
 
@Malachi That is an understatement.
2
 
@Malachi Yea, I said that, right?
 
And no one knows why those else-ifs exist in the first place.
Any comments on this?
I am closing this question because it appears that you are asking for help with actually writing your GUI. This request is off-topic for Code Review. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing what your code does. I would recommend that you change your question to be asking for a review instead. (Just say "How can I do this better"?) Here at Code Review, we love to help you do the same thing in a cleaner way! Please also see our help center for more information. — Simon Forsberg ♦ 7 mins ago
 
6:30 PM
@SimonForsberg Agreed. Not sure how that got upvotes.
 
:-)
 
Now you've gotten another room ;)
 
No picture required!
 
I wish site business moved away instead of my business
Probably the worst effect of CR getting popular
 
6:37 PM
@SimonForsberg lol
 
0
Q: Inheritence Cleanup

KillercamI have the following interface public interface IDocumentController : IController { bool Handles(string path); DocumentView New(string fileName); DocumentView Open(string path); ... string FilePath { get; set; } } I have an abstract base class for all IDocumentController ty...

0
Q: I have this code but it has a bug in when I choose the third choice

F.F #include <stdio.h> #include <stdlib.h> void Menu(); void add_emp(); void Delete_emp(); void print_list(); void trans_emp(); void stor(); int main(void){ int s,c; int a[20]; char b[20]; f...

 
@JeroenVannevel That's not how this works.
Let's have more site business!
@CaptainObvious Go away.
 
@CaptainObvious How would that code not have bugs?
 
@JeroenVannevel This message in particular was the reason behind the decision to move: chat.stackexchange.com/transcript/message/29295994#29295994
 
Hardly the naughtiest language I've used but sure, I get it
I don't like it. But I get it
 
6:41 PM
I think the naughtiest language I've used is.
 
@Mast You've used JS too, haven't you?
 
ooooh
as Flash McQueen would say: Ka-Chow!
(if you had 4yo twins, you too would be quoting Flash McQueen)
 
By the way, @nhgrif, I was at a little meetup today for people in my company who wanted to know about Swift. I was kinda disappointed at the level though, it was a very basic level. I think I've learned more simply by reading CR questions, and by listening to you talk about it. The most impressive thing was the nice UI of the Interface Builder
 
Try to narrow down what is special about that example, perhaps it is not related with its size. The way you're wording your question is too specific (besides the obvious fix-my-homework aspect) and is unlikely to attract good answers. The problem with your previous questions was just that you separated them in three. Lastly, because your code works and you are not posting a concrete question, this is probably more suitable to CodeReview.SE. — iled 59 secs ago
 
In other news, about the meta question about the next community challenge: (nice idea btw, @EBrown, it was time again!)
I am so going to over-engineer and go an extra mile on this! — Simon Forsberg ♦ 54 secs ago
@Mat'sMug ^^ :)
 
6:52 PM
Windows Defender found two potential threats: HackTool: Win32/AutoKMS ("It can be used to "crack" or patch unregistered copies of Microsoft software.") and HackTool: MSIL/Gendows ("This tool can be used to activate a pirated version of Microsoft Windows and Microsoft Office.").
 
@iled "it's printing wrong output" and "can someone help me fix my code?" are crystal-clear indications that the question would be slammed off-topic within seconds on Code Review. Please read a Guide to CR for SO users. — Mat's Mug 18 secs ago
 
ignore
 
@JeroenVannevel for some values of "threats"
 
@JeroenVannevel The two PR's on VSD are ready for review when you are ready.
 
@SimonForsberg That's a retarded language, not a naughty one.
 
6:53 PM
I'll review the additions after GoT. I'm 2 days behind on it
 
OK.
 
@Mast lol, good point.
@Mat'sMug you are right. I'm sorry. However, the "fix my code" type question is usually not so praised here as well -- what would you suggest? — iled 37 secs ago
Then WTF are SO for? ^^
 
@SimonForsberg Sudoku-solver style?
 
@Mast Ooooh yes.
 
thanks @SimonForsberg
 
6:56 PM
@Mat'sMug For the comment on SO, or for over-engineering what could be the next community challenge?
 
lol, both
 
> If you want to string chutes together or string ladders together, go for it. Beware though, children will cry.
 
0
Q: Performance optimization when switching from nested to flat representation (genetic algorithm)

tsornThe code below is the core of a Genetic Algorithm (NSGA-II to be precise, without the crowding-distance part), but I've taken out all the GA-specific parts and made a generic example. I think most of the 'constraints' from the original algorithm still holds, but I'm not sure. As you can see in l...

 
posted on April 27, 2016 by CommitStrip

Today, we welcome a new sponsor, Hired! Hired is an exclusive tech recruitment platform proposing opportunities accross the world, in Paris, London, NYC, San Francisco, Toronto, Sydney and more… They told us that a developer finds a new job every thirty minutes. So if you’re looking for a new challenge, you should test it!

 
@CommitStrip In fairness, they should do a background check and/or ask for your portfolio.
A portfolio on GitHub is worth much more than code-writing during interview questions, IMO.
 
7:02 PM
except if it goes like this:
#alpha release: #nailedit https://t.co/MdZhrgtgjB
 
@Mast Depends on how the code on GitHub looks :)
 
^^ and that
 
@SimonForsberg Sure, but it got the whole learning process down with the commit history.
I did it like this.
This didn't work as expected.
This part could've been cleaner.
This is an extension on the original code with feature X.
It's all there.
If done correctly, of-course.
 
> implemented X
> fixed X
> wrote tests for X
^^ would that look bad?
 
Not in my opinion, but a manager/recruiter may think otherwise.
 
7:09 PM
> Fix X
Fix X again
Really fix X
This time X should work
OK, this time maybe
Ooops.
Real fix for X
Or that ^^ ?
 
eh, that looks like my commit logs
 
@SimonForsberg At least it's honest. But no, that wouldn't leave a good first impression.
 
@SimonForsberg git rebase -i ftw.
just squash it all together
 
@Mast Luckily, my commit messages are more like how Mug wrote it.
 
> My hands are typing words
 
7:15 PM
goes and check commit log
 
0
Q: Delay handling of registrations

bowmoreI'm trying to solve the problem of a whiteboard receiving registrations before, during and after its own initialization. As each registration needs a bit of handling which can happen only after the whiteboard is fully initialized, I need to delay that handling, until initialization has completed....

0
Q: (Java) Binary Search Tree

JaredI am trying to create a binary search tree class in java and am wondering how I did. I am fairly confident on most of the methods, but fear I may have messed up the delete method. I know I am reinventing the wheel, but am just creating this for practice. I know that I also should have made the cl...

0
Q: python: detecting if my method is called with 0 or 1 args

fearless_foolI want to write a suite of methods that act as getters when passed zero arguments and as setters when passed a single argument. I have two two reasonable implementations, shown below. Is one better than the other, or is there perhaps an even better way? class Thing(object): def __init__(s...

 
If your code runs, then consider moving your question to Code Review. — the Tin Man just now
 
@SimonForsberg The exact same message over and over again? Not helpful.
But hey, what do you expect from a bot. She's still learning.
First things first and all.
 
7:23 PM
@Mast Well, what else should she write as commit messages?
@Mast She's pretty good already though. I'd say it works better than expected.
 
@CaptainObvious looks like example code to me...
Also, why in the world would you want the same method to be both a getter and a setter, depending on the number of arguments...
Seems un-intuitive and hard to maintain
 
-           catch (Exception exception)
+           catch (Exception)
            {
                 //can we please comment when we swallow every possible exception?
            }
 
exception expectation
 
0
Q: Am I writing this insert function for a linked list in c++ efficiently?

Brandon WoodardBy efficiently I mean, using as little lines of code and if there are any errors please point them out. Thank you. // Assuming there is a linked list class with Node* first node already declared. void Insert(int pos, int datavalue) { Node* newPtr = new Node; ...

 
7:47 PM
Best tell Peter to post on Code Review. Stack Overflow is for not working code, Code Review is for working code. — Rad Lexus 52 secs ago
I'm voting to close this question as off-topic because it would fit better on codereview.stackexchange.com. There's no problem to solve here. — g.d.d.c 34 secs ago
 
Well, I've implemented and benchmarked both versions. This is a question about best practices so I assumed it was appropriate here. I know for certain I'd get downvoted if I posted it on S.O.! :) — fearless_fool 10 mins ago
Thoughts on that^ anyone?
 
@SimonForsberg I'm purely talking about the messages, not about the content :P
 
> However, if your question is not about a particular piece of code and instead is a generally applicable question about…

Best practices in general (that is, it's okay to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?")
 
@CaptainObvious No.
 
> ...then your question is off-topic for this site.
 
8:00 PM
Your definition of 'efficient' is seriously flawed. Please sort that out first. — Mast 10 secs ago
 
@Phrancis ugh, no, it's not about best-practices - it's a / gray-zone by definition
 
Naruto answer; accepted non-selfie answer with 0 score: Popup on footer to make an email list
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: OPP Sign In/Out procedure in PHP
 
vote at your discretion
 
@Phrancis Burn it.
 
8:04 PM
@Mast IMO, that comment is on the edge of 'rude'
@Phrancis My thought too :)
 
1
Q: Count neighbour pairs in a tree

Joe We say that a pair of nodes (x, y) is a neighbour pair when the depth of x and y is the same, the color (black= 1, white = 0) of x and y is the same, the keys of x and y are equal and there is no other node of the same color between x and y on the same depth. The depth is the key an...

0
Q: printing chessboard with *(asterisk) and .(dot)

FreddyWell I am trying to solve basic problems on SPOJ. Here is my code: def main(): no_of_case = input() for i in range(no_of_case): user_input = input() # take input row = int(str(user_input)[0]) column = int(str(user_input)[1]) count ...

 
@SimonForsberg Hmmm, I thought it was honest.
Line count has nothing to do with efficiency whatsoever and I'm not going to write an essay about that in a comment.
 
@Mast You could clarify what you don't disagree with and what is flawed, and why, rather than saying that "Your definition of 'efficient' is seriously flawed. Please sort that out first."
@Mast No need to write an essay, but it's a good idea to say what you mean.
 
C++ care not about white-space in most occasions, so you can reduce everything to a one-line by definition.
 
How about saying "Number of lines is irrelevant to efficiency"?
 
8:12 PM
Line count is irrelevant for efficiency in C++. What exactly is your question? — Mast 11 secs ago
There. Poof. Fixed it.
I agree with you, I just couldn't be bothered. It's a user of which I suspect won't come back.
 
Generally I believe that the probability of coming back increases if the user encounters somewhat friendly comments.
4
 
#NicePeopleSite
 
Thanks, much better :)
 
@SimonForsberg I'm pretty certain this user wasn't coming back one way or another, but afar from that your statement is quite true.
 
I totally understand that there's many questions, and it's tedious to be friendly in each comment, but look at it from the user's perspective. How would you like your first experience to be here?
 
8:17 PM
My first experience here was golden and I rewarded the answerer in time with a bounty.
 
Wow that's a really good answer
 
Hence the bounty ^^
 
0
Q: Detect cause of failing rename

MargedI use some code similar to the lines below. The rename can fail if the directory is blocked because some application has a file open in it. err := os.Rename("C:/temp/inUse", "c:/temp/Renamed") // rename directory if err != nil { fmt.Println(err) ... } I am able to detect this fact whe...

 
8:42 PM
@findwindow dude, where's your Code Review account? :D — Mat's Mug 52 secs ago
 
@Mat'sMug lol I am not that good. — findwindow 34 secs ago
....we might need to make a PR campaign to emphasize the fact that anyone is "that good"
3
 
@pmarca https://t.co/9oatCBq99D
 
9:11 PM
I'm voting to close this question as off-topic because it belongs on codereview. — timgeb 27 secs ago
 
1
A: June 2016 Community Challenge

OrangesandlemonsA Tennis match simulater. Pretty much as it says on the tin- some code which gives a final match result for two virtual players. You can choose how complex you wish to make it: for example you could just take the stats of your virtual players, throw in a random modifier and then builds a final s...

 
I like how this is completely in the spirit of Code Review's community-challenge, being completely language-agnostic and leaving implementation details up to the participant. But I agree, it could be a tiny little bit more specific - for example, put in what the scoring rules are for a Tennis game. — Mat's Mug ♦ 4 mins ago
 
More livecoding scheduled for Thu 7am Pacific Time, adding async iterators / IAsyncEnumerable / IObservable to C# - http://eepurl.com/bYdYvL
 
9:28 PM
@Phrancis after the edit it's better, but I still don't like it. It could be as easy as Math.random or it could be as hard as using Machine Learning of real Tennis statistics and making a more educated guess.
I was impressed by @Vogel612's proposal, but I think it might be a bit too complicated, and too Computer Science-ish.
 
^^
I felt my brain melt
 
The leading proposal however, I like really much. It's quite simple, it's clearly specified, but it's open for extension.
 
yeah. and it's fresh and new
 
And it's an old game I remember from childhood, but with a Donald Duck theme on it :)
 
0
Q: Is this Python 2.7 code any good?

J_CsTI am taking an online training course on Python, and at the following question: Write a function called median that takes a list as an input and returns the median value of the list. For example: median([1,1,2]) should return 1. The list can be of any size and the numbers are not guaran...

0
Q: Forum project using OOP PHP

Dannyw24I've been developing a forum as my first OOP project, I've successfully built a login/registration and other functionality typical in forums. I'm looking for some guidance in terms of where to take the build and other common functions that will need integrating. users.php <?php class USER { ...

 
9:31 PM
0
Q: What is the proper comment when downvoting an answer that is not an answer?

pacmaninbwThis is a request for the proper way to do things as a reviewer on code review. The question and answer can be found at Modularised Document Construction. I just downvoted an answer that in the first line said it wasn't an answer but a comment and the comment field wasn't large enough. I didn't ...

 
@StackExchange I'm asking myself: "Maybe it is an answer after all?"
but either way, I'll leave it up to @Mat'sMug or someone else to answer that one. TTGTB.
 
10:00 PM
TTQW
 
TTQW here as well
 
I just started my day >_<
 
> PS - don't worry about that "lost reputation point"; downvoting answers costs 1 rep, and 1 rep is literally nothing - you'll make it up in no time. Protip: you can use that -1 to satisfy your OCD and level your rep score to a nice round number.. see, you're now at 535, which is a much nicer score to have than 536. ...that's not just me, right? RIGHT? ;-)
lol, that fizzbuzz question went hot
(and I'm sitting at +179 for the day!)
 
well I made 12 on tex today
 
-1
Q: Recursive Base Conversion (Base 2, Base 5, Base 7, Base 8) Java

everlassI recently created a base conversion program for my java class and my teacher says I have errors with the program. Could anyone test this program and tell me what the errors are and how to resolve them? So far I can tell that with the while loop it displays the results in a weird order if you inp...

-1
Q: Read from Text and Save to Two or Three Variables

TacoB0tCurrently, I have a program that reads from a text input file that is expected to be in the format: add A B add A C add B D breadth A depth A remove A B add B A breadth B depth B However, I wrote my program to be: int main(int argc, char **argv){ ifstream fin(argv[1]); strin...

0
Q: Searching a Maze Using DFS in C++

A CoderI have started learning recursion and search algorithms, especially DFS and BFS. In this program, I have tried to make an implementation of a maze-solving algorithm using DFS. The program is working functionally, but as a beginner I am fully aware there are many possible areas of improvement. If ...

 
10:09 PM
 
I just finished a lab session that's supposed to take two hours in 5 minutes. I think that's a new personal best
 
Also consult codereview.stackexchange.com/questions/79668/… and see the answer by ircmaxell codereview.stackexchange.com/a/79681/28897 which knows his stuff on the subject. — Fred -ii- 20 secs ago
 
10:42 PM
Can you show us the code? Or maybe you want to post it to Code Review. — Bergi 31 secs ago
 
11:03 PM
0
Q: Custom GUI Slider class

PsychoBitchI want to improve my slider class as much as possible. Is this acceptable code for a slider? I've tried to comment as much as I can. If you want to find out more about the Component class, check out my repository: dxLib. slider.h: #pragma once #include "Component.h" begin_UI // Namespace defi...

 
11:25 PM
possible answer invalidation by A Coder on question by A Coder: codereview.stackexchange.com/posts/126899/revisions
 
11:36 PM
@SimonForsberg heh. Was it like "intro to programming coincidentally taught in Swift"?
 
For code that works for which you are soliciting a code review, codereview.stackexchange.com might be a better place to post. — Rob 18 secs ago
 
SQL pivot syntax is strange, wish there was an easier way to just tell it to flip the columns and rows with each other
declare @Test table (Id int identity(1,1), Letter char(1));
insert into @Test values
('A'),('B'),('C'),('D'),('E');
select *
from @Test
pivot (
    max(Id)
    for Letter in(A,B,C,D,E)
) as p;
@Mat'sMug any easier way to do something like that?
Returns
A           B           C           D           E
----------- ----------- ----------- ----------- -----------
1           2           3           4           5
 
looks about as simple as it gets :)
 
Just feels very inflexible and hard-coded
 
89
A: Convert Rows to columns using 'Pivot' in SQL Server

bluefeetIf you are using SQL Server 2005+, then you can use the PIVOT function to transform the data from rows into columns. It sounds like you will need to use dynamic sql if the weeks are unknown but it is easier to see the correct code using a hard-cded version initially. If your values, then you wi...

get the columns dynamically!
...but then it's not as "easy" ;-)
 
11:46 PM
Ooo that actually looks like a good, reasonable use case for dynamic queries!
 
yeah
 
Those are certainly few and far between, in proportion to how much dynamic queries are used
 
0
Q: Class property holds data from database, the right way

Roy KI have a class, it has two properties: var fruitsPackId: Int var fruitsPackContent: Array<Fruit>? Once the class is being initialized, I want to append data into fruintsPackContent from a local db according the the initialized fruitsPackId. I am not sure what is the best practice on that type...

 
Hey @Mat'sMug do you think I'm overstepping a bit with this edit? stackoverflow.com/review/suggested-edits/12171930
 
I voted to approve it, it makes the Internet a better place ;)
 
11:56 PM
Just think it makes it easier to read, it just feels weird to edit a almost 150K rep SO user's posts when sitting here at measly 733 rep lol
 
well, you're fixing typos, adding missing words, and making the code formatting consistent. I'm sure @bluefeet won't have a problem with that
 
00:00 - 18:0018:00 - 00:00

« first day (1089 days earlier)      last day (2910 days later) »