3 ms·
Code golf variable names are intolerable. But there's a happy medium. If you name all your variables like "Rechtsschutzversicherungsgesellschaften", note that
by saulpw 2y ago
Code golf variable names are intolerable. But there's a happy medium. If you name all your variables like "Rechtsschutzversicherungsgesellschaften", note that I am still a violent psychopath and I know where you live.
- lifestyleguru 2y agoJust think of German as a bimodal language. The first is a language with cases, pronouns, word order. Thesecondissimplyyoudisregardspacesandstickthewordstogether. Both are perfectly valid and expected while dealing with this language. As you mentioned insurances... they like them as well a lot, anything overlapping both legal and insurance domains is a true climax.
- saulpw 2y agoThat's fine for German, but in source code I don't want any variable called LegalProtectionInsuranceCompanies. It takes up too much brain space for me to parse and understand each time. Much rather it was called "lpic" with a comment expanding it at time of definition. Class names are a separate discussion.
- nuancebydefault 2y agoIndeed. The problem with long var names is that formulas become unreadable and function names take away horizontal real estate for their args. There are so many ways out to make it shorter yet readable. - idx is often used as index. - An event handler can start with On. - Simply take the first 3 or 4 letters of every word. simpToReadVar - keyISR Keyboard Interrupt Service Routine - fName file name
- soonnow 2y agoI just want to point out you are saving 3 characters on the last one while making it a fair bit harder to understand. fileName is perfectly fine. fName could be firstName, fileName, finalName, foundName...
- nuancebydefault 2y agoYou are right!
- saulpw 2y agofn or fqpn should be well understood too given the context.
- Leo_Verto 2y agoYou probably should avoid working for a German company practising domain driven design in Java. I've seen code that named classes and variables much worse than that.