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 #289709 @#65944 Unless you can provide some evidence of that, it kind of sounds like yet another wild conspiracy theory... Unless you think $$$ is an ideology; Google and SE probably have that much in common.
(more)
7 months ago
Comment Post #289828 @#61308 Sorry but that is uninformed. Look, I work with electronics design - I have been involved in many battery pack and charger designs, including writing firmware for one in place of a BMS. I have seen malfunctioning NiMH and Li/Ion batteries burn up several times, due to malfunctioning, polarity...
(more)
8 months ago
Comment Post #289828 @#61308 Here I'm trying to picture what a layman _would imagine_ a short circuit to be. For example how I used the term myself, before I started working in the electronics industry. Think of some robot in sci/fi fiction having a malfunction, the others characters will often say something like "he has...
(more)
8 months ago
Comment Post #289831 @#53410 Except actual short circuits aren't often conditional. It's a poor analogy for that reason as well.
(more)
8 months ago
Comment Post #289837 I'm not sure if the last AND gate analogy is relevant. These work with 2 or more inputs that are evaluated simultaneously at the edge of a clock pulse, whereas software has to evaluate each operand one at a time. And there is hopefully no such thing as a short circuit anywhere in sight when dealing w...
(more)
8 months ago
Comment Post #289692 You could expand this further than the machine word by simply using an array of boolean, which is "language agnostic" and might even boil down to an actual a bit-field if you are lucky. Also, pretty much all languages support bool but not all languages support bitwise arithmetic.
(more)
8 months ago
Comment Post #285870 @#61018 This isn't the actual rules but a draft when something was changed at one point. (Nothing gets changed without the community having a say first.) The most recent version is found by clicking help -> What type of questions can I ask here? https://software.codidact.com/help/on-topic
(more)
9 months ago
Comment Post #289488 "I heard it through the grapevine"? :) This was just recently discussed at SO, I may be to blame for starting that discussion https://stackoverflow.com/a/76945224/584518.
(more)
9 months ago
Comment Post #289415 @#64628 That sounds like a different question you could ask separately. I'd rather not derail this post with yet another "spaghetti programming" debate - basically programmers have been debating this endlessly since the 1960s.
(more)
9 months ago
Comment Post #289429 Ok so this one "provide some sort of meaningful info" was where we have different opinions over at EE. Taking a look at the front page of Software Development now, tags that would fall for this rule would be `package`, `format`, `output`, `focus`, `text` - these arguably adds _no_ meaningful info and...
(more)
9 months ago
Comment Post #289429 I'm so used at SO that I didn't even consider that Codidact allows case-sensitive tags until very recently. After getting used to the idea, it sounds like it could be a very useful thing to a programming community in particular - few communities care about upper/lower case but we ought to. As a rando...
(more)
9 months ago
Comment Post #289415 @#64047 Basically any embedded compiler. Codewarrior in particular is known to whine about return values, but if you use a MISRA checker you'll get that as well - some compilers like IAR have MISRA checkers integrated as an option.
(more)
9 months ago
Comment Post #289327 @#53398 In this context, a function can return a value and that is the expected outcome. Other things changing the program or environment are side effects. An interrupt is never re-entrant because it always has side effects. It may be "thread safe" or interrupt safe might be a better name in that sit...
(more)
9 months ago
Comment Post #288916 The only reason why it isn't used when it should is because the programmer is inexperienced, and that's about it. There's no disadvantages but many advantages. Private encapsulation, less namespace clutter, easier for the compiler to inline and so on.
(more)
11 months ago
Comment Post #283890 @#52991 Ah yeah. These were copied fragment from a complete string library. That's some function returning a `char*` or `const char*` similar to C++ `std::string::cstr`. Unfortunately this lib is proprietary so I'm already in questionable territory sharing bits and pieces of it.
(more)
11 months ago
Comment Post #282489 @#52991 I did write one after this. [How to do private encapsulation in C?](https://software.codidact.com/posts/283888) It covers the basics at least.
(more)
11 months ago
Comment Post #287301 @#52991 Yes indeed, it would be very valuable as a source to for example programming teachers, who have usually have intermediate knowledge but not to the point where they can question if a certain book is valid or not. As you can tell from the whole story in this post, I did try to get this working ...
(more)
11 months ago
Comment Post #285813 @#52991 A C++ reference does not pass the object to the function either. Array decay only makes arrays equivalent to pointers in the first dimension, `int arr[n]` decays to `int*`. But that is not true for `int arr[x][y]` which decays to `int (*arr)[y]`, which is pretty much 100% equivalent to a C++ ...
(more)
11 months ago
Comment Post #288845 Ok seems that you might be able to answer your own question then :) Which is fine - it is encouraged to post answers to your own questions if you found it yourself.
(more)
11 months ago
Comment Post #288845 Have you checked with the various companies that specialize in CAN tools and software? IXXAT, Kvaser, Vector etc. If not then what's the requirements, does it have to be open source? Any particular language(s)?
(more)
11 months ago
Comment Post #288768 @#53890 That would just be weird. I don't really see any application for it, on meta or elsewhere.
(more)
11 months ago
Comment Post #288576 Maybe we could draw the line of what's considered programming at VBA? VBA essentially being an integrated programming language. Sure you can do lots of programming-like things with excel formulas, but it is as clunky as can be...
(more)
11 months ago
Comment Post #288304 @#61308 Regarding "debug" tag, I don't think that won't work... teaching new users how to use tags correctly always was mission impossible. A debug category might work though, given that regular/trusted users can move posts between categories somewhat effortlessly, without having to call for a modera...
(more)
11 months ago
Comment Post #288304 @#61308 When closing something as duplicate and it isn't obvious how the link solves the problem, at least I think it's appropriate to explain why in comments. Although this is much easier to do when you have a "dupe hammer" and can close posts unanimously. In case there are multiple problems, you ca...
(more)
11 months ago
Comment Post #288330 In fact repeated, seemingly localized trouble-shooting posts can act as an "aha experience" to locate FAQs beyond the most obvious and common ones. Something that you don't realize is a FAQ before you read _a lot_ of posts over time and start to recall "hey didn't I answer this some year back". And t...
(more)
11 months ago
Comment Post #288321 Adding a separate category was discussed before here: [Software recommendations category](https://software.codidact.com/posts/285969/285971). Nobody came up with much in the way of arguments in favour for creating a new category.
(more)
11 months ago
Comment Post #288330 Great answers both answer the localized problem and put it in a wider context. For example by mentioning good and bad practices - how the problem was caused by not following these. Or by dissecting some cryptic compiler message that the OP didn't understand and explain why this particular message app...
(more)
11 months ago
Comment Post #288304 The problem that you aren't seeing is duplicates. If some 90% of the site content are questions that have been asked before, they drown out everything else. To the point where the person who isn't asking a FAQ gets reduced chances of getting an answer, because everyone is busy dealing with the flood ...
(more)
11 months ago
Comment Post #288282 Codidact isn't like SO where you automatically unlock privileges when reaching a certain reputation threshold. Rather, domain knowledge and moderator suitability should be kept separate. I'm not sure of the exact mechanics, though check out https://meta.codidact.com/posts/278536 and the help files: h...
(more)
11 months ago
Comment Post #288254 @#61030 Ah yeah the example I made is plain wrong. I'll remove it.
(more)
12 months ago
Comment Post #288198 If you'd like to copy/paste this as an answer to [Should we have a network-wide policy against AI-generated answers?](https://meta.codidact.com/posts/287896) then I think it answers that question too.
(more)
12 months ago
Comment Post #285051 @#53937 Something evil like this should be possible: `static const size_t zero = 0;`... `void func (int x[zero])`. Or maybe even `void func (int x[ (int){0} ])`. I have no idea why the mainstream compilers allow that, but it seems like they do.
(more)
12 months ago
Comment Post #285051 @#53937 static in the array parameter context refers to what the parameter points at, so it actually does make sense since we can't have zero-sized arrays in C. `int end[0]` is equally invalid, that's a gcc extension. And the only reason why gcc ever supported zero-sized arrays is historical - they u...
(more)
12 months ago
Comment Post #288023 Re-inventing the C language by replacing it with your private macro language is a cardinal sin. Yes, a whole lot of standard lib functions have horrible APIs, but other C programmers supposedly know about those quirks. They don't know how your secret macro language works however, and will be really p...
(more)
about 1 year ago
Comment Post #288020 @#53937 As for C23 (the latest draft is N3088) the accepted proposal/DR is just the usual incoherence from the Committee about indeterminate values. There's no making sense of it all without any proper explanation. Does trap representations exist in the C language or not? In which situations do inter...
(more)
about 1 year ago
Comment Post #288020 @#53937 The compiler isn't allowed to insert side effects in a program which isn't there in the source. `free()` has no side effects related to the passed pointer variable, only related to what it points at. It's kind of a C design flaw that `free()` doesn't take a pointer to pointer as parameter. Th...
(more)
about 1 year ago
Comment Post #287917 @#53937 Only in case pointers have trap representations. Although... in case someone is curious, because of this very example, I managed to kill the clang 15 compiler's conformance in horrible ways. [clang 15 miscompiles code accessing indeterminate values](https://stackoverflow.com/questions/7553369...
(more)
about 1 year ago
Comment Post #287917 Btw how `memcmp` is implemented internally isn't relevant since that implementation in itself need not be done in C or be conforming C - it is a standard library function. For example it could be implemented in assembler.
(more)
about 1 year ago
Comment Post #287917 @#53937 Yes, from C17 6.2.4: "The value of a pointer becomes indeterminate when the object it points to (or just past) reaches the end of its lifetime." In case of allocated storage, this happens when you call `free()`. For example `int* ptr = original; free(original); if(ptr == original)` is not _r...
(more)
about 1 year ago
Comment Post #287908 The crux here is that an optimizing compiler can completely omit the `memcmp` call in the first place. Since the value of the passed object holds an indeterminate value, the compiler is free to replace the whole `memcmp` call with anything like `1` or `0`. It doesn't actually have to execute the func...
(more)
about 1 year ago
Comment Post #287842 In case of embedded systems: it goes like "do not needlessly connect it to the Internet in the first place". https://www.wired.com/2015/07/hackers-remotely-kill-jeep-highway/
(more)
over 1 year ago
Comment Post #287760 @#53937 No that's really the same thing. Structs and arrays mostly follow the same rules in this case (being "aggregates" as far as the effective type rules are concerned).
(more)
over 1 year ago
Comment Post #287607 Are Java and C# `interface` common enough to justify using the same tag? Otherwise maybe two tags java-interface and C#-interface would solve the problem. I see no purpose of the tag outside these specific language keywords.
(more)
over 1 year ago
Comment Post #285727 I'd say that the "three pillars" are private encapsulation, autonomous objects and inheritance. Autonomous objects meaning that each object just does it's own designated task and doesn't meddle with other unrelated things - it has _loose coupling_, as few dependencies on other things in the program a...
(more)
over 1 year ago
Comment Post #287561 Just ask the same question here. What answer you got elsewhere and from whom is irrelevant.
(more)
over 1 year ago
Comment Post #287454 Great job everyone who was involved in finally fixing this!
(more)
over 1 year ago
Comment Post #287301 The problem with "non-authoritative" recommendations is that they become completely subjective. If some random person with random experience likes a certain book, then that doesn't tell us anything more than a random subjective review on Amazon - it all turns low quality and unlikely to be of actual ...
(more)
over 1 year ago
Comment Post #287137 A quality list goes beyond "I have read it and it was good" though, because everyone can read a book and share an opinion of it. You can then get a recommendation about how easy to read and pedagogic the books was (similar to Amazon reviews perhaps). But not a measurement of technical correctness. So...
(more)
over 1 year ago
Comment Post #287122 One of the most important things I was taught in physics classes back at school was to _always_ convert each operand to the basic SI unit before using it in calculations. That is, always convert km to m. Always convert hours/minutes to seconds. And so on. This for manual calculations - programming is...
(more)
over 1 year ago
Comment Post #286979 The volatile part doesn't make it UB because of the lvalue access alone, but because of the special rule in 6.3.2.1 which has nothing to do with the value of the variable or traps, but code generation.
(more)
over 1 year ago