Skip to content

Instantly share code, notes, and snippets.


Learning is cool.

Learning how to learn is a super power.

Lets look at the lense of learning a new language:

At the most tactical level, we would be studying the language itself. Reading a children's book in the target language, or making and studying flashcards.

At a higher level, we would be considering how we can best study the language. Flash cards? Reading children's books in the foreign language? Passive or active learning? etc.



I'd like to alias awesome_print + the _ command in rails console to pp. In other words, I'd like pp[return] to function the same as ap _[return].


As I'm spending more and more time in a rails console session, I'd like to be able to use awesome print to regularly evaluate objects.

I know I can enter ap _ at any time to return the prior object in awesome_print's sweet formatting, but I want to map ap _ to pp.

it takes six keystrokes (including return) to hit ap _, but only three for pp. The problem is, I couldn't figure out a way to alias this inside of my .irbrc.

josh-works /
Last active Mar 19, 2017

To master anything, we need to build mental models, and build some habits around using those mental models.

For example, the first time you set up a ruby file with testing, you probably had to refer to something to come up with the right file structure.

Lets say you have dragon.rb:

class Dragon
  # maybe some attr_readers
josh-works /
Last active Jul 18, 2018
An opinionated guide of how to use your time between finishing the prework, and starting Turing.

if you're here from, here's the gist Jason sent back to me the next day, with his answers:

Jason's answers He said:

From then on, you duplicate that class variable to an instance variable. The .dup should "protect" you from one test modifying data for another test, which is a concern with class variables.

Hey Jason!


As part of the HTTP Server project.

First, I'm working through Practicing Ruby's "Implementing an HTTP File Server" for general practice and understanding.

I'm going to use Postman to capture traffic and try to replicate some of the things the guides reference.

Lastly, I just found Jeff Casamir's walkthrough of almost everything I've discovered in the last week. Save yourself the time, and go read it here

Finding GET requests/responses in the wild

josh-works /
Last active Jan 25, 2021
mythical creatures, prework, ruby exercises, turing, ruby

Make mod 1 easier than it otherwise would be: a guide

This guide will make Turing's mod 1 much easier than it otherwise would be.

note: please see the updated version of this guide; if you continue reading, you'll have a far inferior experience than if you head over here:

We'll do this by working on, (and completing) a few dozen small Ruby exercises.

You might be thinking:

Josh. This already sounds like a lot of work. I just finished my prework, and I know Turing's gonna be brutal. Why should I do all of this optional work, instead of enjoying my last few days of freedom?


TLDR. I have two questions, though... the first one got answered after I typed all this up.

  1. How can I access objects inside of another object. (SOMEONE GAVE ME AN ANSWER. Feel free to skip to #2)

  2. I've attached by pry error output and gem list below, as will as troubleshooting and steps to reproduce it on my machine. (It's functionality is intermittent)

More detail on how I got the answer to #1

I was using IRB instead of Pry, couldn't tell that the objects were inside of an array. So, it's an array, so I can iterate through it with all the enumerables.


Week 1 Diagnostic

start time: 10:22
end time: 10:45
total: 24 min

Floats and Integers

What’s the difference between a float and integer?