Saving the agony of Git conflicts

I’ve been doing this particular git thing for a while now and thought I’d write it up in case it helps any other intermediate-gitters out there.

So. Branches. Branches are great right? If you answered that question with any reservations, then this post is for you. A year ago, I knew the benefit of branching in Git, but it always seemed to come with some level of agony. It was essential, but not pain free. Now, a year later, it’s almost 100% painless. Let’s walk through a real quick workflow example.

So, you’re working on some fairly significant frontend changes. Let’s say you’re re-responsive-izing an entire site. You’ve branched off master to your own feature/new-responsive-site. You’re making changes to lot’s of php and sass files, and you’re compiling new versions of min’d files with grunt. IE: you’ve got a lot of changes brewing. What’s going to happen when you’re “done” and you try and merge back into master? If the rest of the team has been working on those same files, you know exactly what’s going to happen:   you’re going to spend Friday night crying and resolving approximately 75 massive conflicts. But mostly you’ll be crying.

If you’re still at the place where you’re crying and resolving conflicts all the time, you’ve missed a huge PRO TIP that took me ages to catch on to.

Let’s say the responsive work takes you 4 days. So you’ve not merged into master in 4 days — and a lot has happened since then. If you go to merge into master at this stage, it’s going to be an absolute nightmare. But what if you merge master into feature/new-responsive-site before you merge your branch into master? Here’s an even better question:  what if you merge master into feature/new-responsive-site every day? What about two or three times a day?

What happens is: you stop crying, and stop fixing (most of the) conflicts.


If you regularly (at least daily) merge master into your feature branch you’ll be resolving waaay less conflicts, and you’ll be able to react to the new code that’s getting pushed to master. It puts you back in control with your feature instead of having to react to a whole bunch of stuff that’s happened in the last 4 days. You’ll still have conflicts for sure, but you’ll have way less of them, and you’ll be able to ping the other developer who just wrote the thing that conflicts with what you’ve written. So resolving these conflicts should take you far less time.

On some recent projects, I’ve been merging master into my feature branch all.the.time. Sometimes I’ll watch for another team member’s commit and pull that in right away if I know it’s coming in contact with my code.

So that’s it. Not a huge-huge thing, but definitely a lightbulb moment that I had this year, and that I definitely didn’t see out there when I was just learning Git. Start using it, it’ll definitely save you a bunch of tears and time.

ps: To pre-empt the:  “Are you sure this is a good idea?”.   Yep it’s a good idea. If you’ve branched off master, there’s nothing in your feature branch that shouldn’t be there, so you’re gold to start with. If you merge master back into your feature you’re getting all that sweet-sweet code that your team members have been working on. Here’s the trick: there’s no risk there because that code that your team members have added to master is ready for production, so it will definitely be merged with your code eventually anyway. Why not just go ahead and do it now?

A movable car

As I type this post, I’m staring out of my office window at my car. It’s sitting there in its parking spot, sad and alone, where it will spend all of the rest of the day and night, before being summoned to do a quick 25 minute daycare run tomorrow morning. It will then sit in that same parking spot for another 23 hours and 35 minutes until the next time it has to go across town to drop Jack at daycare.

Some days I use the car more than that, but more often than not, the car will sit idly by all those hours—roughly 98% of the day. On a busy week, let’s say I drive the car for 1 hour each day — that’s still leaving it idle 95% of the time. Given how much it costs to buy, insure, and fuel this thing, that’s an absurdly low use-rate.

Let’s look at the costs:

  1. I bought the car used with 100,000km for $8,000, including taxes and licensing.
  2. Since this is our second car, insurance costs an additional $200 on top of the $160 it used to cost us when we had just one car
  3. I only drive this car for about 25-35 minutes a day during the week, so I pay about $50 every two weeks for gas

For those without a calculator on hand, that’s $8,000 up front, and a guaranteed $300 per month. Because it has 100,000km on it, I pay for maintenance regularly, as well as for snow tires, for oil changes, and for that weird burning smell I discovered last month (rear brake callipers ( “just” $350 because my mechanic works for cash )). Forgetting the $8,000 up front cost, the average cost of owning this car since I bought it is $405.

Just read that last sentence again. I pay $405 a month—forgetting the $8,000 hole in my bank account—for something that I use just 2% of the time. What a colossal waste.

There has to be a better way

