justin․searls․co

Installing a Content Blocker on iOS 9 Public Beta

After spending 3 weeks abroad, literally afraid of opening anything resembling an article in Safari, I was eager to come home, install a beta operating system, and take advantage of iOS 9's now-famous content blocking API. There are a few projects on GitHub that do this, but the most evolved seems to be Block Party.

Let's try out installing a content blocker on an iPhone for ourselves. The instructions below are mostly complete and a bit inane, so it's up to you whether you're better off just waiting the 4–6 weeks until iOS 9 is released to the public.

First, there are some pre-requisites:

With these in place, it's time to open BlockParty.xcodeproj

Keep reading…

How to Internet in Japan

If you're reading this, then perhaps you enjoy having fast, easy access to the Internet. If so, and you're heading to Japan anytime soon, then perhaps this guide will be of use to you.

When traveling to Japan, access to their mostly-excellent wireless network is not always easily attained. In the past, I've used T-Mobile's free unlimited international roaming as well as mobile hotspot rental services, but both have significant drawbacks — extreme throttling and terrible battery life, respectively.

Here, I'll document a much more convenient way to get Internet access, by way of purchasing a prepaid data-only SIM card. First, a few prerequisites:

  • An unlocked phone that can join international GSM networks (this guide covers my use of an iPhone 6, but virtually any GSM smartphone is supported)
  • The means to make your way to the first floor of a Yodobashi camera, though other electronics stores ("Denkiya-san") may work as well
  • (Somewhat ironically) an Internet connection, to download a configuration profile
  • Roughly $35

You'll never guess what happens next…

Constants and Variables

They're a million million worlds. All different and all similar. Constants and variables. -Elizabeth, Bioshock Infinite

A lesson I learned early in my career as a programmer was to be wary of accidental creativity. If you're the type of person who really cares about getting the details right, it's critical to first decide which details truly matter. Not doing so is a recipe for endless frustration, as one will inevitably be distracted and defeated each day — sweating more arbitrary decisions than meaningful ones.

There is a bunch of prior art on this point, from studies on the paradox of choice to cognitive depletion and even Steve Jobs turtleneck lore. It's pretty intuitive, after all, that eliminating routine decisions should free up energy for our brains to do other (presumably more valuable) things. However, we tend not to see many interesting examples of the types of constants people set for themselves. And even more importantly, there is rarely discussion on the aspects of our lives that people might intentionally keep variable.

I guess I'll go first.

To be continued…

Merge Commits artwork

RubySteps: Building on Trust

Merge Commits

Pat Maddox used to have a podcast called RubySteps, and I joined to talk a bit about how we sought to differentiate Test Double from other software consultancies.

Appearing on: RubySteps
Published on: 2015-06-01
Original URL: https://podcasts.apple.com/us/podcast/005-justin-searls-builds-a-software-consultancy/id994166212?i=1000343723148

Comments? Questions? Suggestion of a podcast I should guest on? podcast@searls.co

How-to make your iPhone Dimmer than Dim

When I'm trying to read my iPhone (or iPad) in bed, I'm liable to wake up my spouse with the device's backlight, even when the screen is set to its lowest brightness setting. Moreover, it's hard for me to fall asleep immediately after staring at a relatively bright screen.

Up until last night I thought I was just out of luck unless I installed flux, which would never be worth the security and stability issues raised by jailbreaking a device. Fortunately, Olivier Lacan commiserated and relayed a tip that iPhone's accessibility settings can be lightly abused to decrease the strength of the backlight below its lowest setting. (We've known the hardware is capable of this given that iBooks has always allowed you to.)

Because the Lifehacker guide Olivier linked was a bit hard-to-follow, I figured I'd help by illustrating a how-to do this with a few GIFs.

Keep reading…

Studying Japanese with a Nintendo 3DS & Google Translate

I was interested in using videogames to practice my Japanese reading and listening comprehension, so after some initial thinking, I decided to buy an imported New Nintendo 3DS. Here are some notes on how I went about that and what I'm doing to use games primarily as an educational tool.

Buying the device

There are lots of import sites out there that will get you a good deal on Japanese game products, but I wanted to (a) get fast, reliable shipping, (b) have some kind of return policy, and (c) not risk customs headaches. As a result, I decided to buy the device off Amazon's US site from a third-party merchant using Fulfillment by Amazon so that I could get Amazon Prime shipping and Amazon support for returns.

I ended up purchasing this model (Amazon referral link) and then hunted for an Amazon Prime-able merchant under the sellers list, like so:

Next, I picked up a new 64GB SDXC card (Amazon referral link) and formatted it to FAT32 using Mac OS X's Disk Utility (here's an instructional video if you're not familiar with how to do this).

To be continued…

Will your iPad's Apple SIM allow you to buy ala carte prepaid data from AT&T?

When Apple announced iPad Air 2, I was most excited by the prospect of Apple SIM. That excitement waned when we learned AT&T would lock Apple SIMs to its network upon their activation (so much for that layer of indirection enabling competition). Still, I held out hope that maybe an Apple SIM could be used to purchase pre-paid data from an iPad and then be plopped into and used by an unlocked iPhone 6.

Let's see how that went.

