User management for ruby on rails.

Photo by UX Indonesia on Unsplash

This week I want to talk about Devise for Ruby on rails. These past few weeks i’ve been diving back into Rails and I discovered an amazing authentication tool that is just so mind blowingly easy to use that my projects are now going to get done so much faster.

In this post I’m just going to go through the initial setup of Devise so that you can add it to your existing project and continue on your own.

So with that being said let's get started.

Devise is a gem for user management…


This week, we have a pretty easy problem. We are asked to write a function that returns the number of vowels used in a string. Vowels are a,e,i,o and u.

That’s it, that’s all we have to do.

Okay so here we go, we start with our empty function…


Photo by on Unsplash

Alright, so last week I said to pay attention because the next post was related so if you haven't read the previous post go ahead and do that now by clicking HERE.

Done that? Great! lets upgrade from steps to pyramids. As you can guess this will look familiar to the steps problem and if you want to just try do this problem after looking at the steps post go for it.

Here is our problem,

We are asked to write a function that accepts a positive number N. The function should console log a pyramid shape with N…


Photo by Rodion Kutsaev on Unsplash

Okay so this problem is a good one and my next post after this is very closely related to this.

Let's start with some directions.

We are asked to write a function that accepts a positive number N. The function should console log a step shape with N levels using the # character. We are also asked to make sure the step has spaces on the right hand side.


'# '
'# '
'## '

and so on. Notice the empty spaces, this is important to remember.

Once again we start with our function…


Photo by Diomari Madulara on Unsplash

O.k. so this is going to be a shorter problem than the last few but I will once again go into as much detail as possible in the hopes it will help you understand better.

For this problem we’re asked to write a function that accepts a string. The function should capitalize the first letter of each word in the string then return the capitalized string.

E.G. capitalize(‘a short story’) → ‘A Short Story’

Before we start working on this problem let's look at a little tip.

First, let's look at the .slice() method. Slice is used on a…


Photo by Raphael Schaller on Unsplash

Okay so in this problem we’re asked to check and see if two provided strings are anagrams of each other. One string is an anagram of another if it uses the same characters in the same quantity. We’re also asked to only consider the characters, not spaces or punctuation and to consider capital letters to be the same as lower case.

E.g. anagrams(‘rail safety’, ‘fairy tales’) → True || anagrams(‘RAIL SAFETY’, ‘fairy tales’) → TRUE

Photo by Andreas Wagner on Unsplash

Okay, so this week I’m gonna take a break from the technical to just vent a little and maybe give advise, I don’t know yet, lets just see how this goes…

I graduated from Flatiron school in November, it was an amazing experience and I loved almost every minute of it. We are now getting well into March and still no job or even a hint of one. This has me very down and worried about my future this week. …

Array Chunking

Photo by Burst on Unsplash

First off, if you haven’t read my other parts on Algorithms click here to get started.

Okay, what is array chunking? Array chunking is a technique used to split very large arrays into smaller groups, usually for easier manipulation and presentation. With that understanding let’s get started.

Array Chunking

We are given an array and chunk size, asked to divide the array into many subarrays where each subarray is of length, size.

e.g. chunk([1,2,3,4], 2) → [[1,2], [3,4]]

the initial array is split into two subarrays within the chunk.

e.g. chunk([1,2,3,4,5], 2 → [[1,2], [3,4], [5]]

the initial array is…


Photo by Markus Spiske on Unsplash

Well this is a fun one and probably the most popular problem and if you’re here before reading parts I — III you can start here.


So for this problem you’re asked to write a program that console logs the numbers from 1 to n. But for multiples of 3 print “fizz” instead of the number and for multiples of 5 print “buzz”. For numbers which are multiples of both 3 and 5 print “fizzbuzz”.

example: fizzbuzz(5) outputs 1 2 fizz 4 buzz.

Okay let's get started…

So for this problem we need to determine a multiple of a…


Photo by Sven Brandsma on Unsplash

In this part I will be discussing a technique that is applicable to many other string related questions. Once again if you’re here before reading part II jump over HERE and give that and part I a read if you haven't seen those yet.

Okay so let's get into it…


For this problem you are given a string and asked to return the character that is most commonly used in the string.

e.g. maxChar(“adcccd”) === “c” || maxChar(“apple 11123”) === “1”

So once again we will start with an empty function…

function maxChar(str) {}

Now we will declare a…

Brian Butterly

Learning to code, one day at a time.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store