Introducing Batch Build

Introducing Batch Build

How to speed up your development and debugging time by reducing the build time of your IDE

ยท

4 min read

Would you buy a $10,000 laptop? At what price point is a laptop too expensive?๐Ÿ˜. It's a subjective question really, but for some professions, the answer is quite simple; no laptop is too expensive, you just don't need it yet, but if you stick around long enough, you will ๐Ÿ˜‚.

They say money can't buy life, but any software engineer will tell you that a PC with 1TB SSD storage, 32gig RAM, and a 12th generation Intel Core i9 will buy you a lot of time and set you up to earn the value of the PC back in no time.

Preamble aside, the reality of the situation is most people will not be able to afford a high-end laptop when learning or on their first job, and it's critically important, especially in backend development, which requires an intensive computation of logic and can drain the life out of a machine. Despite this reality, there's a way to still get the job done by leveraging a particular feature in our IDE (Integrated Development Environment).

An image of a little girl sitting on a man's laps while she's being taught by the man

A Relatable Explanation

An IDE is a playground for developers, it's where we write the code that powers your favourite applications, chefs have their kitchen(s), and we have our IDE. One of the most popular IDEs around is Microsoft's Visual Studio and today I'll be introducing you to "Batch Build" ๐Ÿ˜Ž. To understand batch building, we need to understand "building".

When developers write code, we "build" it by literally asking the machine to read through all the instructions we've written down and to let us know if they (the machine) understands all we've written. It's kinda like how we give a wait staff our order and ask that they read it back to us to be sure they got everything correctly. If the machine didn't get some things right, there'll be errors that will be flagged (by the machine) for the developer to resolve.

Developers build hundreds if not thousands of times when building a solution as such any time savings in the process of building applications can greatly increase the speed at which development is completed. The average build time can go from a minute to an hour depending on the size of the project and the quality of your computer's processors. For those using lower-end devices, software development can be quite frustrating... I've been there so I know ๐Ÿ˜ฃ.

An image illustration of a man sitting at a table with a checklist in front of him

What Does Batch Build Do?

Depending on the nature of your solution, it's likely you'll come across a microservices application or one that has many different projects rolled into one solution. Most of the time, you're writing code within one project in the solution, however, when trying to build, your IDE is reviewing the entire solution, including the projects you didn't touch and this adds to the overall build time. If your PC isn't a flagship device, this can leave you staring for 20 minutes if not more.

With the batch build functionality, you can select which projects should be built, or released within a solution such that when the machine wants to review or process the instructions in the solution, it'll skip the projects that were excluded. This can greatly increase build and debugging speed by 100% or more. Now you're probably wondering how to batch build ๐Ÿ˜. Please follow the steps below.

Step One: Click the "Build" menu option in your IDE. The screenshot below should help you find the "Build" option.

A screenshot showing the "Build" menu option

Step Two: Click "Batch Build" from the dropdown. The screenshot below should help you find the "Batch Build" option.

A screenshot showing the "Batch Build" menu option

Step Three: You'll be able to see and toggle the projects within your solution now, simply click the checkbox(es) to select the project(s) you want to build. The screenshot below should show you want the build selection page looks like.

A screenshot of the build selection page

Note: In this demo, only one project is present but if your solution has multiple projects, you will see all the projects listed on this page.

After selecting the projects you'd like to build, you can now build your solution and the only projects that will be built are those you selected. To reset this, you'll have to uncheck all the projects on the batch build selection page.

An image of a girl walking down a dark path, holding on to three balloons that look like planets

Finally...

There are so many functionalities that are built into the tools we leverage daily that we don't know about, I'd encourage that aside from learning how to code, we take tutorials on using our code editors, and IDEs. I can bet that a lot of things that will be learned will help optimize our code and make us better developers overall. Happy coding ๐Ÿฅ‚.