We usually tend to think of things complicatedly. We exaggerate the problems. What we should do is we think like the creator. We should create at least one open source to know the exact details of steps. We can see that there are two parts of whatever library:
- The configuration: More options, flexible usage - very important:
- Locating the config file.
- Reading the options to understand the cases.
- The main source code: There is one or two classes will take care the usage.
For example, we want do use sidekiq gem (library). Firstly, we investigate the configuration here.
File configuration: config/sidekiq.yml
--- :concurrency: 5 staging: :concurrency: 10 production: :concurrency: 20 :queues: - critical - default - low
It's apparently easy. But we often make ourselves confused. Keep in mind that any library has its own configuration.
- Trying to find out the main class.
- Reading code to know the usage and the idea behind the scene.