33

Unless you had a horrible accident where you lost most of your fingers, I don't understand why anyone would do this. I had to double check I wasn't looking at obfuscated code.

```
String a;
String flag;
String tp;
String n;
String chn;
String lt;
String lg;
String bid;
String d;
```

Comments
  • 1
    Slack user spotted
  • 0
    Depends on the purpose. I list variables vertically for XML and JSON objects so I know they are all there in the file because I can do folding in Notepad++.

    Most of the shops I work at also have code review rules of one variable/declaration per line.
  • 1
    @asgs and discord and markdown and etc :)
  • 0
    @bkwilliams one per line may be fine, but one letter is what bothers me the most.
  • 0
    @bkwilliams I think the problem here is with the naming convention
  • 0
    @asgs @Hastouki Again it depends. If you are mapping to XML, JSON, or an API having the internal logic match is less mental work. However having a “cleaner” internal naming makes support easier if you don’t have very tight integration with the external objects and processes.
  • 3
    @bkwilliams I've been a developer for almost 20 years, I have NEVER found it useful to have meaningless variable names, regardless of if they are mapping to XML. XML naming best practices are not that dissimilar from any other naming practices. And no, this code isn't part of a mathematical formula, where you MAY make the argument for a one letter name.
  • 0
    @bkwilliams I think your argument applies to Protobuf which was designed for efficient communication and such. but I have never seen a cryptic or dumb XML before
  • 1
    I get angry when I see this...

    Especially in SQL as an alias I really want to murder people who use non descriptive naming.

    It's really frustrating, alias, variable or anything else, when you have to torture your memory to understand what the fuck is going on.
  • 0
    Lol mardown haha
  • 0
Add Comment