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 #295092 |
When dismissing headless chrome and pandoc, there should be a bit more explanation. These are the two most popular tools and I'd expect them to work best.
Sounds like for chrome you've had some issues with crashes. This is suprising in that chrome is fairly mature software and its developer de... (more) |
— | 10 months ago |
| Comment | Post #294968 |
Fair point. If someone edits the question to instead say:
>After running these, X happens, but I was expecting Y.
I'll happily change to an upvote. (more) |
— | 10 months ago |
| Comment | Post #294968 |
This is easily answered by just running the commands. (more) |
— | 10 months ago |
| Comment | Post #294874 |
You could just run your own service on some other platform which monitors the upstream repo, and triggers the action of your own repo if any are detected. Even just a cron or systemd job on your laptop would work.
If there is a way to trigger from another directly, that would be interesting to... (more) |
— | 11 months ago |
| Edit | Post #294672 | Initial revision | — | 12 months ago |
| Answer | — |
A: Using an existing web server vs writing your own > Is there any advantage with the first path? It will be easier to switch web servers later. Gateway protocols are stable and compatible. Servers make it easy for existing apps to switch over. CGI frameworks avoid locking you into a single server. There's competition and you have freedom to pi... (more) |
— | 12 months ago |
| Edit | Post #294633 | Initial revision | — | 12 months ago |
| Answer | — |
A: Why is SQL usually written in CAPS? SQL is actually quite old, dating to 1973. It is also probably an evolution of similar previous languages. Seems like in those days, upper case was favored in programming. See BASIC, COBOL, Fortran. Assembly from those days also seems to use uppercase. My guess would be that computers back then h... (more) |
— | 12 months ago |
| Comment | Post #293542 |
It sounds like this post has adequately answered the original question ("Best practices for designing a central gateway/hub for microservices communication") but it doesn't help you much, because the real question you needed to answer was "how do I deal with microservices in a highly polyglot cod... (more) |
— | over 1 year ago |
| Edit | Post #293671 | Initial revision | — | over 1 year ago |
| Answer | — |
A: Best practices for designing a central gateway/hub for microservices communication Normally gateways just do routing and maybe load balancing. That's one well-defined job that can be done well. You are adding a second job, which is to be a universal adapter. An adapter would be easier to implement as a common library. Then you don't have to bloat the gateway with adapter log... (more) |
— | over 1 year ago |
| Comment | Post #293634 |
https://en.wikipedia.org/wiki/Factory_method_pattern (more) |
— | over 1 year ago |
| Edit | Post #293191 |
Post edited: |
— | over 1 year ago |
| Comment | Post #293079 |
Have you decided it's VPNs based on analyzing your traffic, or are you guessing? If you can share which VPNs you are seeing, that might be useful for other people. (more) |
— | over 1 year ago |
| Edit | Post #293191 | Initial revision | — | over 1 year ago |
| Answer | — |
A: Is it a bad idea to block proxies/vpns for interacting with my app? For contact form spam specifically, there is a more direct solution. If you use a form service like formspree.io it will already have built in spam filtering features. This isn't based around trying to detect bot access behavior, but a much simpler and more effective method of looking at the data... (more) |
— | over 1 year ago |
| Edit | Post #292394 | Initial revision | — | about 2 years ago |
| Answer | — |
A: Turn all changes after latest origin/main into a branch I handle this with: 1. Create a new branch with same commits 2. Delete commits from main branch In the situation shown, if you do `git checkout -b newbranch` it will create a new branch with the same commits. You then switch back to `main` and get rid of the commits on it with `git reset H... (more) |
— | about 2 years ago |
| Comment | Post #292312 |
I asked this while thinking of https://software.codidact.com/comments/thread/9971#comment-25064 (more) |
— | about 2 years ago |
| Comment | Post #292287 |
@#53078 That's neat! Worth posting as an answer to https://software.codidact.com/posts/292312 IMO (more) |
— | about 2 years ago |
| Edit | Post #292312 | Initial revision | — | about 2 years ago |
| Question | — |
How can I git checkout the previous HEAD? After switching to a different branch, `git checkout -` can move me back to the branch I came from. This is handy for times when I wonder "wait, what was that last branch again?" But this does not work for everything situation when you switch from commit to another. It works for branches, but ... (more) |
— | about 2 years ago |
| Edit | Post #292311 | Initial revision | — | about 2 years ago |
| Question | — |
What actually is a pytest fixture? 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 from computer science, or something pytest invented? (more) |
— | about 2 years ago |
| Comment | Post #292287 |
Thanks for the response. I'm pretty sure there is in fact a `git checkout -`, it works for me, although it might possibly be an alias I got from oh-my-zsh. It works analogous to `cd -`. However, I checked and although it can switch to the previous branch, it cannot switch to the previous HEAD bef... (more) |
— | about 2 years ago |
| Comment | Post #292275 |
Are you trying to run your whole server, and test the routes "realistically"? So for example if `/search` is supposed to do a DB query, will your test also set up that DB and check for a correct response? Or do you want to ignore Flask and its `@app.get` etc decorators, and only check that the me... (more) |
— | about 2 years ago |
| Comment | Post #292287 |
I generally agree with this answer and disagree with the downvotes, but I think saying that it will forget the last commit you were on seems a bit odd. The whole reason people run `git pull` is because they want to update their local files to match the remote. Of course it would change what commi... (more) |
— | about 2 years ago |
| Comment | Post #292287 |
Since the general pattern with git is that most CLI flags have a config equivalent (with matching name) this seems like an unnecessary tangent. If someone really wants to know, they can post a new question "How can I make git pull always do --ff-only?". (more) |
— | about 2 years ago |
| Comment | Post #292287 |
IMO in this context it's okay to assume the reader has heard of man pages, and even noticed the common idiom of identifying programs according to the title of their manual section. It makes no difference to say "git-pull(1)" or `git pull`.
That said, since you used `git pull` in your question,... (more) |
— | about 2 years ago |
| Comment | Post #292286 |
The question seems answerable if you assume that the OP is asking for any danger. (more) |
— | about 2 years ago |
| Edit | Post #292250 | Initial revision | — | about 2 years ago |
| Answer | — |
A: Reusing HTML without rewriting it 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 third party tools, and there's not yet a good alternative to HTML. Static site generators are those too... (more) |
— | about 2 years ago |
| Comment | Post #292219 |
I personally feel like a lot of this is security theater to greater or lesser extent, but your reasoning that "untrusted code shouldn't be running" isn't exactly accurate. It is possible that this is intended as a "forward security", so that the concern is your library X is used by trusted progra... (more) |
— | about 2 years ago |
| Comment | Post #292151 |
I think your example about writing is a great point. I was thinking that if there are multiple places to ask git questions, then every time you ask a new one, you have to *think* about which one it goes in. However, actually it becomes obvious if you remember context. "git in the context of writi... (more) |
— | about 2 years ago |
| Edit | Post #292136 | Initial revision | — | about 2 years ago |
| Question | — |
After git fetch, how to fast forward my branch? I did `git fetch` to quickly get latest commits. I did this instead of `git pull` so I could deal with merge conflicts offline. But my repository is still stuck on the old commit, and now `git pull` fails because I can no longer connect to the internet. How do I "activate" the changes that I fetc... (more) |
— | about 2 years ago |
| Comment | Post #292135 |
I posted this to document the current situation.
I actually wonder if it would be better to migrate all the git questions to poweruser, because they are about the use of a program and not coding. (more) |
— | about 2 years ago |
| Edit | Post #292135 | Initial revision | — | about 2 years ago |
| Answer | — |
A: Where should I ask git questions? Questions about Git should be asked in Software Development. This is a case of bringing the question to the experts. Git is a general purpose version control system, that can be used to version any type file, not just code. However, it is very popular with programmers, and many features were d... (more) |
— | about 2 years ago |
| Edit | Post #292134 | Initial revision | — | about 2 years ago |
| Question | — |
Where should I ask git questions? Where should I ask questions about Git? (more) |
— | about 2 years ago |
| Comment | Post #292063 |
Since the comments have been cleaned up, I can now respond as follows:
Doing low-level arithmetic with the character codes might indeed be slightly faster. However, since the speed up is only a constant factor and does not affect algorithmic complexity I personally find it uninteresting here. ... (more) |
— | about 2 years ago |
| Edit | Post #292063 |
Post edited: |
— | about 2 years ago |
| Edit | Post #292063 |
Post edited: |
— | about 2 years ago |
| Comment | Post #292061 |
Ah, so just 1k lines, ~15 chars each? I guess that's so small it really doesn't matter how you do it. I thought they would have tried to trip up the regex solutions :) (more) |
— | about 2 years ago |
| Edit | Post #292063 | Initial revision | — | about 2 years ago |
| Answer | — |
A: Parsing numbers from a text file You don't need a regex for this. To find `first` you can simply iterate through the line until you find a digit. To find `second` you can do the same but in reverse. This is more efficient than running a regex. For a problem as small as the example, it doesn't matter and arguably the regex add... (more) |
— | about 2 years ago |
| Comment | Post #292061 |
Usually in AoC the example is of trivial size, but then the real problem input is much bigger. For this, you must have posted the example only. Can you add some information about how big you expect the real problem to be? (more) |
— | about 2 years ago |
| Comment | Post #291977 |
Yes, I do use bat. But, in this case, I want to highlight output from my own Python program. If there's a way to use bat from inside Python, that would solve it. `python my_script.py | bat` wouldn't work though, it's an interactive program. (more) |
— | about 2 years ago |
| Edit | Post #291975 |
Post edited: |
— | about 2 years ago |
