- Details
- Written by: Jason Ross
When you develop with Python, you normally use PyPI as the source for your package dependencies whether they're third party or your own. Poetry is a great way to handle this administrative burden - at least it's better than using the regular pip
and requirements.txt
method.
But what if you don't want everything to come from PyPI? What if you want to implement your own private package index on your own network? What if you want to mix and match the sources on a package-by-package basis, so you can run development packages against your system?
Don't worry, it's pretty straightforward. Let's dive in...
- Details
- Written by: Jason Ross
Resource leaks are a problem that will sneak up on you during the execution of your program. Like their more famous relative, memory leaks, they're caused when you allocate something and then don't release it when you've finished with it.
Sometimes their effect is obvious. Your system might start and then crash immediately. That's good, because you're obviously calling the guilty code a lot, and that means you have a better idea where to look for the problem. Things get more complicated when the resource is only used occasionally.
- Details
- Written by: Jason Ross
Everyone who's developed with Python knows that you can run scripts from the command line using:
python myscript.py
and run applications or modules using:
python -m mymodule
This is all very straightforward, but how do you run Python scripts and applications directly from the command line WITHOUT using the Python command, like regular scripts and programs?
- Details
- Written by: Jason Ross
From the outside, it might look like becoming a professional of any kind is a straightforward, if expensive, process. Get a degree or similar qualification, get a suitable job and get lots of experience so you can progress. All very privileged and elitist, apparently.
If only it were that simple. But it's not.
Read more: Continuous Professional Development and Your Brag Book
- Details
- Written by: Jason Ross
Junior software engineers tend to use straightforward and basic development techniques; the sort of techniques you might find taught in books and on many courses. These work, but many of them tend to be inefficient and slow. With more experience comes an urge to make things better, and to mature as an engineer:
Read more: System Performance - Part 3 - Five Ways To Improve Performance
- Details
- Written by: Jason Ross
This is an error that turns up occasionally when you're developing code in Python. It started happening in some code I was working on recently, and all of the articles I found when I was looking for the cause said the same thing; that you're trying to assign something to a value that's None
. Probably something with an index or key, like a list or dictionary.
This didn't seem to match what I saw in my system at the time, but after looking much more closely it was right, although not for obvious reasons.
Read more: TypeError: 'NoneType' object does not support item assignment
- Details
- Written by: Jason Ross
What Is It?
Go is a statically-typed, general-purpose, compiled programming language. It also gets called "GoLang" because that was the original domain name for the language, but its real name it Go. It’s fairly easy to learn, so you can get started quickly. It’s also quite high level, so it’s easy to be productive with it.