Point, collapse, hold up, split, stab, block, hang, support, twist, cut, pressure, cloud, wipe, cut, belt, cut, frame.

For swordsman, the basic swordsmanship practice is not good, not only can not fight, even the professor of the legendary Dugu nine jian also can not learn.

For our program monkey, the code to add, delete, change, check, cut, copy, paste, is our daily work. These foreign skills are not well practiced, the result is overtime, all-nighters, delays, firing, karoshi.

A good editor can help programmers make the basic operations of editing faster and better. Like a swordsman’s sword, it must be thoroughly tempered and sharpened.

I’ll talk about my experience with the editor, which is actually my experience growing up as a programmer, for reference.

Learning machine

When I was young, my father bought a XXX learning machine. It’s just a keyboard that plugs in cards, and it comes with a cassette that has some learning apps in it. In the age of computer popularity, this is the only way for poor families in backward areas to learn typing… But it didn’t help. At that time, I can only type the name. Later, I had a computer in college, followed the best typing learning software to learn the pinyin input method – QQ.

The learning machine eventually became a game console, and the cassette with no games was long gone. Learning card, the most let me puzzle, is a black interface. I according to the instructions, knocked a paragraph of English, characters, numbers into, and then came out a result: 5050. After I changed the number from 100 to 1000, it stuck for a while and came up with a new result: 500500. I changed the number to 10,000 and it returned a result five minutes later: 50005,000. When I changed to 10000, I never got the result.

In the end, I still didn’t know what BASIC was until I went to college.

In high school, a classmate had a programmable XXX Wenquxing (electronic dictionary). He wrote a little game in it that I admired. After he borrowed it, he didn’t have any reference books. He had to learn his code, figure it out, and follow the rules.

I spent a long time writing a simple word game and a very complicated map. The complexity of the map eventually led to the complexity of collision detection, so the map game was not completed. But I still remember a lot of IF THEN GOTO.

Ultimately, I still didn’t know the language was BASIC until I went to college.

In these two scenarios, no real editor is used. Such a rudimentary programming environment has been comparable to those programmers in the early years.

Notepad

After my freshman C course, I used Notepad to write some C code for my own amusement.

It was not compiled, however, because Notepad does not compile.

╮ (╯ del ╰) ╭

Visual Studio

Like many untrained people, I wrote C/C++ applets in Visual Studio, gradually becoming a programmer. Turbo C++ and VC++ 6.0 are available when C language is on the computer. Since Turbo C++ is so ugly that it looks like a blue screen of death, I chose the latter.




Turbo_c, it turns out, isn’t so unacceptable after all.

What is programming? Install Visual Studio, then create a new Solution.

How do I compile the program? Click that arrow to the right!

How do I run the program? Click that arrow to the right!

How to debug the program? Click that arrow to the right!

I knew very little about writing code at the time. Visual Studio was just a notepad with arrows and no other advanced features for me. And, once out of the IDE, I don’t know anything.

Every time I switch systems, I automatically install Visual Studio and try to hack it. Once that was done, in most cases, I never opened it again until the next system change.

At that time, I was not only suffering from IDE, but also limited by C language and confused by Windows. I was obsessed with the idea that a program should have a graphical interface in the first place, and SINCE C couldn’t do it (it certainly could, but I couldn’t at the time), I often looked at the IDE and wondered what to do.




Proficient in templates… Hello World.

When I was about to graduate, I changed my system for the last time and installed a legal (free) Version of Visual Studio Community 2013 for the first time (the latest version is 2015). That time, although not as good as the Great success of jiuyang shengong but no external power available Zhang Wuji in bright top after the mountain to see qiankun big move classics, also equivalent to Zhang Xiaofan finally overcome tai Chi Qiankun road and big braita prajna interlock, I suddenly learned before that a bit of programming knowledge into a comprehensive understanding, began to write real Windows programs.

The enlightenment, although to avoid the fate of going back to his hometown, but also come too late. The era of mobile Internet will just write Windows standalone program, bright top has already been six bloodwash, Qingyun Mountain has been xiao Yi turn when the helm.

The experience left me with an indelible impression that piracy is bad luck!

When have I not installed the latest Visual Studio flagship (cracked) edition? I didn’t learn anything. This time, I installed an incomplete Community version and had an Epiphany.

Later, even the graduation thesis was written using free WPS.

(That doesn’t mean I’m a good person, though, except for books. I have always believed in the words of my forefathers: “Stealing a book is not stealing!” It is needless to say which sage.)

