Software development terms and acronyms
What does “make your code DRY” even mean?! Here is a glossary of some common terms and acronyms used in software development.
What does “make your code DRY” even mean?! Here is a glossary of some common terms and acronyms used in software development.
Imagine you have a Python function that takes a list as a parameter.
def my_func(a_list):
...
And you would like to use mypy to indicate that a_list
is indeed of type List
, then you would have:
def my_func(a_list: List):
...
This is pretty...
Perhaps you have heard the advice that you shouldn’t use mutable default values in Python functions, here is why.
Here is a simple function (about as simple as you can get) that takes one parameter my_list
with a default value of [1, 2, 3]
and returns...
You may have seen the line (usually at the end of a Python script):
if __name__ == '__main__':
# some other code
And wondered what it does, and why it is there. After reading this you will never wonder why again!
In short,
In Python, the term package
has a very specific meaning that may be different than what you initially expect. Furthermore, a deep understanding of what exactly a package is doesn’t only allow you to correct your friends at parties (because you talk...
You are a conscientious developer and want to ensure that your Python program isn’t using too much memory, because ya know, it is the right thing to do. Or perhaps you are analyzing a large dataset and have already run out of RAM on your laptop… so...
Whether you have written 10 lines of Python or 10,000 lines it is always surprising when you get an AttributeError
exception in your code. By the end of this post you will be well on your way to learning why this happens and how you can fix it.
First...