Fatos Morina

Software engineering and personal development

Month: July 2017

How to insert a CSV file in the database using Ruby on Rails

Img source: twotutorial.com

Comma Separated Values (CSV) files represent some commonly used files. You may have a CSV file generated from a report generated, and then you may need to write a Ruby method or task to insert it into the database. Continue reading

How to send a base 64 encoded image to an API endpoint in Ruby on Rails

Img source: java67.com

I recently had to upload an image to an API endpoint in Rails, and did not found that much material online, so I decided to write this article describing how I managed to do this.

I was building an API that had to interact with an authentication micro service, where the request parameter was a Multipart image of a user file that should then be encoded in base 64 and get uploaded to AWS. Continue reading

Quickly access API documentations of your favorite languages with these two applications


Img source: makeuseof.com

It is no surprise that you may need to work with different programming languages, or at least use many methods. You may not be sure how do you call a method, how many parameters does it have, or the type of objects for each parameters. During these cases, having a quick look up on the API documentation helps you immensely. Continue reading

Add like/upvote function for your model using Acts as Votable gem

Img source: instructables.com/

The ability to rapidly develop new features in your Rails applications with a lot of cool gems gives you the opportunity to be very productive. At the time of this writing, 14,821,263,017 Ruby gems have been downloaded, which represents a really large number of developers who have fortunately been able to use open source gems of other fellow developers in their applications. Acts as Votable is no exception.

Continue reading

Top 5 lessons I learned from writing 200 blog posts


Img source: fk-binding.co.uk

This is my 200th post in this blog. It has been a long journey, so I wanted to take a moment to reflect about some of the most important lessons I learned.

I started blogging with the overall goal of improving the quality of my written English. I am grateful that I have managed to make considerable improvements since I started to write.

As the time of this writing, I am grateful that I have been able to publish 2 articles in SimpleProgrammer: Learn Programming Like Einstein Learned Physics and 10 Simple Social Skills Many Programmers Forget About. I am grateful that I have already published 2 articles in FreeCodeCamp, which is one of the most popular technical Medium publication: For Developers, Ego Is The Enemy and Why Developers avoid writing tests… until it’s too late. I am grateful that I have also been accepted as a writer in Baeldung.com which gets about 1 million page views per month and Scotch.io, which gets about 500 thousand page views per month. Continue reading

© 2018 Fatos Morina

Theme by Anders NorenUp ↑