the siren call of starting fresh

Technical debt is hard to measure and estimate. There are code quality metrics you can include. You can measure how long it takes you to implement new features. You can measure how long it takes you to land bug fixes. You can measure how long it takes to onboard new employees, contractors, and interns.

And it seems the first conclusion people come away from any such analysis is to do a rewrite.

Technical bankruptcy is no joke, and it’s hard to justify to your business no matter how bad your current metrics. How do you know this next attempt will be any better? How do you know you won’t just reintroduce the bugs of 5 years ago the last time you went through that rewrite?

Most times, you can’t know, so it’s important to have a couple simple goals.

1. Reduced surface area

You’re rewriting from scratch, so I assume you have a giant, intertangled mess. Keep that pain fresh as you architect this next round. Make your components isolated from one another so you can swap out implementations. You want your goal to be your next rewrite from scratch being just your router instead of everything. Architect for change if you want to avoid history repeating itself.

2. Plan for support

The worst part of many rewrite decisions is that it’s too easy to avoid the question of “should we rewrite” and instead decide “where can I see a clear path: ‘creating my own’ or ‘supporting what we have.'”

Few engineers cannot think of at least some green field next steps. We all have started tons of projects. A rarer skill is in assembling the tools, information, and processes to support a project. When you get a bug report, what do you do? Will you have stacktraces? How will a customer get you those? What was the current application state at the time of an error? Can you reproduce the error if the customer cannot remember their steps? Is this environmental? How should the code have behaved?

On the other hand, before going to the rewrite, you should consider if there are ways to accomplish these same goals from the current code base. Instead of rewriting from scratch, refactor or use the facade pattern to make it look like you have a smaller surface area. In my experience, this is easier than you think. Learning to support, on the other hand, is not. Unfortunately, it is also really important. Until you can learn to do this, you will be tempted by the rewrite off ramp every time.

Posted in dev, Uncategorized | 1 Comment

a few weeks ago

3/23/2015. Tonight, like every night, I put down my daughter, waited till I knew the last escape attempt had been foiled, and go retrieve my infant son from mommy. Kathryn breaks his latch and waits awkwardly while I position myself to scoop him up. I wrap him in a blanket while he’s pinned to my chest and we move to his room. There I sway and archive a few emails – automated error reports from the day – and catch up Joel on the medical stuff with my dad. I make a joke about the heart attack that didn’t happen. I’m stoic about the cancer and lack of clarity on extent. I admit I feel numb. I recount the feelings around last Christmas – the way mom and dad were overly generous to the point of being extravagant. How it felt to me like they wanted to create this magical memory for us and the grand kids. How I calmly walked into the bathroom and sobbed bitterly, washed my face, and came back out to chat idly and help ruby play with her new toys and not hurt her brother. How now I am at peace with the feelings I have and expect there to be cycles. How it’s just a lot. And my mind roamed to explaining this to my coworkers and wondering how I explain this to them. How I wept when learning one was leaving. How I’d been focusing on emotional safety and rallying around your coworkers when times are tough. How work life balance was a major focus this year as “we don’t care as long as you get your work done” isn’t good enough for my team. How I just want to take care of them but end up needing the most care. How this is all happening right at crunch time when I might be needed most. How during out last review, I’d estimated the time and resources it would take to replace me if I were hit by a bus.

I wish I’d been hit by a bus.

And I sob uncontrollably while holding my infant son, waves of sorrow coming out of my mouth like a shout being squeezed through my closed throat as I hold my breath. Gus doesn’t wake up. I’ve done my job. I set him down in the pack and play, slowly recoil, and sneak out of the room.

Posted in Uncategorized | Leave a comment

next door – part 2

Since putting up the fence it’s simply inconvenient to gather trash in the alley.
This trip I put in my trash bag
an empty pack of newports,
a high top sneaker with $100 bills painted on,
a beer bottle,
and a discarded ultrasound printout.

There is sadness in this trash, brokenness.

Later that afternoon, I learned someone bought up the house on the alley and evicted everybody
Guess we fixed that problem.

Posted in Uncategorized | Leave a comment

next door – part 1

“All my liiife,” the sisters crooned, “I prayed for someone like you.” We were stopped in the alley outside our house. Fenwick, our dog, patiently stood around. Originally, the girls had planned to pet him. “Hiya, Foowick!” He was a little too excited for that and jumped at her. I went ahead and held him to let them pet him. We were soon to have our own kids, so he needed to learn how to act around them.

He also needed to get used to our neighbors.

That was one of my favorite families. They left in the middle of the night. Maybe in the day, but either way without warning or saying goodbye.

At first I found it odd that our introductions seemed so apologetic. Everyone felt the need to explain why they were in that house. And their plan to get out.

