DEV Community

Discussion on: Do you recognize your code 6 months later?

Collapse
 
nestedsoftware profile image
Nested Software • Edited

I definitely agree with the quote. It doesn't mean the old code is bad, but as @awwsmm points out, there is a lot of stuff in our working memory when we're actively engaged with a project that goes away over time. That makes it feel "obvious" how to do things in the moment, but then later on all that stuff becomes less clear.

For me this really comes into sharp relief with things like configuration, packaging, and deployment. I think that makes it really important to automate as much of such things as possible. I try to create shell scripts that will automatically do the things needed to get an app up and running, and I also try to document why those decisions were made (like why did I change this nginx config file).

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

I automate a lot. But I've also learned to put help syntax on my scripts. Even if it's just a one-line thing, it lets me remember what I'm supposed to do with the script. It's a bad feeling knowing that you had a process completely automated, but can't remember how to invoke the automation.

Collapse
 
nestedsoftware profile image
Nested Software

Yes, I put that kind of stuff into a readme.md file at the top of the project. My objective is to set everything up from scratch on a brand new vm only by following the readme. If I can get that to work, I know I have a reproducible workflow...

Thread Thread
 
mortoray profile image
edA‑qa mort‑ora‑y

I religiously create and follow README's as well. I use Makefiles and Fabric files also -- since they have top-level targets I can look at, and they follow common names.