Engineering Values, part 2: Mindful Collaboration

Previously on the blog…

This is the second in a series of blog posts exploring the values held by our Engineering department, and how we put them into practice. As a refresher, our Engineering department’s values, in no particular order, are:

  • Sustainability
  • Mindful Collaboration
  • Data-Driven Approach
  • Shipping Software
  • Diversity & Inclusion
  • Learning & Innovation

In the previous post, I went into detail about the value of sustainability. Today I talk about mindful collaboration.

Value: Mindful Collaboration

At first glance, mindful collaboration may seem like a squishy subject that has little to do with software development. But in reality, the opposite is true: we are humans working together to build something we care about. Collaboration is a key feature of a successful company. (Company, after all, literally means multiple people gathered together.) So when we talk about mindful collaboration, we’re talking about building a culture and environment that is optimized for humans working together.

Specifically, this is what mindful collaboration means for Engineering at Omada Health:

  • Leading with empathy
  • Minimization of ego
  • Proactively asking for feedback
  • Having clear expectations

Putting it into practice

Probably the most important characteristic in mindful collaboration is empathy. No matter what we do, we must always consider the needs of other people: our teammates, our stakeholders, our target audience. When my team makes decisions, we must consider the impact of those decisions on other teams. Will there be any side effects? What assumptions and expectations are there about what our team works on? What don’t we know, that other teams might, about something we’re about to do?

We must understand that there will always be tension between requirements, available resources, and time. This often manifests as tension between developers and stakeholders. I believe this tension is healthy: it pushes us outside our comfort zones, which is how we grow as human beings, and it makes us question our assumptions, which helps us better understand each other.

To be an effective collaborator requires awareness of one’s ego, and the ability to set it aside. Doing so enables us to receive constructive feedback without taking it as a personal attack, and to participate in blameless postmortems. It allows us the freedom to acknowledge how we showed up to a meeting or a pairing session: maybe I wasn’t entirely present because I have a lot on my mind, or maybe I was more defensive in a conversation than I intended to be.

In addition to receiving constructive feedback, mindful collaboration includes proactively soliciting feedback, and graciously receiving it. This can happen anywhere: in team retrospective meetings, one-on-one conversations, formal feedback tools, or even in ad hoc hallway conversations. It can be as simple as asking, “Is there something I could have done a little better?” We find our retrospective meetings to be a good forum for this kind of feedback, especially when it comes to finding ways to improve our processes.

Empathy and a proactive feedback culture—one in which feedback is offered in a continuous cycle, in varying forms—allow us to engage in spirited debate, particularly when arguments are backed by data (more on this in a later post!).

When we work together as a team, and especially when multiple teams work together, it is key to set clear expectations of everyone involved. What are we trying to accomplish? By when? We ensure clear communication of expectations by clearly documenting requirements and acceptance criteria as early as possible—and regularly coming back to this documentation as we work on features, to check in on how we’re doing relative to the expectations we set at the start.

This often applies to meetings, as well. When I am running a meeting, I like to build an agenda before it starts. This helps me identify what I hope to get out of it, and will help keep it from going off the rails. (Everyone’s time is valuable.) During the meeting, I ask questions—and encourage others to ask questions—when things are unclear. At the end, if applicable, I run through the conclusions reached during the meeting, so that everyone is on the same page. This also helps ensure that I heard everyone correctly.

What have we learned? How have we benefited?

Doing this effectively, on an ongoing basis, is hard! Mindful collaboration requires mutual trust and a willingness to be vulnerable, on the part of everyone involved. It can feel awkward. It takes practice and reflection, performed in cycles, to get it right.

When we get it right, though, it is awesome. It leads to better function across teams. It helps teams identify potential problems early. Maybe that means a change in direction, or maybe it just means the affected teams have more time to prepare. Either way, everyone has benefited! Moreover, proactively looking for potential effects on other teams builds their trust in my team.

Mindful collaboration requires effective communication, and that needs to take multiple forms, and usually involves some amount of repetition. We’ll often see the same message communicated through both Slack and email, because not everyone uses both. Then there are the tools we use for things like project management, issue tracking, documentation, and so on. Even sticky notes can be effective. And there’s rarely a substitute for face-to-face communication.

The biggest benefit by far is the way it produces an inclusive work environment. When people feel valued, they’re happier. And when people are happier, they’re willing to invest more of themselves in their work. That feeling comes through in the office culture, which makes people want to stick around. And who wouldn’t prefer to work in an environment where their colleagues actively want to be there?

Conclusion