Eclipse + ADT

Of course, the first thing that comes to mind when you want to learn how to write an Android application is Visual Studio. In those days, it was impossible to start. (BACK then, OF course, I couldn’t find the startup Xamarin.) I installed Eclipse naturally, following the web tutorials of the time.

When first introduced to Android, the dominant configuration was Eclipse + ADT + Java6.

At the time, I actually knew little about Java and had never used Eclipse. ADT was a plug-in for Eclipse, but I didn’t even know what a plug-in was. On Android, you can’t even find a book in the school library! There was not much, but also borrowed, so I can only helplessly staring at a few bookcases of Symbian.

Fortunately, we finally managed to make a small Android APK, so we didn’t waste our time. Finally, because of this, I got the present job and caught up with the last bus of mobile Internet.

Never thought, I use ADT history has come to an end.




Google stopped updating ADT in 2014 and stopped supporting it completely two years later.

Gedit

I work for a company that develops Android platform. Since you compile the entire customized Android source code, the real development environment is not on the laptop in front of you, but on a remote Ubuntu workstation. So when I finished configuring the Windows environment on my laptop, I was completely blindsided and didn’t use it at all!

How do I look at the code? Open Ubuntu’s File manager (Nautilus), go to the directory where your code is located, and double-click on a.java file. At this point, an editor pops up with syntax highlighting — Gedit.




“Wow! Much better than Notepad on Windows!”

How to find variables, jump functions? CTRL + f search.

How do I jump to places outside this file? Search for the file in Nautilus, then double-click, CTRL + F.

What if I can’t find the file? Ask colleagues.

… The past can not bear to look back on the moon.

Gedit, it turns out, is much more powerful than it looks, and an extensible editor. But I don’t need it anymore.

Source Insight

I’ve never used Source Insight, but most people in my work environment do. In communication, often watch them use it to demonstrate.

This is a Windows editor with non – width fonts, running in Ubuntu with Wine.




It looks pretty good

It’s a good editor, if I’m forced to say so calmly. It is compatible with C/C++ and Java, in the import of Android (build tag), the code jump and view is very convenient. Function and class names can become unusually bold and conspicuous. While it is not possible to query all the calls to a function, it is possible to hack through a replacement preview.

However, once I imported the entire Android code, well, during the import process, I gave up. Look at others are good, why in my card can not move it?

Later I found out because they only imported part of the Android library. Usually it’s frameworks/base/, plus their own libraries, which of course don’t get stuck. However, how did I know which library I was importing?

Now that I think about it, IT was a failure, too. However, now I am very grateful for this failure.

The programmers who joined the company at the same time as me invariably became Source Insight users. As a result, they now do their jobs well, but still don’t understand the basics of Linux, Android, and Java, just like older employees.

By the way, I need to explain why IT’s so hard for me to talk about Source Insight with calm. This is the only non-equal-width font code editor I’ve seen, and most of my colleagues use the default configuration, which leads them to:

  1. You can’t tell a Tab from a Space!
  2. It doesn’t even indent properly!
  3. Empty characters everywhere at the end of the line!

These three points do not affect compilation, but violate the company’s stated programming specifications and affect collaboration efficiency. And as a naked eye can distinguish empty characters, code cleanliness of the person, I can not tolerate!

Since then, not only code editors, but Source Insight has made me feel bad about all plain text editors with unequal width fonts.

The final piece of the scales is that Source Insight, our company, is pirated!

Log viewer

At the beginning of my work, I did not write a lot of code, mainly looking at logs, bug solving.

Log file viewer, do not need strong editing function, but need strong view, cropping function.

My colleagues are divided into two factions, one is UltraEdit, the other is Notepad++.




UltraEdit is The world’s best text Editor for 20 years.




Notepad++ is open source software under the GPL.

Notepad++ has never been installed, I don’t know much about it. Occasionally use on other people’s computers, found the function is also very powerful. If I touch it first, then maybe things will change in the future.

The colleague who taught me how to read logs recommended UltraEdit. After I installed it, I found it was pirated! As mentioned before, I began to believe in “piracy is bad luck” before graduation, so I gave up here decisively.

When I want to switch, I suddenly think of Vim. In my sophomore year, a senior recommended this editor. When I installed it, I couldn’t wait to open it, crackled at random for a while, and didn’t enter a single character! (Vimer should know exactly which keys I’m missing.) The glass heart broke and clicked the Red Cross in the upper right corner. Until the system was changed, and it hasn’t been opened since; It hasn’t been installed since the system was replaced.

