Very quick idea. Would anyone else be up for trying to write a dev.to article a day during the rest of November?
This is, of course, a big cheat on my part because I'm counting this as my first one.
My lesson for the day was to always stash your code. Even for experiments.
This post by @srebalaji saved me quite a bit of time.
Long story short I was asked to see if something was possible with our code several months ago. I did the experiment we agreed it worked but not to implement it.
Because our Git branching is already pretty Byzantine I didn't do what I should have done and create a branch for it. Luckily though I did stash it with an almost sensible label.
Today I was asked to make the change, and thanks to having a stashed copy the code was still findable.
Looking back there are a couple of learns for me. Ones I really should have learned long ago.
- Always keep your code safe.
- People do change their minds or come back to things
- A stash can sometimes save your bacon.