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
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...
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...
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 ...
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: ...
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...
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...
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...
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)...
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...
Software design in itself has always been on-topic, as per https://software.codidact.com/help/on-topic. As for system design for a given purpose, I think it is fine within reason. Contrary to popu...
General/program design: I would have expected a public header file with the API for the whole thing, rather than having some main() test case calling static functions from the same file. Sure,...
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...
It's an unfortunate analogy. Apart from being confusing, it does indeed assume some basic electronics knowledge. In electronics a short circuit (or the common jargon "a short") does not necessarily...
Categories should be used when the posting rules for certain types of question differ. For example a debugging question posted below Q&A should have a minimal, relevant example. Whereas a code ...
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...
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...
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 ...
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...
Assuming that there are no alignment problems between the two pointer types (impl-defined), the code is otherwise well-defined. As per the quoted 6.3.2.3 C allows pretty much any form of wild and c...
Yes it is fine and probably encouraged even. I have written several self-answered Q&A here and they were mostly well-received. They aren't all that easy to write though, especially getting the ...
I don't think GNU can be used as a stand-alone tag. Apart from the OS, GNU is also a tool collection of various programs, many used for programming, making is a very ambiguous tag which can't stan...
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 ...
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...
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...
I propose that we add the following: Off-topic Questions about code golf, programming puzzles and challenges. Please use Code Golf instead.