All Posts

  • A 100% Estate Tax?

    All taxes are distortive, but some are necessary. Most people agree that governments provide many useful services, but there’s plenty of disagreement about how to pay for them. In the USA we’ve mostly settled on a combination of income and (depending on your state) sales and property taxes to fund the government. There are some other minor revenue sources (customs duties, gasoline tax) but that’s basically it.

  • I Accidentally Went a Week Without Mobile Internet

    I’m writing this at the tail end of long-planned vacation to Chile. When we first arrived two weeks ago I had planned on buying a cheap prepaid data plan immediately, since my US carrier still has outrageous international roaming rates. Unfortunately, we took a long time to get out of the airport and I had a commitment that first evening, so I didn’t get the chance.

  • A Faster Cycle Helps Startups

    It feels like the world is getting faster. It’s become a cliche to refer to the “exponential progress” of technology, but between Moore’s Law and similar (if less easily measured) trends in software development, exponential progress is a reality. This reality is reflected in the history of tech leaders as well. IBM dominated the computer industry from the release of System/360 in 1964 until the commodization of PC hardware thanks to Microsoft, which consolidated its position with the release of Windows 3.1 in 1992. Microsoft was the industry king and Wall Street darling until it became clear that the web was the new desktop, catapulting Google (almost by default) to the top of the industry circa 2004. Sometime in the next decade – the timeline is unavoidably fuzzy, because the transition isn’t over – it began to feel like Facebook has a greater claim to the title of sector leader.

  • Small Companies and the Presumption of Competence

    Big companies can’t afford to take a chance on you. Small ones can – and they have to.

  • Keep Your Burn Rate Low

    In Paul Graham’s A Student’s Guide to Startups he talks about the importance of a low burn rate in an early-stage startup:

  • Being in the Right Place

    I didn’t particularly want to move to Silicon Valley. In August of 2016 I had recently passed Google’s hiring committee, and was going through the team matching process trying to find a home. I talked to 3 teams in the Bay Area and one in Colorado, but I kept pestering my recruiter to send me more – specifically, to send me some matches in my hometown of Seattle.

  • An Actually Good Solution to On-Device Development in React Native

    I recently complained about how hard it is to develop on a physical device with React Native. By default, a React Native app in development will try to contact the packager on localhost:8081 to get updates to the javascript code. This works well in a simulator or emulator where localhost will pass through to the host machine running the packager. Unfortunately, when running on a device loading from localhost won’t work at all on iOS, and on Android requires a cumbersome extra step of calling adb reverse to forward the port properly every time the device is plugged in to the computer.

  • Keeping the Screen on in React Native

    This is a short post just to point to a library I published on npm today. react-native-keep-awake allows you to prevent the screen from going to sleep while your app is active. It’s useful for things like navigation or video playback, where the user expects the app to remain visible over long periods without touch interaction.

  • Six Months with React Native

    It’s been nearly eight months since I first played with React Native. Since that time I’ve spent a lot of time working with the framework, eventually joining the core team. For the last six months, I’ve also been using React Native full time and building my business’s primary iOS application, Emberall, in it. We just released our first public version to the App Store, so now is a great time to do a retrospective on how development with React Native feels. I want React Native to succeed and believe it will, but I’ll also try to be honest about the places where the project still needs to improve.

  • Libraries I Use in a Production React Native App

    React Native is an exciting technology, as I’ve written about before. Facebook and outside collaborators are working hard and iterating fast on the core technology, and a community of users and library authors is growing and maturing quickly.

  • Detecting Device Orientation in React Native

    Typically, when designing a view either on the web or mobile it should be responsive to changes in size and be usable in a variety of aspect ratios. When done correctly, this allows a mobile app to provide a useful UI in landscape or portrait orientation. However, sometimes it’s still useful to know the display orientation of the device.

  • More Debugging with React Native

    Last month I wrote a bit about debugging React Native in the Chrome console. For some types of development, particularly experimenting with APIs that you’re not familiar with, the console is a very productive environment.

  • Early-Career Resume Advice (for software developers)

    My sister Jackie recently asked me to review her resume. She’s planning on taking a break from her PhD program in physics to try out work in software development through an internship (and if you’re looking for an extremely bright, motivated intern this summer, especially in the Seattle area, let me know). This is what the resume draft she sent me looks like, more or less:

  • Breaking up Heavy Processing in React Native

    This post describes the importance of not blocking the Javascript thread in React Native, a few of the built-in strategies for accomplishing this, and finally a new solution I’ve developed for breaking up “background” tasks in React Native so they don’t block user interactions. If you already know a bit about performance in Javascript and want to skip straight to the good stuff, check out the next-frame repo.

  • Debugging with Global Variables and the Chrome Console in React Native

    Given Javascript’s dynamic nature, a lot of debugging and even development happens in the REPL. React Native’s developers understand this, and have provided excellent first-class support for inspecting and debugging React Native apps within the Chrome Developer Tools.

  • Redux Persist and ImmutableJS Records

    At Emberall we’re using React Native for our newest mobile video history recording application, which should be available in a few months for both iOS and Android. Given that React Native was only open sourced in April and is still under very active development, the tools are in flux as well.

  • Mixing 32- and 64-bit Dependencies in Android

    As I’ve been experimenting with integrating React Native into the existing Emberall app (post coming soon) I found that the app consistently crashed on the Nexus 9 I was using for testing with the strange error:

  • Integrating React Native with an Existing App

    After my last post I decided to see how difficult it would be to add React Native to an existing Android application. Turns out not that hard! (Although there are still a few gotcha’s).

  • One Day with React Native for Android

    I was extremely excited on Monday to hear that React Native for Android had officially been released. I’ve been looking forward to playing with it for some time, and finally have a chance.

  • Showing the current time in rails_admin

    At Emberall we use rails_admin as an easy way to administer data in our backend. It’s convenient because it gives us a visual way to edit data and fix customer issues that any employee can use without having to learn SQL.

  • Signing Android Builds with Gradle

    At Emberall we’re in the relatively uncommon position of developing a consumer Android application while enjoying complete control over the hardware it’s deployed to (our Emberall video recorders). This gives us the ability to integrate the way our software and hardware work together extremely tightly, leading to a delightful user experience.

  • Plan to Throw One Away

    One of my favorite books on project management is Fred Brooks’ The Mythical Man Month. There’s a lot of good stuff in there, including a chapter titled Plan to Throw One Away.

  • ClojureScript in Rails

    Since I wasn’t able to find any information online on the best way to integrate Clojurescript into the Rails asset pipeline, I’ve decided to write up our experiences here. If you’ve found a more straightforward way to accomplish this, please feel free to chime in in the comments!

  • Puma vs. Unicorn — Performance

    After making our app thread-safe and transitioning to Puma, I’ve done a bit of benchmarking to see what effect, if any, the new server has on performance.

  • Redis Reconnection Overhead

    For our main Rails application, we’re currently migrating from the process-based Unicorn server to the thread-focused Puma. This should allow us to serve more requests with a smaller memory footprint, and paves the way for a possible future transition to JRuby, which can benefit from true multi-thread concurrency.

  • Rails VM Performance Tips

    Quick tip for better Rails performance when working within a VM with a shared folder: keep the 3rd party gems out of the shared folder! I recently noticed a performance regression in the Emberall test suite that caused the tests to consistently take about 3x as long to run as before. We hadn’t made any changes to the version of Ruby or Rails, and the CI server build times weren’t affected.

  • Rails Auto-Refresh

    In my last post I discussed some of the attractive elements of the Clojure ecosystem. The primary Emberall app is still written in Rails and that’s still where most development happens, so I decided to take some time to enable the auto-refresh functionality built into Clojure’s Ring. Rails already gets us halfway there by automatically reloading updated files on the server, but by following these steps any open pages will also automatically refresh when code is updated in development.

  • Clojure for Rails Programmers

    I’ve been experimenting with Clojure for a new product we’re working on at Emberall. We’re already using React fairly extensively in our front-end code in the main app, and I became intrigued by the possibilities of Reagent, a ClojureScript wrapper for the framework.

  • Responding to Issues

    This morning I got an email from New Relic informing me that the CPU load on Emberall’s staging server had been over 80% for over 5 minutes. It’s not unusual for the CPU to peg pretty high during video reencoding, and even to hit 100% for a limited time when a user has uploaded a lot of videos at once and they’re all being processed. But this was on the staging server, which only I use, and I hadn’t done any uploads this morning.

  • Git Branching with Rails

    As has grown in the last few months, I’ve had to implement some new processes to make sure the development flow can scale as well. When we only had a couple of active users it was no problem if a bad deploy took the production server offline for an hour while I got around to fixing the issue, but now that we’ve grown and have real, paying users, that kind of approach to downtime doesn’t cut it anymore. These days I have a better defined process surrounding deployments, including a full suite of functional tests that have to pass before a deploy goes live on production. We also recently configured a staging server to perform manual testing of prospective changes before pushing them live.

  • Climate Change Since 1950

    Following up on my previous post on world temperatures, I’ve decided to do some more historical analysis of the GHCN data set.

  • World Temperatures

    I’ve lived in Barcelona, Seattle and Utah, and will be moving to the UK soon. Although many aspects of the culture and lifestyle in those areas are hard to compare directly, climate is an easy one.

  • Introducing Pypeline DB

    Pypeline DB is a new Python package that makes it easy to import, explore, transform and export data sets. All data is stored on disk, making it especially appropriate for data too large to fit in RAM or data that you’d like to keep persistent between sessions.

  • Visualizing Traffic in San Francisco

    For a class project in machine learning I had to procure some data and mine it. I decided to work with predicting road traffic levels.

  • Mapping Countries in the Twitterverse

    As a primer in graph analysis and clustering, I decided to map the relationships between countries in the Twitterverse.

  • The Joys of Programatic Provisioning (with Sprinkle)

    About 8 months ago now I decided it would be handy to have my own server in the cloud, in addition to the limited resources provided by my university and the I’m-still-not-sure-if-I’m-allowed-to-use-it server in the research lab I was part of on campus. Over the next month or so was born.