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.

Activity for Karl Knechtel‭

Type On... Excerpt Status Date
Edit Post #292958 Post edited:
Update to match the change to the question example input
5 months ago
Edit Post #292957 Post edited:
Reduce the input set to a more tractable size to facilitate comparisons and discussion
5 months ago
Edit Post #292958 Initial revision 5 months ago
Answer A: Generating combinations of elements, which are themselves sequences of the same length, where the elements have no value in common at any position
Using a recursive generator There isn't anything like a built-in solution for this algorithm, but it's easy to express the desired output recursively. A valid output combination of k-many inputs looks like an arbitrarily selected first element, followed by a combination of k-1-many elements that: ...
(more)
5 months ago
Edit Post #292957 Post edited:
5 months ago
Edit Post #292957 Post edited:
More clarification and mathematical rigor.
5 months ago
Edit Post #292957 Post edited:
5 months ago
Edit Post #292957 Initial revision 5 months ago
Question Generating combinations of elements, which are themselves sequences of the same length, where the elements have no value in common at any position
This question is adapted from a question I just helped fix up on Stack Overflow. I'm giving a different motivating example which I think will make it clearer what the requirements are and why a naive approach would take prohibitively long. (Also, I want to attempt an answer, but by personal polic...
(more)
5 months ago
Comment Post #292774 I think this is simply a "mental typo" or failure to think it through properly. As a hint: you say that your "goal is to compile all `*.c` files" - notice that you *didn't* say "all `%.c` files"? Also, if you're using existing Stack Overflow Q&A to try to solve something, obviously you shouldn't coun...
(more)
6 months ago
Edit Post #292334 Initial revision 8 months ago
Answer 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 system state and input data needed for test execution.2 For example, the Ruby on Rails web framework us...
(more)
8 months ago
Comment Post #292286 What kind of danger specifically do you have in mind? This is a very different question if it's about supposed security exploits vs. losing work by overwriting your working copy.
(more)
8 months ago
Edit Post #292142 Post edited:
Improve clarity: simplify a bit; minor word-choice etc. tweaks; fix per comment discussion to present two ways of implementing a SSG clearly (instead of as separate but "related solutions")
8 months ago
Suggested Edit Post #292142 Suggested edit:
Improve clarity: simplify a bit; minor word-choice etc. tweaks; fix per comment discussion to present two ways of implementing a SSG clearly (instead of as separate but "related solutions")
(more)
helpful 8 months ago
Edit Post #292139 Post edited:
Reusing code in an ordinary programming language looks very different. Codidact doesn't put tags in the page title automatically like Stack Overflow does; so it's useful to make the title unambiguously indicate a language.
8 months ago
Edit Post #292162 Post edited:
The underlying motivation or purpose for a how-to question doesn't actually change what the question is about. This question is not about *using* version control.
8 months ago
Suggested Edit Post #292139 Suggested edit:
Reusing code in an ordinary programming language looks very different. Codidact doesn't put tags in the page title automatically like Stack Overflow does; so it's useful to make the title unambiguously indicate a language.
(more)
helpful 9 months ago
Suggested Edit Post #292162 Suggested edit:
The underlying motivation or purpose for a how-to question doesn't actually change what the question is about. This question is not about *using* version control.
(more)
helpful 9 months ago
Edit Post #291792 Post edited:
Add footnote with important technical corrigendum
9 months ago
Edit Post #291792 Post edited:
Update status of PEP 541 takedown request
9 months ago
Comment Post #291858 ... wait, *really*? Because whenever *I* look at Stack Overflow, I see tons of people suggesting the devil-may-come workaround, and the answer with a proper disclaimer gets buried. There was [literally a thread just today](https://discuss.python.org/t/_/56900) on the official Python Discourse forum c...
(more)
10 months ago
Comment Post #291858 The rhetoric in this answer makes it hard to take seriously. It seems fairly clear that it's primarily the distro maintainers who want the system package manager to be used for the system Python; and the idea is motivated by known potential harms, not devs' aesthetics or morality. PEP 668 lays out...
(more)
10 months ago
Edit Post #291848 Initial revision 10 months ago
Question Should beginner-oriented Q&A here include basic use of a terminal (command line) for developers?
It seems that year over year, computers constantly get easier to use, and it becomes easier for people to start learning to program who have never touched it before. This comes with the consequence that increasingly more new programmers have disturbingly little (and increasingly less) understanding o...
(more)
10 months ago
Edit Post #291737 Post edited:
Emphasize common failure mode and include a reference link
10 months ago
Comment Post #291479 "In this way, there is just more search indexed words to good answers." is a strange assertion to me. Finding a needle in a haystack doesn't become easier if you add more hay. It becomes easier if you add more needles.
(more)
10 months ago
Comment Post #291479 We can (and should) go out of our way to explain things as clearly as possible; organize comprehensive answers with `<details>` sections so that excess technical detail can be easily skipped over; write plainly while using simple (but **correct**) terminology; etc. But it is simply not possible t...
(more)
10 months ago
Comment Post #291479 Specifically in regards to "In fact, you're told the question was a duplicate of a different question that doesn't seem to have answers for your question." - you seem to be under the impression that if duplicate questions *weren't* closed as duplicates, then OP (who is imagined not to be able to unde...
(more)
10 months ago
Comment Post #291479 I'm here in large part because Stack Overflow is failing to do **enough of** several of the things you consider bad. Starting over allows for creating some actual quality reference content for once. The things you consider merely "similar" *really are* duplicates in most cases, and the right approach...
(more)
10 months ago
Edit Post #291840 Post edited:
10 months ago
Edit Post #291840 Initial revision 10 months ago
Answer A: Why does Pip display "error: externally-managed-environment", and what can I do about it?
Reminder: never use `sudo` to run Pip. This can never properly fix a problem and only introduces serious security risks. Installing third-party packages from PyPI can run arbitrary code at install time, by design, so it should never be given root privileges. Anyone who has observed using `sudo...
(more)
10 months ago
Edit Post #291839 Initial revision 10 months ago
Question Why does Pip display "error: externally-managed-environment", and what can I do about it?
My (non-Windows) operating system came with Python, but that Python didn't include Pip. I followed instructions to install Pip for the included Python, using my system's package manager. But now when I try to use Pip, I[^1] get errors like: ```none error: externally-managed-environment × Th...
(more)
10 months ago
Comment Post #291805 Yes, I think that fixes all problems.
(more)
10 months ago
Comment Post #291805 Right now, it reads to me like nine questions bundled together - one for each call - each of which is best answered by linking the corresponding documentation. This doesn't really make it a coherent, useful question for a Q&A site, IMO. If the underlying idea is to make it possible for people to sele...
(more)
10 months ago
Edit Post #291798 Initial revision 10 months ago
Answer A: Why can't I run freshly-installed Python from the command line on Windows?
Why the installed Python isn't found By default, Windows installers for Python install Python in a folder that is not listed in the `PATH` environment variable. This means that executables in that folder won't be found by name; the command line needs an explicit path to them. Rationale Gener...
(more)
10 months ago
Edit Post #291797 Initial revision 10 months ago
Question Why can't I run freshly-installed Python from the command line on Windows?
I tried installing Python on an old computer running Windows 8[^1]. I know for a fact that there was never any previous installation of Python on the machine. The installation appeared to be successful, but I can't run Python from the command line - I get the standard error `'python' is not recognize...
(more)
10 months ago
Edit Post #291796 Initial revision 10 months ago
Answer A: What happened, or is happening, to other parts of the standard library? Why are they going missing?
A handful of standard library modules either have been, or will soon be, removed from the Python standard library, as part of a general cleanup effort. These modules are seen as out of date and no longer useful, as they serve purposes that are not relevant today. The hope is that removing them will r...
(more)
10 months ago
Edit Post #291795 Initial revision 10 months ago
Question What happened, or is happening, to other parts of the standard library? Why are they going missing?
In Python 3.12, I noticed that some libraries seem to be missing or "deprecated": ``` >>> import asynchat Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'asynchat' >>> import cgi :1: DeprecationWarning: 'cgi' is deprecated and slated for remova...
(more)
10 months ago
Edit Post #291794 Initial revision 10 months ago
Answer A: Why won't Matplotlib show me a plot?
Matplotlib uses a backend to render the plot. Some backends are "GUI backends", meaning that they can render into a window that displays on your screen. Others are "non-GUI backends" which can only save the plot into an image file. Matplotlib doesn't come with any GUI backends except for `TkAgg`, ...
(more)
10 months ago
Edit Post #291793 Initial revision 10 months ago
Question Why won't Matplotlib show me a plot?
I installed Matplotlib and tried a simple demo, but I got a warning message and no plot showed up: ``` >>> import matplotlib.pyplot as plt >>> plt.plot([1,2,3],[4,5,6]) [] >>> plt.show() :1: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure....
(more)
10 months ago
Edit Post #291792 Initial revision 10 months ago