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 Lundin‭

Type On... Excerpt Status Date
Answer 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 initialization rules of C++ are quite complex, especially past C++11. The relevant part would be C++11...
(more)
over 3 years ago
Answer A: Is MISRA-C useful outside safety-critical and embedded programming?
It is true that MISRA-C has a heavy focus on embedded system, though it has become somewhat more generic over time. The MISRA guidelines have been changed and improved several times over the years (in 1998, 2004 and 2012 + numerous TC and addendum/amendments). They are now definitely general enough t...
(more)
over 3 years ago
Question Is MISRA-C useful outside safety-critical and embedded programming?
When discussing best or safest C programming practices with various C gurus on the Internet, the "MISRA-C guidelines for the use of C language in critical systems" often pops up as a source. This standard was invented by the automotive industry and is pretty much mandatory in all automotive firmw...
(more)
over 3 years ago
Answer A: Do we really need the [tools] tag?
No, it's not helpful, it's far too broad and doesn't make sense to use in combination with any other tag either. It can't be used for searching or categorizing questions either.
(more)
over 3 years ago
Answer A: Growing software.codidact
We can't go and shamelessly promote Codidact in SO comments etc just for the sake of it - that's regarded as spamming and might get you banned, plus it will give Codidact a nasty rep. Similarly, SE and many other sites frown upon using "signatures" in your posts. What you can do - and what I've be...
(more)
over 3 years ago
Answer A: Is omitting braces for single statements bad practice?
Not using braces is considered bad practice by widely recognized industry coding standards (MISRA-C:2012 rule, 15.6, CERT C EXP19-C and others). Once upon a time I liked to skip out braces too, but every C (or other language) programmer using that style will ultimately write missing brace/indentio...
(more)
over 3 years ago
Answer A: 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 with static const bool specifiers[UCHARMAX] = { ['d'] = true, ['i'] = true, ...
(more)
over 3 years ago
Question The size of the code format window is much too small.
When posting a lot of code on the site, the "code format window" is much too small: 1 I'm talking about this thing 2 3 4 5 6 7 8 9 10 11 12 13 14 15 The scroll bar appears after only 13 lines for me, so I can only view ...
(more)
over 3 years ago
Answer A: What is our policy on tags?
Luckily, we are in a position where we don't have to re-invent the wheel. We can see what went either wrong or horribly wrong at SO, then avoid making the same mistakes. Some common problems: - Making too generic or ambiguous tags that could mean a lot of different things. - Allowing crap tags th...
(more)
over 3 years ago
Answer A: Are reference requests welcome here?
If we ignore the part of recommendation questions leading to opinion-based answers, the main concern against these kind of questions is that they don't add anything of value to this site. But also one of the main design concerns of SO: they didn't want to end up as yet another low quality programm...
(more)
over 3 years ago
Answer A: Renaming sheets to the more specific google-sheets?
Google Sheets isn't a company name, it's a product name. A tag called google-sheets is perfectly fine. Google doesn't market this product as "Sheets", they market it as "Google Sheets". What is not OK is using the tags "google" and "sheets" together. That's one of the issues that the company name ...
(more)
over 3 years ago
Answer A: Community feedback: What type of questions can I ask here?
I propose that the following is added as off-topic: Off-topic - Questions with artificial requirements and no practical use, including code golf and code obfuscation. This also covers artificial homework requirements that "ban" the use of certain common language features when writing the progra...
(more)
over 3 years ago
Answer A: What's the difference between null pointers and NULL?
There are three different, related concepts that are easy to mix up: - null pointers - null pointer constants - the NULL macro Formal definitions The first two of these terms are formally defined in C17 6.3.2.3/3: > An integer constant expression with the value `0`, or such an expressio...
(more)
over 3 years ago
Question What's the difference between null pointers and NULL?
Someone told me that I shouldn't write "NULL pointer" with capital letters, because a null pointer and NULL are different terms. And that NULL is a "null pointer constant". What's the meaning of this? Does this have anything to do with some systems allowing a different representation of the null p...
(more)
over 3 years ago
Answer A: Community feedback: What type of questions can I ask here?
I propose that the following is added: > On-topic > > - questions asking for code review that follow [the site policies for the code review category]. Where [the site policies for code reviews] is a link to a separate help page: > When posting a code review, please post it under the specif...
(more)
over 3 years ago
Answer A: Community feedback: What type of questions can I ask here?
> On-topic > > - questions about SQL programming > > ... > > Off-topic > > - questions about database administration I propose that these two are changed to clarify that we allow questions about database design and questions regarding the use of specific DBMS (MySQL, Oracle etc): > ...
(more)
over 3 years ago
Answer A: 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 to use tools for that purpose The intention is to clarify that things like Doxygen...
(more)
over 3 years ago
Answer A: Community feedback: What type of questions can I ask here?
>On-topic > > - questions about best practices as long as enough detail is provided to answer using external references or expertise consensus I propose that this should be re-phrased: >On-topic > > - non-subjective questions about best practices with a well-defined "best" criteria, where t...
(more)
over 3 years ago
Question Community feedback: What type of questions can I ask here?
There is a new page What type of questions can I ask here? (found under Help -> Guidance.) I'll quote it as whole below, for convenience. Please give feedback on specific items in the list that you agree or don't agree with and post a proposed change, so that the community can vote agree/disagree ...
(more)
over 3 years ago
Answer A: Should we have a Code Review Section / category?
I agree and I think it should be a separate category, with separate posting rules. There are several examples of how the rules for each category would likely be fundamentally different: Main Q&A category 1. Encourages minimal examples to reproduce the problem, particularly when asking for debug h...
(more)
over 3 years ago
Answer A: Why can't we mix increment operators like i++ with other operators?
These examples have undefined behavior and unspecified behavior all at once! Operator precedence has nothing to do with the order of execution, see What is the difference between operator precedence and order of evaluation? From that post we can also learn that most of the above examples have unsp...
(more)
over 3 years ago
Question Why can't we mix increment operators like i++ with other operators?
I'm experimenting with different operators and have a hard time understanding the outcome of certain expressions. I try to combine the `++` operators with other operators such as assignment in the same expression. But I get mighty strange results when I use the same variable more than once. One examp...
(more)
over 3 years ago
Answer A: 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. - Questions about writing plug-ins for web browsers or accessing an API/library provided by web brows...
(more)
over 3 years ago
Answer A: Give actionable feedback when closing questions
We rather need to make a close reason for every kind of off-topic reason. In this specific case, the reason could for example be Purely subjective question rather than the old "primarily opinion-based". Because we hope to allow some form of best practice & design questions here and not be as stri...
(more)
over 3 years ago
Answer A: What is the difference between a hook and a code injection?
I believe the term "hook" comes from the Windows API where you can register "hooks" - callback functions - to respond to certain events, optionally replacing the original behavior. Not necessarily other processes, it could also be hardware events etc. If you wish to respond to events occurring ins...
(more)
over 3 years ago
Answer A: Do we want a wiki (or similar) alongside Q&A?
Please no. I had a bad experience of SO's failed and cancelled "Documentation" project. I raised the same concerns on the Electronics site here. I'll quote that post: > The worst that can happen is something similar to SO's failed "Documentation project" a couple of years ago, where users were to ...
(more)
over 3 years ago
Answer A: What is the difference between operator precedence and order of evaluation?
It is a common mistake is to mix up the concepts of operator precedence and order of evaluation. Beginner classes and books often address the former in detail, but forget to mention the latter at all. Operator precedence specifies the order in which an expression should be parsed. It is similar to...
(more)
over 3 years ago
Question What is the difference between operator precedence and order of evaluation?
When doing something simple such as this int a=1; int b=2; int c=3; printf("%d\n", a + b c); then I was told that operator precedence guarantees that the code is equivalent to `a + (b c)`, since `` has higher precedence than `+`. And so the result is guaranteed to be 7 a...
(more)
over 3 years ago
Answer A: Strategy to migrate meaningful content from Stack Overflow
Please note that migrate in this context means grabbing the exact post as-is from a SE site and importing it here. This is allowed, with attribution given, as per licensing model. Codidact staff can help out with this. Check out the Writing or Scientific Speculation communities for examples, importe...
(more)
over 3 years ago
Question Getting rid of "company tags" early on
So it appears that we've gotten our first "company tag", Apple. We know from SO that company name tags were always problematic since: - Questions are about products, not companies. - Given that the product tag is present, the company tag doesn't add any relevant information to the question. - Th...
(more)
over 3 years ago
Question Meaning of the tag software practices?
Some new tag "software practices" just popped up, no wiki. What's the purpose of this tag and how is it useful? What exactly in software development is not "software practices"? Seems quite superfluous and very broad. Is it supposed to mark questions that are subjective or asking for best prac...
(more)
over 3 years ago
Answer A: Generate SIGSEGV without undefined behaviour.
`SIGSEGV` is defined in the C header `signal.h`. To generate the signal, it should be sufficient to just do `raise(SIGSEGV);`. As far as I know, this is well-defined behavior.
(more)
over 3 years ago
Answer A: 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) fine in terms of parameters y and z? Where parameters could be execution speed, memory use, read...
(more)
over 3 years ago
Answer A: What gets allocated on the stack and the heap?
"Stack vs heap" is a common over-simplification and not really a meaningful one, since those two areas have quite different, specialized uses. And no, those are not the only memory regions used by your program. To understand where variables end up, we must understand how a computer works. Physical...
(more)
over 3 years ago
Question What gets allocated on the stack and the heap?
I was told by my professor/book that computer programs use two kinds of memory and that all variables get allocated either on the stack or on the heap. Is this true? How can I tell where a variable gets allocated? Does the compiler handle allocation differently depending on which programming language...
(more)
over 3 years ago
Answer A: What is undefined behavior and how does it work?
Undefined behavior (informally "UB") is a formal term in the C language, defined in C17 3.4.3 > undefined behavior > behavior, upon use of a nonportable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements Meaning that anything ca...
(more)
over 3 years ago
Question What is undefined behavior and how does it work?
I have created this sensational program: #include int func (void) { int local=5; return &local; } int main (void) { printf("%d\n", func()); } This prints `5` even though I'm returning a pointer to a local variable. It did not pro...
(more)
over 3 years ago
Answer A: What must a C compiler do when it finds an error?
The C standard does not speak of "errors" and "warnings", those are not formal terms. The compiler is only required to produce a diagnostic message, as specified in C11 5.1.1.3: > Diagnostics > A conforming implementation shall produce at least one diagnostic message (identified in an implemen...
(more)
almost 4 years ago
Question What must a C compiler do when it finds an error?
What exactly must a C compiler do when it finds a compile-time error? The most obvious kind of errors are language syntax errors, but the C standard also speaks of constraints, which are rules that a C program is not allowed to break. Doing so is a so-called constraint violation. Upon finding ...
(more)
almost 4 years ago
Answer A: What is a standard definition (or a CS theory based formal definition) for Escaping?
The term escape sequence apparently dates back to the telegraph and pre-computer technology, according to wikipedia: https://en.wikipedia.org/wiki/Escapesequence. So I doubt there's an universally relevant definition of the term. I would guess that the term, in the scope of computer science, origi...
(more)
almost 4 years ago
Answer A: Should I cast to (void) when I do not use the return value
Yes, it is generally good practice to always cast the return value of functions to `(void)` if not used. This is self-documenting code showing that you aren't using the return value on purpose and did not just forget it by accident. For reference, either using the return value or casting it to `v...
(more)
almost 4 years ago
Question Site scope - draft proposal
EDIT: This discussion thread is mostly obsolete now that a new draft has been posted on the site. Please take further discussion & proposals to this meta post instead: Community feedback: What type of questions can I ask here?. So it would seem that the scope of this site is yet to be defined....
(more)
almost 4 years ago
Answer A: Is it undefined behaviour to just make a pointer point outside boundaries of an array without dereferencing it?
Yes, the second line invokes undefined behavior. First of all, according to C17 6.5.2.1 regarding array subscripting, an expression `E1[E2]` is just "syntactic sugar" for `((E1)+(E2)))`. So what applies here is actually the binary + operator. More info regarding why `[]` is actually never used wit...
(more)
almost 4 years ago