Monthly Archives: November, 2016

Ruby: Rails Bootstrap Flash Notice Block

If you use Rails with Bootstrap, then you will find this block of code very useful. It's a great way of rendering flash notices...

Ruby: Pass a Block to Struct and get a default value

In this quick example you can see how to pass a block to a Struct and have a default value returned. ...

Ruby: Make a Root Node for ActiveModel Serializers

If you wish to override the root nodes for ActiveModel serializers without a global config use the following: https://gist.github.com/thehashrocket/58273e8965c16b1a9ccbbd0839ed14d2.js This makes...

Ruby: Bang Bang . . . Boolean

Ruby supports a !! boolean operator. In the following example we'll extend this to a class default for our Tasty class.  ...

Ruby: Trouble with Parentheses

As you may or may not already be aware, parentheses are optional in Ruby. This can be rather unnerving to people who are coming...

Ruby: Numeric types perform type conversion across == but not eql

These three operators in Ruby look very similar but can have drastically different results when comparing Numeric operators. Numeric types perform type conversion across ==...

Ruby: Make a sweet console counter to see how a operation is going

By using a counter in your ruby console script you can gain insight into long running actions for your application. https://gist.github.com/thehashrocket/66ddf44525ab4108a7dabd38ccc40226.js

Ruby: An example of each_with_index

Here's a prime example of what you can do with the `each_with_index` function in Ruby.In the following code, you can see that we loop...

Great Video on Progressive Performance

I've been thinking a lot about progressive web applications. I've been thinking about building a new app as a progressive web app instead of...

Come support #OpenSourceWeek!

A whole week is dedicated to supporting #OpenSource and you can be a part of it! Come checkout out why now, more than ever,...

Archives

Latest articles

How to do Destructuring in JavaScript

What is Destructuring? At its core, destructuring is the idea that we are pulling out values individually from a...

Writable Streams, Streams Piping, and Error Handling in Node.js

A Writable Stream A writable stream is a stream of data that is created to write some streaming data....

Here are Six Front-End Development Channels on YouTube

The Coding Train https://www.youtube.com/watch?v=bKEaK7WNLzM If you love programming then this is the...

Real World Use Cases for JavaScript Proxies

Introduction to Proxy In programming terms, a proxy is an entity that acts on behalf of some other entity....
14.0k Followers
Follow