« first day (2702 days earlier)      last day (66 days later) » 

12:00 AM
RELOAD! There are 7024 unanswered questions (89.7442% answered)
12:22 AM
@SᴀᴍOnᴇᴌᴀ Yep. Started a new job too, been keeping me busy and my mind occupied
12:35 AM
Just bought a new laptop, Dell Precision 7740 Mobile Workstation, half price because it's old tech, 68G Memory, 1T SSD hard drive, i7. It gets delivered 10/6.
@pacmaninbw Nice. Sounds real "old" ;)
17 inch screen. 4 years next day onsite support with accident repairs (hope this one doesn't drink my coffee).
@Peilonrayz :)
About 15 months old.
1:30 AM
@Young Does intellisense exist in a formal code review? — user997112 30 secs ago
1:54 AM
2 hours later…
3:53 AM
If you have working code that you're wanting to improve, you should be asking at Code Review instead. It was created specifically for that purpose. This site is for questions related to code that isn't working. Also, I'd suggest that you spend some time taking the tour and reading the help center pages to familiarize yourself with the site and how it works before you begin posting. — Ken White 20 secs ago
4 hours later…
8:02 AM
This question might be better suited on code review. — Emanuel Vintilă 54 secs ago
2 hours later…
9:39 AM
Q: Python - 2D Elastic Collision Simulation

JSogaardI am currently a Python beginner, who just finished a script simulating collisions between circles (balls) in 2 dimensions. I would appreciate comments on overall structure, variable names and really anything else. There are bug present, such as a ball occasionally slipping out of a corner, but t...

Q: How to simplify and optimize switch statement

r10lomoSince I am working alone on this, I would like someone who would take a look and point out any mistakes or things I could have done better. My questions: How could I improve this big switch statement? Is there any obvious beginner flaws? The executeModeration is a method I call when a command i...

10:04 AM
Q: Best way to access lists and nest them with if statements

user231066Trying to improve my Python skills by creating a small text adventure. I have used lists to access certain information, but I am not sure if I am using them correctly. For instance, I have used a list to store weapons but wasn't sure of the syntax for accessing them in an if statement. Also, if t...

Q: Simple generic cartesian product in C++

Bogdan BThe idea is to take a sequence of sequences (of the same type) and use tuples of [iterator, current index, sequence size] to keep track of the current state, such that the cartesian_product object can return one sequence at a time. General questions: bugs? (would hope not!) code quality ok? anyt...

10:35 AM
@SᴀᴍOnᴇᴌᴀ @Peilonrayz M-code is useless as a tag since there are so many things called m-code that are actually different things.
@DerKommissar Congratulations
@Mast What should we rename it to?
That's only slightly less ambiguous, isn't it?
Sorry, I don't understand what you mean. Could you rephrase that?
possible answer invalidation by SkypeDogg on question by SkypeDogg: codereview.stackexchange.com/posts/249723/revisions
I feel like you've talked about this before
Ah yes. I'll go read through that now
@Mast You happy for me do follow through with this? Can't do any blacklists or synonyms but a rename I can do
10:51 AM
11:15 AM
@Duga I'm conflicted. It's adding more context, but the OP posted a comment that sounds like AI - "Instead of making index of max I can just get value of array[1] and check if pos > 0.6 (or 0.7)" can someone check this?
Q: Hover on bootstrap card overlay

LV98Just created an overlay on hover following a Youtube tutorial - but I adjusted some css to make it responsive. I'd like to hear hear some reviews or suggestions where I can improve. #Projects .card { position: relative; overflow: hidden; } #Projects .card:before { position: absolute; ...

11:44 AM
@Peilonrayz Fine.
@Peilonrayz Answer is premature. If you post the following in an answer: "It is difficult to optimize a code, where multiple parts are missing", ask for clarification instead of posting the bloody answer or be prepared to be invalidated.
@Mast Yeah that seems reasonable.
Thanks :)
possible answer invalidation by Durga on question by Durga: codereview.stackexchange.com/posts/249840/revisions
12:02 PM
@Duga Handled. But it has so many issues... Trying to wrap my head around them
put your question to CodeReview, it's off-topic for StackOverflow. — Stephan 35 secs ago
this question belongs to CodeReviewStephan 44 secs ago
@Stephan In the future please link to the help center and use wording that shows the post may be off-topic when recommending Code Review. Take, "This may be on-topic on Code Review. Please check if it is on-topic and how to post a good question before posting there." — Peilonrayz 43 secs ago
@Duga I've cleaned it up as best I can. But it's off-topic, for either MRC or UWYA. MRC because it's example code. Or UWYA as the description doesn't tell us what the code is doing. I'm sure if the OP fixed the UWYA it'd be broken.
12:22 PM
This question seems way too hypothetical and doesn't have a language tag.
@pacmaninbw True. Thanks
@Peilonrayz, Stephan has provided advice for someone whose question was being closed, to offer an alternative avenue. Instead of telling them how to deal with matters on Stackoverflow, and with your knowledge of CodeReview, can you tell us if this is on topic for that site. In my opinion, based upon the short and limited information in your 'if it is on topic' link, it does belong over there. Now, if when posted on that site, the peers determine that it is not a good question, or decide, that in their opinion, it is not on topic, that is for them to decide, not individual members of this site. — Compo 56 secs ago
@Compo Code Review is a small site, and bad recommendations and poorly worded recommendations from Stack Overflow make up a significant amount of non-moderator's workloads. It is possible to recommend a site that reduces the potential burden that Stephan has created. — Peilonrayz 34 secs ago
Q: Javascript / React data mapper

