Post AOTWt7P3Awph9BtXQO by tychi@smallcamp.art
 (DIR) More posts by tychi@smallcamp.art
 (DIR) Post #AOTVNzpfApJKjfwGH2 by urusan@fosstodon.org
       2022-10-12T00:51:24Z
       
       0 likes, 1 repeats
       
       To Java developers, long names in source code are sensible, and they are preferred over short names.
       
 (DIR) Post #AOTVSU20psN7YTr37Q by tychi@smallcamp.art
       2022-10-12T00:52:14Z
       
       0 likes, 0 repeats
       
       @urusan xvsaVariableNamedX
       
 (DIR) Post #AOTWaWguvl244iO1hI by urusan@fosstodon.org
       2022-10-12T01:04:55Z
       
       0 likes, 0 repeats
       
       @tychi It should be a meaningful long name, otherwise it is absurd.xvsunknownValueInFirstDimensionor better yetdeskLength
       
 (DIR) Post #AOTWt7P3Awph9BtXQO by tychi@smallcamp.art
       2022-10-12T01:08:16Z
       
       0 likes, 0 repeats
       
       @urusan what about naming every variable with their contentsred = 'red'
       
 (DIR) Post #AOTY45qnO76lTJfZlA by urusan@fosstodon.org
       2022-10-12T01:21:27Z
       
       0 likes, 0 repeats
       
       @tychi Depends on what you're doing.Though a constant would be static final and all upper case by convention in Java, ex.:private static final RED = "red";Most of the time though, you'd either have an enumeration, a class with a bunch of related public constants, or you wouldn't have a constant and instead your variable would have some better name: paintColor = RED;
       
 (DIR) Post #AOTkmEFohhFxj7BWme by mdhughes@appdot.net
       2022-10-12T03:43:54Z
       
       0 likes, 0 repeats
       
       @urusan Depends on what you're doing. Loops and temp vars should be 1-char or so. Local functions should be short. Public APIs should be longer, but Java has serious composition problems, so not too long: NetworkServicesFactory.getFactory().createTCPServerSocket() etc.