- 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.
- Details
- Written by: Jason Ross
One of the principles of software development is “Resource Allocation Is Initialization", or RAII. This is useful as it avoids uninitialized values in your code, because all values are initialized when they're declared. It's a great way of avoiding problems with uninitialized references, because there aren't any!
You might not know it as RAII, but there's always the feeling that when you declare something you should initialize it, if only to stop the code linter from complaining.
Like anything else though, it's easy to go too far with this. When the objects in your system take an appreciable amount of time to create, and you want a lot of them, you'll find your application slows to a crawl.
Lazy Evaluation can improve performance dramatically!
Read more: Improve Your System Performance With Lazy Evaluation