Mindfulness is difficult, and collaboration can be difficult, so it stands to reason that mindful collaboration poses a challenge. It’s complicated, it’s messy, and it takes practice. A lot of practice. But the benefits are so worth the effort: improved cross-team communication and function; a greater feeling of ownership and investment; happier teams; and a more inclusive environment. A team that works well together is a team that will last.

Engineering Values, part 1: Sustainability

At Omada Health, we have a set of values that guide everything we do as a company. This post, however, is not about our company values, but the values held by our Engineering department. These are the principles that drive the work we do as software developers, data scientists, and infrastructure architects. These values are the product of brainstorming by the management team, and were given shape by input and healthy debate across the entire department. (As with any exercise in identifying guiding principles, there was very little that was clear and obvious from the get-go.)

Our Engineering Department’s values, in no particular order, are:

  • Sustainability
  • Data-Driven Approach
  • Mindful Collaboration
  • Shipping Software
  • Diversity & Inclusion
  • Learning & Innovation

Today’s post concerns the first of those, and future posts will go into detail on the others.

Value: Sustainability

When we talk about sustainability, we aren’t referring to ecology or economics, so I’m not going to talk about renewable energy or fair-trade crops. For us, sustainability means pacing ourselves, thinking about the future without losing sight of present needs, and remembering that professional software development is a marathon, not a sprint.

As it applies to Engineering at Omada Health, sustainability means, among other things:

  • Preventing turnover
  • Avoiding knowledge silos
  • Shipping quality, well-tested code
  • Having a strong relationship with our Product teams

Putting it into practice

We’ve put this value into practice in a number of ways, whether it’s promoting a healthy work-life balance, practicing pair programming (it’s our default mode of operation), or taking the time to refactor old code. We practice test-driven and behavior-driven development (TDD and BDD), which we combine with comprehensive monitoring of key performance indicators (KPIs) and system health, to help surface anomalies and outages as quickly as possible.

In service of sustainability, we practice some tenets of Agile software development. The principles that are most important to us:

  • Starting simple and improving iteratively
  • Continuous delivery of working software
  • Being responsive to changing requirements and circumstances, especially when they are beyond our control
  • Allowing our teams to organize and run themselves
  • Face-to-face communication
  • Close alignment between the Product and Engineering teams
  • Regular retrospective meetings to reflect on, and make adjustments to, team processes

How does practicing sustainability help us?

First and foremost: teams made up of happy people are more productive. (Who knew?!) Through promoting a healthy work-life balance, reasonable working hours, a culture of inclusion (more on that in a future post), and building and nurturing cohesive teams, our people enjoy coming to work, and they are motivated to make Omada Health a leader in helping people live free of chronic disease.

On the more technical side, we know from experience that keeping things simple is challenging. How do we decide what needs to be included in an MVP, and what can be added in a later iteration? How do we identify what we need to do now, what we’ll definitely need in the future, and what we might need later on? Answering these questions requires a firm understanding of the problems we’re trying to solve, and putting those answers into practice requires buy-in from stakeholders. (Then there’s the question of identifying your stakeholders!)

Of course, we want the software we build to last. TDD, BDD, and pair programming are effective ways of preventing knowledge silos, documenting expected behavior, and getting input from multiple people. What’s more, we encourage everyone to include refactors of old code if it gets touched through the course of writing new code. And taking the time to do refactors now will make twelve-months-from-now you very happy.

Lastly, doing all these things is impossible if the relationship between the Product and Engineering teams is broken or lacking in trust. We encourage a healthy relationship between Product and Engineering by ensuring that they are constantly working closely together, and always able to communicate. Whether that’s in daily stand-ups, planning sessions, retrospectives, or ad-hoc conversations, the key is open, honest, and clear communication.

Conclusion

At the end of the day, we like feeling proud of the work we do. We want our work to have a profound and lasting impact on the lives of our participants. The surest way to ensure that our work will endure is to practice sustainability across the board, every day.


Reference: 12 Principles Behind the Agile Manifesto

Swift 3 Migration

In March, the iOS team at Omada Health began the process of migrating our app’s Swift code from Swift 2.3 to Swift 3. This was a large undertaking for a small team, and we would like to share some of the strategies used and the lessons we learned.

Why to migrate to Swift 3?

Our app was initially written in Objective C, and added Swift early on. By the summer of 2016, most new code was being written in Swift, although there is a considerable amount of Objective C remaining. We chose to postpone adopting Swift 3 for a few reasons: competing priorities, memories of the problems faced moving to Swift 2, and dependencies on libraries that had not yet released versions compatible with Swift 3.

However, as time when on we were aware that delaying migration would mean more problems later. Every line of Swift 2 code added would have to be converted. Many libraries and tools added support for Swift 3 and began dropping support for Swift 2. New releases of Xcode would no longer support Swift 2 at all, including the current release of Xcode. Delaying the migration only meant more Swift 2 code to convert.

