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
 
75%
+4 −0
Q&A How can a Python program send itself to the background?

Use os.fork(). Example: import os import time pid = os.fork() if pid == 0: os.setsid() # Prevents the child from being killed if the parent dies time.sleep(10) os.system('some...

posted 2y ago by r~~‭

Answer
75%
+4 −0
Meta How should I organize material about text encoding in Python into questions?

The list you provided seems huge for a single Q/A. I think you're better off breaking them up, and linking to each other in the answers. The theory behind text encoding can be decoupled from Python...

posted 2y ago by Andreas demands justice for humanity‭

Answer
75%
+4 −0
Meta Tag creation/deletion criteria for Software Development?

Ok so we have fairly lax tagging rules here, as do most Codidact sites. Recently the Electrical Engineering community has started a clean-up of strange and off-topic tags. I wrote this over there: ...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 2y ago by Alexei‭

Question discussion tags
75%
+4 −0
Q&A How can I properly type-hint methods in different files that would lead to circular imports?

I eventually also found out that the typing module has a global variable TYPE_CHECKING that can be used to only import during type-checking. Concretely, the following code for helpers.py seems to ...

posted 2y ago by mr Tsjolder‭

Answer
75%
+4 −0
Q&A Why does calloc accept 2 arguments, and with what arguments should one call it?

It has 2 parameters for weird historical reasons that nobody seems to know the rationale for any longer. Like most functions in the C standard library, the function API was not well-designed. Keep ...

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

Answer
75%
+4 −0
Q&A Replace leaf arrays with joined strings in a nested structure in jq

