« first day (3063 days earlier)      last day (28 days later) » 

12:02 AM
REFRESH! There are 7828 unanswered questions (89.3067 answered)
 
12:25 AM
possible answer invalidation by mdfst13 on question by user247399: codereview.stackexchange.com/posts/266288/revisions
 
 
1 hour later…
1:49 AM
When you have code that is bug-free and working as expected, but want to know if it can be improved -- ask on Code Reviewmickmackusa 41 secs ago
 
2:43 AM
My last 5-ish questions on the *stackexchange network have been closed for various reasons. For example, when I asked on security which vulnerability a captcha library exploited, I was told offtopic/requires-code-review/ask-library-author-instead/end-rant.
I want to know if I should ask my current question here or on software engineering. It is somewhat hypothetical code regarding thread safety of consumer/producer thread, but everything is complete except the data generation & processing stubs. I want to know if it is thread-safe, if threading.Event variables are required (I think not), and if the algorithm could be conceptually simplified
 
3:44 AM
@user19087 I'm afraid that's not going to work on Code Review.
 
3:57 AM
@Mast so, software engineering?
 
@user19087 You'd have to check with them.
But from what I can tell it's a closer fit to them than to us. That doesn't mean they'll accept it, but you got a better shot there.
Considering people all over SE are known for improper redirects, definitely ask them first.
All sites have a help center, that should help.
 
For the record, 1) this process is frustrating 2) stackexchange was more accepting years ago 3) you should be able to move questions, with cross-site moderators automatically moving questions to the correct site, maybe even a generic questions site 4) I'd probably get an answer faster on reddit
 
4:13 AM
Noted.
 
btw, thanks, I guess. Also, stackexchange in a nutshell: xkcd.com/2518
 
5:12 AM
Monking
 
 
3 hours later…
8:14 AM
for code reviews there is codereview.stackexchange.com. Though it is for working code. If there is a problem with your code, you should explain what it is — 463035818_is_not_a_number 56 secs ago
If you want an answer based on "wrong" or "right", you may find better results on softwareengineering.stackexchange.com or codereview.stackexchange.comCaTs 25 secs ago
 
 
1 hour later…
9:29 AM
This question would be a better fit for CodeReview.se, I think. — Ian Kemp just now
 
0
Q: Config with immutable lists

petrushI want to have a config class with immutable lists. Is it ok to create it like this? @dataclass(frozen=True) class Config: a_types: Tuple[str, ...] b_types: Tuple[str, ...] @classmethod def from_env(cls, env: Optional[ENV] = None) -> "Config": env = env or os.environ ...

 
 
1 hour later…
10:48 AM
Should it be on Code review ? — Elikill58 58 secs ago
 
 
1 hour later…
12:01 PM
0
Q: Handling performance of ngx-datatable with large volumes of records?

KP257I am using ngx-datatable to load large volumes of records. However, the larger the volume, the longer it takes. I read somewhere that you can speed it up by sorting then assigning it to the data source. Could someone please assist me with finding the best way to improve the performance of this pr...

 
12:21 PM
No problem :) and yes i think they will be more precise on code review's se — Elikill58 just now
Before you post at Code Review, make sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight just now
 
12:53 PM
You probably want to ask this on Code Reviewnot_speshal 26 secs ago
This actually belongs on codereview.stackexchange.com rather than here, since your code is working. Also, it would help if you explained the context of this code, as we can only guess at what it is meant to do. — Lev M. 40 secs ago
 
1:15 PM
0
Q: Object to ignore unused function output parameters

Matthias GrünIn our software we have some functions that return information through lvalue reference parameters, which, in some cases, are irrelevant for the calling code. For that reason, I tried to come up with an object that can be used instead of a previously declared dummy variable, similar to std::ignor...

 
 
1 hour later…
2:22 PM
No, broken code is not ready for review until it's working as intended. And yes, this would be immediately closed on Code Review as it's lacking the necessary context (what are mx and my? What's hidden in those ...? What's the intended result? Showing the unit tests would help clarify the purpose, too). — Toby Speight 49 secs ago
 
3:08 PM
Monking
looks like it was somewhat a silent night in terms of new questions - especially given we are in September
 
