Programmer's Tools

Source: Internet
Author: User

Coding Tools

Coding is essentially a work that takes keyboard input as the main operation. Therefore, the speed of the input code to a large extent affect the efficiency of a programmer. I am using the following methods to improve the speed of the input code.

Keyboard layouts

Many programmers do not know that the keyboard layout we use (that is, the letter key, the number key and the symbol key position) is not the only one. Most people use a standard keyboard layout, also known as the Qwert keyboard (named after the line of letters above the left hand). But unfortunately, this layout is not designed to improve the speed of typing.

I've probably learned to use a keyboard layout called "Dvorak" about a year ago. When you use this layout to enter the same piece of text, the finger on the keyboard to move the distance than the standard layout reduced by at least 50%. I used the Qwert keyboard for more than 20 years before I went to the Dvorak layout, but I actually spent about one months to switch the keyboard layout. Of course, for the last one months, I've been practising typing for about an hour every night.

In fact, I am not using the standard Dvorak keyboard, but a keyboard layout called programmer Dvorak. Based on the standard Dvorak, this layout adjusts the position and input of the numbers and symbol keys according to the programmer's needs, in order to improve the programmer's input code speed. For example, when you enter a number using the programmer Dvorak layout, you need to press SHIFT while the input symbol (such as (), [], {}, =) does not need to press shift. When you write code, the number of times to enter these symbols is clearly far more than the number, this change in the speed of the promotion can not be ignored ah.

According to the research data found on the Internet, Dvorak layout can also improve the speed of inputting Chinese. Programmers have a lot of time to spend on other things every day (surfing the Internet for information, chatting, writing emails, and so on), and it's also helpful to have more efficient typing.

How code is edited

I believe many programmers have heard of the "Vi" text editing methods. It can be said that "Vi" is designed to encode, compared to the use of Notepad to edit the way to be much more efficient. I install VIM (Vi improved) plugins in all development environments, such as Intelliji and sublime. Vim can quickly locate, find and modify code, and there are many very powerful editing features. To learn vim, in addition to online search data, but also through the game (http://vim-adventures.com/) and Challenges (http://vimgolf.com/) to practice.

Of course, I am not opposed to using Emacs, but I have no time to study, can not give evaluation and comparison. However, I have ignored the online discussion of the merits of Emacs and vim.

Development environment and shortcut keys

When encoding, I use shortcuts as much as I can, and I try not to have a mouse. Coding with the mouse, can be said to be the programmer's efficiency killer. Because a programmer's hand will leave the keyboard when the mouse is used, resulting in an extra long interval of input code. In fact, the use of vim and shortcut keys is the same reason, is to let the hands as little as possible to leave the Code input area (letter keys, numeric keys and symbol keys). As such, using the keyboard's "up or down" key can also affect efficiency, because these keys are usually in the lower right corner of the keyboard and away from the letter key area.

Commonly used development environment support for shortcut keys is good, in addition to predefined shortcut keys, you can customize shortcut keys. In addition, like Mousefeed and key promoter in Eclipse and Intelliji, they are prompted when programmers do not use shortcut keys or remind programmers to set shortcuts for actions that use but do not have a corresponding shortcut key.

I encourage programmers to set their own shortcuts according to custom and not rigidly adhere to the predefined ones in the development environment. When you encounter your own shortcut keys and predefined conflicts, you can decisively remove the original settings and use a custom shortcut if the pre-defined actions are not used or are rarely used. and to master shortcut keys and no tricks, adhere to the programming practice and work more use on it. It's not useful to recite those shortcut manuals.

My current major development environment is the Intelliji Community Edition (for Java and Scala) and sublime (other languages or tools, such as Ruby, Python, Plsql, Robotframework, and so on). They are all free development environments and there are a lot of plug-ins available.

Tools related to Agile engineering practices

The coding tools mentioned above are straightforward to improve efficiency. The tools I'm going to mention here are about how programmers write code and design code.

Unit Test Framework

Test-driven Development (TDD) is my highly recommended programming and design approach to help programmers write concise and well-designed code. The unit tests generated in TDD are usually run with a unit Test framework (UT framework). The UT framework tool is not necessary for TDD because writing and running tests is not complex in itself. However, after using the UT framework, you can simplify unit test writing, running, and organization, which is helpful for the maintenance and management of the test.

The UT framework I use includes JUnit (Java), Scala-test (Scala), RSpec (Ruby), and so on. Some UT frameworks provide some powerful features to be careful when using these features, because poorly used may affect the readability of unit tests. For example, many UT frameworks provide data-driven test functionality (driven test). While this feature simplifies the writing of unit tests, I have found that using data-driven testing in large numbers can make unit tests less readable. The reason is that the data itself does not necessarily express the intent of the test and design, resulting in the test being difficult to maintain.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.