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.

Posts by matthewsnyder‭

60 posts
85%
+10 −0
Q&A Git: How to clone only a few recent commits?

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.

2 answers  ·  posted 1mo ago by matthewsnyder‭  ·  last activity 1mo ago by hkotsubo‭

Question git-clone
84%
+9 −0
Q&A What is the point of pipx?

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

3 answers  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 17d ago by tripleee‭

Question python-3 package
83%
+8 −0
Q&A grep AND search for multiple words in files

Between-lines relations are not easy to look for with grep, which is a line filter. You could use a regex that spans lines, but I find this annoying because of all the flags you have to set. Grep ...

posted 4mo ago by matthewsnyder‭  ·  edited 4mo ago by matthewsnyder‭

Answer
81%
+7 −0
Meta To transfer, or not to, that is the question: whether 'tis nobler to let it stay or to take arms against Stack Overflow's dominance of FAQ canonicals

Hi and welcome to the site. :) I think the idea of a canonical like the one you linked is great. A lot of newbies have too little understanding of their topic to identify common patterns. So they ...

posted 3mo ago by matthewsnyder‭

Answer
80%
+6 −0
Meta Are code troubleshooting posts allowed?

These questions are very helpful to the person asking, and great for driving activity. I think it is good to allow these questions to be asked and to answer them. At the same time, they are not go...

posted 4mo ago by matthewsnyder‭

Answer
77%
+5 −0
Q&A Terms for types of functions with respect to side effects

Mathematically, the purpose of a function is to return an output. However, in a programming context functions often have side effects. It is even common to call functions for the side effects alone...

2 answers  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 2mo ago by Lundin‭

77%
+5 −0
Q&A Why is git merge from rather than to?

Why does git merge take the source branch rather than the destination branch as a parameter? The most common merge case by far for me is "Okay, this branch looks good, let's merge it into branch X...

4 answers  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 2mo ago by hkotsubo‭

77%
+5 −0
Q&A How to configure Python pip to look for packages in a private index first?

When I run pip install foo, pip looks for foo in PyPi. I want it to look for it first in a private repo, let's say pypi.bar.com. Only if foo cannot be found in pypi.bar.com, should pip then look f...

1 answer  ·  posted 3mo ago by matthewsnyder‭  ·  last activity 3mo ago by tripleee‭

Question python-3 pip
75%
+4 −0
Meta Are AI prompt engineering questions on topic?

