Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: What would you call a package whose purpose is to import data?
7 points by ctc24 21 hours ago | hide | past | favorite | 9 comments
Let's assume you're writing Go, Python, or any other language in which `import` is a reserved keyword. Let's assume also that you're writing a new package, whose purpose is to "import" data.

What do you name this package?

Our team went through this exercise semi-recently, and we're curious about how everyone else would think about it. Here's a (non-exhaustive) list of options we considered: imports, ingest, dataimport, ímport, impørt.





I like semantically different words for unrelated things. So I'd stay away from import.

I've called this kind of thing load, initialize, get_all, and so on.

I may also call it something based on where the data is stored if that is important. For example from_csv.

I might also name it based on what it is for. For example load_config.

Whatever seems clearest, and fits best with how the project itself does things.


What does "importing data" exactly mean in your context? What is special about this data that your package can do something useful that's specific to the data? What is special about the importing task that your users wouldn't rather just `with open(filename) as f:`?

Not rhetorical questions. You presumably have real reasons to create the package; meditating on them will bring you closer to an understanding. The reason that naming things is one of the "hard CS problems" is that it requires actually paying attention to your own work and a solution can't be looked up elsewhere.


> imports, ingest, dataimport, ímport, impørt.

a few good principles (not rules) for naming libraries:

a) signal abstraction level

b) avoid being too literal for it constrains evolution

c) pronounceable and spellable

d) prefer nouns over verbs because libraries are things not actions

e) metaphors beat descriptions

Consequently, I would avoid imports, ímport, impørt

"Ingest" feels like it is in a good direction. Any good reason not to use it?


Agreed, I like `ingest` as well. It does somewhat violate principle d), but the other solutions violate more of those. And to your point, they're principles, not rules.

How about `importer`?

The misspellings of import sound like they’d be a nightmare. Something like ingest sounds much better.

To come up with other names I’d probably think about additional context. What is being imported, how is it being done? Can those concepts be spun into a name?


I'm with you on the misspellings. This is why we ultimately ruled out any of those options.

importer

importers

advantage: still single words correctly spelt. describes the library instead of abstractly the topic of the library


Sounds a bit like ETL - extract, transform and load.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: