« first day (209 days earlier)      last day (3795 days later) » 
00:00 - 17:0017:00 - 00:00

5:03 PM
0
Q: What should be the name of our main chatroom?

retailcoderOur main chat room is currently called Code Review General Room, with "General discussion about Code Review." for a description. I propose The Zombie Hunters' Lounge, but I'd like the community to post their ideas here (1 per post, include why it's the best name), the one with the highest number...

 
@SimonAndréForsberg How about you take a stab at my failure.....:
3
Q: Not getting Log(n) performance from quadtree

MiloHere is my QuadTree class and node. The problem is really with Querying. In my game, I have a city which can have n * n streets (randomly generated). And each street has buildings. What I do is put all buildings and roads in a quadtree and render the result. The problem is as the city gets big...

 
0
Q: Splitting the GUI into Smaller Classes

nihirusCurrently I am working on a course project and have been assigned to write a GUI. I wrote it and its about 2000 lines of code and it will be bigger when I add the sql codes and new panels. So, I successfully divided it into different classes for each screen. My question is about how to improve th...

 
5:18 PM
@200_success: I've also forgotten to mention that we should no longer use the tag. If a new question uses it or someone adds it, please remove it.
 
@rolfl I've commented in your defense on the .isEmpty() issue.
@Jamal What's wrong with ? I realize that it is used somewhat haphazardly, but it does serve a purpose.
 
@200_success I see that, and appreciate it.....
 
@200_success: codesparkle told me that it should be avoided for the same reason that SO has burninated/blacklisted it.
 
I have been wracking my brains for when I fell victim to O(n) performance on size(). I was sure it was LinkedList, but this may be back as far as Java 1.2 (and I've never used it since).
 
2
Q: Which is the more preferable font size reset?

DylRichoUp until now, I've been using a 14-pixel reset in my theme's main CSS file, but after looking online, I see that a lot of web developers prefer a 10-pixel reset; Here is what I'm currently using: /* reset.css */ * { font-size: 1em; } /* dark-theme.css */ body { font-size: 0.875em; } /* 14 pixe...

 
5:30 PM
Reading meta.stackoverflow.com/q/123758 now… I'm not convinced that our situation is the same as Stack Overflow. SO questions are more likely to be of the Googlable nature, so the would make little difference. Our reviews are more in-depth, and there are significantly different styles of review.
My favourite Socratic review. (More of a puzzle than homework, though!)
 
@200_success: We can always discuss this on Meta if needed. codesparkle only made one note about this to me, and I'm hoping to hear more insight from other mods.
 
@Jamal Please make your case on Meta. I'll write a rebuttal.
 
@200_success: I don't yet have a firm case of my own. I'm just speaking in behalf of another mod who hasn't said anything publicly about it.
 
Excellent! ..... we can both win.
 
5:46 PM
Only need 25 more reputation for today.
 
Updated my answer with an edit.
 
@SimonAndréForsberg: Looks like you have your 25 now. :-)
 
6:02 PM
@rolfl Added a comment to your updated answer
@Jamal I assume an upvote came from you, thanks! (No, wait... that's exactly what we shouldn't say, isn't it?) (removed)
 
@SimonAndréForsberg: No, not from me (I don't understand the code well enough).
(I'm just a very stalker-y mod)
 
6:15 PM
OK, save the rest of your votes on my answers for the rest of the day!
 
starts voting on useless junk
 
Not my useless junk I hope
 
Spam, I mean. ;-)
Today is Upvote All Spam Day! /not
 
1
Q: Rock paper scissors review request

mario amgadI've started learning Python recently and I wanted to test myself. So, can you tell me how many I would get out of 10 and how I could improve my future coding? import random import time print('Welcome to Rock, Paper, Scissors') print(' '*25) wins = 0 loses = 0 draws = 0 point= int(input('How ma...

 
Wait a second, did I just admit to have useless junk?
 
6:19 PM
Yes, let's go with that.
 
7:10 PM
0
Q: Read multidimensional array from file in C

AbbasI want to read multidimensional double array from file into a single pointer variable. The number of rows and columns are not known and need to be determined when reading the file in order to allocate memory for the array. I wrote the following code and it works fine with me. I want to know if so...

 
Stop voting for me, dammit...
You've earned the "Necromancer" badge for Please review my Dangerworld game. See your profile.
 
Sweet, sweet irony if that game included actual necromancers.
2
 
Haha, true that
1874 rep now. Totally maxed for today, unless someone accepts an answer by me.
I estimate that @rolfl will achieve 2k within a couple of hours, and that I will reach 2k tomorrow or on Sunday.
Rolf is ranked 16th for the entire year. I'm on 18th.
 
7:30 PM
Will this earn me a downvote?
0
A: What do you think of my regex for URL validation?

retailcoderAs an addentum to @amon's excellent answer: The Expression Library of the Expresso RegEx tool has this pattern for URL's (C# syntax): (?<Protocol>\w+):\/\/(?<Domain>[\w@][\w.:@]+)\/?[\w\.?=%&=\-@/$,]* Putting it against @amon's test cases yields these results: Stuff in parentheses isn't ca...

@SimonAndréForsberg can you double-check the regex for java syntax?
 
0
Q: Multiple serial URL requests in Objective-C / iOS

Dominic JodoinI want to check the existence of various API endpoints by doing serial URL request. If the first one fails, I want to try the second one, if the second fails I want to try the third one, etc. Here is some code I use to do this: self.apiEndpoint = kAjaxEndpoint; [self testEndpointWithBlock:^(id ...

 
@retailcoder fishing?
 
@rolfl lol (gone fishing) was for "gone for lunch" :)
caught a big mac yesterday, a bbq chicken breast today
 
7:46 PM
@retailcoder - nah, fishing for votes: Will this earn me a downvote?
It does not match with standard Java regex.... but it's not a Java question, so who cares?
 
@rolfl it's , I guess it's different, but I have no clue - no I really meant to ask whether answering a JS question with C# stuff was literally asking for downvotes!
 
Java and Javascript are about the same a C and C#
 
Named capture groups are supported in Java
 
If there's something strange... in your C# code... who ya gonna call? Jon Skeet!
 
7:51 PM
lol
 
If only Jon Skeet was three syllables. :/
 
my thoughts exactly!
@rolfl since when? (did you follow that link to a SO answer?)
 
@retailcoder : http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
about 2 screenfuls down:
Special constructs (named-capturing and non-capturing)
(?<name>X) X, as a named-capturing group
 
Wow just realized the SO post was dated Feb 13 '09... things have changed I guess!
 
8:00 PM
Looks like the '09 post was about 1.4 or around that
@rolfl so the regex I'd use in C# would also work in Java?
 
Here is a javavised version:
"(?<Protocol>\\w+)://(?<Domain>[\\w@][\\w.:@]+)/?[\\w.?=%&=\\-@/$,]*"
no need to escape the /
need to escape the \
 
javavised?
 
Look it up (hang on, let me make the wiki page quickly).
 
you mean it's an actual word?
lol
 
of course not.
(man you C# guys are gullible)
 
8:12 PM
then I can seesharpise your javavised version... and it's just me, not C# guys in general :)
and hey @rolfl has spoken, must be true!
 
There may be a bug in the regex.... could be my translation, but I don't think so.
nevermind.
 
On an unrelated note, how does one refactor a piece of crap code (VB6) that loops over 3 nested ADODB recordsets with 5 levels of If (some branches with Select Case on top of that!)... my head hurts and I feel dizzy trying to get my head around this piece of crap everytime I look at it.
That's when I wish I could post my predecessors' code on CR!!
 
yeah, bug, what about this URL:
1
A: What do you think of my regex for URL validation?

retailcoderAs an addentum to @amon's excellent answer: The Expression Library of the Expresso RegEx tool has this pattern for URL's (C# syntax): (?<Protocol>\w+):\/\/(?<Domain>[\w@][\w.:@]+)\/?[\w\.?=%&=\-@/$,]* Putting it against @amon's test cases yields these results: Stuff in parentheses isn't ca...

That URL fails to validate (ironic, isn't it)
 
it matches everything up to the #
 
exactly ... ;-)
Just read your profile. Not sure whether to laugh, or flag ... ;-)
 
8:19 PM
flag?
 
Life as a programmer .... ;-)
 
the "[...] squirts colored water into a plastic bucket" part?
come on
 
Naah, the hammer part
 
lol
I had to quote this one somewhere when I found it.. and yet maybe I should put a little more actual info about me in my profile huh?
Then you'd definitely just laugh
 
0
Q: I am receiving "elif userChoice == 2: SyntaxError" from this code but I am not sure why. Can someone help me?

Brittprint("1. Calculate Circumference \n2. Calculate Area \n0. Exit program") userChoice = int(raw_input("Please enter a choice: ")) if userChoice == 1: print ("What's your radius of your circle?") radius = float(raw_input()) circum = (2(3.14)) * radius*radius print ("Your Circumference ...

 
8:39 PM
@retailcoder @rolfl I'd almost say that C and C# actually has more in common than Java and JavaScript.
@retailcoder You might want to edit your regex answer and answer for Java*Script* and not Java
 
I rolled it back to 1st rev
Edited, thanks @sim
@SimonAndréForsberg in two sentences, what's the difference?
 
8:58 PM
this is what I have been working on while watching TV, playing browser games, and wrangling kids.
0
A: Rock paper scissors review request

Malachihere is what I would do a little bit differently if human == computer: draws = draws + 1 print('''Human: {} Computer: {} A draw Wins = {} Loses = {} Draws = {}'''.format(human,computer,wins,loses,draws)) print(' '*25) elif human == 'r': if computer == 'p': loses =...

now it is time for going to get 2 things and groceries on black Friday
<sarcasm> YAY!!!!! </sarcasm>
 
2 things ? a 55" LED TV and a home-theater system?
@retailcoder see the score --->
575
A: What's the difference between JavaScript and Java?

Greg HewgillJava and Javascript are similar like Car and Carpet are similar.

 
wow!
 
@rolfl two toys for my best friend's kids who are also my daughter's best friend and my son's best friend
 
Ahh, so an XBox and a PS3 ?
 
@retailcoder Two sentences? All right: Everything. And then a little bit more.
 
9:03 PM
@rolfl that's easy: one is Microsoft. the other is Sony :p
@Malachi careful, I heard it's a jungle out there!
Who put the "Java" in "JavaScript" then?
 
I'm also wondering that. Then again, who put the "C" in "C#"?
 
The same people who put the 'F' in 'F#'.
 
@retailcoder I tried to go get some groceries last night at like 6:30 pm.....ooops
 
And the "D" in "Donuts"
 
that wasn't happening
 
9:07 PM
Not that that makes any sense, but still...
@retailcoder Another explanation about the differences: JavaScript covers one quarter of the entire page YourLanguageSucks. Java covers just a bit more than one screen.
 
lol I like that C# is like 10 bullet points
 
@retailcoder I do like that it says on the C# section "This section is only a stub. You can contribute by subscribing and expanding it."
 
The C# section was written by a MS-hater
 
LOL @ "The MSDN documentation of the (hypothetical) GetFrobnicationInterval would explain that it returns the interval at which the object frobnicates. It will also state that the method will throw an InvalidOperationException if the frobnication interval cannot be retrieved."
 
I was about to paste that very same quote right here!!
"Backbase sucks because: Oh really, this subject could take a whole new wiki by itself."
 
9:15 PM
There's no section there about COBOL! @rolfl will have to write one
 
"CSS Sucks because: Hello? Rounded corners? Mac OS had them in 1984. (CSS3 introduces border-radius)"
lol
ooh PHP: "'0', 0, and 0.0 are false, but '0.0' is true"
 
yeah. The sections on PHP and JavaScript are just scary...
 
That whole page is broken.
 
I'm sure it is, but it's quite enjoyable to read :)
 
Each of the criticisms, taken on their own, are valid design decisions.
 
9:19 PM
A sign that it's totally impossible to create "the perfect language"
 
It's like complaining that a screwdriver cannot drive nails in one section, then in the hammer section, it complains that the hammer cannot drive screws.
If you have a screw, use a screwdriver, if you have a nail, use a hammer.
If yoou have a web-page, use Javascript (on the client side). For everything else use Java
;-)
There are your two sentences:
 
Someone please star that message! (out of stars, and apparently "too late" to remove some previous ones)
 
If you have a screw, use a screwdriver, and if you have a nail, use a hammer.
if you have a web-page, use Javascript (on the client side). For ***everything*** else use Java
 
If I could, I'd gladly use Java for the client side as well (applets does not count)
I do think that page has some good points though (even about Java), like this: "java.net has URLConnection and HttpURLConnection : why not UrlConnection or HTTPURLConnection or HttpUrlConnection?"
Actually, this is a better example: "java.util has ZipOutputBuffer and GZIPOutputBuffer : why not ZIPOutputBuffer or GnuZipOutputBuffer or GzipOutputBuffer or GZipOutputBuffer?"
 
1 explanation: blood/alcohol ratio
 
9:24 PM
@SimonAndréForsberg - these things have been hammered out.... those isuses are not a language problem, but a library problem.
If you really want to criticise th libraries, there are much funnier ones....
 
true
Like which?
 
@rolfl [...] for everything else use Java - or COBOL :)
 
This is deprecated.....
... and you ask yourself .... 'Why?' ....
 
"The replacement (...) method defines no changes in behavior." - wtf!?
 
9:27 PM
deprecated because they didn't like the name?
 
No, check the second link.,
 
yeah, you can thank the great company BEA for that one.
 
@200_success nice!
The funny part is: Netscape was the only company who was allowed to call it JavaScript (because Sun allowed them to). That is why Microsoft called their Implementation JScript. The official name of this language is ECMAScript, though. – elusive Dec 2 '10 at 12:38
 
9:32 PM
@200_success Thanks for that link (I'm btw voting to reopen that since the duplicate has been removed)
 
@SimonAndréForsberg just FYI, never use StAX unless you have no choice. It's perhaps the worst designed library in Java I have Ever had the misfortune of using.
 
@SimonAndréForsberg I'd edit the title to "Who put the Java in JavaScript?"... but that would be uncalled for (if not making the title an actual question).
 
@rolfl I have included stax2-api-3.0.2.jar in a project, does that count? I'm doing XML serialization with Jackson in that project and apparently I needed to include the stax2-api jar.
 
Yeah, you need it, and, it does work.... but it is the most poorly specified code out there.
It is part of the native Java7 API
(perhaps not with the same package name... you should maybe upgrade the comonent that needs it).
 
Luckily, Jackson takes care of all the interaction with that API for me.
 
9:42 PM
Actually, Stax was incorporated in Java6.
 
I created the project for 2-3 months ago, so I don't think there's much of an update to the library that requires it.
This answer is really good, if people have some ammo left (that is, everyone except @retailcoder)
2
Q: Which is the more preferable font size reset?

DylRichoUp until now, I've been using a 14-pixel reset in my theme's main CSS file, but after looking online, I see that a lot of web developers prefer a 10-pixel reset; Here is what I'm currently using: /* reset.css */ * { font-size: 1em; } /* dark-theme.css */ body { font-size: 0.875em; } /* 14 pixe...

 
This is the problem with me waiting to the end of the day to start shooting zombies... the 'regulars' are out of ammo.....
:( I have had a bad rep day........
 
You've earned 155 today, how is that considered "bad"?
 
You have to take it in the context of recent performance and current goals....
@SimonAndréForsberg - I'm revisiting 'my' fail from this morning:
3
Q: Not getting Log(n) performance from quadtree

MiloHere is my QuadTree class and node. The problem is really with Querying. In my game, I have a city which can have n * n streets (randomly generated). And each street has buildings. What I do is put all buildings and roads in a quadtree and render the result. The problem is as the city gets big...

 
Edit: 165 today
 
9:55 PM
Have you ever seen 'documentation' like that....?
(the Javadoc-replacement comments)
/// <summary>
/// Get the count of items in the QuadTree
/// </summary>
public int size()
{
    return m_root.size();
}
 
@rolfl No, never seen that. Sounds like either some home-made system, or it sounds like the OP doesn't know about JavaDoc
@rolfl Just noticed I hadn't accepted your answer to my question, violà, 15 more rep to you
 
Thanks, and then someone just voted up another answer of mine, suddenly I am 9-short of 2K.
1 more upvote and I make 2K in 30 days.....
 
One more upvote, @rolfl? :-)
 
Yeah, I have a zombie I answered earlier .... no upvotes yet (perhaps the answer does not deserve them?).
 
@rolfl I think that "someone" happened to be me
 
10:06 PM
@SimonAndréForsberg: I've talked to my professor again, and he said that he hadn't completed his thought when he mentioned i*i <= integer. In other words, he didn't imply that I shouldn't written that. Instead, he said I could write the algorithm with two integer additions and no extra multiplication, function calls, or casting.
 
I knew it wasn't @retailcoder
Thanks
 
@rolfl Update your answer and remove the parts about LinkedList.size being O(n) (and perhaps add something more to the answer) and I will upvote
 
I am stewing over the question/answer .... I know it is broken at the moment, but I want to find the actual problem.
as it is at the moment I should perhaps just delete the answer, but if I update it with a better one it would be, well, better.
 
@rolfl If you delete the answer you will lose some rep, since you have +1 and -1 on that answer
 
I know, but, as I say, I want to get the right answer.... I'm working on it still.
 
10:32 PM
@rolfl: You've just reached 2K! :D
 
Oh?
2001: A space odyssey....!
Watch, people are going to remove their previous upvotes now ... ;-)
 
Better check your moderator tools quickly, then!
 
I have not even got the message in my noification drop-down yet!
 
You may not receive one for every privilege (I think). Just check the review queue.
 
@rolfl Congratulations on 2k! :D
 
10:40 PM
Review page looks the same, aahhhh, I see 'tools'
Lots to explore, but not yet... still working on QuadTree.
 
That's the spirit! Always focus on the Zombies! Don't let your newly-found powers distract you!
 
Oh, and did I mention you could view deleted posts?
 
0
Q: C String Processing -- magnet link example

scott_fakenameI'm trying to get my head around C string processing. I decided to try my hand making a dirt simple magnet link generator... the format that a magnet link needs is "magnet:?xt=&tr=tracker1url&tr=tracker2url&....&tr=trackerNurl" So this program takes as an argument on the command line a hash, and...

 
11:10 PM
@rolfl Congratulations you made it to 2K in 30 days!! ...has this ever happened before in this site?
 
@retailcoder thanks... and not sure.
not really that important... believe it or not, I am not particularly interested in 'scoring rep'.
it makes an interesting diversion though.
 
I believe you @rolfl, and it's a good thing you don't care much: on a graduated site, 2K is the "edit privilege" bar.
 
yeah, I am 6K+ on SO...
Bizarrely, it is easier to get rep here than there.
On SO you have to have a trigger-finger at the ready if you want to beat the others to an answer.
 
Yup.
 
If you are slightly slow, the asker has an answer, probably poor quality, and has accepted it, and moved on.
@SimonAndréForsberg I have updated my log(n) foo-paah.
 
11:18 PM
what do you guys think of my answer on this python question?
0
A: Rock paper scissors review request

Malachihere is what I would do a little bit differently if human == computer: draws = draws + 1 print('''Human: {} Computer: {} A draw Wins = {} Loses = {} Draws = {}'''.format(human,computer,wins,loses,draws)) print(' '*25) elif human == 'r': if computer == 'p': loses =...

very simple.... I know. but it is tagged beginner too
 
@rolfl oddly, lack of hi-rep users is a problem on CR - earning rep hasn't always been as easy. Looks like CR has somewhat grown in the past couple weeks. Or was GraceNote's review all we needed?
 
@Malachi hate to say it, but I am not sure your answer helps at all....
... having the wrong thing printed for each condition does not help... each print should at least say who won and lost accurately
 
@Malachi I think I'd edit out the "review request" from the title
2
 
@rolfl, LOL oops.
 
@Malachi the lines:
    print('''Human: ROCK       Computer: PAPER        Computer wins Wins = {}   Loses = {}   Draws = {}'''.format(wins,loses,draws))
must be possible to reformat as:
    print('''Human: {}       Computer: {}        Computer wins Wins = {}   Loses = {}   Draws = {}'''.format(human, computer, wins,loses,draws))
and then just have one print place (I know no python)
 
11:26 PM
@rolfl I don't know much python either, I was just trying to restructure the logic. but I would do the same and make a Print Method/Function as well if I knew how.
I fixed it so it prints right
 
Look who got star power again!
 
Who? The OP? His name is mario.
 
Lol
 
I have been working on getting my XNA games going on my linux box all day. still not working like I want yet, I am having issues with my content folder. but I think I am going to steal that python code and change it a little bit and make a rock, paper, scissors, lizard, Spock game if I can remember all the path ways
 
I have the episode somewhere....
 
11:34 PM
Ooh I have to watch that BBT episode again!!
 
Ugh. Thought I could vote up that question. T minus 23 minutes!
F-OFF!! That video is not available in your country!!!!!
 
I can view it! :D
 
HEHEHEHE LOL .... QUEBEC IS A COUNTRY .... !
2
I can SEE IT!!!
I am in CANADA!
 
I'm surrounded by Canadians...
And Malachi. :P
 
11:40 PM
Ooh I'm soooo starring that comment as soon as I get to my keyboard!!!!
 
Um... then how did you type that message?
 
@Jamal lol! Samsung Galaxy SIII :)
...and I can see the video from my desktop...
 
My mistake. I'm one of the few who still don't have a smartphone. :-P
 
@Malachi Here are your rules: "Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitate lizard, lizard eats paper, paper disproves Spock, Spock vaporizes rock. And as it always has, rock crushes scissors." -- Dr. Sheldon Cooper
@rolfl I ran to my keyboard before you (removed) that one :)
 
11:58 PM
2 minutes there, @retailcoder
 
wow that was my last star....
 
00:00 - 17:0017:00 - 00:00

« first day (209 days earlier)      last day (3795 days later) »