Todd Grooms

Leaving

I have recently accepted a wonderful opportunity to work at LunarLincoln and I will be leaving my position at Lonely Planet, effective December 19th. This comes as a shock to me. I was not actively looking for a new job; I just happened to have stumbled into this serendipitous opportunity and, after a period of deliberation, have decided that the offer is too good to pass up. The founder of LunarLincoln is a good friend of mine and made me a generous offer to come work with friends. It was difficult for me to say “no” to that.

I thank Lonely Planet for everything they have given me: confidence, fond memories, and the chance to work with wonderfully talented developers. I wish everyone there nothing but the best.

With that said, I look forward to beginning my time at LunarLincoln in 2015.

This is Major Todd to Ground Control: I am ready for takeoff.


Growing Pains

I need to stop becoming so frustrated. I need to stop missing moments.


Beginners

I believed that this negative behavior stemmed from arrogance, ignorance, and callousness. After reading the aforementioned article, however, I have switched my line of thought: I now believe this negative behavior stems from a deep insecurity that developers have of being wrong. I believe that we constantly fight to prove our methods (tools, languages, or platforms) are the correct choice. I also believe that this behavior is not necessary and that most developers will eventually grow out of it as though it were a juvenile phase in our adolescence that we will, hopefully, look back upon in embarrassment. I am at the embarrassment stage in my career now. I feel bad for the negative behavior that I exhibited in my development youth. I was not only negative, but borderline belligerent at times. I think this behavior started and manifested itself due to the environment in which I started working. We need to take our environment and who we surround ourselves with into consideration. You eventually become what with which you surround yourself. I am glad that I am starting to surround myself with positivity.


Better Git/Vim Commit Messages

I recently decided that my Git CLI experience would be greatly approved with the aid of spellcheck. Luckily, I stumbled across a post detailing how one can enable spellcheck in Vim (my default editor). Unluckily, it did not work for me with Yosemite’s default version of Vim in Terminal. After struggling with this for a bit, I finally decided to upgrade to the latest version of Vim via Homebrew:

$ brew install vim

After installing the latest version of Vim, I created my ~/.vimrc (I am guessing this is not created by default as I did not see it on my machine) with the following content:

set backspace=2
syntax on
autocmd Filetype gitcommit setlocal spell textwidth=72

The first line enables what I believe to be the correct behavior of the Backspace (Delete on Mac) key: while in insert mode, the character immediately to the left of the cursor is removed and the cursor moves to that position (along with the text shifting to the left). I stumbled across a post indicating that this is not the default behavior in Vim, but it is the behavior I expect.

The second line turns on syntax highlighting. What I found to be unique about this feature is that it will actually highlight your Git commit message in such a way that the “title” of your message is highlighted to indicate when your title is too long (the recommended length, according to Github, is 50 characters). It also helps highlight comments in your commit messages.

The third line is the “money” line. This line enables spellcheck for gitcommit files. This line also includes a nice little extra to wrap our commit message bodies at 72 characters per line, which is the recommended length according to Github.

One other little tidbit I came across is you can use the following to ensure that Git uses your preferred editor (meaning the version of Vim I have installed via Homebrew):

$ git config --global --replace-all core.editor $(which vim) -f

I am not sure if this change is strictly necessary; it may just be belts and suspenders, but I would rather be safe than sorry.

If you want to know more about my setup, be sure to follow along under my Environment section.


Android vs. iPhone Cage Match!

I have been asked to participate in a panel. The panel will be a debate/discussion between mobile developers on which mobile platform is the best. I have been tapped for the iOS side. Leading up to tonight’s event, I have been jotting down my notes on the talking points I was given by my team. I have decided to post my notes for posterity. Each section title will be a question that I was given by the iOS team, followed by my notes. Enjoy.

What Problems with the iOS Platform Still Need to be Addressed?

I find that there are many developer APIs in iOS 8 that do unexpected things or are broken. I believe that Apple could probably use a development cycle to just clean up the platform and make it a bit more robust. I think it’s atrocious that Apple still offers flagship iPhone models with 16GB of storage. I don’t really care about expandable storage, but the fact that the baseline model comes with a paltry 16GB is ridiculous. I can’t recommend that device to anyone. I also feel that it’s time for Apple to increase the amount of RAM found in iPhones. New iPhone models currently come with 1GB of RAM. I honestly don’t see a performance hit from this in day-to-day operation, but there are times when I notice it (mostly when I have had Safari in the background for a while and upon returning to Safari, my open tabs reload since they are no longer in memory).

How Long Would it Take to Become a Competent iOS Developer? An Expert Developer?

I honestly feel that both platforms are fairly equal in the length of time it would take for you to become a competent or expert developer. There are so many great resources out there for both platforms (the developer documentation for each platform is top notch and you can usually always find an answer to your question on Stack Overflow, which has a very active community for both platforms). I think the community behind iOS development is probably larger at this time, but its fairly comparable. I think you can probably become a competent developer for either platform in 2-3 months. You can become an expert developer in a year. The key is to have someone who can review what you write to keep you honest and to ensure that you are observing good coding practices (specifically for that platform).

Where do You See iOS as Superior?

I feel that iOS is superior in a few different areas (although I’ll admit that some of those gaps are closing and some of the ways I feel iOS is superior are purely subjective). These areas are developer tools, the development language/system, user experience, and the camera.

Developer Tools

I feel that the developer tools that Apple provides are still better than the tools provided by Google. I believe Google has closed that gap significantly with Android Studio (IntelliJ users rejoice!). My first Android development experience involved Eclipse and, while Eclipse is what is is, it always felt a bit hackie to me. I feel Google is still lagging behind when it comes to user interface layout. The Interface Builder piece of Xcode is so easy to work with and what you see is pretty much what you get. I think Instruments is far and away better than any of the profiling tools provided to Android developers by Google.

Development Language/System

I believe the iOS development language du jour (Swift or Objective-C) is superior to Java. While language preference is purely subjective, there are some objective features where I feel like the iOS development platform is head and shoulders above the Android development platform. One of those is iOS’s Automatic Reference Counting (ARC) vs Android’s Garbage Collection. Garbage collection is an old idea that Android has implemented. It’s a methodology of reclaiming unused memory. It essentially scans the devices memory and determines which objects are currently being referenced and which objects are not. It then deallocates any objects that are not being referenced to reclaim memory (this is a very elementary example of how garbage collection works, so please forgive its crudeness). The issue with garbage collection is that it’s horribly inefficient. It’s slow (the length of the scan varies depending on the amount of memory in the system and how much of that memory is being used), requires more memory than other systems, and isn’t foolproof (it may be fixed by now, but I once knew of a way to guarantee memory leaks while writing Android code).

