My Blog

Passing on knowledge about software development and related technologies.

Getting started with Nano Editor

If you are new to Linux you may have seen mention of the nano editor. Linux amateurs are often put off by other terminal based advanced text editors such as Vim and Emacs so they turn to Nano while not as powerful, it is a much easier and simpler to use for the casual user.

What is Nano Text Editor?

Nano is a text editor for Unix-like systems or any other environments using a command line interface. It emulates the Pico text editor, a part of the Pine email client, which also provides additional functionality. In contrast to Pico, Nano is licensed under the GNU General ... Continue reading


Counting Records With ActiveRecord

While counting records with ActiveRecord seems straightforward, you can quickly experience performance problems if not done properly. In the context of Rails ActiveRecord, the methods for counting records each do it a bit differently. Let's take a look at the three methods available in Rails:

  1. count - When called on an ActiveRecord::Relation object, count will perform a SQL COUNT query, which is very fast, especially on large result sets.

  2. size - Like count, size works differently depending on whether you call it on an ... Continue reading


Statistics In Ruby

With users demanding more sophisticated dashboards and reports in this ocean of Data Science and Artificial Intelligence I thought it would be prudent to review how to calculate some basic statistical functionality in Ruby. First, let me point out all the code shown below should work with Ruby 2.7 and above. All the examples are in IRB. I am not here to write your code, but I do want to show you how to do the math in Ruby. Let's get started!

Calculating the Average (Mean)
Unfortunately, Ruby does not provide a native method to generate an average (mean) v... Continue reading


Ruby 3.0 - Promises Delivered

After five years of hard work by the core language team, Ruby 3.0 was released on Christmas 2020 with better performance and other features for this high-level general-purpose programming language.

Why am I writing a review six months later? I wanted to get plenty of "hands-on" time with the new version before commenting on it. Let's get going...

Ruby 3.0 was developed with a focus on better performance, concurrency, and typing and achieved its goal of being 3x faster than the performance of Ruby 2.0. That 3x speed-up is when making use of the new Ruby 3.0 J... Continue reading


A Password Site That Respects Your Privacy

I like most of you, are constantly having to create new passwords for sites and applications we use daily. Unfortunately, most of the password generator sites cover you with ads or try to collect info on you to sell. Because of this, I decided to write my own and make it respect everyone's privacy.

I used Rails 6 / Ruby 2.7 / JQuery deployed on Heroku to craft this tool. It has simple use analytics (if you create a simple account) and does not collect identifying info on visitors as I use GoatCounter for my analytics on the site. Check it out and feel free to use this tool I ... Continue reading


Displaying blogs 1 - 5 of 24 in total