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
77%
+5 −0
Q&A How do you implement polymorphism in C?

The topic of how to implement polymorphism in C tends to pop up now and then. Many programmers are used to OO design from higher level languages and supposedly OO is a "language-agnostic" way of pr...

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

77%
+5 −0
Meta Closing self-answered question due to not being clear enough

A question should be closed when it cannot be meaningfully answered by someone who knows the topic. Which might indeed mean that the one(s) casting the close vote(s) would need domain knowledge. T...

posted 5mo ago by Lundin‭  ·  edited 2mo ago by Lundin‭

Answer
77%
+5 −0
Q&A Can I access an array element from a pointer to an object contiguous with but outside the array?

The problem with undefined behavior due to array out of bounds happens whenever we use pointer arithmetic, which is only defined to work within the bounds of an array. Where plain variables, "scala...

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

Answer
77%
+5 −0
Q&A How can I manage multiple consecutive strings in a buffer (and add more later)?

When looking at this, we might pretty soon note that storing strings in the same buffer by using null terminators as separator is quite clunky. It blocks us from using handy functions like strtok, ...

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

Answer
77%
+5 −0
Q&A Are there technical reasons to pick one struct coding style over the other?

Arguments in favour of "struct tag style": Less namespace clutter. C has a peculiar name space system where all identifiers belong to one of: labels, tags, members, ordinary. Struct tag style...

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

Answer
77%
+5 −0
Q&A Are there technical reasons to pick one struct coding style over the other?

C offers two different styles when it comes to structs (and union/enum too). Either declare them using a struct tag only ("struct tag style"): struct my_type { ... }; struct my_type x; Or ...

1 answer  ·  posted 9mo ago by Lundin‭  ·  last activity 9mo ago by Lundin‭

Question c code-style struct
77%
+5 −0
Q&A Cast uninitialized variable to (void)

It depends. This boils down to whether or not the expression cast to void contains any side effects, such as accessing a volatile-qualified object or modifying any object. C17 6.3.2.2: If an ex...

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

Answer
77%
+5 −0
Meta Software recommendations category

At some extent, you can ask about (programming-related) software recommendations if you manage to narrow down the scope to something specific. A question like "which one of compiler x and compiler ...

posted 3y ago by Lundin‭

Answer
77%
+15 −3
Meta Questions easily answered by studying a beginner-level book

This scenario is not yet a problem for this site, but we will get there, since it's a huge problem for Stack Overflow: Someone just picks up a well-known programming language for the first time. T...

6 answers  ·  posted 3y ago by Lundin‭  ·  last activity 1y ago by Karl Knechtel‭

Question discussion on-topic
75%
+4 −0
Code Reviews stpecpy(): Design a better string copy function that truncates

Performance-wise, I'd benchmark this vs if(memchr(src,'\0',n)==src+n) memcpy(dst, src, n); because it isn't obvious at least to me if that's faster or slower than your custom function. Regarding...

posted 3y 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
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 2y ago by Lundin‭

Answer
75%
+4 −0
Q&A When does it not work to dereference the pointer for sizeof during malloc?

In addition to all the examples I gave in my answer to the linked post, all scenarios where p is a pointer to incomplete type fails. Not just the void* scenario, but also when p is a pointer to an ...

posted 3y ago by Lundin‭

Answer
75%
+4 −0
Q&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/Escape_sequence. So I doubt there's an universally...

posted 4y ago by Lundin‭

Answer
75%
+4 −0
Meta A cleanup of "What type of questions can I ask here?"

What type of questions can I ask here? has gotten rather cluttered since we have added/removed a lot of things along the way. In particular, I think it is hard to get an idea of what's on-topic by ...

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

Question discussion scope
75%
+4 −0
Meta Should we allow UI/UX questions in our community?

I think it should be on-topic with the following distinction: On-topic Technical questions regarding to UI, including mark-up language syntax, how to set properties in RAD tools, how to use gra...

posted 3y ago by Lundin‭

Answer
75%
+4 −0
Q&A What might happen if I ignore warning?

Warnings most often mean "here is a bug which will likely cause your program to crash or misbehave". They do not mean "here's something that you can optionally fix when you can spare the time". See...

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

Answer
75%
+4 −0
Meta Sorting answers by score appears to be broken

https://software.codidact.com/posts/277536/278390?sort=score At the point when I'm posting, the answer by Lundin has +14 score and the answer by dmckee‭ has +11 score. Neither has any down votes. ...

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

Question bug status-bydesign
75%
+4 −0
Meta Can we migrate office suite related questions to the Power Users community?

I went ahead and made a proposal on Power User that a separate category for office suites should be made. I suggest that we wait and see where that proposal lands. If a category for these question...

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

Answer
75%
+4 −0
Q&A Multiple catches with almost the same code.

There are many things we label as bad when programming, for various reasons. Repeating code is slightly bad. But writing function like-macros is extremely bad. You should not try to replace someth...

posted 3y ago by Lundin‭

Answer
75%
+4 −0
Meta 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 li...

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

Answer
75%
+4 −0
Meta 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 an...

posted 4y ago by Lundin‭

Answer
75%
+4 −0
Meta 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 ...

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

75%
+4 −0
Q&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 ...

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

Answer