43

Today a colleague was making weird noises because he was modifying some data files where half of the data needed to be updated with a name field, there were 4 files all about 1200 lines big.

I asked how he was doing and he said he was ready to kill himself, after he explained why I asked why he was doing if manually. He said he normally uses regex for it but he couldnt do this with a regex.

I opened VS code for him, used the multiselect thing (CTRL+D) and changed one of the files in about 2 minutes. Something he was working on for over half an hour already.... He thanked me about a million times for explaining it to him.

If you ever find yourself in a position where you have a tedious task which takes hours, please ask if somebody knows a way of doing it quicker. Doing something in 2 minutes is quite a bit cheaper and better for your mental state than doing the same thing manually In 3 hours (our estimate)

Comments
  • 6
    Know your tools 👍

    So many things can be done by intelligent search&replace, keyboard macro, multiple selection/cursor, small scripts etc., etc.

    And when you unleash the power of a decent shell and the right tools on it, you can do almost anything.
  • 2
    Notepad ++ macros are another tool that can make repeated updates easier.
  • 2
    @ddephor well you cant know everything about all your tools. Its mainly about asking questions.
  • 0
    :%s/this/that/g
Add Comment