How to Become a Faster Developer?
For this post, I want to share some tips (small things) you can implement right now to be able to work faster as a developer.
Join the DZone community and get the full member experience.Join For Free
There are many things you can do to increase your velocity when you are developing. for example, mastering your knowledge on the technology you are using or mastering your domain on OOP, learn how to typing faster, or maybe use a last-generation supercomputer. All these things need time or money.
For this post, I want to share some tips (small things) you can implement right now to be able to work faster as a developer. I learn in many years as a software developer, that there are several things no related to how to code, how to design the application, that you can do to work faster. The idea is to reduce the non-productive time inside your development process.
Reduce the Compilation Time (Using Java and Maven)
There are some ways to help you to reduce the compilation time.
- To developer using Maven to compile Java applications, you can skip the javadoc generation when compiling on development environments (Add this -Dmaven.javadoc.skip=true to you maven command).
- Increase the number of threads to compile used by maven, (Add this to you maven command -T 2C ) will use 2 thread per available CPU core.
- Avoid using maven clean command. Maven build your project incrementally. then if a module of your project has no change maven does not need to compile it until it has changed. When you run the clean command maven delete all the artifacts generated before, and has to compile all again.
- In a multi-module project. you can compile only the module has changed (An option to do that add this to your maven command -pl $moduleName , you can get the same behavior using profiles).
- Every time you compile the application maven connect to internet to download the dependencies, this is a good feature the maven, the problem is the connection happens every compilation, even if you have all the dependencies in your local repository. To avoid that you can compile on offline mode. (Add -o / --offline to your maven command).
Now try these tips on your compilation process, you will see a faster compilation. this is going to help you to work faster. because you reduce your waiting time.
Reduce the Deployment Time
- On web applications, work your backend and your frontend separately, in this way if you have changes on your backend you do not need redeploy, or compile your frontend components.
- You can use for your frontend components the nodejs technologies to take advantage to use the hot-reload features include in for example webpack or angular. In this way, you make changes to your files and reload the webpage to see your changes.
- For java, there is a great tool (Jrebel), allows java developers to work with hot-reload features.
- Using the microservice approach, allow you to redeploy only those services with changes, to have your component deployed separately allows you a faster redeploy process (be aware, this approach increases the complexity of your deployment process).
Test Your Feature as Fast as you Can
Sometimes you could test your code out of the complexity of the application. try to take advantage of this.
- When you are working on sql statements, execute it directly on the database, verify the results, runs edge cases. you can run basic sql statements but also call a store procedure, fire a trigger. using different data types, basic or complex. when you are sure your code works as you expect, then include it on your application and run it.
- Are you working with rest services? you can test your services using tools like postman, advance rest client (There are a lot of rest-client tools), test your service directly, verify the edge cases.
- Unit test, use them, TDD is one of the best practices you can use on development tasks, but also you can use to validate your change in an easy and faster way.
I hope you can use these tips to increase your velocity on development tasks, If you have other tips, please share it in a comment.
Opinions expressed by DZone contributors are their own.