24

Today I discovered what slowed my productivity the most: variable naming.

In a project I was naming many variables 'dirname' in different parts of the my code, but it represented 3 things: only the name of the directory, relative path + directory, and absolute path + directory.

I wasted to much time just figuring out which was which everytime until I finally decided to organize variables names better and see the wonders of the world. Result:
- dirname: only the name
- reldirname: relative path + dir
- absdirname: absolute path + dir

Such simple solution, yet took me years to actually see the benefits, my god

(First devRant post btw :3)

Comments
Add Comment