6 practical tools for programmers, suitable for all ages, you must use them!

I have been engaged in the development industry for 4 years. During this period, I have accumulated a lot of useful development tools. I hope to help you simplify your work and improve your personal productivity.
The sharing here is based on one principle: anything that needs to be repeated must be done using automated tools.

01. Unit testing tool - PHPUnit

Writing a program requires verification. If you want to quickly know that the new code does not conflict with the code written in the past, unit testing can play a role at this time.

Of course, the role of unit testing is not only this , but also has :

  • Verify code correctness and reliability
  • Verify that the new code does not conflict with the existing code
  • Verify that your own code does not match the code of other members of the team.
  • Verify that the merge has no conflicts
  • Verify fast
  • Can be used as an API instance
  • Cross-platform and cross-environment testing

A unit test project is one of the basic modules of the modern development process , without it, it would not be a qualified and complete project.

With unit testing, you don't have to worry about the big impact of small modifications you make in large projects. Development stress is greatly reduced .

PHP, I use PHPunit, JavaScript has been used a lot, Jasmine, Qunit, Mocha and other tools (no matter which one, at least one should be used) C# generally uses nUnit. There are also various mocks and faker assistance.

02. Functional testing tool - PhantomJS

This tool is an interactive interface test, and it can also be an interface style test. The general process of writing code is similar to that of unit testing. The difference is that each unit of unit testing is independent and should not have any dependencies in theory (as long as there are dependencies, it is called integration testing); while functional testing is the final product. For testing, all dependencies must be turned on and tested on the interface.

Advantages of interface functional testing:

  • faster than manual
  • Simulate real operation
  • Can export test code after recording
  • can capture pictures

shortcoming:

  • There are many dependencies, and dependent environment changes can lead to code failure
  • The speed is much slower than unit testing
  • Test success rate may not be 100%

Functional testing is also a type of automatic testing, which at least liberates a lot of repetitive labor and greatly improves the speed of interface function development.

Functional testing tools mainly include Phantom JS and Selenium . I use both, with different strategies depending on the situation.

03. Low-code tool - JNPF (better to use on the PC side)

In the process of developing internal tools, a large number of pages, scenes, components, etc. are constantly being repeated. Low-code addresses this kind of problem by concretizing some recurring scenes and processes into components, APIs, and database interfaces. Reinvent the wheel. Greatly improved production efficiency.

(1) Project management

Low-code , known as the "Lego" in application software , can quickly build applications in various scenarios just like building blocks. From small form collection to large project management, customer management, work order management and even full process management, it can be fully

Combined with the Kanban view in the system, we can see the project progress of each member of the team and the overall progress of the team in detail, so that we can keep track of the progress of the project at any time.

( 2 ) Process collaboration

All problems related to enterprise process management can be solved with low-code . With its information collection and data analysis capabilities, it can basically solve all enterprise process management problems .

For example, the procurement process, the car application process, the reimbursement process, the leave process, and even the weekly report and daily process can be used to automate, and the process construction is also very simple, as long as you can sort out the business logic clearly, you can build it .

Online tools, no need to download APP, can integrate commonly used communication tools such as Qiwei, DingTalk, WeChat, etc., which is simple and convenient.

04、Live Reload

Live Reload is generally used together with process management (there is also a standalone version). Speaking independently is also to reflect an ultimate trait of programmers: laziness. Anything that is repeated must be done with tools. Live Reload is a manifestation of this: pressing F5 is a repetitive and inefficient behavior that must be handed over to the tool .

The function of Live Reload is very simple to say:

  • Check for file changes
  • Refresh page if changed

The direct benefit to developers is to view page changes, just press ctrl+s to keep the code, and you don't even need to press f5. This benefit is enough to treat the Live Reload tool as an artifact. With the process management tool, as long as the code is saved (ctrl+s), it will be built immediately, and the page will be automatically refreshed after the build is completed.

The Live Reload I use is grunt-contrib-watch.

05. Code quality analysis tool - JSHint

The efficiency of manual code inspection is relatively low, so quality analysis can be used as a development aid to improve development quality. Common code quality tools include:

  • Grammar checking to ensure that the code is grammatically correct, cross-platform, and using best practices
  • Code style inspection to ensure that the team code style is consistent
  • code compression, size reduction
  • Duplicate code check
  • dead code check
  • Module Complexity Analysis
  • Module Connection Analysis
  • etc.

JavaScript and PHP are widely used. Jshint, Jscs, uglifyjs, phpcpd, phpcs, phpdcd, PHPLOC and other tools can help developers improve code quality and control team code style.

6. Continuous Integration - Jenkins

Someone told me that continuous integration can take your development level to another level. After I practiced, I finally understood the charm of continuous integration.

To be able to continuously integrate, you must first learn the above 6 items (except live reload). The above 6 items are basically a few basic modules of continuous integration. After learning, you will naturally know continuous integration.

The main process of continuous integration is as follows :

  • Check if the version control repository is updated
  • If updated, download the latest version of the code
  • Construct
  • test
  • Report

When you set up a continuous integration project, the above steps should be fully automatic. It's still the same old saying: All repetitive steps should be done with tools. And continuous integration is the ultimate tool.

Continuous integration is actually an upgraded version of process management, or an extension. They are all automated process tools. Their differences are:

  • Process management is mainly performed on the local machine (the developer's own development environment), while continuous integration is performed in an environment that is set independently.
  • Process management continues native code, while continuous integration builds code held in version control .
  • Anyone in the team pushes the code to the version control, and the continuous integration starts to build and verify the reliability of the new code.
  • After the project process configuration is completed, the process management needs to execute the command line, and the continuous integration should be fully automatic .
  • Process management is a module of continuous integration and belongs to the building blocks of continuous integration .
  • Continuous integration will have more follow-up professional functions, such as generating reports, error notifications, building history, testing history, etc. to develop new types .

We can imagine a situation where a team of 20-50 people is developing a PHP project, and each person pushes new code to version control at least 10 times a day, and you have to ensure that this project is in 3 mainstream The browsers have the same functions and the same style, but this project must be cross-platform, and can run on mac, window, and linux, and it must also ensure that PHP5.4~5.6 can run. At this time, the advantages of the continuous integration system will show its true power.

Conclusion:

This is the end of the article. In fact, there are still many excellent tools in development, but they cannot be compared with these main development tools, so I won’t talk about them here.

Guess you like

Origin blog.csdn.net/wangonik_l/article/details/131302534