Skip to content

Instantly share code, notes, and snippets.

@josh-works
josh-works / exceptional_values.rb
Last active Feb 10, 2021
test, and the code that makes the test pass, to understand whole values and exceptional values, from Avdi Grim's https://avdi.codes/courses/moom/, based on https://josh.works/primative-obsession-and-exceptional-values
View exceptional_values.rb
class Object
def exceptional?
false
end
end
Course = Struct.new(:name, :duration) do
def duration=(new_duration)
self[:duration] = Duration(new_duration)
end
@josh-works
josh-works / mod_1_bee_drills_setup.md
Last active Jan 25, 2021
mythical creatures, prework, ruby exercises, turing, ruby
View mod_1_bee_drills_setup.md

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: https://josh.works/turing-backend-prep-01-intro

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?

@josh-works
josh-works / process-over-everything.md
Last active Oct 18, 2020
Process & Workflow for solving programming challenges, Turing
View process-over-everything.md

"Process" is greater than everything

Having a good process is how you go about doing anything that takes a long time and is hard. A good process can be a faithful tool to help you learn dozens of things, now, and five years from now. It's flexible and it's powerful.

One of the biggest pieces of "having a good process" is "taking plentiful notes, easily and quickly"


I won't try to convince you. Here's Arique, currently in Mod 1, on how she's made use of this general process:

@josh-works
josh-works / cannot-get-4k-and-and-60hz-at-same-time.md
Last active Jul 12, 2020
I'm making a plea for help from others for resolving my display problems. This is basically what I would write in StackOverflow, if I knew which StackOverflow topic to use. Any help is much appreciated!
View cannot-get-4k-and-and-60hz-at-same-time.md

currently trying: USB-C->DisplayPort cord with SwitchResX to "force" the display up to a reasonable level

My home office setup has suffered some problems of late that are driving me insane.

The most annoying is my wired mouse. I use a wired Redragon Mammoth hooked up to my USB-C hub, and it started giving me problems when dragging anything. Like... a file, a screenshot, a window, it would rapidly (dozens of times a second) "drop" what I was dragging and then pick it up again.

This had extremely unpredictable effects, and was highly disruptive to my workflow.

I don't think my mouse is failing (my bluetooth mouse works fine, and for a variety of reasons I think the problem is my monitor is running at 30hz, not 60. more on that later.)

@josh-works
josh-works / better_terminal.md
Last active Jul 6, 2019
Make the terminal more usable, common commands
View better_terminal.md

Make your terminal more usable

You're going to spend all day looking at your terminal. Make it be kind to you.

Part 1

Here's a video walk-through of part 1 of this guide:

[![Play the video][image0]][hyperlink0]

View zsh_setup.md
View learning_how_to_learn.md

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.

View on_learning.md

On Learning

topics: {
      DEEP WORK:
        protect and cultivate (limited) attention,
        ear plugs,
        skeptical of music,
        examine your own process,
        downtime,
@josh-works
josh-works / turing_prep_starting_mod_1.md
Last active Jul 18, 2018
An opinionated guide of how to use your time between finishing the prework, and starting Turing.
View turing_prep_starting_mod_1.md
@josh-works
josh-works / benchmark_double_inject.md
Last active Apr 13, 2018
ruby, benchmarking, double_inject
View benchmark_double_inject.md

Double inject. What does it mean?

i want to know how long it takes to do some stuff. I've got some code like this:

def count_stuff(list)
  list.inject([]) do |results, item|
    results << get_results_from_something_else(values)
  end.flatten.uniq