DevOps in Learning: How to Practice from Day 1
Are you just starting your journey into the world of Data or Programming?
Whether you’re learning data, software development or any other related field, you may think it’s too soon to consider DevOps practices. You might believe it’s going to be a while before you have a good working Data software or a Machine Learning model to deploy at all.
DevOps practices might not seem very interesting — or useful — when you are learning how to program. Successfully installing Conda, figuring out how many data structures are there, learning how to write functions. When you start learning, these are more urgent issues. DevOps seems like a set of practices that you will need at some point down the line when you start working.
You couldn’t be more wrong.
DevOps practices are a set of habits that can help you improve code integration, speed up your deployment, and automatize your process. And isn’t that what we all want, from the very first time we write our “Hello World” piece of software?
DevOps is a set of practices that brings together software development (Dev) and IT operations (Ops). If you’re learning about Data, you may have heard of MLOps (Machine Learning Operations). MLOps are a set of practices to consider when building a pipeline for deploying working Machine Learning models into production. The goal is the same in both cases, but the context is more or less focused. In the second case, we’re talking about Machine Learning models. In the first case, we’re talking about general software deployment. There are Data software that have little to do with Machine Learning. In this article, we’ll focus on the broader DevOps collection of practices.
In this article, we’ll cover
- why you need DevOps from day 1
- how DevOps helps you
- DevOps collection of practices
- how you can apply each practice to your learning process.
Why do you need DevOps from day 1
DevOps is a habit. You could just learn how to write code that does what you want. If you do that, you will arrive in a company and you’ll have to learn new habits in the first few months. You will have to get used to DevOps while both trying to get used to your new job and trying to make a good impression. Sounds like a lot of work for your first month on a job. Wouldn’t it be better to already have the habit of following the practices of DevOps, even if it’s just a little bit? That way, one of the challenges you’ll face on your first job is already won, and you’ll be less stressed.
As an additional bonus, sometimes jobs require DevOps/MLOps knowlegde. When you’re interviewing for a new position, the interviewer might ask whether you have any experience in DevOps or MLOps. It’s great if you already had it in a previous job. What if you don’t? In that case, you can start telling how your experience in DevOps is as long as your experience in coding.
Now, at this point, you might wonder if it’s hard to learn these set of habits at first. It isn’t if you learn them right at the start of your learning journey into Data and Tech. The more you wait to change your habits, the harder it will be.
How DevOps helps you learn better and faster
Best Quality. DevOps helps you have the best version of the code always updated. You will always find the best code first when you go back to review your previous code. It will help you improve the quality of your work, so you don’t have to wonder whether the code you are looking at is your best version or not.
Best Management. DevOps allows you to have a precise idea of where you are, what you have done so far, and how many topics you still need to cover.
Quickest Deployment. DevOps helps you apply what you’ve learned as quickly as possible. After all, any code is worth something only once it’s in production.
What are the DevOps principles, and how to apply them while learning
Continuous Integration. Continuous Integration is the practice of automating, merging, and testing code. It helps to catch bugs early in the development stage. Automated tests ensure quality.
How to apply when learning. When you’re learning programming, you should write the code and the test in the same script — if you’re writing on a notebook, in the same coding box. If the code is long and you want to write the test in another file, make it so that the test script is quickly recognizable. For example, name the test with the same name of the script and add the suffix ‘_test’. The first time you write code, you ensure that both code and test are working well. When you update your code, it’s incredibly easy to make sure the result of the updated code is the same: you just run the test. It also acts as a form of documentation. The test is a piece of code that’s usually shorter than the actual code and at the same time explicit about the desired result.
Continuous Delivery. Continuous Delivery is the process in which you should always build, test, and deploy to one or more test and production environments. Deploying and testing in multiple environments increases the quality of your work.
How to apply when learning. At The Brain and I, we’re big fans of delivering projects while learning. Anything you learn should go on a project. Your portfolio should be a very detailed view of everything you’ve learned. Another advantage of the portfolio is that it shows that not only do you know the topic, but you also know how to apply it in a (Data) software development. If you can use the same knowledge in multiple different projects, you’re showing that you have really understood the concepts.
Version Control. Is the practice of managing code in versions and tracking revisions. Usually, it’s implemented with Git.
How to apply when learning. When learning something new, it’s normal that the first way you learn how to write code is not the best way to write that code. While improving, you will end up with multiple ways to code the same algorithm. You might save every piece of code you’ve ever written in different scripts or folders. If you do that, it’s difficult to find the best way you learned to write something. To avoid this waste of time, you should always update the previous code. If you find a better way to write some piece of code, change the code you already have. Instead of producing more and more scripts, focus on improving one script per topic. Save all the versions with Git:
- you won’t lose your previous efforts,
- you will find every variation of your code in the same place, and
- you’ll find the best version on top.
Agile. It is the practice of monitoring what tasks are there to do from the start, marking the ones done, and always reviewing your priorities depending on the situation. The Agile Methodology allow teams to always know where they are in the process, and be able to change strategy quickly.
How to apply when learning. Before starting learning, try to figure out
- all the topics you need to learn,
- how many projects should come out of the topic,
- when you can be expected to know how to develop each of them, and
- what other deliveries you are expected to produce.
Write it all down, make an excel file, make a Trello board, an Asana project, anything, and keep track. It’s a great boost to keep seeing your topics being marked as learned and it helps keeping track of what’s still left to do. Keeping track of your progress and how much it still takes to completely succeed will help you move forward.
Infrastructure As A Code. Infrastructure as code defines system resources in a way that allows teams to always maintain the environment stable and matching between deployment, testing, and production.
How to apply when learning. When surfing the internet for information about a topic to understand it better, it’s easy to find videos and posts covering the topic. Not all will have the same environment you have or using the same operative system you are. At first, this might lead to confusion and waste of time. For example, someone might use the same code but in another environment. If you’re not familiar with both environments, this approach can make the topic even more complex to understand than it already is. Try to focus on posts and videos using the same environment you are using or at least the most similar one.
Configuration Management. Managing the state of resources in a system, including servers, virtual machines, and databases. Using a configuration management tool, teams can roll out changes in a controlled, systematic way.
How to apply when learning. Be mindful to choose technology that will allow you to focus most of your energy on the specific topics you want to learn. Choose platforms that will allow for all the environments you want to learn. The least installation you’ll have to do, the better off you’ll be — unless you’re learning how to install stuff.
Continuous Monitoring. Full real-time visibility into the performance and health of the entire application stack. Insights help the team mitigate issues in real-time and see how to improve the application.
How to apply when learning. When coding, keep an eye on the performance of your application. It is crucial to know where the bottlenecks are and where you can improve the performance. Learning how to improve performance is also a great way to learn better code.
In conclusion, DevOps is a critical aspect of modern software development. It is essential to learn it right from the start of your Data learning journey and develop the habit. You will improve the quality of your work, manage your progress effectively, and deploy your code as quickly as possible.
If the principles of DevOps may seem daunting at first, keep going. By applying them to your learning process, you are setting yourself up for success in your future career.