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
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...
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 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...
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...
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...
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 ...
If you've poked around the mod tools here a bit, you may have noticed that QPixel has an impersonation feature, live on prod. It's there for much the same reasons: so that developers can test and i...
Yo. Me here. I used the code for the Codidactyl on the run as basis for the game, added a wrapper checking for the Konami-code by being a simple finite automaton and after that creating the canvas...
‘This language doesn't have types’ and ‘This language only has one type’ are English sentences that communicate the same underlying concept: a typeless language doesn't have a way to distinguish ca...
This is a rather vague question, but I'm trying to solve a specific problem and I'm inexperienced in most of the potential solutions, so please forgive the inherent ambiguity. I have access to a d...
Use a stack while just scanning your string once from left to right. No need for multiple (performance-wise) expensive string replacements. If implemented right, the stack will only ever contain at...
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...
A recent flag for this question suggested that it would be a better fit for the Linux community. There is no motivation provided, but I guess it is related to the fact that most of the question and...
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 ...
With the --delete option of git-push: $ git push <remote-name> --delete <branch-name> For example: $ git push origin --delete my-branch
No. Closing is an integral part of maintaining this knowledge repository. If a question isn't up to our standards, it doesn't belong here, and closing is the first step in ensuring that. If a quest...
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 ...