Fatos Morina

Software engineering and personal development

Get trending GitHub projects in your Chrome tab with GitHunt

GitHub is widely known as one of the most famous version control repository, in which you can find pretty much countless public projects for many programming languages. It makes it easy for you to collaborate with your team members, and also with other fellow developers around the globe with many public projects that you can learn and benefit from, and also contribute to. Among many other things, GitHub displays Trending Projects which make it easy for you to differentiate the projects that have received more attention than others. As a result, you have the ability to find projects that have received a lot of stars from other fellow developers in the recent past. Continue reading

Compare two texts, images or PDFs quickly with DiffChecker


Img source: winhelponline.com

You may sometimes need to make sure two files are equal, but do not know how to do it. For example, you may need to make sure two images, PDFs or two pieces of text are equal, but find it very difficult to do it manually. There is a really simple tool that I personally use that I find it really helpful. Continue reading

Invoke a Ruby method after the response has been already sent with the Spawnling gem

Rails controllers have callbacks that can be useful when we want to execute a particular piece of code before or after other methods have been invoked. However, there is no Rails built-in after_response_sent callback that could be used to invoke a method after we have rendered the response to the user, either via an HTML or JSON response. Continue reading

How to iterate over a stream with indices


Img source: deadcoderising.com

Baeldung.com is yet another publishing site in which I have published one article. It is a technical article related to a few ways of iterating over Java streams with indices.

Continue reading

Repeat code blocks after exceptions with Retryable gem

Retryable is another handy gem that lets you repeat a code block after an exception has happened. It has a really easy syntax, and comes with many customizations, that make it a great tool to use, especially when you have to work with web services.

Continue reading

Get random data for your tests with Faker gem

Img caption: railscarma.com

Developers may feel they do not have that much creativity when it comes to use random words as arguments, or values for many fields. For example, if we have some test cases when we are creating a new instance of a Book object, chances are that we will assign ‘book’ to this object’s title, which does not seem that much interesting. We code because it is something that gives us pleasure, and getting help with these types of difficulties can be helpful. Fortunately, there is a Ruby gem called Faker that generates random fake value that you can use in your tests.

Continue reading

Select ActiveRecord’s rows with pluck and column names with pluck_to_hash

Img caption: stackoverflow.com

When you select multiple column values using pluck method of ActiveRecord, you usually get an array of arrays. If you want to get an array of hashes with column names as hash keys, you can use this useful Gem called pluck_to_hash.

Continue reading

7 Habits of Highly Effective Programmers


Img source: wanderlustworker.com

We mostly live our lives on autopilot habits that determine the outcomes that we have. From the moment we wake up (even while sleeping), until we go to bed we repeat certain habits that we do not pay that much attention. This does not necessarily mean that these habits are bad. It shows, however, how important it is for us to take the time and form new habits that produce remarkable results.

Continue reading

How to deploy Redmine to Heroku

Img source: redmine.org

Redmine is a flexible project management web application that is open source, written in Ruby on Rails. If you need to start using it for your own projects, then chances are you need to deploy it to a server. In this article, you can see how to deploy the current latest stable version of Redmine to Heroku, as it sometimes can be a bit problematic. Continue reading

HTTP Basic authentication with built-in Ruby on Rails method

Img source: microcosm.com

You may have cases when you may need to do some authorizations for certain pages, so that they cannot be accessed by unauthorized clients. There are many authorization ways that you can use in a Ruby on Rails application. In this article, I will mention one very simple, yet not that much famous method that comes implemented and ready to be used each time you create a new Rails application. Continue reading

« Older posts

© 2017 Fatos Morina

Theme by Anders NorenUp ↑