Live data from Hacker News

Software component names should be whimsical and cryptic

medium.com

121–130 of 339 posts

Re: Software component names should be whimsical and cryptic

#121
post #60

Earlier quoted context omitted.

It says "component". How many components do you have? I suppose if need to deal with more than a dozen components simultaneously, something is wrong. What is worse, the overhead of maybe not knowing a one-word description of component FancyName once in a while (so you have to look it up, pressing F12 or such), or having to deal with a obsolete, too long name (trying to be clear, or having too disambiguate between mul…

Screens are huge now. You can fit long names. Auto complete makes typing long names easy. Let your code read like prose. Save the brain for solving the business problems not for understanding the code.

Long names are easier to read the first time, and become an impediment thereafter. Especially when you have multiple long names that differ only in a few characters.

Re: Software component names should be whimsical and cryptic

#122
post #106

Inside this essay giving horrible advice, is more horrible advice: > Even worse are those ubiquitous diagrams everybody uses to communicate about software, where there’s a box labeled OrdersService with an arrow connecting it to a box labeled OrderStatusService. I don’t understand why anybody draws those. People like this are why there are documents with a thousand bullet points and no diagrams to help anyone actuall…

Sure but what to do if all the good names for doing the thing the thing is doing are taken ?

If within the same system, you have multiples of "personService", "paymentService", and none them have unique features that can be used in the name, then you probably have a design problem.

Re: Software component names should be whimsical and cryptic

#123
post #108

The author seems to be talking about names for two totally different things, lumping them under the term "component." Whimsical project name? No problem. Whimsical type name within a project? Really bad idea. Whimsical variable name? Don't even think about it. The concept the author is missing is "convention." Whimsical project names fall within a well-understood and used convention. The convention for type and varia…

Reminds me of the classic "how to write unmaintainable code": https://cs.fit.edu/~kgallagher/Schtick/How%20To%20Write%20Un...

Especially this bit:

    Bedazzling Names
    Choose variable names with irrelevant emotional connotation. e.g.:

    marypoppins = (superman + starship) / god; 

    This confuses the reader because they have difficulty disassociating the
    emotional connotations of the words from the logic they're trying to think about.

Re: Software component names should be whimsical and cryptic

#124
post #93

Earlier quoted context omitted.

> Create libraries that aim to do one thing and do it well. That's nice and all, but once you combine that with giving them descriptive names, you're going to have a list of hard-to-distinguish projects like: - css-min - css-polyfill - css-inline-min - css-inline-polyfill - css-script-min - css-script-polyfill - etc. Good luck clarifying what you're talking about. And of course, people will start using acronyms for a…

And then someone makes a package to combine all of them, and then someone makes a package that combines that combining package with another combining package, and then the author of `css-script-polyfill` deletes the repo, and we're dealing with another leftpad https://qz.com/646467/how-one-programmer-broke-the-internet-...

I can't be the only one that just includes any dependency with a permissive license? `git subtree` is so ridiculously easy for the larger dependencies and 90% of these projects are sub-500 lines in a single file, just include them.

Re: Software component names should be whimsical and cryptic

#128
The biggest issue, I see with learning how software works, is common names.

For example, game engine. Some library or framework, that helps you to build games. Nice.

But what they do for you in detail isn't known, and can take months to understand.

Unity does much more than Phaser. Angular is a total different beast than React.

And this goes down to class names. MVC was the hype back in the days, but nobody knows what it actually meant in detail. Some people sat down and wrote some definition of the term, but no implementer adhered 100% to them.

Re: Software component names should be whimsical and cryptic

#129
post #108

The author seems to be talking about names for two totally different things, lumping them under the term "component." Whimsical project name? No problem. Whimsical type name within a project? Really bad idea. Whimsical variable name? Don't even think about it. The concept the author is missing is "convention." Whimsical project names fall within a well-understood and used convention. The convention for type and varia…

Back in the day,one of my coworkers actually did this once. He built up a giant metaphor for the project in terms of EverQuest.

Even though I played the game I was pretty lost in that codebase. People that didn't play had no idea what anything did.

Re: Software component names should be whimsical and cryptic

#130
post #86

I don’t think you need to go full startup when naming stuff, but you also don’t have to go full bureaucrat either. I once created a PHP framework called RocketSled because it was “the fastest thing on rails” and that gave rise to somewhat whimsical but also descriptive names on the same theme: RocketPack: package manager DataBank: caching auto loader Murphy: automated testing Each of those modules is named quite spec…

Where does Murphy come from?
Post reply on HN