« first day (2984 days earlier)      last day (1331 days later) » 

00:03
REFRESH! There are 7674 unanswered questions (89.3978 answered)
 
1 hour later…
01:09
0
Q: dynamic-load css or script

smallscriptSee original question here "HTML and JS to dynamically load, refresh, and execute JavaScript from external file" What code or design would you use to support dynamic-loading of css and scripts? Requirements support promise-await-async including error-handling support load-once caching, includi...

 
3 hours later…
03:56
@Duga Fine
@pacmaninbw Congratulations, I think. Some say you're only as old as you feel, but I know the body does betray us at times.
 
1 hour later…
05:25
@pacmaninbw That's not a sign of being old; that's a sign of being wise :)
Monking
 
1 hour later…
06:35
your code is virtually undebuggable. when working with other people you should never perform so many operations in one line. How do you pass code reviews like that? please break the line 'thresholds = np.r_[0:np.max(np.r_[S_fix, S_rand[:,rep]]):step_size][::-1]' to single operations and post which one actually causes the problem. — yann ziselman 51 secs ago
06:47
How will you guarantee that your programmers won't modify that check and/or work around your restriction? I'd think your time would be better invested in code reviews than trying to fight an internal battle against your own programmers. — deceze ♦ 12 secs ago
Yeah, but if you start doing that "at least", and you do have a malicious programmer in your organization, then they will up their game and circumvent your restriction in some way (there's always some way or another if you have control over the source code), at which point it's a cat and mouse game which can consume everyone's time. So, it doesn't really buy you any protection, and just ends up costing more resources than a code review would. — deceze ♦ 32 secs ago
07:12
The firewall won't prevent requests between the client's browser and a malicious service. If proper code review is not in place it's mission impossible — lastr2d2 47 secs ago
I’m voting to close this question because requests for review of working code should be made at codereview.stackexchange.comPaulw11 27 secs ago
0
Q: A recursive_transform template function for the binary operation cases in C++

JimmyHuThis is a follow-up question for A recursive_transform Template Function with Unwrap Level for Various Type Arbitrary Nested Iterable Implementation in C++ and A recursive_print Function For Various Type Arbitrary Nested Iterable Implementation in C++. Besides the usage with single Ranges input l...

 
2 hours later…
08:56
I’m voting to close this question because it should be on codereview.stackexchange.com — Alnitak 41 secs ago
0
Q: Three Project Euler solutions in the D programming language

AlekseyI recently wrote some programmes in D language to solve the first ten problems on Project Euler, but I'll be discussing only three of them (but you're free to check out my GitHub repo with all ten solutions). I also wrote an article discussing the solutions (protip, if the paywall is giving you p...

09:43
Please read A guide to Code Review for Stack Overflow users and determine if your question might be better suited on Code Review Stack Exchange. — Matt 51 secs ago
This is currently off topic for StackOverflow. Try codereview.stackexchange.com instead — FluxedScript 46 secs ago
0
Q: Refactor game of life in OO

GwycI failed to use OO and I'm wondering where and how I could correct it. package life; import java.util.Random; public class MatrixGeneration { char next_gen[][]; char current_gen[][]; int game_size; int number_generations; int seed; public void Generation(int game_size,...

If you have working code, but are looking for easier, cleaner, more efficient, elegant, ...etc, then Code Review is more suitable. — trincot 32 secs ago
10:18
0
Q: looking to optimize array looping or a even a better solution is appreciated

Ramakrishnalooping array for 7 times for printing the following output int[] arr = { 9, 2, 7, 4, 6, 1, 3 }; 92746 13927 46139 27461 39274 61392 74613 static void Main(string[] args) { int[] arr = { 9, 2, 7, 4, 6, 1, 3 }; int rotate = 7; int p...

 
2 hours later…
12:04
@Mast @TobySpeight Is a C/C++ question that has no executable code, only Compiler directives on topic?
@pacmaninbw It's a judgement call, but I would say that it probably is - though would be more useful if there were samples of use-cases to show why it's valuable. And conceivably, someone could use C preprocessor as a macro language for other purposes (as is done for X resources), and I'd expect that to be on topic.
@Vogel612 do you agree with @TobySpeight?
Why wouldn't compiler directives count as code
Because compiler directives by themselves only control what is being compiled. In this case nothing is being compiled at all because the code is only compiler directives. There is no executable code.
The code there can't actually do anything.
Is controlling what is being complied doing something
12:18
Yes, which is why I'm asking rather than just VTC.
This code can't be tested without additional code.
Basically it has already been reviewed in the comments because 2 errors were found.
@pacmaninbw in this particular case I'm inclined to say that the amount of logic that is in these compiler directives constitutes code
Just because compiler directives control which code is compiled that does not mean they are not code.
After all, metaprogramming is a thing
Thank you, that helps.
13:22
@soomi Even if you didn't ask for code review, for the rest of us we appreciate errors being pointed out because people may be using this thread as reference in the future. — Alchemist 10 secs ago
13:45
Given you have working code and you are only seeking to improve, It seems to me this question is more suited to be asked in the Code Review Forum. Code Review is a question and answer site for peer programmer code reviews. Please read the relevant guidance related to how to properly ask questions on this site before posting your question. — itprorh66 7 secs ago
0
Q: Recursive power (mathematical operation) function in C

Gustavo DuarteHow to make a C recursive exponentiation (power) function better? I developed a pretty simple (yet decent, imo) power function for the sake of learning. I'm not quite trying to compete with math.h's double pow(double __x, double __y) double pwr(double _base, double _exp) { if (_exp == 0) ...

14:21
Ellen Spertus on July 05, 2021
While there are many resources to help programmers write better code—such as books and static analyzers—there are few for writing better comments. While it’s easy to measure the quantity of comments in a program, it’s hard to measure the quality, and the two are not necessarily correlated. A bad comment is worse than no comment at all. Here are some rules to help you achieve a happy medium.
Is there a limit to the amount of code for review in a question here?
14:43
@GoldCredential Posts have a character limit of ~64k. You should be able to fit a couple thousand LOC in a question just fine.
14:56
That's great!
Shouldn't there also be a site for code project reviews, though? Has it ever been proposed?
You can review a project over a series of questions and answers. However I'm not sure a site dedicated to larger code bases would work with the existing SE mechanisms
15:22
@GoldCredential I've manged to get up to about 3000 lines of code reviewed here. Keep in mind professional code reviews are limited to about 200 lines of code at any one time due to the amount of time necessary to review.
@pacmaninbw Questions which are both C and C++ are rarely on-topic, in my experience.
@GoldCredential There are not many people interested in doing so. Those that are, are on GitHub.
4
@Mast Yes, but in this case they could be due to the nature of the code, the header code can be used with either, it really is C code that can be used as C++.
@Mast any stats suggesting the former?
GitHub might have some stats. Usually it is people working on the same open source project.
@GoldCredential General sentiment, I don't have stats on that.
15:25
@GoldCredential Yes, gained from years of experience on CR
4
@Peilonrayz In this case I think they are looking for hard data rather that anecdotes.
@pacmaninbw I could write a SEDE, but a quick look at average answer length is a clear indicator.
Yes. But generally people on CR aren't willing to invest that much time in reviews.
@pacmaninbw No, I get it :)
maybe there can be a site without very exhaustive reviews for projects but quick points or something
15:30
@GoldCredential If you look at some of my most recent questions you will see they are related pieces of a larger project that I broke up as unit tests.
yes, just saw, it's pretty cool.
@GoldCredential If you want design reviews rather than code reviews there is Software Engineering
15:46
I am just a web dev beginner who worries too much about his working code lol.
15:57
Monking
Monking
Monking
what do you mean?
34
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Meme: Monking Originator: Morwenn Cultural Height: The 2nd Monitor Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking Examples: A small chat search Variations: Monkernoon, Monkevening, Monknight, and the reversed gniknoM sometimes used when one le...

But user rolfl isn't here?
16:07
The origin was a greeting to a specific user. However, words can change over time. Even meme words
16:24
0
Q: DDD: interaction between 2 objects

SeUserI have one entity: class PlayerHouse { private Player player; private int defence; private int rooms; public void upgrade() { player.decreaseMoney(someMoney); player.decreaseStones(someStones); player.increaseExperience(someExperience); this.defen...

 
2 hours later…
18:35
0
Q: Replace n or all occurrences of substring in C

kluttI wrote this code as an answer to a question. But I'd like you to have a look at it. This post is basically a copy of the answer I posted The code does no error checking. It assumes that the output buffer exists and is big enough and that src, orig and new are valid strings. The headers needed: #...

18:57
@Feeds Got some funny memes
Will this even compile as C? If C++ only, use the inline keyword. force_inline doesn't guarantee an inline function, and where it does your functions are simple enough they should be inlined. Use a code review to pick up problems with "visually consistent" code. — 1201ProgramAlarm 42 secs ago
19:36
@Feeds Might be useful for beginners.
@GoldCredential rolfl may not be in the room most of the time but he is regularly on the site. That said, @Peilonrayz comment does apply, this is a general greeting now.
19:53
0
Q: syncronizing visitors in javascript (without an NTP)

user1999728Warning: sound (not very loud, but still) The point here is to synchronize everyone who visits the page as well as possible - that is, have everybody's Date.now() + difference be as close as possible to each other's, where everyone has their own difference calculated (and since now() depends on t...

 
4 hours later…
23:54
Hmm, I think I have a problem... I've spent the last two days cleaning up my tabs. And I'm like "Yay, I've got pretty much no tabs!" I count the amount of tabs and have ~300 tabs left...

« first day (2984 days earlier)      last day (1331 days later) »