Skip to content

Instantly share code, notes, and snippets.

Justin Searls searls

Block or report user

Report or block searls

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jim-memories.md

I was asked to share a few memories of Jim Weirich as someone prepared for a conference talk about him, so I figured I'd share what came to mind here:

  1. My cofounder Todd Kaufman would often refer to Jim as the "Santa Claus of the Ruby community". He was a big, jolly guy and he always brought joy to every room he was in. If people take away one thing to know about Jim, it's that even when he had 30 years of experience on someone, he always treated them with tremendous deference and respect. He always approached my ideas and questions as if they were urgent and fascinating, even if he'd encountered them dozens of times before. It's a trait I strive to imitate whenever I meet people at a user group or a conference, because it made such an impact on me when someone that I looked up to treated me like my experiences mattered to them.

  2. I would sometimes drive 2 hours from Columbus to Cincinnati just to hang out at Jim's office. No matter what client work he had to do, he was never too busy for me. I remember

View japan-interview.md

WaniKani sent me this interview since I'd reached the program's max level. I figured I'd save my answers here for posterity.

Q: Why did you study Japanese?

I took German language in high school, but both its similarities to English and the near English fluency in every German person I've ever met conspired to discourage me from really taking it seriously.

I did, however, learn that the act of studying another language was a deeply perspective-altering activity. When you see how a language and a culture are inextricably linked, it triggers in me an introspection of my own ideology—what do I take for granted that's encoded into the English words I say or how I use them?

Ultimately, this led me to want to learn the most challenging language I could find, with a secondary priority for cultures that my own experience would relate to the least. Of Japanese, Chinese, and Russian, the emphasis on subtlety and harmony in Japanese culture put it over the top. Once I started studying,

View pull-request-pr.md

This will get well-actually'd to death, but to keep it simple, here's what I have been doing for the last several years when I have an open PR and master gets ahead of me

Open the PR

  1. Start the branch with git checkout -b blah-blah
  2. commit stuff
  3. git push
  4. Rush to the web UI and click "open pull request" after I see the "new branch" detected and mark it as WIP or whatever if it's not ready to merge right away

Updating master

View ios-keyboard-focus-scroll-hack.md

The problem

When a MobileSafari keyboard-receing input (e.g. an input[type=text]) receives focus in Safari, the system will try to verify whether there is ample room to bring up the soft keyboard without needing to scroll. The amount of wiggle room needed for Safari to consider available scroll height "ample" seems to increase with every major iOS release (surely to work around the very real problem of focus being granted to inputs that are subsequently oscured by the keyboard).

However, for "app-ey" web sites that carefully place each text input in a relatively fixed layout, this can be a maddening arms of scooching up my content more and more with each iOS release to avoid awkward jutters every time the keyboard is shown (example video here. In practice, it seems like the input's scrollHeight can only really be about the equivalent of 15vh before you're likely to get an automated scrolling whiplash from the soft keyboard, which isn't much

@searls
searls / bugsnag-2.md
Last active Jan 5, 2019
Downgrading the JS Bugsnag client from 3.x to 2.x
View bugsnag-2.md

Downgrading the JS Bugsnag client from 3.x to 2.x

Why?

It's smaller (as of 2019-01-05). The size of my application was reduced from 223KB to 194KB. After talking to Gary, he mentioned that James Smith had pointed him to the smaller legacy client, so I tried it out.

How?

To keep using Bugsnag@2, grab this:

@searls
searls / 2019-winter-ruby-abstract.md
Last active Dec 27, 2018
Winter 2019 Ruby talk proposal
View 2019-winter-ruby-abstract.md

The Selfish Programmer

Using Ruby at work is great… but sometimes it feels like a job!

This year, I rediscovered the joy of writing Ruby apps for nobody but myself—and you should, too! Solo development is a great way to learn skills, to find inspiration, and to distill what matters most about programming.

Building an entire app by yourself can be overwhelming, but this talk will make it easier. We'll start with a minimal toolset that one person can maintain. You'll learn how many "bad" coding practices can actually reduce complexity. You may be surprised how selfish coding can make you a better team member, too!

Details

View share-link-from-google.md
@searls
searls / memo_me.rb
Created Oct 18, 2018
A class-wrapping memoization dingus
View memo_me.rb
def MemoMe(superclass)
# Ripped mostly out of
# https://github.com/ruby/ruby/blob/trunk/lib/delegate.rb
klass = Class.new(superclass)
methods = superclass.instance_methods
methods -= [:to_s, :inspect, :=~, :!~, :===, :instance_variable_get, :instance_variable_set]
klass.define_method(:initialize, lambda do |*args|
@__memo_me_instance = superclass.new(*args)
end)
klass.module_eval do
@searls
searls / basketball.md
Created Oct 12, 2018 — forked from stevenjackson/basketball.txt
How I Learned to be a Better Technologist (by Coaching Youth Basketball)
View basketball.md
- Giving it to the best player doesn't make the team better
- Positive reinforcement
- You can't play for them
- You're going to be ignored / Shared understanding takes forever
- The game is not the most important thing

I coached a rec team that had a huge range of talent. One young man was very talented and could have gone on to play junior college basketball. I had a couple that were a level below him and then varying levels all the way down to the kid who was surprised when the basketball was in his hands. I did focus on leveling up everyone in practice, but our in-game style quickly devolved to give it to the best kid and move around him. This was moderately successful, everyone got to contribute, and the games were competitive. Then that kid got sick. Then baseball season started and he wanted to focus on that. All of a sudden my team had no identity and no idea how to win. We couldn't just lean on the next best player, the talent gap was too wide. Before the team could r

@searls
searls / bing-wanikani-results-count.json
Created Sep 16, 2018
Naive search results count for every kanji & vocab character string in WaniKani against the Bing Web Search API v7
View bing-wanikani-results-count.json
{
"関する": 129000000,
"公告": 96800000,
"愛知県": 68200000,
"埼玉県": 67700000,
"神奈川県": 67700000,
"一人": 60400000,
"年中": 60300000,
"一等": 59800000,
"的": 59100000,
You can’t perform that action at this time.