I’m on duty for week 2, but the Hippo Corporate Headquarters is already bringing the house down at Coachella.
Update: Read about how I modified this Docker image to enable MultiSite.
I recently decided to create my first public WordPress plugin which provides basic FitBit stats for your blog.
This was on a fresh laptop (the one handily provided by Automattic, my new employer), so I had the opportunity to try something new in terms of my development environment.
I recently joined Automattic as a Code Wrangler (more on that soon), and I decided now was the time to de-spam, combine and resuscitate my old WordPress blogs.
Along the way I noticed a few annoying encoding issues crept in. The Wordpress XML exporter/importer, for example, double-escaped all my quotes so that <a href=”this”> became <a href=\”this\”>, which as you can imagine broke… everything.
This post is inspired by a great piece by Rails creator DHH.
My name is Dan, and sometimes I write tests first, and sometimes I write tests afterwards, and sometimes I don’t test at all because it would add brittleness for no benefit. Often I delete tests that I think have outlived their usefulness, or add in tests when I find a crucial piece of code broke without warning.
I sometimes use tests to guide design, then throw the whole implementation away (tests and all) because the design was wrong — and it was the tests that told me so.
I only write tests when they allow me to go faster, further, with more focus and with more confidence. Sometimes I use this for prototyping, but not always – it depends on to what degree I’m prototyping code structure (TDD is great!) vs integration (TDD sucks!).
I try to remember that every line of code I write is a line that must be maintained, and that includes tests. I believe in lean code, AND lean testing. I believe that over thousands of iterations we can trim our implementations AND our tests down to just what is needed.
Also, when I write code…
Sometimes I rush headlong into the codebase and put in a giant refactor because some anti-pattern totally infuriates me. This is probably (but not certainly) my worst habit. But sometimes it’s been a giant win, even if it results in near-term instability.
I believe in sitting back and reading code I haven’t looked at in a while just to ask “am I proud of this, or could it be better?” because it’s a good way to bring fresh eyes to the design, and then making a small improvement and moving on.
I also believe that it’s ok if the first pass of anything isn’t perfect, because as long as someone is re-entering the code and making it a little better, it’ll get where it needs to go.
First mix of a Cat Power cover – just piano and voice. I remember seeing her at the Punter’s Club back in… was it 1996? A lifetime ago. I didn’t appreciate what I was experiencing at the time. She’s pretty cool.
This is a simple baby-kick counter for parents wanting to measure the movement of an unborn child.
It measures the time you take to click the “kick” button 10 times.
This is one of my favourite songs by You Am I, a sweet ballad about a kid who just trying to figure out the rules.