Email or username:

Password:

Forgot your password?
Joshua Barretto

Pre-sleep thought: naming things in programming is difficult because names in code (and, in general) carve out the negative space.

They exist to differentiate a term from that which it *is not*.

Choosing a good name means not just understanding the thing to be named, but also the systems around it that are differentiated from it. A good name is only good with respect to the context it appears in.

2 comments
Jan :rust: :ferris:

@jsbarretto Urgh, this is so true! 💯

I'm currently writing a crate for extracting embedded and attached files from pdf files and there are so many "name collisions":
- when naming something with "file", it shouldn't be confused with pdf file itself
- pdf standard distinguishes "embedded" and "attached" files => how should I name the crate (ideas welcome😉)!? The name "pdf-extract-embedded-file" is only half-true.

Maybe use neither "embedded" nor "attached" in the crate name (only in methods)!?

@jsbarretto Urgh, this is so true! 💯

I'm currently writing a crate for extracting embedded and attached files from pdf files and there are so many "name collisions":
- when naming something with "file", it shouldn't be confused with pdf file itself
- pdf standard distinguishes "embedded" and "attached" files => how should I name the crate (ideas welcome😉)!? The name "pdf-extract-embedded-file" is only half-true.

Joshua Barretto

@janriemer That's a really good example of this, yes. Names are reflections of abstractions.

Go Up