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
This is absolutely undefined behavior. The C standard doesn't say anything about stacks or how they should behave or how local variables should be allocated on them. The word "stack" doesn't even ...
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...
My recommended beginner setup for gcc-like compilers is: -std=c11 -pedantic-errors -Wall -Wextra -Werror Here is an explanation of what these options do: -std=c11. gcc & friends are by d...
The complete set of characters matched by the \s shorthand varies according to the language/API/tool/engine you're using. In addition to that, there might be configurations that change this behavi...
When I have tried to read technical explanations of the syntax rules for programming languages, and when I am trying to decipher error messages, I often encounter the terms expression and statement...
Some of you may know me from Stack Overflow or the broader network. In light of recent actions by the company, I finally decided to move over to Codidact. I am a subject matter expert on Google App...
I just submitted a proposal to DuckDuckGo here for a new "bang" for their search syntax. If approved: !coddsw search_term will trigger the following URL: https://software.codidact.com/posts/sear...
The traditional approach is to create either a single dotfile, or a single dot-directory, directly under the user's home directory, named for your application. Thus ~/.thromblemeisteradmin (which c...
Sometimes when I ask questions here, I get told that I should include a minimal, reproducible example. What is that?
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...
I spend a lot of time writing CLI tools in Python, and I would like to support tab-completion in a style similar to Git. For example, subcommands should be tab-completable, options should expand ba...
Linux questions in general are not really topic here. But Bash is. After all, Bash IS a scripting language as much as Javascript. I have a hard time thinking of a question about Bash that is not o...
Let's say I have a script that needs the user to set X number of variables at the start. One can either Pass the arguments in on the command line. Start the program and then have the user input...
sheets tag sounds a little bit too generic and I feel that it should be replaced with the more specific [google-sheets]. I know that we should avoid using company names as much as possible, but in ...
Lets say I have two tables, A and B and I need to join a subset of them. Is there best practices of sticking the conditions in the WHERE clause like this, SELECT * FROM A JOIN B on a.fk_b = b....
When I first learned about salting, I thought the same thing. But as I understand it, because each salt is unique (or substantially unique within a given database table), storing the salt & has...
When reading questions about C programming from beginners, I very often see them describing peculiar run-time errors and crashes, segmentation faults and similar. They have spent a lot of time chas...
Here I used asterisk after Node. Actually, why asterisk used for? What if I don't put any asterisk after Node (Both Node are structure). It's a pointer. A pointer, like its name implies, poin...
Several months ago we asked for temporary moderators for this community and two people stepped up. One of them later had to step back, leaving Alexei as a sole moderator. Alexei is doing a great ...
I'm using an object-oriented design for my C project and trying to implement classes with private encapsulation. How do I do this? Some things I've tried that are problematic: Using a struct f...
I recently told a friend that malloc(n) allocates and returns a pointer to a block of at least N bytes of memory, as opposed to exactly N; that it is allowed to allocate 'extra' memory to meet e.g....
Generally speaking, pointer arithmetic is undefined behavior unless carried out on arrays. This is how the additive operators behave, C17 6.5.6: For the purposes of these operators, a pointer to...
When writing any form of custom function such as this: void func (int* a, int* b) Should I add code to check if a and b are null pointers or not? if(a == NULL) /* error handling */ When po...
TL;DR A MRE (minimal reproducible example) is simply the minimal code and information needed for someone who is reading your question to reproduce the problem you are having. It needs to be enoug...
C does have references, but it does not have pass by reference. A reference is simply an expression that references an object (object here is meant in the general sense, not in the OO sense; for e...