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 |
---|---|---|---|---|
Edit | Post #289319 | Initial revision | — | over 1 year ago |
Answer | — |
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, although this seems to me biased towards the idea that side effects are bad. I've seen procedure used f... (more) |
— | over 1 year ago |
Edit | Post #289318 |
Post edited: |
— | over 1 year ago |
Edit | Post #289318 | Initial revision | — | over 1 year ago |
Question | — |
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. The classic example is `print(x)`, which has a useful side effect and no output. It seems to me tha... (more) |
— | over 1 year ago |
Edit | Post #289316 |
Post edited: |
— | over 1 year ago |
Edit | Post #289316 |
Post edited: |
— | over 1 year ago |
Edit | Post #289316 | Initial revision | — | over 1 year ago |
Question | — |
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 `xi`, such that `yi = f(xi)` and the `yi` comprise the output list `Y`: ```python y = multiprocessing.Pool().map(f, x) ``` Is the... (more) |
— | over 1 year ago |
Comment | Post #289289 |
Indeed! I might as well share the `gmto` script I've been using:
```
#!/usr/bin/env sh
#
# Checkout to the specified branch and merge the current one into it
# with a merge commit. Usage:
#
# gmto <target-branch>
#
# Intended for a workflow like:
# 1. Develop feature in branch my-feature
... (more) |
— | over 1 year ago |
Comment | Post #289299 |
Wouldn't that person still need to check out the feature branch first, before merging it? I would expect that people don't blindly merge other people's branches with such zeal that even a checkout is too flow breaking. (more) |
— | over 1 year ago |
Edit | Post #288670 |
Post edited: |
— | over 1 year ago |
Edit | Post #289289 | Initial revision | — | over 1 year ago |
Question | — |
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", where X is often something like `master`. Normally, if you're merging, you would expect that s... (more) |
— | over 1 year ago |
Comment | Post #289170 |
There also seems to be a strange but widespread cargo cult about contracts, where people think just because professional lawyers write very obtuse and wordy contracts, that if they write one in simple language it's somehow not valid. In reality there is nothing wrong with writing a contract in your o... (more) |
— | over 1 year ago |
Comment | Post #289170 |
As for the legalities - a lot of people act like copyright is some magic spell that works automatically but it doesn't. There is no copyright police that will come stop me automatically as soon as I use your work without proper license, the way they would stop me from stealing your car even if you di... (more) |
— | over 1 year ago |
Comment | Post #289170 |
That's a good point - CC BY would "catch" the LLMs on attribution. However it has the side effect of also requiring humans to do it. Personally speaking, I don't care about making people do the busywork of citing my posts just for some trivial copy and paste from them. If I cared to take credit I'd p... (more) |
— | over 1 year ago |
Comment | Post #289250 |
I would also like to know. Although I feel like this is somewhat moot - most people who care about navigating with the keyboard use more advanced tools like Vimium, Qutebrowser or Lynx rather than relying on just tabbing. (more) |
— | over 1 year ago |
Comment | Post #289255 |
If anyone is wondering, you can do `f"{8} cans of {'spam'}"` as well. F strings can take strings, you just have to leverage the fact that there are two alternate quote styles in Python. Normally, things you pass to f-strings would be variables though, otherwise it's easier to just write `"8 cans of s... (more) |
— | over 1 year ago |
Edit | Post #289255 |
Post edited: |
— | over 1 year ago |
Edit | Post #289255 |
Post edited: |
— | over 1 year ago |
Edit | Post #289255 | Initial revision | — | over 1 year ago |
Answer | — |
A: How can I build a string from smaller pieces? `+` is string concatenation and only be applied by strings. Non-string operands like numbers or class instances must be converted to strings using `str()`. That's all there really is to it, except Python has some syntactic sugar that hides this in certain situations. When I have a list `u` of thin... (more) |
— | over 1 year ago |
Edit | Post #289162 |
Post edited: I think it would be easier to discuss individual points if they were numbers rather than bullets. |
— | over 1 year ago |
Suggested Edit | Post #289162 |
Suggested edit: I think it would be easier to discuss individual points if they were numbers rather than bullets. (more) |
helpful | over 1 year ago |
Edit | Post #289172 | Initial revision | — | over 1 year ago |
Answer | — |
A: 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 of being supplanted. There's always been two types of questions on StackOverflow: Trivial, highly spec... (more) |
— | over 1 year ago |
Edit | Post #289171 | Initial revision | — | over 1 year ago |
Question | — |
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 training, but Codidact does not benefit from AI models for example because AI content is not allowed here. D... (more) |
— | over 1 year ago |
Comment | Post #289159 |
You might want to add the official link about the ChatGPT user agent: https://platform.openai.com/docs/plugins/bot (more) |
— | over 1 year ago |
Edit | Post #289170 | Initial revision | — | over 1 year ago |
Answer | — |
A: Should we disallow ChatGPT-User crawler (and others) from scraping Software Codidact? `robots.txt` amounts to politely asking people to please not crawl you, so I wouldn't expect it to do much. At the same time, you might as well ask politely, to avoid giving the impression that you do want them to crawl you. Letting Google crawl you is fine because Google actually sends traffic ba... (more) |
— | over 1 year ago |
Comment | Post #289155 |
Actually I did, and I also searched online, which is why I'm confused. There appears to be your way, and also `git submodule update`, and also `git submodule foreach git pull`, and I can't figure out which way is "best" or what the differences are. (more) |
— | over 1 year ago |
Edit | Post #289156 | Initial revision | — | over 1 year ago |
Question | — |
`git submodule foreach git pull` in parallel 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? (more) |
— | over 1 year ago |
Edit | Post #289155 | Initial revision | — | over 1 year ago |
Question | — |
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? (more) |
— | over 1 year ago |
Comment | Post #289009 |
Anyways, I guess it's a moot point since clearly the community has decided this is not an interesting topic for the Software section. (more) |
— | over 1 year ago |
Comment | Post #289009 |
That doesn't really make sense to me. The answer doesn't have much to do with statistics, all the statistical work would be done at the training stage which I am trying to avoid. The stats would be embedded in the pre-trained model. This question about wrapping existing software in my own code, so it... (more) |
— | over 1 year ago |
Comment | Post #289112 |
I edited the question to make it clearer why the docs sound (at least to me) like it can be done. (more) |
— | over 1 year ago |
Edit | Post #288982 |
Post edited: |
— | over 1 year ago |
Comment | Post #288623 |
I think the discussion of how to implement a comprehensive tax calculator is a separate issue from this question. Unless I've missed something, OP does not say that he is specifically trying to build a TurboTax alternative. The examples he gave sound like some kind of billing/transaction processing s... (more) |
— | over 1 year ago |
Edit | Post #289047 |
Post edited: |
— | over 1 year ago |
Comment | Post #289047 |
I thought it was freeware, not FOSS! I would still like to find a solution for VSC, though. (more) |
— | over 1 year ago |
Comment | Post #289091 |
Why exactly do you find it clumsy? Is it just because there are 2 steps and you would have expected 1? (more) |
— | over 1 year ago |
Comment | Post #289092 |
Does this also delete tag and create it again at another commit? (more) |
— | over 1 year ago |
Comment | Post #289085 |
The question is a bit confusing because the requirement is not clearly stated and the code examples are complex and hard to follow. Can you edit the question and say what arguments exactly the function should take, and what it is expected to return? We can then provide an implementation. (more) |
— | over 1 year ago |
Edit | Post #289047 |
Post edited: |
— | over 1 year ago |
Edit | Post #289047 | Initial revision | — | over 1 year ago |
Question | — |
"Move symbol" refactor for Python in Visual Studio Codium Is there a way to add support for "move symbol" in Python code for VS Codium? PyCharm can do this, but I am looking for a VSC solution. PyLance can do this, but PyLance itself is closed source, and does not work in Codium after version 2023.6.40. VS Codium supports Jedi, but from what I coul... (more) |
— | over 1 year ago |