“Nine people can’t make a baby in a month.”
—Fred Brooks
Have you ever used Notepad or some other text editor to write code? Then you might already have felt the pain of writing code in them. Although using text editor for coding will make you a better programmer in the long run but it'll cost you productivity.
Programmer's Editors on the other hand are becoming mainstream because of two reasons; the features they provide, and they make code look fu*king awesome, I mean man, who doesn't like those colorful lines(Syntax Highlighting). And there are endless choices with each having some uniqueness in it while providing general features of programmer's editor which sadly makes it harder to select one.
- Problem with normal editor:
-
- No clear identification of various components of code.
- You have to write(or type) long sequences of code again and again.
- Code's alignment becomes head ache of programmer(more time is wasted in aligning code then actually writing it).
- Dull look, trust me this makes coding look boring.
- Because it doesn't provide in house features(compiling, running, inbuilt console), extra time is wasted on jumping between different programs.
- They are not made for coding.
- Programmer's editor to help:
-
- Syntax Highlighting:
- Syntax highlighting as name itself says highlights the syntax. It colorizes the code(look at featured image of this blog post). It colors different elements of code with different colors for example current color scheme(rule for highlighting system) of any X editor might paint function name with red color, class names with blue and string with purple while leaving variables black. This makes its easy to identify parts of code(even if you name your classes and functions poorly, ‘class igh{...}’ Or ‘function animal(arg1,arg2){...}’, which doesn't give clear hint of their usage, I would have fired you for this).
- Code Completion:
- Code Completion is code suggesting feature. When you are typing code, it(if it finds something relevant) will give code suggestion and then all you have to do is tap Enter or Space and voila! Code is written for you automatically. As an example, in java to print a message we have to type System.out.println(arglist...) and then pass message to be printed as argument. Imagine typing whole thing(18 characters!) again and again and in different sections of code, it would be a huge waste of time and,“Long sentences or statements posses a high risk of typos”. Hence, Code Completion comes into handy in this kind of situations.
- Code Snippets:
- After writing code for more than 6 years, I can assure you that Some boilerplate code tends to repeat several times. For every function and class same code has to be wrote again and again. Code snippets consist of templates of such boilerplate code. And even some IDE's auto suggest to insert code through snippet. For example Getters and Setters in Java.
- Themes and Misc. Features:
- Aha! Let's make editor look awesome. Themes are actually different color schemes that give that aesthetic look to the editor. There are a lot of them and you can choose the one which soothes your eyes. However, some editors do not allow you to add additional themes so support for Themes vary from editor to editor. Other than them some editors provide inbuilt console to carryout tasks such as compiling, running and testing the code and facility to extend features through plugins. Availability of these features also vary from editor to editor.
- Pros of using programmer's editor:
- First and foremost it saves time.
- You don't have to use multiple programs, it's all inbuilt.
- Awesome look and feel.
- Anti-Distraction mode.
- Advanced ‘Find & Replace’ with regular expression(string matching patterns).
- Cons of using programmer's editor:
- Consume larger memory than normal editor.
- Makes you too dependent on external help.
- Sometimes when editor crashes it might fu*k your whole code up and then you might have to write it all over again(always take backup of your code).
Comments