This time, it is also a coincidence.

Vim has a steep learning curve, but fortunately the log is not very demanding. HJKL is to move the cursor lower left and upper right (←↓↑→); * is to search for the current word; / Manually enter the search keyword. N Downward search; N Upward search; :v/KeyWord/d intercepts the line containing the KeyWord, and can also intercept other keywords in the result; U is to undo the last operation, CTRL + R is to undo the last u…

Since then, I’ve been viewing logs more efficiently than anyone else. Also, I became accustomed to mode switching and full keyboard operation.

Terminal + Vim

Writing here, finally to the point. (Reader: They’re all ready to close.)

The compilation of Android source code can only rely on commands in Terminal. (If I had started out as an application layer programmer, I might have moved on to a weaker world line.) In order to work, I had to brave the black screen that I had previously avoided.

At first, LIKE most people, I used a text file on the Ubuntu desktop to store frequently used commands, which I copied and pasted as needed. It was later discovered that multiple shell commands executed in Terminal could be placed ina single file and executed together. This has changed my attitude towards Terminal 180 degrees.

With the mouse for so many years, every time encountered mechanized operation, can only patience, exercise hand speed. And if I could use Terminal — which is almost certainly possible under Linux — I could aggregate these commands into a shell script file and execute them all together!

When I finished the first script and run that moment, like Zhang Xiaofan met the shock of the book of Heaven — heaven and earth is not benevolent, to all things for humble humble dog! I also seem to have a roar in my ear:

Wan! Thing to do! All!!!! Can be! Since! Move! Turn!




From defaulting to black on white, to liking white on black.

After that, the first thing you do to open an Ubuntu workstation is open Terminal, and the second thing you do is make it full screen.

Affected by this, I prefer to choose an editor that runs directly in Terminal. After much research, the only way to meet the needs of the job is to choose between Emacs and Vim.

Because of the leading edge, I learned the basic operations of Vim first while looking at logs, so I naturally became a Vimer.




Vim

As mentioned earlier, I’m “a person who can see empty characters with the naked eye.” This is not, of course, because my left eye is a wheel, my right eye is Yin and Yang, and there is an unblinded gaudanim alloy standing in the middle, but because Vim can make it visible.

However, even though Vim is an extensible editor, the most advanced configurations of the day don’t add up to make it comparable to professional Java ides. Java, a complex language with specs beyond C++ (98). Even if YOU can recite Ideas for Java programming backwards, you can’t say that programming in an editor without syntax checking is more efficient than an IDE.

It was because of my naive ignorance, and I had no other choice but to use Vim. Every time I change the code, I see a screen full of compilation errors after MM (Android), and I can only stare at the changes one by one.

At this time, it is very much like the shaolin Temple movies I saw when I was a child, in which a novice student carries a sandbag and carries two wooden buckets with sharp bottoms to fetch water. Up and down the mountain this tired, halfway can not rest, otherwise the water will be scattered. Although hard, but the effect is equally remarkable. In the film, the new disciple, after unlocking the sandbag, jumps up a tree and flies like a horse. And I also made rapid progress, not only understand a lot of Java details, but also forged a good relationship with Javac.

Later, when I wrote the code in Vim, it would compile naturally; As long as there is no problem with the code, there really is no problem.

This period of streaking day, there is nearly a year of time, the pain of rapid growth.

Vim + Eclipse + Eclim

Only those who have streaked know the importance of underwear.

If I had found the./development/ide/ directory in the Android source code, maybe the world line would have changed again.

$ ls development/ide/ eclipse emacs intellij xcodeCopy the code

If I had known, I might have chosen Emacs.

Eclipse import Android Java layer source code, 32 core 64G workstation, about half an hour. Since then, Eclipse has been slow to use, especially when jumping to an unopened file, and the code has even been slowly colored line by line from white.

In terms of jumps, Eclipse has accurate syntax, but sometimes not as fast as regular expression based Ctags + Cscope; When it comes to completion, simply opening the source code is faster with Ctrl+ N (based on Word in all the files in buffer) because it doesn’t get stuck.

I switched from pure Vim to Eclipse-connected Vim because of three things: Eclim, YouCompleteMe, and The Code Clean Way.

