As a Java engineer, efficiency is productivity. Tools that can help you write less code, fix fewer bugs, and work less overtime often save you a lot of time and allow you to focus on solving truly challenging problems.
The tools shared below cover almost the entire Java development process, from coding, debugging to building and deploying, each step can greatly improve your work efficiency.
1. IntelliJ IDEA Ultimate Edition+Selected Plugin
As the preferred IDE for Java development, IntelliJ IDEA itself is already very powerful, but with the following plugins, efficiency can be further improved:
Key Promoter X: Display your manually operated shortcut keys to help you develop the habit of using shortcut keys
AiXcoder Code Completor: AI based code completion, more intelligent than IDEA's built-in
Maven Helper: A tool for resolving Maven dependency conflicts
Lombok: Reduce template code writing
Rainbow Brackets: Colored parentheses make nested structures clear at a glance
Practical tip: Create multiple Live Templates (code templates), such as defining logs, common exception handling, singleton patterns, etc. It can save dozens of repeated inputs every day.
2. Lombok
Although this is a library, it can be considered an efficiency tool. Automatically generate methods such as getter/setter, constructor, equals/hashCode, etc. through annotations, significantly reducing the amount of template code
Attention: When using @ EqualsAndHashCode, be careful to exclude fields that may cause circular references; When using @ Builder, consider adding @ NoArgeCostruct to meet serialization requirements.
2、 Debugging and performance analysis tools
3. Arthas
Alibaba's open-source Java diagnostic tool can troubleshoot problems online without the need to restart the application. The most powerful feature is its ability to observe the input and return values of methods in real time, calculate the capital punishment time of methods, and even dynamically modify the behavior of classes.
Common commands:
Watch monitoring method call
Trace method calls the link
Jad decompilation class
SC searches for loaded classes
Redefine hot update class
4. JProfiler
The king of Java analysis tools, capable of analyzing CPU hotspots, memory leaks, thread blocking, and other issues. Compared to other analysis tools, JProfiler's UI is more user-friendly and data presentation is more intuitive.
Core functions:
Memory View: Identify the object that occupies the most memory
CPU View: Hotspot Localization Method
Thread View: Discovering deadlocks and blockages
Real time telemetry: monitoring online applications without the need for restart
Tip: Develop the habit of regularly conducting performance analysis on the services you are responsible for, as many issues can be identified before going live.
5. Charles/Fiddler
Packet capture tools are essential tools for API debugging. Charles (Mac) or Fiddler (Windows) can intercept, view, and modify HTTP/HTTPS requests and responses.
Practical functions:
Simulate network latency
Request rewrite
Debugging HTTP requests with breakpoints
reverse proxy
When developing and debugging third-party APIs separately in the front-end and back-end, such tools can save a lot of time.
3、 Code Quality Tools
6. SonarQube + SonarLint
SonarQube is a static code analysis tool that can detect vulnerabilities, bad smells, and potential bugs in code. And SonarLint is its IDE plugin version, which can provide real-time feedback while you code.
Best practices:
Integrate SonarQube into the CI process
Develop 'Quality Gate' standards for the team
Use SonarLint for real-time inspection to avoid rework during code review
Tip: Customize rule sets, ignore rules that are not applicable to specific projects, and avoid "excessive cleanliness".
7. ArchUnit
Test architecture rules through code to ensure that the project architecture does not decay over time
Adding architectural constraints to unit testing is more effective than writing documentation, as violating rules can lead to test failures.
8. JaCoCo
Code coverage tool, integrated with Maven/Gradle, generates intuitive HTML reports. It not only counts which code is covered by unit testing, but also displays which branches were not tested.
4、 API development and testing tools
9. Postman + Newman
Postman is the standard tool for API development and testing, while Newman is its command-line version, suitable for integration into CI/CD processes.
Advanced usage:
Environmental variable management for different testing environments
Request pre/post script automation testing
Export collection to Newman for capital punishment in CI
Team Shared API Collection
Tip: Create a set of environment variables for each project, including test environment, development environment, and production environment configurations, and switch with one click.
10. OpenAPI Generator
Automatically generate API client and server-side code from OpenAPI (Swagger) specification.
When developing front-end and back-end in parallel, API priority design is used to enable the front-end to work with the Mock server based on Swagger UI, while the back-end implements business logic based on generated interfaces.