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.
Search
I respect Alexei for opening a discussion on this, and Lundin for providing hard-won real world experience. I would like to put in a "pro", on the grounds that "I read this book and I'm a better p...
Grouping related items into modules is of course generally good practice, but it serves a practical purpose as well. The important part here is the #[cfg(test)] annotation. The #[cfg(test)] anno...
Between-lines relations are not easy to look for with grep, which is a line filter. You could use a regex that spans lines, but I find this annoying because of all the flags you have to set. Grep ...
I have text (xml actually) files. Some files contain 'foo', some contain 'bar', some contain neither and some contain both. It's the both I'm interested in. How do I do an AND search on words in...
Background Many Python programs now recommend installing with pipx, and there is a sense that you shouldn't install with pip anymore, you should use tools like pipx. Main Question However, what ...
Well, to start, it is not an alternative to pip. It's built on top of pip and exclusively deals with applications. pip is more of a development tool, while pipx is aimed at end-users (who may also ...
Consider this code example: def example(param=[]): param.append('value') print(param) When example is repeatedly called with an existing list, it repeatedly appends to the list, as ...
While other JVM languages, such as Groovy, Kotlin and Scala have Python-like import aliasing, Java does not. It's not possible to 're-name' imports, however, when you call a class from a package, ...
With the --delete option of git-push: $ git push <remote-name> --delete <branch-name> For example: $ git push origin --delete my-branch
There's no point. It just causes unnecessary clutter and confusion. The correct way is to configure a manual way for triggering the CI/CD pipeline. In most systems there should be an API endpoint ...
Alternating between the two patterns seems to work! \(abc.*\)\@<!bird\|bird\(.*xyz\)\@! As a bonus, you can enable the very magic mode with \v to avoid backslashes! The resulting expression is ...
For writing pseudocode? No. BNF is a notation—in practice, a family of similar notations, like how Markdown is a family of similar markup languages—for defining grammars. In software development a...
As with most everything in engineering, how much call arguments to a subroutine should be validated is a tradeoff. There is no single universal right answer. Note that checking for null pointers ...
Short answer: No, it's not dangerous. Short of bugs in the implementation or monkey-patching, there's no reason it would or should allow executing of anything other than the JSON parsing code. Thi...
I manage a wsgi application that accepts JSON data via POST from potentially untrusted sources. Normally it is treated as a text blob and never parsed, but there is a value in the expected input th...
If you remove the align="left" then it works fine. My best guess is that you put those in because you didn't want the image in the text flow, affecting the vertical positioning on the text. The ea...
I have a Python script that needs to access some data (or configuration) file in its very own folder. For example, say script.py does something like this: with open('data.txt') as file: data ...
Consider the following code: #include <stdio.h> int main() { int a = 5; int b; ++*(&b + 1); printf("%d\n", a); return 0; } The output is as expected: 6 ...
I once wrote this post here: Why can't we mix increment operators like i++ with other operators? When using Codidact search looking for that post, I tried to type i++ in the search but it didn't l...
When reading posts at programming sites such as this one, I frequently encounter people saying things like: "There is no pass-by-reference in C, everything is passed by value." People claiming su...
Note: some of these points are relevant for all communities, but I would like to focus on Software Development for now I am thinking of promoting Software Codidact, but I could not find a single p...
Should we cast the result of malloc? The cast to the intended type is not necessary in C, since during assignment, the void* returned by malloc can be implicitly converted to any other object poin...
My personal opinion (I am not speaking for Codidact) is that we named the community "Software Development", not "Programming". Testing, both unit testing done by the developer and functional/perfo...
I think a branch is a set of commits and a commit is a set of deltas, so my concern is that merging feature-B to master would reflect only the work that is unique to feature-B Not quite: a bra...
You can, in a sense, do I believe even better than using Stack Overflow's hosted, proprietary service. You can run your very own instance of the Codidact software (that is, QPixel) locally, on a s...