<?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 Justin Pollard on Medium]]></title>
        <description><![CDATA[Stories by Justin Pollard on Medium]]></description>
        <link>https://medium.com/@justinpollard?source=rss-d7a79b52bd8c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fCTtr3ShahA9wrJtQS1mOA.jpeg</url>
            <title>Stories by Justin Pollard on Medium</title>
            <link>https://medium.com/@justinpollard?source=rss-d7a79b52bd8c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 19:52:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@justinpollard/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[The Hard Questions: thoughts after 3 years at Zumper]]></title>
            <link>https://medium.com/@justinpollard/the-hard-questions-thoughts-after-3-years-at-zumper-8c52110cd240?source=rss-d7a79b52bd8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c52110cd240</guid>
            <category><![CDATA[company-values]]></category>
            <category><![CDATA[core-values]]></category>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Justin Pollard]]></dc:creator>
            <pubDate>Sat, 22 Jul 2017 23:51:27 GMT</pubDate>
            <atom:updated>2017-07-22T23:51:27.220Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is a speech I delivered to my colleagues on July 21st, 2017, my 3-year anniversary at Zumper, Inc.</em></p><p>Wow! It’s been three years since I started at Zumper. A couple fun facts: 1) I’ve been employed here longer than any company before this (second place comes in at under two years), and 2) Zumper is the largest company I’ve ever worked for by almost two times. It’s astonishing to think that when I started here, the entire company was just 12 people: three founders and nine employees.</p><p>While it’s been three years since my first day at this job, it’s been three years, one month, and 19 days since my former company, another startup, gathered the last of its employees in a conference room and let us know it was all coming to an end. Recalling this fact has caused me to reflect on why I’m standing in this office today and not that cavernous, former wine cellar in the Mission District where I once worked.</p><p>I think there are a lot of answers to that question, all of which hold some truth: we had a rather inexperienced team, we didn’t have the funding that we needed, our technology didn’t meet expectations, we had tried to disrupt an industry protected by staunch barriers to entry. I’m sure my former colleagues could name dozens more.</p><p>Still, I see these issues more as symptoms of a systemic and important problem: as a group, we didn’t ask the hard questions. I’m wearing this shirt today to remind me of that (<em>I was wearing my former company’s t-shirt</em>). And I hope it will remind all of us that Zumper is still alive right now, because up until this point, we’ve done a relatively better job at asking hard questions.</p><p>Sometimes these questions are hard because discovering the answers to them is hard. Everyday, our growth team asks “How do we set our organization on the path to doubling traffic year-over-year?” Everyday, our backend engineers ask “How do we build our platform to scale elegantly and fail gracefully?” Everyday, our Select team asks “How do we develop processes that will enable us to achieve what now look like imposing lease goals?” Answering each of these questions, and those that the rest of us ask day in and day out, is crucial to building Zumper into the impactful and valuable company that we all hope it will become.</p><p>Beyond these job-related puzzles, though, is another category. These are the questions that are hard not because answering them is hard, but because we’re fearful of what the answers may be. These are the nagging inquiries that cause us to wake up in a cold sweat wondering if we’ve set the right course; the questions and decisions that try our integrity, test our morality, and strain our courage. They define who we are as individuals and define our culture as a company.</p><p>These questions are sometimes hard to pinpoint beforehand because most of the time they’re situational in nature. Still, you know when one’s been asked of you because you’ll think to yourself “What is the right thing to do?” And the difficulty often lies in that the right thing to do, the answer to that question, is much harder than simply not asking it in the first place. Don’t be mistaken, though; asking these questions of yourself, and of your colleagues, is paramount as Zumper grows from a startup into a company that makes a real impact on our industry.</p><p>So, as I embark on a new year at Zumper, I encourage all of you, whether CEO, team lead, or most importantly, individual contributor, to remind yourselves to ask the hard questions and to be prepared when hard questions are asked of you. Don’t cower at the challenge, but embrace the opportunity to lead. While the tests will only continue to get more challenging, it’s crucial to Zumper’s success that we continue to ask, and answer, the hard questions when called upon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c52110cd240" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Legal from State to State]]></title>
            <link>https://medium.com/@justinpollard/legal-from-state-to-state-a2d32330f1a2?source=rss-d7a79b52bd8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2d32330f1a2</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[rxjava]]></category>
            <dc:creator><![CDATA[Justin Pollard]]></dc:creator>
            <pubDate>Tue, 15 Dec 2015 21:42:33 GMT</pubDate>
            <atom:updated>2015-12-15T21:43:15.782Z</atom:updated>
            <content:encoded><![CDATA[<h4>Avoiding IllegalStateExceptions using RxJava and RxLifecycle</h4><p><em>Originally posted on </em><a href="https://www.zumper.com/blog/2015/12/legal-from-state-to-state-avoiding-illegalstateexceptions-using-rxjava-and-rxlifecycle/"><em>Zumper’s blog</em></a></p><p>Like most of its Android counterparts, <a href="https://play.google.com/store/apps/details?id=com.zumper.rentals">Zumper’s consumer app</a> retrieves data from the Internet to back nearly every single view. Generally, the protocol is simple: when a user visits a certain section, the Zumper app makes a network call in <strong>onCreate()</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/805bf7c639114e5bfa0cf014c8195df1/href">https://medium.com/media/805bf7c639114e5bfa0cf014c8195df1/href</a></iframe><p><em>Note: our API layer is essentially a wrapper around </em><a href="http://developer.android.com/training/volley/index.html"><em>Google’s Volley networking library</em></a><em>.</em></p><p>In a perfect world awash with infinitely fast internet and herculean backend computational power, API requests like the above complete just as soon as they’re initiated; whatever we want to do in <strong>onResponse()</strong> or <strong>onErrorResponse()</strong> happens instantaneously.</p><p>Obviously, we don’t live in a perfect world and all of our apps have to cope with less than ideal network reliability and latency. For the most part, we can get away with asking our users to wait a tic for data to load from the network. In general, this strategy is low-risk; users are willing to sit tight for a few seconds before leaving. But what about those that do end up navigating away? This use case becomes a problem in the somewhat common case that you need to display a <strong>Fragment</strong> or <strong>DialogFragment</strong> in one of your callback methods.</p><p>Let’s take a look at an example from Zumper’s consumer app. One of our main selling points is our in-app identity verification and credit report functionality, by which a user can obtain her credit report from her Android (or iOS) device. After obtaining a credit report, a Zumper user can access her score at any time, but only after creating a secure session:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S7Vt-XOVbIo0Qg7c.png" /></figure><p>From a networking perspective, the process looks relatively simple:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b367459deeff0954795a5b753f42c760/href">https://medium.com/media/b367459deeff0954795a5b753f42c760/href</a></iframe><p>While the back and forth between the client and server is pretty speedy, the architecture above leaves us open to an <strong>IllegalStateException</strong> if the user does something that causes the containing <strong>ViewCreditReportFragment</strong><em> </em>to save its state, like navigating away from the view. Why? When the app calls <strong>CreditAuthDialogFragment.show()</strong>, the <strong>childFragmentManager</strong> uses its <strong>checkStateLoss()</strong> method to ensure that the UI change (i.e. displaying the dialog window) will not be lost across <strong>Activity</strong> destruction and recreation (1):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d743f5a5ef1c865e0e4d38f1ee605c95/href">https://medium.com/media/d743f5a5ef1c865e0e4d38f1ee605c95/href</a></iframe><p>So, when does the <strong>FragmentManager</strong> save our <strong>ViewCreditReportFragment</strong>’s state? According to the <a href="http://developer.android.com/reference/android/app/Fragment.html#onSaveInstanceState(android.os.Bundle)">documentation</a>, state can be saved any time before <strong>onDestroy()</strong>. Looking into the issue further, you’ll find a comment in the <strong>FragmentManagerImpl.saveAllState()</strong> method that indicates state is saved after pausing (2). From a practical perspective, the safe assumption is that state is saved when a <strong>Fragment</strong> moves out of view (3).</p><p>What can we do to avoid this crash? Based on the discussion above, when we want to commit a <strong>FragmentTransaction</strong> (e.g. when we want to call <strong>DialogFragment.show()</strong>), we need to make sure that our <strong>ViewCreditReportFragment</strong> hasn’t yet been paused. To this end, we’ve relied heavily on the <a href="https://github.com/ReactiveX/RxJava">RxJava</a> and <a href="https://github.com/trello/RxLifecycle">RxLifecycle</a> libraries to ensure that we don’t commit <strong>FragmentTransaction</strong>s after state is saved. The magic, so to speak, lies in the combination of RxJava’s <strong>Observable.compose()</strong> method with RxLifecycle’s <strong>RxLifecycle.bindFragment()</strong> method.</p><p>To incorporate this reactive functional wizardry (thanks Netflix!), we began rewriting our networking APIs to take advantage of <strong>Observable</strong> streams, RxJava’s basic building block. The transformation resulted in something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a69541cf980bf21c60d40e2264c82c2b/href">https://medium.com/media/a69541cf980bf21c60d40e2264c82c2b/href</a></iframe><p>To incorporate the RxLifecycle piece (shoutout to Trello for this one!), we retrofitted Zumper’s base parent <strong>Fragment</strong> to communicate its lifecycle via calls to a <strong>BehaviorSubject</strong>, the very same <strong>BehaviorSubject</strong> that is passed into <strong>RxLifecycle.bindFragment()</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a640510296be1ce7f185b3263838c313/href">https://medium.com/media/a640510296be1ce7f185b3263838c313/href</a></iframe><p>Now, whenever Zumper’s consumer app makes a call to the network within a <strong>Fragment</strong>, whether in a lifecycle method or elsewhere, we use our nifty <strong>Observable</strong> APIs and bind them with the lifecycle of the <strong>Fragment</strong> using <strong>compose()</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/df069a4b0472c3eca94934489e41e3cc/href">https://medium.com/media/df069a4b0472c3eca94934489e41e3cc/href</a></iframe><p>This design pattern results in a syntactically concise and elegant solution to a ubiquitous problem. While we haven’t finished the migration quite yet, we’ve essentially eliminated <strong>IllegalStateException</strong>s where we’ve used this model, resulting in a more stable and fulfilling user experience. To boot, our adoption of reactive functional APIs has enabled more declarative and flexible code, especially where collection manipulation or multiple network calls are required in sequence. But that, my friends, is a story for another day.</p><p><em>Footnotes:</em></p><ol><li>See <a href="http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html">Alex Lockwood’s post</a> on the matter for more information on `FragmentTransaction`s, state loss, and `IllegalStateException`s.</li><li>State is saved after pausing in Android API 11 (Honeycomb) and above. Before that, state was saved before pausing.</li><li>There are exceptions, e.g. within a ViewPager.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2d32330f1a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>