Ever since I started to code I’ve wanted to learn about the browser’s Web Audio API. My long term goal is to create a full synthesizer with it, so give me a follow if you want to watch me on that journey.
I remember during my last few weeks at Flatiron School I was experimenting a bit with the Web Audio API and was able to create a sound in the browser. I want to show you how simple something like this can be.
According to MDN, the Web Audio API provides a powerful and versatile system for controlling audio on the Web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more. …
In this exercise, we have a list of band names and as most are aware, lots of band names contain either the articles the (The Band), a (A Flock of Seagulls), or the more rare an (An Albatross). For our list, we want to ignore those articles so when mapped to our page they’ll display in order of the word that is not an article. …
Have you ever started a project with ‘rails new’ and not wanted to use your default version of ruby?
Moreover, you might have already begun work on a project to later find you need to change versions.
Now there’s no need to worry about such problems with…RVM! Also known as the Ruby Version Manager.
Just like little Timmy needs to start his day with a tall glass of milk, you should probably know which version of Ruby is currently your default version.
In my recent article, I went over the differences between two very popular types of testing- Mocha and Jest. This time around I wanted to touch on RSpec, a testing suite for Ruby. Ruby on Rails is also my preferred backend, so I was more than happy to take on the task of learning a bit about RSpec for a recent interview.
My challenge was to create an API with custom endpoints and then build RSpec tests for each one of those endpoints. Lucky for me, my recent dive into the world of testing certainly helped, as the flow of logic is similar to what I had experienced while experimenting with Mocha and Jest. …
“If I am a guilty man, my crime is in daring to believe that there’s a ruby gem for every situation, that the truth will pass in my rspec tests and that no one bug can live forever. I believe it still. Much as you try to bury the gems, the truth is out there.” -Coding Mulder, probably.
You have phone numbers as an attribute for a class, but users are able to input their phone numbers in whatever which way they want. …
When first getting started with programming in Rails, a new dev will learn about how classes are created implicitly with sequential ids. Sequential ids are nice because they’re easy on the eyes and it’s even easier to track stuff down within your json.
Sequential ids do have their drawbacks. Take this endpoint for example:
Following RESTful practices, this URL should bring us to a show page for the user with the id of 3. The largest issue here is how exposed our URI is. If our URLs have exposed URIs, it’s easier for people to access data and that’s never a good thing. …
Are you tired of getting this error in your Rails Applications?
Does not knowing what CORS is got you down?
Well, have a seat over there and let’s take a look at…
…RACK-CORS AND YOU!!!
To get an understanding of why we’re getting this error. It’s important to know what CORS is and what it does for our applications. For starters, CORS stands for Cross Origin Resource Sharing. …
Ruby and Rails have an awesome take on MVC, specifically in the Models. As many know, Ruby/Rails is sometimes considered a “magical language” because of all of the amazing things you can do with some of the gems out there. The gem I’d like to focus on today is the every so important Active Record, and how it can help us develop our models, and their relationships.
When we first start a project, the most important thing to do is go over the relationships our Models/Classes will have with each other. Say we have three models- Doctor, Patient, and Appointment.
Patient -< Appointment >…
The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value (MDN page here). Promises are always existing in one of three states:
Let’s get down to business, you wanna know how to add sweet fonts to your webapps and I’m here to show you how. Let’s go!
Step 1. Browse Fonts!
Head on over to fonts.google.com. Browsing fonts with Google Fonts can be an unexpected amount of fun, but also an unexpected amount of time in CSS limbo, testing to see which font works best for a project. Lucky for us Google Fonts has a nice feature that let’s us test a little bit of writing.