Plugins / Libraries
People who are involved in the creation of new application probably used at least one library to facilitate some activity or improve the appearance. The name of the library is the one question, but the other is the version of your liability you are using. And this is very important. This raises the question - do I need the current version of the library? In the end, it cannot be so different from the latest version. In the majority of cases the differences are marginal, then in general if we will use not the latest one, the problem seems to be very small. But it is only the imagination of someone who is not the IT guy. But in reality, the problem I huge. When it comes to differences, it's always worth answering the changelog - one file that should encourage you to always use the latest version.
When creating a library, the current version of the components used is very important. Often such solutions have their own dependencies relating to other libraries.
Development
The evolution of the library (introduction of new functionalities) also affects the creation of new versions of the existing solution. If a library is released, unfortunately, but you cannot undo its official release, so it is always worth paying (great) attention to the quality of the library. Fragmentation can take different forms. Most people naturally associate the problem of fragmentation with the Android platform or with a built-in WebView container, which for a long time received updates only together with the platform. It also plays an important role when creating libraries. In the case of the release of each subsequent version, we introduce a fragmentation of our existing solution (i.e. versioning the SDK). This approach has both advantages and disadvantages - we react flexibly to the market, we update dependencies. However, we also have older versions of the library that work and one that is not part of the official flow but is available with one specific payment method.
Clients use different versions of the payment support library in their applications. Unfortunately, the library does not have a mechanism for enforcing updates on our clients, so we count on their goodwill here.
On the other hand, the introduction of such a mechanism could turn out to be a big mistake or I have seen through. Forcing such a solution would certainly increase the costs associated with maintaining the application, as it could turn out that a forced update of the SDK would require updating other libraries and possibly code.
Programmers also are wrong, even often
As we are already at the problems, we will talk about a few "our" challenges that we have often faced. We have different kind of errors: mainly human or technical once. It is always the easiest to make a human mistake. In the case of a technical problem, we can count on both tests and a colleague next, who will take a moment to test your idea. Human errors are much harder to improve so I will focus on them:
- Planning for release - releasing the version on Friday is also a bad practice. After all, what can be wrong with the release of the library version at the very end of the week, since it has been thoroughly tested? Absolutely everything!
- Transfer of responsibility, or backend-frontend conflict. In the case when we are working on a new functionality, the questions often arise: who should take responsibility for it, is it a backend part, or is it simple enough for the frontend to handle it? If so, do we add functionality only to mobile libraries? Is it worth doing it once or do it separately on each platform? What will be the cost of maintaining and updating? A conflict where to place the functionality will always be. The challenge is to convince the other side, why it should be on her side.
- Silent acceptance (poor assertiveness) is the first problem that can happen to any programmer. Especially in the case when a new solution is created, and the client wants to integrate with it, just to move on with the development of the application. Often the programmer is placed against the wall and agrees to provide the developer version, which, for example, is not tested or completed.
Questions:
- Have you ever created your own library? If so, what problems did you encounter?
- Have you ever used a library which in the final effect cost you more time than writing it yourself?
- How many libraries did you have in one project? Do you think to have many libraries in code is a good or bad approach?
Comments
Not that much. I'm not developing huge application for corporations. Mostly I'm dealing with relatively small algorithms for building pipelines for preprocessing a data or post processing of results of some systems.
No, I didn't create my own libraries. And I probably never will, it takes too much time.
2.Have you ever used a library which in the final effect cost you more time than writing it yourself?
No, the very essence of libraries or plugins in a short time to achieve the best effect and result.
3.How many libraries did you have in one project? Do you think to have many libraries in code is a good or bad approach?
Very rarely I deal with the code, but I don't think it matters how many libraries or plugins, the main thing that everything works))
I used Hibernate and JPA repository to managing data in database and it allowed to save a lot of time.
I don’t actually count how much libraries I had in one project. It depends on project
There definitely were some situations were using a library for some small functionality has cost me more time than just writing that functionality myself, though I can't recall them at the moment. Situations like that are rare, though, and only occur when a very small part of the library is being used.
I don't rememeber what was the most libraries I've had in a project, but it was definitely a lot. Nowadays most projects use significant amounts of libraries, many of which get added to the project automatically. I don't think that having many libraries is a bad approach, though of course adding too many libraries can have a performance impact in some cases.
I can’t remember such situation. I always try to find the best solution so I always learn a bit about library I’m going to use, before I add it into my project.
How many libraries? It’s really hard to say. Everything depends on how big this project is, how many features is it going to have and in what technology I’m going to write it. To be honest, I have never count how many libraries I have in my project. I’m sure that I use few of them and even don’t know that this is a library.
I think that too many libraries in your code is pretty bad. Your program is going to be bigger and bigger and then it’s going to need more free place on the disc. We should add as little libraries as we can, try to find solutions that can solve two or more our problems in one.
No, I haven't.
2. Have you ever used a library which in the final effect cost you more time than writing it yourself?
Unfortunetely yes and in the end I wrote this code by myself.
3. How many libraries did you have in one project? Do you think to
have many libraries in code is a good or bad approach?
It depends, in bigger applications you ofcourse use more libraries. I cannot imagine writing application without any libraries, but of course we should check downloads count and how many opened issues are on the github page. I also remember when becouse of one library, many web pages were broken: https://qz.com/646467/how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code/
No, it's never happened to me, but there were situations when I changed libraries in my project that resulted in changing different parts of my code.
Overall, I prefer using libraries to writing implementing obvious things myself. In software development, every line of code costs time and time costs money so in order to avoid delays you should reuse code that is checked by time and has been proven to work by others.
Maybe 6-7, but most of them use different sublibraries which in reality increases number up to 20-30. Is it bad to use that much libraries in code? Well, the answer is obviously vague, but in my opinion, you should keep your project as simple as possible, that means you should avoid using two different libraries that do exactly the same thing. It not only keeps your code cleaner but also makes your code more maintainable.
I think not, because I really care about choosing the right libraries. If the problem is too complicated for any library I simply implement my own solution.
I think it is a bad approach to have many libraries. Especially when there is many libraries in one project that do the same thing. There always should be one way to do something that you wanna do, and not to spend a lot of time thinking which library I should use.
Yes, many times. Now, when I have some amount of experience I can better filter libraries I use, and spot some problems just after reading the description of the library. But I have had spent many hours on this problem. Trying to hack the library to make it work as I wanted.
Usually, 10-30 that I use in the project + 40-50 for application building related things. As far as the application is small, and all libraries are necessary. I see no bad idea of having many libraries.
In my opinion, the biggest challenge when creating an open-source library is the ability to say „no” to needless features and to resist the temptation of making it perfect. Unfortunately, I’ve seen so many people fail to publish their work simply because they felt not confident enough about their software.
To answer the second question — of course, it happened to me a couple of times. My answer to this question can also be combined with the third one. I don’t think there’s a magic answer to how many libraries you should import into your project. The most important thing to remember is that every code that you use and you haven’t written yourself becomes a liability and a maintenance burden in the future. Correct estimation of cost (time, cognitive effort and money) of developing the same solution on your own should help you to make a correct decision. That ability will come with time and experience.
2. Sometimes library which we choose are not the best way to resolve a problem and in fact it will be a overkill. Then it is better to remove it and write simpler code on our own.
3. It is hard to say and it depends of complexity of a project. I don't think that too much libraries are good or bad approach to writing a code. It's important to don't use it when it is not necessary.
Have you ever created your own library? If so, what problems did you encounter?
I used to try to create a library that was to be used in a larger project. Unfortunately, I did not finish it, it was caused by the degree of difficulty
Have you ever had a library effect?
Fortunately not :)
How many libraries did you have in one project? Do you think to have a good libraries?
In my engineering work I use only 2 frameworks. In my opinion, using a large number of libraries does not affect the quality of the project, unless the documentation
to these libraries is not written, then there may be complications. It seems to me that there is no point restricting themselves in the frameworks, they are intended to facilitate us
and speed up the project