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‭

161 posts
92%
+21 −0
Q&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 c...

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

Answer
91%
+20 −0
Meta 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 pr...

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

Question discussion tags
90%
+18 −0
Q&A Are "strong passwords" at all meaningful?

Whenever registering to diverse sites on the net, you are often forced to enter a so called "strong password", which would ideally contain both upper case letters, lower case letters, digits, and s...

4 answers  ·  posted 12mo ago by Lundin‭  ·  last activity 5mo ago by Michael‭

90%
+18 −0
Q&A 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 tha...

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

90%
+18 −0
Q&A What is C23 and why should I care?

The C language has gone through many iterations and the latest one not yet released is informally called "C23", supposedly because they hoped to release it in 2023. The latest draft version N3096 i...

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

Question c c23
90%
+18 −0
Meta How can we grow this community?

By having decent source code formatting that isn't completely inferior to other sites like Stack Overflow. We might want to post/view snippets longer than 13 lines without suffering some scroll whe...

posted 2y ago by Lundin‭

Answer
90%
+16 −0
Q&A How to do private encapsulation in C?

The concept you are looking for is referred to as opaque type or opaque pointers. This is the proper method to achieve private encapsulation in C and can also be used for inheritance/polymorphism (...

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

Answer
89%
+15 −0
Meta 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...

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

Answer
89%
+15 −0
Q&A Is strcpy dangerous and what should be used instead?

I heard rumours that the strcpy function is dangerous and shouldn't be used. Supposedly it can be exploited to create buffer overflows somehow. And indeed when I compile my C code in the admittedl...

2 answers  ·  posted 3y ago by Lundin‭  ·  last activity 9mo ago by Lundin‭

89%
+15 −0
Q&A What is C23 and why should I care?

C23 will be a major revision, certainly the biggest one since C99. It contains lots of changes and new features, both big and small. The linked draft in the question contains a complete list of cha...

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

Answer
89%
+15 −0
Q&A What does the static keyword do in C?

What exactly does the static keyword do in C? I have seen it used in several diverse contexts: 1) As a variable outside a function: #include <stdio.h> static int x = 5; int main (void) ...

2 answers  ·  posted 3y ago by Lundin‭  ·  last activity 7mo ago by aghast‭

88%
+14 −0
Meta Should we allow answers generated by ChatGPT?

After some more experience from this bot over a couple of months, I would say that we should ban it simply because: The answers it gives are often wrong. ChatGPT has been hyped up ridiculously. I...

posted 2y ago by Lundin‭

Answer
88%
+14 −0
Q&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 ...

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

Answer
88%
+13 −0
Q&A What does the static keyword do in C?

Storage class specifiers static is strictly speaking a storage class specifier, which is an attribute given to a variable or a function stating how it is allocated, how it is accessible and how lo...

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

Answer
88%
+13 −0
Meta How can we grow this community?

Search engine optimization? I thought this goes without saying, but apparently we aren't doing too well there for some reason. The other day I was having a discussion with someone at SO regarding...

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

Answer
88%
+13 −0
Q&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 ...

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

Answer
88%
+13 −0
Q&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, bu...

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

Answer
88%
+13 −0
Q&A What compiler options are recommended for beginners learning C?

My recommended beginner setup for gcc-like compilers is: -std=c11 -pedantic-errors -Wall -Wextra -Werror Here is an explanation of what these options do: -std=c11. gcc & friends are by d...

posted 3y ago by Lundin‭

Answer
87%
+12 −0
Q&A What compiler options are recommended for beginners learning C?

When reading questions about C programming from beginners, I very often see them describing peculiar run-time errors and crashes, segmentation faults and similar. They have spent a lot of time chas...

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

86%
+11 −0
Q&A Behavior of Pointer Arithmetic on the Stack

Generally speaking, pointer arithmetic is undefined behavior unless carried out on arrays. This is how the additive operators behave, C17 6.5.6: For the purposes of these operators, a pointer to...

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

Answer
86%
+11 −0
Q&A Should I check if pointer parameters are null pointers?

When writing any form of custom function such as this: void func (int* a, int* b) Should I add code to check if a and b are null pointers or not? if(a == NULL) /* error handling */ When po...

4 answers  ·  posted 2y ago by Lundin‭  ·  last activity 2y ago by Dirk Herrmann‭

86%
+11 −0
Q&A How to do private encapsulation in C?

I'm using an object-oriented design for my C project and trying to implement classes with private encapsulation. How do I do this? Some things I've tried that are problematic: Using a struct f...

1 answer  ·  posted 3y ago by Lundin‭  ·  last activity 2y ago by Lundin‭

86%
+11 −0
Meta Should posting on Meta affect reputation?

Codidact has already managed somewhat to separate domain knowledge from moderator suitability. So far so good, but reputation is also a measurement of activity. It might make sense that being acti...

posted 1y ago by Lundin‭

Answer
86%
+11 −0
Q&A What is CPU endianness?

This goes back to the various CPU architecture "wars" in the 1970s-1980s between the competitors Intel and Motorola (for example Intel 8086 vs Motorola 68000). For various reasons, CPUs from these ...

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

Answer
86%
+11 −0
Q&A What is undefined behavior and how does it work?

I have created this sensational program: #include <stdio.h> int* func (void) { int local=5; return &local; } int main (void) { printf("%d\n", *func()); } This prints 5 even thoug...

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