in reply to Re^2: Isolating DNA cont.
in thread Isolating DNA cont.

Nowadays, without really having to think about it, I start sections of code like

I literally don't have to think about it because my editor does it for me. It is worth the investment of getting to know your editor of choice so that such boilerplate can be automated away.

Replies are listed 'Best First'.
Re^4: Isolating DNA cont.
by talexb (Chancellor) on Dec 22, 2018 at 21:15 UTC
      I literally don't have to think about it because my editor does it for me.

    Sure -- and I could do the same, but I prefer to type it myself. That's a personal preference -- whatever makes you the most productive you, go right ahead and do that.

    For instance (he said, donning his fireproof suit), I prefer vim to emacs -- I'm always amazed at what a powerful tool emacs is, but I'm happy with the less powerful vim. I know enough about the command line arguments (o argument for horizontal split, O for my favourite layout, vertical split) and the in-editor arguments (^W ^R to rotate windows, ^W = to make them equal sizes, gq} to wrap things, marking a block and to have perltidy clean it up) to be productive.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Re^4: Isolating DNA cont.
by kcott (Archbishop) on Dec 22, 2018 at 12:25 UTC
    "I literally don't have to think about it because my editor does it for me."

    I suspect that's not strictly true. Wouldn't you need to set up some sort of macros, shortcuts, hotkeys, etc. and then activate them to get the boilerplate added to the code. I'd love an editor that just knows exactly what I wanted, without me having to think about it, and then just automatically adds the appropriate code; however, I don't think such a beast exists.

    "It is worth the investment of getting to know your editor of choice ..."

    I've been using vi (or related versions, e.g. vim) for over 30 years. I believe I know it well.

    "... so that such boilerplate can be automated away."

    Every construct for every (programming, markup, etc.) language I use? I don't think so. Muscle memory requires no actual thinking: I'm usually thinking about the code logic to be added whilst I automatically type the basic construct boilerplate (which, in general, is only of the order of about a dozen keystrokes or so).

    — Ken