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
I agree with other answers that a static site generator is the best approach. This is something that the original designers of HTML left as an open problem. The problem has now been "solved" by thi...
Suppose you have a situation where text is coming 1 word at a time, and you want to quickly show it to the user. "Quickly" is not in the sense of a performance constraint, but rather we don't want ...
I use git submodule foreach git pull to update my submodules. There's quite a few and it appears that foreach is updating them one by one, instead of in parallel. How can I do it in parallel?
I see 3 common ways to distribute such software: Statically linked binary Dynamically linked binary Source 1 means you compile everything into a standalone binary file. This bloats the file...
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 - s...
One way to do it is to simply clone the repo elsewhere and move the .git file to the current one.
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 p...
For future readers - based on input from Michael, and some research that was spurred by that improved version, this is the final config I arrived at: # https://gnutls.org/manual/html_node/certtool...
Best I could do was: cd /foo/bar && code --new-window . && code baz.txt The cd is not necessary but makes the command cleaner. I would still like to know if there's a cleaner wa...
Is there a way to easily insert today's date when editing a file in VS Code?
A global variable or object is in scope everywhere. That means it's possible to modify it from any part of your program. Imagine a mature program, made up of thousands of lines of code and dozens ...
If I ignore the example and answer the title generally: You would put the common logic into a third piece of software that becomes the dependency of both domains. For example, let's say you are wr...
Nothing in particular will go wrong. global is a valid and supported keyword, the code will work. There is no problem for the computer. The problem is for you. When something is global, it could b...
Pytest uses fixtures. Their docs explain what fixtures do: https://docs.pytest.org/en/stable/explanation/fixtures.html But what actually is a fixture? Is there a definition for it? Is this a term ...
"Demanding features" falls under an umbrella called "design". Design work doesn't show up directly in the commits (unless you maintain a design doc) but it is work nonetheless. Suggesting features ...
SQL is the right tool for this job. You say the data is already in a database, probably a SQL database You don't have to deal with moving the data out of the database and "into a programming la...
This is called a shallow clone and it's supported by a git-clone argument: git clone --depth 5
Hashing is lossy compression. You can't recover the input of a hash from the result. This would obviously not work as an encryption. How would you decrypt it, if half the message is destroyed :) ...
You could just move the files to a new folder and open that :) Alright alright here's a serious answer: I noticed that VSC automatically dereferences symlinks. So if you create a temporary new fol...
Everything you put on the line with def is global (global to the file, not as in the global keyword), so the (initially empty) list you create with param=[] persists and gets reused between calls t...
Amazon product URLs are often very long, but on experimentation it is revealed that the following pattern is sufficient: https://www.amazon.com/{dp|gp}/$ID ID is a 10-char string, which I'm gue...
Is there a Python serialization format that has capabilities similar to Pickle, but is text based? The problem I always have with pickle is that it's binary, so I can't manually view or edit the d...
Dependency conflicts are the problem pipx aims to solve, in the context of installing CLI programs. When you install a Python package, by default pip will also install their dependent packages so ...
Since you didn't mention memory, I'll assume O(N^2) is acceptable. Setup pseudocode: for every p1, p2: ln = line(p1, p2) points_on_line[ln.m, ln.c] += [p1, p2] If there are at least ...
When I set up my object mappings with SQLalchemy, everything works well enough. It even creates the tables for me if they don't exist. However, if I decide to add/remove columns (aka fields) from ...