« first day (347 days earlier)      last day (3664 days later) » 

7:00 PM
"Don't comment bad code, fix it." - Clean Code, Robert C. Martin
 
@Vogel612 lol, I agree. Unfortunately, this thread is referenced 16 times throughout a very large project, and I'm the only person making what's supposed to be a minor change.
So I can't test every entry point, and if I blow it up, I'm screwed.
 
Though I would've preferred if that person would make a ticket in some issue tracking tool
 
TS
 
Anyway, it was vaguely amusing. Sad, but amusing.
 
afaik Eclipse by default has HACK as a different Task Marker...
 
7:02 PM
I just saw a bunch of threads being initialized and never started, and I was like "...What?"
That's awesome, if so. Have to test that one.
 
so if you want to make ppl. stumble across it, use that instead..
 
Hopefully my next real project touches this. The entire code base for this is just brutal.
HACK didn't do anything for me, but I'm using a modded version of Eclipse.
sigh It's just... it's one thing to see it on a code review site. It's another to see it in your production environment.
 
meh...
He'll start slacking off like me..
49 days, 28 answers
even though I broke the repcap on first day ;)
With 3 Answers on the first day ;)
 
@syb0rg @rob0t is on strike again?
 
7:14 PM
I did 9 in 3 once
5 in 1 day... I must have not done any work
2
 
Unit testing is the hard way to learn to always extend/implement existing classes/interfaces. If you do it correctly, it means there's less code to test.
 
@Ben March 2nd, 4 in 1 day 1 hr. 10 min
3
 
@Vogel612 did you bother to work that day?
 
all scored between 3 and 5 votes
 
wait, wat
:D
nice
 
7:16 PM
well post-time that is..
probably about 1.5 hrs overall work..
 
mine was 5 in 6 hours.. thats about 2 hours of work(as in employed work), yay lol
 
april 2nd was nice too. 12 votes and 20 minutes later had another answer posted for 7 votes..
 
the rep was flowing like milk and honey
 
somewhat funny graph..
275 on the first day!!
 
that is pretty noice
 
7:19 PM
especially when 200 is the repcap ;)
 
thanks Santa
> You've earned the "Nice Question" badge for Another way to run reports on a SpiceWorks SQLite database using a linked server in SSMS?.
 
now I am 105 from Rep max and 103 from 200 rep!
@skiwi you will get there
mine is kind of the same way codereview.stackexchange.com/users/18427/…
 
@Malachi That -100?
 
@Vogel612 you have a freaky looking dog from the glimpse I got
 
7:22 PM
 
@skiwi Bounties
 
Ahh..
 
@Malachi in fact it's the same effect like the human red eyes on photographs.
 
@Vogel612 you didn't add that in?
 
nope
natural shot with flash from my mother's mobile on christmas.
I especially like how the left eye is more bluish and the right one more yellowish.
 
7:24 PM
Jan 10 and march 7th I think I gave out 100 rep in bounties on those days too....or maybe it was november 2nd???
 
What?! That's a dog? I thought it was some image on the shirt.
 
the actual color of the iris is orange though
@skiwi make the image shine in such a way...
 
@Mat'sMug Yep :/
I need to reprogram him in C sometime.
 
lol
 
Btw, if code has a very high test coverage and a good record, do you then think it's okay to replace functionality if you see something weird in old code?
More talking about code at a company here than personal code
 
7:26 PM
@Corbin only 13 rep points until I match you
 
@Malachi Have you seen this yet? codereview.stackexchange.com/a/47369/27623
 
I am holding off testing something I patched....I have to pick up my daughter from school in about 15 minutes....
@syb0rg I am not voting on your stuff until you have less Rep than I do. I have been here longer and should have more Rep. JK LOL :)
 
@Malachi Haha
 
plus I don't know C lol
 
@Doorknob Come to surrender and plead your defeat in the race?
@Malachi I quoted that standards. I HAVE TO BE RIGHT.
4
:P
 