Swift 3 Advantages

We would defer to other blogs and resources about more details on Swift 3. For us here is what was more important:

  1. More readable code
  2. Function named parameters

return Weight.humanValueStringForWeightValue(weightValue, includeSuffix: true)
return OPWeight.humanValueString(forWeight: weightValue, includeSuffix: true)
1. Lower cased enums
1. Use Date for bridging from NSDate, as it now can include timezone
1. Date is Comparable
1. is a value type, can be constant
2. Better tooling
3. Faster compiler
4. Able to use Struct on stack instead of Classes on heap
5. 77% size improvement for build product

See more on Swift evolution:
https://github.com/apple/swift-evolution

specifically NS Foundation migration: https://github.com/apple/swift-evolution/blob/master/proposals/0086-drop-foundation-ns.md

How we did it

The most basic approach might have been to simply update our libraries to Swift 3 versions, run Apple’s conversion tool on our project, fix errors left by the conversion tool until everything compiles, and then spend some amount of time manually testing the app to make sure we haven’t introduced bugs. We also considered hiring outside contractors to do the conversion.

We decided against this for several reasons. At Omada our engineering team has been strongly influenced by Extreme programming, a type of agile software development, and we prefer short development cycles and frequent releases. We wanted to avoid having our app in a broken, unreleasable state for an unknown length of time. We also wanted to continually monitor our progress and estimate how much work was remaining. And we don’t have a dedicated QA team to find all the bugs. We use a Jenkins server as our continuous integration system to run tests on every checkin.

Gradual Approach

We wanted to have an incremental approach to use tests to help us with the conversion, and we wanted to take advantage of Swift 3 improvements to improve the code while minimizing the scope and risk of change.

We prepared for the migration by adding a basic suite of acceptance tests. These tests are written using KIF to simulate user interactions with the app running against a development api server. This app had been tested in this way before but the previous developers abandoned those tests after they became too brittle and difficult to maintain. Our new tests were very basic, mostly just navigating to the major screens and making sure the app does not crash. With just a few tests we were able to cover about 20% of our code. This complemented a suite of around 1500 unit tests, and would let us sanity check our converted code even before we finished converting the unit tests.

We spiked on converting a few classes to Swift 3 to get a sense of how fast we could convert them, and to learn what kinds of problems might come up. We added some code metrics reporting to our CI process, and were able to estimate that it would take 2 to 6 weeks to do the migration.

When we were ready to start the migration we began by creating a new dynamic framework, allowing us to break our large app down into 2 units:

  • A Swift-only framework with no dependencies on external libraries or the rest of our application, and no bridging headers.
  • The main app that loads our complied Swift framework and builds the rest of our Swift and Objective C code.

With no dependencies or bridging headers the Swift framework complied very fast, and changes to the main app would not require recompilation of the Swift framework. We created a spreadsheet listing all of the Swift files in our app, and a swift3 conversion branch of our git repo. Then we started moving one file at a time into the Swift framework beginning with the smallest most isolated classes, adjusting access control levels of the classes and methods and importing our framework as necessary. After each commit we rebased the swift3 branch on master, converted the moved code to Swift 3, and marked the progress on our spreadsheet.

Through this process we found a lot of dead code that we could just delete! We also found classes that were difficult to move because of their dependencies. Sometimes these classes could be easily refactored to break those dependencies. In other cases we just noted the problem on our spreadsheet and moved on to lower-hanging fruit. We made several passes over our list and it became easier to move more classes as their dependencies had been moved previously. We also began using more sophisticated dependency-breaking techniques. In some places we extracted new protocols that could be defined in our Swift framework and implemented in the main target. In other cases we could move most of a class to the Swift framework and create an extension in the main target.

For example if we had a ProgressViewModel that depends on a Participant for some data, and for whatever reason we don’t want to move Participant into our framework:

class Participant {

func firstName() -> String {
return "Matt"
}

func allWeights() -> [Double] {
return [210, 207, 208, 204, 201]
}
}

class ProgressViewModel {

let firstName: String
let weights: [Double]

init(participant: Participant) {
firstName = participant.firstName()
weights = participant.allWeights()
}
}

We might remove the dependency on Participant from the definition of ProgressViewModel so that it could be easily moved.

class ProgressViewModel {

let firstName: String
let weights: [Double]

init(firstName: String, weights: [Double]) {
self.firstName = firstName
self.weights = weights
}
}

Then we can add an extension of ProgressViewModel in the main app with a convenience initializer that maintains compatibility with our existing code:

import SwiftOmada