Google’s self-driving car, and Apple’s yet-to-be-announced-whatever-it-is really excite me. The idea that one day, we’ll be able to just call a car the way we now call a cab and have it delivered to our door is really, really exciting. But there has to be something we can do in the meantime.

I need my car for that 23-35 minutes per day at roughly the same time to bring Jack to daycare. Outside of that, I’m completely flexible about when I’ll need it. Some days the car won’t move at all, while other days I might run out at to the bank, or meet some for lunch. All of these “extra” trips in the car are completely predictable and flexible. If I don’t have the car today, I just won’t go out. I can wait until my wife gets home with the other car if something needs to be picked up. See? Completely flexible. There simply has to be a better way to utilize this extremely expensive asset.

Here’s the pro/con consideration list:


  • Shared cost for an expensive asset
  • Lower insurance rates(?)
  • Shared maintenance costs (somehow?)
  • Car availabilty: my car is available for someone else to use almost all day on weekdays and literally all day on Saturdays and Sundays.


  • More expensive insurance?
  • How would you get to your car if it weren’t at home?
  • How would someone get to your home to pickup the car?
  • How would maintenance costs work? Fuel?
  • How would ownership work?

It seems like the number of participants for critical mass here is low. From what I’m thinking, you need:

  • 3-4 participants with cars, maybe 15-20ish participants total (so, 3-4 cars for 15-20 people)
  • A shuttle for getting people to cars
  • Shared insurance rates (somehow!)
  • Shared maintenance (somehow!)
  • Shared up front vehicle cost (somehow!)

Ugg. So many questions. When I started this post I was convinced it wasn’t that difficult. Maybe I was wrong =)   In any case, there simply has to be a better way to handle vehicle ownership — especially second vehicles — than we currently do. Utilizing an $8,000 + $400/mo asset at just 2-5% is about as absurd as it gets.

Come on, future!

That time I hated my job


Man on honeymoon, thinking about work.


The guy in the photo above is on his honeymoon. He’s taking the train just outside Naples, about to spend the day walking around the ruins at Pompeii. He’s isn’t thinking about Pompeii though, nor his honeymoon, nor his beautiful wife in the seat across from him. He’s thinking about work. The guy in the photo is me, about 5 years ago. 

It’s been about 4 years now since I left the job I hated (with the fire of a thousand, blazing suns).

I’ve only ever talked about it with my closest family members, and even my closest friends probably don’t really know the extent of the burning hatred. It’s taken me most of those 4 years to realize it, but I didn’t just have a burning hatred back then – what I really had was very likely some kind of mild depression. Given that today is Bell Let’s Talk day, maybe it’s a good time to…well….talk about it.

Let’s start at the beginning.

About 7 or 8 years ago, I began working in health care — on the computer side of things, not on the people side of things, of course. It seemed like a great opportunity, and although I knew almost nothing about what I was getting myself into, I knew that I was a quick study, and was sure I’d be ok after a few months. Skill-wise, I certainly think this was the case: I soaked up the massive amount of information swirling around me like a sponge, and within the first 6 months to a year, I was able to at least speaking the language, and able to do what was required of me.

Even early on, as expected, it was a pretty stressful time. A brand new job, in a brand new environment, with whole swaths of brand new information and processes and completely foreign things to learn. Imagine yourself starting work today for a department in a hospital. Imagine all the things you’d need to know! Normally, this wouldn’t have bothered me at all — having a whole new set of things to learn and discover is precisely what gives me energy and enthusiasm.

Trouble was, I wasn’t feeling any of this energy and enthusiasm. Trouble was, I was getting more and more stressed and anxious every single day.

In fact, everyone around me seemed much the same. It felt like the water coolers were filled with liquid malaise, that we all drank thirstily from. No one around me seemed hopeful — no one talked positively. It wasn’t long before I felt the same.

I don’t want to get too much into the specifics of what caused all of this, because I’m not sure that would be useful in a general sense. Discontent is personal, and reasons for which will vary from workplace to workplace. But suffice to say that in my circumstance, the combination of several grotesquely awful managers and an overall poor fit were what contributed to how I felt.

So how bad did it get?

