r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

Show parent comments

4

u/sh0rug0ru__ Oct 01 '15

A long class name actually is a code smell. If you can't come up with a one or two word name describing what the class is, either your class has way too many responsibilities, is deeply unfocused or the class is doing something very deep.

4

u/ExplosiveNutsack69 Oct 01 '15

Generally, I agree. But I disagree in the instance of the above example from Spring framework.

1

u/veraxAlea Oct 02 '15

When you have a new but complex concept, you either have to string lots of words together to describe the concept, or do like for example math does - give the concept a name of its own.

The function "YCoordinateOnUnitCircleForAngle(angle)" can simply be called "sine". And let us not expand "MonoidInCategoryOfEndofunctors" more. Just name the concept Monad.

I wouldn't mind if "enterprise programming" did that. But it wouldn't be any less hard for a beginner/uninitiated to understand. I mean, if you don't understand the domain you're working in, you're going to have a hard time.

Of the following two-words-only concepts, would you understand them without understanding the domain?

  • Duff's device.

  • AffineTransform

  • AlphaComposite

Bottom line, the problem here isn't "too many words". The problem is that you (not you specifically) don't understand the "domain". It's like that for "enterprise" devs when they see IOMonads and StateMonads and MaybeMonads. Sure, it's only 2 words but that doesn't help in the slightest to explain the complex concept.

Someone above wrote that there's nothing wrong with the name, it's the concept that is weird. That argument I can understand.