Home » Ruby

Ruby

Advanced Enumeration with Ruby

Enumeration by definition is “the action of mentioning a number of things one by one.” In programming, instead of mentioning, we choose any action we may want to perform, whether it simply be printing out the item to a display or performing some sort of selection and/or transformation on the item. In programming, we can perform many ways to select ...

Read More »

Realtime with React and Rails

When I was thinking about creating something to showcase using ActionCable (websockets) in a Rails app with React, I first thought of building a chat. But everybody builds a chat. So next, I thought about a realtime dashboard. But then I realized I had no data in this demo app with all but one user (me). So I decided to ...

Read More »

Graphing Benchmark Results in Ruby

Nothing presents performance statistics quite as well as having graphs for benchmarks. Whether you want to present an alternative way for code guidelines based on performance or show a presentation, seeing the difference makes a difference. What we’ll cover here will show you how to generate graph data images from your own Ruby codebase’s benchmark suite, with presentation-worthy quality. The ...

Read More »

Server Rendering React on Rails

React apps give us incredible power in the browser, and with the react_on_rails gem from the folks at ShakaCode, we now have an easy way to use React inside of our new and existing Rails apps. In a previous article, I talked about how to get up and running with React in your Rails app. In this article, we are ...

Read More »

Using React Inside Your Rails Apps

I have never felt as productive as I do in Rails. Yet, with front-end seemingly moving further away from server-rendered views toward React, Angular, Vue, and Ember, I was unsure where Rails fit into this picture. Would it be relegated only to apps with “simple” front-ends, where holding things together with jQuery still managed to work, or perhaps to its ...

Read More »

Using Docker Compose for Ruby Development

Docker is an amazing tool for developers. It allows us to build and replicate images on any host, removing the inconsistencies of dev environments and reducing onboarding timelines considerably. To provide an example of how you might move to containerized development, I built a simple todo API with Ruby on Rails and PostgreSQL using Docker Compose for development, testing, and ...

Read More »

Crystal from a Rubyist’s Perspective

Crystal is a language written to be very much like Ruby but as a compiled language rather than an interpreted one. This gives us the advantage of compile time optimizations which will make our code run much faster. Another difference in Crystal’s design is that it’s a Typed language rather than a Dynamically Typed one. This helps with the languages ...

Read More »

Writing Efficient Queries

Writing efficient queries that balance performance and memory footprint is the most crucial part of writing good software. Doing this is not super easy, but keeping an eye on logs and how your queries are executed under the hood will definitely help you a lot. But you know the situation: requirements keep changing, new useless features on top of changed ...

Read More »

ActionCable: The Missing Guide

ActionCable was introduced to Rails as of version 5. It allows you to create pub/sub WebSocket connections in your Rails application, which brings live updates to your user experience. ActionCable upgrades an HTTP connection between the server and client to a WebSocket. Some of the benefits of a WebSocket is that the amount of data transferred per transmission is considerably ...

Read More »

Want to take your WEB dev skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • PHP Programming Cookbook
  • jQuery Programming Cookbook
  • Bootstrap Programming Cookbook
  • Building WEB Apps with Node.js
  • CSS Programming Cookbook
  • HTML5 Programming Cookbook
  • AngularJS Programming Cookbook