Oh, it was bad. I can’t even imagine what it must have been like to live with me back then. Every single day, I’d burst through the door and “regale” my wife with stories of the day’s atrocities — of exchanges with my manager(s), of terrible email’s I’d gotten, of nasty, threatening voicemails I’d received. Every day — literally every single work day — I’d walk through the door seething. My heart would be racing, my blood pressure would be up. Every day!  I must have exhausted her.

At work, I’d often stare at the phone, wondering when it was going to ring. I had so much anxiety around getting new email, that I would only open Outlook for certain periods of the day. Not that it helped much – my manager would usually send off an email, and followup with a phone call to ensure I’d gotten the message.

At quittin’ time, I’d normally get a phone call from that same manager— at precisely 5:00 (no doubt to make sure that I stayed till the end of the day) to help really set me off before I left for the day.  Most evenings I’d walk slowly across the parking lot to my car, trying to take deep breaths. Desperately trying to shake it all off before I got home.

You don’t just hate your job

There comes a point where you no longer just hate your job. You certainly can “just” hate your job — and many make a career of that — but I was well past that stage. I just didn’t know it. Looking back now, I was completely and utterly depressed. By year 4, I was waking up in the middle of most nights—sweating, my jaw and fists clenched, my heart racing.

In the evenings, all I could think about was going back tomorrow. On the weekends, the sense of dread for Monday morning overshadowed everything else that happened. And none of this occurred as a sideline in my brain. When I say “I was thinking about work”, I mean I was literally obsessed with thoughts about work. No amount of joy could come in and wash away that obsession. Spending time with my family couldn’t, being out dancing and partying on Friday night couldn’t, a wedding and an incredible European honeymoon couldn’t. There was literally nothing in the world that could overpower that obsession.

Even writing that last paragraph gives me a new understanding of depression. I guess I’ve never thought about it that way before. It’s truly all-encompassing. It’s an infinitely deep and wide ocean of despair, and you just can’t swim out of it.

A false bottom

You often hear about people hitting bottom in circumstances like these. They find themselves at the end of a marriage, or they start gambling or drinking or some other, visible sign appears before them to say that things have gone off the rails. I don’t recall having one of these moments. I remember at times thinking — “Surely, this is the bottom?” — but it wouldn’t be. I would actually see many different bottoms before things started looking up. I do remember a few of them:

I remember sitting down for lunch one day over a bowl of chilli with good friend and just talking like a mad-man. I just spewed everything I had in me. I still remember the look on his face — a look of confusion and sympathy and helplessness. I’d said so much, that he had no idea where to even start. My despair was so deeply rooted by then that I don’t know what he could have done if he’d tried. Looking back on this now, I should have asked him for help.

I remember another day, having a normal conversation with an older friend and mentor when he asked my how work was going. I remember staring blankly at him for a few moments, before saying— “I don’t know”. I remember that exact moment so vividly, it’s like it just happened. I stood there, tears coming down my face, and I just said — “I have to go”. I didn’t even know where to start to open up. He would have been the perfect person to talk to about all this, but I was just too ashamed to even get into it. Again, looking back on this now, I should have asked him for help.

The bottom that still stings the very most, is around the time I got married. I still remember being in the church on our wedding day, thinking about work. I remember the first day of our honeymoon, walking around the canals in Venice, thinking about work. I remember the joy-killing numbness I felt through all that time, and it still really gets to me. I remember my wife asking me “whatcha thinking about” a few times when she must have noticed I wasn’t present, and me lying about it.

The last bottom I’ll share came one day as I was walking across the parking lot to my car, where taxi cabs park along the perimeter, waiting for fares. I walked past these same taxis day after day, and this one day I just remember thinking that at least I’ll be able to drive a cab. At least I can still sit in a car and drive it.

See, the trouble with depression isn’t just that it affects the immediate circumstances you’re in, it affects your very core. After 4 years, I didn’t just think I couldn’t do this job, I was convinced that I couldn’t do any job. I truly believed that I was about as close as you could get to unemployable.

Save the middle for last

I haven’t yet mentioned the turning point in this story. Finally getting a new job was obviously the biggest turning point, but there was a moment in the middle where things really turned around for me. After many months and months of what was really borderline harassment from one of my managers, I decided I had to do something about it. I combed through my emails and voicemails and memories of all meetings and 1-on-1s I’d had over the past while, and constructed a trail of awfulness that I took to a meeting I’d scheduled with an HR representative. The HR person was nice, and sympathetic — she took notes, asked me questions about the things I was telling her. In the end, she said she’d review the notes with her manager, and she gave me the name and number of someone to call.

