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‭

158 posts
71%
+3 −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 7d ago by Lundin‭

Answer
71%
+3 −0
Q&A Understanding "logical OR" and "logical AND" in programming languages

They aren't actually that different from natural language. But more verbose. Given some generic pseudo code looking like one of the C family languages: if( !egg.boiled || !egg.peeled ) { do_no...

posted 7d ago by Lundin‭

Answer
71%
+3 −0
Q&A How do you implement polymorphism in C?

First of all please note that polymorphism in C is clunky. It won't be pretty. We don't have this pointers, we don't have RAII, we don't have automatic constructors/destructors. Just accept that it...

posted 1mo ago by Lundin‭

Answer
71%
+3 −0
Q&A Which platforms return a non-null pointer on malloc(0)

It is trivial enough to test: #include <stdlib.h> #include <stdio.h> #include <errno.h> #define KNOWN_GARBAGE ((int*)~0u) int main (void) { int* ptr = KNOWN_GARBAGE; ...

posted 2mo ago by Lundin‭  ·  edited 2mo ago by Andreas witnessed the end of the world today‭

Answer
71%
+3 −0
Code Reviews New elementsof() operator

I don't really see what good elementsof would do since sizeof(arr)/sizeof(*arr) is pretty idiomatic C and problem-free given that you know what you are doing, as is the case with most C code. IMO ...

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

Answer
71%
+3 −0
Q&A Testing an opaque type's internals

"Black box testing" makes sense when dealing with opaque types so that's the first thing you should be doing and probably the most meaningful test too, so that's where you should put most of yo...

posted 6mo ago by Lundin‭

Answer
70%
+5 −1
Q&A Why is global evil?

The basics of good vs bad program design All programs are divided in classes. (Or modules/abstract data types/interfaces etc - a rose by any other name.) Each class should only be concerned with i...

posted 8mo ago by Lundin‭  ·  edited 8mo ago by Michael‭

Answer
70%
+5 −1
Q&A Terms for types of functions with respect to side effects

I don't think there are any formal names for the various versions you list. First of all, please note that output in a programming context most often refers to printing something on a screen or to...

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

Answer
66%
+4 −1
Meta 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 superfl...

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

Question discussion tags
66%
+2 −0
Q&A How does the strict aliasing rule enable or prevent compiler optimizations?

Pointer conversions and aliasing First of all, C historically allows all manner of crazy pointer conversions (whereas C++ is more restrictive) between compatible and non-compatible pointed-at type...

posted 5d ago by Lundin‭

Answer
66%
+2 −0
Q&A Storing more bytes than a union member has, but less than the union size, with memcpy(3)

memcpy(&y.t, &x, sizeof(x)); is a bit fishy since it would have made more sense to copy into &y or &y.s. None of this is necessarily UB however. Regarding strict aliasing, it doesn...

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

Answer
66%
+2 −0
Q&A Can freed pointers undergo lvalue conversion?

p is assigned a value and then it becomes indeterminate when the pointed at object has reached the end of its lifetime (C17 6.2.4). Pointers may have trap representations (C17 6.2.6.1/5) and in ca...

posted 1y ago by Lundin‭

Answer
66%
+2 −0
Meta How to best ask about algorithmic problems

This question was of very poor quality and should have been closed. I closed it but someone disagreed, for reasons unknown. I'm not sure if it's an actual algorithm question or just a request for f...

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

Answer
66%
+2 −0
Q&A What does the greater than 0 indicate in the case of this statement 'if (compare(A[j], A[j+1]) > 0)' ? Thank you.

Generally speaking, comparison callback functions in C are often implemented to return an integer lesser than zero, equal to zero or greater than zero - depending on if the first object is lesser t...

posted 3y ago by Lundin‭

Answer
66%
+4 −1
Q&A 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 th...

3 answers  ·  posted 4y ago by Lundin‭  ·  last activity 4y ago by EJP‭

66%
+2 −0
Meta 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-ba...

posted 4y ago by Lundin‭

Answer
63%
+5 −2
Q&A Which functions in the C standard library must always be avoided?

Standard library functions that should never be used: setjmp.h setjmp() Together with longjmp(), these functions are widely recogniced as incredibly dangerous to use: they lead to spaghetti ...

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

Answer
63%
+5 −2
Meta 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 hom...

posted 4y ago by Lundin‭

Answer
63%
+5 −2
Meta 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 ...

posted 4y ago by Lundin‭

Answer
63%
+12 −6
Q&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 a...

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

Answer
62%
+3 −1
Meta 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.

posted 4y ago by Lundin‭

Answer
62%
+3 −1
Meta 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 c...

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

Answer
62%
+8 −4
Meta Site scope - draft proposal [duplicate]

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 ...

6 answers  ·  posted 4y ago by Lundin‭  ·  closed as duplicate 4y ago by Lundin‭

60%
+7 −4
Q&A Are there references in C?

Yes there are references and pass-by-reference in C, though the language has no explicit syntax item called "reference" like C++. In a C context, it is irrelevant that C++ happens to have something...

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

Answer
60%
+1 −0
Meta How are software recommendations handled?

See Software recommendations category. Referring to my own answer there, I think these questions should only be on-topic in case the OP manages to narrow down the scope sufficiently. In case the qu...

posted 1y ago by Lundin‭

Answer