Consider the following arbitrarily-nested JSON as input to a jq filter: echo '[{"foo": [1, 2]}, {"bar": [{"baz": ["foo", "baz"]}]}]' | jq '.' My goal is to join leaf arrays into strings: [{"fo...

1 answer  ·  posted 2y ago by ggorlen‭  ·  edited 2y ago by ggorlen‭

Question json jq
75%
+4 −0
Meta Should self-answered Q&A use separate answers for different techniques/approaches (even if there's a caveat that applies overall)?

Looking back at my own Q&A How can I build a string from smaller pieces?, the answer is incredibly long. I'm essentially showing five different ways to solve the problem - because they all exis...

2 answers  ·  posted 2y ago by Karl Knechtel‭  ·  last activity 2y ago by Lundin‭

Question discussion answers self-answered-questions
75%
+4 −0
Q&A How to troubleshoot ModuleNotFoundError?

I ran some Python code and it crashed with ModuleNotFoundError. What is the general approach for dealing with these situations?

2 answers  ·  posted 1y ago by matthewsnyder‭  ·  last activity 1y ago by Karl Knechtel‭

Question import python-3
75%
+4 −0
Code Reviews How to programmatically click through a list of elements if one has to wait for a click to load a set of predefined new elements?

It seems to get to job done, but the Promise will always remain pending You must call resolve() or reject() (or throw an error) inside the executor function of the Promise, otherwise the Pro...

posted 1y ago by Zer0‭

Answer
75%
+4 −0
Q&A How does a client verify a server's SSL certificate? What are the specific steps?

Found this old article at the bottom of the search results to be the best explanation to date: (The longer version is here, SSL Handshake (Sun Java System Directory Server Enterprise Edition 6.0 R...

posted 1y ago by toraritte‭

Answer
75%
+4 −0
Q&A What does "namespace" mean?

A well-known easter egg in Python displays some ideas about writing good Python code, credited to Tim Peters (one of the core developers). This question is about the last: Namespaces are one hon...

2 answers  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by Olin Lathrop‭

Question terminology language-agnostic
75%
+4 −0
Q&A What does "namespace" mean?

A namespace is a category to which a name can belong. Think of family names for people: I may be friends with several Jims, and if only one of them is present I can just call him Jim. But if multip...

posted 1y ago by r~~‭

Answer
75%
+4 −0
Meta The way I tried to mark up code did not work. What is the right way to do it?

Alexei's comment gave me the answer. Instead of using the code icon, put three backticks "```" at the start and end of the code. Each set of backticks must be on it's own line. Here's an example: ...

posted 1y ago by TecBrat‭

Answer
75%
+4 −0
Q&A How to run Gitlab CI jobs only in specific branches?

Compare $CI_COMMIT_BRANCH to your desired branch name in rules: # .gitlab-ci.yml stages: - test - deploy # This job will run always. test-job: stage: test image: bash script:...

posted 1y ago by Iizuki‭

Answer
75%
+4 −0
Code Reviews How to programmatically click through a list of elements if one has to wait for a click to load a set of predefined new elements?

I would like to download the old-time radio show I Love a Mystery from the OTRR website. I figured out how to construct the list of right URLs, const urlStub = "https://otrr.org/OTRRLibrary/jukebo...

1 answer  ·  posted 1y ago by toraritte‭  ·  edited 1y ago by toraritte‭

Question javascript
75%
+4 −0
Q&A Command to format code from repo into single markdown file

Sylvester's answer is great, but I wanted to point out that interpolation only happens in double-quoted strings ("), not in single-quoted ones ('). If you have lines that don't need any variable o...

posted 1y ago by Michael‭  ·  edited 1y ago by Michael‭

Answer
75%
+4 −0
Q&A What is the point of triggering CI/CD with an empty git commit?

Based on the SO comments, this is not a good general practice, and I believe the point of the posts mentioned in the question is that it can be done (but one probably shouldn't) this can be use...

posted 1y ago by toraritte‭

Answer
75%
+4 −0
Q&A How do I share a type between a client and server, but make a specific field optional for one and required for the other?

This can be done using conditional types. I defined these helper types: enum Role { server, client }; type PossiblyHiddenFromClients<R extends Role, T> = T | (R extends Role.client ? un...

posted 1y ago by Emily‭

Answer
75%
+4 −0
Q&A When should I parenthesize macro arguments in C?

Simply put: parenthesis are used whenever we suspect that there may be operator precedence issues. Either because the user passed an expression containing several operands and operators to the...

posted 1y ago by Lundin‭

Answer
75%
+4 −0
Q&A What actually is a pytest fixture?

The term long predates Pytest and is not at all specific to Python. The idea is described on Wikipedia: In the context of software a test fixture (also called "test context") is used to set up s...

posted 10mo ago by Karl Knechtel‭

Answer
75%
+7 −1
Q&A how do I get markdown to render # as a shell prompt and not a comment?

Note: This is a general question about Markdown formatting for any Markdown renderer (e.g., Gitlab, Github, Codidact). So this is not just a question about Codidact's renderer. When displaying she...

2 answers  ·  posted 6mo ago by Trevor‭  ·  last activity 5mo ago by bignose‭

Question markdown syntax-highlighting
75%
+4 −0
Q&A 2D-array pointer as a struct member

If you don't mind the extra memory, you can do it with an extra array: struct basket { char *item_memory; char **items; int itemcount; }; /* I omitted any error handling */ voi...

posted 5mo ago by celtschk‭  ·  last activity 5mo ago by Alexei‭

Answer
75%
+4 −0
Meta A milestone for Software Development - congratulations!

It seems fine to me to restrict new users in this way - most of them probably weren't getting anywhere near the old limits, or even the new ones, anyway. (It's unfortunately common on sites like th...

posted 5mo ago by Karl Knechtel‭

Answer
75%
+4 −0
Q&A How to disable debug windows automatically opening up when I hit a breakpoint in vscode?

In vscode, when I hit a breakpoint it automatically opens "Run and Debug" window. I don't want that because I am using a small screen (and that sidebar takes up space) and I don't always need to us...

1 answer  ·  posted 5mo ago by Vanity Slug ❤️‭  ·  last activity 4mo ago by Alexei‭

Question debugging vs-code
75%
+4 −0
Q&A Why is atoi dangerous and what should be used instead?

The atoi family of functions should never be used for any purpose - they are broken by design. The reason why can be found in the C standard C23 7.24.1: The functions atof, atoi, atol, and atol...

posted 6mo ago by Lundin‭

Answer