That someone-to-call was someone with the Employee Assistance Program — a program I knew literally nothing about. So I gave her a call, and got together and we talked about pretty much the same stuff that I’d talked to the HR representative about. When that meeting was over, she also gave me a name and number of someone to call—Pat. So I called Pat and we got together.

I’ll never forget sitting in Pat’s waiting room and looking at the name plate on her door — Pat R., Psychologist. I vividly remember the shock of seeing that. I thought — I’m not crazy! I don’t need a psychologist! — but in fact a psychologist is precisely what I needed. Within about 10 minutes of our first meeting she’d assured me that I was not in fact worthless and crazy, but rather that I was simply in an ill-fitting work circumstance that seems to have clouded over all other aspects of my life.

By our 3rd or 4th meeting (of 6), we were well on our way towards figuring out what I’d actually like to do with my life, as well as putting together some concrete plans towards setting a quit date, and moving on. After so long, I was unable to make any sense of the predicament I was in, and truly felt helpless to climb out of it on my own. But she saw the issues at hand as completely normal and linear and escapable.

Why am I telling you all this?

I always knew I’d get out of that job. It took me almost 2 years of very active job searching and intense misery, but I knew I’d either find a new job somewhere else or just snap one day and quit. But there are people out there who don’t even have this faint glimmer of hope to look to. Almost all of my co-workers at the time would fall into this category.

I’ve told you all this to get to the one, simple lesson I’ve learned from it all: you need to talk about it. You need to be open about it. You need to reach out. If you’re finding that people aren’t helping you, reach out further. Keep talking, keep telling your story. I guarantee you will eventually find someone who can help you — and the day you do, it will be like you’ve won the lottery.

Even writing that sounds so cliche and meaningless, but it’s hard to put it any other way. The day I truly opened up about how I felt — to someone who was skilled and experienced enough to help — was the day things took a 180. I can pinpoint that very moment as the one where I started to turn things around.

I just wanted to say that I’m mostly normal guy. I haven’t struggled with mental health issues all my life. I haven’t been diagnosed with anything. I’ve never taken a single drug to help combat any imbalance. I never even talked to my doctor during that time. For all those long 4 years, I was trying to convince myself that it was just a bad job and it would all go away when I left it. I thought that it was just a bad job or a bad manager or bad circumstances or whatever else. But the honest and obvious truth of the matter is that I was depressed, and I did almost nothing to help myself during that time.

Finally, if any of the above sounds like you and your situation, you really need to try and get help. If you feel this way going to work every single day, you need sort this out. You owe it to your spouse and to your kids and to your co-workers. Most of all, you owe it to your future self. Be honest about how you feel, and instead of being obsessed with your job, get obsessed with finding someone who can help.

Thanks for listening — and good luck out there.

Happy #BellLetsTalk day.

Chrome shortcuts

It occurred to me today that I use a lot of shortcuts. In almost every program I use, I have an ingrained set of shortcuts for doing a million micro-actions. The ones I use in Chrome would probably be the most benefit for anyone else, so here they are:

  1. Inspect elementcmd+shift+c
  2. Open dev tools window, then open console: cmd+shift+c or cmd+option+i, then esc
  3. Reopen your last-closed tabcmd+shift+t
  4. Move between tabscmd+option+left/right
  5. Select the address barcmd+L
  6. Duplicate current tabcmd+L (to select address bar), cmd+return to duplicate tab

Every year, usually around major Apple Keynotes, I promise to give Safari another try. But I never last more than a few hours. These shortcuts are so second nature now, and I use them so often, that it’s almost impossible to do without. I especially love love love #3 and #6.

What are your favourites?

Update — I just realized that I published almost this exact same list about 3 years ago! Seems I really do love shortcuts.

A year of eReading

With just one exception, all the books I read in 2014 were ebooks. I was a very late convert, but I really see the appeal now. Having an unlimited number of books at your fingertips is incredibly handy, and should mean that you’re never without something good to read. Here’s some of my preferences that have emerged over this first year:


