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.

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
2.3k posts
 
86%
+11 −0
Q&A When would one not want to return an interface?

Consider the following method as an example: List<int> Foo() { // ... } Are there any disadvantages of returning an interface instead of a concrete implementation in C#? IList<i...

3 answers  ·  posted 1y ago by Moshi‭  ·  last activity 11mo ago by matthewsnyder‭

86%
+11 −0
Q&A How to manage user-specific application data on Linux?

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...

posted 2y ago by Canina‭  ·  edited 2y ago by Canina‭

Answer
86%
+11 −0
Meta Should posting on Meta affect reputation?

Codidact has already managed somewhat to separate domain knowledge from moderator suitability. So far so good, but reputation is also a measurement of activity. It might make sense that being acti...

posted 11mo ago by Lundin‭

Answer
86%
+11 −0
Meta What is a minimal, reproducible example?

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...

posted 2y ago by klutt‭  ·  edited 2y ago by klutt‭

Answer
86%
+11 −0
Q&A Are there references in C?

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...

posted 2y ago by celtschk‭

Answer
86%
+11 −0
Q&A What is malloc's standard-defined behavior with respect to the amount of memory it allocates?

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....

2 answers  ·  posted 2y ago by ajv‭  ·  last activity 2y ago by bta‭

86%
+11 −0
Q&A What does the static keyword do in C?

Storage class specifiers static is strictly speaking a storage class specifier, which is an attribute given to a variable or a function stating how it is allocated, how it is accessible and how lo...

posted 2y ago by Lundin‭  ·  edited 12mo ago by Lundin‭

Answer
86%
+11 −0
Q&A Behavior of Pointer Arithmetic on the Stack

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...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
86%
+11 −0
Q&A Should I check if pointer parameters are null pointers?

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...

4 answers  ·  posted 2y ago by Lundin‭  ·  last activity 2y ago by Dirk Herrmann‭

85%
+16 −1
Meta How can we grow this community?

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...

posted 2y ago by metal.carratt‭

Answer
85%
+10 −0
Q&A How to properly use malloc?

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...

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 9mo ago by Lundin‭

85%
+10 −0
Meta How can we grow this community?

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 ...

posted 2y ago by Peter Mortensen‭  ·  edited 2y ago by Peter Mortensen‭

Answer
85%
+10 −0
Q&A Open file in script's own folder

You can use the pathlib standard module with __file__ to make things simple. from pathlib import Path scriptFolder = Path(__file__).parent with open(scriptFolder / 'data.txt') as file: dat...

posted 2y ago by Moshi‭

Answer
85%
+10 −0
Q&A Is it possible to undo a git reset?

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...

2 answers  ·  posted 2y ago by celtschk‭  ·  edited 2y ago by Alexei‭

Question git git-reset
85%
+10 −0
Q&A Vim: how to search for all instances of a string, except for those that are between two specific strings

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 ...

2 answers  ·  posted 2y ago by Trevor‭  ·  last activity 2y ago by Dirk Herrmann‭

85%
+10 −0
Q&A Is it possible to undo a git reset?

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...

posted 2y ago by Derek Elkins‭

Answer
85%
+10 −0
Q&A How to set text-align for whole column of HTML table?

You cannot set text-align on a column element (Well, you can, but it won't have any effect) There are only a couple of properties that have an effect, namely border, background, width, and visibi...

posted 3y ago by Moshi‭

Answer
85%
+10 −0
Meta Etiquette for posting comments

This question featured a quite heated discussion in the comments which led to some of them being removed. This action was discussed here and I have realized that our community lacks a guide about p...

5 answers  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Estela‭

Question discussion comments
85%
+10 −0
Q&A Separation of password cookies from all other types of cookies

There is a fundamental misunderstanding at the root of this question. Websites do not store your password client-side When you login to a website, the website does NOT store your password in a co...

posted 3y ago by JDB‭  ·  edited 3y ago by JDB‭

Answer
85%
+10 −0
Q&A Is *nix a formal term?

The term is cultural, not technical. From Wikipedia: There is no standard for defining the term, and some difference of opinion is possible as to the degree to which a given operating system or ...

posted 3y ago by r~~‭

Answer
85%
+10 −0
Q&A Where did my proper divisor sum program went wrong?

When you do x=y=z=[], you're making x, y and z point to the same list. Example: x=y=z=[] # add element to x x.append(1) # add element to y y.append(2) # but x, y and z all point to the same l...

posted 3y ago by hkotsubo‭  ·  edited 3y ago by hkotsubo‭

Answer
85%
+10 −0
Q&A What does the "\s" shorthand match?

I've seen some regular expressions (regex) using \s when they want to match a space, but I noticed that it also matches line breaks. Example: the regex [a-z]\s[0-9] (lowercase ASCII letter, follow...

1 answer  ·  posted 3y ago by hkotsubo‭  ·  last activity 2y ago by hkotsubo‭

Question regex whitespace
85%
+10 −0
Q&A What's the difference between Inheritance and Polymorphism?

What you're asking is a very broad topic, and it'd require entire books to cover everything. For the sake of simplicify, I'll just stick to the basics. Inheritance Inheritance can be explai...

posted 3y ago by hkotsubo‭  ·  edited 3y ago by hkotsubo‭

Answer
85%
+10 −0
Q&A How to declare variable-length arrays correctly?

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...

posted 3y ago by Lundin‭  ·  edited 9mo ago by Lundin‭

Answer
85%
+10 −0
Meta Unfair accusation in a comment and consequent loss of *actual* reputation

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 ...

posted 3y ago by Monica Cellio‭

Answer