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.

Posts by Lundin‭

167 posts
75%
+4 −0
Q&A C++ exit code -1073740940

C++ doesn't have error codes/exit codes other than return 0; / EXIT_SUCCESS / EXIT_FAILURE. The code you are getting is from the OS when your program crashes from a run-time error. -1073740940 is ...

posted 3y ago by Lundin‭

Answer
75%
+4 −0
Q&A What are X macros and when to use them?

Purpose and use X macros is a design pattern used for the purpose of centralizing data & code maintenance to a single point in the program. Instead of maintaining code based on some data set i...

posted 1mo ago by Lundin‭  ·  edited 1mo ago by Lundin‭

Answer
75%
+4 −0
Q&A Why is atoi dangerous and what should be used instead?

The atoi family of functions should never be used for any purpose - they are broken by design. The reason why can be found in the C standard C23 7.24.1: The functions atof, atoi, atol, and atol...

posted 4mo ago by Lundin‭

Answer
75%
+4 −0
Meta Comparing our site scope to Stack Overflow

The main difference between Stack Exchange and Codidact is that SE loves to spawn off hundreds of sites with lots of overlapping scopes, whereas Codiact has the category system, which means that co...

posted 5mo ago by Lundin‭

Answer
75%
+4 −0
Code Reviews Pattern / architecture for interfacing with components in C

Code review part: Design (important!) Global variables/external linkage are to be avoided (Why is global evil?). You don't actually have private encapsulation in this code since the inte...

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

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
75%
+4 −0
Q&A Why does calloc accept 2 arguments, and with what arguments should one call it?

It has 2 parameters for weird historical reasons that nobody seems to know the rationale for any longer. Like most functions in the C standard library, the function API was not well-designed. Keep ...

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

Answer
75%
+4 −0
Meta Tag creation/deletion criteria for Software Development?

Ok so we have fairly lax tagging rules here, as do most Codidact sites. Recently the Electrical Engineering community has started a clean-up of strange and off-topic tags. I wrote this over there: ...

1 answer  ·  posted 1y ago by Lundin‭  ·  last activity 1y ago by Alexei‭

Question discussion tags
75%
+4 −0
Meta To transfer, or not to, that is the question: whether 'tis nobler to let it stay or to take arms against Stack Overflow's dominance of FAQ canonicals

I would recommend to post it anew here as a self-answered Q&A and update it if needed. You can use the "works for me" reaction to label your own answer the "official" one. As an example of how...

posted 1y ago by Lundin‭

Answer
75%
+4 −0
Q&A Is partial allocation of an object Undefined Behavior?

Since I don't think the C standard says anything explicitly about cases like this, it is probably undefined behavior, under the "not mentioned in the standard" variety. If something isn't mentioned...

posted 2y ago by Lundin‭

Answer
75%
+4 −0
Meta Are questions about language design on-topic?

The ambition of this site was always to give more room for subjective and big picture questions compared with Someplace Else. However, I believe programming language design falls under the topic of...

posted 2y ago by Lundin‭

Answer
75%
+7 −1
Meta Should asking about book recommendations directly connected to software development be on-topic?

As someone who spent a lot of time trying to get this to work on Stack Overflow, I would advise against it. Some background story of my merry adventures with book lists: The story starts around...

posted 2y ago by Lundin‭  ·  edited 1y ago by Lundin‭

Answer
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 Why is atoi dangerous and what should be used instead?

According to Which functions in the C standard library must always be avoided?, the atoi family of functions is dangerous and should never be used for any purpose. The rationale given in the answer...

1 answer  ·  posted 4mo ago by Lundin‭  ·  last activity 4mo ago by Alexei‭

Question c atoi strtol
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
71%
+3 −0
Q&A noreturn function with non-void return type

Syntax-wise it is a function specifier and may in theory appear everywhere where inline (or rather the syntax item function-specifier:) can appear, since the standard doesn't say otherwise. Though ...

posted 3y ago by Lundin‭

Answer
71%
+3 −0
Q&A Why object-oriented instead of class-oriented?

As with anything computer science-related that dates back to the 1960s and 70s, things just happened at a whim. Everything was new and highly experimental back then. Nobody knew how to write or des...

posted 3y ago by Lundin‭

Answer
71%
+3 −0
Q&A Question regarding an error message in my compiler to do with my code on linked list.

To use the identifier Node without typing struct Node, you must use a typedef: typedef struct Node{ // this here is a stuct tag int data; struct Node* next; // this has to be struct Node...

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

Answer
71%
+3 −0
Meta Community feedback: What type of questions can I ask here?

I propose that we add the following: Off-topic Questions about code golf, programming puzzles and challenges. Please use Code Golf instead.

posted 3y ago by Lundin‭

Answer
71%
+3 −0
Q&A Are there practical reasons for designing a method-only class/object?

Many languages support the concept of functors or function objects which are classes only containing a method/member function. Most notably C++ STL was designed around this - whenever you declare ...

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

Answer
71%
+3 −0
Q&A Why does this code that uses a pointer-to-pointer-to-int segfault?

Bugs: int **range = 0; should be int *range; and then call the function like ft_ultimate_range(&range, min, max);. That's the whole reason the parameter is pointer-to-pointer, so that you c...

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

Answer
71%
+3 −0
Meta Code formatting of previews

I just noticed that I'm not getting code formatting in the preview window when I write an answer or make an edit. This is very useful to have. Not sure if it's a bug so I'm posting this as a featu...

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

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
71%
+3 −0
Code Reviews Counting number of assignments that a `fscanf` format strings implies

Consider using look-up tables to increase execution speed (at the cost of some 200 bytes .rodata use). For example this: static const char specifiers[] = "diouxaefgcspAEFGX"; could be replaced wit...

posted 4y ago by Lundin‭

Answer
71%
+3 −0
Meta Community feedback: What type of questions can I ask here?

On-topic questions dealing with how to write software documentation I propose that a note about tool use is added: On-topic questions dealing with how to write software documentation or how t...

posted 4y ago by Lundin‭

Answer