« first day (3140 days earlier)      last day (44 days later) » 

12:00 AM
REFRESH! There are 7959 unanswered questions (89.2440 answered)
2 hours later…
1:37 AM
Q: Python text based adventure game Getting items

Dawson TaylorSo essentially I need to be able to get the items from rooms and my code keeps giving me a key error. I also need help in when you reach the boss you fight the boss and if you have all of the items then you win if not then you lose. I am not looking for very direct answers I would like to learn m...

1:47 AM
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 5 secs ago
1 hour later…
2:52 AM
Q: Java and JavaFXML Jeopardy Program

koncameronI am currently working on a JavaFXML Jeopardy game. I realized that I am rewriting a lot of code and am curious of ways to better the code so that it is easier to read and more concise. Below is an example of one of a 200 Category Button @FXML private void sportsTwoAction(ActionEvent event) { // ...

3:09 AM
@Jarod42 thank you for pointing me in the direction of zip_operator. I found an interesting discussion [codereview.stackexchange.com/questions/231352/… stackexchange). — Parsort 6 secs ago
4:07 AM
Before anything else, you have a SQL injection vulnerability. You should read up on those. After fixing that, if you can narrow your question down to a specific kind of improvement, it might be suitable for Code Review. — Ry- ♦ 57 secs ago
4:31 AM
4:57 AM
Q: Edits to someone's hashmap so it can have std::unique_ptr<char[]> or std::unique_ptr<wchar_t[]> as keys and can look keys up by char* and wchar_t*

my_first_c_programI edited someone's hashmap so that it could have std::unique_ptr<char[]> or std::unique_ptr<wchar_t[]> as keys, and so it could look things up using char* or wchat_t*. The code is too big to post here, so I'll post links to both versions. Here's the github with the original code: https://github.c...

5:28 AM
Given that your code works, you might consider posting it on Code ReviewMad Physicist 40 secs ago
It doesn’t make sense why this question was closed. I wasn’t asking for the original code to be reviewed, I was asking for my edits to be reviewed. If you close this question then you also need to close every other question since they probably didn’t write all the header files they’re using.
Where should I post it if it won’t be acceptable on codereview?
2 hours later…
7:56 AM
@my_first_c_program One reason for closing is that the code to be reviewed was at the other end of a link. As [How do I ask a good question? ](codereview.stackexchange.com/help/how-to-ask) says: Be sure to embed the code you want reviewed in the question itself. The title could be improved; something like "Hashmap supporting a mix of smart and raw pointers" perhaps?
There's nothing wrong with posting code that builds on someone else's work, and it's absolutely correct to give appropriate credit in that case. But you must want a full review of the code, and include the code to be reviewed. The other end of a link is not suitable, for the reasons given in Can I put my code on a third party site and link to the site in my question?.
8:24 AM
Q: My .vimrc settings

AmitI am posting my .vimrc settings. Are they all right? Please review. .vimrc set hlsearch set ts=4 set expandtab ...

8:47 AM
Please be more specific with your question. This isn't a code writing service. For code review, theee is another site on the network. — Charlie Clark 24 secs ago
2 hours later…
10:19 AM
I’m voting to close this question because it's not programming related but seems to ask for a code review. — jps 32 secs ago
11:19 AM
Q: Python formatting column alignment

MicaI am a beginner in Python, so I apologize for my lack of knowledge. I came across a code which prints a list of lists in tabular format. The code is as follows: my_list = [ ['cat', 'dog', 'rat', 'bat','bee', 'ant', ], ['owl', 'eel', 'fox', 'pig', 'hen', 'doe',], ['hog', 'ewe', 'cow', ...

Q: Duplicating 8-bit BMP with C++

God Must Be CrazyTrying to create a simple image processing library in pure C++. Here is the first part, duplicating 8-bit BMP images (taken from Udemy in hybrid c/c++ but I modified it a bit). Any comments are welcome. Image.hpp #pragma once #include <stdlib.h> #include <stdio.h> #include <iostream> class Im...

11:44 AM
Q: Pig Latin terminal app in Rust

user1984I've started learning Rust a few days ago. This is the Pig Latin exercise from the Rust Book. The code works as expected. I have commented the logic of the program in the code. My handling of Strings is very hacky, as far as I know. To be honest, I mostly fiddled with it looking at error messages...

1 hour later…
12:59 PM
Q: Long running persistent channel, waitgroup incremented and decremented, do I need to remove item from channel after handling request?

SuperSecretAndHiddenFromWorkI have a channel where inbound requests to the program are added, I also have a waitgroup and rate limiter for handling the routines Then I spawn a go routine to handle the request I use waitgroup.Add() and waitgroup.Done() to increment and decrement the waitgroup But what about the channel that ...

1 hour later…
2:10 PM
2:39 PM
Q: Check nullability vs throw NullExceptions

touchofevilI have been trying to understand the difference between two approaches and have always got confused so thought of asking this question here. Consider following code, public string? MyMethod(object parameter) { return parameter.Something(); // access something on object assuming return type is...

3:11 PM
Ryan Donovan on December 08, 2021
Vision AI used to be something only specialized shops could add to projects. Now it’s accessible to any software developer out there.
3:38 PM
Cyclomatic complexity goes up with every control statement (for, if, case, etc.). This is really more of a code review question. You can also research how to reduce cyclomatic complexity. — Calculuswhiz 51 secs ago
3:55 PM
Q: React async useEffect with loading and error state

KGEThis is my first time trying to add clean error handling and loading notification for async requests in my project. It looks kind of bulky to me, but maybe that's because I'm inexperienced? This is what I have at the top of all my index-like components. I also thought maybe it was a good target f...

4:07 PM
4:17 PM
I'm beginning to think that the SE developers are changing things just to keep their jobs. I don't see any real benefit from the newest changes to the profiles.
4:34 PM
You should ask code-optimize questions on codereview.stackexchange.comTim Schmelter 11 secs ago
4:48 PM
@pacmaninbw mobile-friendlier.
and honestly profile really was overdue for an overhaul for the design, accessibility and probably also on the backend
they need to move the product to something that is more management friendly as well, because Q&A doesn't get them any revenue and the VCs want to see some ROI now
and they will only get that if they can sell SO for Teams better, and that needs management buyin
@TobySpeight I reposted it with the changes
Q: Edits to someone's hashmap to support a mix of smart and raw pointers

my_first_c_programI edited someone's hashmap so that it could have std::unique_ptr<char[]> or std::unique_ptr<wchar_t[]> as keys, and added a version of the find method which lets you pass char* or wchar_t* and the c string size as arguments. Here are the parts I added: // original code // lines 51-78 #ifdef _WIN...

5:10 PM
Q: Edits to someone's hashmap to support a mix of smart and raw pointers

my_first_c_programI edited someone's hashmap so that it could have std::unique_ptr<char[]> or std::unique_ptr<wchar_t[]> as keys, and added a version of the find method which lets you pass char* or wchar_t* and the c string size as arguments. Here are the parts I added: // original code // lines 51-78 #ifdef _WIN...

I’m voting to close this question because SO is not a code review site however CodeReview is exactly that :) — RiggsFolly 24 secs ago
5:34 PM
@Vogel612 Mobile friendlier explains it, thanks.
Q: Group implementation in lean

Sriotchilism O'ZaicI'm making a nice little implementation of groups from first principles in lean. To do this I am making 3 basic structures, semigroups, quasigroups and unital magmata. Groups are then defined to be structures that are all 3. A lot of things fit really nice here. I can have multiple groups, semig...

5:57 PM
@my_first_c_program In the future, don't repost just edit the question and let the question be reopened. Reposting causes your account to have a negative mark which can lead to automatic bans.
Q: Implementing a LinkedList in Rust

Christian BongiornoI have this LinkedList implementation for rust and it isn't quite what I am looking for. Ideally, it would be more like scala's implementation of List and be entirely immutable. This implementation also consumes the list as it iterates which is also not what I want. So, an ideal LL would: Implem...

6:53 PM
Q: New responsive Activity page

Dan CormierUpdate: This was rolled out on all network sites December 7, 2021. After receiving and incorporating feedback the community (thank you!) we’ve launched the responsive Activity page! The most common feedback we received was that we’re straying too far from a summary for the summary view. This feed...

7:09 PM
I've thrown clang-format at your code, it's a bit nicer to read now :) couple general code review comments: — Marcus Müller 14 secs ago
Your sig_figs function is … interesting. You declare a lambda, which captures / gets passed all the arguments to its containing funcition, just to directly call it. Um. that makes no sense. Simply write that code into the function. Your lambda gymnastic bears no benefit. Was this a badly understood copy&paste of someone else's code? If I was your examiner or code reviewer, you'd have to explain in detail what and why you're implementing here. — Marcus Müller 6 secs ago
1 hour later…
8:30 PM
Q: Does my loop have its complexity deconstructed?

Bah SohI often see good developers say "if you have a complex loop, create small methods to decrease the complexity of the code and make it cleaner and more maintainable." Following this point of view, I decided to follow this "good practice" and created a simple example of how it would be to reduce com...

8:55 PM
Q: Infinite concurrent file upload with HttpClient in API - C # / Blazor / .NET6

abberdeenI have created a helper service to send files from the client application to the API over HTTP using the POST method. Source project on Blazor Server Side, .NET 6, C # 10. Service features: Sending files to the API. A limited number of parallel sending processes. Ability to freely add files to t...

1 hour later…
10:01 PM
@Peilonrayz Ok, I won’t
10:42 PM
someone said "The problem is the added specializations for types in std are invalid."
What do they mean? Are they talking about this which I found just now? https://en.cppreference.com/w/cpp/named_req/Hash
Or are they talking about std::equal_to too? Or something else? if I get rid of the second operator() version which takes size as an argument, and instead have keyToIdxWithSize call hash_bytes directly, will that fix it and make the code fine?
Also I think I could have written template<class T> and used T* and std::unique_ptr<T[]> for both hash and std::equal_to. Would it be better to do that?
11:17 PM
@DavidLjungMadisonStellar I wasn't aware that we had to run everything by you before proceeding, but if that's the case, do be a pal and let us know the best method to schedule a code review. — tadman 39 secs ago
@DavidLjungMadisonStellar Like when flying someone is "in command" and their decisions must be carefully considered or there will be serious consequences, the same goes for programming. The good news is we can have code reviews. The responsibility is always up to the programmer. Of course, they can be supported or hindered by the surrounding process, and are expected to operate within whatever parameters they've been given. — tadman 15 secs ago
Q: One-time dynamic, many-time static type dispatch

lurscherAnnoyed at the tension between good software design principles that require well-defined delimitations between interface and implementations, and the requirements for critical code to run fast, which demands avoid placing runtime overheads in the critical path, I've come up with a solution that I...


« first day (3140 days earlier)      last day (44 days later) »