« first day (798 days earlier)      last day (3220 days later) » 
00:00 - 17:0017:00 - 00:00

12:00 AM
RELOAD!
There are 1350 unanswered questions (94.6573% answered)
 
12:15 AM
@rolfl I fixed that way-too-many-rounds issue ^^
(Now there might be too few though, but I think this one's reasonable)
it's kinda hard to define exactly what a round is, because in the end the rounds themselves are not important, only the end result
 
Hmm. I just realized why my game was running out of memory.
Hmm. Kinda quiet too.
 
12:31 AM
@EthanBierlein and why was that?
 
@SimonAndréForsberg I was forgetting to add a check to make sure that a GameObject hadn't already been created at a specific position. Which meant that almost 100 GameObjects were being created every second.
 
that's not optimal
2
 
12:48 AM
Nope.
 
1:04 AM
lol. Now it's quiet.
 
I posted another C answer, but I still not quite to the silver tag badge.
 
1:51 AM
0
Q: Sorting an Integer Array Using Heap Sort

here4learnI have written the below program to sort an array using heap sort, Please review and suggest if we can improve this little further. public static void main(String[] args) { int arr[] = {14, 70, 51, 16}; System.out.println("Input Array : " + Arrays.toString(arr)); buildMaxHeap(arr,...

 
 
1 hour later…
2:51 AM
Monkevening
 
3:24 AM
-2
Q: using tool tips for windows 8.1 apps

angel rodriguezI was trying to create a tool tip to a makebelieve windows 8.1 app i'm creating... this works in the html file on virtual studio express 2013: <label id="myRichTooltip" data-win-control="WinJS.UI.Tooltip" data-win-options="{infotip: true, innerHTML:'Here is a richer to...

 
3:40 AM
0
Q: Singly linked list, unit testing feedback

SteveTo hone my skills with C++11, I'm implementing a singly-linked list based on the requirements I found at this link. I've implemented code that supports the following subset of requirements from the link above. I would like feedback on what I have so far. The requirements implemented on the poste...

 
3:59 AM
0
A: Create an interface that fits the XKCD Types

Ethan BierleinPython 3, 542 bytes Since there was no mention of absolute hardcoding, or standard loopholes, here's my solution. from itertools import count a={"2+\"2\"":"\"4\"","\"2\"+[]":"\"[2]\"","(2/0)":"NaN","(2/0)+2":"NaP","\"\"+\"\"":"'\"+\"'","[1,2,3]+2":"FALSE","[1,2,3]+4":"TRUE","2/(2-(3/2+1/2))":"N...

 
It looks like I'm getting Copy Editor on Meta.
 
I can't believe that I answered a PPCG question...
 
4:30 AM
0
Q: Exact Replica of Windows Minesweeper

dkurniawanI am a beginner programmer trying to self learn how to write a code. To improve my skills, I'm currently working on a project to create an exact replica of windows minesweeper. It is written in JavaFX and most of the basic code is done. I am able to run the program to play minesweeper without bug...

 
Monknight
 
@Jamal You could get Copy Editor anywhere.
 
5:41 AM
0
Q: Finding which users have the most questions unanswered

Snowhawk04I was looking at a few profiles this afternoon and noticed a few users had plenty of open questions. This led me to wonder which users actually had the highest amount of unanswered questions (both in size and percent). So with all the hoopla I kept seeing in the 2nd monitor about SEDE queries, ...

0
Q: htaccess cleanup

atdcI'm very new to apache and htaccess. I'm still totally new to php. My htaccess has this block in it. RewriteRule ^login$ _user/login.php RewriteRule ^login\.php$ _user/login.php RewriteRule ^_user/login$ _user/login.php RewriteRule ^_user/login\.php$ _user/login.php how do I consolidate this b...

0
Q: Making changes to the search box

kasidyaI recently added a search box to my header by using php get_search_form() in header.php. However, having no knowledge of coding, my search box appears here https://www.shockinpoop.com/. I want to make some changes to the search box. I want it to appear in the center of the title and the nav menu....

 
6:07 AM
@CaptainObvious I'd say off-topic
 
6:20 AM
@CaptainObvious shockinpoop.com?
 
 
2 hours later…
8:05 AM
0
Q: get initials from name input by user

Chris YatesThis was an exercise from cs50. The goal was to get the initials in upper letter of a name that we got from user. So for "barack obama" we would get "BO", input like "abc" should output "A" and so on. I'am interested in knowing what i can do to simplify it or be more efficient. Do i need the ch...

 
8:20 AM
If your looking for suggestions on ways to improve the performance of your code, and your code s working, then this is a question for [link](codereview.stackexchange.com) and not a StackOverflow question! — James Zafar 49 secs ago
I believe this post belongs to codereview.stackexchange.com, not stackoverflow: — Joffrey 15 secs ago
 
8:37 AM
0
Q: code of an algorithm of combinations

PinoI realized this algorithm for generating combinations. It works in the following way, if we have in input [A, B, C] combinations will be [A], [B], [C]. [A, B], [A, C], [B, C], [A, B, C]. While if we have in input [1,1,2,3], the combinations will be [1], [2], [3], [4], [1,2], [1,3], [2,3 ], [1,1,2...

0
Q: Implement Chambolle dual formulation method in matlab

user8264I would like to implement an Chambolle dual formulation method. The method can be summarize as following This is my implementation in matlab. However, it does not give true result (but combine without error). Could you see it and please give me some comment/suggestion for that code %% N...

 
9:25 AM
@200_success why isn't it user interface?
|
3
Q: Get initials from name input by user

Chris YatesThis was an exercise from cs50. The goal was to get the initials in upper letter of a name that we got from user. So for "barack obama" we would get "BO", input like "abc" should output "A" and so on. I am interested in knowing what i can do to simplify it or be more efficient. Do i need the ch...

 
Why should it be ?
 
Because it asks the user to input something and the output depends on the input.
 
It doesn't even ask. It just reads.
At best, , but even that is incidental.
 
I consider that an interactive program, it is different from using command-line args for example
 
Then maybe , but even that is incidental.
 
9:28 AM
Well in fact the interactive-ness of the script is not the main feature
 
It's barely interactive: one fgets() and one printf().
 
Indeed, let's not add the tag.
You convinced me.
 
9:42 AM
0
Q: I can run it using mingw compiler(which came with codeblocks ide) but it's giving me run-time error when submitting to OJ

ZAN#include <cstdio> char dp[101][101][101]; /* char recur(int a,int b,int c) { if(dp[a][b][c] == 'N') { if(a==0 && b==0 && c==0) { dp[a][b][c] = 'L'; return dp[a][b][c]; } else if(a>=0 && b>=0 && c>=0) { if(recur(...

 
10:29 AM
0
Q: Capitalised initials of username

CaridorcGiven a list of words, this program outputs the starting letters of the words capitalized. I was reviewing this question that solves the same task, but over time so many changes accumulated, that I think my programme bears little resemblance to the original one, so instead of posting it as an an...

 
10:55 AM
Monking
 
Monking
 
1
Q: Feedback on code for drawing tool

MichaelI submitted a project and never heard back and I am wondering if my coding style is ok. At the company I work I get feedback, but I'd like to hear from the outside world. It's a drawing tool - the input is in a text file (each on its own line): C 20 4 L 1 2 6 2 L 6 3 6 4 R 16 1 20 3 It's called ...

 
11:11 AM
Your question is suspiciously similar to one of your previous questions. Any reason why this is not a duplicate? What have you really changed? — Simon André Forsberg 24 secs ago
 
11:25 AM
0
Q: Does it matter which direction an icon faces?

JoopIs there any research done on whether the direction an icon faces matters in the recognition of the icon representation? In other words and with a specific case: Would a left oriented search icon (one with the glass of the search icon in the left top corner) be more recognizable and clicked on t...

 
Does this code work? If so, it may be better suited to Code Review. — RedRoboHood 27 secs ago
 
0
A: Algorithm of combinations (problem with time and space)

Simon André ForsbergThe Italian identifiers is making your code harder to understand, first of all. There is only one way to solve your problem. Don't store all of the combinations at once. Use an Iterator instead. Iterate through the combinations one by one, and do the work that you need to do for each one. Then ...

I believe that ^^ is the answer to the question that now has two duplicates
 
12:05 PM
Monking
 
I'm sorry, but I have to disagree. I still think that it does matter what the message says as it is a confusing and misguiding message to the OP. — Simon André Forsberg 1 min ago
 
1
Q: Text when questions are marked as duplicate

Simon André ForsbergWe close questions as duplicates when the code is too similar (or pretty much identical) to a previous question by the same asker. When marking a question as a duplicate the following text is shown: This question has been asked before and already has an answer. If those answers do not fully...

 
6 duplicates
I am in the process now of reviewing, and deleting them.... ;-)
 
In other news:
 
12:10 PM
@SimonAndréForsberg - ^^^^
 
I am sorry I misplaced this question. Thought it was the UX. — Joop 39 secs ago
 
I need to take my picks for the election... No such thing as an easy choice!
2
 
I still think the duplicate-message is wrong, @rolfl, no matter how short time it is shown for others. (and I believe the OP can still see his own deleted questions).
@skiwi Math.random()
 
@SimonAndréForsberg If you'd like, you can provide me your own implementation
 
monking
 
12:12 PM
Hey Dan, all.
 
@skiwi of Math.random() ? Nah, I think the JDK implementation is a good one already.
 
@SimonAndréForsberg - out of interest, these are not duplicates:
-1
Q: Common factor in some cases

ValI have this code: switch (c) { case '-': break; case '0': e = expr(j).reduce(C1); e=not(e); a = and(a, e); break; case '1': e = expr(j).reduce(C1); a = and(a, e); break; default: throw new Exception("Unexpected cube value, " + c); } The cases 0 and 1 are only different by not. ...

But, things from "long ago", are complicated and messy with history
 
@SimonAndréForsberg Well yeah, yours could perhaps be biased :P
 
@Val if (c == '-') handleThatcase(); else duplicateOfYourPreviousQuestion();Simon André Forsberg Dec 14 '13 at 18:11
Apparently I considered it similar enough at the time.
 
Yup, and I'm happy to live with a little mess, but just thought i would point it out....
 
12:16 PM
@rolfl just noticed that account is suspended... seems to be some mess there that I'm not fully sure what it is...
 
> This account is temporarily suspended network-wide. The suspension period ends on May 11 '24 at 18:00.
Suspended for 10 years ..... temoporarily ;-)
3
 
ah yes, like the suspensions in games like League that are temporary, just until 2099.
2
 
-1
Q: Extract SVG attribute properties

philCan this code to parse the definitions of attributes of SVG elements be simplified within the constraints that this has to be a Perl/Windows/ActiveState solution? #----------------------------------------------------------------------- # Extract attribute definitions from: # http://www.w3.org/TR...

^^^^ also not a duplicate
 
taking the plunge and moving over to linux (again). :-)
 
Congrats .... really!
 
12:28 PM
can't afford a Mac at the moment, and I'm tired of running on a less-than-totally-kosher windows
 
Huh, this third question is marked as a duplicate as well:
0
Q: Perl Hash mapping SVG elements to their attributes

philIs there a more reliable way of building a hash of the attributes associated with each SVG element? #----------------------------------------------------------------------- # Hash of SVG elements, attributes,animation from: # http://www.w3.org/TR/2011/REC-SVG11-20110816/attindex.html # P...

dups of:
0
Q: Perl hash mapping SVG elements to content elements

philIs there a more reliable way of getting the content elements for each SVG element? #----------------------------------------------------------------------- # Get Element content from SVG specification from: # http://www.w3.org/TR/2011/REC-SVG11-20110816/single-page.html # Philip R Brenan at gmai...

They are all different, and i think it was a case of irritated users closing out of spite.
 
Or it might be because of....
18
A: How to post a follow-up question?

Simon André ForsbergI think that such question should clearly state that it is a follow-up question to a previously asked question. A good follow-up question should include, in my opinion: Which question it is a follow-up to What changes has been made in the code since last question Why a new review is being aske...

 
Perhaps, I have reopened the two though. They were not dups. I don't see much reason to link them again in comments either, the one, maybe..... hmmm.
I have no idea why this is a dup.....
2
Q: Excel-like column numbering

PM 77-1I have a working code (below) to convert a number to Excel-like (A...Z AA...AZ BA...BZ ...ZA-ZZ) column codes (headers). For simplicity I limited it to 1 or 2 character codes. Can the algorithm be streamlined by using a bit more of elementary math or using it differently? Please note that I ju...

@Simon - think of a reason for that one? ^^^
13
Q: A question was migrated to CR when the OP obviously didn't want a code review. Why?

RubberDuckSo, I ran across this question. It would be a pretty good question except for one little detail: the OP doesn't want it reviewed. ... and am not looking for pure code improvements. Also, in the comments from before it was migrated. (Here, "this site" refers to Programmers.) @DocBrown-...

I reopened it too.
 
@rolfl it was probably closed because of this comment:
that said, I don't think it should be closed really.
 
Probably, and I agree.
 
12:40 PM
(which is why I reopened, as you noticed)
 
1:05 PM
hrm, so was I too hasty in closing codereview.stackexchange.com/questions/96490/…
 
0
Q: My student writes way too much code for simple programs…Is his code format really bad?

oneinazillionYesterday, I asked him to write a program in C++ for Singly linked Lists....And he came up with this horribly long code: I need your opinion on his wy of coding. He seems to be very accustomed to his methods, I wonder if I can help him change. #include<iostream.h> #include<alloc.h> #include<con...

 
it just prints out each vertex it visits...perhaps that's not enough to qualify it as borken?
 
@Yuushi It's not a bug, it's a feature!
(If you don't like it, you can always redirect system out, run the function, set system out back to the old stream)
Yes... I needed to do that a few times in code with "features"
 
@Valerin I suspect your question to be re-open. I think there might have been a misunderstanding. Sorry for the inconvenience — Simon André Forsberg 24 secs ago
@SirPython have we stopped replying to Mr. Obvious now?
 
@SimonAndréForsberg the way getUnvisitedChildNode works means it is -still- somewhat broken
 
1:09 PM
@SimonAndréForsberg I apologize. I did not notice that Mr. Obvious had recently posted that question.
 
@Yuushi for some values of "somewhat"?
 
so it will only return one adjacent vertex
so any vertex with more than one adjacent vertex will not properly visit each neighbour
or at least, is not guaranteed to
 
0
Q: How to break from nested loops?

FooBarIf I normally have some nested loops from which I have to break, I write something like: bool do_break = false; for (int i=0; i<10 && !do_break; ++i){ for (int j=0; j<10 && !do_break; ++j){ if (someThingHappens){ do_break = true; break; }else{ ...

 
@Simon - I am going to reopen this question: codereview.stackexchange.com/questions/37357/… - the introduction of the - and exception case make it significantly different enough to be "not a duplicate".
 
@rolfl fine by me
 
1:16 PM
This leaves just two questions marked as duplicates:
0
Q: Generate the combinations

PinoI must write a program that given the elements in a list , generates all combinations of these elements . For example, if I [A, B , C ] , the possible combinations are [ A] , [B ] , [ C ] , [A, B ] . [ A, C ] , [ B, C ] , [A, B , C ] . Another example , having [ A, A, B] the possible combinations...

0
Q: An algorithm to generate combinations

PinoI implemented this algorithm for generating combinations. It works in the following way. If we have the input: [A, B, C] The combinations will be [A], [B], [C]. [A, B], [A, C], [B, C], [A, B, C]. While if we have in input: [1,1,2,3] The combinations will be: [1], [2], [3...

and they both point to
-1
Q: Algorithm of combinations (problem with time and space)

PinoMy algorithm generates combinations of elements. For example, having [A, B, C ] creates the following combinations [ A ], [ B ], [ C ], [ AB ], [ AC ], [ B, C ], [ ABC ]. Unfortunately for items too large too long and too much memory space, I get java.lang.OutOfMemory thrown. How can I fix? pub...

(which is currently being closed).
 
@rolfl Your opinion on the on-hold question I linked?
 
It seems you have bitten off more than you can chew. Start by producing an Iterator that produces the Natural Numbers. Post it on Code Review to see what you can do better. Then move onto, maybe a Fibonacci series. Don't start at the end then ask to be spoon fed... — Boris the Spider 32 secs ago
 
@Yuushi The one I reopened?
Note, also, that the perl question I reopened as not-a-duplicate has been flagged again as a duplicate here: codereview.stackexchange.com/review/close/40161
 
@rolfl yes
 
@rolfl I see no reason for closing that question. I can understand the downvotes, but it's an optimization problem really
 
1:19 PM
technically I still say it is broken code
 
@rolfl seen this user's "about me"?
phil, Austin, Texas
1 2
@Yuushi Have you tested the code? Have you found a case that doesn't work?
 
@Yuushi I don't understand it, but, what I do know, is that when a number of smart people can't figure out whether it is actually broken, or not, that the user themselves probably have a reasonable belief that it works.
3
@SimonAndréForsberg We don't get notifications of when users request to delete. i can't see the background on that.
I have to run.... commitments.
 
@SimonAndréForsberg I can't test it as it is written without adding to it, as both /*Unweighted Graph */
def addedge(s: Vertex, d: Vertex): Unit
//Weighted Graph */
def addedge(s: Vertex, d: Vertex, w: Int): Unit
don't have an implementation
I don't mind too much - there's lots that can be improved with it
 
1:41 PM
I'd say you should ask this at codereview.stackexchange.comm.s. 19 secs ago
 
@SimonAndréForsberg Does this warrant for closing all his questions? He's no longer looking for a review.
 
Meh, thought so.
It would clean up.
 
0
Q: Designing an opengl framework

MattMattRecently, I've been designing a c++ 3D game engine, called alpha++. Now, I implemented all my classes using this class design : So I would ask you to point out if I could do things in a better, or different way... Every answers, or thoughts about this are welcome !

 
2:02 PM
@CaptainObvious No code.
 
I just realised I made a mistake:
 
Could very well be a good question if he includes code.
 
You have presented an alternative solution, but haven't reviewed the code. Please explain your reasoning (how your solution works and how it improves upon the original) so that the author can learn from your thought process. — Quill 1 hour ago
I made that comment to self answer
 
@Quill I agree.
 
@Mast Yes, but, I think it's funny that I requested the author to explain his answer so the author can learn from his thinking
2
 
2:05 PM
@Quill shame on you, now I am addicted to agar...
 
@Vogel612 rolfl removed that chat message, lol
I wasted three hours on it the day I posted it
 
@Quill You're evil, but it's very fitting ^^
 
2:21 PM
2
Q: Ultimatoe — 2. The model

maaartinusThe game model (Ultimatoe) consists of 9 instances of Tic-Tac-Toe (UltimatoeBoard) and some auxiliary information. As the number of all reachable boards is bound by \$3^9 = 19683\$, they all are pre-generated, which allows fast move evaluation. Before reviewing, please read the short text of the...

 
Monking
 
Anyone of the C++ guys around?
 
@RubberDuck I'm not an expert, but I got the basics down pretty well.
 
@EthanBierlein Monking
 
0
Q: Implementing Dynamic Network Message Handling

EBrownI'm trying to handle network messages in a dynamic, and effective way, though I feel I've overthought it again. As of now, I have a very structured approach, but it feels as if it's a lot of overhead for such a simple process. The other issue, is that if I start making more types of Login messag...

 
2:30 PM
@CaptainObvious I Like To Capitalize Every Word I Type.
 
@EthanBierlein Only In Title Messages
:)
 
The world must be ending.
 
For them, yeah.
 
Anyway, if anyone would be so kind as to look at that question, and tell me what (if anything) can be improved, I would greatly appreciate it.
 
2:48 PM
@Mast you ever mess with around with micro controllers? I'm thinking I want to learn a bit of "down by the metal", but I'm not real sure where to get started.
 
@RubberDuck Yes.
How deep down do you want to go?
2
 
@RubberDuck Wait, you can use microcontrollers with C++?
 
If I read your question correctly, you'll want a micro controller which can be programmed in C++. There are plenty of those around, mbed has a couple.
They have an on-line IDE which you might be interested in:
https://developer.mbed.org/handbook/mbed-Compiler
I think I got the code for a small RTOS around which I build on such an mbed.
 
That looks great! Thanks!
Deep. If I can learn the basics I might score an opportunity to do some of this stuff at work.
 
@RubberDuck Feel free to ping me. It's what got me started with programming.
I stated as an Electronical Engineer, programming micro controllers is kind of our thing.
 
3:01 PM
Awesome. It's good to know people. =;)-
 
3:16 PM
Blechh. Unity Answers is a mess of gimmeh-teh-codez, awful formatting, spammers, and the likes.
 
What is that?
 
It's essentially where you can ask questions about the Unity game engine.
It's an exact clone of SE as well.
 
Really?
Link?
 
Crappy looking clone.
 
3:19 PM
Yup
 
Literally a verbatim clone.
 
All made possible by the even shittier answerhub!
 
They also allow for negative "karma" answers.unity3d.com/users/14662/dfgeger.html
Unity answers was actually one of the reasons I stopped using Unity for a while. I've just now recently started using unity again.
 
That site is ugly as hell.
 
3:25 PM
watered down badges too
 
Well they don't have near the traffic SE does.
They'd have to water them down for anyone to get them.
SE should have Legal go to town on them.
Unless they licensed it from SE.
 
I've seen a few sites the same
also Meta is the place to ask about that kinda thing
Meta-chat is better still
 
lol yeah
 
GTGWN
 
how, how am I already out of stars...
 
3:29 PM
What are you trying to star? If it's not any of my messages I'll loan you one.
 
3 mins ago, by Quill
Meta-chat is better still
God. I wish Unity would also update their version of C# to 5.0, at the least.
 
@EthanBierlein Why?
 
@Mast Because the Unity version of C# doesn't have things like getters/setters, async/await, etc.
 
You got Unity commands for that.
 
For example, if I tried to type public int MyProperty { get; set; } a compile error would be thrown.
They don't even have support for normal properties, like public int MyProperty { get { ... } set { ... } }
 
3:54 PM
@Mast - you can be a real pain, you know. I feel inclined to suspend you for bad voting-to-close practices ..... (only half-joking). :
I am reopening this question, again, because it is not a duplciate of this questionrolfl ♦ 1 min ago
Then, the rest pf the people who voted to close, I think I will ban from the clsoe review queues
 
May I suggest a better conclusion would be the question is ambiguous and this situation deserves a meta?
 
2
Q: How to break from nested loops?

FooBarIf I normally have some nested loops from which I have to break, I write something like: bool do_break = false; for (int i=0; i<10 && !do_break; ++i){ for (int j=0; j<10 && !do_break; ++j){ if (algorithmConvergesWithParameters(i,j){ do_break = true; } } } What ...

> why on hold? It is better if I paste >100 Lines of code including code of my own framework that has exactly NO influence on the loops? Would anyone bother to read this code just to see that you can safely ignore it? How does an answer to this question depend on completely exchangeable code?
But just closing a question is BTW a very good way to stop people from joining and contributing here. I'll just close my account here.
 
@Mast No.
The code is completely different, and you are just plain wrong.
You did this after I posted here in chat about it.... which just feels spiteful
 
If your code works and you are asking for improvement then you should probably ask this question on codereview.stackexchange.com instead. — Pshemo 24 secs ago
 
I'm all for constructive criticism, but your assumptions are off.
 
3:57 PM
@Quill @rolfl, what to do about this question?
 
Mine probably are as well.
Which is why I proposed a meta.
 
And, I think your use here makes a good meta-question about why we really, really need to get the full permissions set on this site so that you need 3000 rep to cast close votes
 
Many people agreed with me, according to that close vote review. So don't just blame me.
 
I am not, I am blaming all of you
 
Good, that clears things up.
 
4:00 PM
@FooBar, if you have a problem with the decision to close this question, feel free to join us in the chatroom to discussQuill 16 secs ago
 
@Mast Do you even understand what it means to be a duplicate on Code Review?
 
@rolfl, I took the 'why did you close?' text out of the question and invtied him here. Is that okay?
 
@rolfl I would assume it's quite hard?
 
Does anybody? As said, make it a meta so we can clear it up.
I thought I knew.
 
There are a number of meta's
9
Q: Do there exist conditions for closing iterative review questions as duplicates?

nhgrifAs far as I know, we simply don't close questions as duplicates on Code Review. I think it's even been mentioned that a Code Review duplicate has to be basically an exact copy & paste of the previous question. To some degree, this makes sense. Code Review questions and answers tend to be highl...

The code in the question has to be an (almost) identical copy.... (barring things like white-space changes for markdown formatting).
@Edward / @Quill / @Legato - I am disappointed in this close-review result: codereview.stackexchange.com/review/close/40161 - those questions are not duplicates, the code is very different, and it is essentially a follow-on in an iterative review.
The code is completely different in each
I am reopening this question, again, because it is not a duplciate of this questionrolfl ♦ 14 mins ago
 
4:07 PM
@rolfl Sorry, @rolfl, I'll make sure to thoroughly read over both questions and comments relating to them next time.
 
0
Q: Ruby tiny methods

Jikku Jose Have been following the advice to make tiny methods that does just one thing and does it well. Also have been keen on reducing or eliminating duplication as much as possible. But when a very experience developer friend reviewed my code, he mentioned I am taking it too far. And in short my code...

 
@SimonAndréForsberg - see updates: meta.codereview.stackexchange.com/questions/5703/…
 
hey
 
Monking
 
I just came here as my question got put on hold for not being real world enough.
2
Q: How to break from nested loops?

FooBarIf I normally have some nested loops from which I have to break, I write something like: bool do_break = false; for (int i=0; i<10 && !do_break; ++i){ for (int j=0; j<10 && !do_break; ++j){ if (algorithmConvergesWithParameters(i,j){ do_break = true; } } } What ...

@Quill: I think you have voted to close the question.
 
4:24 PM
> algorithmConvergesWithParameters(i,j) ...
^^ doesn't sound like a "real world" method to me
also iterating i and j makes me think of "example"
 
but where is the advantage of pasting 100lines of code?
 
then add in " I write something like:"
 
@FooBar Sometimes someone can find things in your 100+ lines that you never thought yourself.
 
the advantage is that you get a review on them...
also what EBrown says
 
But I don't want to have a review on how I set up the optimizer using the variables.
 
4:26 PM
well... tough luck?
or maybe... why not?
 
because it's closed source.
normally, it is expected to remove as much unneded code as possible to make it as easy as possible to read the code.
 
0
Q: Design Pattern Method for Comparing two objects and running the appropriate code

ForemanBobMy problem is I have a piece of code logic that I'm having troubles fitting into an OO approach, and I was looking for design patterns so that the following code would no longer rely on the ugly if class is of type A do X else do Y. In python we can say I have three "fighting method" classes, cl...

 
and here, it somehow is forbidden to strip down the question to the core. Why is that?
 
@FooBar While that's typical on SO, on CR we tend to like to see context. The way you use something, rather than the code itself, can sometimes lead to specific optimizations you may not have thought.
I encountered this same issue myself on a question a few days ago: codereview.stackexchange.com/questions/96293/…
I hadn't posted the entire context, and when I did it led to some very good answers.
 
That is maybe sometimes the case, but am I not allowed to decide on which part of the code I want a comment?
 
4:31 PM
13
Q: The gray areas of Code Review: Hypothetical / Example code

Simon André ForsbergThis is related to Why is hypothetical example code off-topic for Code Review? Which is related to On-Topic question #3: Is it actual code from a project rather than pseudo-code or example code? It seems that we're not quite consistent in our treatment of "example code", which is what this...

@FooBar - here's a possible answer to your question .....
 
So I just can't use CodeReview if I can't publish all of my code because it is closed source?
 
In essence, no. If you don't have your code in the question it can't be reviewed.
 
You merely have to publish enough code to get it into context, if you cannot do that then perhaps it's not the best place to ask.
 
example code leads to example reviews
your code is full of more basic issues than the algorithm....
for example, why have the do_break variable at all?
why not just call the function algorithmConvergesWithParameters each time?
Also, your code does not compile, it has missing parenthesis....
the if-condiion is not well-structured.
@FooBar - those are important questions, but they can't be answered with your code, because it is just not possible to speculate on what's missing.
 
yes, there is a ')' missing. Did it stop you from reading the code?
 
4:37 PM
No, but, you want the honest answer?
 
of course. Otherwise I wouldn;t be here right?
 
It makes me think - meh, this code is written in to the screen, the user is guessing what he wants....
 
@FooBar The problem, is that if there is a ) missing, then what else is different between your example and the actual code?
 
he wants a concept review, not a code review
If I were to give a review on that code, you'll just say: but, well, that's not useful because my code is not like that and it does not make sense for me
 
And this is so far of topic?
Why would you think that?
 
4:39 PM
Yup, but before you get upset, let me give you some conceptual advice regardless, with your question.
the advice is not a review, it is the answer to a specific question (i.e. if your question was on stack overflow, I may give this answer)......
When you have loops like you have, and you have a complicated terminal condition, so you have a break-condition variable.....
then, what you probably want to do is wrap the whole thing in a function, and return early.
something like:
void loopUntil(.....){
    for (int i=0; i<10; ++i){
       for (int j=0; j<10; ++j){
           if (expensiveAlgorithmConvergesWithParameters(i,j)){
               saveResultOfAlgoToFile();
               return;
           }
        }
    }
}
an exception is not what you want to do.
@FooBar - make sense?
 
absolutely.
I just wonder how to ask questions that will not be closed without pasting too much code.
 
Code review is not like stack overflow that way.
More code is fine.
31
Q: How to get the best value out of Code Review - Asking Questions

rolfl I have a project I am working on, and I would like some, or all of it reviewed, how can I ask for this review on Code Review in a way that produces the best possible value? This is not about a question being on-topic, or off topic. Rather, this is about making on-topic questions great qu...

Consider reading ^^^
 
With the problem that I am not allowed to just post all the code.
 
The more the better (until you post too much).
 
If it's a question of I don't want to paste source to my closed-source project then you'll have to use discretion.
We can't code review that which is not production code.
 
4:45 PM
"The more the better (until you post too much)." good one :)
 
@FooBar Yes, but that is your problem, and it is a down-side of closed-source code. The price you pay
You can't get the benefits of open-source code and the benefits of clsoed source code simultaneously
 
I write enough open-source stuff, but that's not always my own decision.
 
The biggest advantage of open source code is the many-eyes principles.
(oh, I meant "you" as the general/plural "you")
 
@FooBar That's SO style. Welcome to CR. Please read the full on-topic helpcenter
 
@rolfl I goofed.
Usually when a close call has 3-4 votes the last few are a formality. I remember this for being odd since actual duplicates are exceedingly rare given the nature of this site, I blindly followed the aforementioned standard and voted to close when I saw so many close calls.

Again, I goofed, won't happen again.
 
4:48 PM
imagine a programming language with this kind of ambiguity :)
2
 
@FooBar JavaScript
2
 
okay, I keep away from that.
 
@rolfl I appreciate your telling me about this. I don't want anyone to make a habit out of it. CR is great for its community, its welcoming nature. The last thing I want to do is represent the antithesis of what keeps me coming back here.
 
"its welcoming nature" Hm. I didn't find it really welcoming to have the first question closed with just the standard text...
 
@FooBar well... we actually have some more comments..
but they basiscally just reiterate the close-reason in a less formalized manner..
and you seem to know your way around the network, soo :D
 
4:55 PM
The comments were not there when the question was closed.
 
I know..
 
And for someone having just asked the first question, that feels like a door slammed shut in front of you.
 
I'm not talking about tose anyways ...
I know that, too
waaaaiitt... how do you have write access here????
~confused
 
who?
 
your chat profile links to Workplace, but the link 404s
you only have 15 rep on this site
 
4:58 PM
I shouldn't be here? <(
;)
 
nvm 150 on SO and another 15 on DBa get you more than 20 rep
 
leetHacksor
 
ya something like that :D
 
But the link to workplace is strange.
 
00:00 - 17:0017:00 - 00:00

« first day (798 days earlier)      last day (3220 days later) »