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 matthewsnyder‭

Type On... Excerpt Status Date
Comment Post #291970 IMO it would be better to ask a separate question, like "how do you resolve incompatible changes when merging git branches?".
(more)
5 months ago
Edit Post #291962 Post edited:
5 months ago
Edit Post #291962 Post edited:
5 months ago
Edit Post #291962 Post edited:
5 months ago
Edit Post #291962 Post edited:
5 months ago
Edit Post #291962 Initial revision 5 months ago
Answer A: Managing a dependency for a C application
I see 3 common ways to distribute such software: 1. Statically linked binary 2. Dynamically linked binary 3. Source 1 means you compile everything into a standalone binary file. This bloats the file size, but you don't have to trust the user to have the dependencies (the libraries) installed ...
(more)
5 months ago
Comment Post #291888 Sounds like you are asking about packaging, so I made an edit suggestion. Might be worth adding `best-practices` as well, since you seem to be asking about "should" rather than "is".
(more)
5 months ago
Suggested Edit Post #291888 Suggested edit:

(more)
helpful 5 months ago
Edit Post #291941 Post edited:
5 months ago
Edit Post #291941 Initial revision 5 months ago
Answer A: Use cases for raising a 'NotImplementedError' in Python
This is in the docs. To paraphrase: Used for abstract methods that must be overridden in subclasses When the implementation is still WIP, but you want to leave a placeholder for the method name and signature It's a way to to "reserve namespace", but with the actual method body "coming soon" ...
(more)
5 months ago
Edit Post #291940 Initial revision 5 months ago
Answer A: Closing self-answered question due to not being clear enough
Closing questions should be a last resort. Closed question are wasted opportunities to get more interesting and useful content, and potentially wasted opportunities to gain a new contributing user. When someone takes a chance on a low activity site like CD currently is, they are doing you favor. If t...
(more)
5 months ago
Comment Post #291898 Still 2 questions btw: 1. Self-join all values that are more than threshold. 2. Sum them (with a group by).
(more)
6 months ago
Comment Post #291898 Oh, I see now. You're not taking a cumulative sum, you're taking a sum of all values below each threshold. So there's a self-join. You're right, my Spark-less code won't work. The one you have in the question will. You should remove mentions of "cumulative sum" because that's not what you are t...
(more)
6 months ago
Comment Post #291898 Also, the following code is simpler: ``` # Part 1: Filter filtered = [i for i in all_data if i["value"] > i["threshold"]] # Part 2: Cumsum s = 0 for i in filtered: s += i["value"] i["cumsum"] = s ```
(more)
6 months ago
Comment Post #291898 It would be more useful to split this into two questions: 1. How to filter rows based on a condition 2. How to do a cumsum Combining them makes things more confusing, especially to people who want to know only one and not the other.
(more)
6 months ago
Edit Post #291912 Initial revision 6 months ago
Question Run Spark code without Spark?
There's not always a Spark cluster on hand to test Spark code. Is there some simple program that you can install locally, which has the same behavior as Spark (can run normal Spark scripts) without the performance and complexity?
(more)
6 months ago
Comment Post #291858 Sounds like we should just swap places and we'd both be perfectly happy...
(more)
6 months ago
Comment Post #291858 I often search for this again and again, because I forget some details of the process like the exact path of the file. I've become frustrated with a pattern where I find answers on StackOverflow and elsewhere, that force me to scroll past a disclaimer (with which I am already familiar) on why I shoul...
(more)
6 months ago
Edit Post #291858 Post edited:
6 months ago
Edit Post #291858 Post undeleted 6 months ago
Edit Post #291858 Post deleted 6 months ago
Edit Post #291859 Initial revision 6 months ago
Answer A: Should beginner-oriented Q&A here include basic use of a terminal (command line) for developers?
IMO we should expect questions to have a single main point. Answers should address only that point. If the answerer feels like they are introducing some new topic that the asker might not know - so what? People who read the answer (not just the OP!) can just search for that topic online or ask ano...
(more)
6 months ago
Edit Post #291858 Initial revision 6 months ago
Answer A: Why does Pip display "error: externally-managed-environment", and what can I do about it?
tl;dr: There's a few ways to bypass this: For all users on the machine: Get rid of `/usr/lib/python3.foo/EXTERNALLY-MANAGED`. To prevent your package manager from adding it back, replace it with a dummy/empty file. (you'll have to do this again for every minor Python version) For your user only...
(more)
6 months ago
Suggested Edit Post #291736 Suggested edit:

(more)
declined 6 months ago
Comment Post #291618 IMO it wouldn't hurt to devote at least half a sentence to it. You are right, it is merely a tool. However, I feel like anyone interested in this will also be interested in a tool like pyenv.
(more)
6 months ago
Comment Post #291618 I don't want to write another answer since you've already written a comprehensive one. However, I feel like this topic *has* to mention pyenv at some point. To be fair, it doesn't do anything you couldn't do "manually", but also pretty much everybody is using pyenv for all of this stuff which makes t...
(more)
7 months ago
Edit Post #291627 Post edited:
7 months ago
Edit Post #291627 Initial revision 7 months ago
Answer A: Subfolders for package-less module imports
It looks like I was confused, and the problem I am asking about does not actually exist. Perhaps it existed in an older version, or perhaps I am simply misremembering. Regardless, I've seen other people get stuck on this, so I think posting an answer is more useful than deleting the question. At l...
(more)
7 months ago
Comment Post #291615 I forgot about pip freeze. That's probably the best way to accomplish this.
(more)
7 months ago
Edit Post #291611 Initial revision 7 months ago
Question Subfolders for package-less module imports
Is there some sane way to allow Python to import from subfolders in projects that don't have a package? I have many Python programs that I implemented as Python files inside a directory, without a `setup.py` file or other packaging boilerplate. I don't `pip install` these. Simply doing `cd` into t...
(more)
7 months ago
Edit Post #291609 Initial revision 7 months ago
Question Reinstall old Python libraries after update
Recently, Python updated from 3.11 to 3.12 and now all my libraries are gone. Actually they're in the old 3.11 site-packages, but now that `python` points to 3.12 those are not active. Every time I run a program I'm used to, I get a bunch of import errors, and have to reinstall the dependencies. I...
(more)
7 months ago
Edit Post #290502 Post edited:
8 months ago
Edit Post #290502 Post edited:
8 months ago
Edit Post #291349 Initial revision 8 months ago
Answer A: How and where does Python code start running? How can I control that?
Files with `.py` extension are scripts. You run them with `python myscript.py`. Python is an imperative language, so executing a file will run each line one by one, starting from the top, and exit when the end of the file is reached. In your example, the script is saying: 1. Create a functio...
(more)
8 months ago
Comment Post #291286 Is this how systemd does it? I think pamac also uses the same escalation method.
(more)
8 months ago
Edit Post #291284 Initial revision 8 months ago
Question Privilege escalation from Python like from systemd
When you try to do a privileged systemd operation without the privilege, you get an escalation prompt: ``` $ systemctl stop docker ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ==== Authentication is required to stop 'docker.service'. Authenticating as: [MY USER NAME] Password: ...
(more)
8 months ago
Edit Post #291257 Initial revision 9 months ago
Question VS code - stop reopening old tabs
When I open VS Code inside a project dir, it reopens all the tabs that were open last time, and re-expands all the folders that were unfolded last time. I find this annoying. Usually, when I close VS Code, it's because I'm done working with what I was doing. I don't want to manually "clean up" at ...
(more)
9 months ago
Edit Post #291200 Initial revision 9 months ago