Eclim consists of roughly three parts. One is the Eclipse plug-in, the other is the Vim plug-in, and the third is eclimd that connects the two. It allows users to use gVim in Eclipse, or to use some of Eclipse’s features in Vim or gVim.

Compiling YouCompleteMe successfully on an offline workstation with no root permissions is not an easy task. And when I did, it kind of saved me from getting stuck with Eclim completion, which made me tolerate bugs, fix suggestions, etc.

The Book, The Way Code Is Clean, hit me hard at the time. When I wrote an Android project quickly using Vim, I struggled with the quality of the code. Although there was nothing wrong with the application itself, the code was not pretty, which reduced my sense of accomplishment. After reading this book, I have more understanding and pursuit of highly readable code. Since Vim had trouble even collating imports and could not automatically remove useless imports, it looked for additional tools. Before I discovered Android Lint, I found a way to import Android platform source code into Eclipse.

To improve the quality of Java code, using an IDE is a must. Java Lint, Android Lint, etc., have a lot of previous experience. If you’ve read Effective Java but don’t know how to use it, an IDE can help.

Android Studio

It is my experience with Eclipse that has allowed me to expand my horizons beyond Vim. For my next system application, I stick to Android Studio for development.

At v2.x, Android Studio was arguably the best IDE for Android. However, in v1.x and before, my opinion is: worst IDE ever!

I’ve never seen an IDE so cocky except this one. Create a Hello World program that can’t even compile it.

Also, obviously the last version is fine, update to the next version will not compile!

First start card half a day!

Sometimes sync does not stop when the network is disconnected!

Worst of all, once I opened it, my 8GB working ThinkPad with a 4-core I7 got stuck with a broken mouse.

Later, when I learned more, I found that it was the wrong way to open it. On Windows, you need at least as much memory as a solid-state drive; Linux doesn’t have this problem, either. Switching from Linux to the same computer immediately runs smoothly and you can run three or four projects at the same time. Even on the MacBook Air it works well, turning on and off smoothly and working without any problems.

Android Studio was developed based on IntelliJ IDEA. In addition to inherited Java Lint, code formatting, Copyright, and tons of other plugins, Android Lint, Instant Run, and more have been added.

Android has a lot of design problems, but the biggest of them are design problems created to cover up design problems — not allowing for rapid iteration of forward-compatible apis. Write common system application is good, because only need to be compatible with the current system, API level fixed; If you want to write applications that are compatible with multiple versions of the system, without a mature IDE, you don’t even know when an interface is added, when it is discarded, and when it starts dropping exceptions. You need to waste a lot of time studying the source code, otherwise there will be unknowable errors. Android Studio can automatically detect these and suggest changes. In addition, there are source code view, file templates, code generation and other functions, also very time saving, reflects the power of Google custom development IDE.

However, there are common faults with ides, and Android Studio is no exception. Ides often suffer from overcomputing, taking up a lot of computer resources and providing functionality that is largely unused.

Also, the template is wrong. As mentioned earlier, the code generated by myself will not compile, which has been fixed for a long time and has not appeared since version 2.0. Android Lint, however, has a bunch of warnings in its generated code. To make matters worse, I just generated a Hello World, which compiled to several megabytes in size. This was caused by v4, V7, and Design packages, and it’s only going to get worse.

If the Rebuild file is missing or the Gradle sync fails, git clean-fdx will not work.

In short, if you don’t know how it works, you can spend a lot of time “making sure the IDE works” and give that time back.

The Editor and IDE

This is a big topic, can open a single swastika; This is also an unavoidable topic, as long as both sides are mentioned.

The IDE is an Integrated Development Environment, and the core tool is still the Editor. When I was a kid, I thought an IDE was just a notepad with a compile-run button, which, in retrospect, is true. Editing is at the heart of everything, and the rest of the functionality is meant to assist editing.

If we can generalize it broadly, programmers have three levels of proficiency in any programming language: elementary, intermediate, and advanced.

  • At the beginning, an Editor is appropriate. Beginners know nothing, so they need to learn everything. Ides cover up the shortcomings of beginners and get them into their comfort zone ahead of time. Since then, I’ve only written code, but I don’t know what I’m missing, so I can’t improve.

    Actually, compiling Hello World from the command line is not too difficult, and as the code gets more complex, the need for environment configuration increases. Driven by this need, beginners will naturally find the right direction of learning.

  • At intermediate, an IDE is appropriate. Beginners don’t need to worry about efficiency because their code is basically unusable. Mid-level programmers are not. They tend to be the backbone and need to write code efficiently. IDE is the best choice.

    After becoming proficient with an Editor, a programmer can quickly pick up any IDE. Because they already know what the IDE is doing behind the screen.

  • In advanced, it doesn’t matter what you use. With an IDE, it’s someone else’s custom integrated development environment. With Editor, it is your own custom integrated development environment. And whatever goes wrong, it can fix itself quickly.