“He has brown eyes! Like me!” That was a little boy who also loved our dog. Having a dog is clutch for meeting new people. He would come up to the house and ask if the dog could come out. By now Fenwick was getting acclimated to bobbly headed kids making unpredictable movements (kids move so differently than adults).

Parents would hang out on the porch more so than fawn over the dog. But if approached, people were willing to shake your hand and tell you their story. Many had grown up in the neighborhood and would recount how our house was an empty lot.

George talked about playing in that lot. He’s the one my wife called tattoo face on account of him having a big tattoo across his face. Several front porch meetings were predated by waving as I drove to/from work. George had several of these before I caught him out front one day. He was often busy. Digging for scrap metal in trash cans. Pulling weeds in the flower garden up front.

He also just wasn’t there one day.

The only person I ever knew where they went just moved down the street. He would come out and talk when we walked home from our other friends’ house. We’d have the stroller and he’d talk about how big Ruby was getting. He gave us a heads up that he was moving down the street. He moved down the street because he wanted to get out of that house.

Posted in Uncategorized | Leave a comment

Don’t Be a Hater 2013

Editor’s note: I’m calling time on this one. Have to publish as-is or it will rot in drafts forever 2 years is enough.

Each year my friends and I go over some personal goals we would like to take on in the coming year. In 2013 I made an explicit goal to “stop being a hater.” I was sure to differentiate between criticism and hate, as I feel that criticism is a totally necessary and healthy part of life. Anyway, here was the way I described it to the group.

Stop being a hater – k so the rest of these are relatively self explanatory, but this one is interesting. As you know, I am a google hater. I am also a coffee script hater. And a hater of emberjs and of Facebook. And of just a lot of things that have redeeming qualities and make a lot of people really happy. Now, criticism is important for growth, but I’m not telling google or ember or Facebook or anyone anything. My observations are not to better anyone but only to tear down. I’ve done a decent job keeping my hate to myself and not spewing filth on the internet but I have a lot of it on the inside and I don’t want that anymore.

Here was my much more judicious declaration on twitter:

At the end of the year, I wrote up my thoughts on my ipod touch and emailed it back to the group. Here is that write up:

Firstly, in general I found this to be a really good idea. It was really shocking how much of a difference it made cutting out all that unnecessary negativity. The snide “well actually…” comments about google no longer spoiling someone’s feelings of excitement, loyalty, or gratitude. Not slipping into road rage bc you just give people the benefit of the doubt. There were just a ton of applications where it made things better.
One area I really started to struggle was around crunchy/hippie stuff. Kathryn has done a ton of research on nutrition and parenting and all that stuff, and occasionally the results align with some unconventional practices used by the more granola amongst us. What I found myself doing was not engaging the decisions in a critique (note, criticism is still really important and totally allowed) but just blindly and gruffly hating on whatever was being presented. There was no basic respect being offered and that caused a lot of difficulty.
Another noteworthy anecdote I have is what I learned by deliberately applying the don’t be a hater rules to sports. I waffled on this for a long time as I think that rivalries are an important part of sports and bitterly hating the other team is part of the fun. But I finally decided I would only lose one year, so I went for it.
I don’t think I will fully pull this forward, but I did notice that I still greatly enjoyed football even without the bitter hatred of wabash college and the New England patriots. In fact not being a hater about the pats helped me enjoy an ongoing discussion and joke with a friend that normally would have been us trolling and bickering the whole season.
The last and most painful clarity was about the most common targets of my hate: nickleback and qrcodes. Over the course of the year I probably received 12 emails from friends with snarky references to these two. That’s an average of 1 per month about these subjects which is ridiculous. I don’t receive an email per month about volunteering, football, the muppets, church, or anything else. But my interest in snarky criticism leads to always being top of mind for my friends when it comes to hating. Not only is that sad, but it’s ridiculous that I let myself get worked up about these things. So what? Nickleback isn’t good. Why am I still talking about them. We get if – I think qrcodes are abused and are not correctly solving the problem of the need to deep link and encode metadata into the world around us. Getting mad about marketers wasting their time isn’t properly solving the problem. Why shouldn’t I create a better technology instead of complaining about the current one. Once again, criticism isn’t bad, but we shouldn’t be so quick to define ourselves by what we say no to. Knowing our boundaries is important, but it’s easy to spend all your time fortifying the castle walls and neglecting the culture on the inside.

Through the year, I received a lot of encouragement from others, and I even snuck in a subtle reference to this in my jsconf talk: the only two technical references I made in the talk were Douglas Crockford and IE, figures which draw quite a bit of hate. Subtle – far too subtle for anyone in the audience but me – but cathartic.