extension ProgressViewModel {
convenience init(participant: Participant) {
self.init(firstName: participant.firstName(), weights: participant.allWeights())
}
}

After a while we added an additional test target and began moving unit tests for some of the Swift framework’s classes into it, converting those tests to Swift 3 to ensure we learned about any difficulties we might encounter testing with Swift 3. We added a jenkins job to build those tests on every push to our Swift 3 branch.

We found this process to have a lot of benefits. We were always aware of how much work was left to do, and we could tell how much work we had accomplished which kept the migration from feeling like an endless slog. We felt confident that we were not introducing new bugs that we would have to hunt down later. We were also knew that it would be possible to interrupt our migration if there was an urgent need to release a bug fix.

As the migration project progressed it became harder to move individual Swift files into the new target. At this point we had around 60 Swift files with too many dependencies to deal with on their own. At this point we began looking for a different strategy.

Revised strategy

We tried using tools that generate charts to visualize the graph of our app’s dependencies. They mostly showed what we expected: a big, tangled ball at the center of our application. However there were several overlapping clusters, and we hoped that by cutting in the right places we could separate the ball into 5 or 6 manageable chunks. At that point we would remove all of the code from the main target and add back only what was required to launch the app. Then we would add one chunk at a time, converting each chunk to Swift 3 as we went.

Again we made a spreadsheet listing each file in our main target, which chunk it was a member of, and its status. We observed that these chunks were roughly related to the main view controllers of our app, and often these view controllers were passing objects to each other after being loaded from storyboards, during segues, etc. To address this we started using the dependency injection framework Swinject and its companion SwinjectStoryboard, which one of our developers had used successfully on previous projects. Swinject is used to define a container which can resolve dependencies, and SwinjectStoryboard hooks into the process of instantiating a view controller from a storyboard to provide it with the objects it needs.

import Swinject
import SwinjectStoryboard

extension SwinjectStoryboard {

class func setup() {

defaultContainer.register(UIApplicationAdapter.self) { r in
UIApplication.shared
}.inObjectScope(.container)
defaultContainer.register(OPLoginServiceAdapter.self) { r in
let service = OPLoginService()
service.analyticsService = r.resolve(OPAnalyticsServiceAdapter.self)!
return service
}.inObjectScope(.container)
...
defaultContainer.storyboardInitCompleted(OPProgressViewController.self) { r, c in
c.account = r.resolve(OPAccount.self)!
c.accountManager = r.resolve(OPAccountManagerAdapter.self)!
c.accountUpdater = r.resolve(AccountUpdaterAdapter.self)!
}
}

In other places we changed our classes to use key value coding to set properties and performSelector to invoke methods.

Along with dependency injection we used key value coding to access coupled properties that were too hard to separate. For example when one view controller sets properties for another one in prepare for segue method:

[self.personalViewController setValue:self.messageBus forKey:@"messageBus"];

or when one model needs to access deep a property of another

let someValue = model.value(forKeyPath:"list.property.leaf")

When we need to call a method that we do not want to import we use performSelector:

[account performSelector:@selector(updateMeals)];

Release

Once we finished converting all of the Swift code in our app to Swift 3, we made a new beta release with TestFlight and distributed it to our coworkers. We added a few small features and visible bug fixes with the Swift 3 migration to make it an interesting release for users. While we waited for feedback about the beta, we finished converting the remaining unit tests to Swift 3. After about a week we felt ready to release to the App Store.

Conclusion

Overall it took us 3 developers working full time for 4 weeks to convert roughly 35,000 lines, within our estimated 2-6 weeks work. Our release had a 5 star average review, up from a 4 star average for all previous releases. Our test coverage increased from 50% to 64%, and we learned more about how our code works and structure of the app.

Some technical improvements to our codebase:

  • Swift Framework: more modular design
  • Swift Unit Specs: Can be executed faster without loading the app.
  • Date() to expose bugs coming from the use NSDate without timezone and calendar. Required us to be explicit about Gregorian calendar and current timezone.
  • Open Source: We started to use open source libraries for dates and dependency injection (SwiftDate and Swinject)
  • Cleaner design: Remove monkey patched Foundation and UIKit dependencies. We had to add extensions to Date temporarily while migrating to keep compiler happy.
  • Multiple suites of tests helped us to verify the conversion and keep the existing quality
  1. Unit Specs – fast command line only
  2. Unit Tests – load the main app and UIKit
  3. Legacy Tests – for Objective-C code
  4. Acceptance Tests: a suite of UI tests connecting to the real server running locally in development mode

In hindsight our conversion process would have been easier if we had started the conversion sooner to have less code to convert, modularized the application and started using dependency injection earlier and more consistently.

To review the steps of conversion:

