Google engineer: What I learned in the war

Google's Dan Cross in Afghanistan Credit: U.S. Marine Corps

Veteran’s Day is an ideal time to hear from one of those rare folks who combine corporate and military careers. Dan Cross, a software engineer at Google and a 1st Lieutenant in the U.S. Marine Corps, took a leave to serve active duty in Afghanistan, came home a year ago, and brought back lessons that he couldn’t have learned in business. While he had never seen himself as the military type until a personal tragedy made him reroute his career, he’s a better man for it. Cross, 34, is now an active member of the Google Veterans Network (VetNet), a community of some 400 veterans and other Googlers who support these remarkable people. Here’s Cross on what he learned in the war:

I was a student at Columbia University, with a couple of jobs under my belt, when the world changed. I happened to be downtown on the morning of September 11th and saw the Towers fall.

While I didn’t lose any loved ones that day, like many others, I felt personally affected by the tragedy–especially because my brother David was a Marine helicopter pilot at the time. I was a long-haired, skateboarding 14-year-old when David, my only sibling, joined the Marines. Over the years, my brother described life in the service, and while I loved his stories, being a Marine didn’t seem like the path for me.

On January 22, 2003, David was flying an anti-drug mission along the U.S./Mexican border in South Texas when his Cobra attack helicopter went down in a mid-air collision. Everybody–four Marines in two helicopters–died.

I never considered a military career until my brother’s death. But I was really moved by the way the Marine Corps conducted his funeral. Members of David’s squadron came from all over, and it was impossible to ignore the bond they had. I wanted to know more about what linked these Marines–what compelled them to come from all corners of the country to commemorate one of their own. I also thought back to September 11. I wanted to find a way to make a difference and protect the ones I love. So I enlisted in the Reserves. I was 26.

My life as a recruit was regimented. Boot camp was the most painful 13 weeks of my life, but I suffered it out, graduated and earned the title “Marine.” I went on to Marine Combat Training in North Carolina and then to the Marine Corps Communications Electronics School in California’s Mojave desert. Fifteen months after stepping off the bus on Parris Island, I returned to New York, to Columbia and to student life. I served with the Marines one weekend a month and during two-week sprints in the summer.

I decided to become an officer, and just as I was wrapping up at Columbia and preparing for Officer Candidate School, my civilian life changed. Google called me, out of the blue. A recruiter had spotted my resume on my personal website and brought me in for an interview. They offered me a job as a Site Reliability Engineer at Google New York. For a software engineer, a job offer from Google was equivalent to an invitation to Disneyland. “Can you be flexible?” I asked the Google recruiter, thinking of my military commitments. “Yeah, sure,” she told me.

She was not kidding. Google hired me in January 2007. I worked eight months, and by fall I was off for 15 months of Marine Corps officer training. Google had me back again for practically all of 2009 (and VetNet, the employee resource group for Google veterans, helped me enormously to reacclimate and catch up). Then I received activation orders to report for duty in Afghanistan, to help train the Afghan National Army (ANA) to take over after the withdrawal of U.S. troops. This, I knew, would be a far cry from my life at Google.

I spent seven months in Helmand Province in southern Afghanistan. And I learned two big lessons that have stuck with me.

The first is patience. Afghan culture is incredibly civilized. When you meet someone, they want to assess you and understand where you come from. In the U.S., people jump on the phone and profess to know each other after 15 minutes. In Afghanistan, new acquaintances drink chai, talk for a few hours and gradually learn about each other’s family and personal history. This was quite an adjustment, especially for a Marine, as we have a bias toward action. While we did have some cultural immersion training, like so many things in life, nothing can really prepare you until you see it.

The second lesson I learned is acceptance. There’s a misconception about the military–that it strips away individuality. Not true. In fact, teamwork is all about accepting diversity. And I’ve never seen so much diversity as in Afghanistan. Our “embedded partnering team” was all men (since there are no women in the ANA). But it was a mix of guys with a broad range of backgrounds. Our team leader was born and raised in Bolivia and moved to the U.S. as a teenager, enlisted, and later became an officer. “Hey, Google!” he called me.

I learned to accept people for who they are. And I realized that they’re not necessarily going to do things the way you might expect–or advise. You don’t tell a Marine to “take that box from point A to point B by picking it up….” The military is way less concerned with how you move the box, as long as it gets moved. Instead, you train your Marines to make good decisions, act morally and do the right thing–as best they can given the circumstances and their knowledge at the time. You offer feedback and train again–lather, rinse, repeat. And you certainly can’t tell the Afghans to do things the way we would. They’re going to do things their own way–the way that works for them. After all, it is their country.

Returning to Google last fall was quite a transition. Suddenly, the only person I had to worry about was myself. I was writing code again, not running convoys. And I wasn’t a mission commander, so I had to retrain myself on how to interact with my peers. Fortunately, VetNet was there once again to back me up and help me learn to fit in again. And it helped that I was getting paid to do what I love. I thought, “Wow, this is the greatest thing in the world: I get to write software all day…with free lunch!”

Afghanistan made me understand the value of teamwork and how individual contributions fit into a larger picture. My time there also made me wonder whether I can and should do more at Google than produce code. Recently, I’ve been talking with my manager about how I can share my experiences and lessons with managers across the company. This is what we do in the military–why not try it at home?

Related stories:

Dual-career professionals who have served military duty in Afghanistan and Iraq

Leaving the military? Job prospects are better than you think

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.