iOS has a thing called Automatic Reference Counting. ARC is not garbage collection (and to call it garbage collection is an insult). It’s a clever way of automatically managing your memory. It keeps track of how many references an object has (how many owners). When you reference an object, that object’s retain count increments. When you dereference an object, that object’s retain count decrements. Once an object’s retain count hits zero, it is released or deallocated. It is not foolproof, but it is definitely more efficient and requires less overhead.

User Experience

For my money, the iOS user experience exceeds that of Android’s user experience for the majority of users. On iOS, the only variability in user experience comes from the hardware. If you’re using an older device, your experience can be different than it would be on the latest and greatest hardware. Your experience can vary wildly on Android as you have different hardware manufacturers. Not only can your experience change based on the manufacturer’s build quality or the hardware specifications, but Android manufacturers are also able to “customize” (read: make it shitty) the operating system so that their devices may stand out amongst the numerous other Android devices on the market. You can, of course, install a different Android mod on your device. To me, that can be a bad user experience. I’m going to have a very difficult time explaining the steps of that process or why a person should even attempt to do that. Of course, I realize that one of the features or selling points of Android is the freedom for a more knowledgable user to customize his or her device. My opinion though is that the default experience that most users will have is a bad one. I doubt that first time, non-technical Android buyers are buying Nexus devices. I would guess that those first time, non-technical Android buyers are buying what the Verizon or AT&T sales person is recommending to them, which in many cases is an inferior product. I personally like the experience of stock Android Nexus devices. It’s just a shame that you can’t get that stock Android experience on most devices (it’s also a shame that Google no longer makes a normal sized device.

Camera

The last area where I find that iOS is superior is in the photos and the videos you can take with an iOS device. For my money, the cameras in iPhones produce better quality images than their Android counterparts. Android is closing the gap, but for the longest time I could usually take a look at two pictures (one snapped with an iPhone and one snapped with the leading Android device) and I could identify which one was captured with the iPhone and which one was captured with the Android device. Historically, pictures snapped with Android devices have always looked grainy or cloudy. When I’m at the park with my wife and son and I want to capture a moment, I’m never worried about getting a good shot with my iPhone. I know I’ll get a good shot with my iPhone.

Would You Ever Switch to Android? If So, What Would it Take?

I would possibly switch. I have used Android in the past as my daily driver. I just wasn’t “in love” with it. Certain components of the UI worked just differently enough (and, in my opinion, incorrectly) that it became irksome to use an Android device. I used a Nexus One (yeah, I’m one of the ten people who bought one of those). This was back in the 2.1, 2.2, and 2.3 days (fro-yo for life!). Out of quite a few UX things that irked me, two still stand out in my mind: tap targets and that damn back button.

I never became comfortable with the default Android keyboard (I’m aware I could have installed a third party keyboard, but I’m not a fan of that; I haven’t even installed a third party keyboard in iOS 8). My keyboard theory is that the default iOS keyboard placed the touch targets somewhere below the key view (and these would dynamically resize based on what you were typing). It felt as though the Android keyboard placed the touch targets right on top of the key view. I’ve always heard that when we tap on touch screens that we are actually tapping slightly below where we think we are tapping, so this theory always made the most sense to me.

The back button, in Android, is such a wildcard. What does it do? The simple answer is that it literally takes you back an activity (to use Android terminology). The OS keeps a history stack and as you navigate around your phone, it adds entries to that stack. If you hit the back button, it simply pops the top activity (the one you are currently viewing) off the stack and the activity that is now on top of the stack is the activity you’ll see. I always found this unnerving because if you don’t remember your navigation history, you don’t really have a way of knowing where the back button will take you. iOS always seemed a bit simpler to me. Each app is in control of its own navigation history. You’ll have a back button present if you have views in your history. If you reach the bottom of stack, there is no back button. To leave the app, press the home button.

For whether or not I would switch back to Android: it would really be a matter of Apple dropping the ball on what they have going. In my tastes and in my usage, my allegiance is Apple’s to lose. I’m a bit concerned about the quality of the operating system after some of the huge strides Apple has made in the past two versions of iOS, but, overall, it’s been reliable for me.


[1]: A memory leak is when an allocated object can not be deallocated until the process that owns the object is terminated or the system is restarted (depending on what owns the said object).

[2]: I just want a reasonably sized device and even the 4.7" iPhone 6 feels too large for me.


Ten Years

My ten year high school reunion is scheduled for this Saturday. I am, begrudgingly, attending. Why begrudgingly? It’s none of your stereotypical reasons. I wasn’t bullied in high school. I was relatively well liked. This is before I started spending most of my time in front of a computer screen, so I was fairly social. I actually had a few close friends and was friendly with everyone. The question remains: why am I begrudgingly attending?

At first, I thought my reluctance was rooted in my feeling of separation from my fellow graduates. Out of the approximately eighty students in my graduating class, I regularly talk with two to four of them. I recently deactivated my Facebook account, but even before then I rarely communicated with anyone else. They were doing their thing and I was doing mine. Separation seemed inevitable. We had our own lives to live and I was busy living mine.

Earlier this week, while driving to work and listening to Pink Floyd’s Dark Side of the Moon, I was hit with these lyrics:

You are young and life is long and there is time to kill today

And then one day you find ten years have got behind you

- Lyrics from Pink Floyd’s Time from Dark Side of the Moon

I slowly realized that my reluctance was not from the separation: it is from sadness. We spend most of our childhood after a certain age, looking forward to our high school years. I can remember wishing away my childhood for those four years. Before I realized it, that time was gone. I was heading off to college. With, what in retrospect feels like, a blink of the eye that time, too, quickly passed.


Radar Love

Earlier this year, there was a bit of a kerfuffle regarding filing bugs for Apple’s APIs and whether or not us developers should file them. In the past, I never really took the time to file them. I was either too lazy or assumed that the bug was in my code. I’ve always been pretty skeptical of faulting the tools for faults, but I’ve learned that occasionally we are charged with faulty tools and that this is okay. It’s part of development.

At Lonely Planet, we recently came across a particularly nasty bug that we determined to be an issue with iOS APIs. I created a sample project and filed a bug report with Apple. This is only my second filed bug report. Maybe it’s the newness of it all, but I’m not quite as jaded as some of the other developers out there. I hope I never fall victim to that, but I realize it’s all in context of past experiences.

Whenever I take the time to file a report, it makes me feel as though I am doing something good. I would want someone to file a report with me if I were to have a fault in my code. Why shouldn’t I return the favor?


Speed Kills

America is all about speed. Hot, nasty, badass speed. -Eleanor Roosevelt, 1936

Yesterday was kind of a crummy day. My back hurt. I forgot paperwork for my son that his daycare needed, which led me to me making two trips to his daycare (don’t worry, I picked up some nice coffee along the way). I had to sit in traffic. There were lots of little things that nagged at me yesterday. However, there was one big thing: I didn’t feel as though I accomplished much.

If you were to look at my commit history for yesterday, you might believe that I actually accomplished many things. You’d be mistaken. My commits were jumbled and incoherent. I wasn’t outlining my thoughts. I didn’t have a clear path. I kept hammering on my keyboard and slamming my head into that proverbial wall, but brute force was failing me. After hitting a teeth-gritting breaking point, the quote above came into my head. Here is my full commit message from when I hit that breaking point:

Nasty Commit to Save Work Attempting to add tests to verify that the link -> entity relationship is working correctly; Cleaning up some stringified keys and using NSStringFromSelector instead.

America is all about speed. Hot, nasty, badass speed. -Eleanor Roosevelt, 1936

That commit message makes absolutely no sense (and yes, I actually did include that quote in the message). I was frustrated. That commit touched fourteen files, contained two hundred and seventy-three additions, and disregarded fifty-nine deletions. It was a mess. Quite frankly, I’m ashamed of it.

I have been striving for small, granular commits. I want my commit messages to be concise. If I can fit an adequate description in the title portion of the commit log, that’s even better. This commit was cumbersome. It touched way to many files and made no sense. I can’t even begin to describe what I changed.

Today was much better. My commit history reads like a diary (albeit a confusing diary). I’m improving, but I’m not there yet. I’ve been debating on how I can go about making sense of what I do. Maybe I should keep a diary of what I’ve been working on. This could be beneficial as I encounter problems that seem familiar (Have I encountered these problems before? What did I do last time?) or even help shed light on what I should be doing or the path I should be taking. It would cause me to stop and think about what I’m doing or what I’m trying to accomplish instead of hammering as hard as I can on my keyboard.

Programming!


Man, I Could Really Go for a Starbucks, Y'know?

Idiocracy

I don’t really think we have time for a handjob, Joe.

The older I get, the more sure I become that humanity is devolving. I can only assume that Idiocracy is actually a “futurementary”: a documentary to warn humanity about the dangers of what lies ahead if we continue on our current trajectory.

I have recently been stunned by what we in the technology field choose to spend our time doing and what investors insist upon funding. A recent application received $1.5 million for doing less than current messaging applications. That’s right: an application that does nothing except send a one word message to your friends has raised $1.5 million. The New York Times piece links to a press release announcement from Blonde 2.0 (the self proclaimed world’s leader of digital marketing) which is riddled with mindless drivel that attempts to glorify one of the single worst ideas I’ve ever heard. The press release refers to Yo as “[an] incredibly simple communications app”. The application, as it stands today, literally allows you to send “Yo” to your friends or family. Are you fucking kidding me?

Zoolander: I Feel Like I’m Taking Crazy Pills

The New York Times piece quotes John Borthwick, the Chief Executive of Betaworks (an early backer of Yo), as saying,

We are fascinated by these uses of simple yes/no on/off communications tools. There is no payload in Yo — no pictures, no text, just a deceptively simple on/off state that over time has the potential to become a platform.

I hate to burst your bubble, but there is nothing “deceptively simple” about this platform or this application. I am not stupid. I fucking realize how simple this entire idea is. I’m just at a loss for words that the equivalent of a Facebook poke is being invested in so heavily. It’s shit like this that makes me embarrassed to tell people that I write software.


Defective Mood

As I age, I am perturbed that my mood is directly tied to what I feel that I am either accomplishing or not accomplishing at work or, rather, in software development. I have recently found that I can be quite foul if I encounter a problem in software that I am writing. I encounter many problems that do not affect me, but I have found that the ones that do affect me tend to have the same earmarks: an unfamiliarity with a framework or an API, a misunderstanding of how a framework or API is intended to function, or, my biggest fear, unexplained behavior of a framework or API. I was recently plagued many hours on an issue at work that I feared fell into the latter category.

I have worked with Core Data on many occasions now. We are using it in our project at work. However, I started noticing odd behavior in some of our tests. There were NSManagedObjects that were not updating as expected when importing example server responses. The tests were passing and unexpectedly not passing later. This was bothersome. I ended up stepping backward through our commit history until I narrowed it down to a particular commit (actually, a particular pull request being closed). My first inclination was to expect an issue with our .xcdatamodeld file (the backing of our Core Data model). All of the changes in this commit seemed innocuous enough. We were adding relationships and parameters to objects, but none of them should affect our import logic. After introducing these changes one by one into a detached HEAD state in our repo, I came to a startling conclusion: None of the data model changes actually broke our data import. This was terrifying. I was stumped. My mood was quite foul.

When you’re stymied by a problem, everything is stupid. Your computer is stupid. Your tools are stupid. The language is stupid. The framework causing you grief is stupid. Stackoverflow is stupid. Everything.

With the recommendation of a coworker, I took an early lunch. He rightly pointed out that I needed to step away from the problem. Once you’ve had your head down on a problem for an extended period of time with little progress, you become stuck. I was most definitely stuck. During our lunch break, we actually spit-balled ideas on what the issue might be. We came up with a few theories. I was reenergized. After being back in the office for a bit, my energy was zapped again. All of our theories were bunk.

I went back to the drawing board. Something finally caught my eye. It was a category for one of our NSManagedObjects that was overriding willChangeValueForKey:. I just happened to notice that this method was not calling super. Someone had forgotten to call super. I was vaguely aware that Core Data and MagicalRecord (a library to simplify the Core Data layer that we are using) use these methods for updating relationships. I am much more aware of that now. I added the super call. BOOM. I was back in business.

I believe the frustrating piece of this episode is the concern that something is now broken that had been working and there is no clear stressor at what triggered the issue. After making this fix and verifying the fix, I was elated. Not only had I fixed a particularly nasty defect, but I learned more about Core Data in the process.


My Environment Setup

I recently purchased a new 13" MacBook Air (which is a truly wonderful machine). Before I booted the machine for the first time, I started to contemplate what was needed for the machine to be setup for my development needs. I have, regrettably, avoided keeping track of what my environment looks like. I decided to change that. I have started tracking my environment setup on a static page on this site. It may not be the ideal setup for everyone, but I have found that it is the bare minimum of what I need (it is a work in progress and I plan to keep it updated as my methods and needs evolve).

If you have any questions about my setup, please feel free to ask.


Unintuitive Swift

In case you have been living under a rock, Apple announced a new language at this year’s WWDC: Swift. I have been anxious to work with the new language beyond reading the Apple supplied The Swift Programming Language and the new Playground Xcode feature (which is a new way to experiment with Swift without using it in a project). I have recently been working on a new personal project (I am not ready to talk in great detail at this time, but it is a Mac application) and since the project is still in it’s early stages, I decided to convert the project over and start using Swift in this project. Converting the project went smoothly and developers have the benefit of mixing and matching between Swift and Objective-C. I currently have a couple of classes written in Swift that play along nicely with the rest of my Objective-C code. I was skeptical when this capability was announced, but so far it has been working as Apple advertised.

This morning, I was writing some Swift code to validate the input in an NSTextField as it is typed by the user. I am attempting to validate the input as what I perceive to be a valid time format: "s", "ss", "m:ss", "mm:ss", "h:mm:ss", or "hh:mm:ss". In my initial implementation, I wanted to validate that only numbers and colons were input, to break apart the given string into components (with the token being the colon), and to assess each time component to ensure each component was an acceptable length. I am going to step through each one of these tasks and show what it would look like in Objective-C and what the equivalent looks like in Swift (or at least, to what it looks like in Swift to the best of my knowledge at this time; There may be more efficient ways of doing these tasks in Swift that I am not aware of yet). I’m also going to rant a bit about some things that I found confusing in my Swift implementation.

Validating a String’s CharacterSet

Given a string, I want to know whether or not the given string contains any forbidden characters. Given "07:07", the result would be false (does not contain forbidden characters); Given "07.07", the result would be true (does contain forbidden characters).

Objective-C

NSString *timeString = @"07:07";

NSCharacterSet *validTimeCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789:"];
NSCharacterSet *invalidTimeCharacterSet = [validTimeCharacterSet invertedSet];
NSRange rangeOfInvalidTimeCharacters = [timeString rangeOfCharacterFromSet:invalidTimeCharacterSet];
BOOL invalidTime = rangeOfInvalidTimeCharacters.location != NSNotFound;

Swift

So there are a few caveats with this solution in Swift. Swift has a Range class that does not directly map to the NSRange structure. I, for the life of me, could not figure out how Range actually works. Furthermore, Swift’s String class does not have a simple rangeOfCharacterFromSet: function (or it’s equivalent); Instead, it has a rangeOfCharacterFromSet(aSet: NSCharacterSet, options: NSStringCompareOptions, range: Range) function. I tried many things, but could not get Range to behave as I thought it would. I realize this has to do with how I think of NSRange and I am trying to just use NSRange in Swift, but I found it very confusing. After hunting through the developer forums, this is the solution I came up with:

let timeString = "07:07" as NSString

let validTimeCharacterSet = NSCharacterSet(charactersInString: "0123456789:")
let invalidTimeCharacterSet = validTimeCharacterSet.invertedSet
let rangeOfInvalidCharacters = timeString.rangeOfCharacterFromSet(invalidTimeCharacterSet)
let invalidTime = rangeOfInvalidCharacters.location != NSNotFound

or

let timeString = "07:07"

let validTimeCharacterSet = NSCharacterSet(charactersInString: "0123456789:")
let invalidTimeCharacterSet = validTimeCharacterSet.invertedSet
let rangeOfInvalidCharacters = timeString.bridgeToObjectiveC().rangeOfCharacterFromSet(invalidTimeCharacterSet)
let invalidTime = rangeOfInvalidCharacters.location != NSNotFound

Breaking a String into Components

Given a delimited string, I want an array of strings for each component. Given "mm:ss", the result would be ["mm", "ss"].

Objective-C

NSString *timeString = @"07:07";
NSArray *timeComponents = [timeString componentsSeparatedByString:@":"];

Swift

let timeString = "07:07"
let timeComponents = timeString.componentsSeparatedByString(":")

Iterating Over an Array Backwards

I will not bore you with the details on how to iterate over an array backwards in Objective-C. That really is not important in this observation. The real quirk is how you iterate over an array backwards in Swift. In Swift, you can iterate with a for-in loop:

for index in 0...3 {
  println(index)
}

The above code will loop four times (the ... in this case indicates inclusive, meaning <= 3; If you wanted to be exclusive, meaning < 3, use .. instead). I assumed that performing this loop in a reverse order would look like:

for index in 3...0 {
  println(index)
}

After watching the loop run for a few seconds, I realized how my assumption was false. My code was iterating many, many times. Have you seen the issue yet? Well, Swift is iterating from 3 to 0, incrementing. The loop starts at 3, then moves to 4, then to 5, 6, 7, and so on. Given enough time, index (which is an Int64 on my 64-bit Mac) will overflow into negative numbers, then slowly work it’s way to zero. I found this to be fascinating. I am not going to say this is a defect, but I will say that I believe this is misleading behavior, given prior experience with other languages. I would have expected the above code to start at 3 and work it’s way down to 0.

I could have used my time here to complain about this, but I will not. This has been talked about on the developer forums, so I will not add to it here. After some digging, I did find a way of accomplishing this task:

for index in reverse(0...3) {
  println(index)
}

Ah, of course: The intuitive reverse() function. How could I have missed that?

What I Learned

I have much to learn when it comes to Swift. It does not help that the language will be evolving while learning, but it makes sense to learn it early (in my opinion) so that I understand what my platform is moving toward. I am coming up on nearly five years of iOS experience and the code I am writing in Swift now makes me cringe. It makes me feel like I am in college again, writing terrible code. Have you ever looked back at code you have wrote while in college? Welcome to learning Swift.


He has his Reasons

The Royal Tenenbaums

Oh, I know that, but you can’t raise boys to be scared of life. You gotta brew some recklessness into them.

Note: This started as a draft on Father’s Day and was finished the following day.

I am celebrating my first Father’s Day today. Ashley insists that I technically celebrated my first Father’s Day last year (as she was pregnant at the time), but I’m counting this one as my first. I am overjoyed that I am lucky enough to be a father. I realize it sounds trite, but my life has been altered, for the better, when Max was born. While I am still a novice at this whole “dad thing”, I have plenty of thoughts and opinions on the subject. If you’ll humor me, I think you’ll find that those opinions may not be what you expect.

Fear

One of the most difficult things about becoming a parent is the pain I feel everyday as I walk out the door and leave my son behind. I didn’t really expect it to affect me, but it does. I hate leaving him. That does not mean, however, that I want to spend all my time with him. To be honest, I occasionally need breaks and that’s okay. Ashley is more than willing to take him when I’m feeling overwhelmed, which is becoming less frequent. I believe what I feel when I leave in the mornings for work is fear. I fear missing his milestones. I fear that something may happen and he might need me while I’m gone. I fear that he’ll forget about me if I spend too much time working.

I read an interesting quote from Steve Jobs, who said that having children is like having “your heart running around outside your body”. I believe this. I feel so much love for Max and so much fear that he’ll get hurt. I get caught up in thinking in terms of “what-ifs”. I hope to come to terms with these thoughts, but one day he’s going to grow up; One day, he’s going to scrape his knee; One day, he’s going to have his heart broken. The knee jerk reaction is to let him grow up inside a bubble and try to insulate him from the big bad world. This is a horrible idea. There are truly wonderful things in this world and I want him to experience as many of those wonderful things as he can. I just hope that I am able to let go at the right times and let him experience life.

Becoming a Father

I believe most everyone has the capability of becoming a father. Assuming you’re not shooting blanks and your partner is capable, anyone can become a father (even if it does require a little help). Should everyone become a father? Hell no. I have news for you pal, having a kid changes your life. For me, I believe it changed it for the better. However, I’m not going to sit here on my high horse and suggest that becoming a father is the right thing for you to do. Odds are, you won’t even know if it’s the right thing for you until it happens. It’s frightening. You’ll be responsible for another human. You’ll have to wake up every two hours for those first couple of weeks and change your baby and ensure your baby is getting fed. It sucks. Every time Ashley and I had to wake up to change and feed Max, we looked at each other and said, “Only one.” Are we going to have more? I have no idea, but one is plenty for me right now.

If you’re going to take that leap though, if you think you want it, my only advice is to be involved. Become involved in any way that you can. Due to certain circumstances, I had to be the one to wake up, change Max, and hand him to Ashley for feeding. I had never changed a diaper until I changed Max. You learn quick. I cannot recommend doing this enough if you are going to become a father. You bond with your child and it makes you appreciate them more… later… much later.

I can’t tell you if having a kid is the right thing for you and I’m not going to sit here in my ivory tower and suggest to you that it’s the greatest thing in the world for every guy out there. My father is of the firm belief that everyone should experience. Fuck that; You are who you are and you may not want that. That’s fine. It doesn’t make you less of a person. For me, however, it’s one of the greatest things in my life. It’s new, it’s scary, but I am looking forward to every day, every challenge.


True Love is Hard to Find

Old School

Sometimes you think you have true love and then you catch the early flight home from San Diego and a couple of nude people jump out of your bathroom blindfolded like a goddamn magic show ready to double team your girlfriend…

I was recently asked by a truly great friend of mine to be his best man. I instantly accepted. After reminiscing and thinking for a few days, this is the speech I wrote. Congratulations Evan and Leah. I love you guys.


My brother and I are separated by nine years. When he was in high school, I was nothing more than a young nuisance who cramped his style. While we are brothers and we love each other, we are separated by a generation.

I found a friend in first grade. He wore glasses and had an eye patch to help a lazy eye. During class, we thought it was cool that we lived on the same street. Over time, we found out that we lived only a few blocks apart. Once we could ride bikes, we started hanging out at each other’s house after school and during the summer.

We watched baseball, we played baseball. We played Nintendo (I loved to dominate him in Ivan ‘Ironman’ Stewart’s Super Off Road; So much so, that on numerous occasions he accused me of cheating). We watched wrestling and talked about X-men. We were inseparable. His family became mine and mine became his. Although we inevitably drifted apart as I went to Louisville for college and he stayed in Mayfield, we still kept in touch and involved with each other’s lives.

When Evan asked me to be his best man, I was honored. It’s not everyday that you get a chance to be apart of such a special moment for a special person in your life. I’m grateful for a moment like this and for a brother like Evan.


Time Machine

Mad Men

Teddy told me that in greek, nostalgia literally means the pain from an old wound. It’s a twinge in your heart, far more powerful than memory alone. This device isn’t a spaceship, it’s a time machine. It goes backwards, forwards. Takes us to a place where we ache to go again. It’s not called the wheel, it’s called the Carousel. It lets us travel the way, a child travels. Round and round, and back home again, to a place where we know we are loved.

A few weeks ago, Ashley, Max, and I were visiting friends. As we left their house, their next-door neighbors were just arriving. They, like us, were also carrying a baby. The only difference was that they had two older kids as well. We made smalltalk, then politely loaded Max into our car and wished them well. As I crank the car, I watch as they crowd together with their dog on their porch for a family photograph. I can’t help but notice everyone with a smile, waiting on the camera, as I put the car into reverse. Snap. The photograph is taken. The family is memorialized; they are forever frozen in time. Later that evening, I reflected on this event with a recurring thought: How many moments I’ve missed freezing in my life because of my and my family’s lack of photography? Also: I feel like an asshole for not offering to take their picture so that the mother of the family could be in the photograph instead of behind the camera.

My best friend since at least first grade (Hell, maybe even kindergarten) is getting married on Saturday. I wish him and his future bride nothing but the best. He asked me to be his best man, to which I happily agreed. I couldn’t bring myself to do the traditional bachelor party thing (I’m married with a child now; I’ll be damned if I end up in a strip joint) so I took him to Chicago to watch the White Sox play the Yankees. This may sound lame, but we grew up together watching the White Sox play on WGN. I also spent a fair share of time in our hometown as this was Max’s first trip to my hometown and there were many family members who had yet to meet him.

As I’ve gotten older, one thing has struck me whenever I visit my hometown of Mayfield, KY: How nostalgic I feel every time I visit. During my time there, I realized that the nostalgia I feel when I visit is not necessarily for the place, but it includes the people and time. Occasionally I long to go back to the friendships that I have outgrown, to the memories that are fading, to life before complication. Every time I visit, I see the debilitating work of time on the people and the places that I remember so fondly from my childhood. This is the crux of nostalgia: It is an old wound, an old memory; It is a lifetime ago, but feels as though it were just yesterday.

If I’m being honest, Mayfield is kind of a shit hole. Compared to the places I’ve lived and have visited, I could never live there again. As sad as it makes me to think about it, there is nothing there for me other than the people and, through the hustle and bustle of life, they are fading. Part of me longs for those connections, for that warm feeling. The smarter part of me realizes that time has past and there is no getting back to it.

I remember many of my classmates, especially in high school, were so keen to leave Mayfield. They always boasted how they would leave the one-horse town of Mayfield and make it big. Many were determined to move to the big city of Nashville (which, as much as I love living in Nashville, is ludicrous as it’s not a very big city). For whatever reason, I figured I wouldn’t live in Mayfield as an adult, but didn’t really think in more detail than that. I never planned on living somewhere else, but just assumed that I would. After all, in a “city” who’s largest employer is Wal-Mart, it is kind of difficult to find potential work in any computer related field, the only plan I actually had for myself in high school. Now, when I return to my old stomping grounds, I realize that I am one of the few to leave.

I find it odd that I need to remind myself, when in Mayfield, that no matter how much I want to go back home, that home is gone. Mayfield is no longer my home. My home is Nashville.


Introducing CoreDataMate

A few years ago, I started development on a project that required long term persistence. Up until that point, most all of my persistence was handled on the server. This project required that I persist data locally on the user’s device, in conjunction with persisting data remotely on a server. As this was an iOS project and Apple is “all-in” with Core Data, I decided I had better get “all-in” with Core Data as well.

I read through every Core Data tutorial I could find on the internet. Regardless of how many times I tried, I just could not grasp what was happening in Core Data. After complaining about this to some of my coworkers, I had a few of them recommend MagicalRecord. I am not going to question the quality of this library; I have no doubt that it is well written and works as advertised. The issue is that I don’t understand what the library is doing behind the curtain. I use libraries all the time, but when I use them, I want to understand what they are doing (more or less) without blindly trusting them. For whatever reason, I simply cannot wrap my head around what MagicalRecord is doing. It seems as though you can arbitrarily create objects on any context and save them. This is one of the library’s goals. However, one thing I have come to understand is that you need to ensure that every thread has it’s very own context so that you don’t “cross the streams” so to speak. Try as I might, I simply could not ensure this using MagicalRecord. This is when I decided to go old school and purchase a book: Core Data (2nd Edition): Data Storage and Management for iOS, OS X, and iCloud.

Don’t cross the streams

After reading through Core Data (2nd Edition), I started writing what I called a “data manager”. The data manager is a simple class that acts as a gateway to your persistent store. The data manager houses a private context which is considered to be the master copy. You do not have direct access to this context from any public facing methods in the data manager. The context that you work with predominantly will be a child context of the private context. This child context is a main queue context that I have appropriately named mainContext. The main queue context will be the context that you predominantly work with. This is the context with which your UI will directly interact.

This is all great, except for the very real use case when you will need to write content to your persistent store. What then? Well, the data manager’s current pattern dictates that you create a new temporary context for your thread (this can even be the main thread if you like, the point is that you just want a temporary context with which to work) whose parent will be the data manager’s mainContext; you will then make any changes that are necessary on this temporary context. After you are finished, you’ll persist your temporary context which will write those changes upstream to the data manager’s mainContext. If that persist is successful, simply call:

[[CDMDataManager sharedManager] persist:YES];

which will write the mainContext’s changes upstream to the data manager’s private context (the BOOL value indicates that it should be a synchronous save; a NO here would result in an asynchronous save). At that point, your new content is in your persistent store and you have the added benefit of your UI already being updated with this content as your changes already exist on the mainContext.

This is a rudimentary example, but I wanted to show how easy Core Data can be to work with, with a bit of caution and understanding. Ready to check out the source code or give it a spin yourself? Head on over to CoreDataMate on Github to check out the source. If you’re impatient and want to play with the code (and you use Cocoapods) just add this to your Podfile: pod "CoreDataMate".


O Me, O Life?

Dead Poets Society

Answer: That you are here — that life exists, and identity; That the powerful play goes on and you may contribute a verse. That the powerful play goes on and you may contribute a verse. What will your verse be?

February was an eventful month. There were three major events that stick out when reminiscing about February: my son’s birth, Facebook Paper’s launch, and the untimely death of an acquaintance from college.

Facebook Paper launched on February 3rd. I rarely use Facebook, but I was excited to install and try out Paper. I’m not a fan of Facebook’s iOS application (or any of their applications to be honest) but the advertising behind the launch of Paper was incredible. Once Paper was live in the App Store, I eagerly downloaded the application.

The install experience was smooth, but I was dismayed to find the voice over tutorial screens. I hate tutorial screens. To me, tutorial or “coach” screens are shortcoming in the user experience design of your application. While I understand Facebook’s desire to include these tutorials (the application is heavily gesture based and I am not sure that gestures lend themselves to be organically discovered), the experience was irritating. The larger issue with their tutorial is that you can leave the application and come back at a later time to a completely different piece of the tutorial. I went for a period of two or three days without using the application and, upon returning to the application, was presented with additional tutorial direction after I, apparently, navigated to a section of the application to which I had not previously navigated. This would not have been upsetting except for the fact that this event occurred while walking around the hospital with my wife and newborn during quiet hours.

Despite my frustrations with the tutorial portion of the application, I think the application is much better than the original Facebook application (although I doubt that it will entice me to use Facebook anymore than I do now). However, one thing struck me on the first launch of the application: On the home screen, where your news feed is allegedly cultivated to show you the most relevant news from your feed, I was presented with interesting updates from an acquaintance that I knew during college. I rarely spoke to him and I certainly did not speak to him on Facebook, so I was curious as to why his updates were above other users' updates. As I read through the updates, I noticed that people were writing on his wall in remembrance: He had passed away. The heartfelt sentiments that his friends were leaving behind were moving.

Even though I did not consider him a friend, I can clearly remember what he looks like. I can remember the students that he frequently sat near and talked with. While I did not talk to him, it was surreal to know that one day he was here and the next he was not and he is now eulogized on his Facebook wall. I could never determine the circumstances of his death, but I stopped reading after coming across a heart-wrenching post from his sister.


A few days later, after an eventful labor, my wife and I welcomed our son into the world. Due to some complications, a Caesarian Section was required. I can still remember holding my wife’s hand in the operating room, my eyes closed, desperately waiting to hear my son’s first cry. At the first note of his cry, I started weeping, which, in-turn, brought my wife to tears. I’ll never forget that moment of pure ecstasy.

In the days after his birth, many of my friends and colleagues have asked me what it’s like to be a father. My answer is not very fulfilling: He eats, poops, sleeps, and cries. I spend most of my time either changing his diaper or trying to rock him to sleep. I am no longer nervous about changing a diaper as I can now do so in my sleep (and I frequently do). Although this time is not what I would consider to be “fun”, there are things that I enjoy. One of which is that I love reading to him at night (so I started a bit early, so what?).

Considering this time, I cannot help but look forward to what comes. It is difficult to stay in the moment and to appreciate the present when the future is so bright. I look forward to hearing his first words, watching his first steps, teaching him how to ice skate, holding his hand on the first day of school; I look forward to all of it. I have to frequently take pause and remind myself that I cannot write his verse. He is the author and is ultimately responsible for his story. I also do not wish to write his verse for him. My goal is to cheer on the sidelines and to give advice based on my personal experiences. He will be his own person and I think he’s going to be great.


In February I was witness to life’s bookends: birth and death. The birth of a person is a joyous occasion filled with the promise of what could be while death is a somber reminder of what will be. I find it to be emotionally difficult to think about this. One thing that brings me comfort is the scene mentioned in the onset of this piece from Dead Poets Society (and I would like to thank Apple’s advertising team for reminding me of how much I enjoy Dead Poets Society): We get to contribute a verse to this play. The beauty of this sentiment is that we are in control of what this verse looks like: We choose which paths we take, the verbs on which we take action, and the nouns with which we interact. We cannot control the length of our verse (although we can certainly help influence it based on how we choose to write it), but we have control in the beauty and the power of it.


Wendy, Let me Explain Something to You

The Shining

Whenever you come in here and interrupt me, you’re breaking my concentration. You’re distracting me. And it will then take me time to get back to where I was. You understand?

My stepfather was an auto body man. He claims that he found his passion during his high school auto body class. After graduating high school, he spent most of his working life beating the dents out of cars. He spent most of his time working for car dealerships. Car dealerships would routinely purchase wrecked cars and hire auto body men to fix the vehicles so that they could in-turn sell the car for a profit. The dealerships would sometimes be able to make a profit of a few thousand per car.

The work was brutal. He worked year round in a shitty body shop with no air conditioning in the summer and kerosene heaters in the winter. Summer time in Kentucky finds temperatures routinely in the 90s and frequently breaking 100°F. The humidity in Kentucky during the summer is so high that a quick walk from the front door of your house to your car in the driveway would leave a thick layer of perspiration on your forehead at 7AM. The winter in Kentucky, while considered mild compared to the northern United States, can still be frigid.

He worked like a dog: forty to forty-five hard hours a week. He was paid hourly. As far as I can recall, he had no benefits. Sick? You’re missing out on pay. Vacation? You’re missing out on pay. He brought home $225 per week. To help make ends meet, he also freelanced on nights and weekends. There was a small detached garage at our house. He would work from 6PM (when he usually arrived home from work) until 9PM (an early night) or until 12AM (a late night). He would also catch up on his freelance work on Saturdays and rarely on Sundays. He tried to save Sundays for his day of rest, which usually involved watching a Winston Cup race.

He was also fortunate enough to be artistically talented. He could charge big money for a custom paint job, sometimes a couple of thousand, depending on the gig. Luckily, there was no shortage of young men who wanted a custom painted car to show off to their friends. Unfortunately, custom paint jobs eat up time. There are hours devoted to drawing out the initial design. Then there is the taping, which can take an entire night. Once the car is taped, the design needs to be drawn out, followed by intricate X-Acto blade work to cut out the pattern. Now you’re ready to paint. There are always many coats involved. And those take time to dry. Many designs require layers of work. It is not uncommon to repeat this process five to ten times for simple designs. If there are any imperfections or bugs (Kentucky summers are a hotbed for mosquitoes and other flying nuisances) the affected area would have to be wet sanded (sanding the painted surface while squeezing a wet sponge over the area), which would smooth out the surface. After all of this, the body still has to be clear coated to give it that protective layer and to make it shine. If done properly, the car will permanently look wet (which was always desired).

My stepfather claims that this was a labor of love. He felt that he was put on this earth to repair auto bodies and to paint them. I feel he was a bit disingenuous. I think his passion was actually art and that his canvas happened to be cars. I believe he repaired auto bodies as a means to an end, to afford him the chance to run his side business so that he could land the custom paint jobs.


I, on the other hand, feel that I was put on this earth to write software. It brings me joy. I have a job writing software. I should be happy about this. And, usually, I am. The issue is that I would like to do more. I would like to learn more. I would like to work on other projects, my own projects. But what do you do when, after working forty hours a week, you are so mentally drained that you can’t force yourself to work on your own projects?

In a manner of speaking, my stepfather had side projects. His side projects kept food on the table and clothes on our back. His side projects were a necessity. I have the luxury of making a very comfortable living in my day job. My side projects are strictly academic or for self advancement. It’s important to note that my side projects are not intended to draw income (although if they did, I wouldn’t be upset). What I have discovered is that passion alone has failed me in my drive to pursue side projects. When I walk into my house I am mentally drained. I want to spend time with my wife. I want to watch television (lately, I’ve been hammering through episodes of Top Gear, British version of course). I want to recuperate. “What about the weekend?”, you might ask. No dice. I’m still tired. I still want to relax and recuperate. But mostly, I want to enjoy my home. I want to take in what Nashville has to offer.

So where does this leave me? Usually agitated. I become irritable about not working on my side projects. If I do find the time and the drive to actually sit in front of my computer, I have rarely left my project in a place where I can quickly pick it back up. Every time I put down one of my projects, I have failed future Todd. I never leave notes for myself so that I know what was happening or where I should go next. If any distractions arise (even something as innocent as my wife wanting to spend time with me) I meet them with an unusually harsh response. I outwardly blame others for my inability to manage my own side projects. “I wish I had more time,“is a common refrain. But there are plenty of other developers who have side projects and they have the same amount of time as I do during a day. So what makes them different? My guess: Planning and priorities.

I would love to give up on side projects, but in my own mind I would feel like a failure for not having them. It seems as though every developer today has their day job and other projects at night onto which they contribute. If I don’t have a side project, am I less of a developer? Probably not. But it feels that way.


You Wanna Hurt Me?

A scene from Planes, Trains and Automobiles where John Candy confronts Steve Martin.

Go right ahead if it makes you feel any better. I’m an easy target.

In the movie Planes, Trains and Automobiles (Oxford comma be damned), Neal blames his ruined trip home on Del. Is Del trying to ruin Neal’s trip? No. Del is just being himself. He’s loud. He’s boisterous. He’s doing what he believes is right. He’s not out to ruin Neal. But Neal, being the cynic that he is, feels that Del is just a buffoon with intentions of malice. I’ve run into a few Dels during projects. And I’ve unfortunately became Neal in many of these situations. It’s not something that I’m proud of, but something that I’m working toward improving.

I recently started working on a project at work that we took in house. The project had been outsourced to a developer in South America, but was brought to use to finish that last 5%. I loathe the last 5%. The reason? It’s never just 5%. Inevitably there are foundation problems with the code. There are quirky little bugs. The application is slow. And the code? Horrific. It’s like you’re renovating a house and you hire me to paint it. I come in and immediately fall through the floor. After I dig myself out of the hole, I see water running down the wall and electrical wires dangling out of the ceiling.

I have a tendency to become bitter at this stage. A little at the project, but most of my bitterness comes at the expense of the developer who wrote the code. It’s easy to blame all of your problems on someone else. I wanted to criticize this developer. I wanted to shame this developer. I wanted to humiliate this developer. Why would I do this? Because I’m God’s gift to programming, of course. I would never make these juvenile mistakes. My code would be pristine. My code would have been well thought out. The application would have been flawless. I even feel that the developer may have even maliciously written terrible code. Maybe the developer was intentionally attempting to sabotage the project. Sometimes I have to catch myself and realize that he or she may just be beginning their journey of being a software developer and that he or she may need a little help along the way.

The issue with my hubris is that I’m forgetting a few truths. I used to be this bad (maybe even worse). I am embarrassed by the code that I wrote while I was in college. I sincerely hope no one ever sees code from the first project that I worked on. In hindsight, it was horrible. How did I overcome this? I was fortunate enough to have developers around me who pushed me and challenged me to become better. They gave me constructive criticism. It was face-to-face. There were no attempts at public shaming. I was lucky to work with developers who genuinely wanted to do good things and help others do good things. I believe this has been lost, somewhat, in the past couple of years at our company and by most developers. It’s easy to be snarky toward others with your first projects safely deleted or hidden on a thumb drive that happens to be buried in a drawer at your desk.

When I become irritated at another developer, I explain to them why I’m irritated. I open a code review on them and try to help them improve at their craft. Am I a saint? No. I sometimes exclaim hurtful comments out loud at my keyboard. I have judged the original developer of my current projects unfairly. I have refrained from attempting to belittle him or her on Twitter. After taking a little time to reflect on the situation, I simply regret that I will not have the opportunity to give them feedback. To help him or her improve at something that they love or at least care enough about to do for money. I realize my code is far from perfect, but I figure that if I can help others improve then others can help me improve.

I occasionally have to fight my urge to become Neal. After Neal has blown up at Del (one of the many times), Del goes on a heartfelt rant with this line: “I could be a cold-hearted cynic like you, but I don’t like to hurt people’s feelings.” Perhaps this world would be a bit better for developers if there were more developers out there who cared less about “burning” a fellow developer and more about helping a fellow developer improve. I’m slowly starting to learn this and make this change within myself.


Jesus, Man, Can you Change the Station?

A scene from The Big Lebowski where Jeff Bridges is in the back of a cab, holding his head, asking the driver to change the music.

I’ve had a… had a rough night, and I hate the fucking Eagles, man.

Don’t you just hate it when you’re fast asleep and something wakes you up? It’s irritating. I also have a problem: I have a difficult time falling back to sleep once I’ve been awakened. Do you know what makes it particularly troublesome? When it’s after midnight and you feel like you’re at a god damn Eagles concert because your next door neighbor (separated by 6-8 feet) is listening to Take It Easy at maximum volume. And not just “10 - Max Volume”. We’re talking about, full-blown, Spinal Tap, “These go to eleven” maximum volume.

Irritated yet? Have no fear. I hear the starting notes to Witchy Woman, but he hits the skip button to get to Lyin' Eyes. I’m miserable. The next song I remember hearing is Desperado, followed by Tequila Sunrise. After this, he either turns off the stereo or I black out from either anger or sleep deprivation; I’m not sure which.

I spent my Saturday exhausted. I realize what you’re probably saying: “You’re in bed before midnight on a Friday night? Are you an old person?” Not really. Sure, I turn 28 in a few weeks, but I don’t consider that to be too old. The issue is that I enjoy getting up early and contributing to society (even on weekends). In addition to that, Saturday was a pretty special day as it was our baby shower. Thankfully, my wife was unperturbed and did not wake through Their Greatest Hits 1971-1975. I enjoyed the party, but it was difficult to focus. Fortunately for me, my neighbor rarely has back-to-back performances.

You might be asking why I didn’t knock on his door or why I wouldn’t just call him on the phone and ask him to turn it down (I do have his number, after all). Over a year ago, while he was practicing his drums at 11PM on a Wednesday night, I called the police to come give him a warning. I didn’t file anything official. I simply asked that they stop by, warn him, and be on their way. My wife had just had shoulder surgery, was pretty miserable, and just wanted to sleep. To the police officers' credit, they did just that. When they arrived, the music was so loud (he also listens to music while he practices), they had to go around to the side of the house and yell through his open window for him to come to the front door as he could not hear their knocking over the music/drumming. After that, I felt pretty bad. I didn’t even attempt to contact him before contacting the police. But it’s not like I asked for a citation. Just a warning. After that incident, he gave me his phone number. My wife and I also decided that, as long as he’s putting on his concerts before 10:30PM on weeknights or performing during the weekends, we wouldn’t bother asking him to turn it down.

For some odd reason, I tend to project my thoughts and emotions onto others without fully understanding how they actually feel or knowing what they are thinking. And, for whatever reason, I project onto my neighbor that listening to his music or playing drums is something that he genuinely enjoys doing in life. Something that gets him through the day. He has a physical labor job (unlike me, who sits at a computer all day and listens to all the music he damn well pleases), which is something with which I can’t empathize. This sparked a thought in my mind: What am I working for? What am I doing in my free time that enables me to push forward through a difficult day at the office because I know that something fun awaits me?


I'm Kind of a Big Deal

A screenshot from Anchorman: The Legend of Ron Burgundy during the opening party at Ron’s apartment

I’m very important. I have many leather-bound books and my apartment smells of rich mahogany.

Saturday was kind of a special day (as far as software development goes). I opened a pull request for Shenzhen. Shenzhen is a gem for building .ipa files from iOS projects (it even has support for distributing files to TestFlight, HockeyApp, FTP, and S3). While testing the gem, I noticed a few problems with building schemes in workspaces. I cloned the project to my local machine, played around with the source, until I fixed the issue. It was a small fix, but I had a few concerns.

Lizard Brain

I’m a very novice Ruby developer and I feared I was making an ass out of myself. I thought that my change might be considered hackie. Perhaps I was not conforming to Ruby standards. I’ve written Ruby code in the past, but I rarely let it see the light of day. There are always other, more preferred ways of an implementation (Ruby has methods for everything) and I’m always concerned that I’m doing something wrong or embarrassingly wrong.

I’m also pretty green when it comes to Github. Up until this point, I’ve only had a few pull requests accepted from Martin M on his Maven CXX Plugin (mainly changes to keep the plugin updated to building iOS projects). I’ve worked with Martin. He’s incredibly gifted and he was incredibly kind to accept my pull requests (especially since I know I did them poorly; Sorry Martin).

On top of that, the author of the project is mattt. Yes, that Mattt. Mattt with 3 T’s Mattt. NSHipster Mattt. (Side Note: I’m loving the NSHipster: Obscure Topics in Cocoa & Objective-C book.) With such an extremely knowledgable and talented developer, it felt daunting to be offering a change to his codebase.

Saturday morning, I decided it was time to stop being scared. I needed to learn how to do this properly. The best way to learn: By doing.

I Have the Power!!!

First, I found this awesome walkthrough on forking, working, and opening a pull request on Github: How to GitHub: Fork, Branch, Track, Squash and Pull Request. After about an hour of work, I had successfully opened a pull request. I was thrilled. However, my excitement was tempered a bit. I have heard many stories of pull request purgatory where the author never accepts pull requests and open ones just sit there for all eternity. So I was excited, but I realized that just opening a pull request was half the battle. I had done all I could do: Make the changes, document everything thoroughly in the commit log, open the pull request, and re-emphasize the changes I had made (and why) in the pull request description. Luckily, later that day, I received a Github notification: mattt had accepted my pull request. I was ecstatic. As I read through the full message, I noticed that he cherry picked my changes to avoid the addition to the .gitignore of ignoring BBEdit files (not a big deal, I probably should not have checked that change in anyway; Force of habit really).

I Learned Something Today

I think the moral of my story is this: Just do it (Nike™). In all seriousness though, my biggest enemy is always that nagging voice in my head, telling me that I shouldn’t bother. Or that I’ll fail. Or that people will regard my contribution as meaningless to the project. Or that I’m doing it wrong. I’m constantly fighting this. But as I do more, I’m slowly quieting that voice. I’m not sure if I’ll contribute more to open source projects on Github, but now that I have this under my belt, I’m going to feel more confident the next time the urge strikes me.