My favorite outcome of this experiment, though, was the way this led me to open myself up to the good parts of various things. Previously, my approach to basically everything was clouded by my feelings about it. This meant that if there was anything I could learn from it, I would miss it. My (aspirational) approach now is much more optimistic: there is something good that I can find here, and I would like to find it. I’m super bad at this, but I keep practicing and hope to get better.

Finally, this internal distinction of criticism and hate has helped me sort out feelings around “call out culture” and “tone policing” and other approaches to criticism. It’s complicated, but it doesn’t bother me people not being pleasant or calm when they really are angry and critical. Part of this is good-faith that such criticisms exist to make things better. And part of it, honestly, is just not being a hater.

Posted in Uncategorized | Leave a comment

November Bunkerjs

We’ve been doing an internal JavaScript meetup once a month and there are so many great resources coming out of it, I though I’d reblog for others to see. Hope you enjoy.

It was great to see new faces at Bunkerjs this month. Next month, Alex Billingsley will be sharing some non-js-but-cool static site generation with jekyll. Also Brian Banta will be sharing about animations for beginners corner.

Beginner’s corner

This month, Joel talked about showing and hiding things. To do this you need to decide to either: completely hide, make invisible, or move off screen. You decide this based on how you want to affect accessibility and search engines (so it’s different for personal bookmarklets and production). You can use “display: none;” “visibility: hidden;” and “position:absolute;left:-9999px;” for each of the 3 respectively. Of course, with other specific needs, there are more ways to accomplish this, but these were the 3 discussed this month.


John afterward introduced the group to Docker containers and how this affects server-side JavaScript. Docker is like a virtual machine but super lightweight and flexible. Talk to John to find out what he’s been learning.

Links we discussed

new format for ios bookmark images –
There’s a new way to specify what image to use when your users add your page to their home screens

making emails stand out on google inbox –
Google has a new email client AND a new way to give users one-click actions to your service

css grid examples –
New way to layout your pages

form validation –
Styling html form validation

whats in chrome 39 –
Pretty self explana…

on web compatibility and es6 –
A good look into how important compatibility is to the web

.includes not .contains –
The thrilling conclusion

a11y examples –
Tongue in cheek intro but cool example about how to make a menu system accessible

khan archictecture discussion-
Really good example for 1. getting new users up to speed. 2. a big project’s design

chrome dev summit videos –
This is kind of like wwdc for chrome. Check out the videos to keep up with what is happening in the chrome ecosystem

source blackboxing –
Ever tried to step into a method and ended up in jQuery source doe?

w3c frame timing api –
Performance tracking

dexie –
cool looking indexedDB wrapper

css specificity graph generator –
Visually see opportunities for code reuse

aws lambda –
New platform as a service from amazon. Just upload js files to an s3 container and deployed

web sensor api –
State of the world

docker on windows –

icon fonts vs inline svg –
Comparing two methods

dat adventure –
Government data tools training

for those that validate –
it’s a little nicer
Continue reading

Posted in Uncategorized | Leave a comment

Upgrading npm on windows

Had a windows machine which needed to upgrade npm to avoid the whole ^ incompatibility issue. ex:

npm ERR! Error: No compatible version found: minimist@’^0.1.0′
npm ERR! Valid install targets:
npm ERR! [“0.0.0″,”0.0.1″,”0.0.2″,”0.0.3″,”0.0.4″,”0.0.5″,”0.0.6″,”0.0.7”,”0.0.8

Well, I was doing it in the command prompt I was using which was launched as admin for other stuff (since no sudo on windows). So recognizing that the installed version of npm didn’t understand the ^ sign because I listen to nodeup, I typed “npm install -g npm” but got

(a bunch of this type of thing…)
npm WARN unmet dependency which is version 1.0.0
npm WARN unmet dependency C:\Users\jdart\AppData\Roaming\npm\node_modules\npm\no
de_modules\read-installed\node_modules\readdir-scoped-modules requires once@’^1.
3.0′ but will load
npm WARN unmet dependency C:\Users\jdart\AppData\Roaming\npm\node_modules\npm\no
npm WARN unmet dependency which is version 1.3.0
npm ERR! peerinvalid The package npmconf does not satisfy its siblings’ peerDepe
ndencies requirements!
npm ERR! peerinvalid Peer npm-registry-client@3.2.2 wants npmconf@^2.1.0

And finally

npm ERR! System Windows_NT 6.2.9200
npm ERR! command “C:\\Program Files\\nodejs\\\\node.exe” “C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js” “install” “npm” “-g”
npm ERR! cwd C:\Windows\System32
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\System32\npm-debug.log
npm ERR! not ok code 0

When I tried to “more c:\windows\system32\npm-debug.log”, I found out it didnt’ exist which made me realize my current directory was c:\windows\system32 which ideally should be super protected, so I changed my directory to something not-system-level and ran again successfully. No further testing, YMMV

Posted in Uncategorized | Leave a comment