Naming things...

derek profile image derek ・1 min read

There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton


What's the best or worst naming you've seen in code or as a project name?


markdown guide

Uncle Bob says the code must be self-explanatory. While it sounds fine but in a real-world scenario, to naming is a challenge, so to create self-explanatory code is usually a wishful thinking.

Now, what are the worst names?. The name of the SAP's tables

MARA General Material Data
SPFLI Flight schedule
DD02L SAP tables
T001 Company Codes
TADIR Directory of Repository Objects
TSTC SAP Transaction Codes
LFB1 Vendor Master (Company Code)
TRDIR Generierte Tabelle zu einem View
USR02 Logon Data (Kernel-Side Use)
LFM1 Vendor master record purchasing organization data
DD02T SAP DD: SAP table Texts
TSTCT Transaction Code Texts
MAKT Material Descriptions
MAST Material to BOM Link
I000 Conditions for certificate profile
VBUP Sales Document: Item Status
KNVV Customer Master Sales Data
TFDIR Function Module
RSRREPDIR Directory of all reports
PLPO Task list - operation/activity
USR01 User master record (runtime data)
RSZCOMPDIR Directory of reporting components

For example, DD02L SAP tables. You know, a table that contains the definition of other tables @_@


πŸ˜†β˜ That's a good one!

I don't understand why the security world have great names for all the things... ie: vulnerabilities, ransomware, malware, tools etc.


Best: Python auth method named - can_haz_access

Worst: C# local array variable name, used for holding split string parts - partsIsParts. I can only assume this is in reference to an 80s Wendy’s commercial... but still...

NOTE: these replies are thoroughly tongue-in-cheek


The biggest problem names that I've come across aren't the obscure names it's the ones that cause overlapping concepts with common words. Index is a terrible word. I work with data in oracle. Indexing can refer to the oracle indexes or tables that we call index tables (with very similar usage) and then id's get referred to as indexes. It gets really confusing really fast when you get into detailed conversations.