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
C programs are executed from top to bottom. You can't declare a VLA with an uninitialized variable as its size parameter. For the same reason at you can't do this: int x; printf("%d\n",x); scanf...
I looked at your answer and those comments, skimmed the Wikipedia page, and I do not see direct copies. OOP is a fundamental topic, widely taught and widely written about. It's not surprising to ...
I have seen this construct quite a lot: int *p = (int*) malloc(n * sizeof(int)); Is this how it should be? What is the proper way to use malloc? I have also seen this: int *p = malloc(n * size...
As a (for now at least) casual user, I can report that a bad first impression is that there are way too many "500 server errors". Within a few tens of minutes I ran into two, one for some profile ...
For some reason, I just wanted to undo a commit on my git repository, which I've done with the following command: git reset --soft HEAD~1 So far, so good. However, by mistake I issued the comma...
Using Vim, I am trying to search for all instances of a specific string, except for those that fall somewhere in between two other specific strings. For example, I want to determine all instances ...
If you've committed, then the commit is in the git repo regardless. All git reset does is change what commit the HEAD references. If you find the hash corresponding to the commit you'd like HEAD to...
It would be much better split into separate questions. Users have to scroll, ctrl-f search, or wade through a lot of info that irrelevant to their problem to get to the section that helps them. ...
There is one thing to clarify when mapping a float interval to an integer interval, namely how the boundaries of the float interval shall be mapped to the boundaries of the integer interval. Takin...
I am developing an application that targets Linux-based OS, and I need to store the user's configuration, metadata and other things in a persistent way (i.e. on the file system). I know that one c...
What's going on is that the compiler is deciding on what function to call at compile time rather than runtime. Since the type of vh is Vehicle *, it is essentially creating this call: vh->Vehic...
C23 will be a major revision, certainly the biggest one since C99. It contains lots of changes and new features, both big and small. The linked draft in the question contains a complete list of cha...
How do I clone the repository with only part of the history? It depends on what part you want. It's possible to have shallow clones (which is exactly what you need, only a part of the commit h...
Search engine optimization? I thought this goes without saying, but apparently we aren't doing too well there for some reason. The other day I was having a discussion with someone at SO regarding...
Just my two cents: I found this community because of someone's username on Stack Overflow. That's probably a good start. However I then typed 'codidact' into Google. The first result was codid...
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...
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...
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...
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...