  1. Break down large app into 2 units: dynamic framework and the app.
  2. Create Swift only framework, no Objective-C to have faster compilation with no bridging headers
  3. Make the Main app load the compiled Swift framework and build with Objective-C and the rest of Swift code.
  4. Parallelize work for conversion
  5. Migrate into swift3 branch one class at a time, that compiles on Swift 3 into a framework. We used a Google Spreadsheet to list all Swift code with number of lines and assign it to a developer.
  6. Migrate Tests into Unit Specs to have tests passing validating the code converted
  7. Move more classes until it became too difficult.
  8. Build “naked” app by removing all Swift 2 classes, to build with with only Objective-C compilation linked to Swift 3 framework
  9. Break down dependencies using key value coding and selector strings
  10. Use dependency injection
  11. Re-add Swift classes to the main app as we migrate each one to Swift 3. Another Google Spreadsheet was used here to “divide and conquer” files between multiple developers.
  12. Estimate work by:
  13. Counting classes and lines of code
  14. Converting a few typical classes and tests

How to run an internship program

In a previous post, I explored how running an internship program can benefit the team (and the company) more dramatically than you might expect. Now that you’re totally bought into why interns are awesome, you’re probably wondering how you can run an effective internship program at your company.

How our internships work

Whether the internship is three, four, or six months long, an Omada engineering internship follows the same general format: join the team and pair with everyone, do a solo project for a spell, and then rejoin the team. We’ve had 13 engineering interns so far, and each came to Omada with a different amount of experience with our stack. Having them start with the team gives us a chance to share our practices with them, and dump a heap of knowledge on their heads while they learn their way around the codebase. The solo project then gives them a chance to integrate some of that knowledge, and code review helps us and them see what they are still struggling with. When the intern’s solo is over and they triumphantly return to the team, their growth is evident.

Interviewing

Since interns are short-term employees, they go through an abbreviated application process — first, they complete a coding challenge that has some failing tests, then a general-purpose phone screen with questions about their technical interests and what recent code they’ve written that they are excited about, followed by a remote or in-person pairing session working on a small technical problem.

You clearly aren’t hiring an intern for their experience, so you should have a clear idea about what you are hiring them for. At Omada, we look for interns that ask a lot of good questions, display curiosity about how we ship software, and who seem to be able to pick up new concepts fairly quickly. Algorithms and white boarding sessions wouldn’t give us nearly as much insight into how the candidates actually write software, so we happily avoid them. (As we do with our full-time candidates, as well. Whiteboarding interviews are terrible and people should stop doing them.)

Pairing

The biggest part of why we’re able to have an intern join the team and write production code immediately is that we do pair programming by default. Depending on the team, this can range from 40% to 90% pairing. Practicing our pairing skills with a junior developer makes us better pairs when we work with all of our teammates.

(Pair programming is where you have two keyboards, two mice, and one computer, and you take turns typing, and you work through the whole problem together. Pairing is not where you look over someone else’s shoulder when they get stuck, or whiteboarding architecture with a group of people, or working on similar code next to someone on separate computers.)

If your company does not currently have a pair programming practice, I wouldn’t recommend starting with pairing with your interns. Pairing across experience level is is a substantially different experience than pairing with an engineer more senior than you or at your level. It’s a skill not to hog the keyboard or go too fast when you’re on a roll, and properly get your pair’s buy-in for your idea when they know a lot less about the codebase than you. Sarah Mei has a great piece on precisely this problem, and you should read it!

(I do recommend you start pairing! Just with people at the same skill level, then later try to expert-mode that is junior/senior pairing.)

If you do pair, some of these things have helped us let our juniors drive more:
* Really doing TDD and ping-pong pairing it (avoiding spikes, where the junior can get lost)
* Having toys and other things for the senior to do with their hands to avoid typing
* Unplugging the senior’s keyboard!

It’s really hard not to grab the keyboard when you don’t know why the test is failing. As much as you can, resist the urge, and work through the mystery with the intern driving. You can do it!

Onboarding & Mentorship

Having regular interns keeps our onboarding processes in tip-top shape. We also make sure that the intern’s laptop is used for coding as soon as possible — usually on the first day, but definitely by the second day of their internship. When you’re pairing, it’s easy to use the machine that’s already set up, but that’s a trap! It’s important for the new person’s environment to be set up ASAP.

Interns are paired with more senior developers who act as a mentor during the internship, answering technical and non-technical questions. The intern’s mentor isn’t the only person who reviews their pull requests, but especially during the solo project, the mentor checks in regularly with the intern to make sure they’re on a reasonable path with their project. Regularly, in our case, has often meant a daily, scheduled check-in, otherwise it doesn’t happen often enough. Having time every day during the solo has helped us prevent our interns from going totally off the rails on their projects. (Of course, if they have questions during the day, they’re welcome to ask any member of the team. We haven’t yet had an issue with an intern asking too many questions.)

Solo Project

Omada engineering interns have a lot of say in what they build during their solo project. We’ve had some interns make tools that never got used (and they still learned things, which is valuable!), but we are especially excited when an intern can learn a lot while working on a project that is useful to the company. We’ve had especially good luck with having interns work directly with a product manager for their solo project, and letting them figure out what to build together.

If you’ve got an intern that really wants to work with a cool new technology that is completely unrelated to your current stack, I’d suggest gently reminding them that the value of their internship is not just in the code they write, but the process of working with your team. Trying out new tech is a great thing to do in your free time, when you don’t have the wealth of resources of a team and customers to build things for!

Code Review

Since we pair program, we don’t normally do code review via pull request. The exception to this is when any engineer is soloing, and so interns on solo projects submit pull requests that are reviewed by their mentor or another person on the team. Since the intern has already had at least a month of pairing with the team, they are usually moderately aware of our practices and style, so the feedback on each pull request isn’t starting-from-scratch education about how we write code at Omada.

If your company doesn’t pair program, you’ll probably want to start with a project that is somewhat less than business critical. It is important, though, that the intern is collaborating with other people at the company as much as any other engineer would. You’ll only reap the benefits of having interns around if they are fully integrated into your typical engineering processes and working on your actual codebase.

Hire them!

At the end of someone’s internship, if they’ve been awesome and we have an opening, we offer them a full-time position. This is an excellent way to further leverage the time investment we’ve made, but we still get a lot out of mentoring the interns that don’t end up in full-time positions.

At Omada, our interns have been fantastic teammates and many have stayed around in full-time positions. Having interns around regularly has helped us improve our communication skills, our codebases, and has really helped us increase the gender diversity on our teams.

(For more on why running an internship is incredibly valuable to the whole team, take a gander at this post.)

Internships: Good for the intern, great for the team

Hiring an intern is obviously beneficial to the intern: they get paid to learn to write better code, they get exposed to working with a team, and they get another line on their resume working toward being a supes profesh software engineer.

Less immediately obvious, though, is how great an intern can be for your team and your company. A good internship program provides an opportunity to look critically at your culture and your codebase to see where the weaknesses of both are.

(It’s unfortunately easy to run an internship program without learning from it, but if you set things up properly and ask the right questions, having an intern on your team will pay dividends beyond their comparatively cheap salary.)

I’ve talked to a lot of people about more and less successful internships they’ve had or witnessed. For the less succesful ones, the saddest part is when the company didn’t look at their process or their code to see what could have contributed to an unproductive internship. It’s easy to say “Oh, we just hired a bad intern”, but rarely is just the intern the problem.

An internship might feel like a test of a junior engineer’s abilities, but it’s moreso an audit of your team: how well do you communicate? How complex is your codebase? You will certainly teaching your intern things about programming, but they will show you the things that your team is totally rocking, and the things that you need to work on, both in code and in process.

Benefit #1: Code

We all have parts of our codebase that we know are a mess, that have weird old names due to quirks of history, that are fragile and no one wants to change a thing for fear of subtle bugs. But we get used to them. We have Stockholm syndrome with our codebases, and we’ve forgotten how silly (or terrible) things are.

We need to feel the pain of explaining to an intern why that model is named the way it is. Or asking them to hold the context of seven classes in their head to understand how this process works. (Having interns come through regularly is helpful here, because any intern will also become numb to the more painful parts of the codebase.)

Having an intern around who will look around the codebase and find patterns to follow will highlight for you which patterns you don’t love any more, and remind you to fix them up at the next opportunity.

Benefit #2: Culture

Like explaining a complex bit of code, explaining how your team works and why you do the things you do will help you find gaps in your process. A team that can effectively onboard an intern is set up well to onboard any engineer, so that they can contribute meaningfully as quickly as possible. You’ll also learn how good your team is at teaching (or knowledge transfer, for those who like corporate lingo better). Good teaching leads to fewer silos, which leads to higher bus numbers. Yay!

Having an intern-ready culture means your team will have an easier time retaining people who are collaborative and empathetic. At Omada, we use an internship-like program to rotate engineers through other teams. Especially when someone is learning a totally new technology, having a structured format to get started is incredibly helpful. This has the excellent benefit of allowing our teams more opportunities to learn from each other—rotating team members cross-pollinate ideas and practices from their “home” team.

Doubts

Still not sure that your team is ready, or that you can spare the time?

The most common refrains I’ve heard from engineers that don’t think they should hire an intern yet include:

