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 dmckee‭

Type On... Excerpt Status Date
Comment Post #282925 I’m not familiar with the expression “compound variable”. Logic suggests it may apply to a programming artifact with multiple named fields (as a struct in c or a record in pascal) or a possibly heterogeneous ordered structure (like a list s-expr or a python tuple), but it might help if you could give...
(more)
over 3 years ago
Edit Post #282692 Post edited:
Fix a markdown error
over 3 years ago
Comment Post #282691 Is that better? If not feel free to suggest something you like better.
(more)
over 3 years ago
Edit Post #282691 Post edited:
over 3 years ago
Edit Post #282699 Post edited:
over 3 years ago
Edit Post #282699 Post edited:
over 3 years ago
Edit Post #282699 Initial revision over 3 years ago
Answer A: Should "Hello", "Thank you", "Morning" and similar greetings be removed from posts?
Just to have a differing viewpoint represented. Addressing questions and answers The stated reason for stripping politese Somewhere Else (which I largely agree with) is that while posts are created and improved as a human interaction, their main function is as a long-lived informational resourc...
(more)
over 3 years ago
Edit Post #282692 Post edited:
over 3 years ago
Edit Post #282692 Initial revision over 3 years ago
Answer A: How do I communicate with a subproject in qmake?
Options There are three basic channels to choose from Shared build-include (`.pri`) files `CONFIG` `.qmake.conf` and I discuss the practicalities of each below. Shared `.pri` files Set or add to things like `INCLUDEPATH` or `DEFINES` that should affect your whole project in a `.pr...
(more)
over 3 years ago
Edit Post #282691 Initial revision over 3 years ago
Question How do I communicate with a subproject in qmake?
When working with a qmake subdirs project you may want to share configuration between multiple projects. In a less common case you may including a external project within your own as code and want to configure the build of the included project. Either way, the solution is to communicate decisions ...
(more)
over 3 years ago
Comment Post #281520 Smart pointers *solve* the lifetime problem. In cases where the sending code is done with the data you use a `std::unique_ptr` to transfer ownership. If for some reason the sending code needs to retain access you use a `std::shared_ptr` which has more overhead but will be at least as efficient as any...
(more)
over 3 years ago
Comment Post #281520 Also potentially useful: try to reduce unneeded copies. Don’t pass large objects, pass suitable smart pointers to them.
(more)
over 3 years ago
Comment Post #281496 @ArtOfCode By way of potentially helpful information, I received two comment notifications (maybe one for your test comment?) associated with my answer, but saw no comments.
(more)
over 3 years ago
Comment Post #281486 How you respond to the load problem depends on where the Qt signals/slots solution is being too slow. If the signals queue is the issue the you can keep using QFile/QTextSteam, but if those classes are the bottleneck you may have to go to a low-level IO solution.
(more)
over 3 years ago
Comment Post #281486 Strangely I got notifications for the comments you didn’t manage to actually post. Probably a bug in the engine.
(more)
over 3 years ago
Comment Post #281474 The pointer hack is cute, but to prevent an unintended change in semantics you might pass pointer to const. Of course you'll need a copy if your implementation is changing the passed arguments but you won't inadvertently change values for the calling code.
(more)
over 3 years ago
Edit Post #281493 Initial revision over 3 years ago
Answer A: Write to same file from multiple threads
Because you are using Qt in particular there is something to be said for not solving this problem yourself. Instead, create a single object that owns the stream or file and offers a `writeLine` slot. In the simplest case the signature might be `writeLine(const QString & line)`. Then your threads s...
(more)
over 3 years ago
Comment Post #281081 In that case [Peter is on the right track](https://software.codidact.com/posts/281095#answer-281095).
(more)
over 3 years ago
Comment Post #281081 It might help to say what you are considering under the label “secure” here. Do you *trust* the scripts?
(more)
over 3 years ago
Edit Post #280999 Initial revision over 3 years ago
Answer A: Are code troubleshooting posts allowed?
tl;dr: Allowing beginner-level "help me diagnose this" questions will generate large volumes of duplicates if the site ever scales. We need to think about how to structure things if we want them. I have certain reservation about this. I've said before that I don't think question-and-answer ...
(more)
over 3 years ago
Comment Post #280640 Anyone one who regularly crosses the line between c and c++ should keep in mind that c++’s strict aliasing rule is stricter than c’s. Punning in-place is possible a couple of ways in c and essentially forbidden in c++. Drives me bats because the committee *could* have made an exception for POD types,...
(more)
almost 4 years ago
Comment Post #279879 I work with a project (something my work depends on and is not available through the usual high level distribution mechanisms) that uses this scheme and it works, but it feels as hoc. Why do I need a script to invoke the meta-build system? To get both production and debug I end up using two scripts.
(more)
almost 4 years ago
Comment Post #280536 It *should* get rid of the switches, but I started using that nonsense because MSVC *was* warning me about unfamiliar #pragma’s.
(more)
almost 4 years ago
Comment Post #280536 Every time I think I know this language someone comes along and shows me another corner I've never heard of. Thanks.
(more)
almost 4 years ago
Comment Post #280528 @Lundin Using `memcmp` changes the semantics (NaNs can compare equal...) so you need to think about what you intend. We actually have a namespace where we define various classes of floating point comparisons (and use the abhorrent mess above in the implementation for `fp::exactlyEqual`) so that the c...
(more)
almost 4 years ago
Edit Post #280528 Initial revision almost 4 years ago
Question Scheme for cross-platform warning control?
[]()tl;dr I'd like to learn a compact, cross-compiler way of selectively suppressing compiler warnings. Consider the case where you really mean to make an exact floating-point comparison using `==`, or the case where you capture a return value that you don't use in production but want to `asse...
(more)
almost 4 years ago
Edit Post #280417 Post edited:
almost 4 years ago
Edit Post #280417 Initial revision almost 4 years ago
Answer A: Do we need the fullstack tag?
This is another argument for a fullstack tag not being appropriate. Or perhaps an elaboration of Peter's argument. The manner in which a problem could be a "fullstack problem" is by being a communication or coordination problem between tools running at the front end and at the back end. In that...
(more)
almost 4 years ago
Comment Post #280217 I’d add that the only way to know what kinds of effects language selection can have is to do some projects with varied languages. Don’t do those experiments on projects that others are counting on, so *do* try out new languages for smallish (but non-trivial) hobby projects.
(more)
almost 4 years ago
Comment Post #279021 @Canina These are exactly the reasons I don't push hard to get to that simple structure. That said, I imagine that if we hunted down a "clean code" evangelist and offered them a coffee to discuss this they'd tell us we need to use more and more carefully chosen abstractions so the state that looks s...
(more)
almost 4 years ago
Comment Post #279863 If anything a beginners reaction (at least one as thoughtful as this) is an advantage because any code I produce along this line in likely to be read by juniors with limited exposure from time to time. For what it's worth, I encountered #1 first but am leaning more and more towards using `static_asse...
(more)
almost 4 years ago
Comment Post #278924 @anatolyg That's all well and good if c++20 is an option for you; the project that prompted this question is for work and the customer's requirements effectively lock us in to c++11. Indeed, due to customer requirements my whole shop is running 5+ years behind the standard (we're just starting to dis...
(more)
almost 4 years ago
Comment Post #279013 @Lundin Well, the containers and algorithms template code has certainly been folded in with the rest of the standard library. On SomeplaceElse I read that tag as *"I want to ask about the templated parts of the standard library and not just about c++ features in the raw"*, which I consider to be usef...
(more)
about 4 years ago
Edit Post #279013 Post edited:
about 4 years ago
Comment Post #279013 @Moshi Yeah. That's better.
(more)
about 4 years ago
Edit Post #279021 Post edited:
about 4 years ago
Edit Post #279021 Initial revision about 4 years ago
Answer A: Is omitting braces for single statements bad practice?
I'm in the "Use the braces. Just use them every time" camp [^1]. As others have suggested you or your tooling will catch a lot of cases where you screw up on this, but the ones that slip through can really hurt. So, I was surprised to hear Robert "Uncle Bob" Martin opine that he's "on a mission to...
(more)
about 4 years ago
Edit Post #279013 Post edited:
about 4 years ago
Edit Post #279013 Post edited:
about 4 years ago
Comment Post #279013 Am I to take it that people don’t care for my (allegedly funny) title, or do people really think this ambiguity is OK?
(more)
about 4 years ago
Edit Post #279013 Post edited:
about 4 years ago
Edit Post #279013 Post edited:
about 4 years ago