7:30 PM
@syb0rg oh shoot I need to bookmark all the standards pages I can find then I will have so much rep then... LOL
that C isn't too hard to read
 
@konijn Surely Loki could afford to place a bounty on his own question if he wanted?
 
;) Yes he could, though I am not sure how much he cares about the JS queue ;)
 
@syb0rg or anyone else, can I do this in C?
`switch(toupper(scanf()))`
 
The 6 rep question on top of unanswered questions was starting to get to me ;)
 
or do I use something other than scanf?
 
7:42 PM
@Malachi No
 
it has to be done the way it is done?
 
Ah, finally, 12K, slowest 1K evar!!
2
 
@Malachi Are you reading in a string, or just a single character?
 
looks like it should be a single character
 
You could possibly do switch(toupper(getchar())).
But that is untested.
 
7:44 PM
well I don't know how to write C and I don't know if I have the compiler on Visual Studios set up so I could test it. watch for my answer...
 
Wait no, what am I thinking...
That would expand into something such as switch('a')
 
no it would be switch('A')
but I have to go, I will finish it when I get back to my desk
 
@Malachi Well, you get the point ;)
 
that is what I want I think
it will have to wait until I get back
 
7:58 PM
Does anyone have a suggestion for a common name between Deck and Graveyard in a trading card game?
They're both more or less a pile of cards on the playing field...
 
"Heaps"
 
@skiwi Purgatory.
 
Nothing too fancy please ^^
 
How come std::atomic_flag is slower than std::atomic<bool> with GCC?
 
The Game That Should Not Be ... sorry, Metallica playin' ;)
 
8:03 PM
You should listen to Pastors of Muppets.
 
0
Q: Aggregation of a collection of object's nested array-properties

mister_rampageUse Case So our lead programmer loves to follow the NIH Anti-Pattern and consequently I'm not allowed to use Underscore.js and can only use Vanilla JS... and we have to support IE8. The goal is to produce an aggregation of unique values from nested collections buried within various collections ...

 
@skiwi Stack of cards ? CardStack ?
especially since the order matters in ccg's which stack implies
 
@konijn It migt be decent... I myself had the idea of a Pile, but doesn't cover it 100% either. Too bad Java takes the explicit Stack already.
 
also, do you have a design doc of what you are building ?
 
As functionality it is somewhat more powerful as a stack, as I can also retrieve elements at any place
I have a little notepad file as design document.
 
8:09 PM
You should have the notepad file in your repo, IMHO
You have tutors in your game ( select any card from deck .. ) ?
 
@skiwi The problem is that any plain work for some kind of collection is already taken by a data structure.
 
@konijn Definately considering that option.
Here it is
 
0
Q: node.js Passport Wrapper 3

