Mike's Blog

Passing on knowledge about software development and other related technologies.

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.6 / 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

Debugging Tips with Chrome Dev Tools

The Google Chrome web browser is the most popular web browser used by web developers today. With the Chrome browser having a six-week release cycle and a powerful set of developer features, Google has turned the browser into a tool all web developers can use. Most reading this may be familiar with many of its well-known features like live-editing the CSS of a page, using the console to check for errors and such, and debugging Javascript for example. In this post, I will share with you some cool tips and tricks that are not so well known and will improve your debugging even more. These ar... Continue reading

A URL Shortner That Respects Your Privacy!

My daily work requires me to send or post links fairly regularly and I have always been a fan of URL shorteners. Unfortunately, most of these tools today are nothing but advertising platforms and data collection silos. So, I decided to write my own and make it respect both member's and users' privacy.

I used Rails 6 / Ruby 2.6 with Postgres 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... Continue reading