I'm still torn on choosing an answer for this question. I believe the answer by dariosicily is what I was looking to hear, while Sᴀᴍ Onᴇᴌᴀ's answer gives a very valid point surrounding reflows. Additionally, the answer by Blindman67 summarizes both of these answers in a very concise manner.
I think the one by Blindman67 is the answer future readers would be looking for, so is it against policy to accept their answer over the other two since they answered first?
 
I think the closest we have to policy is the following meta. However (unless SO get their way) we can't change your accept and the accept is entirely your decision.
50
Q: Which answer to accept?

BenVI can imagine this situation coming up frequently on this site. What should we do when there are multiple helpful valid answers? Accept the one we think is most helpful? Accept the one that was posted first? Accept neither? Accept the one with the most upvotes? I think we should have a docum...

 
Monking
@Tacoタコス It's not set in stone. When in doubt, I personally pick the one that helped me most. Sometimes 2 answers are competing for first price, but you only got one checkmark.
 
@Mast Its agonizing lol
 
@Tacoタコス We can help with that. Lets get you some more answers... ;)
 
3:20 PM
@Peilonrayz Wait, they're trying to allow users to change the accepted answer? I thought that's what the unpinning the accepted answer was trying to solve?
@Peilonrayz 🤣
 
@Tacoタコス AFAIK unpinning the accept is a meeting in the middle of sorts.
 
3:42 PM
Monking
Anyone knows AZ-204?
 
@skiwi perhaps this guy?
 
@SᴀᴍOnᴇᴌᴀ Oh was just curious, like I am taking it right now
Enjoying the ride and all
 
4:02 PM
You "question-closing-guys" and mods may delete this comment as often as you like. But this question, closed for missing "debugging detail" is not missing any debugging details at all. The code runs perfectly fine. It has no bugs. Whoever was closing this with the given reason, is misguiding the community. Please check the question, read the source code, run it in your debugger, or whatever. You will find out that it is not missing debugging details. You may close it as "off topic" because it asks for a code review but not with the "debugging details" reason. — Armin Montigny 33 secs ago
 
0
Q: Refactor if-else with addition in JavaScript

codenewbie90I'm really new to code optimization and JS. And I like to learn with clean code. I would like to ask for help on optimizing my code. Thank you in advance. Here is my code: if(document.getElementById('salary-field').value ===''){     salary = 0;   }else{     salary = parseFloat(document.getElem...

 
4:57 PM
" Is there a more elegant way then iterating over fgets for the line number and then iterating over getchar ?" --> How about a more elegant way to find an elegant way? --> Write code the is fully functional, post it and than ask for elegant improvements. Perhaps on COde Review? — chux - Reinstate Monica 36 secs ago
 
5:29 PM
Jascha Drel on September 22, 2021
A new way to discover and share knowledge about version control, CI/CD, DevSecOps, and all-remote workflows
 
5:39 PM
Just do what @stefan says . And open-ended questions about refactoring your code are off-topic for Stack Overflow, however they may be appropriate for Code Review. — max 56 secs ago
 
0
Q: Need Feed Back On Url & Html Encodings On Pagination Section According To Best & Valid Practices