Loki AstariFirst attempt was done here Second attempt was done here Huge comment at top /* * Export single function that creates the passportControl object * The function has two parameters: * app: The nodejs/express service object. * This is used to register the...

 
I think Pile seems to be correct, as someone else mentioned that another word for graveyard is discard pile
 
@konijn Looks like a wasted bounty.
 
8:16 PM
Yeah..... Such is life, I wonder what he is thinking ;)
 
Unit testing really forces you to create as less code as possible yourself
 
8:32 PM
Noo, made an error in a commit message.
 
@skiwi you can still fix that! use --amend
 
@amon I did (with Netbeans GUI) now there's two commit messages...
Didn't seem to have made it better
 
Time for a bigger sledgehammer, then. git rebase -i and do an edit+fixup.
 
I'm not really experienced with that unfortunately
How would it remove the commit message remotely?
 
In the future, don't push everything to GitHub immediately. I tend to wait until some releasable state to do that, which avoids such public mishaps.
 
8:38 PM
Well, it's just a test and all luckily :p
 
Once you've pushed it, it's trickier. If you suspect that anyone else might have fetched or pulled it, then it's a mess to clean up. On the other hand, if it's a private branch, you could fix it locally, then do a git push -f to overwrite the remote.
… assuming that the server permissions let you.
 
It's time to go for now though, world didn't end with a wrong commit message, time to sleep now
I'm appereantly on 1500 lines of code already
 
TTGH - later @all!
 
@Mat'sMug C ya!
 
okay let's see how bad I slaughtered
0
A: Binary search use in simple guessing game

MalachiI too am late to the game, let's see what I can make of this code I would merge some things together, like your print statements, there are two places in which you have two print statements where one would be sufficient. I have moved them around, hopefully I didn't murder C in any way by doing ...

I will check back when I am done testing my code at work
@BenVlodgi I mentioned you in my post as well.
 
9:00 PM
:D I saw that
> Master BenVlodgi
 
it made sense to use a Do While and I saw you made use of one as well
3 more Rep and I pass up another user whom I won't ding this time around
@BenVlodgi did you make it past 2k yet?
 
not yet!
 
wish I would have read your answer so that I could remove the "&"
now I need 124 more rep to pass @yuushi if he doesn't get any more rep today and tomorrow.. thanks santa
HTML is the Next tag that I should badge in, unless I take or by storm in the next couple of days/weeks/months
 
9:15 PM
aweee yeah
yah, at first I thought it was there on purpose, I cant always remember what methods want addesses or values
thanks @santas!
and it is TTQW peace!
 
Hmm, I'm not getting much love on my answer for some reason...
@Malachi Let's make a trade, a vote on your post for a vote on mine?
 
Long day in the office ... had to work .... drat
 
hi all
 
Hey @janos
 
ditto, hey janos
 
9:36 PM
1
Q: Tree Template Class Implementation for C++

Joe GI have not done any parameter checking, however I think the meat of the class is there. Let me know what you think. #include <cstddef> #include <vector> using namespace std; template<class T> class TreeNode { private: T* data; TreeNode<T>* parent; vector< TreeNode<T>* > childre...

0
Q: using an int variable as index in an array

Joe MurrayI am putting together a fairly simple server that listens for a connection then creates this thread - textbook java code - then accepts data on that connection. I am following a protocol that the manufacturer has laid out for SOM and EOM as below. I then simply populate a byte array with using a...

 
@syb0rg I think I voted on your answer on that C question already
 
Yay, 3K /o/
5
 
@Morwenn Congrats
 
@JerryCoffin Thanks :)
 
@Morwenn Nice!
 
9:40 PM
Hm. I'm surprised this answer of mine received 9 upvotes already. I didn't even spend much time on it as I was doing other things.
 
75 more rep until max. I am really getting things goin!
 
^ "using an int variable as index in an array" is a pretty sloppy question.
 
@Jamal You post many answers. No wonder some of them get many upvotes, even more if they are easy to understand :)
That's said, I was only passing by. Time to go to bed.
Sorry, TTGTB.
 
@Morwenn That was my initial thought (probably also how this received 10 votes).
 
@Morwenn Good night.
 
9:43 PM
@Morwenn good night
 
@Morwenn Bye!
 
Bye!
Thanks, Santa!
 
argh, I almost finished writing the answer on that one... :(
> This question has been closed - no more answers will be accepted.
 
0
Q: Find Minimum Number of coins

bazangPlease be brutal, and treat this as a top 5 technical interviews. Suppose I am asked to find the minimum number of coins you can find for a particular sum, that is say coins are 1, 3,5 and sum is 10, answer should be 2, since i can use the coin 5 twice. Time Complexity = O(n^2) Space Complexity...

 
10:02 PM
Wake up, bot. Find my post!
 
0
Q: DiagnosticAnalyzer for Roslyn that guards against catch-all exception clauses

Jeroen VannevelDabbling around with Roslyn and made a small analyzer just now. This one will show a warning in Visual Studio when you have a try-catch statement that only has a catch(Exception e). I realize the working code (AnalyzeNode) is rather small, but I'm looking for feedback on best-practices (insofar ...

 
About time
 
@rob0t is back online

 CR Answers

RSS Answers Feed
 
0
Q: Cleaning up repeated calls to NSMakeRange()

nhgrifIn Objective-C, many of the NSString or NSMutableString methods for comparing or manipulating strings require a range argument--that is, an argument of data type NSRange (a struct containing a starting position and a length). This applies outside of NSString (NSArray for example), but NSString i...

 
10:22 PM
How this question managed to not get closed is beyond me. The fact that it's a Hot Network Question astounds and embarrasses me.
0
A: Binary search use in simple guessing game

200_successI'm thoroughly puzzled by your use of the response variable. The condition for the while-loop is response != 'Y'. The first time through, response is an uninitialized variable, containing any imaginable int value. So, the behaviour of your program is undefined. response is an int. Why are yo...

I'm not sure if there was a more diplomatic way of saying that the code is completely broken.
 
@200_success so switching it to getchar was a good thing??? I didn't know what I was doing, I was just trying to clean up the code.....
 
getchar() could have helped, except that that's not how you call getchar().
 
@200_success would you enlighten me, I don't code in C, at all, ever
 
response = getchar();
 
@200_success Just as I was astounded with that Game of Life question. We have tons of those already.
 
10:28 PM
@200_success would that still request input from the user? I am a little confused after reading the link you posted.....
so this would be valid?
response = toupper(getchar());
 
That could work.
 
I edited my answer.
thank you @Jamal
in C# you don't need those trailing semicolons after the while statement of a do while, at least I don't remember it ever causing me issues....
137 rep today, only need another 65 to rep cap
 
10:46 PM
0
Q: In Python, is there a faster way to build a dict/list of lists?

ErotemicI have code which is matching features within regions. The first thing it does it matches features from one region to an entire database of region features. So I have a mapping from query feature index (qfx) into database feature index (ax). A database feature index has associated with it a reg...

 
I tend to disagree with the use of var for known types: from c#3.0 language reference... "Overuse of var can make source code less readable for others. It is recommended to use var only when it is necessary, that is, when the variable will be used to store an anonymous type or a collection of anonymous types." — Nick Williams 1 hour ago
ugh
@NickWilliams I tend to disagree with what's considered "overuse" of var. I don't see how cutting redundant clutter reduces readability, and using var or not boils down to personal preference - in my answer I only recommended consistency in its usage. — Mat's Mug 9 mins ago
So Stopwatch sw = new Stopwatch(); is so much more readable than var sw = new Stopwatch();... Holy Warz......
 
Hello @TomBarron
 
@Mat'sMug I agree with you you actually assign it a specific value anyway, there really isn't a difference....
 
there's no difference whatsoever. if you don't get what the type of a new StopWatch() is, it's not because there's a readability issue on the left of the assignment, it's because you're not reading the dang code!!!
2
 
11:05 PM
@Mat'sMug just posted a BS'ing answer on that question...let's see what happens....
TTGH
 
0
Q: assembly.GetTypes() vs assembly.DefinedTypes.Select(t => t.AsType());

Oğuzhan Topçupublic static IEnumerable<Type> GetAccessibleTypes(this Assembly assembly) { try { #if NET40 return assembly.GetTypes(); #else return assembly.DefinedTypes.Select(t => t.AsType()); #endif } catch (ReflectionTypeLoadException ex) ...

 
@Malachi huh?! ........uh, well, answer ratio FTW! ...
@StackExchange off-topic
 
Hi, Syb0rg
 
11:20 PM
0
Q: Python Email Program

Tj FI've written this email program in python, and I would like to improve upon it. (i.e., Closing the server twice after the raw input is kind of silly.) import console import socket import smtplib from getpass import getpass user = raw_input('What is your name? ').title() host_name = socket.getho...

0
Q: Does the implementation of Coordinator class correct?

theateistI encountered with the following code in the work. According to the explanation I got from the person who wrote this, and which supposed to be the architect of the company, the MyItemCoordinator should receive MyItem objects, process them, add them to MyItemList collection and then pass them to t...

 

« first day (347 days earlier)      last day (3664 days later) »