Not everyone who uses an IDE is an intermediate programmer. Many beginners who use IDE directly, like me when I was a student, are not even beginners at all. When the IDE doesn’t make mistakes, it looks like it can write code. And once the IDE strikes, you can only wait. This form of loss of efficiency, more than anything else.

Intermediate programmers who cannot live without an IDE and whose productivity depends entirely on the accumulation of experience may not be able to use the IDE well and never reach the advanced level.

And that’s just for a programming language. If you need to work with multiple programming languages, mastering an Editor is a prerequisite for rapid success. Because the more specific something is, the less universal it is; The more successfully an IDE is customized, the less well it handles other languages.

Take Android Studio and IntelliJ IDEA, for example, and they don’t handle Groovy for the JVM (I don’t know about Kotlin and Scala). If you do more work at compile time and make build.gradle more complex, the IDE starts messing around. How can you happily write code if the syntax warnings you rely on are wrong?

For IDE programmers, learning a new language often involves learning a new IDE without keyboard shortcuts; For the Editor programmer, learning a new language, which means installing an extra plug-in or two, preserves most of the programming habits.

Some Editor programmers, who think their swords are unrivalled, use them to chop wood, chop trees, and hammer nails. And many IDE programmers, after several years of work, hit a bottleneck, technology is difficult to move forward. Both branches must be completed in order to advance to Perfect Ending.

general

Others like Emacs, Sublime Text, and Visual Studio Code that I’ve only installed and experienced, but have not encountered at work, won’t go into details. Atom used it for a while, and Vim eventually took over everything it did for me.




Emacs: Esc+Meta+Alt+Ctrl+Shift




Sublime Text is the only paid software available for free among the major editors, and has great looks.




Whether Microsoft’s conscience, VS Code, can make a big impact in the fragmented open source world is unclear.




I used To write Markdown with Atom for a while, but later I used Vim instead.

Eventually, I became a Vimer.

Even now, when most of the development is in Android Studio, I’m still a Vimer. Most of the time, I work with the plugin IdeaVim.

When doing some Git operations, Gradle operations and file operations, I will drag the Terminal at the bottom of the window to the middle part of the screen. Then encountered editing operations, often directly open Vim to solve. Sometimes I’d spend the better part of an afternoon in Android Studio’s Terminal, seamlessly switching between Vim and Bash — which is pretty embarrassing to think about.

Vim is like a basalt iron esaber. It has no edge at the beginning, but it can sharpen its unique edge and cut iron like mud. It grew with me when I was weak; When MY martial arts, it is as good as any soldier.

Afterword.

I don’t think the lady even made it this far, or she can leave.

I’m gonna say something that only men who cheat and play with women appreciate.




If all the editors I’ve ever met were women…

Visual Studio is my first love in childhood, but unfortunately I have left my hometown. After all previous classics the world of mortals discovers, actually in those days this neighbor little sister, not only family is illustrious, also be a rare beauty.

Vim is an aloof beauty. She always wore a veil, a black dress, and paid no attention to the vagabonds. Many people wanted to see her, but she rebuffed them. And when I unveiled her, I fell in love with her.

Source Insight, for all her beauty, was a sick hooker whose business I never took care of. However, her customers often go to the bathroom with me and are upset.

Gedit is a beautiful woman, but not beautiful enough. I just came out of the backwoods and met her. However, after seeing the real beauty, she turns out to be just a servant girl. But it’s a dooming maid — if I go into the wrong room, I usually don’t quit.

Android Studio is a noble woman with elegant temperament. She behaved according to law, dressed in fancy dresses, and spent money like water. I finally got married to her out of the desire to cling to the powerful. I try to look for her good qualities, accept her bad qualities and treat her with respect. But, I married her just to have a baby, my heart will always be Vim’s! She couldn’t stop me from cheating, even in front of me.

Atom is a sweet little girl, and I occasionally feel a soft voice and a soft body.

As for Notepad, if I can’t find another woman, I’ll call her for a last-minute fix.