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.

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
2.6k posts
 
75%
+4 −0
Q&A How do I share a type between a client and server, but make a specific field optional for one and required for the other?

This can be done using conditional types. I defined these helper types: enum Role { server, client }; type PossiblyHiddenFromClients<R extends Role, T> = T | (R extends Role.client ? un...

posted 1y ago by Emily‭

Answer
75%
+4 −0
Q&A When should I parenthesize macro arguments in C?

Simply put: parenthesis are used whenever we suspect that there may be operator precedence issues. Either because the user passed an expression containing several operands and operators to the...

posted 1y ago by Lundin‭

Answer
73%
+9 −2
Meta Growing software.codidact

I've been thinking about how the community might bring more contributors to software.codidact. One of the ways is to simply pitch codidact in questions, answers, and comments in stackoverflow. I'm ...

2 answers  ·  posted 4y ago by President James K. Polk‭  ·  last activity 4y ago by Lundin‭

Question discussion
73%
+9 −2
Meta Should "Hello", "Thank you", "Morning" and similar greetings be removed from posts?

Note: this is mostly a personal preference that I use when moderating the posts Generally, no While "Hello" and "Thank you" are noise (overhead) for the questions and answers, they are also part ...

posted 3y ago by Alexei‭

Answer
72%
+6 −1
Q&A What is the main difference between event delegation to other event handling patterns in JavaScript?

tl;dr The purpose of addEventListener is to define what happens when an event is triggered at some element. But it also allows us to implement event delegation, due to the bubbling/propagation beh...

posted 3y ago by hkotsubo‭  ·  edited 3y ago by hkotsubo‭

Answer
72%
+6 −1
Meta How are we supposed to give feedback for poor questions if such comments are deleted?

The question https://software.codidact.com/posts/281517 is currently voted at -3. I wrote several comments to explain why, so the author can hopefully ask better questions in the future. This morn...

2 answers  ·  posted 3y ago by meriton‭  ·  last activity 3y ago by deleted user

Question discussion comments
72%
+6 −1
Q&A How to detach my terminal window from a program ran from it?

This is usually handled by the shell, so it depends on the shell. That said, the relevant command is named the same across many different shells. Namely, the disown command. You can probably enter ...

posted 3mo ago by Derek Elkins‭  ·  edited 3mo ago by Derek Elkins‭

Answer
72%
+6 −1
Q&A How to detach my terminal window from a program ran from it? [closed]

I want to run a program, e.g. Firefox, from terminal, but whenever I close the terminal, program closes too. How to detach my terminal window from a program ran from it?

1 answer  ·  posted 3mo ago by kujaw‭  ·  closed 3mo ago by Alexei‭

Question linux terminal
72%
+6 −1
Q&A What's the fastest way to copy, preserving file attributes, on each platform?

I am looking copy files platform-dependently on Linux, Oracle Solaris, MacOS, BSDs, and Windows. I have found some system calls for each platform, namely sendfile(), copy_file_range(), fcopyfile()...

0 answers  ·  posted 6mo ago by Melkor-1‭  ·  last activity 6mo ago by Melkor-1‭

72%
+6 −1
Q&A How can I git checkout the previous HEAD?

There are many ways to get the previous states of HEAD, and which one to use will depend on each situation. Git keeps reference logs (also called "reflogs"), that "record when the tips of branch...

posted 4mo ago by hkotsubo‭  ·  edited 4mo ago by hkotsubo‭

Answer
72%
+6 −1
Q&A How to unittest method that involves contacting remote servers?

Let's say I have this class: class myService { private boolean foo(T arg) { return arg == 42; } public Response bar(U arg) { if(foo(U.field)) { return Response.st...

1 answer  ·  posted 3y ago by klutt‭  ·  last activity 3y ago by meriton‭

72%
+6 −1
Q&A What does a variable followed by parentheses ("ptr()") mean?

void (*ptr)() defines a function pointer. It says that ptr is a pointer to a function. But that function must have a void return type, and take an arbitrary number of parameters (that's what the em...

posted 3y ago by hkotsubo‭  ·  edited 2y ago by Martin Bonner‭

Answer
72%
+6 −1
Q&A Best practices in setting up a development & production environments

I am developing a web app that is tied to a database. My codebase is stored on a private GitLab instance. I would like to set up a workflow that would look something like this: I have a developm...

1 answer  ·  posted 3y ago by Mu3‭  ·  last activity 1y ago by Mithical‭

Question database devops
72%
+6 −1
Q&A What are the pros and cons of using objects vs associative arrays for JSON results of a CURL request in PHP?

I have a PHP script that uses CURL to return a JSON result that looks //Curl set up code $result = curl_exec($ch); //Error checking code $json = json_decode($result, true); //Code to process r...

1 answer  ·  posted 4y ago by Charlie Brumbaugh‭  ·  last activity 4y ago by Yaskur‭

Question php json
72%
+6 −1
Meta How does the community feel about resource requests?

These are fine, IMO: Here is my specification of what the program should do /--/. I'm stuck at x, (optionally: here is my code), where do I go from here? Is this implementation of x (code follows)...

posted 4y ago by Lundin‭  ·  last activity 4y ago by Lundin‭

Answer
72%
+6 −1
Q&A Which abstraction should I choose for background services and why?

Which concept is best for managed background services? 1. RunAsync(CancellationToken): interface IWorker { Task RunAsync(CancellationToken cancellationToken = default); } ... IWorker worker =...

1 answer  ·  posted 4y ago by Kir_Antipov‭  ·  last activity 4y ago by Alexei‭

72%
+6 −1
Meta Are questions about web browsers on topic on Software Applications?

The site is called Software Development, not "Applications". Meaning programming. On-topic: Questions about different behavior of web browsers in the context of web application programming. Questi...

posted 4y ago by Lundin‭  ·  edited 4y ago by Lundin‭

Answer
72%
+6 −1
Q&A How to separate DB query logic from the application other than implementing a repository on top of an ORM?

I've been doing a lot of reading on implementing the repository pattern in C# projects and found controversy, or shall I say some strong criticism, made by seemingly very smart people with previous...

1 answer  ·  posted 4y ago by Marc.2377‭  ·  last activity 4y ago by Alexei‭

71%
+3 −0
Q&A Running remote scripts (cloud scripts) locally --- valid and securely as possible

An example for a current problem; the file downloaded can have a trivial name such as install.sh and collide with similar files (the rm is especially problematic here I think). This is why tem...

posted 3y ago by Peter Taylor‭  ·  edited 3y ago by Peter Taylor‭

Answer
71%
+3 −0
Meta Border-bottom of inline code is (sometimes) not displayed when it's in the last line of a paragraph

After I wrote this answer, I could notice that, when there's inline code in the last line of a paragraph, sometimes the border-bottom of the inline code text is not displayed. One case is when the...

0 answers  ·  posted 4y ago by hkotsubo‭  ·  edited 3y ago by Monica Cellio‭

71%
+3 −0
Code Reviews C# WPF MVVM View & Get new record values

Some thoughts: Consider using Github (or something like that, but I suggest Github due to its popularity) to share the project. It allows us not only to write some code but open PR with sugges...

posted 4y ago by FoggyFinder‭

Answer
71%
+3 −0
Q&A Trying to create a POST request with Apache

I have tried many different ways to do this with apache but the server seems to not be receiving the data. Stacktraces are not being printed so I can only assume I have the request set up wrong for...

0 answers  ·  posted 4y ago by cuzzo‭  ·  edited 4y ago by Alexei‭

71%
+3 −0
Q&A Search paths where all nodes are in a relationship with same node

Something like this query should work for you: MATCH (a:Person)-[:IS_SON]->()-[:WAS_BORN]->(b:Country) WITH a, count(DISTINCT b) AS birthplaces WHERE birthplaces = 1 RETURN a Note that...

posted 4y ago by r~~‭

Answer
71%
+3 −0
Q&A Why is this symlink() call returning successfully while apparently failing to create the sym-link?

Summary I've fixed the issue and what follows is the best explanation I have so far. What I had described in the OP were some of the observations, but I'll be including more detail so that it's (h...

posted 4y ago by ghost-in-the-zsh‭  ·  edited 3y ago by ghost-in-the-zsh‭

Answer
71%
+3 −0
Q&A Static and thread_local initialization order

TL;DR The initialization of the variables a and b in your question are indeterminately sequenced in relation to each other. The initialization order is not guaranteed between them. The initiali...

posted 4y ago by Lundin‭  ·  edited 4y ago by Lundin‭

Answer