How to Write Unmaintainable Code (2017)
I actually like using short variable names. Using &quot;i&quot; as an index variable has been widely accepted. It saves a lot of typing, the use case is clear and it is usually tied the a block which is visually identifiable.<p>I carry over the same principles to functions&#x2F;methods. Functions are usually less than a screen which makes it rather easy to pick up the context and understand the program flow and the use of variables. I use &quot;list&quot; if there is there is a single list. The context usually defines what is in there. Maybe the function name, the type declarations or the fact that we are in a part of code handling lists of customers. How hard is it to guess what countCustomers(list) or incrementCustomersScore(list, n) is doing? Writing incrementCustomersScore(goodCustomerList, customerScoreDelta) is just redundant. Variable names just need to be descriptive enough to define their role within it&#x27;s context. If the function is very small, the variable names can be very short.<p>Local variables are the smallest named things in our systems, whith a very small scope, there shouldn&#x27;t be an excessive naming cult around it. Give advice how to properly name projects, packages, namespaces and classes and I start listening. We are really bad at this.