Recently, AI models like ChatGPT have shown themselves capable of generating content and even source code. Just like with human helpers, clear and precise communication is key (especially when aski...

1 answer  ·  posted 3mo ago by matthewsnyder‭  ·  last activity 3mo ago by manassehkatz‭

Question discussion
75%
+4 −0
Q&A Readable syntax for executing many callables with useful side effects

In Python, multiprocessing is easy to do if you follow a "list projection" paradigm. Say you want to take a list of inputs X and apply some function f to every x_i, such that y_i = f(x_i) and the y...

1 answer  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 2mo ago by mr Tsjolder‭

75%
+4 −0
Q&A Prevent vscode from inserting new lines in the middle of my code on format.

It sounds like you have a Java formatter configured (by default?) and VSC is applying it to your code automatically (on save?). How code is formatted If your only gripe is these specific stylisti...

posted 3mo ago by matthewsnyder‭

Answer
75%
+4 −0
Q&A How can I schedule a later task in Python?

I want my CLI Python program to schedule a task, and then exit. After some times has passed (say 10 minutes) the task should execute. The task can be a Python method or a shell command, whatever i...

3 answers  ·  posted 1mo ago by matthewsnyder‭  ·  last activity 1mo ago by [Object object]‭

75%
+7 −1
Q&A Automatically install all packages needed

When running various Python scripts, I often need to do this annoying dance: $ python script.py ... ModuleNotFoundError: No module named 'foo' $ pip install foo $ python script.py ... Module...

3 answers  ·  posted 4mo ago by matthewsnyder‭  ·  last activity 1mo ago by Anonymous‭

Question python-3 pip
75%
+4 −0
Meta How are software recommendations handled?

How are software recommendations handled on https://software.codidact.com/ ? https://outdoors.codidact.com/ has a "gear recommendations" section, so it seems like Codidact is open to the idea. I s...

1 answer  ·  posted 4mo ago by matthewsnyder‭  ·  last activity 4mo ago by Lundin‭

Question discussion
75%
+4 −0
Q&A How to prevent Visual Studio Code from opening an extra blank window?

When I run code . in a directory, Visual Studio Code opens two windows. The first is empty, the second shows directory I was in as expected. I checked ~/.config/VSCode/Workspaces and there is only...

2 answers  ·  posted 4mo ago by matthewsnyder‭  ·  last activity 4mo ago by matthewsnyder‭

Question vs-code
71%
+3 −0
Q&A How should open source forks, with a mix of upstreamable and non-upstreamable commits, be maintained?

The ideal way is to separate the upstreamable and non-upstreamable changes. For example you could maintain two branches: public and private. All upstreamable changes are cherry picked to public an...

posted 9d ago by matthewsnyder‭

Answer
71%
+3 −0
Q&A How can a Python program send itself to the background?

Is it possible for a Python program to send itself in the background? For example, on Linux you can do nohup some_cmd & and any program will run in the background. Some programs also support s...

1 answer  ·  posted 1mo ago by matthewsnyder‭  ·  last activity 1mo ago by r~~‭

71%
+3 −0
Q&A Terms for types of functions with respect to side effects

I know that 1 is sometimes called a pure function - although apparently a pure function must also not vary when the input is constant. By negation, the other kind are called impure functions, alth...

posted 2mo ago by matthewsnyder‭  ·  edited 2mo ago by matthewsnyder‭

Answer
71%
+3 −0
Meta How can Q&A sites coexist with LLMs?

My take on this: Q&A sites used to fill two distinct roles, but only one of these (the more boring one that doesn't matter anyway) is usurped by LLMs. The interesting one is not yet in danger o...

posted 2mo ago by matthewsnyder‭

Answer
71%
+3 −0
Meta How can Q&A sites coexist with LLMs?

New LLMs like ChatGPT are now creating competition with Q&A sites like Codidact and StackOverflow. Moreover, this is parasitic: LLMs get "boosted" by Q&A sites because they can use them for...

1 answer  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 2mo ago by matthewsnyder‭

Question discussion
71%
+3 −0
Q&A How do I pull new changes in git submodules?

I have a git repository with some submodules. When the submodule repos get new commits on the remote, how can I pull them all?

0 answers  ·  posted 2mo ago by matthewsnyder‭

Question git git-submodule
71%
+3 −0
Q&A When using the compare function in Array.prototype.sort, how to avoid an element to be processed more than once?

Create a hash map and precalculate the sort key in it: // Set up: Create mock input let u = ['4', '16', '8', '2', '6']; function expensive_key_fn(x) { console.log("Doing expensive operation...

posted 3mo ago by matthewsnyder‭

Answer
71%
+3 −0
Meta Should I delete my trivial, lack-of-research question?

I don't think the question is trivial. Maven is very complex and confusing at first. The documentation is also quite something. It's not easy to figure out what's going on unless you already know. ...

posted 3mo ago by matthewsnyder‭  ·  edited 3mo ago by matthewsnyder‭

Answer
71%
+3 −0
Q&A When would one not want to return an interface?

I think the main reason to do this is when the interfaces fail to account for some subtlety of the contract between caller and implementation. For example, let's pretend for a moment that your use...

posted 4mo ago by matthewsnyder‭  ·  edited 4mo ago by matthewsnyder‭

Answer
66%
+2 −0
Q&A Alternatives to `EXPLAIN ANALYZE` for queries that won't complete

You can try to break up the query into CTEs, and then see if any of the individual CTEs are unusually slow. I am guessing the query is not just one select, but probably has subqueries, window func...

posted 14d ago by matthewsnyder‭

Answer