文章预览
我有一个同事,能力很强,BUG率很低。 但我每次看他的变量命名,都有种想打人的冲动,也不是我太菜,只是.....(直接上代码吧。) totalNumberOfItems = 150 averageProcessingTime = 5.25 maximumAllowedConnections = 100 configurationSettings = { "timeout" : 30 , "retries" : 5 } initializationParameters = { "mode" : "auto" , "threshold" : 0.75 } temporaryFilePath = "/tmp/data.txt" currentUserSession = "abc123xyz" databaseConnectionString = "Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;" applicationErrorMessage = "An unexpected error occurred." userAuthenticationToken = "abcdef123456" 这样看起来还好,但是结合到到应用中就会变成这样: public class AppDemo { public static void main (String[] args) { // 定义变量 int totalNumberOfItems = 150 ; double ave
………………………………