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
Comment Post #278172 @msh210 Fine, I can remove the C++ part since I don't really want to promote that language anyhow. Any remaining problems after edits?
(more)
over 3 years ago
Comment Post #278172 As for compilers, the very point here is that the code has unspecified behavior and may behave differently between any number of compilers, or even when executed several times on the same one. But fair enough I can remove that part.
(more)
over 3 years ago
Comment Post #278172 @‭msh210‭ The C and C++ tags are there because this is a self-answered Q&A post which is meant to be used as a canonical dupe link for C _and_ C++ questions. The languages are identical here. We should not close future C questions with a link to C++ or vice versa. Believe me, I know all about the "C/...
(more)
over 3 years ago
Comment Post #278172 No love for self-answered Q&A I guess. So much for getting this site going... If there is any factual errors in the post, I would very much like to know about them so I can improve it.
(more)
over 3 years ago
Comment Post #278172 ...and the reason for down votes is...?
(more)
over 3 years ago
Comment Post #278151 Might want to post/migrate this to https://meta.codidact.com/ since it is likely a network-wide issue.
(more)
over 3 years ago
Comment Post #278063 Also, since we don't have much in the way of rules for tag wiki , it's important that people realize that tag usage guidelines is the single-most important thing to get right. Explaining what a tag and the technology does is really just fluff that people are better off reading at Wikipedia. Take for ...
(more)
over 3 years ago
Comment Post #277537 @EJP Regarding static variables, I'm not sure why there's some recurring myth about them not getting optimized... just check https://godbolt.org/z/ezoj7q. Not only did the compiler ignore to allocate separate memory for the two static storage variables `a` and `b`, it pre-calculated the result to 3 a...
(more)
over 3 years ago
Comment Post #277537 @EJP How is "a compiler tries..." untrue? This post isn't meant to be an exhaustive list of every detail that happens during compilation, but a brief overall summary. If a variable has the address taken, then indeed the compiler can't store it in a register.
(more)
over 3 years ago
Comment Post #277962 @JohnDoea You could propose starting up such a community on Codidact, if you think we can gather enough of a user base to support it. https://meta.codidact.com/categories/10.
(more)
over 3 years ago
Comment Post #277235 One month later and there's neither a clear consensus nor any constructive discussion. I'm guessing we'll have to stick to a "random programming stuff" site for now. Which is very unappealing to domain experts and power users. Is the aim here to build a much worse and shallow version of SO or somethi...
(more)
over 3 years ago
Comment Post #277263 So far +5 and none against, so I suppose we should implement this unless someone can make a strong argument against it. I think we need to draft up guidelines for how to post these though. Other questions that fit in with this category might be obfuscation and tasks with artificial requirements ("wri...
(more)
over 3 years ago
Comment Post #277983 I agree. Writing some self-answered Q&A on topics you know well seems to be a good way to get a site up and running. Shows that there is good content and active users, whereas imported posts don't really say anything about the state of the site at all.
(more)
over 3 years ago
Comment Post #277962 I think https://serverfault.com/ is the closest match, though I haven't used the site so I can't tell if/how welcome the question would be there. Maybe ask on their meta first with a link to this post?
(more)
over 3 years ago
Comment Post #277962 This isn't a question about software development, but about networking and routing tables etc. So I believe it is off-topic here.
(more)
over 3 years ago
Comment Post #277911 @BobJarvis Oracle-DBMS, Oracle-database or similar. What we especially wish to avoid is someone using 2 tags "Oracle" and "RDBMS" when referring to a specific product by that company. Then next up we get "Oracle" + "JavaVM" etc.
(more)
over 3 years ago
Comment Post #277896 In case you haven't read this old SO meme: [parsing HTML with regex](https://stackoverflow.com/a/1732454/584518) :)
(more)
over 3 years ago
Comment Post #277906 As for the cast to void question, it isn't even subjective. There's industry consensus that doing so when a return value isn't used is mandatory, save for a number of old standard library functions that aren't used in that way out of tradition.
(more)
over 3 years ago
Comment Post #277906 If it is on-topic, then there is no reason to create a tag for this - it becomes a meta tag. It is in my opinion better to spend the effort into drafting help pages for how to ask these kind of questions.
(more)
over 3 years ago
Comment Post #277891 @pnuts I have no idea how it works here really. On SE you had to go through all manner of painful rituals and post reviews. But since this site is brand new, we should be able to be more flexible.
(more)
over 3 years ago
Comment Post #277891 @Monica Cellio Okay. Then we should probably remove both tags, without or without space. It is too vague to fill a purpose.
(more)
over 3 years ago
Comment Post #277891 @pnuts I'm asking because this tag was apparently created by site admins and not some clueless beginner.
(more)
over 3 years ago
Comment Post #277551 I'm thinking the root of the problem might be the programmer who writes 140 symbols long LoC and not the site?
(more)
over 3 years ago
Comment Post #277265 @Estela It turns cumbersome to cast everything to `void` when using various common, poorly-designed standard library functions such as `printf`, `strcpy` etc. You do not commonly use the result of those (since it's useless most of the time).
(more)
over 3 years ago
Comment Post #277551 Maybe I don't understand the problem, but code shouldn't get automatically line-wrapped, since doing so might affect the behavior of it in a lot of languages.
(more)
over 3 years ago
Comment Post #277537 @obround I'd be surprised if a compiler didn't store small size arrays inside registers, given that the array address is never taken. Easy enough to prove, here is an array stored in registers: https://godbolt.org/z/Yb134Y
(more)
over 3 years ago
Comment Post #277478 Product recommendation questions ought to be off-topic. Design recommendations asking "what's the best way" need to specify the "best" criteria. Execution speed, RAM use, safety, dev time, portability etc etc.
(more)
over 3 years ago
Comment Post #277423 "Never. The returned value is always meaningful and has always to be treated." That kind of depends on how the function is written, yeah? Take `strcpy` as one example of a function with an often useless return value.
(more)
over 3 years ago
Comment Post #277423 `warn_unused_result` is pretty useless, since it doesn't work unless you pollute your code with non-standard `__attribute__` crap. There is no reason why they can't check for it in standard C.
(more)
over 3 years ago
Comment Post #277429 This is one of the things I'm hoping there will be a place for on this site or another Codidact one. Program design is complex and every programmer needs it.
(more)
over 3 years ago
Comment Post #277331 Not really. The order of evaluation of + and - is unspecified, so you can't reliably tell if that example evaluates as `(arr - 1) + choice` or `arr - (1 + choice)`. At least the former sub-expression is undefined behavior. In practice the compiler will likely replace it all with hard-coded addresses,...
(more)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 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)
almost 4 years ago
Comment Post #277235 @James Yes indeed.
(more)
almost 4 years ago
Comment Post #277235 @James Yes, mainly all PC helpdesk kind of questions.
(more)
almost 4 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)
almost 4 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)
almost 4 years ago