Nut Cracking DudeGood Day, I wrote this Pagination Section. It shows links to pages 123456789 and so on on SERP (Keyword Search Result Pages). Like you see on Google SERPs. Even though it works, I'm not sure I finished it to the best or valid practices. I'm worried about the encoding functions (raw_urlencode,urle...

 
6:36 PM
0
Q: Unity - How should I store and interact with game data and user data

Joshua NixonI worked on a game a while ago but I plan to pick it up but I want some advice on how to structure the code. The game has 2 main data types - GameData and UserData. Game data includes values like names, formula values etc where as UserData contains data such as current item levels, inventory etc....

 
This may be a better candidate for CodeReviewHenry Ecker just now
 
 
1 hour later…
7:55 PM
If you want code advice, check Code reiew which is another Stackoverflow website, specialized for code analyze — Elikill58 8 secs ago
If you didn't know about it, there's a whole Stack Exchange site called Code Review that specializes in this kind of thing. You might get more attention on improving your code over there. — user1717828 17 secs ago
 
8:17 PM
If you want it to be received better, (a) ask it in the right place (if it works as is, it should be on codereview.stackexchange.com), and (b) phrase it as a question, not as a request/order, e.g. instead of "Please optimize the code", use something like "What can I improve about this code?". If you're tryng to improve specific parts, explicitly say that. — HolyBlackCat 46 secs ago
Luckily, I could get a big help in the codereview as well but next time I will create the minimal reproducible example. Thank you for pointing it out! — Daigo_diego111 29 secs ago
 
8:33 PM
Any SQL pros around? Do you know how I can select from one table into a new table dynamically at run time? I've tried the following but SQL complains
IF @leftHandSide = 'A'
    SELECT * INTO #lhs FROM A
IF @rightHandSide = 'A'
    SELECT * INTO #rhs FROM A

IF @leftHandSide = 'B'
    SELECT * INTO #lhs FROM B
IF @rightHandSide = 'B'
    SELECT * INTO #rhs FROM B
For context I'm writing a large SEDE query and going from "Sources" to "Grouped" seems to be a PITA - data.stackexchange.com/codereview/revision/1466623/1799615/…
 
@Peilonrayz Semicolons, maybe?
 
@Peilonrayz you'd likely need a CASE statement
 
@SᴀᴍOnᴇᴌᴀ Oh, yeah that may work. I tried using a CASE to make Sources to work originally and somehow completely forgot about it now...
 
@Peilonrayz OR does it work with those moved into the WHERE clauses? data.stackexchange.com/codereview/query/edit/1466627
 
8:49 PM
The IFs work fine as I only build #Answers if A is provided in either the lhs or the rhs. However now getting the grouping to work if I change the lhs to Z for Zombies then the code won't work any more, since I've hard coded them:
  SELECT
    sum(a.Value) AS Value,
    sum(a.Amount) AS Amount,
    a.ChunkName AS ChunkName,
    a.ChunkDate AS ChunkDate
      INTO #ChunkAnswers
      FROM #Answers AS a
  GROUP BY a.ChunkName, a.ChunkDate
  ;

  SELECT
    sum(q.Value) AS Value,
    sum(q.Amount) AS Amount,
    q.ChunkName AS ChunkName,
    q.ChunkDate AS ChunkDate
      INTO #ChunkQuestions
      FROM #Questions AS q
  GROUP BY q.ChunkName, q.ChunkDate
  ;
I also can't seem to get the CASE to work either D:
  SELECT
    *
  INTO #lhs
  FROM CASE
    WHEN @leftHandSide = 'A' THEN
      (SELECT * FROM #Answers)
    ELSE
      (SELECT * FROM #Questions)
  END
 
9:27 PM
If you're looking for people to go over your code and point out improvements, you want Code Review. Yes, I deliberately linked to their help pages on asking questions because you'll want to read them before posting there. Trust me. If you're just dropping this here for other purposes, know that Stack Overflow is a Q&A site. If you're not asking a question, you better be answering. In your case it looks like you're interested in speed. Your question would be helped greatly by adding the result of a few profiling runs. — user4581301 9 secs ago
 
9:47 PM
would something like this work?
SELECT * INTO #lhs
FROM (
SELECT * FROM #Answers WHERE @leftHandSide = 'A'
UNION-- #lhs
SELECT * FROM #Questions WHERE @leftHandSide <> 'A'
) a
--*/
 
Given my n00b level SQL skills I can't actually see how that wouldn't work. I'll test it now tho, thanks
 
@Peilonrayz I wouldn't expect many n00bs to use common table expressions, pivots, STUFFing, etc.
~ looks forward to eating stuffing in November
 
Ah, but where I got them from was... rolfl. He has lots of good SEDE queries to steal learn from
 
hehe 279 queries including Don't touch my junk.
 
10:08 PM
@SᴀᴍOnᴇᴌᴀ lol, that's a funny name
@SᴀᴍOnᴇᴌᴀ Seems FROM (SELECT ...) is invalid syntax in SEDE's SQL. I also tried not using () and doing a JOIN which seems like it'll be a PITA but possibly doable.
Thanks for helping me on my way :)
 
10:24 PM
@Peilonrayz yeah that is why I added an alias after the closing ) - i.e. a
 
@SᴀᴍOnᴇᴌᴀ Oh, I didn't even notice that when manually copying and pasting. That works great, thanks!
 
cool
perhaps I should have made that more noticeable - e.g. obnoxiousNameSoSQLWontBeBorked
 
Whilst I'm sure that would work, I don't think the fault here is at all yours :)
 
10:54 PM
codereview.stackexchange.com seems a lot more appropriate. — Random Davis 31 secs ago
 

« first day (3063 days earlier)      last day (28 days later) »