First aid for broken JavaScript dependencies :)

I would like to write about JavaScript dependencies. But let’s start from the beginning. If you are a software developer, then you probably already know, that one of your many roles is definitely not to be yet another wheel inventor. At least, not in most of the cases. World has proceeded far enough to say that today there exist packages for almost everything, making our development easier and more efficient.

This of course is not an encouragement for losing interest in other issues – every package has quite a large space to improve and evolve. However, your business goal is to bring a complete product on a plate just on time or even before it is up. Packages will help you fulfill those plans, bringing npm or yarn on the top of your best friends’ list, but be aware: any solution, as well as this one, may also bring risk. And we will try to describe it and show you a better way of getting away with it in the article below.

Let’s start with a story…

Imagine a large JavaScript project. Business requirement obligates developers to use a specific package, allowing a proper integration with another system of a client. And that is completely fine. MVP has been brought on time, next contract has been signed and development is carried on. Client asks to integrate the next part of a system, which requires your package update.

This part goes well, until tests are fired. It seems that the package contains a simple, but inconvenient bug, that has not yet been fixed in any product release and it is known that this won’t happen soon enough. You cannot just fix your node_modules directory – it should be removed out from your repository from tracking, therefore your collaborators will never know anything about your changes! Well, while you were reading this, probably you have already understood what to do – fork. But do you really need such a hammer?

Understand your problem

You must be aware, if the problem you are facing with is going to involve just you or a larger community. Sometimes, people interpret lack of certain functionality as a bug, which is not always correct. Therefore, your solution may not be accepted by a community and not included into an official repository. However, you still need it here and now. Well, let’s patch it!

According to the release notes of github repository, patch-package was released officially in May 2017. It is a powerful tool, that allows modifications inside dependency project to be installed in your node_modules directory. Some may say that this is quite a madness – firing install command your dependence manager will overwrite the changes.

Well, this is correct. However, a patch-package coexists with npm and yarn perfectly (I must admit it works slightly better with npm so far, you can read more in “Why you should use postinstall-prepare with Yarn?” section of README file) and takes full advantage of a script preparation (“script”: { “prepare”:“”}) of your package.json file. Patch-package literally creates a diff directory between your changes and the original package, stored in the patch folder of your actual project.

After running install command and downloading all dependencies, it applies that difference to the project directory, making a perfect reconstruction of your changes for all collaborators. It makes your life simpler, doesn’t it? The solution has some disadvantages as well. The patch-package cannot fix dependencies of your package or make any changes in package.json.

In this case you may use the fork solution. Also, you must consider the number of changes you are about to apply into your dependency package and whether they will grow in time. In case the will – you should think carefully when using fork, as this is a project of your own.

Don’t be selfish!

Patching is a great way to fix your dependencies without creating endless forks and generating multiple project sources. But you should always remember, that taking advantage of community should not be a one-directional. If you find a bug or feel like you can improve the package you’re using, you should always consider helping others by registering an issue or even by contributing to the project!

Top Principles For Building Great Software Product :)

No company is able to succeed, if its product is not of a right value for the potential consumers. Creating an effective product based on proper software, consistent with customer preferences, is the key to your business development.

However, this is not as easy as it may sound. Many startups in the past either collapsed or had big problems getting their target group’s interest. All this happened due to the imperfections of the product. We decided to prepare a list of the most important rules to keep in mind when you are going to create a great software product.

Use the data of your target group

Even if you are convinced that you have created a great product that will not have any problems with the sale, you should check it out. On the basis of our ten – year experience at Codest, we have noticed that customers sometimes take hasty hypotheses, which later result in failures and the need to introduce a lot of modifications. That is why a proper analysis is so important. Use the available data – for example about the behavior and preferences of the target group, and then analyze them for your users.

At first – MVP

The creation of Minimum Value Products (MVP) is a very popular solution. It is not advisable to commission developers at the very beginning of the works aimed at creating very extensive functionalities. First of all, due to the fact that not all ideas can be verified by customers positively. That’s why the idea of MVP works really well. In addition, you should add that, thanks to MVP, you will gain time efficiency and will be able to check what your clients like and what not. If you are thinking about creating a web application, read the Ruby on Rails framework analysis and check which brands have decided to use it.

Choose an effective team of developers

You should entrust the creation of an effective product to professionals. You need to know that, depending on the character of work, it can be a very time-consuming process, which is why your decision should be carefully thought through. Why is it so important? First of all because you will minimize the risk of delays and possible errors. In addition, the competent experienced team of developers will also help you in choosing the right technology.

Remember, that not only the inside of the product counts, but also its overall appearance. In this case, the role of UX designer will be helpful, as this is a person who is perfectly familiar with current market trends and knows how to create user-friendly interfaces.

Testing

Do not give up, if the initial product functionality is not as effective as you expected. In the first phase of its development, you should run as many tests as possible to help you determine weaknesses and strengths. Thanks to A/B tests, you can gain knowledge of the solutions you should abandon in the future. If it maintains constant cooperation with a team  of developers, you will be able to implement subsequent changes very quickly. This will help you match the product to the market needs as fast as possible.

What should you know about Ruby on Rails? :)

Ruby on Rails (RoR) is the most popular framework of the Ruby’s programming language. It is mostly used to create web applications. The fact that applications such as Twitter, Basecamp and Groupon have been created on its basis were already written here. In this article, we will try to bring its most characteristic features closer.

Specifics

RoR is an open source framework based on databases according to the MVC (Model-View- Controller) pattern. Developers, who use it on an everyday basis praise its simplicity. In fact, the database and the web server are more than enough to run an application. Thanks to the DRY (Don’t Repeat Yourself) rule, developers avoid repeating the same work at various stages of an application development and thus significantly accelerate their work. One shouldn’t forget another important method – Convention over Configuration. It assumes that the necessary configuration will be minimized by replacing it with ready-made models.

In addition, you need to return the ease of an application development. Thanks to the appropriate plugins, it can be extended very quickly with any additional functionalities. The great advantage of applications created in Ruby on Rails is also the fact that they are very efficient and safe.

Short way to MVP

Many companies decide to implement their product on the market, which is based on MVP (Minimum Value Product). It is a popular and effective method of checking the product’s potential on the market and improving it later in case it is needed. In this process, RoR is perfectly located. This framework allows very fast creation of a basic product containing the most important functionalities that a customer can verify on the market. In this way you can save time and thanks to good cooperation with developers, you can modify the product without any problems.

Recommendations

In the developers’ environment, that use Ruby on Rails on a daily basis, the framework is considered to be designed for the development of web applications. It is used by the largest brands, but also smaller companies that rely on e-commerce sales, create online communities or manage different content. From the point of view of a customer who is interested in creating a product, the credibility of specific software is very important. In the case of RoR, this is a factor determining its popularity. The success of Twitter or Basecamp would not be possible without the reliability and comprehensiveness of the created software.