  • We don’t have the time or resources to train them
  • Interns will write bad code that we’ll then have to maintain forever
  • Everyone on the team is so key to the codebase that we can’t have someone less than senior or else things would fall apart

These are reasonable concerns, but point to larger issues in your engineering organization (beyond the very-real problem that hiring an all-senior engineering team is very expensive and very hard).

Resources

If you have fewer than three mid- to senior-level engineers, maybe you should wait on hiring an intern. A team of all interns probably isn’t an effective way to build a robust codebase, but a team of all seniors can tend to write more complex, clever code. Create a balanced team.

Running an internship program is absolutely an investment. You do need to take time to train people, but the ROI on your codebase and culture is worth it if you do it right. An internship program that doesn’t teach you about the existing team and its code is not worth running.

Code Quality

Your company should already have structures in place that prevent crappy code from getting onto production — probably something like code review or pair programming. If you don’t do either of those things, you should probably start! With your full-time engineers, not your interns.

So, when you hire an intern, put those structures to work. Give the intern actual production work, and see how good your team is at giving helpful, thoughtful feedback about the intern’s code.

Not enough experience

If your team believes only senior engineers can be beneficial to your codebase, then you are going to have a hard time hiring, and probably have a myriad of other issues. People leave companies, and they take their knowledge of the code with them. Good luck!

Start with one

Being good at teaching means being good at helping all of your engineers level up, which will help them want to stick around. Teaching reinforces what you know, and highlights things you thought you knew but don’t. Being good at information sharing means that you will have fewer silos and higher bus numbers.

I hear often that startups don’t think they have the resources to support interns, but the question is: where do senior engineers start? Not as senior engineers. Providing internships helps us have more balanced teams, and hiring mid- to senior-level engineers is pretty damn difficult in the current market.

It’s likely that your first intern ever will have a worse experience than later interns. You’re going to learn how good your mid-level and senior engineers are at teaching a junior, and which parts of the codebase are really hard to explain to someone just starting their career. But please don’t let that stop you from trying.

Bonus!!

All of the reasons above should be enough to start hiring interns. But there’s another benefit that I should mention: you can more easily increase the gender diversity of your team!

