Forget the word but
In improv, there is this idea called “yes and”. The idea is that the first person goes and starts telling a story. The second person (and everyone after them) picks up with “yes and” and then continues adding to the story. What you want to avoid doing is using the word “but”. With “yes and” we are validating what’s happened so far and then adding to the story. When we say “yes, but” we lose that validation and we stop adding to the story. Instead the “but” invalidates what was said before. More importantly, it stops the story from moving forward.
This idea applies everywhere, not just improv. Repeat out loud: “I really want to go on vacation this year, but I don’t have the money.” Note how it makes you feel. It probably feels hopeless, like that vacation isn’t going to happen. Now try changing it up a little: “I want to go on vacation this year, and I don’t have the money.” It should feel a little more hopefully. It should give you room to add to the story and ask some questions like: How much money do I have? or Is there something cheaper that I could do for vacation? It opens up your imagination.
You can apply this to writing code too. “I want to work on improving our process and I’m under a lot of pressure due to this deadline.” Using “and” here instead of “but” should allow you to ask questions like: Can I just make my improvements after the deadline? Is there something I could do now that wouldn’t require a large time investment? You suddenly appear to have more options.
So try catching yourself using the word “but” and replace it with “and” and notice the difference. Eventually, you may decide to remove it from your vocabulary altogether.