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.
Search
Can anyone explain to me why my Haskell function gives rise to a type-definition error? Originally, I wrote the following function to subtract one from the first n elements in a list: dec_first :...
The modulo operator is a binary (2 argument) operator which returns a single value, and can be used for both numeric calculations and strings: x = 5 % 2 print(x) # prints "1" y = "hello %s" % ...
Here's a JSON log formatter for Python. I want to be able to log details of exceptions (and have some capability to debug-by-logs). I want to be able to log extra data in JSON format (in addition...
Your own questions If the original question was your own, then you own it and there is no restriction on also posting it to Codidact. Other people's answers For a question or answer posted by so...
I can't speak for the people who designed it, but I guess it was made this way because you can merge multiple branches all at once. Let's say I've created multiple branches: C---D => ...
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...
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...
You can use pipreqs It will automate the generation of a requirements file. This can spare you the annoying dance without necessarily mixing environment setup and script execution.
I have a dataset of car bookings like this: car_id user_id 1 1 2 1 1 2 3 3 1 2 3 3 In this dataset, two separate groups/sets of cars and users...
The pip command accepts an option --index-url to specify the primary index (defaults to PyPI) and zero or more --extra-index-url options to specify secondary indices. So for your use case, try pip...
When reading about various operators used by programming languages, the term "short circuit behavior" is often used. For example in this C code: int a = 0; a && b++ Someone explained t...
It looks like your vertexSizeBytes stride variable doesn't include uvSize. To figure things like this out, use this kind of logic: The shape of the image isn't a square, so something is wrong wit...
What specific algorithm makes it possible to scramble data into an unrecoverable form, yet still be usable for its intended purpose? It isn't any one specific algorithm. There are many differe...
They are tools for different audiences. pipx does not replace pip. In some more detail, pip answers the question "As a Python developer, how can I install Python packages and their dependencies" w...
No, you can't use and for this. In Python, a and b always, always, always means b if a else a. It cannot be overridden and cannot mean anything else. Likewise not, and any other boolean keywords, ...
Among other things, a URL consists of a host and a path: I was wondering (and couldn't find anything) if there's a name for the combination of host and path. Is there a name for these: examp...
I want to write one or more self-answered Q&As on the topic of text encoding in Python, to serve as canonicals and preempt future lower-quality questions. I can think of the following things th...
Import modules rather than names first to avoid a circular reference in the import statements; then use forward declarations, as before, to avoid a circular reference in the type annotations - like...
This feature has not yet been implemented. However, there is a feature request on Codidact Meta that requests it for all communities. You (and anyone else who would like to see this) can add your ...
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...
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...
No. Terms like "too generic", "unclear", "too broad", "off topic" are absolutely not euphemisms for "stupid question, go away". They mean what they say; and when they are used Somewhere Else, mult...
In git you can put your current changes aside for a moment with git stash. This is really neat but what often ends up happening is that you forget what was in there, and what was the state of the b...
Let's say I have a client/server application with a data structure on the server side: type User = { name: string; superSecretGovernmentIdNumber: string; }; These fields are both non-nul...
This sounds to me like someone had a problem once and they've decided upon a somewhat silly way to keep that from ever happening again. The big repository hosts have a different way of addressing ...