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 have created this sensational program: #include <stdio.h> int* func (void) { int local=5; return &local; } int main (void) { printf("%d\n", *func()); } This prints 5 even thoug...
While Lundin has written a reasonably complete answer, I think it suffers a bit from the expert view: conflating core issues with implementation details related to modern hardware architecture. I'd...
This goes back to the various CPU architecture "wars" in the 1970s-1980s between the competitors Intel and Motorola (for example Intel 8086 vs Motorola 68000). For various reasons, CPUs from these ...
I have a large and complex PostgreSQL SELECT query that I would like to make faster. EXPLAIN suggests it should run quickly, with the worst parts being scans of a few thousand rows. When run, it do...
How do I clone the repository with only part of the history? For example, let's say I want to download only the last 5 commits out of thousands.
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...
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...
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...
Bear in mind that unlike on some other question and answer sites, the "Works for me" reaction is not restricted to the author of the question. Anyone can add that reaction, whether they posted the ...
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...
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...
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...
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...
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 ...
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...
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...
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...
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 ...
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 ...
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...
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 ...
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, ...