  • 16% of software engineers are women (source)
  • 18% of computer science grads are women (source)
  • 38% of bootcamp grads are women (source)

The statistics for ethnic diversity of bootcamp grads is less exciting, but you can still work on the diversity of your teams by posting internship opening in places like the jobs board ofs historically black colleges and univserities, or working with organizations like CODE2040 to hire black and latin@ fellows.

How To

Ready to start an effective internship program? Read on for how to do it.

A brief guide to facilitating retros

One of the cornerstones of our engineering process at Omada is the retro (short for retrospective). A retro is a regularly scheduled time for the team to reflect on the past week and discuss what about our processes we should change to make the next week better. Most of our teams have retros at the same time each week, toward the end of the week.

Retros at Omada started with the engineering teams, and over the years we’ve introduced other parts of the organization to their magic. From the outside, retros can seem like post-mortems or complaining sessions. So it’s been important for us to emphasize that retros are regularly occurring and process-focused. (And that post-mortems and complaining sessions can also be very valuable — they just can’t replace retros.)

As new teams started having retros, we realized that we needed a guide to the basics of an Omada retro. Since the facilitator has a major impact on the pace and tenor of the retro, we focused on training more facilitators. (In some teams, the manager or team lead runs the retro every week; other teams rotate facilitators.) I made this one-page cheat sheet outlining how to effectively moderate a retro. Take a look, and maybe even print it out and take it to your next retro!

hand-drawn retro facilitation guide

Here are a few translations and notes!

