Day 18: Development Speed is Important
When people learn to develop software, they believe that long hours of concentration and isolation are the best, and maybe unique, way to achieve high quality code. Many think that by working slowly and carefully they may be able to catch most bugs and create a solid base for the program they are creating.
This idea has some truth in it. Careful planning is a right step in the design of any software. Moreover, slow progress is necessary when you are starting as a software engineer, and still getting used to the tools of the trade, such as programming languages, IDEs, and building tools, for example.
On the other hand, for a professional, experienced programmer, acting slowly may be a sign of bad working habits and programming practices. Rather then being accepted as a necessity, a slow development pace should be avoided as soon as possible.
The reason why it is important to impress speed to your daily routing is not only because of business requirements or competitive pressure. Speed in development may also become a qualitative advantage that may provide the edge you need to create better products.
Faster May Be Better
There is a big reason why working faster may benefit you and your company. Software development requires a lot of concentration, which is hard to achieve during long stretches of time. Sometimes, you need to understand very complicated segments of code, and keep this level of concentration may be difficult to do for long periods of time.
By acting quickly, you can take advantage of short periods of intense concentration in a way that other developers would not be able to match. For example, if you can quickly fix bugs, understand what is going on in a segment of a program, and find a solution for a development issue, you will have a definite advantage over your peers and competing companies.
Creating a Quick Development Cycle
One way to use short periods of programming to your advantage is to use unit tests. Unit tests can help you to quickly figure out if the changes you made are valid and that no regressions surface. After you run unit tests, either manually or, more appropriately, through a continuous integration suite, you will have increased confidence on the results of the code you produce. More importantly, such tests can verify your code in just a fraction of the time it takes to make the necessary modifications.
It is crucial to make software easy to test. Difficulties during an initial testing phase can lead to two undesirable consequences. First, you are tempted to test less often. This leads to more bugs, as can be easily seen from experience. The other problem resulting from lack of tests is that it is harder to refactor code. Badly designed code tents to stay unchanged, and the overall body of code will not evolve as it should.
Improving Your Skills
If you want to become a fast designer and coder, you need to practice your skills. This is not different from any other profession, but for programmers this involves a lot of interplay between thinking and using automatic tools.
For example, one of the most important factors in improving efficiency is using a flexible and powerful programming environment. Such an environment should provide users with the means to create their own tools, tools that can be used to simplify common work flows.
Thankfully, most modern IDEs provide the necessary features to automate repetitive work. Also, if you have UNIX experience, you already have a world-class automation system at your fingertips: just learn how to create shell scripts to simplify common programming tasks.
For example, don’t spend time repeating the same building procedure over and over; write a script that can run that sequence for you. Better yet, share that script with other users, so that they can also benefit from your work.
An extension of the idea above is to create a complete environment that makes it easy to build and test. This usually means having a good building system in place.
Some people work needlessly for lack of a proper building system. Try to avoid this problem. You should be able to compile, test, and deploy your whole application with one step. This also means that not only you, but any developer in your group can turn a single button or key to get the software deployed.
Using the Right Tools
The other part of writing software fast is to use good tools. One of the most important tools you will ever need is a text editor. Strive to use a text editor with which you are comfortable, but that is also powerful enough for the tasks you need to complete. Traditional editors such as vim and emacs are tried and tested by some of the best programmers in the world. They are a sure way of achieving high speed and performance. If you don’t know how to use such an editor, make yourself a favor and invest time in learning one of them.
Maybe you work in a particular programming environment where an IDE such as Eclipse of Intellij IDEA is necessary. If that is the case, try to learn it well so that you can avoid clicking and doing repetitive tasks with the mouse.
Finally, get a fast machine. Hardware is cheap these days. I recently doubled the amount of memory in my working machine, and things improved a lot. It is really cheap to do this, compared to the value of the time spent waiting for programs to run. As a general guide, if you’re spending more than a few seconds building a medium-sized project, do something to change that. Either more hardware or better software will do the trick.
Conclusion
Speed is a virtue in software development. Going through shorter cycles of work, it becomes easier to validate your results, and get the necessary feedback from users. If you are spending too much time on development tasks, there might be a lot of opportunities for improvement that can make your life much easier. Learn to identify these opportunities and use one of the techniques discussed above to reduce development cycles. This will almost always lead to software with better quality.
Similar Posts:
About the Author
Carlos Oliveira holds a PhD in Systems Engineering and Optimization from University of Florida. He works as a software engineer, with more than 10 years of experience in developing high performance, commercial and scientific applications in C++, Java, and Objective-C. His most Recent Book is Practical C++ Financial Programming.