Keep reading…

Merge Commits artwork

Changelog: Lineman.js

Merge Commits

My first appearance on The Changelog podcast, promoting Test Double's doomed-but-now-defunct JavaScript project management CLI, Lineman.js.

Appearing on: The Changelog
Published on: 2014-08-28
Original URL: https://changelog.com/podcast/128

Comments? Questions? Suggestion of a podcast I should guest on? podcast@searls.co

Merge Commits artwork

.NET Rocks: Enterprise JavaScript

Merge Commits

Was a guest on the long-running .NET Rocks show with Carl Franklin & Richard Campbell to discuss the JavaScript world with a couple C# guys.

Appearing on: .NET Rocks
Published on: 2014-01-09
Original URL: https://www.dotnetrocks.com/details/940

Comments? Questions? Suggestion of a podcast I should guest on? podcast@searls.co

Merge Commits artwork

.NET Rocks: Live in Bulgaria

Merge Commits

One of the weirdest conference trips I ever took was to Sofia, Bulgaria, where I talked about JavaScript testing to a room full of .NET developers at a conference in a shopping mall run by Telerik.

Appearing on: .NET Rocks
Published on: 2013-10-29
Original URL: https://www.dotnetrocks.com/details/919

Comments? Questions? Suggestion of a podcast I should guest on? podcast@searls.co

Unrequired Love

This post presumes you're familiar with the concept of tools that introduce a module format (whether it's Require.js, Browserify, or something else) to JavaScript code that runs in the browser. I'll arbitrarily refer to the over-arching meme as capital-R "Require" for the rest of this post.

Also, keep in mind that this post is only discussing "JavaScript that runs in browsers". It's not at all concerned with Node.js or npm or anything having to do with dependency management of JavaScript in that ecosystem.

But wait, there's more…

Jasmine Tactics

Today, I had the good fortune to visit my friends at Sparkbox, where they host a Dayton JavaScript user group called Gem City JS. Today, I showed up to share some perspective on how to test JavaScript with Jasmine.

Folks have been asking me to share a screencast of how I write Jasmine tests for a few years, so I recorded the session and am providing it online, completely unedited:

This screencast (YouTube) is merely a conversation to provide an answer to the question, "Hey Justin, how would you write a test for ____ JavaScript code?" where that blank might be filled with "interacting with the DOM", or "binding user events", or "making AJAX requests". I cover each of those in a way that's similar to how I do it today; I trust that in six months, I'll have evolved and changed my tastes somewhat, but this reflects where I'm at right now.

Content warning: more content…

An Includes Trap

Funny how just this week I felt compelled to blog about implicit knowlege, because a terrific example of the possible consequences of too much implicit knowledge came up yesterday.

Please forgive me for the length of this post, because this is a surprisingly subtle problem. As with most subtle problems, the context and relevant background knowledge are necessary to arrive at a clear understanding of both the problem itself and the causes.

Spoiler alert: there's more to this…

Explicit vs Implicit Knowledge

We lack much of a vocabulary to describe knowledge and how code can succeed to or fail at codifying it. The points made in this post are so popular as to be self-evident, but it seems I can always use more practice in articulating them. I'll start with an example that many of us are familiar with and then swivel into an issue I ran into today.

code comments

Inline comments in code are often maligned for two reasons: (1) well-factored code can be so expressive that additional comments shouldn't be too valuable, and (2) comments often fall out of sync with reality, as only the code must change to implement new behavior.

Let's dive in and find out…

Upgrading Hacked Dependencies

Today we set out to upgrade one of the third-party JavaScript dependencies on which our project relies and we inadvertently discovered that it had a number of custom hacks made against it. This blog post replays a similar experience and how we can reduce some of the risk in attempting to confidently upgrade the dependency with git diff and patch.

introducing a new dependency

It starts when we add a new 3rd party library to our project. Everything is new and exciting!

What happens next will shock you…

Say Hello to Lineman

We've been hard at work on a tool called Lineman that helps you create web applications in JavaScript (and CoffeeScript!), and we're really excited to share it with you!

Tonight I recorded an 8-minute screencast to show you the ropes:

As time goes on, I'll go into more detail on both our motivations in writing Lineman as well as more advanced usage like overriding configuration defaults.

In the meantime, please give Lineman a spin and tell us what you think!

To be continued…

API Design is Hard

[Note: this post covers unreleased features of gimme, which are unreleased because of the issues described in this post. They need more time in the oven. You can peruse the feature branch on github]

Working on gimme with Mr. Karns made me realize I'd painted myself into a corner on gimme's API design. I thought I'd share here, for hope that either (a) someone will respond with an approach I like better, or (b) the topic might prove independently useful, and some good will come of this after all.

Turns out, there's more to it…

Purpose-Oriented Tests

Lately I've been thinking a lot about how we can improve our code by reflecting on our mindsets and motivations with respect to software testing. A while ago, I wrote about the huge impact that prompts have on how we grow code (even the parts of speech we use to name objects). Later, I sat down to illustrate a taxonomy of the types of tests I tend to see in the wild. Recently, I wrote a bit about our natural tendency to misplace blame when testing gets hard.

Okay, I'm interested…