« first day (2910 days earlier)      last day (25 days later) » 

12:01 AM
RELOAD! There are 7521 unanswered questions (89.4714% answered)
12:26 AM
Since your code works you'll want to post it on codereview.stackexchange.com. They review working code and suggest improvements, whereas Stack Overflow is for help fixing broken code. — John Kugelman 15 secs ago
No worries. It's a subtle distinction I'll admit. The reason for it is that here we like questions that allow for direct, focused answers. Code review tends to lead to broad answers that cover a multitude of improvements and suggestions. That's why a separate site was set up, and why your question was closed as "needs to be more focused". Cheers! — John Kugelman 51 secs ago
1 hour later…
1:41 AM
Q: Recursive function for bubble sort

AlexI often see nested loops as a solution to the bubble sort, but my solution involves a recursive function. Is the following solution less efficient than the traditional method? public static int[] BubbleSort(int[] arrayOfValues) { var swapOccurred = false; for (var i = 0; i < arrayOfV...

2:20 AM
Q: Income tax rate calculator in c++

stupidQuestionsI have been trying to learn c++ for the sake of being comfortable with a second language. I found a project that seemed relatively easy, although it may not be implemented perfectly, it was a simple project. I create a std::map<double, std::string>, which will represent the tax rate as a double, ...

Q: I am struggling to see why this script works, and the other doesn't

JoeI have been building an application to scrape prices from a "rooms for rent" website and average them to help out new movers. All the work is done, however, currently the code only scrapes the one page I gave it, I'm trying to get it to scrape the next page and so on until it has all avaliable pr...

2:52 AM
Q: Is this way of formatting any piece of code readable or just convoluted

Iñaki UlibarriI've started to get far more familiar with C (and coding in general) and the way to use function to my advantage to create more complex programs. As a way of doing something actually useful instead of my "Starting Programming with C: For Dummies" book I decided to make a simple program to help me...

Thanks for the feedback, @LaurenzAlbe. So far, the only real concern has to do with data leakages because of cross-schema queries. It's not really a concern as it can be mitigated by good code reviews, but the possibility that it could happen still exists. Perhaps the only real question here is the second one, as the first question seems to be the right way to go about it. When we have data that is meant to be shared, does it make sense to duplicate it or use a cross-schema query? — John 58 secs ago
3:16 AM
possible answer invalidation by tinstaafl on question by tinstaafl: codereview.stackexchange.com/posts/259768/revisions
possible answer invalidation by tinstaafl on question by tinstaafl: codereview.stackexchange.com/posts/259768/revisions
3:35 AM
Q: Recursively list directories

David542How does the following look to list the directories on a posix system? This is actually the first piece of C code that I've written where I've actually been able to use for a real-world problem! #define _GNU_SOURCE #include <dirent.h> #include <string.h> #include <fcntl.h> #include <stdio.h> #inc...

3:45 AM
Hi, this question is more suited for codereview.stackexchange.com — Sid 57 secs ago
4:16 AM
Not sure but maybe this Question should be moved into CodeReview (see meta.stackexchange.com/questions/136451/…) — Carsten 10 secs ago
5:15 AM
Code Review Stack Exchange may be more suitable for a “how to improve this working code” question. But without asking about specific improvement, this is off-topic everywhere. What exactly do you want to improve? Why? What’s wrong with having two functions? If each does the job described by their name, then everything is semantically correct. — Sebastian Simon 15 secs ago
5:42 AM
@Duga Both seem fine.
5:56 AM
@SᴀᴍOnᴇᴌᴀ Yes. Considering the state of the question though, I'm not sure anything has to be done about it.
One of the people who voted to close still answered it.
That's always a bit curious.
1 hour later…
7:06 AM
7:53 AM
Q: Python: screen colors adjuster using Turtles

QuestionI am a total beginner in Python and I am trying with the modules Turtle. I am currently trying to code for 3 sliders (R, G, B) for adjusting the colors of the turtle screen. However, I found parts of my codes filled with redundancies, could anyone please tell me how to trim the code to make it mo...

Q: AWS architecture: periodically triggered lambda functions

HermanI've created a simple lambda function that polls a few websites periodically to see if something changed. One way it does this is by making a hash of the page and seeing if it different than the original hash, provided by a json file, like so: { "check_type": "hash", "url": "https://www.h...

Q: Python benchmarking code is not performing well

Masudul Hasan MasudI am trying to write a benchmarking tool from scratch in python. Unfortunately, no matter how I try, my code can not reach the performance of other benchmarking tools like wrk/wrk2. Using wr2 I can make 42k reqs/s while my code can create only up to 2200 reqs/s. I have tried multiple ways to para...

8:16 AM
I’m voting to close this question because this question ask for code optimization which is on topic for Code Review but not so much here on SO — Roman Vottner 51 secs ago
9:04 AM
Q: find leading zeros: performance

diegusI am trying to find a N number of leading zeros from the output of the sha1 hash function. I would like N to go up to 10 or 9. Currently I can get to 7 in about 7 minutes (even though is not always that fast), but already 8 takes forever. The input to the sha1 must be a combination between an inp...

9:20 AM
My hero! Defaulting to unknown was a very bad idea, I will avoid it in the future. I am eager to find ways to reduce the amount of type-annotation code I need to write, or to find type-level reusable abstractions, for it distracts me a lot. We just turned a one line obviously correct abstract function into a ~10 lines long non-trivial concrete function, not to mention that unit test should double-check everything we did. I expressed a similar discomfort in code review here if you want to have a look. — geoffrey 33 secs ago
9:51 AM
I’m voting to close this question because this question probably belongs on Code Review, another site in the Stack Exchange network. — AndrewL64 19 secs ago
@AndrewL64 The question doesn't search an array so the question is off-topic on Code Review. — Peilonrayz 48 secs ago
The second form is great and could be improved by making the 3 a const int defined in advance, making it very flexible. The first form is a total mess and would hard-fail most code reviews. — tadman 57 secs ago
10:11 AM
possible answer invalidation by Florian Walther on question by Florian Walther: codereview.stackexchange.com/posts/259807/revisions
@Peilonrayz I emphasise on the word "probably" cause I wasn't too sure if the question is relevant for Code Review but doesn't search an array so the question is off-topic on Code Review. <- What does searching an array have to do with Code Review? — AndrewL64 8 secs ago
10:26 AM
possible answer invalidation by Florian Walther on question by Florian Walther: codereview.stackexchange.com/posts/259807/revisions
You can post this question on codereview.stackexchange.com then. — m4n0 17 secs ago
@Duga rolled back
10:58 AM
@AndrewL64 Code Review is not a migration target because Stack Overflow does not know CR's rules. Please do not close questions because CR exists. Otherwise we get into situations where on-topic SO questions are closed and the user is told to post an off-topic question CR. Pretty toxic. Code on CR must be working as intended, and the code doesn't, "I need to search an array that has 4,000 objects". — Peilonrayz 14 secs ago
Q: Chess in Kotlin

Florian WaltherThis is an updated version of my first question: Chess game in Kotlin I wrote the following Chess logic in Kotlin and am looking for feedback to make the code cleaner and follow good software design principles. I tried to adhere to object-oriented design. Some notes and questions I still have: • ...

Q: How can I convert this flexbox contact form to CSS grid?

Zoltan KingI created a contact form with flexbox. It uses the mobile-first approach so everything inside the media query is for large screen. :root { box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } body { margin: 0; padding: 0; } .contact-container { max-width: 120...

11:37 AM
@CaptainObvious How to?
@CaptainObvious @Peilonrayz Does this question work as expected and is it only a performance review which means it is a legit code review question? It is currently in the Close Vote Queue.
@pacmaninbw The code should run fine. (I have not run the code) So the question being CNWAI is not correct. The code isn't really a 'benchmark library' but the code is benchmarking a bunch of requests. Overall I don't believe the CV for CNIONWAI is correct.
And as you've said; code not working with regard to performance is allowed on CR.
11:53 AM
Q: Is there a better way to check if an array value exists as part of the url

PeteI have the following bit of code in a service worker that checks to see it the url contains any of the values in an array and if so it breaks out of the function. As it is run for every asset on a webpage, it can be run a lot of times so I was wondering if this was the best way to do it or if it...

@CaptainObvious 3 down votes but no VTC from users that can all VTC (one is an ex-moderator)
12:09 PM
@Carsten Code review is for comments on existing, working code. The OP has a question: how to implement a algorithm (example given in C) in Haskell. See meta.stackexchange.com/questions/129598/…Ari Fordsham 1 min ago
Q: Stat management in an RPG (like Pokémon e.g.): How to update stats after each battle or other stat changing events?

apk_gringoI'm currently creating a terminal-based RPG like Pokémon as a learning project so my programming skills are limited. My main problem right now is stat management of the player. My code works like this: I have a Player class which creates characters. Its constructor has parameters for character i...

Q: Python Telegram Quiz Bot

TDJTo improve my Python knowledge I started a small coding project: A telegram chat/quiz bot that is based on official questions about basketball rules. The bot reads them from one or multiple .csv files. I tried to seperate game logic and chat interaction as good as possible, but failed somewhat. I...

12:26 PM
I’m voting to close this question because it belongs on the code review stack exchange — mousetail just now
1 hour later…
1:50 PM
@CaptainObvious Not ready for review, CNI.
You'd get a lot of feedback if you posted this code in the Code Review stack exchange. — JDługosz 38 secs ago
2:42 PM
Q: Making a File explorer with Python tkinter

Aditya SinghI am making a simple file explorer with tkinter Python. This is the file repository on github. I know that this is pretty much long code and it took that much time to write but i have somehow added the comments. And I want someone to test my code. Also the additional mechanisms are not here and t...

3:14 PM
As I'm surfing, weak and weary,
I glimpse a topic that -- in theory,
ought to be a nice workload.

But shortly after click and query,
my anger wakens, full and fiery:
this was missing all its code. (CV: CNI)
3:37 PM
@Mast: Stack Overflow (and StackExchange in general) have a reputation for being a bunch of A-holes who care more about enforcing arbitrary rules than actually helping anybody. In particular, demanding that beginners learn lots about the structure of SO/SE, how questions should be asked, etc., before answering questions. This question clearly doesn't fit here so it should be closed. But demanding that the OP jump through (what they see as) flaming hoops to get help is bad too. IMO, the optimal route is to help them, then close the question (and advise them what to do next time). — Jerry Coffin 11 mins ago
@Mast :/
@Zeta Love the poem. VTC+1.
@CaptainObvious Closed.
3:56 PM
Can anyone in this room tell me why they haven't VTCed this question?. The code isn't working as needed.
Specifically the player class can't be updated with new statistics.
@pacmaninbw looks like the user know the code is bad and is asking how to make the code better?
@pacmaninbw I'm not convinced it is CNWAI... I see the title originally had a "how to" question in it that has since been removed... but then in the description it contains this question "How can I manage stats in a clean way with my approach if it's possible? Otherwise I will refactor."
Look at the original title. How to. Look at my comments.
The code needs setters as well as getters.
4:01 PM
@pacmaninbw I've been on mobile the entire day and hadn't seen it yet.
Does that answer your question?
@pacmaninbw Aka needs a code review
Fine answer it. I did in a comment.
Since I'm being counter productive I'm going to take a few hours off.
4:18 PM
Q: Is this a good design for runtime Macro execution?

Cédric MoersI am developing a system for runtime macro executions in an automatic test environment. Macros are defined in an xml and are for configuring multiple devices/DUTs for a specific use case. The xml parsing of these macros is outside of the scope of this question. For building the macros in code I c...

Q: Take information from a webpage

ProtractorNewbieAfter I have been doing some improvements from my Previous code review. I have taken the knowledge to upgrade and be a better coder but now im here again asking for Code review where I think it could be better. The purpose of this code is a monitoring that checks for a special site every random 3...

Should I move my question to CodeReview? — Charlz_Klug 14 secs ago
4:51 PM
This question will likely get better attention at codereview.stackexchange.comsweenish 30 secs ago
5:50 PM
if your code works and you seek constructive criticism and improvements, the site Code Review is a better fit. — Rainbow Dash 8 secs ago
6:42 PM
Q: Chess LLD - Provide your comments

Ayush Jindali am kind of new to low level designing, need your feedback on this design of Chess game. dont go inside the core logic, just provide your comments based on the design part. the class 'Chess' receives calls from the UI to move the Pieces. this class has a Board object and 2 Player objects. the Bo...

7:06 PM
@afreelunch You are asking what is recommended. Different people recommend different things for different reasons. The question is off-topic as opinion-based because you have not provided an objective metric by which to answer your question. Stack Overflow likewise does not deal with theoretical problems, but rather practical ones that you are actually facing. If you want input on whether your programming style/habits are good, consider softwareengineering.stackexchange.com instead. Or, for a full, stylistic review of working code, codereview.stackexchange.com. — TylerH 24 secs ago
7:31 PM
Q: Convex Polygon-Polygon Swept Collision Test

sfbeaCurrently working on a pre-solve collision library. My goal is to have it be potentially usable in potential video game projects of mine, so time constraint is small as this should be used in a game loop: this algorithm currently takes too long. I am aware of broadphasing, but I believe there is...

@CaptainObvious Uh... Code 's missing context?
8:20 PM
Q: splitting numbers in three factors

miracle173The purpose of this code is to use it to calculate some number theoretic function efficiently for the numbers from 1 to 1000000, but I am not sure if it will be really useful. The main purpose was to program a piece of C++ code because I have almost no experience in this language. So it would be...

Q: Hash Set Filtering, mapping onto an unequal list with set business rules

J.DhaikImprove hash Set List filtering UI Data that gets saved as a HashSet. These respond to the PriorityCode values of 1-9 in the database. This code all works fine and is according with the business rules, but however. This seems to be a terribly inefficient way to do this. How can this be improved?...

Should this comment have been an answer?
8:37 PM
It might be better to ask on Code Reviewwjandrea 5 secs ago
9:07 PM
@Rocker2102 I might not be the person to ask that, and even if I were, I'd probably need to know a fair bit about what you're trying to do and what 'ok' would mean for this code. If you don't think a question about that would fit stackoverflow maybe take a look at codereview.stackexchange.com and see if your question would fit that site. Sorry for not being more helpful. — Ben Stephens 32 secs ago
Q: How would I make this bubble sort more pythonic?

God Of JamI have this code: Sorted=False while not Sorted: Sorted=True for x,y in enumerate(List[:-1]): if List[x]>List[x+1]: List[x],List[x+1]=List[x+1],List[x] Sorted=False However the use of Sorted=True/False being repeated is quite ugly and it would be much nic...

Q: Euclidean algorithm to determine GCD (greatest common divisor) in C -- alternative method

j3141592653589793238Been looking into some simple algorithms, I came up with the following piece of code in C to implement the Euclidean algorithm iteratively (I like to be clear here, I don't want the recursive implementation for now). I've seen various other implementations and in fact most books prefer a differen...

working code is better off on Code ReviewJamiec 5 secs ago
imho its a bit too much code. The working code part could make a question for codereview.stackexchange.com while the non-working part is hidden behind the #ifdef and the error message should be in the question. — largest_prime_is_463035818 34 secs ago
@Jamiec Code Review is not a code rewriting service, and the current question as-is is not reviewable, as a lot of context is missing. If the context gets provided, it might be on-topic. — Zeta 26 secs ago
9:23 PM
too bad - there are no answers... so I "must" deal with that
@SᴀᴍOnᴇᴌᴀ IMO would be a good answer. But I don't flag answers in comments any more because my flags get declined
@Segma Short answer: context. Where does this code run? What are its goals? Is the code in the question complete, or are critical details missing? Long answer: this post. — Zeta 59 secs ago
You'll get better responses posting this question on the Code Review SEWoodford 30 secs ago
@Zeta As a long-time Code Review user I don't really understand your comments. "Context", unfortunately, has a very specific meaning on Code Review. Are you talking about questions needing an explanation of what the code does? Because otherwise the question looks fine to me. — Peilonrayz 7 secs ago
9:38 PM
@Duga @Peilonrayz Yeah, sorry, meant explanation.
@Zeta Np "context" is a known issue with our close reasons :/
@Peilonrayz Thanks - I left a comment to that user, asking them to provide an answer instead of a comment
@SᴀᴍOnᴇᴌᴀ Nice, thanks!
codereview might be a better place to ask. — ChrisMM 32 secs ago
I’m voting to close this question because it belongs to (codereview)[environments/local/data/role/local/zendto.yaml] — tink 40 secs ago
You'll get better answers asking this on the Code Review SE. — Woodford 42 secs ago
10:20 PM
Q: How to simplify the code? frequent repetition of the same code.. Using Javascript map and filter

SegmaI have a problem. It seems very bulky and bad to me and I have to reduce it. I often repeat one and the same function..who can simplify this? private enabledButton(filterData: any) { if (this.checkEqualsDate(filterData)) { return this.removeDate(filterData) } if (this.checkEq...

What is your question? If you are looking for a code review, There is a stack exchange site for that. — Paul Rooney 19 secs ago
@joanis - the script is working, though. I still think that codereview is its rightful home. — tink 14 secs ago
This may be a better fit for Code Review. I deliberately linked to their asking help pages so you can make sure your question fits their requirements before posting. — user4581301 37 secs ago
If you need a code review I had one for you but question is closed now. — Xaqron 11 secs ago
10:44 PM
Q: C key: value file parser

Samuele B.I implemented a key:value format file parser in C, or something that comes close to it as there is no such thing as dynamically creating structs in C. Assumptions: we are creating a C program that needs some config options (e.g. the number K of threads in a concurrent server that handles requests...

11:29 PM
Welcome to SO - Please take the tour and read How to Ask to improve, edit and format your questions. This isn't really the place for suggestions and explanations. Code Review. Code Review Stack Exchange is a question and answer site for peer programmer code reviews. Stackoverflow is more on-topic for questions about problems and algorithms. — lorem ipsum 55 secs ago
If there are not specific issues and just want to know the "right-way" this question seems more inline with Code Review. Code Review Stack Exchange is a question and answer site for peer programmer code reviews. Stackoverflow is more on-topic for questions about problems and algorithms. — lorem ipsum 33 secs ago
@loremIpsum CR is not the place for How to questions - the code must be working properly. Please see [the help center page ](codereview.stackexchange.com/help/on-topic) for more information. — Sᴀᴍ Onᴇᴌᴀ 15 secs ago

« first day (2910 days earlier)      last day (25 days later) »