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
I've recently discovered that it's not actually an error to have control reach the end of a non-void function without returning anything, it's merely undefined behaviour. I want to promote the rele...
Let's say I have a table with SQL statements in a column. I want to execute them all. create table sql_command( sql_text text ) I know how to execute one SQL statement using EXEC, but I wa...
Adapters are implemented in different layers based on their function. Input adapters (like REST controllers) are at the application's edge to handle incoming requests, while output adapters (like d...
One thing I'd like to add to Lundin and r.zwitserloot answers, which is something that I think is rather important: The "or" in programming is inclusive. The "or" in most languages (all those I k...
Inspired by https://meta.stackoverflow.com/questions/432242, and the relevant main-space questions. I have heard that C and C++ something called the "strict aliasing rule", which means for exa...
The main difference between Stack Exchange and Codidact is that SE loves to spawn off hundreds of sites with lots of overlapping scopes, whereas Codiact has the category system, which means that co...
Overview de Morgan's laws are rules of logic that allow you to transform one conditional expression into another, equivalent expression. Because (in Boolean logic) two negations cancel each other ...
We've had discussions before about the site's intended scope (range of permissible topics and questions), but for new users coming from the Stack Exchange network, I think it would be useful to dra...
Unless I am mistaken, myList.Select(a => a).ToList() initializes the resulting list to the capacity of myList.Count. Does myList.Where(a => true).ToList() do so or does it build up from the i...
First of all please note that polymorphism in C is clunky. It won't be pretty. We don't have this pointers, we don't have RAII, we don't have automatic constructors/destructors. Just accept that it...
Why The most important ideas behind virtual environments are: Since there is a separate site-packages, you can isolate the dependencies of your project. This is especially important for testi...
I have multiple installations of Python on my machine. When I run Python, what determines which installation is used? How can I control this?
I am trying to capture the content outside square brackets in groups, using this regex: (.*)\[.*?\](.*) And it works perfectly for a simple string like this: testing_[_is_]_done This is the...
I have already learned how to tell the Python interpreter to run my code, but the standard approach feels a little unsatisfactory. I want the user experience to be that my program starts with the a...
General This question and answer are adapted from my original write-up on Stack Overflow, which you may consult for more details. This version is crafted as to be a clear overview, without referri...
Contrary to popular belief, Pip is not part of the Python standard library - although it comes as part of a standard distribution of Python. Pip is developed and maintained by the arms-length Pytho...
This answer assumes only installations of the reference "CPython" implementation, as provided by the official website at https://www.python.org. Other installations - such as those provided by th...
A direct answer to your question of where the name comes from is the paper that introduced Applicative functors, Applicative programming with effects (PDF). Quoting from there: The idea is that ...
In setting android:configChanges in AndroidManifest.xml, what is the difference between colorMode and uiMode? I hear uiMode is for changes between light/dark modes, which sounds exactly what colorM...
"Invariant" isn't really the right word to search, though that's clearly not obvious. The idea is that we have covariant functors where if we have a -> b we can make f a -> f b, and contravar...
A root.components field need not exist, so I'm not sure what you're hoping for. Also, I don't know if it's an issue with your description or your code, but the code will only return mutable referen...
As of version 2.2, installing pyspark will also install spark, so you can run pip install pyspark or equivalent and use it in your normal python environment. The pyspark getting started docs also ...
I'm working on a background service/daemon for an embedded device, in Rust. The daemon manages several hardware components and these are structured using the Composite design pattern. The composite...
I have a hard time deciding if How to get conditional running cumulative sum based on current row and previous rows? should be closed or not. As mentioned in the comments, it was already flagged t...
Say I have two functions: FILE* get_input(const char fname[static 1]); FILE* get_output(const char fname[static 1]); And I wish to declare a function pointer and assign it the result of some p...