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
Edit Post #277341 Initial revision 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)
over 3 years ago
Edit Post #277340 Initial revision over 3 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)
over 3 years ago
Comment Post #277331 @klutt I think the remark is regarding this: https://stackoverflow.com/questions/52186834/pointer-from-integer-integer-from-pointer-without-a-cast-issues
(more)
over 3 years ago
Comment Post #277331 If the C standard doesn't convince you, then think of common real-world scenarios: many architectures have memory protection traps from reading data from executable memory or executing code from data memory. Suppose your array is located at the very border of data memory on a certain machine and by ...
(more)
over 3 years ago
Comment Post #277331 You can't demonstrate that something isn't undefined behavior by running the code, all you prove with that is that you got lucky. You can however in some cases demonstrate that something _is_ UB by disassembling the code and watch where it went wrong.
(more)
over 3 years ago
Edit Post #277217 Post edited:
over 3 years ago
Comment Post #277215 Actually, `char *ptr = arr[-1];` is not valid, there needs to be an `&` or it's a constraint violation of simple assignment. I didn't think of it when I originally answered the question.
(more)
over 3 years ago
Edit Post #277312 Initial revision over 3 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)
over 3 years ago
Comment Post #277235 @msh210 Not at all. For example for a Code Golf site, it would make perfect sense for the question not to make any attempt to solve it. It is open for discussion whether Code Golf is on topic or not, separate discussion here: https://software.codidact.com/questions/277263
(more)
over 3 years ago
Comment Post #277263 @Monica From SE we can get a very good idea which categories that are likely to turn out to be high traffic ones and become independent sites in the future. Code review, databases etc.
(more)
over 3 years ago
Comment Post #277266 In this particular case, a cast to void means "I am purposely ignoring the return value", but silently ignoring the return value could mean anything. Including "I forgot to check the return value" or "trust me, I don't know what I'm doing". gcc/clang etc don't even give diagnostics when you ignore th...
(more)
over 3 years ago
Comment Post #277263 My reasoning is that the mentioned category suggestions all have their own sites in the SE network, so they might eventually end up like that here as well.
(more)
over 3 years ago
Edit Post #277265 Initial revision over 3 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)
over 3 years ago
Comment Post #277263 I agree, I think it would be best to branch off all things that aren't practical programming questions into categories of their own, if we are to allow them. Maybe we could have a broader discussion about which categories that make sense to have overall? Some suggestions: Code golf, Code review, ...
(more)
over 3 years ago
Comment Post #277249 @Moshi The proposed site https://meta.codidact.com/questions/74991 is about hobbyist single board computers, which unlike microcontroller programming is borderline off-topic on the electronics site. There's a big difference between rolling out your own microcontroller solution or buy a hobbyist kit. ...
(more)
over 3 years ago
Comment Post #277235 @Monica Please propose that in an answer so that the community can vote for/against. I'll edit the question when there seems to be a community consensus for/against something. Though I have no idea how many active users there are and how many votes that should be regarded as "consensus".
(more)
over 3 years ago
Comment Post #277249 "Over on Writing, we have a category for Challenges. I don't see why we can't have a similar Code Golf/Programming Challenges category here as well." That's a good idea. We could put code golf as well as code review in special categories.
(more)
over 3 years ago
Comment Post #277249 It always felt out of place and it always ended up with questions where the problem could be either software and hardware. This is quite normal in electronics. The problem was that in case you found out that the problem was hardware-related, the question suddenly turned off-topic and had to be closed...
(more)
over 3 years ago
Comment Post #277249 "I believe Electrical is purely for hardware questions (someone correct me if I'm wrong)". Yes this is wrong. It has pretty much the same scope as electronics at SE always had. Microcontroller programming etc was always perfectly on-topic. This proposal is based on me being one of the all time top us...
(more)
over 3 years ago
Comment Post #277249 "I don't really see the point of listing specific things as "on topic." " The point would be that people know the purpose of the site in the form of a brief summary.
(more)
over 3 years ago
Comment Post #277235 @James Yes indeed.
(more)
over 3 years ago
Comment Post #277235 @James Yes, mainly all PC helpdesk kind of questions.
(more)
over 3 years ago
Comment Post #277243 The reason I put it there is because it was always off-topic on SO. Other than that, I have no opinion for or against keeping it.
(more)
over 3 years ago
Edit Post #277235 Post edited:
over 3 years ago
Comment Post #277235 I would personally like if we could keep this site (or another in the network) tolerant to subjective but on-topic questions about things like program design, coding style and best practices. These are things that every programmer face, so there should be a place to ask for advice about them, instead...
(more)
over 3 years ago
Edit Post #277235 Initial revision over 3 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)
over 3 years ago
Edit Post #277217 Post edited:
over 3 years ago
Edit Post #277217 Post edited:
over 3 years ago
Edit Post #277217 Post edited:
over 3 years ago
Edit Post #277217 Initial revision over 3 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)
over 3 years ago
Comment Post #277152 Yeah I read it, it's apparently everything vaguely programming related... I very much doubt there will much in the way of quality posts with such a huge scope. And no attention is given to the usual hot potatoes: homework questions, career advise, tool recommendations etc. Are these on-topic or not? ...
(more)
over 3 years ago
Comment Post #277199 I think it would probably be best that once there's enough participation below a certain tag, try to get a group of veteran users together and decide what would be worth importing?
(more)
over 3 years ago
Comment Post #277152 If we make a "super site" because we fear low contribution on specialized sites, it might very well have the opposite effect: scaring away technical specialists, whom are absolutely necessary for a programming site to flourish.
(more)
over 3 years ago
Comment Post #277152 But shouldn't at least some things get narrowed down _before_ launching the site? As it sits now, the scope seems incredibly broad and nobody has a clue what's on-topic - everything vaguely programming-related? I'm not sure what this site is for or how to use it. Nor am I particularly interested in c...
(more)
over 3 years ago
Comment Post #277184 The issue here is that some purists only consider compiled/interpreted languages to be "programming languages" - they are used to write programs. Whereas SQL for example is only used for the purpose fetch data from a database, HTML is only for describing the layout of a website and so on. A "script" ...
(more)
over 3 years ago