I’ve read books on my iPhone, several different iPads, a 10″ Samsung tablet, my MacBook, an old, old original Kindle Fire and currently (and mostly) my Nexus 7. I got the Nexus for my birthday in July, so I’ve spent about half the year with that. It’s a truly terrible device if you compare it with an iPad, but it isn’t too bad overall for reading and light usage otherwise. It has a strange lagginess that makes it infuriating to use beyond any light web browsing, but is overall great for reading books. The screen is bright and thankfully “retina”, so on the plus side it’s a beauty to look at, if not use.

I’ve surprisingly been fairly happy overall when reading on all of these devices. Everything from the iPhone to the laptop — given the right (compelling) book — has proven great for reading. I thought the 10″ Samsung and the iPad 4 were going to be too big to read on, but they definitely weren’t. I just had to change the margins and I was basically back to the same line-width that I was used to on all my other devices.

Overall, the Nexus 7 has been both the best and worst device. It’s so frustrating to use for most things other than reading, but this has a beneficial side effect of me using it just for reading, hence I read more. So I’d call that an overall win.

The one device I’ve never used is an actual eReader — a Kindle or Kobo. I’ve played with them, but I’ve never read a full book on one. I’d love to borrow one and compare. The ones I’ve seen though have been slow, laggy, jaggy and pixely, so I’m not really too excited about them.

Essential Features

After reading 20+ books on an eReader, you come to require certain features:

Almost infinite adjustability. I need to be able to adjust the line-height, font, font size, background colour and margins. I tend to get very frustrated in readers where I can’t do all these. I’m looking at you iBooks. I’m actually trying to take a screenshot of the reading app on my Nexus 7 right now to show you what my settings are, but it won’t work. See? Infuriating.

Scroll. I read using scroll instead of hard page turns. No idea why really, but I like to read this way. It’s not an absolute must, but it is my preference. I’ve yet to find an eReading app that does this on iOS, and I use Moon+ Reader on Android.  Despite random, weird and frustrating issues, Moon+ is my favourite reader at the moment. If you know of an iOS equivalent, please let me know.

Multi-device. Whenever possible I buy and download ePub versions of ebooks. I save the file to my dropbox and sync it across all of my devices. I may only read a few pages of a book on my phone, but when I’m waiting at the doctor’s office or somewhere, it’s really handy to have it with me.

Variable adjustment backlighting. I’m always adjusting the level of backlighting on my tablet. In different rooms, different times in the day, and when I read in bed, I turn it down extra low. I’ve seen older eReaders with actual lights (not backlight) that have 2-3 dimness settings. I don’t think this would cut it for me. I’d always want a setting in between.


If I could design my own eReader today, it would have all of these essential features:

  1. Easily adjustable backlighting
  2. Automatic syncing of all books across all devices. Likely Dropbox-powered
  3. Retina eInk (absurd I know, but still)
  4. Text adjustability as described above
  5. Scroll mode
  6. A web browser for looking things up

That last one is what keeps me from getting a Kindle or Kobo. I read Into Thin Air last week, and spend as much time reading as I did googling maps and photos. Having a tablet as an eReader is a double-edged sword: I have access to everything I need on one device, but I also have the infinite distractibility that comes with it. Having Twitter and Gmail installed on my Nexus, means I’m constantly fighting the urge to just check in for a second. I recognize that I could just uninstall these, of course. Maybe just having a Wikipedia browser would be enough for me. Who knows.

Overall, eReading has meant that I’ve read way more in 2014 than in the last few years. Though not without all kinds of issues, the Nexus 7 has proven a decent companion.

Reading Experience

The one area where I’d really like a meaningful experience boost is in actual reading. I tend to do almost all of my reading horizontally — in bed, in the bath, on the couch, etc. Holding up a tablet — even one as light as a Nexus — while lying down is a pain. I tend to prop the tablet up on my chest while I read, which causes my eyes to strain, so I’m really looking for a solution here. If I could invent some kind of magical tablet holder that worked in bed, I’d be rich. Stay tuned for prototypes.

Finally, I’d be remiss without a few recommendations. The best book I read last year was hands-down Middlesex. It’s impossibly good. So clever, so funny. Extremely well tied-together. After that, The Headmaster’s Wager was also exceptional. It took me a while to get into, but it’s well worth it for the devastating twist.

Happy reading!

Postscript: This year, I also tried Spritz, though it really just doesn’t do it for me. I’ve also listened to a few audiobooks, all of which, without exception, have made for a dreadful reading experience.