‹ BackHN Continuity

Thread

Small programming tricks

681 points · 294 comments · signa11

  1. phforms · · focus · HN ↗
    The thing with a lot of these tricks is that you have to get into the habit of using them. I knew `Ctrl+r` for history since I learned about the command line. I even have a nice shell integration with fzf. But I still used the up/down arrow keys for years or scrolled up when I was looking for a previous command, because I never remembered the shortcut and just took the path of least resistance to find something.

    Usually what I do is writing these tricks down to a document that is easily accessible at a place where I know that I will look for when failing to remember them. I have a directory of docs where I write stuff like this down by language/tool/etc., so I can quickly look it up without having to search the internet. But I also have to actively remind myself that these things exist whenever I have a problem, stop me from just doing the inefficient thing.

    1. dec0dedab0de · · focus · HN ↗
      I was my most effective when I had a bunch of cheat sheets taped up in my workspace.
      1. pards · · focus · HN ↗
        Hot-desking killed this practice. I now get desk anxiety on my in-office days
        1. sublinear · · focus · HN ↗
          I am young enough that my entire career has been markdown files, screenshots, and photos on my phone. I (a)sync everywhere by pushing git lfs commits to my home server.

          Seems like overkill until it saves my ass. It continues to do so almost half a decade into all the LLM hype. It hits the sweet spot between simplicity, convenience, reliability, and precision.

          People strongly underestimate how good the git life can be, especially with all the blogspam on here trying to dethrone it lately.

          1. guenthert · · focus · HN ↗
            > I (a)sync everywhere by pushing git lfs commits to my home server.

            Don't let IT hear that unless you work on FOSS.

            1. mitxela · · focus · HN ↗
              Don't tell any authority that you are doing a thing, unless you have a good reason to tell them. It cannot possibly help you, it can only result in them telling you you can't do the thing any more.

              And don't talk to police as a suspect. (I'm not sure if the rule still applies if you are the one reporting a crime)

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.