Making #Inject Add Up

Part of my series of easy primers on methods to eliminate code smell: needlessly lengthy or complex code.

inject

Code smell: You’re performing a mathematical function on a series of numbers (like adding or multiplying) and returning


How to #Tap That

Part of my series of easy primers on methods to eliminate code smell: needlessly lengthy or complex code.

tap

Code smell: You’re executing some action on a variable, and then have to return the variable in a separate step.


(Pr)#each_with_object

Part of my series of easy primers on methods to eliminate code smell: needlessly lengthy or complex code.

each_with_object

Code smell: You’re creating an empty hash or array. Then you’re iterating over another hash or array to


Ruby Methods Cheat Sheet

Here is my Hello World, my first post on this new blog. Last week, I moved to NYC and started classes at the Flatiron School. There’s tons I could write about that, but for now, I’ll just share some of my notes: a cheatsheet of Ruby methods and iterators — complete with color coding…

Synaptic Sugar
Synaptic Sugar
Code blog covering Ruby, Javascript, HTML, CSS, and other assorted coding topics. Attempting to make simple the confusing, with minimum nerd jargon. Written by Anna Rasshivkina.
More information
Followers
5
Elsewhere