-
Building Better Code Review at Heap
2021-03-20
Note: This post was originally published on heap’s blog Heap — like most companies — has a code review (CR) process. Until recently, that process often involved manually catching trivial issues in PRs (Pull Requests), which led to slow, inconsistent, and low-quality PR comments. To address this, we adopted Prettier, Danger, some custom StyleLint rules, and a Buildkite step that automatically adds specific checklists to PRs depending on which files are changed in our monorepo.…
-
When should we create abstractions instead of duplication?
2020-11-14
Because abstractions aren’t free, sometimes we’re better off duplicating code instead of creating them. If that claim doesn’t make sense to you, read Martin Fowler’s “YAGNI” or Sandi Metz’s “The Wrong Abstraction” or watch Dan Abramov’s “WET Code” talk or Kent C. Dodd’s “AHA Programming” talk. Each of these programmers give advice on when to duplicate code vs. create an abstraction, advice that broadly falls into two camps: either we are advised to follow some rule of thumb or we’re told to ignore rules of thumb, trust our feelings and to only introduce abstractions when it “feels right.…
-
Programming and Forecasting
2020-10-19
Good programmers are good at forecasting. They can often predict roughly how long it’ll take to accomplish a particular programming task. They can also predict when and to what extent a project will see ROI from a particular technical investment. Unfortunately, this skill isn’t guaranteed to develop as we gain more experience programming. In Superforecasters, the authors note that many experienced people are surprisingly bad at making forecasts and that time and experience often don’t make us any better.…
-
Should we refactor files we're working on?
2020-05-09
When programming, always follow the camping rule: Always leave the code base healthier than when you found it. — Martin Fowler, Refactoring The Boy Scouts of America have a simple rule that we can apply to our profession. Leave the campground cleaner than you found it. — Robert Martin, Clean Code Many of us share the attitude expressed by the above Fowler and Martin quotes. The attitude presumes that code we’re working on now will change again soon, and we’ll reap the benefits of a refactor when that happens.…
-
Why and How we Should Calculate Expected Utility of Refactorings
2020-04-29
In my experience, most applications are a mess…Changes are commonly made under urgent time pressure, which drives applications towards disorder…Velocity gradually slows, and everyone comes to hate the application, their job, and their life. —Sandi Metz, “The Half-Life of Code” Why Many of us work in codebases that are not easy to work with, codebases that we want to make better. The way that we typically choose what parts of the codebase get made better, however, is sub-optimal.…
-
My Mid-Career Job-Hunt: A Data Point for Job-Seeking Devs
2020-01-26
I wrapped up my job search recently, and I’m happy to say that I’ll be joining a YC-backed startup called “Heap.” I thought I’d share a little bit about my job search in case the information may benefit other job-seeking devs. I’ll go over the pipeline of places I applied to and the result of each application. I’ll also talk about things like salary, resume formatting, coding challenge prep, and interviewing.…
-
Maybe Don't Inject That
2019-10-03
I’m actually always suspicious when I’m writing up a pattern or a technique if I can’t talk about reasons when you shouldn’t use and trade-offs against it. If I can’t find arguments against it, then I’m worrying that I’m not really analyzing things properly. –Martin Fowler, “Is TDD Dead?”, 35:00 DI is useful. It’s great. It makes your code more flexible, testable, etc. Dagger? Also useful. Great. My favorite DI library.…
-
Maybe Don't Write That Test
2019-09-19
Testing seems to be like going to gym. Everyone feels like “yeah. I should be testing. I should be going to the gym everyday.” Koushik Goupal, Fragmented, “Episode 13,” 12:01 Remember those gimmicky fitness products that made you think you could “get fit” without actually going to the gym/dieting/etc? Because I live in Orlando and have seen the Carousel of Progress at the Magic Kingdom a bunch of times, the first example of this kind of gimmicky product that comes to mind is a thing called an “exercise belt.…
-
Dagger 2, 2 Years Later
2019-08-27
…in software, feedback cycles tend to be on the order of months, if not years…It’s during the full lifetime of a project that a developer gains experience writing code, source controlling it, modifying it, testing it, and living with previous design and architecture decisions during maintenance phases. With everything I’ve just described, a developer is lucky to have a first try of less than six months… –Erik Dietrich, “How Developers Stop Learning: Rise of the Expert Beginner”…
-
Maybe we Should Stop Creating Inscrutable CLIs
2019-08-17
In the original Unix tradition, command-line options are single letters preceded by a single hyphen…The original Unix style evolved on slow ASR-33 teletypes that made terseness a virtue; thus the single-letter options. Eric Steven Raymond, The Art of Unix Programming Programs must be written for people to read, and only incidentally for machines to execute. Abelson et. al., Structure and Interpretation of Computer Programs I just wrote this little bash-ism the other day for removing all attachments from a jira ticket:…