Software engineering and personal development

Category: Science & Tech (Page 29 of 35)

Why you need Null Object Pattern and how to implement it

Co-Author: Rexhep Kqiku

There are many programming languages and frameworks out there, which are prepared to be used to solve problems. Although there are billions of problems that we may be asked to solve, there are usually some common themes among many of them. As we usually try to solve business problems, we also want to improve the quality of our work. This way, we have design patterns that are abstractions of some of the best ways to deal with certain situations. Continue reading

Save up time and focus better on YouTube by hiding recommended videos with DF YouTube

Img source: DF YouTube

Have you ever gone to watch a short informational or educational YouTube video, only to find out that two hours have passed, and you are still watching many other related videos? If that’s your case, then you are not alone. We all get trapped into this process of mindless watching many YouTube videos without any prior intention. Luckily, there is a really beneficial Chrome extension, called DF YouTube. It hides recommended videos on YouTube and gives you the opportunity to only focus on the video that you are currently watching. Continue reading

Inform your users about breached passwords using Pwned Passwords API

Img source: dev.to

Passwords one of the most frequent ways that we use to access our digital accounts. Having secure passwords is really crucial, and represents one of the most important aspects that we need to pay attention to. As developers, we also need to make sure that we provide our services with a high level of security. Last year 2017 NIST (National Institute of Standards and Technology) recommended to check user passwords against existing public breaches of data, and fortunately, there exists an API that allows you to do that really easily. Continue reading

A quick shortcut for quickly navigating in Github repositories

GitHub is one of the best places for developers to store their projects, collaborate with other colleagues, and learn from other open source projects as well. These type of projects are written in different programming languages, usually using different frameworks. As these frameworks or developers in general usually possess certain ways of organizing their code files into many folders, it makes it a bit difficult to navigate through them manually in GitHub.  Luckily there is a really helpful shortcut that help with that. Continue reading

Get previous values of model attributes in Rails using a pre-existing helper

Img source: binarywebpark.com

One of the best practices is keeping your controllers with as little code as possible, and have all the validations in the models. Rails includes a lot of validations that you can use in your models, and many other helpers that help you focus on your business logic and develop your projects as quickly as possible. A helper method that is among the unpopular ones is the possibility to check the old value of an attribute of a object, before doing any database transaction.

Continue reading

Find out which gems are consuming the most of your memory with Derailed

Img source: blog.honeybadger.io

Rails gives you a lot of great ways for rapid development, but there comes a time when your application is already mature and needs to be optimized, because it has become slow. The more gems you add to it, the slower it tends to get. Each gem you add in your project will increase the level of RAM this app consumes. Here is a gem called derailed that can help you learn about other gems, developed by Richard Schneeman.

Continue reading

How to write complex queries using Globalize gem in Rails applications

Img source: railscarma.com

Globalize is one of the most famous gems that is used for translating dynamic content in Rails application. It is really easy to use, and brings a lot of conveniences immediately after you add it in your application. I recently had to do a more complex query using the table added by Globalize generator, and I could not find that much information about ways of doing joins for this newly added table with the one that it corresponds and that translates its attributes. In this article, you can see a short example on how to do that.

Continue reading

« Older posts Newer posts »

© 2024 Fatos Morina

Theme by Anders NorenUp ↑