by rnhmjoj · 9y ago · 0 comments
I once lost my emacs dotfile and suddenly i was almost unable to use Emacs on my own pc.
Since then, i've decided to apply as little customisation as possible to software I use, and read the documentation and learn the standard configuration instead.
For some reasons nowadays it's trendy to add colors, bells and whistles to things but I've found out that learning the standard/default configuration lets me be instantly capable of intervention on whatever machine i put my hands on. Worst case scenario, i can tell programs to ignore configuration files.
The only downside I see with customization is that it can be huge timesink.
I guess to each his own, but I think you're really missing out.
P. S. Backups.
It's only happened to me once, but that one experience made me take a really hard look at my workflow, and years later, I have no regrets about scaling back my configs. I guess it really just depends on your job and on-call/firefighting responsibilities.
There is no excuse for a single point of failure in 2017. Not trying to sound like an ass but....
You did say it was years ago, so what I said seems to be true for today, no judgment on your situation years ago. My first major shit, got to fix it was on Solaris 2.51 so that shows my age.
I bind bash and tmux to vim keymaps. If that is not on the box it is the first thing I fix. I will be fast to resolve the issue if my fingers just work as I have trained them :)
Occasionally acting as third-line support means real production disasters aren't an unfamiliar zone.
I also keep a separate file that lists the plugins to install and the source that from my main .vimrc. A lot of my coworkers have wanted my main vimrc for an "out of the box setup" of Vim and found it best for them to specify their own plugins rather than just blindly use mine - it also makes it easier for them to grab the latest copy without any conflicts.
Related note, check out fish shell [1], whose design document has an interesting argument against configurability in software.
[1] http://fishshell.com/docs/current/design.htmlI disagree. It can be more complex, but it is not at all inherent. If I configure my shell, my editor, my whatever software to work more like other software I use (keybindings, etc), I can actually make it less complex for me, because copying over a few config files on those rare occassions I need to is much faster than trying to learn a whole new set of keybindings/behaviors (and trying to keep all of the different ones in my head).
Yes it is possible to tinker yourself into oblivion (especially if you change the same items frequently, and never come to a stable state), but that is by no means the inevitible outcome.
I also very much disagree with this line from the fish shell design page:
"Every configuration option in a program is a place where the program is too stupid to figure out for itself what the user really wants, and should be considered a failure of both the program and the programmer who implemented it."
Now I understand what they are getting at, and if they didn't start that sentence with "Every" I would not disagree so much. Yes your program should make it as easy as possible for you to figure out how to do what you want to do. However, not everyone in this world is the same. People have different preferences on how things work, and some of the choices on how to do things are mutually exculsive. So every configuration option is most definitly NOT a failure of the program and the programmer who implemented it.
Granted there are programs out there that were seemingly made to purposefully obfuscate how they work (like the dev who wrote them gets some kind of sick pleasure out of making users' lives difficult :-D ). Obviously you should do your best to avoid that outcome (which almost aways comes not out of programmer malice, but other factors, I'm sure).
There is a place, I think, for a really good set of defaults that are consistent and easy for users to follow. I do not agree, however, that it must come at the price of forbidding users to customize their software. Tuck those customization options away if you must (if your philosophy is to encourage the use of the defaults), but I think it is a mistake to forbid user customization. If someone finds your program useful enough to want to customize it to their tastes, you risk losing a valuable customer/user who will move on to something that lets them shape it to work they want it to.
[edited to remove unintentional indent -- can't seem to break that habit of putting spaces at the beginning of the first line of a paragraph :D ]
> People have different preferences on how things work, and some of the choices on how to do things are mutually exculsive.
Yes! But asking the user to manually configure the system is a lame way to accomodate those preferences. It's better if the software can learn from the user. For example, if the user runs a certain command frequently, don't wait for the user to define an alias, just suggest it while the user types. Your shell can become more customized to you, with no configuration necessary.
This doesn't work for everything - key bindings for example. But it captures the "no configuration" world view.
> Tuck those customization options away if you must (if your philosophy is to encourage the use of the defaults), but I think it is a mistake to forbid user customization.
Not all configuration options are there to enable user customization. A lot of configuration is just punts on hard problems or decisions. For example, options like zsh's RC_QUOTES or bash's histappend. These don't reflect user preferences. They're just legacy or churn. The shell should just define its own language, and not make the user decide how '' is interpreted.
Every configuration point incurs a cost. The user who moved on to the über-flexible system discovered which plug-ins require which options, and which combinations are incompatible with each other.
This is where a layered approach really shines: have a rigid core with a flexible exterior. Allow the user to set the prompt, colors, key bindings, wrap commands likeΩ `grep` and `ls` to set colors, etc. Prefer open-ended customization (let the user write the function) instead of enumerated configuration (pick from N behaviors), an keep the core consistent so that there's something stable to build on. That's fish's philosophy.
Emacs in particular is almost useless out of the box. But that's because of packages and modes; not because of key bindings and tweaks.
That being said, if a tool doesn't need extensive customization or doesn't ship with a broken config, I'll learn the defaults. I barely tweaked tmux.conf - I turned on xterm-keys and set-titles. And I've certainly reduced the depth of my configuration as the breadth of tools I use has increased.
And that's key: if most of my time is spent on one or two tools, it's well worth my time customizing those tools, because even fractional improvements will accumulate.
Deeper experience and knowledge pays off way more than learning each incremental improvement new languages/frameworks/etc offer.
* some languages are not included by default * some very good extensions are not included by default also (ace-jump)
Now it is superceded by avy (by abo-abo on GitHub) in every way + new features.
For such packages that always have room for improvement and not related to core emacs functionality, it is better that they stay in external repositories on GNU Elpa or Melpa.
That way, older packages do not have to get tied with emacs core. Currently Ido package is in that situation. I used to use Ido, but now I use the ivy package instead. Some people prefer to use helm instead. I would not be affected at all if Ido was removed from the emacs core in future and moved to GNU Elpa.
I've taken the approach of 'learn the defaults' for vim, but on tmux that simply won't stand because the defaults have so much room for improvement.
Pretty much everything I've read on tmux suggests the - and | bindings for window splits, same goes for hjkl bindings for movement. Adding these bindings would go a long way towards standardizing tmux.
C-a a. Using emacs with screen for many years, this is almost automatic for me.
As for editors, I use vim. (With almost no customization, as others have advocated.)
Er, what about an LDAP server for user profiles and an NFS server for home directories, like the university timesharing clusters of olde? Any box you'd log into would have "your config files" (in fact, your whole home directory) on it.
Or, if the LDAP part is a hassle, be a hipster and pull all the 'user profile' info from GitHub (https://github.com/tsutsu/github-auth3).
If you are creating user accounts on servers by hand in a datacenter, then when that person quits... well, you have other problems I guess.
Now I can log into any machine and be 100% productive.
Using vanilla Emacs is like writing a GUI application with nothing but the primitive X (or GDI) operations. The potential is there and is visible, and it's sometimes the right thing to do, but normally you'd use GTK or QT, right? Same is true with Emacs: in its vanilla form, it's just an API for text editing with a bunch of outdated defaults. It's superb as a platform for writing text-editing related (and sometimes others) applications in Elisp. I think that Emacs is not supposed to be used in that state at all, even. Vim, on the other hand, is pretty much designed around one UI & text-editing philosophy, which makes it less extensible, but much more usable out of the box.
Edit: mg is an emacs-like editor that is even leaner than vi, has off course the same key bindings as emacs, and also shares the same openbsd roots as tmux. It is also the default editor in openbsd.
The solution, of course, is to improve the defaults, but that's not always practically possible. Sometimes the maintainers refuse to do the right thing, and sometimes there is no right thing (e.g. should be use C-{b,f,p,n} or hlkj?).
I'd rather have a system which enables me to mold it to myself — even at the risk of being unable to use the same system configured differently — then have a system which forces me to do the wrong thing.
Limited to user prefs, Key bindings etc.
Wouldnt solve everything but would address the basics.
i.e. Atom, Emacs, Neovim, and PyCharm. I try to stick to one, but switch around to get the best of each of them. It's been driving me crazy lately thought.
A common pattern in mailing lists/forums/etc. is the "just make it an option" guy. People are talking about their wishlists for future versions of <Gimp/emacs/Xorg/LibreOffice/whatever>, and sometimes these wishlists conflict. One group says a UI should be one way, another group says it should be some other mutually exclusive way, and a third group thinks the developers should implement both and just make it an option in a dotfile to make everyone happy.
Sometimes "just make it an option" guy is right, but in hindsight it should never be the default resolution to the disagreement. In those days I defaulted to "just make it an option", and really internalized that philosophy because it felt like all benefit and no cost. Why wouldn't you make everyone happy, if you could do that instead of making one group happy at the expense of another group? I think it's a really common trap people fall into early on because they have yet to directly perceive the costs that that approach can incur over time in software development. Sometimes they've also tricked themselves into overvaluing their workflows and muscle memory, which they may have defined in part because it was easier for them to define their own keybindings than memorize what the default ones were, which I now think is an antipattern in itself.
The main thing that changed for me is spending the intervening decades doing work on multiple machines all the time, running different versions of different OSes, often times starting from fresh installs. That made it more pragmatic to always learn software in its default config, and only tweak configs if it's absolutely necessary or otherwise pretty important to me. It's also forced me to learn all sorts of useful stuff that I probably wouldn't have otherwise. It also drove home just how much my desire to tweak configs was just because it was fun for me (and I had lots more free time back then), rather than something that made me more effective as an engineer.
But that's just from a user perspective. From a developer perspective, having "just make it an option" be the default form of conflict resolution leads to all sorts of unanticipated complications in practice. Every time an alternative code path is added for something, the code becomes a teensy bit more fragile and likely accrues a teensy bit of technical debt. The fragility and technical debt accrues over the years, and eventually can turn even the best software into an unmaintainable mess. I'm not dogmatic about it- some things should be options. It's just never my default position, and I have a much higher bar nowadays for making something an option.
While it's easy enough to put your dotfiles on github, and pull them down onto every machine you touch, or possibly even automate that, it doesn't solve the fundamental problem that software that requires extensive customization is not good software.
If the right trade-offs haven't already been made in the default configuration, then it's an immature application waiting for a rewrite.
Google dotfiles in git. It's easier than you think.