Docker is a fantastic tool that makes our lives much easier offering us standardization, productivity, efficiency, maintainability and compatibility of our code. It allows us to continuously and rapidly deploy and test our code and it is platform-independent.
If you are unsure of what Docker is, what to use it for or how to use it; this is the article for you! I’ll try to give an explanation that’s as clear as possible for people who are new to Docker. At the end of this article you:
If you are not working with migrations in your database you’re missing out. Like Git manages changes to source code, you can use migrations to keep track of changes to your database. Execute and revert changes and get your database back into a previous state.
Setting up migrations is easier than you think and the advantages are huge. Migrations are database-independent, offer one source of the truth, track changes and can even seed your database with some data. When you’ve read this article you’ll be able to:
You know the basics of Docker, now let’s really automate things. We’re going to create a file that’ll hold the configuration of all of our application’s services. Then, with a single command, we can then create and start all services from this config file!
In this article, we’ll get into how this all works and how to use Compose. We’re going to do this with the help of a detailed example for a multi-container application. We’re going to spin up multiple, interconnected and expandable services. You can use this walkthrough as a guide for your own projects. …
If you work on a lot of different projects then you’ll recognize the dependency-hell of multiple projects requiring multiple versions, of multiple packages. You can’t just install all packages globally, how do you keep track? Also what happens when projectA needs PackageX_version1 and ProjectB needs PackageX_version2? How do you stay sane when everything is one big jumbled spaghetti-like mess of interdependency?
In this article I’ll try to convince that using a venv (virtual environment) is the way to keep dependencies separate from other projects. We’ll start with defining what a venv is, what it does and why you need it…
Quick confession: since it’s introduction in Python 3.8 I’ve never used the walrus operator that much. When it was first introduced I dismissed it as syntactic sugar and couldn’t really find a reason to use it. In this article we’ll find out whether it just improves our code’s readability or if it’s more that that. We’ll go through some practical use-cases for this obscure operator that’ll make your life easier. At the end of this article you’ll:
Let’s start at…
You’ve probably seen the Matrix-like screens of a terminal before. Maybe some guy in a movie, wearing a black hoody, sitting in a dimly lit room, grunting “I’m in” hacking the Pentagon or something like that.
The reality, sadly, isn’t that cool. On the other hand the ability to work with a terminal is an invaluable tool in our toolbelt. Whether you are working as a developer or data scientist; a lot of software we use on a daily basis depends on the terminal. Some familiar ones include:
Imagine going to a restaurant. You sit down, look at the menu and select some dishes. Then you walk to the kitchen, tell the chef what you want to eat and wait for him to finish before taking your meal back to your table. What’s going on in this weird restaurant?
An application without an API is much like a restaurant without waiters. In restaurants you don’t have to communicate with the kitchen and wait for your order to enjoy a meal. In the same way a website doesn’t have to know how to communicate with your database for example…
In the previous part we’ve set up our migration tool, configured it, created some migrations and even seeded some data in our newly migrated tables. If you don’t know what I’m talking about, please check out this article. In this part we’ll focus on adding more functionalities to our tables. You can find the repository that we’ll build on in this article here. When you’ve read this part you’ll be able to:
With a MERGE you can can ‘sync’ two tables by executing an insert, delete and update in ONE statement. A MERGE is much more than that though; it offers you a wide range of options in comparing and syncing tables. You can even keep track of the output of the merge. We’ll get into all of them in this article. The main reason for a merge:
Transactions are responsible for guaranteeing data validity despite errors and they are essential tools in your SQL-toolbox. All queries within a transaction either succeed or all fail; if the last one fails then the queries before get rolled back (gets undone). In this article you’ll learn how to use a transaction but first we’ll get into when to use a transaction:
In some cases you need to perform two operations in your database that cannot be done at once (like with a MERGE INTO, UPDATE INTO, or DELETE INTO) but they still depend on each other. If either of them…