Mike's Blog

Passing on knowledge about software development and other related technologies.

Seeding your database in Rails

Seeding database

When writing applications in Rails that use databases (as most do), we often have the need to populate small "reference" tables with data (like credit card types, colors, dog breeds, categories, etc) used in form drop-downs, test data when developing or inserting specific records into the database at deployment time. This is accomplished in Rails with the seeds.rb file located in the DB directory of your rails project folder. Surprisingly, most new Rails developers do not know about this file. If you open the file seeds.rb file in Rails 5.x you will see some examples of how you... Continue reading

CleanTalk for CMS

Wordpress screen

I am not one to easily recommend software services (SaaS). Especially when it comes to services that help secure your site but I have to brag on CleanTalk. If you manage or own a Wordpress, Drupal, Joomla, or another CMS or Forum package you need CleanTalk.

What is Cleantalk? CleanTalk is anti-spam protection (via a plug-in or can integrate into your site via their API) that protects login, comments, and forms on your site. CleanTalk is a transparent anti-spam protection and detailed statistics for each of your sites you use it on.

It has worked better at keeping spammer... Continue reading

What is git?

Git photo 52608

The most used version control system in programming today is Git. Git is an actively maintained open source project originally developed in 2005 by Linus Torvalds, the creator of the Linux operating system kernel. Git has been designed with performance, security, and flexibility in mind. Git is well known for being a standard tool in most programmers toolbox. Git works well on a wide range of operating systems, editors and IDE's. Rather than have only one single place for the full version history of the software as is common in once-popular version control systems like Subversion (al... Continue reading

A Great Markdown Editor


In today's open-source communities (and more in the corperate environments every day) markdown languages are becoming the mainstream for blogs, web content, presentation tools, and documentation. What is markdown? Basically it is a formatting language that is very simple allowing content creators to focus on the content, not the programming. Most modern blogplatformssupport markdown in some shape or form and most template engines use markdown also.

Markdown Editors

There are many choices when it comes to markdown editors. There are web based editors, ... Continue reading

What is Foreman and when should I use it?

George foreman 525485

Many times when writing complex ruby applications or using frameworks (like Rails, Sinatra, or others) you end up having several processes that have to be running during development to allow it to run such as web services, message queues, or some other type of process. Foreman allows you to manage these different processes under one management gem. Foreman uses a file called Procfile.

Getting Started

First, let's setup the Procfile. A Procfile is a list that contains a name to identify the process and the command used by the system to run it. Foreman ... Continue reading