Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Activity for klutt‭

Type On... Excerpt Status Date
Edit Post #285883 Initial revision almost 3 years ago
Question How to prevent token from being refreshed
I have an Angular application. The frontend has a mechanism that periodically fetches some information like this: ```` ngOnInit(): void { setInterval( () => { this.http.get(... ).subscribe( (data) => { this.data: any = data; } }, ...
(more)
almost 3 years ago
Edit Post #285826 Post edited:
almost 3 years ago
Edit Post #285875 Initial revision almost 3 years ago
Answer A: A cleanup of "What type of questions can I ask here?"
If we compare to SO (and we do) there's one thing I really don't like there. And that is that so many questions get closed for being too opinionated. Granted, many of them is quite naively asked. Like simply "What is best of A and B?" But this can often easily be rephrased in a way that allows an...
(more)
almost 3 years ago
Edit Post #285826 Post edited:
almost 3 years ago
Edit Post #285826 Post edited:
almost 3 years ago
Comment Post #285035 @#55310 The Monica incident was also what drove me here. But there are two important things to consider here. 1 - Even if a user didn't come here for the features, it can be the features that makes the user stay. 2 - Just because you aren't attracted by features, that does not mean that no one...
(more)
almost 3 years ago
Edit Post #285826 Post edited:
almost 3 years ago
Edit Post #285826 Initial revision almost 3 years ago
Answer A: How can we grow this community?
Increase exposure One way of increasing our exposure is to use Codidact as a source when answering on other forums. As long as we are treating Codidact as any other source, there is absolutely nothing wrong with that. I did that with this answer on SO Improve technical stuff Sure, there are ...
(more)
almost 3 years ago
Edit Post #285811 Post edited:
almost 3 years ago
Edit Post #285811 Post edited:
almost 3 years ago
Edit Post #285811 Post edited:
almost 3 years ago
Comment Post #285784 It looks like there's not enough info in this question to reproduce the problem. https://software.codidact.com/posts/285810
(more)
almost 3 years ago
Edit Post #285811 Initial revision almost 3 years ago
Answer A: What is a minimal, reproducible example?
TL;DR A MRE (minimal reproducible example) is simply the minimal code and information needed for someone who is reading your question to reproduce the problem you are having. It needs to be enough code to actually reproduce the problem. Don't omit code based on a guess where the problem is. And...
(more)
almost 3 years ago
Edit Post #285810 Initial revision almost 3 years ago
Question What is a minimal, reproducible example?
Sometimes when I ask questions here, I get told that I should include a minimal, reproducible example. What is that?
(more)
almost 3 years ago
Edit Post #284175 Post edited:
over 3 years ago
Edit Post #284175 Initial revision over 3 years ago
Question Why is it considered bad practice to use float for representing currency?
This is intended to be a canonical post for this problem which is pretty common. Especially among beginners. I've heard that I should avoid using floating point variables for representing currency. What is the reason for that? Representing 123 dollars and 67 cents as 123.67 seems quite natural...
(more)
over 3 years ago
Edit Post #278850 Post edited:
over 3 years ago
Edit Post #278846 Post edited:
almost 4 years ago
Edit Post #279232 Post edited:
about 4 years ago
Edit Post #279232 Initial revision about 4 years ago
Answer A: Are there best practices for sticking conditions in WHERE clauses vs the JOIN statement?
@BruceAlderman gave a good answer with different aspects that covers the most. I'm not very good at SQL, so my answer is more general. When I have to choose between two different things that are equivalent in performance and functionality and readability is the only thing that's left. Then I try t...
(more)
about 4 years ago
Comment Post #277537 Good answer. However, I'd say that external memory is also optional. It's fairly common in embedded systems.
(more)
about 4 years ago
Edit Post #278895 Post edited:
about 4 years ago
Comment Post #278907 Yes, I could write it as a oneliner, but don't get stuck on the specific example. It was just made as an example, and actually, I would have written it as a oneliner, but I would do it by just removing the newline and have `while(arr[index]) index++;` as a single line. Actually I'm pretty fond of doi...
(more)
about 4 years ago
Comment Post #278896 Your first example is also something that would be solved by autoindentation. Plus that if I wrote that , I would put braces around the outer if plus the else. Like `if(x) { if(y) a=k; } else { a=m; }`. And also, autoindentation would solve the problem. It was autocompletion that caused the problem i...
(more)
about 4 years ago
Comment Post #278895 To me it sounds a bit like "you should not use i and j as counters in a nested for loop, because you CAN use the wrong one by accident" ;)
(more)
about 4 years ago
Comment Post #278895 While that example is pretty interesting, it's anecdotal evidence. I understand that it's still possible to produce bugs like this. One could also reasonably argue that it could have been avoided if they used `else if` instead of `if` or didn't use `goto`.
(more)
about 4 years ago
Edit Post #278895 Initial revision about 4 years ago
Question Is omitting braces for single statements bad practice?
Consider this code: while(arr[index] != 0) index++; vs while(arr[index] != 0) { index++; } Personally, I prefer the first. The fact that the braces are not needed makes them -- unnecessary. :) To me, it's just clutter that wastes a line. Or 2 if you're on...
(more)
about 4 years ago
Comment Post #278869 Thank you. Performance does not have the highest priority, but I'll incorporate that.
(more)
about 4 years ago
Edit Post #278846 Post edited:
about 4 years ago
Edit Post #278865 Initial revision about 4 years ago
Answer A: For scripting what are the pros and cons of command line arguments versus capturing input at the start?
@‭laserkittens‭ and @dmckee has already provided good answers, and I will not copy what's there. Personally, I treat cli arguments as the default choice because of the flexibility it gives to scripting. Only choose user input when it's obvious that it's necessary. A good case where you would li...
(more)
about 4 years ago
Comment Post #278809 *"If certain arguments are optional"* - This is fairly easy to solve in both approaches. I don't think it counts as a difference between these two concepts.
(more)
about 4 years ago
Edit Post #278846 Post edited:
about 4 years ago
Comment Post #278848 @MythicalProgrammer Truth to be told, you discovered a bug, but not the one you think. It's a bug in the specification. I was not looking for number of assignments. I was looking for number of arguments that should be passed and wrongly assumed they were the same. So the fix is to put n back and chan...
(more)
about 4 years ago
Edit Post #278850 Initial revision about 4 years ago
Answer A: Counting number of assignments that a `fscanf` format strings implies
I have found an improvement that is worth posting as an answer to my question. One thing that I was not comfortable with was coming up with test cases and figuring out how many assignments a format string should have by just analyzing it visually. so I had to find a second way to achieve the same ...
(more)
about 4 years ago
Comment Post #278848 @MythicalProgrammer I just made some CRAZY testing that I need to show you. I was not comfortable with manually figuring out how many arguments a format string should have, but on the other hand, that's also the problem I'm trying to solve. But I did a workaound and made the program create a new .c f...
(more)
about 4 years ago
Comment Post #278848 Hmmm, I don't think it's that important to test %n, but you definitely have a point in general about such things. I should not only test things that should work. I should also test things that should not work. I added tests including the asterisk: "%*d", "%*23d" and "%23*d" even though I'm not sure i...
(more)
about 4 years ago
Edit Post #278846 Initial revision about 4 years ago
Answer A: Are Linux-related questions on-topic?
Linux questions in general are not really topic here. But Bash is. After all, Bash IS a scripting language as much as Javascript. I have a hard time thinking of a question about Bash that is not on topic here. It would also be on topic to ask about problems installing programming software like ...
(more)
about 4 years ago
Edit Post #278843 Initial revision about 4 years ago
Question Autocompleting usernames in comments does not seem to work
It seems like autocompleting usernames does not work. I wanted to answer a comment and started typing @ followed by the first letter in the username, but no suggestion appeared. I tried pressing tab but nothing happened. Is this a bug? Is there's something wrong with my browser (Firefox)? Or is it...
(more)
about 4 years ago