Programming Leftovers
-
Runtime asserts are not free
One might object that you can choose to only enable assertions for the debug version of your binary… but this choice is subject to debate. Compilers like GCC or clang (LLVM) do not deactivate asserts when compiling with optimizations. Some package maintainers require all asserts to remain in the release binary.
-
Splitting and joining using tree-sitter
You can use this to split/join arguments in a function definition or call into multiple lines or split/join items in a json doc.
You might think it is a simple job that a "split by comma" can do, but you would be wrong. What if you have a , in a string argument or if one of the arguments is a function that has arguments inside it or a list within a list. What if the user just puts a lot of empty newlines in between? The package function deals with all of this by letting things built by smarter people (tree-sitter) deal with it. We just ask it to get us the list of arguments which we arrange how it supposed to be.
-
Software Architecture in a Cloud-Native World
What exactly do software architects do? When you think of a software architect, you think of a primarily technical position within the development organization. In many people’s minds, a software architect is just a title applied to the most senior developers working on a project. After all, if you are
-
PyCon Italia 2023 PyCon Italia 2023 logo
Keeping in mind the Pythonic principle that “simple is better than complex” we’ll see how to create a web map with the Python based web framework Django using its GeoDjango module, storing geographic data in your local database on which to run geospatial queries.
-
Quick tests using the Python interpreter
One thing I love about Python is how it can be used to very quickly prototype or try stuff thanks to its interactive interpreter, also often called REPL.1 In this article, I'll show you how I use it to run quick tests and verify assumptions.