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 #290007 |
I agree with both points in this. In particular, SO sometimes permits a very narrow range of discussion about "best" if you lock the criteria down very tightly. But to provide comprehensive evaluation criteria, you have to be pretty expert to begin with. When you get a total noob asking things like "... (more) |
— | over 1 year ago |
Edit | Post #290001 | Initial revision | — | over 1 year ago |
Answer | — |
A: What software architecture are available for developing an application with multiple business domains that only share some common aspects? 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 writing software for a company that has two domains of business: They sell construction tools and materi... (more) |
— | over 1 year ago |
Comment | Post #289948 |
I think the question uses "program" in the sense of "service product offered to humans", not "piece of software". It also sounds like a lot of the question is about databases (I know there's parts that mention apps as potential solutions).
This makes it a bit confusing which type of "program" you'... (more) |
— | over 1 year ago |
Comment | Post #289891 |
How am I going to `mv` or `cat` the stuff that comes out of that? (more) |
— | over 1 year ago |
Comment | Post #289985 |
True. But remember I am proposing that instead of answers like "you have a typo in line 4", we should favor answers like "here is how you can find that a typo caused your bug...".
Anyway, why the preoccupation with typos? There is a lot more to debugging than finding typos. (more) |
— | over 1 year ago |
Edit | Post #289985 |
Post edited: |
— | over 1 year ago |
Comment | Post #289985 |
Like many here, most of my experience with QA sites indeed comes from SO.
I know it is not against the rules here per se. However, I have often observed people in meta discussions to suggest various types of "overly localized" questions are undesirable. There does not seem to be much gained by pro... (more) |
— | over 1 year ago |
Edit | Post #289985 | Initial revision | — | over 1 year ago |
Question | — |
Suggested special feature: Clinic/case study We have special features/sections on Codidact, so maybe this is a nice use for them. What if we had a section named something like "clinic" or "case study" or "debugging"? (name suggestions welcome) The point of this section would be specific debugging or troubleshooting help questions. The for... (more) |
— | over 1 year ago |
Edit | Post #289914 | Initial revision | — | over 1 year ago |
Question | — |
Can you run Python code on text in VS Code? In VS Code, is it possible to run Python code on the text being edited? I realize that I can save my text, create a `.py` file, switch to a terminal (including VS Code's own terminal) and run the `.py` file. However, some other editors like Gedit support running ad-hoc Python scripts to process th... (more) |
— | over 1 year ago |
Comment | Post #289909 |
I know there are standalone programs for working with regexes specifically. I am not asking for those, I want a VSC extension specifically.
Posting those programs probably **will** be useful to someone, so they should go in a separate question. However, I don't want to create yet another unanswere... (more) |
— | over 1 year ago |
Edit | Post #289909 | Initial revision | — | over 1 year ago |
Question | — |
Advanced Regex extension for VS Code VS Code supports regex search, but the search/replace UI is just a tiny dialog box. It's okay if you know regex well and the expression is not complex, but when trying to apply complicated expressions the usability is not good. I often end up having to "develop" the regex in regexr.com, which means I... (more) |
— | over 1 year ago |
Edit | Post #289907 |
Post edited: |
— | over 1 year ago |
Edit | Post #289907 |
History hidden: Detailed history before this event is hidden because of a redaction. |
— | over 1 year ago |
Edit | Post #289907 |
Post edited: |
— | over 1 year ago |
Edit | Post #289907 | Initial revision | — | over 1 year ago |
Question | — |
How to overwrite lines of STDOUT in Python? `print()` normally adds text to STDOUT, it does not erase existing text. https://linux.codidact.com/posts/289869 describes various ways of doing the overwrite in shell scripts. How can you do this in Python? (more) |
— | over 1 year ago |
Edit | Post #289906 |
Post edited: |
— | over 1 year ago |
Edit | Post #289906 | Initial revision | — | over 1 year ago |
Question | — |
How to open VS code with a particular path expanded? When you do: ```sh 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 was remembered from the last session. Let's say that last time I was editing `/some/path/fo... (more) |
— | over 1 year ago |
Edit | Post #289891 | Initial revision | — | over 1 year ago |
Question | — |
How to provide meaningful names for emails in Maildir? I am writing some scripts that operate on emails in Maildir format. A lot of things are easy in this format, but the filenames are absolutely incomprehensible. For example, one script moves mails between folders based on some rules. It has a dry run mode which simply says which mails would be move... (more) |
— | over 1 year ago |
Edit | Post #289889 | Initial revision | — | over 1 year ago |
Question | — |
Regex for simplifying Amazon product URLs 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 guessing is the ASIN. I want to parse out the long URLs into the minimal form. What exactly is ... (more) |
— | over 1 year ago |
Edit | Post #289887 | Initial revision | — | over 1 year ago |
Question | — |
Determine which script is slowing the page down in Firefox A page is very slow and laggy in Firefox. I am certain it's one of the many Javascripts slowing it down. Out of curiosity, I'd like to figure out which script is creating the heaviest load. Note that I also have some blocked with uBlock origin, and I don't want to unblock those - I want to see whi... (more) |
— | over 1 year ago |
Edit | Post #289884 |
Post edited: |
— | over 1 year ago |
Edit | Post #289884 | Initial revision | — | over 1 year ago |
Answer | — |
A: Shortcut for inserting today's date in VS Code You can use snippets for this. In the example below, when you type `today` and trigger completion (usually Ctrl+Space) you will see an option to insert the date by pressing Enter. Snippet code: ```json "today ISO": { // applies everywhere "scope": "", "prefix": "today", "body": [ "$CU... (more) |
— | over 1 year ago |
Edit | Post #289883 | Initial revision | — | over 1 year ago |
Question | — |
Shortcut for inserting today's date in VS Code Is there a way to easily insert today's date when editing a file in VS Code? (more) |
— | over 1 year ago |
Comment | Post #289860 |
This works also, and is better. It doesn't open files that were open in the previous session, which I like. (more) |
— | over 1 year ago |
Edit | Post #289858 | Initial revision | — | over 1 year ago |
Answer | — |
A: VS Code: How to open a file and folder in a new window? Best I could do was: ```shell 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 way. (more) |
— | over 1 year ago |
Edit | Post #289857 | Initial revision | — | over 1 year ago |
Question | — |
VS Code: How to open a file and folder in a new window? I've figured out that `code --new-window /foo/bar/baz.txt` will open `baz.txt` in a new window. But when I do this, it says "no folder opened" in the file explorer pane. That makes it hard to work with other files in the same directory. How can I also set the folder when opening a file like this? ... (more) |
— | over 1 year ago |
Comment | Post #289828 |
I don't disagree that poorly made batteries can be dangerous, but I think that maybe an extended discussion of battery discharge related hazards can be moved to a more appropriate site, like electrical engineering, rather than a question about boolean operators in programming.
This appears to have... (more) |
— | over 1 year ago |
Comment | Post #289828 |
I know, I just think you're hamming it up a little too much :)
Decades ago it might have been like you describe, but not anymore really. Especially in electronics, where you work with low voltages, it's hard to make things explode.
Battery packs these days do have intelligence with built in cir... (more) |
— | over 1 year ago |
Edit | Post #289837 |
Post edited: |
— | over 1 year ago |
Edit | Post #289837 |
Post edited: |
— | over 1 year ago |
Edit | Post #289837 |
Post edited: |
— | over 1 year ago |
Edit | Post #289837 |
Post edited: |
— | over 1 year ago |
Comment | Post #289828 |
Usually cables don't blow up from a short, especially if you're doing layman things. Shorts will allow electricity to be consumed rapidly. With grid AC (as in house wiring) there are already circuit breakers that will automatically turn off when current goes too high. With batteries, the battery will... (more) |
— | over 1 year ago |
Edit | Post #289837 |
Post edited: |
— | over 1 year ago |
Edit | Post #289837 | Initial revision | — | over 1 year ago |
Answer | — |
A: What is the meaning of "short circuit" operators? It means the program can give up early if checking the rest of a boolean expression is pointless. For example, naively to evaluate `p and q` you must check the value of both `p` and `q`, and then do the `and` operation. However, if you are a bit more clever, you'll see that when `p` is `False`,... (more) |
— | over 1 year ago |
Edit | Post #289804 | Initial revision | — | over 1 year ago |