<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Trevor Nelson on Medium]]></title>
        <description><![CDATA[Stories by Trevor Nelson on Medium]]></description>
        <link>https://medium.com/@trevor.nelson1?source=rss-2bdca8a87b3a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*6WV4B6nLuxW3ov4r78D7eQ.jpeg</url>
            <title>Stories by Trevor Nelson on Medium</title>
            <link>https://medium.com/@trevor.nelson1?source=rss-2bdca8a87b3a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 09:45:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@trevor.nelson1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[MTOM Attachments in Go]]></title>
            <link>https://medium.com/policygenius-stories/go-mtom-attachments-a4b36b5795b7?source=rss-2bdca8a87b3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4b36b5795b7</guid>
            <category><![CDATA[insurance]]></category>
            <category><![CDATA[insuretech]]></category>
            <category><![CDATA[mtom]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Trevor Nelson]]></dc:creator>
            <pubDate>Tue, 29 Sep 2020 16:57:45 GMT</pubDate>
            <atom:updated>2020-10-01T15:16:30.092Z</atom:updated>
            <content:encoded><![CDATA[<h3>Go MTOM Attachments</h3><p>One of the common problems we face as an InsureTech start-up is how to wed modern technologies and tooling appropriate for a fast-moving start-up with outdated insurance industry or enterprise technologies. The insurance industry is complex, and I’ve found one of the most challenging and rewarding things about my job as an InsureTech engineer is to find the right way to abstract away industry complexity.</p><p>In this article, I’m going to outline what MTOM (Message Transmission Optimization Mechanism) is and how we built a Go client to send MTOM messages in order to integrate with an insurance vendor.</p><h3>The Use Case</h3><p>We <a href="https://www.prnewswire.com/news-releases/policygenius--brighthouse-financial-launch-a-faster-simpler-way-to-access-term-life-insurance-301072710.html">recently partnered with Brighthouse Financial</a> to offer a life insurance product, Brighthouse SimplySelect, which doesn’t require a medical exam and can provide an underwriting decision in under 24 hours (a process that can normally take upwards of a month). As a part of this integration, we needed to submit finalized applications to a 3rd party for processing, using an insurance industry standard XML format called <a href="https://www.acord.org/">ACORD</a>. The ACORD format seeks to standardize industry concepts and entities into a common format to help facilitate integrations between insurance carriers, vendors and brokers like Policygenius.</p><p>One thing we’ve learned about ACORD is that while it’s a standard, there’s still a lot left to interpretation. Each integration using ACORD will require its own variations and extensions on top of the ACORD standard (understandably so — <em>you</em> try creating a totally rigid API schema for a $1.2 trillion industry).</p><p>One such aspect of our Brighthouse SimplySelect integration that required custom functionality was how signed forms were included in the application submission. In order for applications to be processed successfully by a downstream 3rd party, signed forms needed to be included as MTOM attachments that were then referenced within the body of the XML request.</p><h3>What are MTOM attachments, exactly?</h3><p>After initially hearing about this requirement, “MTOM” was a meaningless series of letters to me, like “YOLO” or “TTYL”. Lucky for me, the internet exists, and it informed me that it stands for <a href="https://en.wikipedia.org/wiki/Message_Transmission_Optimization_Mechanism">Message Transmission Optimization Mechanism</a>. Cool, I guess, but still pretty meaningless. After some more digging, I found a more useful definition:</p><blockquote>MTOM, or Message Transmission Optimization Mechanism, is a SOAP protocol that utilizes the XOP “include” standard.</blockquote><p>What this means in practice is that MTOM is a mechanism that embeds binary data into the body of a request and links to it from within the SOAP envelope. The benefit with utilizing MTOM is that it provides better performance and over-the-wire efficiency compared to the common alternative of base64 encoding a file and embedding it directly into the SOAP envelope.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*RyNu2_LN0BubcLzsKUSm9A.png" /><figcaption>Ref: <a href="https://mohamadhalabi.com/2015/02/21/ws-in-wcf-mtom/">https://mohamadhalabi.com/2015/02/21/ws-in-wcf-mtom/</a></figcaption></figure><p>The server that’s receiving an MTOM request needs to know that it should read each piece of the request body as separate attachments, with their own file type. The MTOM format does this by dividing the request body with MIME boundaries that describe the data that follows it.</p><p>For example, if an XML request needs a PDF and JPEG image attached via MTOM, the first MIME boundary would include XML, then a MIME boundary would say “hey server, read the gobbledygook you’re about to see as a PDF”, then a third MIME boundary that indicates the binary data is a JPEG image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*qojlLIJ9JyPEIPb3qJEz6A.png" /><figcaption>MIME boundaries for MTOM requests indicate what the binary data type should be interpreted as.</figcaption></figure><p>Each of these MIME boundaries should have a unique Content-Id that you can reference in your XML. The benefit of that is that you can use the structure that XML provides to provide context to the attachment.</p><p>Imagine if an XML document described an application for a home insurance policy and an auto insurance policy — with MTOM, you could associate attachments to either the home or auto policy application by linking to that attachment in the relevant parts of XML. This also allows you to add metadata to the request relating to a given attachment, such as form codes or signature dates.</p><p>A common alternative to this MTOM method is to just base64 encode file data and embed directly into the XML document, though this can put stress on XML parsing/schema validation functionality in the downstream server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/0*y79qlyfAaiSZwBvH" /><figcaption>The Content-Id value is used to link entities in the XML document with attachments included in the request body</figcaption></figure><p>In the case of our integration with Brighthouse, we needed to send a bunch of signed documents with a given application. For each document, we needed to include form metadata like form requirement codes in order for the downstream services to validate the application submission was “In Good Order” and met all the regulatory requirements for a life insurance application.</p><h3>Implementing an MTOM Client in Golang</h3><p>At Policygenius, we like to take a <a href="https://martinfowler.com/bliki/DomainDrivenDesign.html">domain-driven</a> approach to designing systems, which led to building a new Go service that would handle the “Accelerated Underwriting” process.</p><p>Not being able to find an off-the-shelf Go package that would fit our specific needs for building MTOM requests, we decided to build our own, influenced by <a href="https://github.com/hooklift/gowsdl">gowsdl</a>. I’m not going to outline code for the entire SOAP client, since there’s a thousand ways to skin a cat — instead, I’m just going to focus on the MTOM-specific aspects of our implementation.</p><p>So what do we know we need this MTOM client to do so far?</p><ul><li>We probably need to add some headers to the request to let the downstream server know this is an MTOM request, so it can handle it accordingly.</li><li>We need to be able to generate a multipart MIME request body.</li><li>We need to generate a content ID that’s both marshaled into XML and appended along with an attachment.</li><li>We need to dump some binary data in said MIME part.</li></ul><p><strong>Configuring the Request Headers</strong></p><p>We need to let the downstream server know our intentions with this request, since the multipart-ness of it would look pretty funny. Kinda like if you forget you are holding a glass of water after holding a soda, take a sip and are like WTF IS THIS?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FiQEOg3zGJBXLa%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FiQEOg3zGJBXLa%2Fsource.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FiQEOg3zGJBXLa%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="304" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc6e497a0232fac3dc426137cdb0b5dd/href">https://medium.com/media/cc6e497a0232fac3dc426137cdb0b5dd/href</a></iframe><p>There are different flavors depending on your implementation, but you’ll need a few ingredients to your mah’s favorite MTOM Content-Type header meatloaf:</p><pre>startContentID := &quot;some-id&quot;<br>boundary := &quot;Hey Im a new section now&quot;<br>buffer := new(bytes.Buffer)<br>url := &quot;https://www.somehost.com/some-endpoint&quot;</pre><pre>// buffer is empty for now- this is where we&#39;ll do our marshaling<br>req, err := http.NewRequest(&quot;POST&quot;, url, buffer)</pre><pre>contentTypeHeader := fmt.Sprintf(`multipart/related; start-info=&quot;text/xml&quot;; type=&quot;application/xop+xml&quot;; start=&quot;%s&quot;; boundary=&quot;%s&quot;`, startContentID, boundary)</pre><pre>req.Header.Add(&quot;Content-Type&quot;, contentTypeHeader)</pre><p>In the code above, we’re just creating a new request and passing it an empty buffer — we’ll be marshaling the request body in that buffer in a later section. Finally, we’re setting the request’s ContentType with a few values:</p><ul><li>multipart/related tells the server this body will be broken up into a few different sections.</li><li>start-info=&quot;text/xml&quot; is instructing the downstream server that the first section of data will be XML. This’ll be where the SOAP envelope goes.</li><li>type=&quot;application/xop+xml this is basically just informing the server that there’s going to be some XML and some attachments in the body.</li><li>start=&quot;some-id” when defining the boundary for that first SOAP envelope section, we’ll need to specify a Content-Id that correlates to this name.</li><li>boundary is used to indicate to the server how the request is going to be designating boundaries between sections of the request. More on this in a bit.</li></ul><p><strong>Marshaling the Attachment</strong></p><p>Since we need to both 1) add the attachment binary(s) in a MIME part to the request body, and 2) reference that attachment in the XML, it makes sense to leverage Go’s<a href="https://golang.org/pkg/encoding/xml/#Marshaler"> XML marshaling interface</a>. We can build out a struct that, when marshaled, can generate the correct Content-Id references in our XML and create the MIME boundaries.</p><p>First, we need to build a struct that is responsible for:</p><ol><li>Temporarily storing the attachment data</li><li>Generating a content ID</li><li>Marshaling into a XML node that links to said content ID</li></ol><pre>type Attachment struct {<br>  content     *[]byte<br>  contentType string<br>  partID   string<br>  name    string<br>}</pre><pre>func NewAttachment(v []byte) *Attachment {<br>  return &amp;Attachment{&amp;v, &quot;application/octet-stream&quot;, &quot;&quot;, &quot;&quot;}<br>}</pre><p>Next, we need to add some code to handle this custom marshaling behavior. Specifically, where ever we have an Attachment struct in our SOAP envelope, we want to translate that into an &lt;Include&gt; XML element that references the ID of one of the multipart sections (we’ll add these in the next step). We can add a MarshalXML method to our Attachment struct that implements go’s xml.Marshaler interface:</p><pre>type AttRef struct {<br>  Include struct {<br>    Href string `xml:&quot;href,attr&quot;`<br>  } `xml:&quot;http://www.w3.org/2004/08/xop/include Include&quot;`<br>}</pre><pre>func (a *Attachment) MarshalXML(encoder *xml.Encoder, start xml.StartElement) error {<br>  a.partID = fmt.Sprintf(&quot;%d&quot;, rand.Int())<br>  attachmentRef := AttRef{}<br>  attachmentRef.Include.Href = fmt.Sprintf(&quot;cid:%s&quot;, a.partID)<br>  return encoder.EncodeElement(attachmentRef, start)<br>}</pre><p>Now, when we marshal a struct that represents our SOAP envelope, our new MarshalXML method will be called when it runs into one of our Attachments as it navigates the nodes in that SOAP envelope struct.</p><p><strong>Creating the Multipart Request Body</strong></p><p>Now, we need to build a custom encoder that generates proper MIME boundaries, marshals our SOAP envelope, and scoops up any MTOMAttachment elements and throws their sweet, sweet binary data into separate MIME parts. First things first, we need to update our code that builds the request to encode an envelope struct.</p><pre>startContentID := &quot;some-id&quot;<br>boundary := &quot;Hey Im a new section now&quot;<br>buffer := new(bytes.Buffer)<br>url := &quot;https://www.somehost.com/some-endpoint&quot;</pre><pre>encoder = newEncoder(buffer, boundary, startContentID)<br>encoder.Encode(envelope)<br>req, err := http.NewRequest(&quot;POST&quot;, url, buffer)</pre><pre>// ...</pre><p>For brevity’s sake, I’m going to skip over defining envelope. All you need to know is it should be a go struct that is structured like a SOAP envelope and includes at least one of our Attachment structs. You can find an example of the basics of XML marshaling in Go <a href="https://gobyexample.com/xml">here</a>.</p><p>Finally, we need to build the encoder that’s being called above. First, we’ll need to set up the main interface for the encoding functionality:</p><pre>type encoder struct {<br>  writer *multipart.Writer<br>  boundary string<br>  startContentID string<br>}</pre><pre>func newEncoder(w io.Writer, b, id string) *encoder {<br>  return &amp;encoder{<br>    writer: multipart.NewWriter(w),<br>    boundary: b,<br>    startContentID: id<br>  }<br>}</pre><pre>func (e *encoder) Encode(envelope interface{}) error {<br>  return nil<br>}</pre><p>Next, we’ll need to add to our Encode method so that it takes the struct representing our SOAP Envelope, marshal it into XML, and write it to the first part in our multipart request:</p><pre>func (e *encoder) Encode(envelope interface{}) error {<br>  partHeader := e.getXMLPartHeader()<br>  partWriter, err := e.writer.CreatePart(partHeader)<br>  if err != nil {<br>    return err<br>  }</pre><pre>  xmlEncoder := xml.NewEncoder(partWriter)<br>  if err := xmlEncoder.Encode(envelope); err != nil {<br>    return err<br>  }</pre><pre>  return nil<br>}</pre><pre>func (e *encoder) getXMLPartHeader() textproto.MIMEHeader {<br>  header := make(textproto.MIMEHeader)<br>  header.Set(&quot;Content-Type&quot;, &quot;application/xop+xml; type=\&quot;text/xml\&quot; charset=UTF-8;&quot;)<br>  header.Set(&quot;Content-Transfer-Encoding&quot;, &quot;8bit&quot;)<br>  header.Set(&quot;Content-ID&quot;, e.startContentID)</pre><pre>  return header<br>}</pre><p>The Encode method now creates a new section in the multipart request and writes the marshaled XML to it. Because we previously defined a MarshalXML method on Attachment, the XML encoder here will marshal this field as an &lt;Include&gt; XML node that links to the attachment binary in a subsequent part in the multipart request. The only thing we have left to do now is add data for those attachments to their own request parts.</p><pre>func (e *encoder) writeAttachmentParts(pw io.Writer, d interface{}) error {<br>  attachments := make([]reflect.Value, 0)<br>  detectAttachments(d, attachments)<br>}</pre><pre>func detectAttachments(data interface{}, attachments *[]reflect.Value) {<br>  val := reflect.Indirect(reflect.ValueOf(data)</pre><pre>  switch val.Kind() {<br>  case reflect.Array, reflect.Slice:<br>    for i := 0; i &lt; val.Len(); i++ {<br>      el := val.Index(i)<br>      if !el.CanInterface() {<br>        continue<br>      }<br>      if _, ok := el.Interface().(*Attachment); ok {<br>        *attachments = append(*attachments, el)<br>      } else {<br>        detectAttachments(el.Interface(), attachments)<br>      }<br>  case reflect.Struct:<br>    for i := 0; i &lt; v.NumField(); i++ {<br>      if !v.Field(i).CanInterface() {<br>        continue<br>      }<br>      f := v.Field(i)<br>      if _, ok := f.Interface().(*Attachment); ok {<br>        *attachments = append(*attachments, f)<br>      } else {<br>        detectAttachments(el.Interface(), attachments)<br>      }<br>    }<br>  }<br>}</pre><p>We first need to navigate our envelope in order to collect references to all of the Attachment nodes in it. We need these so we can match up the Content-Id attribute in the new request part with the cid reference in the marshaled XML’s corresponding &lt;Include&gt; node. We need to use reflection in order to recursively navigate the struct and find all the attachments. The switch statement is here so that we can also navigate arrays in our envelope structure.</p><p>Finally, we want to iterate through these attachments we found in the envelope and add them as new request parts.</p><pre>func (e *encoder) writeAttachmentParts(pw io.Writer, d interface{}) error {<br>  attachments := make([]reflect.Value, 0)<br>  detectAttachments(d, attachments)</pre><pre>  for _, attachment := range attachments {<br>    a := attachment.Interface().(*Attachment)<br>    header := make(textproto.MIMEHeader)<br>    if a.contentType == &quot;&quot; {<br>      a.contentType = &quot;application/octet-stream&quot;<br>    }<br>    contentType := fmt.Sprintf(&quot;%s; name=%s&quot;, a.contentType, a.name)<br>    header.Set(&quot;Content-Type&quot;, contentType)<br>    header.Set(&quot;Content-ID&quot;, fmt.Sprintf(&quot;&lt;%s&gt;&quot;, a.partID))<br>    header.Set(&quot;Content-Transfer-Encoding&quot;, &quot;binary&quot;)<br>    header.Set(&quot;Content-Disposition&quot;, fmt.Sprintf(&quot;attachment; filename=%s&quot;, a.name))<br>    if pw, err = e.writer.CreatePart(header); err != nil {<br>      return err<br>    }<br>    pw.Write(*a.content)<br>  }<br>}</pre><p>Now all we need to do is add the writeAttachmentParts method to our Encoder:</p><pre>func (e *encoder) Encode(envelope interface{}) error {<br>  partHeader := e.getXMLPartHeader()<br>  partWriter, err := e.writer.CreatePart(partHeader)<br>  if err != nil {<br>    return err<br>  }</pre><pre>xmlEncoder := xml.NewEncoder(partWriter)<br>  if err := xmlEncoder.Encode(envelope); err != nil {<br>    return err<br>  }</pre><pre>  e.writeAttachmentParts(partWriter, envelope)</pre><pre>  return nil<br>}</pre><p>Now that our Encoder is properly marshaling our binary data to &lt;Include&gt; XML nodes that reference subsequent attachments, we should be all set to build and send MTOM attachments!</p><p>Building integrations in the InsureTech space offers a lot of interesting problems to solve. If you’re interested in helping us solve problems like this, take a gander at our openings and let us know if anything sounds like a good fit!</p><p><a href="https://boards.greenhouse.io/policygenius">Policygenius Careers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4b36b5795b7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/policygenius-stories/go-mtom-attachments-a4b36b5795b7">MTOM Attachments in Go</a> was originally published in <a href="https://medium.com/policygenius-stories">Policygenius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Policygenius Hackathons]]></title>
            <link>https://medium.com/policygenius-stories/policygenius-hackathons-1d6255d9d575?source=rss-2bdca8a87b3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d6255d9d575</guid>
            <category><![CDATA[product]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[hackathons]]></category>
            <dc:creator><![CDATA[Trevor Nelson]]></dc:creator>
            <pubDate>Fri, 09 Aug 2019 13:00:59 GMT</pubDate>
            <atom:updated>2019-08-09T13:00:59.736Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using Hackathons to Inspire and Accelerate Product Roadmaps</h3><p>The Policygenius engineering team espouses a generative culture, where all engineers are empowered to prioritize and solve problems that drive the technical organization forward. (For a more in-depth description of what generative culture is and how engineering teams can benefit from it, see <a href="https://changelog.com/posts/how-to-build-a-generative-engineering-culture">this article</a> by Dave Kaplan, our Head of Engineering.)</p><p>One of the primary ways that we practice a generative culture at Policygenius is with <a href="https://medium.com/policygenius-stories/revisiting-agile-guilds-charter-guilds-59c622d7c987">self-organizing Charter Guilds and Tech Initiatives</a>- another important part of building this culture is with periodic internal hackathons.</p><p>In this article, we’ll discuss why we think hackathons are valuable tools for driving culture and business impact, how we plan for and run effective hackathons here at Policygenius, and review some of the great projects that have come out of our first two hackathons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*e5pOAvXI8RelwDn8D_bhIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PE28O94vxBbejQm7EC8bRg.jpeg" /><figcaption>The UAT team points at various things for some unknown reason during the hackathon.</figcaption></figure><h3>Why hackathons are worth it</h3><p>Hackathons take time to plan, and divert planning and development time away from the established product roadmap. Here’s why we think time invested in hackathons can have a huge ROI:</p><p><strong>Builds a culture of empowerment<br></strong>While there are many ways of organizing and running hackathons, we strive to make them as bottom-up as possible, with project ideas collectively sourced, democratically selected and teams self-organized.</p><p>This feeds a generative culture, where everyone has ownership of the problems we’re solving and feels empowered to affect the direction of the tech/product organization. Our generative culture supercharges the agile product process by allowing more voices to participate in product and tech decision-making.</p><p><strong>Recharges product teams<br></strong>One overlooked benefit of hackathons is that they break up a team’s business-as-usual and we’re able to solve problems outside of our normal team’s priorities. Not only do hackathons provide a change of scenery that has been proven to fight burnout, they also provide dedicated time to be highly creative. There have been all sorts of studies about how creativity refreshes the brain.</p><p>True story — I was actually able to use this phenomenon in high school to significantly boost my SAT score. After getting an SAT slightly under automatic acceptance for the college I wanted to go to, I learned that the next time I took the test, there would be a beta writing portion of the SATs that my target college was going to ignore. Instead of studying, I just retook the test in a few months, but doodled during the essay portion and answered my own essay prompt. Giving my brain a break and giving it some time to be creative helped me get over 100 points higher the second time around on my SATs. While it’s a silly anecdote, it’s a real-world example of how creativity can mentally recharge and boost performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LvHnwY1nsmnyOPJPEnoZYQ.jpeg" /><figcaption>Screenshot from my *actual* SAT essay</figcaption></figure><p><strong>Provides a different perspective<br></strong>Hackathons force engineers and product folks to solve new problems that require them to approach solutions from a different angle. This can trigger new ideas in their day-to-day project work, and allow them to approach problems from different perspectives.</p><p>Utilizing hackathons to spike on new tech can spark new ideas with respect to how engineers design new features or tackle tech debt, and broadens product managers’ and designers’ concept of what’s feasible. The competitive nature of hackathons and their short timeframe also can force participants to work quickly and prioritize savagely. This refines their ability to distill new products and features to a lean MVP on their day-to-day teams, as needed.</p><h3>How Policygenius plans and runs hackathons</h3><p>Hackathons can have a huge positive impact on product development teams, but in order to take full advantage of them you need a well-thought-out process that strikes the right balance between driving business value and providing a “tech playground”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23TtvdoEetCWbmt9f20_rQ.jpeg" /><figcaption>Signs of an effective hackathon: 1) conference rooms that look lived in, 2) lots of whiteboard scribbles.</figcaption></figure><p><strong>4 weeks out</strong></p><ul><li>Create a hackathon planning team of volunteers from product, engineering and design to lead the hackathon prep work.</li><li>Send out an availability survey to everyone in the product organization. We sent out a <a href="http://doodle.com/">Doodle</a> with a bunch of options for the dates of the hackathon. One of the best ways to have a bad hackathon is to do it when half of the office is on vacation or has some big impending project deadlines! We schedule our hackathons sometime in the first few weeks of each tertile (our 4-month planning cycle), so we can start the tertile refreshed.</li></ul><p><strong>3 weeks out</strong></p><ul><li>Send out a <a href="http://www.trello.com/">Trello</a> board to facilitate project brainstorming. First, we focus on brainstorming problems that we’ve been itching to solve: for example, that our agents spend a lot of time rescheduling medical exams for life insurance applicants. They could be customer, operations, or technical problems that we face at Policygenius, or even just-for-fun projects that broaden the imagination of our product roadmaps. We brainstorm solutions in a separate, later step to allow everyone to think of solutions to problems with fresh, unbiased eyes.</li></ul><p><strong>2 weeks out</strong></p><ul><li>After gathering a bunch of problems that have business impact to Policygenius, we open up the brainstorming board for solution brainstorming. Using the list of problems as inspiration, we add descriptions of new products, features or technical exploration work that could help us solve something meaningful. For example, the above problem with exam rescheduling could inspire a number of solutions, such as a mobile app that reminds users of their medical exams, a calendar feature that allows users to list multiple schedule options, or a way for medical exam providers to directly contact users through Policygenius.</li></ul><p><strong>1 week out</strong></p><ul><li>After there’s been sufficient time to brainstorm hackathon project ideas, we put everyone in a room for project pitches. Recommenders of each product idea have a few minutes to describe the goal of the project, what impact it would have, and why it’ll be technically exciting to work on.</li><li>After the project pitches, hackathon’ers will spend the next week finalizing their teams. Since the teams are self-organizing, the only “voting” or project selection that happens is if you’re able to convince enough people to join your team to actually complete the project as it is initially scoped.</li><li>The hackathon planning team finalizes breakfast, lunch and dinner plans during the hackathon, as well as the judging panel and prizes. The judging panel is generally a mix of leads from other departments and an engineering manager, to give the panel collective context on technology, operations and marketing.</li><li>Once teams are finalized, they do some light discovery work and refine project scope throughout the week so they can hit the ground running.</li></ul><p><strong>Day 1</strong></p><ul><li>All hackathon participants meet first thing in the morning for the Hackathon Kickoff. We review the judging criteria, timeline and finalized project teams.</li><li>Teams relocate to sit in hackathon team pods, plan out development milestones, and start hackin’!</li><li>Breakfast, lunch and dinner are provided to maximize the amount of time teams have to work on their hackathon projects. But also because free food is great.</li></ul><p><strong>Day 2</strong></p><ul><li>Teams use the morning to wrap up any last tweaks to their projects.</li><li>As development starts wrapping up, teams shift towards planning for their demo and presentation. Presentations should focus on business impact, technical “wow” factor, and if there’s a use case for it in production in the future.</li><li>Hackathon winners are announced after the judges deliberate and the hackathon is officially a wrap!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pSfnJIWzEgSu-f70pXLVVQ.jpeg" /><figcaption>Something appears to be going poorly.</figcaption></figure><h3>Hackathon Project Highlights</h3><p><strong>Underwriting Status Mobile Application<br></strong>The winner of our most recent hackathon, this team built a mobile app that notified users of the status of their life insurance application and gave them tools to aid in medical exam scheduling. The life insurance application process has a number of steps, and approval can take upwards of 90 days in a number of cases, which makes this a natural use-case for a push notification-driven mobile application. Built using Flutter as a proof-of-concept for a future production project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*CS2pCvWtFonExnxqXc8AsQ.png" /><figcaption>Flutter app for application process updates and medical exam scheduling</figcaption></figure><p><strong>Insurance Chatbot<br></strong>One of the projects from our inaugural hackathon, this was a chatbot proof-of-concept that utilized Google DialogFlow to answer insurance a user’s insurance questions, generate life insurance quotes, and tell a handful of jokes via both online chat and over the phone. Through this project, we were able to de-risk potential future chatbot functionality and get a better sense of feature complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*DGFa0UaT5vesZuiS17Bk2w.png" /><figcaption>Example chatbot response using Google DialogFlow</figcaption></figure><p><strong>Disability Insurance Quoter<br></strong>Shameless plug, but the project I worked on last hackathon was an industry-first comparative quoter for disability insurance premiums. We built this quoter on a new tech stack, as a way to evaluate using them in our other quoters to resolve some limitations and tech debt. With this hackathon project, we were able to garner more internal interest in this and are working on a path to production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*VT1zqTHyQp_fAUkFP6nMqA.png" /><figcaption>Proof-of-concept agent-facing UI for comparative quoting using a new Disability Insurance quoting service</figcaption></figure><p><strong>Feature UAT Environments<br></strong>Focused on utilizing our kubernetes implementation for isolated QA environments for each open PR. This would allow us to move product acceptance to happen before code changes are merged in, keeping master clean and in a deployable state at all times, paving the way for continuous deployment. This team actually continued the work they did from our first hackathon in the next one, which demonstrates the value of keeping hackathon projects self-organizing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*4RjFl8R2mm4Q6txEeKShig.png" /><figcaption>Personalized UAT environment for each feature to keep master branch clean</figcaption></figure><h3>Wrapping Up</h3><p>Hackathons are one of the ways we’re promoting a generative culture here at Policygenius. Not only are they a fun change-of-pace for engineers and product folks, they also can create real value to the business and influence the product roadmap of the company. Running a successful hackathon takes a commitment of time and focus, but have proven to be hugely worth that commitment at Policygenius.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLtNHfAkH-t4zyJziseSlg.jpeg" /></figure><h3>We’re growing!</h3><p>We’ve gathered a pretty great bunch of product, design and engineering folks to tackle some pretty tough problems in the insurance industry. Fun fact: we still need a lot more. If you’re interested in what we have going on here and want to help us on our mission to make insurance suck less, mosey on over to our careers page to see if something fits.</p><p><a href="https://boards.greenhouse.io/policygenius">Policygenius Careers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d6255d9d575" width="1" height="1" alt=""><hr><p><a href="https://medium.com/policygenius-stories/policygenius-hackathons-1d6255d9d575">Policygenius Hackathons</a> was originally published in <a href="https://medium.com/policygenius-stories">Policygenius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Policygenius Day-in-the-Life: Software Engineer]]></title>
            <link>https://medium.com/policygenius-stories/policygenius-day-in-the-life-software-engineer-a72d37e7e506?source=rss-2bdca8a87b3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a72d37e7e506</guid>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Trevor Nelson]]></dc:creator>
            <pubDate>Fri, 10 May 2019 12:47:43 GMT</pubDate>
            <atom:updated>2019-05-16T15:40:21.096Z</atom:updated>
            <content:encoded><![CDATA[<p>At Policygenius, we believe that insurance helps people when they’re at some of the most challenging moments of their lives. Every day we come to work with the goal of making it easier for people to compare and buy insurance, so they have a helping hand when life gets hard. Here’s how our product engineering teams work towards this goal on the daily.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F1d5U0OaCqfC0DQpriC%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fsiliconvalleyhbo-1d5U0OaCqfC0DQpriC&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F1d5U0OaCqfC0DQpriC%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="243" frameborder="0" scrolling="no"><a href="https://medium.com/media/f82c30173a0c5214d09257a13f450f2e/href">https://medium.com/media/f82c30173a0c5214d09257a13f450f2e/href</a></iframe><h3>Tools and Languages We Fancy</h3><p>Here on the Policygenius engineering team, we strive for architecture and tooling that reduces <a href="https://landing.google.com/sre/sre-book/chapters/eliminating-toil/">toil</a>, and strikes the right balance between exciting, cutting edge technologies and maintainability. Our day-to-day tools include:</p><ul><li><strong>Workflow: </strong>Git and Github for version management/code reviews, and <a href="http://clubhouse.io/">Clubhouse</a> for our backlog/iteration planner, with <a href="https://zapier.com/">Zapier</a> to connect our various apps.</li><li><strong>Site Reliability: </strong><a href="https://sentry.io/welcome/">Sentry</a>, <a href="http://datadoghq.com/">Datadog</a>, and <a href="http://www.pagerduty.com/">PagerDuty</a> are there for site reliability monitoring, though thankfully we have a solid Site Reliability Engineering team, so our PagerDuty stays pretty quiet.</li><li><strong>Analytics/Data Pipeline: </strong><a href="https://segment.com/">Segment</a> for collecting and syndicating analytics events, BigQuery as its backend, and Tableau for reporting, with Airflow tying our entire data pipeline together.</li><li><strong>Deployment: </strong>Kubernetes for our container orchestration, which we manage using <a href="https://www.terraform.io/">Terraform</a> and <a href="https://helm.sh/">Helm</a>, and <a href="https://buildkite.com/">BuildKite</a> for our continuous integration system.</li></ul><p>As for languages and frameworks, we’re a polyglot engineering team, though a majority of our products currently rely on a Ruby on Rails monolith. We’re in the process of breaking our monolith up into Go and Ruby microservices, with some gRPC to facilitate some of the communication between them. Our newer front-end applications, such as our <a href="https://www.policygenius.com/life-insurance/">Life Insurance</a> and <a href="https://www.policygenius.com/homeowners-insurance/">Home and Auto</a> product flows, as well as our internal CRM, are React/Redux apps backed by GraphQL APIs.</p><h3>Product Discovery Track</h3><p>Every new feature starts its life as a twinkle in a stakeholder’s eye. That twinkle takes the form of a “north star” OKR, such as “Increase Life Application Bookings”, that are then prioritized on a tertile basis. We plan as a company in tertiles: 4 month periods instead of 3. Sounds weird, I know, but it helps us take larger swings during planning cycles and spend more time iterating.</p><p>Once a team’s “north star” OKR is outlined, the product managers will build a bunch of hypotheses out of user data and interviews. We follow a <a href="https://medium.com/kevin-on-code/dual-track-agile-focusing-on-customer-value-a2e39312585b">dual track development process</a> at Policygenius, with the discovery track amounting to user interviews, user prototype testing, quantitative surveys and focus groups.</p><p>The discovery track is led primarily by Product Managers and Designers, though we strive for engineers to participate by sitting in on occasional user interviews and being very hands-on during solution brainstorming. We believe that engineers, through their knowledge of new technology trends and extensive hands-on exposure to the product, are an important ingredient in conceiving innovative product features.</p><p>Once we start solidifying a solution, we will model out an epic and think through technical decisions and ways to de-risk development through <a href="https://www.visual-paradigm.com/scrum/what-is-scrum-spike/">spikes</a> or workshopping technical designs with engineers from other teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*YU6ihCZKmZ3Gf2H3YMA-Hg.jpeg" /></figure><h3>Product Development Track</h3><p>While all that discovery goodness is happening, Product and Design will outline user stories for it in <a href="http://www.clubhouse.io/">Clubhouse</a> and finalizing high fidelity designs in <a href="http://www.zeplin.io/">Zeplin</a>. Every Thursday, each team has backlog grooming, where user stories are clarified by Product/Design and estimated based on relative complexity.</p><p>We have an Iteration Planning Meeting first thing every Monday, where Product, Design and Engineering on a team sit down and commit to that week’s iteration. Throughout the iteration, engineers will have brief kick-offs with Product and Design to make sure we’re aligned on a feature’s behavior and design. We’ll run daily stand-ups to uncover any blockers or set up some pairing time to share context or unblock a given feature. Once a feature is fully built and supported by some good test coverage, we’ll grab either the Product Manager or Designer on our team for a desk check before requesting a code review from other engineers.</p><p>We use BuildKite for our CI platform, and alongside manual code review, each feature branch runs its suite of unit, integration and feature specs, as well as frontend asset size checks, linting and GraphQL API contract testing before it can be merged. Once merged and on staging, Product and Design accept the feature, and also have nightly user testing done as an additional safeguard against regressions before deploying to production.</p><p>Finally, if the feature is going to be deployed as an experiment, we’ll configure an experiment in <a href="https://www.optimizely.com/">Optimizely</a> or feature flag, depending on the size and complexity of the experiment.</p><h3>Tech Initiatives</h3><p>Outside of feature work and team-specific tech debt work, engineers also have 20% of their time allocated to work that pushes our platform as a whole forward.</p><p>These tech initiatives develop organically, with a given engineer outlining a critical, large area of tech debt or platform optimization, and specifying the scope and underlying value of the given tech initiative. This engineer will recruit other engineers to develop a plan and ultimately solve the tech initiative over the course of a tertile. Some examples of tech initiatives may include building a new user micro-service, creating a streaming data pipeline proof-of-concept, or designing a new testing architecture. Taking this approach to tech initiatives has empowered engineers to make meaningful improvements to our development workflow and grow ourselves as engineers by solving problems outside of our product roadmap. You can find more information on how we’re building a generative work culture through tech initiatives <a href="https://medium.com/policygenius-stories/revisiting-agile-guilds-charter-guilds-59c622d7c987">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*SO1xBrGzPnSnADNno-uZOg.png" /><figcaption>The Policygenius engineering, design and product teams after laser tag</figcaption></figure><h3>We’re Growing!</h3><p>We’ve gathered a pretty great bunch of product, design and engineering folks to tackle some pretty tough problems in the insurance industry. Fun fact: we still need a lot more. If you’re interested in what we have going on here and want to help us on our mission to make insurance suck less, mosey on over to our careers page to see if something fits.</p><p><a href="https://boards.greenhouse.io/policygenius">Policygenius Careers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a72d37e7e506" width="1" height="1" alt=""><hr><p><a href="https://medium.com/policygenius-stories/policygenius-day-in-the-life-software-engineer-a72d37e7e506">Policygenius Day-in-the-Life: Software Engineer</a> was originally published in <a href="https://medium.com/policygenius-stories">Policygenius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>