  • EANABS are Equally Attractive Non-Alcoholic Beverages. We usually have a mix of beer-drinkers, whiskey-drinkers, and non-drinkers at our retros. While alcohol is a fun way to demarcate that this isn’t just a regular meeting, it’s important to make everyone on your team feel included, so if you are serving alcohol, other fun drinks should be available.
  • Learn more about the Five Whys (and why you might ask them) on this wikipedia page.
  • The timeline is assuming a 60-minute long retro and a co-located team (thus the sticky notes and the pens). If your folks are remote, tools like Stickies.io and Retrospectus are useful for collecting people’s thoughts and reflections.
  • This is just one style of retro — there are many, many ways to run a retro!

(Here’s the guide as a PDF.)

Thank you to Vincent Coste, who gave an internal presentation on our retro practices that inspired me to create this guide!

Solving the ‘Matt Problem’

It’s been a big couple of years at Omada Health. Billions of steps tracked, millions of weigh-ins, two funding rounds and a whole lot of hiring. According to our company intranet, 70% of the company joined after me and I’ve only been here a year. With so many new names to put faces to, you start to run into something I like to call, the ‘Matt Problem’. The ‘Matt Problem’ arises when you receive an email simply signed:

Thanks,
Matt

and you have to work out which of the twelve Matts at your company sent it.

We tried giving each Matt a nickname. One Matt had a large beard – Matt, the Beard, another had longer than average hair – Matt, the Hair. But what happens when the next Matt joins the team with even longer hair and larger beard? Matt the Hairiest didn’t stick.

So at our recent company hack day, I tried to tackle this problem by making our own internal Rapportive/Connectifier/FullContact style Google Chrome Extension for Gmail. All of these extensions display extra profile information about the person sending you email right in your inbox. I thought if we could show a smiling profile picture together with their role at Omada Health and a brief introduction, it would bring our community closer, one Matt at a time.

This approach took advantage of the fact that everyone at Omada Health uses Gmail for email, Chrome for web browsing and Parklet to store our profile information.

Without any help from our marketing department, I seamlessly combined ‘Chrome’ and ‘Omada’ to name the project ‘Chromada’ and, of course, created an equally terrible logo.

Chromada Logo
So let’s write some code!

The good news is the team at Streak have released a library called InboxSDK that makes this possible in under fifty lines of JavaScript. Dropbox uses it for their Gmail integration, which according to the Chrome Web Store, has over 3 million active weekly users. The main benefit of the library is that it allows developers to build apps on top of a stable API, rather than having to make changes every time Gmail changes its DOM structure.

Every Chrome extension is essentially a group of JavaScript and CSS files that are loaded by the browser as described in the extension’s manifest.json. The following example describes an extension that will load the InboxSDK library and the Chromada application js and css files when the user visits Gmail (https://mail.google.com). We also added Parklet (https://app.parklet.co) to the permissions array which allows the Chrome extension to make requests to retrieve employee profile information.

{
  "manifest_version": 2,
  "name": "Chromada",
  "version": "0.0.1",
  "icons": {
    "16": "images/omada-icon-16.png",
    "128": "images/omada-icon-128.png"
  },
  "permissions": [
    "https://mail.google.com/",
    "https://app.parklet.co/"
  ],
  "content_scripts" : [
    {
      "matches": ["https://mail.google.com/*"],
      "js": ["inboxsdk.js", "chromada.js"],
      "css": [ "styles/chromada.css" ]
    }
  ]
}

Next we use the InboxSDK API to load the library. An App ID is required here, so follow the instructions in the documentation to register for one. Once the SDK is loaded, we can use the Conversations.registerThreadViewHandler(handler) method to add a handler that will be called when the user navigates to an email thread in Gmail. The ThreadView object that is passed as an argument to the callback gives us two functions that we are interested in. First, ThreadView.addSidebarContentPanel() lets us add the Chromada html element to the sidebar of the Gmail thread view. Then, we use ThreadView.getMessageViewsAll() to iterate through each email in the thread and listen for individual message state changes. MessageViews change from hidden, expanded and collapsed as the user clicks on each email in a thread. We use this to ensure the employee’s profile in the sidebar stays in sync with the email the user is currently reading.

InboxSDK.load("1.0", "YOUR_APP_ID_HERE").then(function(sdk) {

      // the SDK has been loaded, now do something with it!
       sdk.Conversations.registerThreadViewHandler(function(threadView) {

        var chromadaDiv = document.createElement("div");
        chromadaDiv.setAttribute("id", "chromada");
        threadView.addSidebarContentPanel({
          el: chromadaDiv,
          title: "Omada Health",
          iconUrl: chrome.extension.getURL("images/omada-icon-38.png")
        });

        threadView.getMessageViewsAll().forEach(function(messageView) {
          messageView.on("viewStateChange", function(event) {
            updateEmployeeProfile(event.messageView);
          });
        });
      });
    });

Once we have a reference to a DOM element in Gmail, we can display anything we like. Chromada uses the email address of the sender to look up the full employee profile information in our company intranet, Parklet. A name, title, start date and profile picture can then be added to the sidebar panel. Here’s a screenshot featuring a smiling colleague:

Chromada screenshot

The Chrome Web Store makes distributing private Chrome extensions simple for Google Apps for Work users. On the Developer Dashboard, just select the option to restrict visibility to everyone with an omadahealth.com email address. Then it’s a simple one click install.

Deployment settings

After a quick demo at the following all hands MMM (Monday Morning Meeting) and a follow up email to all@omadahealth.com, Chromada was launched. One month later, almost three quarters of the company are weekly active users and Matts all around the office are no longer strangers.

Chrome Web Store screenshot