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.
Posts by Karl Knechtel
Here is my current thinking on the matter. Regarding questions/facets that are "two sides of the same coin" - encoding vs decoding the data, reading vs. writing files - I think they should be ...
Aliasing is perhaps better understood as a property of assignments through pointers, not of the pointers themselves. First, let's consider the reasoning behind applying the optimization to the fir...
Understanding the representation of text in C "Text" is a high level abstraction that C doesn't properly support Fundamentally, C does not have any built-in "string" type. It arguably doesn't eve...
Using filtered products of candidates, over combinations of first letters Let's consider the n=2 case first. (For higher n, we can use the same sort of recursive generator approach as in my other ...
Using a recursive generator There isn't anything like a built-in solution for this algorithm, but it's easy to express the desired output recursively. A valid output combination of k-many inputs l...
Why the installed Python isn't found By default, Windows installers for Python install Python in a folder that is not listed in the PATH environment variable. This means that executables in that f...
I understand the benefits of virtual environments in general, and specifically I want to use a virtual environment so that I'll have access to Pip without exposing the system Python (i.e., included...
Problems like this occur, fundamentally, because there is more than one Python installation on the system, and the system is configured in a way that pip installs for a different Python than the on...
Choosing an environment for third-party libraries The short version of the answer is: Python installations don't normally share libraries because there are too many ways it could go wrong; general...
I have multiple installations of Python on my machine. I already know how to choose one to use to run for my code - and therefore, I could also solve the problem for third-party application code. ...
Sometimes when I try to install a third-party library for Python, I get an error saying that either distutils, or some part of it like distutils.core or distutils.util, could not be found. It's sho...
PEP 8 Four-space indentation is the community standard. There are many strategies for wrapping long lines; I have found that it's often best to just use temporary variables to avoid wrapping lines...
First store the universe of potential elements as a sequence, then encode each set as an unsigned integer interpreted as follows: if the 1s bit in binary is set (1), the set contains the 0th elemen...
I need to do a lot of calculations involving sets. There are relatively few values in the "universe" of candidates that could appear in any of the sets, but potentially very many such sets (they mi...
I know that I can make Python code run starting from the script, but this still requires the user to have Python installed (and will still rely on configuring the system so that it can find Python ...
Normally, Python is compiled, but it compiles to bytecode, not to your computer's native instructions. This bytecode is cross-platform, but it can't be used by the CPU directly - it can't be turned...
Every time I run a program I'm used to, I get a bunch of import errors, and have to reinstall the dependencies. As you're presumably aware, the fundamental problem is that each Python installa...
I installed Matplotlib and tried a simple demo, but I got a warning message and no plot showed up: >>> import matplotlib.pyplot as plt >>> plt.plot([1,2,3],[4,5,6]) [<matplo...
Matplotlib uses a backend to render the plot. Some backends are "GUI backends", meaning that they can render into a window that displays on your screen. Others are "non-GUI backends" which can only...
I tried installing Python on an old computer running Windows 8[1]. I know for a fact that there was never any previous installation of Python on the machine. The installation appeared to be success...
Conceptually, applying a function along an axis of a DataFrame (i.e., applying it to each row or column) inherently produces a Series: a two-dimensional result is collapsed to a one-dimensional res...
- ← Previous
- 1
- 2
- 3
- 4
- Next →