4 ms·
An application I touched a few weeks ago has a DB column named 'type' with values 1,2,3. So on to the source code we go: enum RecordType {TypeOne(1),TypeTwo
by hyperman1 6y ago
An application I touched a few weeks ago has a DB column named 'type' with values 1,2,3. So on to the source code we go:
enum RecordType {TypeOne(1),TypeTwo(2),TypeThree(3); RecordType(int dbValue) ...}
As it happens, I know an end user of this particular beast, so I show her some record IDs of each type and ask in what way they differ. She looks a few seconds, then says: 'This is clearly a type one record, the next is a type two, and here you have a type three'. After a little back an forth, it turns out even our internal course for new personnel talks about 'records' with different rules to follow for 'type one/two/three'. The end users have no other word to describe these entities than 'records' each with its own numbered type, and think about it as completely natural. The application is based on an older COBOL application, and the terminology just stuck around.
Clearly, the application is well-written: The enum uses the terminology used by the business. Another of my flabbers just got ghasted.
- kubanczyk 6y agoThis part looks like those people formed a neural network. They are able to learn to act quasi-intelligently, but when you peek inside, the internal model is just a bunch of numbers. Edit: scratch that neural network. They just made one neuron so far.
- daveguy 6y agoThree categories? That kind of complexity requires at least two artificial neurons.
- 8note 6y agoOne benefit there is that you don't get left with only context for what type one records used to be like before some evolving. The only baggage kept is by people aliasing that name in their own memory. You don't get screwed because you called something apple to start with, but it now represents a race car
- glxxyz 6y agoSometimes people just can't think of a better term and it sticks. It makes sense if there's some ordering implied but in quite a few of these there's none: https://en.wikipedia.org/wiki/Type_1 https://en.wikipedia.org/wiki/Type_1 https://en.wikipedia.org/wiki/Type_2 https://en.wikipedia.org/wiki/Type_2 https://en.wikipedia.org/wiki/Type_III https://en.wikipedia.org/wiki/Type_III https://en.wikipedia.org/wiki/Class_1 https://en.wikipedia.org/wiki/Class_1 https://en.wikipedia.org/wiki/Class_2 https://en.wikipedia.org/wiki/Class_2 https://en.wikipedia.org/wiki/Class_3 https://en.wikipedia.org/wiki/Class_3 etc.
- coolgeek 6y agohttps://en.wikipedia.org/wiki/Hierarchical_database_model https://en.wikipedia.org/wiki/Hierarchical_database_model This was pretty common on mainframes, before db2 and other SQL databases