Programming

  • A guide to type checking in python Oct 04, 2024 15 minutes 3036 words #programming #python #typing

    Python is often known for its dynamic typing, which can be a drawback for those who prefer static typing due to its benefits in catching bugs early and enhancing editor support. However, what many people don’t know is that Python does actually support specifying the types and it is even possible to enforce these types and work in a statically type-checked Python environment.…

  • Changing a software license Oct 12, 2023 10 minutes 2085 words #programming #licensing

    Figuring out how to properly and legally change the software license of your project can be a difficult task, and yet it’s incredibly important that you do this right, as you might run into some legal issues otherwise, which I’m sure you’d like to avoid.…

  • Concurrency and Parallelism Nov 17, 2021 18 minutes 3706 words #programming #python

    Concurrency is an exciting topic that’s becoming more and more important, yet I see so many people that aren’t very familiar with topic and it’s possibilities. I’ll try to explain the differences between threading, multiprocessing and asynchronous run. I’ll also show some examples when concurrency should be avoided, and when it makes sense.…

  • Interpreted vs Compiled Languages Sep 09, 2021 13 minutes 2661 words #programming

    You’ve likely seen or heard someone talking about a language as being interpreted or as being a compiled language, but what’s the difference? When should you pick one or the other when deciding which language to use for your projects and does it even matter?…

  • JSON vs Databases Sep 20, 2021 9 minutes 1915 words #programming

    I’ve seen tons of projects incorrectly use a method of storing data for their use-case. In most of the cases this was an issue about using JSON instead of a database, but I did also see some people using databases where JSON should’ve been used, or even some completely different format, such as simple plain text, or something more similar to JSON, such as YAML.…

  • Making great commits Apr 17, 2023 22 minutes 4634 words #programming #git

    A well-structured git log is key to project’s maintainability; it provides insight into when and why things were done, for future maintainers of the project, … and yet, so many people pay very little attention to how their commits are structured.…

  • Managing (multiple) git credentials Jul 27, 2022 20 minutes 4096 words #programming #git

    Many people often find initially setting up their git user a bit unclear, especially when it comes to managing multiple git users on a single machine. But even managing credentials for just a single user can be quite complicated without looking into it a bit deeper.…

  • Removing duplicates from lists Aug 31, 2021 11 minutes 2266 words #programming #python

    In programming, we often need to handle removing duplicates from an array-like structure. While this may seem like an arbitrary and easy question, that can be solved relatively simply, that’s not necessarily always the case. While it may be easy to solve for the obvious case of things like a list of numbers, it’s not so easy if we need to deal with non-hashable objects, while keeping the algorithm runtime relatively low.…

  • Software Licenses Jan 23, 2022 23 minutes 4843 words #programming #licensing

    I’ve recently been coming across more and more developers which had no idea about the importance of software licensing, how it works and what options there even are. What’s worse, this lack of knowledge means people often end up not choosing a license at all, thinking it means anyone can just use that code without limitations, when in fact no-one can.…

  • Software licensing documents (CLA and DCO) Apr 03, 2023 10 minutes 1920 words #programming #licensing

    In many projects you’ll find out that before you’re allowed to contribute something to an open-sourced, you’ll be required to sign a document requiring certain things. This is mostly the case of contributing to projects maintained by big companies, but it can be seen in smaller projects too sometimes.…

  • Type variables in python typing Oct 04, 2024 7 minutes 1318 words #programming #python #typing

    Python’s type hinting system offers great flexibility, and a crucial part of that flexibility comes from Type Variables. These allow us to define generic types, enabling us to write functions and classes that work with different types while maintaining type safety.…

  • Typing generics and variance Oct 04, 2021 18 minutes 3703 words #programming #python #typing

    Generics and variance are advanced concepts in Python’s type system that offer powerful ways to write code that is flexible and reusable across different types. By understanding these concepts, you can write more robust, maintainable and less repetitive code, making the most of Python’s type hinting capabilities.…

  • Using multiple licenses in a single code-base Dec 10, 2023 9 minutes 1709 words #programming #licensing

    Dual-licensing, or multi-licensing is the practice of distributing source-code for a single project under two or more licenses. The general idea is pretty simple, however I’ve seen many people misunderstanding some important aspects when it comes to it. There’s especially a lot of confusion when it comes to multi-licensing a repository with a copy-left license, so in this article, I wanted to shed some light onto this practice, to hopefully make you a bit more confident in understanding, and maybe even maintaining multi-licensed projects.…

  • When to use Unit-Tests? Aug 24, 2021 4 minutes 679 words #programming

    We often talk about the importance of testing our programs, however many people don’t mention at which point it is necessary to start and why sometimes it could just be a waste of time to implement unit-tests. # The purpose of unit tests The reason we use unit tests is simple, during our development, we’re often actively changing things around and this has the potential to affect some unrelated functions in an unexpected way.…