🔥 Burn Fat Fast. Discover How! 💪

Dependencies One of the most terrible parts of the code is de | Andrey Ivanov | Python

Dependencies

One of the most terrible parts of the code is dependencies. The worst thing is that the problems will start not now, but in the future. For example, you are using telebot library in your project. Everything is working now, however, new solutions are coming out, the API is changing and any improvements take their place. The problem is that almost all the code is tied to telebot. If you want to change the library, then 80% of the code will be affected.

In this case, I'm writing wrapper classes. For example, instead of telebot.send_message(), I will use my own class TelegramBot.send_message(). If I need to change the library, I will do it only inside of TelegramBot. Of course, you can't remove all the dependencies in your code, but it's definitely worth a try.