I’m 13 years in, trying to build a blog that will last my entire life. I’d like to share what I’ve learned about thinking and coding for the long term.
In late 1999, I was 14 years old, and had just spent the last few months absorbing TIBASIC and trying to grok Z80 assembly. Seeking a community of like-minded individuals, and lacking the wide net or social aspirations to find one locally, I was also hard at work assembling an archive of TI Calculator software using free web site hosts like Angelfire and Tripod. I won’t link the results because, wow, are they embarrassing.
It was a thrill to write words and code that everyone in the world could see and use. So, one day at the end of the summer of 1999, I thought: “I could write about myself somewhere online. A page about me.” I posted this picture:
and some accompanying text. Ever since, I’ve had a personal website. It never occurred to me to throw it all away and start over, so I carried the few posts I made at each site forward. After the free-hosting sites, I was very generously hosted at a place where I cobbled together some Perl scripts to make a rudimentary blogging platform. It was about this time that I realized that, no mater how dull, I wanted to record my thoughts, feelings, opinions, and interests for the rest of my life. Sorted, archived, tagged, navel-gazing, I suppose.
I wanted to make a journal that would exist for the rest of my life. An online journal that could make it to 80 years old.
Since then, that thinking has shaped the entire project. I’d design, and then tear it all down. Re-code, re-design, tear it all down. I’ve long since lost track of the iteration count. Nothing felt maintainable enough. It was all rickety, immediately crufty, spaghetti code. I was two things: (1) young and (2) an amateur. This was not a great combination for writing long-lasting software.
Then, before dental school began, I had a job where almost nothing was expected of me. I used the work-weeks to my advantage: I buckled down and wrote an object-oriented and markup agnostic publishing program in PHP. I named it Pax. I didn’t know about this PaX. I know, I know… PHP. I selected the language I had spent the most time with, which, for any amateur with my history and from my generation is nearly always PHP.
But, in the face of the challenge of the 80 year goal, I began to realize that I wasn’t thinking like a lot of other coders. Keep in mind the following points may not be true for you—your project has different goals than my own. However, these are the little epiphanies I have had while attempting to make this project live and breathe for a long time.
(0) “Good enough” isn’t good enough.
Every time, every SINGLE time I have stopped coding something when I had it working, instead of pushing, refining, rethinking, refactoring it until I KNEW in my gut it was right, I have regretted it. I’ll come back after a year, seeking to tweak something, only to realize “oh crap, I stopped short of what I should’ve written then.” Maybe it is something as simple as this: my text processing object can be instantiated with an array, but not all methods properly work with arrays. That’s just really poor practice, I know, but when you’re coding along and you say “TODO:”, you’ll get distracted adding the next exciting feature.
Yes, those functions returns should be more consistent.
Yes, make that behavior configurable.
Yes, your documentation should be crystal clear… or even better, the code logic and variable names should work together so you can quickly scan old code and understand what is happening.
I learned, at a visceral level, that when you understand the code, when you have that entire mental model of it in your head, that is the time to refine and get everything right. You think there’s no way, after wrestling with some logic for weeks, you could ever forget all of the intricacies, but you do. If you do all your work before you forget, you get to blackbox those classes in the future.
(1) If you work atop someone else’s code, you get someone else’s problems.
Look, someone else’s problems might be minimal! They may understand how to tackle this problem much better than you have the time for. And really, frameworks like CakePHP are great… until they aren’t. At that point, do you delve into the code to add the feature you need? Beg the developers? Paste an ugly kludge layer on top of the clean model? Abandon the framework/library and rewrite?
So, I tried to avoid blogging platforms and PHP frameworks as much as I could. This is what made me evade the ubiquitous Wordpress, the excellent Movable Type, or the (slightly) arcane Drupal. Heck, trying to keep a version of PHP on a server running for decades is going to be hard enough… and I’m resigned to the fact that I’ll have to port, rewrite, move servers. (How I’m going to do this when I’ve spent years in a different career, I don’t know. I’m only 13 years into this, after all.)
Here’s the thing: those blogging options I mentioned are generally quite nice, and were written to help people rapidly develop websites. But none of them advertises “we’ll power your site for 80 years!” I guess my parameters are different.
I’ve realized spending my time configuring platforms whose existence I can’t even count on 10 years in the future is a bad use of my time. It may not be a bad use of your time, for your project, but it is a bad use of my time.
By contrast, spending my time learning how to write (simple) software (along with the bonus of understanding it better) is a good use of my time.
The one problem here is how you define “framework”—perhaps you’ve decided you don’t want the abstraction of CakePHP; but consider that you are still using the “framework” of PHP running on the “framework” of an x86 *nix OS… where do you draw the line? I’m just looking to _minimize_ the number of layers I build up. At some point, over longer time scales, the difficulty with maintaining yet another layer of abstraction outweighs the benefits. You still need layers, just within reason.
Minimizing these layers aids understanding, which brings me to the next point…
(2) If I don’t deeply understand it, I can’t maintain it.
Here’s an example: I wanted to completely abstract the HTML out of my PHP. In the future, if I wanted to output my site in an as-yet non-existent markup language, or LaTeX, or God-knows-what, I’d have a place to start (rather than trying to rip out antiquated markup). Sure, I could’ve used any one of the PHP templating implementations out there. But what happens 8 years from now, when changes to PHP break the templater, I’m a busy father, and the team that supports the template engine has long since disbanded?
I’m screwed, that’s what happens!
I’d have to downgrade my site to spitting out database info directly… and while Markdown is nice, I’d prefer not to subject my future readers to reading it directly.
So, I wrote my own template “engine”. It was great regex practice, and the result is extremely small and simple. I can maintain it. After all, arrays and regular expressions likely aren’t going anywhere anytime soon.
(3) Focusing on maintainability prevents feature-bloat.
First, I pared my project down to its essence: it’s a list of thoughts and images of my life, in reverse chronological order. It is not about sharing buttons. It is not about the newest or coolest. The core purpose of my software is to deliver to the user a reverse-chronological list of data. Thus, I spend most of my development time making existing features more robust and ensuring that adding my thoughts and/or photos is as painless as possible.
That’s it.
Wouldn’t it be cool I thought, to have Javascript-powered browser-side cropping of photos? But, you know what wouldn’t be cool? When that breaks in the future. My methods may not be a good way for most folks to prevent feature bloat, but adopting the longer-term mindset when implementing new ideas and features is a nice counterpoint to the bleeding edge.
(4) Thinking long-term is a fun challenge.
Historically, I tended to distract myself by attempting to bolt on features of questionable value to my homegrown platform. Now, instead, I consider other problems. For example, I store my mySQL dates in a timestamp column. I like this option because it lets me store in UTC, and output in whatever time zone I’d like. In 2038, however, this method will no longer work (32 bit overflow, blah blah). An example of the thinking (from that Stack Overflow link):
Most real world PHP applications will not still be around when 2038 rolls around as the
web is not really a legacy platform.
I’m not sure what “real world” applications are (this implies there are “fake world” applications), but 2038 is not far away when your software does mortgage calculations. I’m glad mine does not.
(5) Be ready to move. Now.
I recently got an email from my host, Joyent, that my account would soon be discontinued and everything would be deleted… in about 60 days. I most certainly was not one of the VC round promised ‘lifetime’ hosting. I just bought an Accelerator from them, paid yearly, and they phased it out.
I’m not upset, I expected this, and thinking long-term helped. Back-up scripts run 4 times per day, local copies of database and config files are all here, I’m ready to go.
I think this nomadic thinking applies to keeping anything vital and functioning in the computer world. Expect and prepare: the hard drive will crash, the service will end, your data will require exporting, and updates will be filled with breaking changes.
At this point, 80 year software isn’t real, but it is a frame of mind.
With my head in the sand of school, the world turned around me, and I kept my horizons narrow and focus tight. What I failed to realize was, well, mortality. You’re young and learning and the last thing you think of is your body—it does what you ask it to do, and it doesn’t sideline your plans with pain, inflexibility, or hospital stays.
My father is fighting cancer. My aunt died. My German teacher died. So, when Mykala and I drove back from Lutsen a few days ago, I looked a the gray sky a little differently. What would it be like if this winter was your last? What if this blizzard is the one you have to remember, and all others will just be walks you take in your mind? What if this Christmas marks the last time you set up the tree? What if, sometime soon, you’ll have to conjure the scent of balsam in your memory, hoping it will mask the acrid detergents and ethanol hand cleansers?
I want to understand the preciousness of my life, but I haven’t been able to do it consistently. Just one look at the bank statement or the loan consolidation, and I’m pulled right back into the everyday concerns of life. Out of the experiential and into the narrative. Yet I hope to avoid the amazing hypocrisy of both Ben Franklin and Samuel Pepys in my personal writing—they always seemed to espouse the virtues of qualities they did not have.
Anyhow, I’m listening to Bon Iver’s Re: Stacks, and Mykala is on her way home. This, too, is precious.
Unaccustomed as I am to air travel (“Oh my god I’m flying! I’m in a chair in the sky!”), much less business travel, it was a mostly new experience to go out to Boston this past Sunday and come back a little over 24 hours later. The purpose of my trip was to learn more about the Bicon implant system, and I was actually comfortable accepting a trip, hotel stay, and continuing education credits from a company for whom I do not work. Why? Isn’t that some type of conflict of interest? It could be, but I had already, during my last year of school, done the research and decided that this system offered the best dental implants for most situations.
Leaning heavily on the experience of professors I trusted, I made the Bicon choice, and I’ve decided to relentlessly pursue this thing—not to stop until I get to a job where I can work with these implants regularly. I’m happy doing dentistry, but sometimes I get, frankly, pissed off and kind of offended with the profession; I keep seeing teeth break off, get fillings, break off further, need root canals, get covered with crowns, break off again, need another root canal and a post and a crown, with each time period between major dental interventions shortening. It is, in my opinion, absolute insanity that insurance will pay for some of the bat-shit crazy treatments people get to save their “natural” teeth, when an implant will serve their needs (chewing, not hurting) for far longer, and cheaper over that time period.
So, the implant treatments I want to see patients get, the ones that last, the ones that are a good investment and represent the best our profession has to offer, are not covered by insurance. I don’t know how to fix that problem, and this isn’t the time, but I do know it’s time for me to learn everything I can about implants.
So, let’s see, where was I? “Charting the right course,” that’s it. I ended my last post with that seemingly-dull platitude, but I realized I hadn’t fully articulated that idea. Here we go.
The more I work building tiny things in a very forbidding environment, the more I value planning and preparation. Bah, here we go into platitude country again. Let me try again: you can’t do good work on a bad foundation. That’s better. Yeah, let’s run with that analogy.
Let’s say you’re a general contractor, and you know your materials and your workers. You know how to get a roof put on exactly right, how to find the best workers to pour (or, assemble from precast concrete) a crack-free foundation. You know where to put conduits so the house can be modified in the future. You who to call to get drywall finished to level 5 awesomeness. So, you get called in at the beginning of a job. “Build a house here,” they say. “But I can’t! That’s a, well it’s a swamp.” “I told the property owner we could do it, so do it.” “Umm.”
Doesn’t matter how nice you make that foundation, or the great things you build on top—if conditions were poorly chosen for the task (building a house), all of your hard work will be wasted. You’ll blow huge amounts of effort and time trying to make it work. The thing was doomed from the start.
On a smaller scale, it’s like asking the area’s best tile layer to redo your shower even though your studs are rotting behind it. The work won’t last! You’ll be disappointed, he’ll be irate. Plan it first!
So, when I say “charting the right course”—this is what I mean. I’m so confident this idea applies to all areas of life, I’ll put it in a blockquote:
Plan twice as much as you work.
Otherwise, you’ll lose confidence, and waste everyone’s time.
Instead of wildly speculating, thoughtfully considering, or analogically writing about life as a dentist, I’ve actually been doing it for the past few weeks. Such a disconnect between writing and experience is precisely the reason I’ve tried to make it so easy to post things in this space and exactly why I am troubled when I do not. That is to say: I don’t want to look back and forget what life was like, so I seek to write it out here. And yet, when I seem to be living the most life, I’m not writing… I’m out living. Like coming back with no pictures of your great tour of Europe, because it was too exciting to stop for photos. I guess I’m someone who isn’t confident that memories in one’s head are good enough souvenirs of a life well-lived.
Immediately after getting married, I wrote little. When I did, it was nothing proportional to the magnitude of life changes I was experiencing. Yet, I remember that period with great fondness — moving in with Mykala for the first time, learning how our lives were going to look together, returning from our honeymoon to a house that was only half moved-in to, yet on its way to becoming a home. My memories of that time are rich, but I wish my writings were equally so.
Now, I am slowly going from being a student to being a not-student. I enter the dental operatory with my mask already on 99% of the time, which has helped to avoid the blatant questioning of my experience or the impossible-to-hide disappoint on some patient’s faces: Oh crap, I got the new guy. Spending all of my work-week in mouths has made me become surer in my actions, which seems to calm down those who may be wondering if they should reschedule with someone else. The other day, I was demonstrating something to Mykala and she told me I was “touching her face like a dentist,” which was actually kind of nice — like, hey, I’m learning some of those subtle things you do when you gain experience!
So, what else would I like to capture about this time; what feeling (that I might remember as a vague sense of this time) do I want to pin down and articulate, sharpening my understanding of “now” for future Alex? Well, I’ve started to get better at handling composite (tooth colored filling material), to the point where I’m actually satisfied with my work. It’s not that it wasn’t OK before, I’m just… insanely picky about my work. Really, really picky. Little stuff, stuff I know patients can’t see, bugs me. I want things to be not just OK, not just long-lasting, but awesome. So I guess I’ve also realized that I am really really perfectionistic, and this drives me from tooth to tooth to refine refine refine. This is excellent news for my career, because I’ve many years of doing the same thing—and that excites me. Most of all, the exposure of going from mouth to mouth, person to person, is helping to hone my instinct for what is normal and what is pathological. Being able to place your patients in a context, put them on a continuum, helps you make better decisions.
And really, I think this is true of any pursuit of excellence: you need to know how what you are doing fits into the tapestry of your profession, only then can you chart the right course.
“You’ve got to realize the world is a big place—try not to be so up tight.”
After his frank indictment of my character, I stared blankly at Mr. Mortenson, my high school physics teacher and tennis coach. His classroom had the idiosyncrasies of a long-occupied room: a non-standard office attached to the back wall, lined with 20-year-old physics instruction adjuncts and old tennis rackets. We had just handed in another assignment, on which I was accustomed to acing, but had flubbed a sign or made some minor error. I’m sure I looked crushed by my mistake and was redoubling my efforts and asking questions to get the concept right. I really didn’t like any grade less than 100%.
This wasn’t the first piece of advice from Mr. Mortenson. I remember a lecture about Newton’s Laws when he tied in Semisonic’s song Closing Time:
Every new beginning comes from some other beginning’s end
“That’s physics!”, he said. Perhaps it was because he was nearing retirement and his quoting a popular song was almost anachronistic, or perhaps it was because he refused to just focus on physics and instead say something more. I see now that he didn’t want to be limited to dry, rote block-on-incline-plane stuff. No, Mr. Mortenson sometimes actually said stuff that applied to our lives, lives we’d soon be out living.
And then, since it was so unusual to hear anything that applied to the real world, he said something I’m still surprised by today: “Touch the world gently, and it will touch you back gently.” Googling this now, I would guess that it comes from Javan’s 1984 book Something to Someone. But keep in mind, I was coming up on 12 years of education without any teachers talking to me like I’d end up in the real world, and here’s some life advice flying into my head in the middle of a physics lecture.
Given his record for slipping gold into black sand, you’d like to think I immediately took Mr. Mortenson’s “up tight” comment to heart. Fact is, though I remember his comment 10 years later, I did not at all understand it when I first heard it. I couldn’t see that there could be more than jumping through the hoops, that I was just a “really excellent sheep”. I’m glad I remember his words.
The ex-potato field felt empty but not desolate—lot stakes, light posts, and the bafflingly windy streets of modern suburbia were all in place. Ours was the second house in Brighton’s Landing, a development in what would soon become one of the fastest growing cities in the nation. I knew none of this context, nor would it have refined my picture of my place in the world—like any child, my life was defined by low walls and narrow vistas. But I did know we were moving, here, to this new house. I gazed up into the vaulted entryway, looked down at the unstained ornaments for the front window. My memories of this construction phase are spotty, but I know we visited regularly during dim fall evenings. I remember little from the days we moved, but the vast expanse of fresh carpet lodged in my brain. Perhaps because I was six years old and still close the ground. That was 1991, over 20 years ago.
I believe I have one very special memory, though. I say “believe”, because this is one of those memories where you can’t tell if your brain fabricated it for you while listening to the retelling of the event, or if it is authentic. I maintain a fervent hope this memory is no interloper into the vessel of memory: my sister and I are in a car, and the overwhelming emotion is “safe”. It’s in the air. I can’t tell you the model of the car or the time of day, but this emotion I recall more than anything. My grandma is there. Safe. We are outside the old house, and we say “goodbye house.” And then, we leave. This is exactly how one wants to feel before going on a journey, before moving, before beginning something new. Safe and loved and whole, surrounded by this vibrant, palpable love.
That house to which we moved, the one in which my parents still live, sits at the top of four circular terraces, descending the height of an 80 story building down to a lake. During that first winter, we could grab a sled and cut a clean line through what would soon become dozens of houses and yards and fences. All there was was white; no landmarks, no chimneys, just white and the deafening silence of snowy land. Our sleds were blue with yellow handles and we rushed to buy a fake christmas tree in the last days before the holiday. In the summer, we played on a giant dirt pile from the excavation of a neighbor’s foundation, skidded our bikes in circles in the gravel at the end of the new street, admired the green of our new sod next to the brown that surrounded us. This situation became a defining dichotomy of my childhood—the shelter that comes from the prosperity and optimism of flourishing suburbia juxtaposed to the timeless freedom that stems from roaming pastoral countryside.
So, 20 years. I come to this realization by way of a roof—that house I grew up in got a new roof yesterday. Another 20-year roof. And sitting there, talking with my mom, I did the mental math. I’ll be 47 years old when that house needs a roof once more. Somehow, making this calculation pushed the cold indifference of time right into my face, and it set me back on my heels. Can that be right? I’ll be almost 50 when this place needs a roof again?
At some point before I started college, I stopped living in the moment. I can glorify the memory, but I fail to enjoy making it. My writing falls short of imparting how I feel, but I’ll keep practicing, practicing the introspection needed to improve oneself. Now, I no longer want to improve just for the sake of improving, but instead with a hope that I can tune myself to the present.
On this ancient and miraculous world, where such
beautiful natural and living things have evolved,
something has gone wrong when life itself is used as a
manufacturing process. I read that in 50 years, we must
adopt a largely vegetarian diet or die, and forgive me if
I take that as good news.
When carrying a concealed weapon for self-defense is
understood not as a failure of civil society, to be
mourned, but as an act of citizenship, to be vaunted,
there is little civilian life left.
She’s right. But even more to the point:
… former Chief Justice Warren Burger said that the new
interpretation of the Second Amendment was “one of the
greatest pieces of fraud, I repeat the word ‘fraud,’ on
the American public by special-interest groups that I have
ever seen in my lifetime.”
If life is so purposeless, do you feel that it’s worth living?
Stanley Kubrick: Yes, for those of us who manage somehow to cope with our mortality. The very meaningless of life forces man to create his own meaning. Children, of course, begin life with an untarnished sense of wonder, a capacity to experience total joy at something as simple as the greenness of a leaf; but as they grow older, the awareness of death and decay begins to impinge on their consciousness and subtly erode their joie de vivre, their idealism—and their assumption of immortality.
As a child matures, he sees death and pain everywhere about him, and begins to lose faith in the ultimate goodness of man. But if he’s reasonably strong—and lucky—he can emerge from this twilight of the soul into a rebirth of life’s élan.
Both because of and in spite of his awareness of the meaninglessness of life, he can forge a fresh sense of purpose and affirmation. He may not recapture the same pure sense of wonder he was born with, but he can shape something far more enduring and sustaining.
The most terrifying fact about the universe is not that it is hostile but that it is indifferent; if we can come to terms with this indifference and accept the challenge of life within the boundaries of death—however mutable man may be able to make them—our existence as a species can have genuine meaning and fulfillment.
However vast the darkness, we must supply our own light.