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
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.
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 ...
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 ...
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 ...
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...
Is software system design on topic for the software development site? For what I mean by system design, consider the "system design interview" commonly held these days when recruiting software eng...
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...
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...
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...
The assumption of 1k attempts/s is wishful thinking, as is the idea that a hacker will go on mail.google.com and try to guess your login (they would get a captcha after like 5 failed attempts). Pa...
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...
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...
Many languages discourage global variables. Why is this?
I don't actually know the answer to this, but I'll post a provisional one while we wait for someone wiser than me to chime in. I think this is a small subset of the real answer. Don't forget the...
I ran some Python code and it crashed with ModuleNotFoundError. What is the general approach for dealing with these situations?
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...
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...
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...
I have a git repository with some submodules. When the submodule repos get new commits on the remote, how can I pull them all?
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...
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...
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...
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...
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...
When you do: cd /some/path code . VS Code opens with that location shown in the "Explorer" sidebar. However, the state of the file tree and the currently open files will be the same as what wa...