« first day (569 days earlier)      last day (3441 days later) » 
01:00 - 14:0014:00 - 00:00

2:30 PM
final ZoomCompoenentImpl ocmpoennt = tuhs;
fianl
4
I had to take a small break after that
 
10/10
 
sometimes your hands just go out of sync... I guess it's a race condition of sorts
3
 
I would really like that post to be stickied so everyone who comes into code review to see how good we are at our purpose that we write stellar code like that ;)
@Pimgd you should try using the volatile keyword
 
@DanPantry then my hands could explode
 
@Pimgd no race condition
 
2:33 PM
I'm not sure whether I'm okay with my hands exploding
True... they'll be in sync.
 
you should be able to lock them synchronized on something...
but I am not sure what you got near, that could be locked on.......
 
Well there's a problem
They're using a shared resource, of course, but it's designed to be shared
I can't restrict keyboard access to a single hand
that would cost too much performance
 
no synchronized then... dammit.
how about wrapping the keyboard into an Atomic Reference?
 
... wouldn't that be rather tiny?
It's a strange design, sure, but I need the resource to take some space
for an uh
hands-on approach
(badum-tish)
 
ehh just because it's an atomic reference that doesn't mean you couldn't store a universe behind it
that's why it's called reference...
the only difficult part is squeezing both your hands through the reference at once, and that's exactly the point, right?
 
2:43 PM
alas, I lack the imagination to apply the concept of a reference to the real world
 
... don't make me think stuff like that please..
it's.. unsettling
 
Okay, one could tag it with a label, but ... what's an atomic label?
(aside from very tiny)
 
atomic
and a label
 
well it's a label.
you can... label stuff with it..
 
you guys really sound like two high school stoners that are spaced out
3
 
2:45 PM
It was a cool discussion until you suggested an atomic reference
 
(get it? spaced? atomic)
 
then again, I'm not sure how I'd go about locking my keyboard
(bad Pim, don't lock on resource, lock on a separate final object)
 
looking bad for us
or for @Pimgd
 
Aww yeah I'm racking up internet points
with a 5x combo
 
Just put my comment in the context of the other comments
:p
 
2:47 PM
inb4 OT broken code homework question
 
close vote queue is empty, though.
aaand it's here
any moment now
 
i actually went to check the queue.. you fooled me..
 
0
Q: Issue with Address book program

user58791My professor gave us this source code as a template for a project and there are errors when BinarySearchTee is called. I'm not entirely sure as to why this is? import java.util.Scanner; import java.io.*; public class useBinarySearchTree { public static vo...

Capt. is too slow
 
there we go
wow, a do {} while()
 
what
 
2:51 PM
been a while since I have seen that
yup
oh.
 
wait whaaaaat?
 
no that's just bad reading
 
there was an if.
;-;
 
It's a do if else while
 
just testing you
 
2:52 PM
building experience with manual testing, huh?
rub rub
That felt out of context and horribly mis-interprettable
but if I explain it, the joke will die
what to do...?
 
lol
 
0
Q: Issue with Address book program

user58791My professor gave us this source code as a template for a project and there are errors when BinarySearchTee is called. I'm not entirely sure as to why this is? import java.util.Scanner; import java.io.*; public class useBinarySearchTree { public static vo...

 
that is enough internet for me today
off to go back to work with my horribly swollen eye for an hour
 
... it works better in Dutch "wrijf wrijf" -> rubbing salt in ones wounds -> "wrijf het er lekker in"
basically I'm teasing you with your manual testing
aww, now it died
 
i got the joke my friend :)
 
2:58 PM
3
Q: How can magic be used to drive somone insane - later

Monty WildIn my world, I have a form of magic that can be used by a practitioner to connect with a subject's mind at touch range, and effectively give an experienced, powerful practitioner total control over that person's mind and body. Such a practitioner could easily kill an individual, or - given a min...

Dammit, worldbuilding
nooo
hardcoded limits =/
The camera platform won't support any SD-card that has more than 2047 GiB
 
3:22 PM
0
Q: SQL - Dynamic, avoiding SQL Injection

