Re:It's probably time to stop recommending Clean Code (2020)
by carschno on Saturday February 18, 2023 @04:26AM
(#34845412)
I think I would go with a class called Image, which provides a method called download().
Re:It's probably time to stop recommending Clean Code (2020)
by eurasiantiger on Sunday February 19, 2023 @03:12AM
(#34855566)
This class is now over 4000 lines long.
Re:It's probably time to stop recommending Clean Code (2020)
by cnorthwood on Saturday February 18, 2023 @03:52AM
(#34845236)
ImageDownloadPreparer?
Re:It's probably time to stop recommending Clean Code (2020)
by eurasiantiger on Sunday February 19, 2023 @12:19PM
(#34859596)
ImageDownloadManager also communicates with the frontend about its state, so it’s not a completely preparatory process.
Re:It's probably time to stop recommending Clean Code (2020)
by ahartmetz on Saturday February 18, 2023 @05:08AM
(#34845643)
ImageDownloadDispatcher, ImageDownloadScheduler, Image DownloadQueueManager... basically, the fix for "FooManager" names is to ask which aspect(s) of Foo the manager manages. Lifetime, storage, execution order (and according to which criteria), resource limits, uniqueness, exclusive access, efficient search, ...
Re:It's probably time to stop recommending Clean Code (2020)
by eurasiantiger on Sunday February 19, 2023 @03:11AM
(#34855563)
All of those hint of functionality that is not present here. The code is just managing image downloads, not dispatching them, scheduling them, or even touching the queue (which is handled on a higher level).
ImageDownloadManager manages image downloads. Why use a name that makes less sense?
What shall I call the unit of code orchestrating these download processes, if not ImageDownloadManager?