ChristianMy solution to implement a status (string) from combining two other ones. I need to declare a function which takes two params (two strings) and needs to return another one based on the combination of those two strings. For ex: carStatus(status, secondaryStatus) => string where secondaryStatus ca...

12:50 PM
possible answer invalidation by Durga on question by Durga: codereview.stackexchange.com/posts/249840/revisions
@Duga FFS.
1:05 PM
possible answer invalidation by Durga on question by Durga: codereview.stackexchange.com/posts/249840/revisions
locked for a day, removed from HNQ, now time for coffee.
Thank you @Vogel612
1:27 PM
Q: Simple React component to show sorted articles

MauricioRobayoI have a basic articles sorting application, the App component gets some articles and pass them to the Articles component which renders a list of the articles sorted by date or by upvotes. Eact article is an object with id (string), title (string), upvotes (number), and date (string format YYYY-M...

1:58 PM
@Compo In addition to what I said earlier. There is as a potential burden as it is likely off-topic on Code Review for missing a description of what it does. If this question is posted there this burden will be realized. — Peilonrayz 51 secs ago
2:12 PM
You cannot assume @Peilonrayz, that a not yet posted question, will exactly match what exists here, especially because I modified it myself to improve it here. Regardless of that, wording can edited after submission anyhow. The question asks specifically for a batch file review, and that is exactly what code review does. Additionally, if I take a look at your site, how many questions have there been using the appropriate [batch] tag, (for this question), in 2020? to save you time looking the answer is two! So, please tell me, where the burden or potential burden is? — Compo 14 secs ago
Q: Use of pointers in C in Erasthenes sieve program

Pel de PindaI made the following code in C, which is supposed to create a list of booleans $n + 1$ long, such that the $i$'th element is true if $i$ is prime and $i$'th element is false if $i$ is not prime (starting the count from zero). So for n = 10, it is supposed to give [false, false, true, true, false,...

well, if pointing someone who requests a code review to CodeReview is a "potential burden" for that site, I won't recommend that site anymore. But let me ask you, @Peilonrayz, What is CodeReview supposed to do when not reviewing code? (rhetorical question - no answer required) — Stephan 24 secs ago
2:55 PM
@CaptainObvious Possibly off topic due to broken code. I haven't voted to close yet, waiting for a response from the author, but 2 others feel the same way I do based on the comments.
It's amazing how one can apply concepts from one typed language to a scripting language problem.
@pacmaninbw Thanks for quoting the problematic part of the question. I don't understand G. Sliepen's comment, why would the pointer not be correct? Does malloc eat them? I could understand it if C had a GC, as the arrays die around the end of the functions lifetime. Maybe my assumptions of a non-GC language is completely wrong?
Q: How can I simplify my nom parser?

Kyle_S-CI'd like a recommendation on how I can improve the function unquoted_string below - specifically is there a better way to combine the parsers I have to achieve the desired goal? Strings in this language are defined by YANG RFC 7950 Section 6.1.3. The excerpt relevant to unquoted strings is: An u...

3:11 PM
@Peilonrayz The primes array is allocated by C on the stack, it doesn't exist as soon as the function exits, the address returned is a stack address that is no longer valid. Instead of assigning the address of primes to the pointer allocated in the function, the primes array values should be copied to the memory allocated by malloc().
@pacmaninbw That makes complete sense. Thank you :D
And thank you for making me explain it, the code is definitely broken.
Numpy ;) I agree VTCed
3:30 PM
If your solution does work, take the CodeReview Tour and visit its Help Center to see if your question is on topic over there. — wwii 30 secs ago
Q: How can I reduce this C# methods length?

user231071I'm a 16-year-old so I never studied computer science, although I do try to adopt the best practices I can when it comes to programming. There's no constant value for how long a method should be, but I think we can all agree that the method in question does too many things, and can be reduced in ...

But you can post a very limit, like product?limit=MAX_SAFE_INTEGER. If you want to optimize the code, then you are wrong here. Have a look at codereview.stackexchange.comakop 36 secs ago
I don't know what you'd expect the code to do. Why should it give different results? Please read How to Ask and perhaps provide a minimal reproducible example that really shows what you expect. BTW: You're making several mistakes in your code. Albeit not fatal ones, you'd still benefit from getting it reviewed at codereview.stackexchange.com. — Ulrich Eckhardt 8 secs ago
I think you want Code Review: codereview.stackexchange.comJared Farrish 50 secs ago
To expand on @UlrichEckhardt's suggestion to post on Code Review; the current question would not be on-topic there as the code doesn't work the way you want. If you fix this problem then it may make a good question if you make a new question, check if it is on-topic and follow how to post a good question. — Peilonrayz 44 secs ago
4:19 PM
Maybe codereview.stackexchange.com would be a better place for this? — Sulthan 24 secs ago
It happened that I've wrote a working solution while composing the question. I am not expert in this area and am not sure that this solution is the best one, but with the answer inside the question looks like “WTH he wants from us?!!” Should I: (1) turn the “like this one” of the question part into a self-answer, (2) move the question to the codereview.stackexchange.com or (3) just delete it? — Sasha 8 secs ago
Hi @Sasha if you want to know how you can improve your solution then you can post on Code Review. If you are not interested in how to improve upon your solution then posting there would be inappropriate. If this sounds like something you'd like then check if it is on-topic and how to post a good question. You will likely need to change a lot of the wording for your question to be a match there. — Peilonrayz 7 secs ago
4:50 PM
Q: Objective C String to JSON formatting

John WilliamsonQuick disclaimer. I've programmed Java for years but this is the first Objective C I've ever written. I've written some code which almost unfortunately works but frankly hurts my eyes with the number of lines of code and quality. Basically looking for the right way to convert the original string: <...

5:23 PM
This is a working code that doesn't require any problems to be solved. If you are looking for refactorings consider posting a question on codereview.stackexchange.com On a side note - if you are not handling exceptions differently there is no need to have nested try..with block. Nested async computation expression also not recommended to use. — Sergey Berezovskiy 48 secs ago
6:06 PM
Q: App initialisation and simple game loop

DanSummary I come from a Java background but I am trying to make a game in C++. This is my attempt at a state management system, which should allow me to easily switch between "states" (menu, game, scoreboard, etc.). The idea is that: When the program starts, I create an Application. The Applicatio...

6:37 PM
@Abdullah Also, I'll note that once this code works as expected, you can post the complete code on Code Review to get general suggestions on how to improve it. — Carcigenicate 49 secs ago
7:13 PM
I’m voting to close this question because code reviews are off topic here. You could try code review.se but please read their help pages to learn their guidelines. — Marc 41 secs ago
7:48 PM
Q: Multiple anonymous IIFEs inside outer function

Daniel_KnightsI have a scrollHandler function which contains all of my scroll event-listener logic. I've used multiple IIFE's inside to separate the logic: import skills from './json/skills.json'; let capToggle = false; let triggerCalculateHeight = false; let scrollEnd = false; function headingFadeIn(heading...

8:12 PM
But StackOverflow is not a code review site of other's code. Your role as a questioner is to post your own code that needs debugging. — GetSet 42 secs ago
2 hours later…
10:20 PM
Q: use of parameter outside function body before ' []' token in c++

DeathNet123Hello Everyone I am a new Computer science student I am trying to pass the 2D array to function but I am getting an error. use of parameter outside function body before ' []' token so here is what I was doing void print(int rows, int col, int array[][col])//This is the line where I am getting err...

@CaptainObvious Broken
11:11 PM
Q: Noob asking for feedback on first pizza order program

Osman PolatTrying to learn a new skill at 40 without any prior related experience :-) Bought the book 'Python crash course 2e' and decided to freewheel a bit with after a week with what I've learned so far.. I put everything in a small program to order pizzas and I would love some feedback before I take up ...

11:37 PM
Q: How can this code be improved?

Hackernoob666This code works, but it takes ages to run and uses a lot of ram, how can I improve that? I will update this post as I improve the code while True: for u in range(1,501): with open('some_file.txt', "a") as file: for g in range(1,500): if (g % 100)==0:# speeds up the cod...


« first day (2702 days earlier)      last day (66 days later) »