indofraiserAim: Dynamic SQL based on user input Use: User search boxes to get a result Query: Does the below leave the code exposed to SQL Injection attacks? --Declare Variable to hold the Dynamic SQL DECLARE @vSQL varchar(max); DECLARE @sSomeValue varchar(max); DECLARE @sFirstName varchar(max); --Your...

 
Also this is a bit late but
I take offense to being called a high school stoner
as I've never actually taken any recreational drugs
 
recreational drugs...
you mean like.. alcohol and nicotin?
 
yeah
and weed and such
my vice is gaming =D
and micro gambling maybe, but I'm not sure if it's a problem if you're scoring a profit
 
3:44 PM
posted on November 24, 2014 by user3204810

I created an addon for WoW, and for its new version I need to convert the database format, so I need a function to do it automatically This is the current format: MyAddonDB = { ["profiles"] = { ["Mage"] = { ["Bars"] = { { { ["castbyme"] = true,

 
dat self-delete...
faster than Captain
well that doesn't seem like much today anyways...
 
0
Q: optimize couchdb reduce function

KnerdI have a couchdb view with the following view/reduce function. After working over 2 hours on it, I have a result I am happy with, but I believe there is a lot of room for improvment. Basically I would like the code a bit more slim :) Maybe one of you has an idea, i am out. reduce: function (ke...

 
4:02 PM
in VBA, 5 mins ago, by vba4all
20K.. my life is meaningless now :p
 
4:13 PM
0
Q: Is using for loops the only method to perform matrix multiplication in C/C++?

user4275686for (i = 1; i <= x; i++) for (j = 1; j <= z; j++) { c[i][j] = 0; for (k = 1; k <= y; k++) c[i][j] += a[i][k] * b[k][j]; } I have the above code for multiplying two matrices but it is very hard to comprehend how all the three loops are working.For me its like imaginin...

-1
Q: open a file in perl

aa1992open(d1,"<f1.txt") or die "cant open file"; while(<d1>) { $l=$_; if($l=~/^\d+.*\.$/) { print $l; } } close(d1); I am new to perl. Can anyone explain what does $l=~/^\d+.*\.$/ do. Why is it used.

0
Q: Bash script for Git & VSS interop

chrispepper1989I have been slowly evolving some code for Git and VSS interop based on a quest I started a while ago And the code is now working, some parts have been updated without test (such as the init) and I am not 100% sure everything is doing what it should/is the best way and some parts seem really roun...

 
4:42 PM
0
Q: Time limit exceeded for SPOJ problem Prime generator

Mukesh ThawaniInput The input begins with the number t of test cases in a single line (t<=10). In each of the next t lines there are two numbers m and n (1 <= m <= n <= 1000000000, n-m<=100000) separated by a space. Output For every test case print all prime numbers p such that m <= p <= n, one number per l...

0
Q: (Python 3.4) Searching text for a string

Liam SchummThis is my current code: def search(word,source): places = [] for x in range(0,len(source)): if source[x] == word[0]: if source[x:x+len(word)] == word: places.append(x) return places How would I optimize this without using regular expressions?

 
5:09 PM
0
Q: Node.js Script may have memory leak

DrakaSANI use this node.js script to migrate MongoDB collection to a schema to another, it does work if the collection is <20k documents, but slow down to a crawl and sometime throw a FATAL ERROR: JS Allocation failed - process out of memory. Is it because of a memory leak? Or the intensive call to proc...

 
@CaptainObvious Is this on- or off-topic?
 
@Phrancis no clue.. but I can't tell, so if there's someone knowledgeable voting I'd chain in there
 
Schrodinger's Code. It works and doesn't work at the same time.
 
5:39 PM
@Phrancis sounds like Simon's Code.
 
0
Q: Stack with a minimum

Tehan FragoA practice interview question. Question: How would you design a stack which, in addition to push and pop, also has a function getMin which returns the minimum element? Push, pop and min should all operate in O(1) time. class stackWithMin { private: std::vector<int> stack; std::vector<int>...

0
Q: Entering two integers and returning a decimal fraction

kleinfreundAfter a couple of small programs in Python we are now asked to do some basic stuff in Java. I don't really know where to start to improve this and whether it's even necessary. This is an exercise, so the resulting message for when the denominator is zero should not be taken too seriously. impo...

0
Q: CSS folder structure

pertpoertMy colleagues and I sometimes write not readable and not maintainable CSS, because we are working in damn "move fast” mode. So, I made some CSS folder structure, which I think help us to: keep stylesheets maintainable; keep code transparent, sane, and readable; -keep stylesheets scalable. I...

 
@CaptainObvious WHO THE {CUSS} UPVOTED THAT?
 
@CaptainObvious FGITW'd it
 
@SimonAndréForsberg saw, had the same points, discarded draft
 
5:54 PM
FRITW rules :)
(Fastest Review In The West)
 
I was wondering for a second
 
By the way, apparently Santa's on StackOverflow today, got a random upvote on this one:
3
A: Why is prototype necessary for inheritance in javascript

Simon André ForsbergThis is what I think is the most important, and a simple explanation. This code will create the function once for each object: this.Display = function () { alert("Id=" + this.Id); } Using prototypes, the function is instead created only once and applied to all objects of that kind. Wastes...

don't even remember having written that answer, was such a long time ago.
would be interesting to hear what JS experts here think of it
 
@SimonAndréForsberg ummm folder structure only was off-topic by miles last time I checked.
 
@Vogel612 it can be part of a review though, can it not?
 
@SimonAndréForsberg but that's completely beside the question asked..
 
5:56 PM
@Vogel612 any suggestion for how my comment could have been improved?
 
also why the frigging heck do people think folder-structures can be reviewed???
 
because why would they not think that?
 
drop the "you might be disappointed" in favor of "your question is off-topic, since there's no code to review"
because a folder-structure doesn't have a single LoC...
sure the files inside may have, but WAT?
 
thanks jamal for all your help and supporting. really i will not be able to communicate in site without you help. — MORTAL 7 hours ago
3
 
5:59 PM
Where's @rolfl recently? Haven't seen him for a while.
 
Looks like I have a fan.
 
@Jamal Before you know it he will earn the Copy Editor badge.
Any chance we could rename that badge to Jamal Editor?
 
aaaand self-deleted..
wow..
 
@SimonAndréForsberg
 
I think his english and fluff-intense tone might be too much for me today..
 
6:03 PM
hello
 
hello? Whatever happened to a good old MONKING?
 
fiiiine, monking ;)
 
JvR
Good even...king?
 
My last Java project is over unit-testing, and we only have to test a few methods among two classes.
 
6:11 PM
unit testing, yesss!
 
It might be easier than Swing. At least it looked pretty simple in class.
 
JvR
You mean there's stuff that's harder than Swing?
 
@JvR hmm... yes.
but it's really not much
Toodles!
 
JvR
Cheers!
 
@SimonAndréForsberg He's Hidong.
May as well leave that typo.... again.
 
JvR
6:17 PM
My crossing eyes read that both as "hiding" and "high on bong".
 
@rolfl Hi, Hidong!
 
Minkong @all ;-)
 
Diddykong!
 
hey hey @rolfl, long time no seeing!
 
Apparently, I have been around, lurking.
I hav been entertaining and working.
 
JvR
6:22 PM
Was the entertainment intentional, or was it a by-product of work?
 
no, I am hosting lady unicorn, a stuffed toy.... showing her a good time ;-)
 
JvR
Awww. :D
 
0
Q: Memory game with Turtle

TomislavA while back I had to do a project for school in Python, creating a game or something interesting. I decided to make a memory game. The code isn't really nice and neither are the variable names. It's not supposed to look good, and all that matters is the functionality. I had done a lot of movemen...

 
Is that the Toronto CN tower I see there in the background @rolfl?
 
Dammit Edward. >.< I might lose the checkmark.
 
6:36 PM
@Jamal Did you just invent this tag wiki for ?
 
I got it from SO. Is it not the right one?
 
At least that's what all three questions have been about.
 
Oh, okay
 
Should we rename it to [turtle-graphics] or [python-turtle]?
Actually, the SO tag is messed up too.
 
@Phrancis no, not my pic. I believe that's berlin
 
6:42 PM
0
Q: Generating fiscal calendar dates

Mat's MugI need to generate a T-SQL script for loading data into this table: create table dwd.FiscalCalendars ( _Id int not null identity(1,1) ,_DateInserted datetime not null ,_DateUpdated datetime null ,CalendarDate date not null ,CalendarDayOfWeek int not null ,CalendarDayOfMo...

 
@Mat'sMug what is is called when the ASP.NET server rejects a post back because the page isn't the same page it rendered as a response?
does that make sense?
 
@200_success maybe is better
 
@Malachi no idea!
 
@Mat'sMug something like post back validation maybe?
 
@Jamal I didn't put because I didn't feel the tag description worked with what I was doing.
I guess it somewhat vaguely makes sense to have it though
 
6:55 PM
Is using assertions in regular code some kind of "fishy" unit testing?
 
it's not unit testing
 
@Mat'sMug True, maybe I misworded it up there...
I more mean that usually shouldn't unit tests remove the need to do assertions in code?
 
eh, in a way
but not entirely
it's just another form of defensive programming
 
The thing that bothers me if I see them somewhere mid code
 
it does document was assumptions the code is making, so I'd put in under the "good practices" column
 
7:02 PM
You'll find it a lot in MS libraries
 
To me it's screaming like... I'm pretty sure that we can never get into insert unwanted situation here, but to be extra extra sure, I'll put an extra Assert on it
 
It's the same thing as putting [NonNull] annotations before parameters
58
Q: When should assertions stay in production code?

Carl SeleborgThere's a discussion going on over at comp.lang.c++.moderated about whether or not assertions, which in C++ only exist in debug builds by default, should be kept in production code or not. Obviously, each project is unique, so my question here is not so much whether assertions should be kept, bu...

 
I disagree with that... That's plain defensive programming and will trigger exceptions if others put in wrong parameters
 
JvR
@skiwi I'd rather see that than have the code go sailing fiery into the nether regions where no programmer can predict its path. ;)
 
What's the difference between [NonNull] and assert(arg != null);?
 
7:06 PM
I'd guess nothing
 
Good evening, folks.
 
evening @kleinfreund
 
@JeroenVannevel If it's at the top of the method, then nothing
 
@Mat'sMug you hit the nail on the head
 
It's just easier on the mind if you have a complex piece of code
 
7:08 PM
assertions are useful to document your pre-conditions and post-conditions
 
You basically have intermediate checkpoints
 
Just curious, is there anyone else here who is watching Homeland ?
 
for example you have a private method with param int num, and since it's private, you know for a fact that it will never be called with num=0
 
0
Q: My type system here feels clunky, and I suspect this may be a problem with the overall architecture

JosiahThis being code review, please voice any and all problems you see in the code whether they directly relate to the question Title or not. The basic jist of the software is that it stylizes the shell prompt (in the example, just Zsh, but could be configured to style Bash, Sh, Fish, etc.). Future...

 
then, it's good to add the assert to codify that assumption, to document it for future maintainers who might change the code and not know this important assumption
 
7:11 PM
@200_success [turtle-graphics] reminds me of [logo]
wow..
coming back. one message. star...
 
@JeroenVannevel are we talking C# or Java? Assuming C#. I'm not quite sure about C#, but I know that very often in Java, the assert keyword has no real effect.
 
you have to build with a certain flag to enable them
 
JvR
Yup, I am the proud owner of that star. There may be many like it, but that one is mine. Because Logo had me go blast from the past.
 
your IDE does that when you run unit tests
 
Thanks for the reviews. @janos @Simon @200
 
7:14 PM
you're welcome!
 
0
Q: How can i make this C code more efficient?

quidstoneThis is code of sieve of eratosthenes.....can i make it more efficient? or is there any way to do that? #include <stdio.h> #include <string.h> #include <math.h> void setvalue(int array_copy[], int i, int n) { int j,p; for(j = i*i ; j <= n ; j +=(i*2) ) { array_copy[j...

 
am I right here? ->
This is not a code review. It's good to share your solution, including the bugfix, but in my opinion that doesn't make it a better answer than mine. I disagree with your decision to unaccept my answer in favor of this one. — janos 7 hours ago
 
He unaccepted it? At this point, I feel that others might as well flag such answers for CW conversion. I don't recall a single user CWing their own such answer.
 
he accepted my answer a few days ago, then he accepted his own today
 
Wow
 
7:32 PM
0
Q: Joomla! 2.5 backend component adapted to Joomla! 3.3: Toolbar has stopped working

TheGardnerEffectWhile adapting a Joomla!2.5 backend-only component to Joomla!3.3, I've ran into the issue of the toolbar in the data edition page not working at all. Only two buttons were declared: Save and Cancel; neither do anything. Upon first glance, the problem is neither on the view.html.php file, nor tmpl...

 
Put an updated file on Gist: gist.github.com/kleinfreund/a03dfc7b80fdd8b760e0 (Regarding my first Java code review)
 
why not declare numerator and denom on the line where they are assigned?
 
Or at least put a post notice please, that's not an answer as we want it, right?
 
ouch, he got severely punished...
 
@janos Huh, weird. That was one of the first things I changed. I moved the statements in the try block and got an error and assumed I can't declare them there. I think I forgot the last print statement which referenced them outside the try-catch-block.
 
7:46 PM
I guess many users are just reading the headers and nothing else.
 
in the posted code, you can declare them inside
 
Yeah, you're right. Thank you.
 
@kleinfreund btw what do you expect to happen if you enter a string as numerator?
I mean after the exception is caught
 
The message in the catch block gets printed and the program exits.
No?
 
ok then, just checking ;)
 
7:48 PM
Probably not the most useful thing, however this a super basic program.
 
a bit odd when a program tells you to "Please enter an integer" and then it just exits
how about "Dude that's just garbage. Better luck next time, byez."
4
 
and the line breaks are odd in new BufferedReader
 
Is there some sort of styleguide for Java like PEP8 for Python?
 
@kleinfreund not that strict and all-compassing, but there's the oracle styleguide from 1999
 
7:57 PM
I imitate the style that IDEs' auto-format function does
 
for example in eclipse control shift f
 
I currently stick to Sublime Text and command line. Probably switching to IDE later.
 
very hard to code in java without IDE
unless your computer is low-spec, I recommend IntelliJ
 
0
Q: Djkistra, Kruskal, Prim implementation for adjacency list represented graph

singhalmanikPlease review the implementation of Djkistra, Kruskal, Prim algorithms. Points on which I have doubt: My Graph doesn't have any ID for nodes. Nodes are accessed based on their data. Is there any general approach in that? Should nodes be referenced by an ID as that will also make these algo som...

 
8:02 PM
since the Punisher (@Vogel612) is here, here's another suspect:
Although this is interesting info, it's not a review of your posted code. You should delete it. — janos 2 days ago
 
can't delvote yet...
need 2 more downvotes..
let's shoot it down
 
that's the spirit :)
 
proposing new zombie definition: Bad quality answers!
well not yet but eh
 
a catchy name would be nice for these
 
8:23 PM
no idea..
nothing catchy that is
 
8:49 PM
0
Q: Dovecot user add & delete bash script

powerthrashI learn BASH scripting occasionally from time to time, now I am working on a simple bash script that serves to maintain dove-cot user database. The general purpose of the script is able to list, add or delete user entries in the specified file. Please add some comments about the code - common mis...

0
Q: Making Complex "Functional" Code Readable

Dropped.on.CapricaI've written a method that takes an object whose keys are arrays and converts it to an array of objects. I feel like the code is fairly complex, after waiting a week or so and revisiting it, I don't think anyone would be able to really understand what is going on, especially if they aren't used ...

 
but ... the Punisher...
I like the sound of this
 
WHO WAKES ME FROM MY SLUMBER!!
 
hm, the first one
posting on meta, hang on
unless there's something similar already for this
 
Business hours include: 8:30 AM - 7:00 PM, 0:00AM - 1:30 AM and 7:00PM - 0:00AM after notice
 
8:56 PM
0
Q: Optimize Python script to iterate over list

JN11I am collecting tweets using a Python script and I want to store them in a database. I want to find out the lowest tweet id and for each tweet, I want to change the id field to an _id field. Is there any way I could optimize this piece of code? search_result = #list of tweets min_id = float(...

 
see about me
 
lol :)
0
A: What's a Zombie? And what are the many other memes of Code Review?

janosMeme: calling-the-punisher Originator: @Vogel & @Janos Cultural Heigh: The 2nd Monitor Background: On Nov 24 2014, the following remark was made in the chat room: Janos: am I right here? -> This is not a code review. It's good to share your solution, including the bugfix, but in ...

 
MLM
9:13 PM
I am having trouble deciding on which answer to accept on my question: Convert Object Keys according to Table/Map object. konijn's answer is great and helped me get to my final solution. But my answer code is slimmer and combines the convert/revert into a single understandable function. For future onlookers, what do you think would be best?
 
On Code Review, we value the review more than the final product. Which answer had the most insightful remarks?
It's very rare that the original author's follow-up post is more insightful than the answer that inspired the rewrite.
 
@janos neither answer has been deleted yet... to my great dismay that is
 
MLM
@200_success Thanks, I think your statements make it very clear that konjin's is better for future onlookers as it shows how to improve the code in question directly.
 
the 2nd was deleted by 200
 
0
Q: Convert plain text to HTML C#

sDimaI have the ToHtml() Extension Method public static class StringMethodExtensions { private static string _paraBreak = "\r\n\r\n"; private static string _link = "<a href=\"{0}\">{1}</a>"; private static string _linkNoFollow = "<a href=\"{0}\" rel=\"nofollow\">{1}</a>"; /// <summary>...

 
9:20 PM
I converted the answer into a comment. Had the author done a better job of posing the question, so as to avoid the X-Y problem, it might have been appropriate to post such an answer.
 
9:34 PM
0
Q: Is this implementation of doubly linked list correct?

FooI am trying to follow the template provided here to create a doubly linked list in java. This homework is based on this lecture. Can someone please review my implementation? No change to this part of the code /* DListNode.java */ /** * A DListNode is a node in a DList (doubly-linked list)....

 
Spotted a gem in the hot network list:
6
Q: Acceptable interview answer: To be honest... I just need to earn some money?

Physiks loverI've always given the standard bullsh** answer to the usual interview question: Why do you want to work for us? To work at your company is an exciting opportunity for me to exercise the immense knowledge I've gained so far, and to progress further in my career. Would it reflect badly upon me ...

 
@Simon Watching a Wallander now. :)
 
@kleinfreund that's more than I have ever done.
TTGTB
 
I actually like them. All three variations.
 
9:50 PM
0
Q: grunt-uncss: Object build/html/index.html has no method 'forEach'

khalwatI've looked at the examples on the github page, but this has me scratching my head as to why it's not working. Grunt file: uncss: { dist: { files: [ {src: ['build/html/index.html'], dest: 'public/css/site.tidy.min.css'}, ], options...

 
Offtopic.
 
broken
 
10:39 PM
man this looks sloppy
I recursively set a session variable.... ugh.
yeah I broke it....lol
 
10:57 PM
fixed it but am having an issue un approving a user?????
 
0
Q: How can I tell what model iDevice is plugged into my USB via Terminal?

nhgrifThis website has a useful list of the various iDevice models. And the "identifier" column is helpful for any iOS developers, as this is the string you can fetch in your application to determine what kind of device your program is running on. However, for reasons, I am interested in determining ...

@Malachi What are you talking about?
 
0
Q: Multifunctional Monty Hall Simulator

Tyler WBased on this question on math.SE regarding probabilities in variations on the Monty Hall problem, I cobbled up a simulator in Ruby to give myself an introduction to the language. Since this is my first Ruby program, I'm especially looking for feedback regarding Ruby style, but I would love any ...

 
@nhgrif I am trying to set up an admin page for a website, and I am having a hell of a time trying to get my approve/disapprove functionality to work with Radio Buttons.....
I got it to work, but it is being weird.
TTGH though! Thank God!
 
11:29 PM
This is the most boring presentation ever
General information about Randstad holding
Why can't they just ask me to talk a little in French and English about any other subject
Maybe even something ICT related. That would be nice, being an informatics class and all
 
0
Q: Code reads user input and keeps asking them for answer until it falls within specifications

Mark CalhounSo, what I'm trying to do is make it so that the user has to keep entering things in until they follow the specifications listed, which is it has to be a number between 1 and 5. But that happens is they cn keep trying and trying, but when they finally get it right, and the number is stored into a...

 
offtopic
 
01:00 - 14:0014:00 - 00:00

« first day (569 days earlier)      last day (3441 days later) »