Gone are the days when developers had to struggle with a limited set of tools like Notepad for editing, and had to make do with comparing differences between software versions using the only tools available – their eyes and their intelligence. There are now many open source tools that enable a good software development experience on Windows. This article gives a brief on some of these.
While the UNIX environment has a large set of utilities that make some of the software development tasks easy, many developers do not have access to UNIX installation. Even though Linux is very popular today, it is still a hard decision for developers to opt for a dual boot system or move completely to a Linux environment. As a computer setup is still a costly affair, investing in multiple systems adds to the expense.
Over the years, many tools have been developed on Windows, and a lot of open source and free tools are also available now. These make the task of developers much easier. Many of the tools are now also visual in nature, which is a big relief, as command-line tools can be daunting.
Till a few years ago, there were very few choices in terms of tools available for development, as most of them needed a licence, and it was not possible for a developer to fork out forty thousand rupees for a Visual Studio licence – that too for the development of a personal project. The expansion of the open-source ecosystem has been a liberating experience for most developers as we now have tools that allow us to perform many of the activities that needed expensive investments earlier. Having said that, as open source tools are developed by people, it will help the open source ecosystem if we donate for our favourite projects. Donations need not be monetary in nature. The best donation for any open source project is to go through the code and improve the existing tool or add new features.
What do we need for software development?
For any development effort, we need a good and supportive editor, a method to compare versions of code files, a method to interact with a version control system for proper code management, a compiler, an assortment of libraries and an environment for deployment and testing. Most of us are aware of and use programming languages like Python and its associated libraries (too vast to list here). Similarly, we can use MySQL or PostgreSQL for storing data. While we can develop, deploy and test on the local desktop or laptop, the same setup can be easily deployed to the cloud.
Recommended open source tools
A fundamental need of any developer is to have a versatile editor at hand. When we discuss editors, one name immediately comes to mind — Notepad++. This feature-rich editor supports many of the activities required by a developer, and looks clean and elegant. One of its best features is that it allows us to open multiple documents in tabs. While this is a feature supported by most of today’s editors, Notepad++ was one of the first to do so from a very early version. The editor supports syntax highlighting for many languages under the ‘Language’ menu. It allows us to not only find and replace text, but also perform a search on multiple files in a directory. As Python development is very popular today, the features that show white spaces and TAB using an orange colour are invaluable. Now, it is very easy to see why the Python interpreter gives an indentation error. Two other features provided by the recent version are that of line sorting and duplicate line removal – both are extremely useful.
The basic functionality of the editor can be enhanced by using plugins, many of which are readily available in the repository and are ready for use. Some of the plugins I use are ‘Compare’, ‘HEX-Editor’, ‘JSTool’, ‘JSON Viewer’ and ‘XML Tools’. While many people believe that XML is outdated, we, as developers, will definitely come across a migration project that needs us to parse and process XML data.
During a fast-paced development cycle, we need to update our code multiple times in one day. Though it is recommended that we check in every change into the code repository, this is not humanly possible. So, we usually arrive at a compromise — we check in code once a day. Many development teams have the rule (rightly so) that code checked into the repository should be able to compile. In other words, the build process should not break due to a check in. It does not matter even if the code is not complete and has many bugs that are yet to be resolved. This creates a dilemma for many developers. If they are only half-way into a module, it may not be possible to check in the code. So many of us choose to use an alternative – make a date based zip and store it in a common place.
A zip file creates another headache – how does one compare changes? This is where comparison tools prove to be invaluable. The diff utility of UNIX/Linux systems helps a lot on this front. On Windows, I choose to use WinMerge. The tool allows us to compare three files at the same time (obviously, we should use this feature to compare three versions of the same file), though comparing two versions is the most common use.
WinMerge compares files and shows us the similarities and differences. The differences are displayed in orange, which makes it easy to find them. We can then go through these differences and update the file.
Source code management is an invaluable tool for any development project. These days, Git is the most popular tool for code management. Here, I would like to mention a tool that makes it easy to interact with a Git repository – TortoiseGit. TortoiseGit makes code check in and check out a breeze. This is because it is integrated with Windows Explorer. By simply looking at the files in a folder, we are able to identify the files that have been updated locally – TortoiseGit uses icon overlays, making this very easy. Interaction with the repository is simple — right-click on the folder and carry out the required task, say, a ‘Pull’ request or a ‘Push’ request.
Have you ever come across a situation where you or someone else has deleted files that are important for the project? I, too, have done this once or twice. Having code in the repository is vital to recover from such situations. But I recently managed to delete the repository itself. Unfortunately, Git does not store the repository in ‘trash’ for some time; so if a repository is deleted, you are done for.
So, in addition to storing files in the code repository, we should also take a backup of the code. After trying many backup tools, I use a simple command-line and Java based tool, named Syncdir. As the tool is command based, it has many options that we may forget. My solution is to write a handy batch file that contains the backup command. I keep the file on the external/portable hard disk. Each time I wish to take a backup, I execute the batch file and Syncdir does its job.
One for the road
The developer’s toolbox is incomplete without one invaluable tool (or rather editor) – vi. I am sure most developers will roll their eyes upon hearing ‘vi’. But my personal experience is that it is a very powerful editor and can help us to perform many tasks very quickly. These days, vi is available on Windows – either Vim or Gvim. An interesting feature of vi is that it is possible to perform most editing operations without having to move our hands away from the central portion of the keyboard. We definitely cannot say this about most editors like Notepad++, Visual Studio Code and others, where we have to continually use the mouse for many operations.
By far, the tools I have mentioned here are not the only ones to use. Given the vast number of options available, we will obviously have our own favourites and also some tools that we hate. As long as you have a tool that serves the purpose of code editing, code comparison, code management and backup, you are set for a good development experience.