I am inspired to write this post due to a flood of questions in the form of “which editor is best” or “which IDE do you” on some of the forums that I either lurk or actively participate in.
These kind of questions often kick of religious wars that I refuse to participate in. The mantra I recite all the time is “use what you are comfortable with.” If you have no starting point now my saying what I use on a daily basis can serve as a guide. Keep in mind that some of the tools (most of actually) have their own learning curve associated with them.
The purpose of using a tool in the first place is to make the job at hand easier or serve some sort of function that would be missing without the tool. As means of a ridiculous example let’s take the task of driving nails into wood. Let’s make it a hard wood like oak or walnut. I’ve never seen anybody take a nail in their hand and press it into an oak plank to attach it to another oak plank. Common sense would tell you not to do that. You use a hammer. A rock could work in place of a hammer but a hammer is designed purposefully for the job. Rocks tend to chip when subject to the stress of striking a piece of metal repeatedly and that rock could break in your hand. The steel in a hammer is usually tempered to a point where it can absorb the energy of striking that bit of metal repeatedly while transferring its kinetic energy to the nail to insert it into the wood.
So what do I consider to be the tools of the trade?
I am a Linux all the way sort of person. I cannot stand Windows or MacOS and have long standardized on Linux as my OS of choice. I started with Linux way back when Linux was quite frankly a PITA to get installed and running correctly on any hardware much less my first Linux host as a Sparc 20 that I managed to port Linux to. That was a project in and of itself I assure you and I don’t even know if I could duplicate that today. If my life depended on it I suppose I’d figure it out but with all the good distributions out there why would I even need to? Besides the best Sparc 20 is a sluggish dinosaur compared with even modern consumer grand laptops and desktops.
My distro of choice (at least this year) is Ubuntu and my rather ancient laptop (HP Pavilion dv7, 8Gb RAM) was recently upgraded from Ubuntu 14LTS to Ubuntu 18.04LTS. Still cleaning up the collateral damage but that’s another story for another time.
Basic stock in trade for anybody doing any sort of Unix/Linux related work is some form of editor. If you are editing configuration files, Docker files, Perl code or whatever at some point your going to need to use an editor. VI? VIM? Emacs? Guess what I use all of them.
I do the bulk of my programming for Docker and Perl in Emacs. There… I said it. I started using Emacs back in the late 1990 timeframe and haven’t looked back. Its advantage is its extensibility and if you know or can learn Lisp you can do all sorts of things you couldn’t do with lighter weight editors. That statement is a good segue into the disadvantage of Emacs. It is a very bloated editor since it has so many extension points and features. It is at its best when used in an environment where X11 is available such as on a laptop in the MATE desktop environment.
So what about when X11 is not available? No sweat, that’s where VI/VIM comes in. If all I want to do is log into a remote machine and do a quick edit on a configuration file then I’m going to use VIM instead of Emacs. VIM comes up immediately (or near to it) after I invoke it in the command line and Emacs takes a while. I have impatient tendencies so I really don’t want to wait forty seconds (maybe not even that long) for Emacs to come up so I can do a two second edit.
I am not horribly fond of IDE environments. Most can do a few jobs well and not do others very well. For the time being I am using Netbeans as my IDE of choice for any Java development I am doing. I also use Netbeans when I am writing pipeline code (shared libraries and pipelines) for Jenkins in Groovy. I’ve also used Anjuta for C and C++ projects.
Puppet Labs has released (and continues to release new versions of) pdk or Puppet Development Kit. It has a few warts and I’m probably going to craft a post about just using pdk. What it helps with is laying out a Puppet module (puppet module generate does the same thing) but also creating new classes along with the skeleton of the RSPec testing code. Very easy to use and I’ve used it since laying my hands on it long ago.
One quibble I have with PDK is its insistence during an upgrade of removing the “Emacs” entries from .gitignore. Hate that.
Being a bit of a Git bigot and very much a DIY kinda guy I opted to convert from Bitbucket (still love the product but…) I decided to go with GOGS as my SCM repository. I host mine in a Docker instance. Very much reminiscent of Bitbucket in its look and feel. My one criticism is installation is not always the smoothest operation going and not always very clear in the instructions. Once you get it working for you though it runs very smoothly.
Favorite Scripting Language
I have been using Perl as my scripting language since 1988 or so when I downloaded from comp.sources on the USENET. Whenever I start to write a script you can bet the first line is going to be #!/usr/bin/perl -w ninety percent of the time. Perl in my mind combines the goodness of shell programming and C. I’ll stop short of comparing Perl to C++ in any way since the OO interface to Perl has a lot of differences and is not at all strict.
For strongly typed languages I’ll use Java, C or C++ and not in order of preference in any way. I’m firm believer in using the right tool for the job and don’t try to force fit languages to do things they weren’t designed to do. I also use Ruby when I’m writing extensions to Puppet (custom facts and providers) but I haven’t warmed up to it yet.
Python? Nah. I prefer to leave snakes the hell alone. Someday I know I’ll have to use it or maintain someone else’s code in Python. Languages are about syntax and I’ve learned enough languages that if forced to I’d pick up Python too.