<?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 Brandon on Medium]]></title>
        <description><![CDATA[Stories by Brandon on Medium]]></description>
        <link>https://medium.com/@brandonmp?source=rss-94f744172c84------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6QtWS6suYUb-U5uITDF5Dg.jpeg</url>
            <title>Stories by Brandon on Medium</title>
            <link>https://medium.com/@brandonmp?source=rss-94f744172c84------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:59:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brandonmp/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[Building products you can measure]]></title>
            <link>https://medium.com/@brandonmp/building-products-you-can-measure-70bc3a3b7325?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/70bc3a3b7325</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[product]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Sun, 19 Jan 2020 02:55:00 GMT</pubDate>
            <atom:updated>2020-01-19T02:55:00.398Z</atom:updated>
            <content:encoded><![CDATA[<h3>Designing &amp; building products you can measure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x91btghe8cLW8b1-q3q6SQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@dtravisphd?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">David Travis</a> on <a href="https://unsplash.com/s/photos/measure?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Every product team I know swears by “data-driven decision-making.”</p><p>In broad strokes, that process might look something like this:</p><ol><li>Study how your users use your product</li><li>Form a hypothesis about what to build next</li><li>Do / build as little as possible to collect the data needed to test that hypothesis</li><li>Measure, repeat</li></ol><p>Pretty straightforward. In practice, though, even the most rigorous product teams cut corners here, relying on intuition instead of data. The gains from those shortcuts can be short-lived, though, and poorly researched decisions can create re-work we could’ve avoided by doing our homework upfront. “Measure twice, cut once” and all that.</p><p>Some companies try to prevent this sort of design-by-gut with rigorous review processes, demanding numbers before engineering resources are granted. This can work wonders in a bigger company, but the overhead it adds makes it much less practical for a smaller company.</p><p>Over the years, I’ve found a nice middle ground in simply making my products easier to measure. The core idea here isn’t terribly profound: make measuring product results easier, and we’re less likely to skip it.</p><h3>The basics of event tracking</h3><p>My experience is mostly with web applications, but I think most of these ideas should translate pretty well to any user interface.</p><p>The most basic form of measurement with web applications is the page view. When a user lands on a certain URL, a bit of data is sent to a server somewhere detailing who that user is and what the page was about. This is basically how Google Analytics works.</p><p>For more complex web applications, simple page view tracking usually isn’t enough. Depending on your app, your user might have a dozen different actions or intents on a single view in your app — all without triggering a page transition.</p><p>This is where “custom events” come into play. With custom events, we can send arbitrary data to a server whenever we want, not just when the user changes pages.</p><p>Now, we <em>could</em> use Google Analytics<em> </em>to track custom events, but it’s not really the best tool for the job. Instead, we look to tools built specifically for the task: Amplitude (my favorite), Mixpanel, etc. These tools offer much more robust support of custom event tracking, and really should have a prominent place in the toolbox of any data-driven team.</p><h3>Tip 1: Make user event tracking the default</h3><p>The downside of custom event tracking is that it typically takes engineering time to define the conditions and details of an event. When engineering hours are in short supply, this can be a major roadblock to proper product measurement.</p><h4>Track everything</h4><p>We can get around this roadblock by building our product in a way that creates user event data with <em>every</em> deliberate action the user takes. That is, <em>if </em>your analytics solution supports this feature.</p><p>Some solutions, like <a href="https://heap.io/">Heap Analytics</a>, put this “track everything” philosophy at the core of their product, tracking every single move your users make. In my experience, this is a fantastic solution if your app has a pretty straightforward interface (like an e-commerce site), but not so great if your app has a lot of dynamic context (like a chat app).</p><h4>Make every event a page view</h4><p>If this sort of omni-tracking solution isn’t an option, your engineers might be able to help by connecting app events to the URL. To explain what I mean, consider a web app with a simple modal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*LZ5_5imIuvRTdTRotltz0g.gif" /></figure><p>In most single page application architectures (which is likely what you have if you’re using Vue, React, Angular, etc.), the developer can choose to open this modal either by changing the URL of the page or by updating a variable in the program that’s invisible to the user.</p><p>When faced with this decision, I almost always prefer the URL. This is because you’re most likely already tracking page views, so an event is being sent whenever the URL changes. This means that when a user opens the modal, a user event records a page hit for the /app/modal route without any additional effort from the engineer.</p><p>Of course, there are trade-offs here, and you should trust your engineers’ advice on how to navigate those trade-offs.</p><h3>Tip 2: Single responsibility principle for UIs</h3><p>The “single responsibility principle” is a software engineering convention that basically states a thing should do one thing, and do it really well. This is helpful for writing more modular and maintainable code, but it’s useful in UI design as well.</p><p>Forms are a great example here. Imagine your team had to build a form, and they’ve elected to keep everything in a single page.</p><p>It’d be pretty easy to track how many users started &amp; submitted the form. But which form questions see the most users drop-off? How long does each question take? Which charts do users care about the most? Adding tracking events to answer those sorts of questions might add ugly complexity to the form’s code, making it harder to build &amp; maintain.</p><p>Now, consider a form implemented using <a href="https://www.typeform.com/">Typeform’s </a>signature style:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*Qp7iexUH8RwYUzpTbXF85Q.gif" /></figure><p>If we were to build a form like that, our engineering team could put each question at a separate URL, giving us free page view events with every question (since we’re likely already tracking page views).</p><p>Of course, you might reasonably argue that this compromises UX, and makes the product less user-friendly. While this may be true in some cases, the goal here is to build better products in the long run. Since data helps us do that, this might be a trade-off worth considering.</p><h3><strong>Action gating</strong></h3><p>Re-arranging content (as in the last example) is a great use of a product design tactic I call “action gating.” To illustrate this concept, consider LinkedIn’s profile page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*aZLGqgQnd7_pXrr3ajq4xQ.png" /></figure><p>Like the form above, we can easily count how many users view this page, but how could we determine which info visitors cared about the most? Our best bet would be to try and detect where the visitor’s attention was (e.g., with scroll position), but in my experience, this is unreliable.</p><p>Now consider LinkedIn’s UI for getting someone’s contact info. Note how they’re making users perform an action before handing over the info:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*LY8249MUOYSeRnJmMlPK4w.gif" /></figure><p>It’s now <em>perfectly</em> clear what the user’s intent was. This is the nice thing about action gating: because we’re making the user declare their intent with their actions, it takes most of the guess work out of divining user intent.</p><p>Again, there are trade-offs with the user experience to consider here, so use your best judgment.</p><h3>The scourge of under-used features</h3><p>I’ve never seen a product that didn’t have features that users ignored. Too many underused features can add friction to a product’s UX, but worse, they can be a drag on the product team. No team likes working on features that users don’t care about.</p><p>We know that rigorous measurement can keep these underused features out of our products, but sometimes it’s hard to practice what we preach. By making small adjustments like the ones outlined here, though, we can make measurement second nature, keeping our products and teams lean &amp; mean.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70bc3a3b7325" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Hasura saved us $50,000]]></title>
            <link>https://medium.com/@brandonmp/how-hasura-saved-us-50-000-7cfe8e7909e9?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cfe8e7909e9</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Wed, 14 Aug 2019 19:10:00 GMT</pubDate>
            <atom:updated>2019-08-15T17:22:25.125Z</atom:updated>
            <content:encoded><![CDATA[<p><em>We recently decided to use a GraphQL solution called Hasura on a big project. Thanks to Hasura, we completed the project with 1.5 engineers in just over a month, a savings of around $50k compared to contractors’ quotes. This article explains what Hasura is and why we chose it.</em></p><p>Recently, we decided to build a realtime chat web app from scratch. Our requirements were about what you’d expect: it had to be realtime, support a standard set of chat features, and use our front-end stack of React, TypeScript, and Apollo.</p><p>Since the project was relatively self-contained, we decided to solicit bids from contractors. We spent a few weeks drafting a spec, then reached out to a range of contractors ranging in size from solo developers to large studios.</p><p>The quotes we got back were surprising: the bids ranged from $70 — $170k, and anywhere from 6–10 weeks of development time for teams of 1–3 developers.</p><p>These bids were <em>much </em>higher than we’d expected, so we went back to our spec &amp; tried to understand what contractors were seeing that we weren’t. We reasoned that the bulk of work stemmed from two pieces of the app: the backend, and the client-side challenges presented by creating a realtime app with Apollo (which, for all its charms, still hasn’t nailed the ergonomics of their subscriptions system).</p><p>We decided to in-house the project, but we wanted to find a way to minimize the complexity burden of these two requirements. The real-time requirement prompted us to take a look at Firebase, which, to its credit, is sort of a household name when it comes to realtime.</p><p>But Firebase comes with flexibility tradeoffs we weren’t ready to make . While the details of those tradeoffs are out of scope for this article (you can read some of those details in this <a href="https://medium.com/@brandonmp/firebase-you-2017-ed-81462ef8775f">comparison of GraphQL and Firebase</a>), they were pretty similar to the 2-pronged Faustian bargain most BaaS offer:</p><ol><li><strong>Lock-in: </strong>most BaaS require adopting a certain data model, using a proprietary SDK, or some other form of lock-in.</li><li><strong>Long-term support: </strong>if the service shuts down, users may be left holding the bag.</li></ol><p>Like many (most?) startups, we weren’t ready to make those compromises.</p><p>Then, almost on a lark, we took a look at Hasura.</p><p>Hasura markets their product as a “GraphQL-out-of-the-box.” It’s a standalone server that sits between your database &amp; client. This differentiates Hasura from other offerings (like <a href="https://www.prisma.io/">Prisma</a>), and puts it closer in spirit to projects like <a href="https://www.graphile.org/postgraphile/">PostGraphile</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*pg35-7rvK0G3gT-p" /><figcaption><em>Source: </em><a href="https://blog.hasura.io/hasura-vs-prisma-9ffc7271eda8/"><em>Hasura vs. Prisma</em></a><em> at hasura.io</em></figcaption></figure><p>To set Hasura up, you simply point it at your Postgres instance &amp; launch it. Things get a bit more tricky if you’re pointing Hasura at a pre-existing Postgres instance, but in general, it’s pretty painless.</p><p>From there, you manage your schema via the Hasura GUI. As you add entities to your database model, Hasura creates just about every GraphQL query, mutation, subscription, and parameter you might possibly need.</p><p>Since it was FOSS and self-hosted, we knew Hasura wasn’t as much a risk as a BaaS offering like Parse (or any of the other BaaS that’ve shuffled off this mortal coil over the past decade). Still: nothing’s free, so we figured the convenient abstractions Hasura offered would come with most of the same tradeoffs as a regular BaaS.</p><p>We’re happy to report that we were wrong. Here’s why.</p><h3>Lock-in</h3><p>We sought to measure how much lock-in Hasura brought by estimating how much time it’d take to migrate away should the need arise somewhere down the line.</p><p>To quantify this, it’s important to understand precisely how Hasura works. If you know GraphQL, you might reasonably assume that, under the hood, Hasura’s creating custom resolvers for every mutation, query, subscription, etc.</p><p>Were this the case, it’d mean that migrating away from Hasura would involve writing code for dozens of new resolvers that produced exactly the same results as Hasura’s dynamically generated resolvers. That’d make the cost of migrating away (and, therefore, the lock-in) massive.</p><p>But this isn’t how Hasura works. Instead, every GraphQL operation you send to the server is transpiled to raw SQL.</p><p>For example, consider this GraphQL query that fetches the roles of a user with an ID of 2:</p><pre>app_users(<em>where</em>: { id: { _eq: 2 } }) {<br>     roles {<br>          role {<br>               id<br>               name<br>          }<br>     }<br>}</pre><p>Using the query analyzer built-in to the Hasura GUI, we can see the exact SQL being generated against our schema <em>and</em>, as an added bonus, the results of Postgres’ ANALYZE command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hzC7dBOrixOwJXZX" /><figcaption>The SQL and ANALYZE output for a Hasura-generated GraphQL Query</figcaption></figure><p>This is about as transparent as I think a product like Hasura can hope to be. There’s very little “magic” happening, so swapping Hasura for another solution in the future should be straightforward. This was enough to address our concerns about lock-in.</p><h3>Efficiency gains</h3><p>We weighed the lock-in “costs” of Hasura against the value it’d add to our productivity. For us, most of the value stems from three key features.</p><h4>Proximity to Postgres’ features</h4><p>Before Hasura, most of the server-side code we wrote was simply translating client data needs into SQL queries using an ORM. This code was usually tedious to write &amp; maintain — precisely the sort of boilerplate commodity code we wanted to avoid. Having a human write this sort of code instead of a machine created very little marginal value for our business (to be clear: this of course isn’t true of all resolvers, but ours were especially vanilla and boring CRUD ops).</p><p>With Hasura, we get a practically full suite of SQL tools right in the client, reducing our server-side code load to near zero. The auto-generated API covers not only simple tasks — like writing WHERE arguments, sorting, traversing relationships, etc. — but also more specialized tasks, like performing CRUD operations <em>inside</em> of JSON[B] fields, or filtering entities based on the results of multi-table JOIN queries.</p><p>At its best, Hasura makes front-end development feel like the declarative future we were promised when GraphQL was released: simply state the data requirements of your UI, and let a library handle everything else.</p><h4>Subscriptions as Live Queries</h4><p>For a product with real time requirements, Hasura’s subscriptions might be the killer app.</p><p>Subscriptions in Apollo have always worked a bit differently than I think many developers expect. When I first learned about them, I assumed they’d mimic Firebase’s always-up-to-date functionality — i.e., if I write a query for a chat’s messages, and those messages change, my client should update automatically. This pattern’s often called “live query.”</p><p>The reality was a little less simple. Instead of delivering always up-to-date results, subscriptions simply alert the listener that a specific thing has happened. For example, an onNewMessage subscription might tell the client that there was a new message, but it’s the client’s responsibility to merge that new message with the messages already in cache.</p><p>While Apollo provides <a href="https://www.apollographql.com/docs/react/advanced/subscriptions/#subscribetomore">some convenience methods</a> to help with this post-event cache update, in practice, it’s still a huge pain to implement. We found that this often made it easier to simply resort to long-polling (trivial with Apollo’s pollInterval prop).</p><p>Hasura appears to have gone their own way with subscriptions, though, choosing instead to make them bona fide live queries. I’m not exaggerating when I say this cut our network layer code (e.g., Apollo queries &amp; the requisite container components) by at least a third within the client.</p><p>I should note here that this feature isn’t without its compromises. For example, we still haven’t quite figured out how to do optimistic UI updates with &lt;Subscription&gt; components. It’s also not clear how future changes to react-apollo might impact Hasura’s non-conventional subscription implementation. For now, though, these are trade-offs we’re happy to make.</p><h4>Escape hatches</h4><p>At some point between the client and the database, data has to be transformed from the database model to the shape the UI expects. In a conventional architecture, these transformations often live on the server.</p><p>Because BaaS don’t typically let developers write their own logic, any necessary data transformations are off-loaded to the client. We prefer to keep our clients limited to simply rendering views, so we try to avoid this sort of complexity.</p><p>Fortunately, Hasura has a respectable collection of escape hatches. Besides remote schemas (a feature also available in a few GraphQL solutions), Hasura offers a clever feature: create any view or stored procedure, and Hasura can automatically generate GraphQL operations.</p><p>Subjectively, complex data transforms are far easier to write and maintain in SQL than they are in JavaScript or TypeScript. Being able to go from creating the view to querying it in the client in mere seconds feels feels almost like cheating.</p><h4>Honorable mention: migrations</h4><p>Hasura emits migration files whenever you make a change to the schema via the GUI. These migrations can be applied at server start-time auto-magically, which promises a full CI/CD migrations workflow right out of the box.</p><p>We’re stoked about this promise, but we haven’t yet had the time to try it out, so we can’t say yet whether or not it delivers.</p><h3>Conclusion</h3><p>We’ve found that for every additional piece of architecture a feature requires us to touch, the time to complete that feature rises non-linearly. Before Hasura, adding a simple button to our UI usually required making changes to the client, modifying our GraphQL server, updating the database, deploying the migrations, and writing / updating tests for every piece of that chain.</p><p>Now, that same button is simply a matter of updating the client, clicking a few things in the Hasura UI, then testing &amp; deploying. We’ve cut the amount of server code we have to maintain by 2/3rds, allowing us to spend that time building more cool stuff for our users.</p><p>We expect we’ll uncover blemishes in the product as we stretch its legs, but for now, Hasura lets our engineers focus on building better interfaces for our users.</p><p>Cresta’s an a16z-backed AI startup born in the labs at Stanford. We’re solving hard problems at the intersection of natural language AI and human-computer interaction. If that’s up your alley, <a href="/service/mailto:bp@cresta.ai">drop us a line</a> or <a href="http://www.cresta.ai/careers/?utm_source=blog&amp;utm_medium=medium&amp;utm_campaign=content&amp;utm_content=hasura">check out our jobs page</a>.</p><p><em>Special thanks to Alex Roe for helping revise this article.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cfe8e7909e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What the hell is Prisma, the GraphQL thing?]]></title>
            <link>https://medium.com/@brandonmp/what-the-hell-is-prisma-the-graphql-thing-4e30b0c6c65b?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e30b0c6c65b</guid>
            <category><![CDATA[graphcool]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Tue, 06 Mar 2018 19:43:56 GMT</pubDate>
            <atom:updated>2018-03-06T20:16:49.430Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zM7vhbfYTmN_J3wD." /><figcaption>Watermark, shwatermark</figcaption></figure><p>With the <a href="https://blog.graph.cool/introducing-prisma-cloud-a-graphql-database-platform-ed591baa8737">launch of Prisma Cloud</a> today, the ecosystem of products around GraphQL can feel a little muddled. In this post, I’ll try and clear-up what’s what by explaining how Prisma fits into our stack.</p><p><em>For the sake of disclosure: I work for my girlfriend, my users, and my cats, but not for Prisma or any other company named here.</em></p><h3>How we got here</h3><p>To understand what value Prisma brings, we’ll need to understand what came before, the problems it had, and how Prisma tries to solve them.</p><h4>A generic web application stack</h4><p>This is a generic web app:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*5sP4rcNhTEW2IAo7BcYRKw.png" /><figcaption>Hopefully, your database’s garbage collection works a little better than the one pictured.</figcaption></figure><p>When the user wants to read about rare catnip, the client sends a request to the server’s /catnip endpoint, the server asks the database for data, combines that data with formatting, etc., then sends it to the client. No big deal.</p><h4>The ‘sghetti Stack</h4><p>Servers add end points as they grow, and eventually, you might have a <em>lot</em> of endpoints communicating with a <em>lot</em> of parts of your app. A lot of people are saying this is called the Spaghetti Stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*XpABJUH4XUuJVsBvHEg2lQ.png" /><figcaption>Obviously this stack wasn’t dog-fooded</figcaption></figure><h4>The GraphQL Stack</h4><p>To save you from endpoint hell, Facebook invented GraphQL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*gcRrPnjXURFDQbkADwjaaA.png" /><figcaption>Still pasta, but nicer.</figcaption></figure><p>Instead of sending requests to REST endpoints, now your clients can send their requests to a GraphQL server who knows where you keep all your datas, how tables relate to each other, etc.</p><p>The client still requests complex combinations of data from the server, but thanks to GraphQL, they’re all sent in a neat, orderly fashion instead of being sent all willy-nilly.</p><p>The GraphQL stack isn’t all sunshine &amp; rainbows, though. Teaching the GraphQL server where all of your data is &amp; how to fetch it (via a ‘GraphQL schema’ and ‘resolvers,’ respectively) can get tricky, which puts a damper on GraphQL’s promised simplicity.</p><h4>GraphQL? There’s a SaaS for that.</h4><p>Well, technically, a <a href="https://medium.com/@brandonmp/firebase-you-2017-ed-81462ef8775f">GraphQL BaaS</a>. Several startups built offerings atop the GraphQL architecture that gave users the client-side bliss of GraphQL without the (arguably) complex task of setting-up a database, server, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*RTTstiq_Jx_iLWB4Tnb7rg.png" /><figcaption>A lighter fare</figcaption></figure><p>Some GQLaaS services have already closed-up shop. One of the first GQLaaS companies, <a href="https://www.graph.cool/">Graphcool</a>, became something of a staple in the open source community surrounding GraphQL.</p><h4>The BYODB stack</h4><p>So, that’s neat, but what if you love SQL, dislike BaaS, and don’t want to worry about setting-up your own GraphQL server?</p><p>Hey, great news: that’s where Prisma, the new offering from the Graphcool team, fits. Prisma, along with the open-source PostGraphile (né PostGraphQL), and AWS’ nascent AppSync, all sit at a sort of hybrid space between DIY and full-blown BaaS:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*Y2tRyDLILRHePBZ-WRU0fg.png" /><figcaption>I’m also available for freelance process diagram consulting, btw</figcaption></figure><p>Quick note: AWS AppSync has more BaaS-style features than Prisma or PostGraphile, and of the three, is the only one built to be used as a full-blown BaaS, but for the purposes of this discussion, I’m just focusing on AppSync’s data layer functionality.</p><h3>How do they work?</h3><p>You can think of these products as a sort of auto-generated API for your database. They provide a GraphQL endpoint through which to access your data, as well as handy filtering capabilities so your client can slice &amp; dice data without having to write a ton of boilerplate queries.</p><p>Your clients query that endpoint, and Prisma / AppSync / PostGraphile return the data. Crucially, you have the option of short-stopping queries &amp; doing stuff in-flight or in-response (e.g., input validation, PubSub alerts, etc.).</p><h4>Hosting</h4><p>AppSync lives entirely in the cloud. PostGraphile is self-hosted only, and Prisma can be self-hosted <em>or</em> cloud-hosted.</p><h4>Learning your database</h4><p>PostGraphile will learn your existing PostgreSQL database, while Prisma and AppSync both exercise more control over your database schema (and, therefore, require a bit more work to set-up with existing databases).</p><p>Prisma &amp; AppSync, in fact, will create tables in your database on your behalf, allowing you to write <em>only</em> a simple GraphQL schema, and spare you some of the trouble of database management.</p><h4>Extra stuff like authentication, email, etc.</h4><p>Of course, there are a lot of ancillary functions you’ll need for an app (authentication, authorization, etc.). In the case of AppSync, these features are baked-in via integrations with other AWS services (Lambda &amp; Cognito).</p><p>With PostGraphile and Prisma, though, you’ll likely be setting up your own GraphQL server. But, (a) both products solve a <em>lot</em> of the pain points of running a GraphQL server, and (b) with cool stuff like <a href="https://www.apollographql.com/docs/graphql-tools/schema-stitching.html">Apollo’s Schema Stitching</a>, it takes just a few dozen lines of code to mesh several GraphQL schemas into a single unified endpoint.</p><h4>Limitations</h4><p>At the moment, PostGraphile works only with PostgreSQL, AppSync only works with DynamoDB, and Prisma only works with MySQL. Of these, Prisma is the only one (AFAIK) to have plans for other databases.</p><p>So there you go: Prisma talks to your database <em>so you don’t have to</em>.</p><p>Since you’ll need to manage your own database, and (probably) set up your own GraphQL server, the product isn’t as hands-off as Graphcool or other BaaS. But the ability to host your own service, bring your own database, and SQL your own SQL will definitely give plenty of users reason to consider giving Prisma a shot.</p><p>I hope this cleared-up a bit of the mystique around products like Prisma &amp; their use cases. If not, post a question / personal attack in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e30b0c6c65b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Browsing the web like a badass]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@brandonmp/browsing-the-web-like-a-badass-fa3a9c51ea5e?source=rss-94f744172c84------2"><img src="https://cdn-images-1.medium.com/max/600/0*ZDDJz5V_fxxKq6OO.png" width="600"></a></p><p class="medium-feed-snippet">Tips, hacks, and tricks for people who are okay at computers</p><p class="medium-feed-link"><a href="https://medium.com/@brandonmp/browsing-the-web-like-a-badass-fa3a9c51ea5e?source=rss-94f744172c84------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@brandonmp/browsing-the-web-like-a-badass-fa3a9c51ea5e?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa3a9c51ea5e</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[firefox]]></category>
            <category><![CDATA[chrome]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Sat, 17 Feb 2018 18:24:01 GMT</pubDate>
            <atom:updated>2018-02-17T20:03:45.088Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[“The issue’s complicated,” say teens huddled in closet eluding shooter]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@brandonmp/the-issues-complicated-say-teens-huddled-in-closet-eluding-shooter-20659a71c598?source=rss-94f744172c84------2"><img src="https://cdn-images-1.medium.com/max/1500/1*3Yh-BReiONjqHecEI0NEgQ.png" width="1500"></a></p><p class="medium-feed-snippet">Out of the mouths of babes,fresh new insight into a stale topic</p><p class="medium-feed-link"><a href="https://medium.com/@brandonmp/the-issues-complicated-say-teens-huddled-in-closet-eluding-shooter-20659a71c598?source=rss-94f744172c84------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@brandonmp/the-issues-complicated-say-teens-huddled-in-closet-eluding-shooter-20659a71c598?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/20659a71c598</guid>
            <category><![CDATA[guns]]></category>
            <category><![CDATA[satire]]></category>
            <category><![CDATA[america]]></category>
            <category><![CDATA[gun-violence]]></category>
            <category><![CDATA[gun-control]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Fri, 16 Feb 2018 17:56:19 GMT</pubDate>
            <atom:updated>2018-02-17T02:00:53.272Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[When marketers lie]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@brandonmp/when-marketers-lie-3ad6d6b38c7f?source=rss-94f744172c84------2"><img src="https://cdn-images-1.medium.com/max/1057/1*KQvlndV5ftLIbthiMlBsNg.png" width="1057"></a></p><p class="medium-feed-snippet">Official mail</p><p class="medium-feed-link"><a href="https://medium.com/@brandonmp/when-marketers-lie-3ad6d6b38c7f?source=rss-94f744172c84------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@brandonmp/when-marketers-lie-3ad6d6b38c7f?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ad6d6b38c7f</guid>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[marketing-automation]]></category>
            <category><![CDATA[email-marketing]]></category>
            <category><![CDATA[marketing-strategies]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Mon, 29 Jan 2018 23:12:58 GMT</pubDate>
            <atom:updated>2018-01-31T16:12:25.534Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The top 6 ways to get screwed by an internet apartment ad]]></title>
            <link>https://medium.com/wayhome-apartments-homes-communities/the-top-6-ways-to-get-screwed-by-an-internet-apartment-ad-e03af5d3b2cd?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/e03af5d3b2cd</guid>
            <category><![CDATA[real-estate]]></category>
            <category><![CDATA[boston]]></category>
            <category><![CDATA[apartments]]></category>
            <category><![CDATA[fraud]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Fri, 21 Jul 2017 20:53:01 GMT</pubDate>
            <atom:updated>2017-07-22T00:15:58.420Z</atom:updated>
            <content:encoded><![CDATA[<h4>Younger readers may be surprised to learn that getting tricked on the internet long predates online-dating sites. Here we explore one possible ‘ground-zero’ of internet hustles: online real estate ads.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kTWqfXQHJwkL4bPois6WpA.png" /><figcaption>…probably</figcaption></figure><p>At Wayhome, helping people see past the nonsense of internet real estate ads is how we keep the lights on, so we try to stay up-to-date on all the latest scams &amp; hustles. We’ve written before about <a href="https://blog.wayhome.io/wayhome-now-shows-you-secret-photos-of-houses-and-apartments-2a1848ee435b">apartment listings that over-promise &amp; fail to deliver</a>, but today we’re going to cover listings of a more nefarious bent.</p><p>Before we get started, if you’re the type of apartment-shopper who doesn’t like to get screwed, we’ve got good news. Today, we released a new feature: Wayhome Scam Alerts. It’s pretty simple: if one of our users finds something fishy in a real estate listing, or in dealing with an agent/landlord, we alert other users. We’re building Wayhome to help people help each other, and we think Scam Alerts are a great step in that direction.</p><p>So, <a href="https://www.wayhome.io/">give it a shot</a>. In the meantime, we’ve written a non-exhaustive guide on dodging the hustle while looking for an apartment. It’s written with Boston in mind, but the advice ought to be universal.</p><p>Here<strong> </strong>are<strong> </strong>some common markers that an apartment listing on the internet<strong> </strong>isn’t the home of your dreams:</p><p><strong>The offer is too good to be true</strong></p><p>You’ve seen these before: the $1,500 studio in a neighborhood where parking spaces are $2k. Some are more obvious than others, but that’s often intentional— you’ll clearly notice those as scams, just maybe, less wary of the more reasonably priced scams. Good deals do come along, but most of the time “too good to be true” is.</p><p><strong>The poster asks you to email them at another address</strong></p><p>This could be on the up-and-up, but if you’re on a site that uses anonymous email addresses to protect privacy, this might be a hustle. Once you email them at another address, they’ll see your real email address. By itself, this probably isn’t a huge deal, but since it could be part of a bigger con, be wary of pushy posters.</p><p><strong>Pictures of some other place</strong></p><p>If the description says ‘hardwood floors,’ but the pictures say ‘shag carpets,’ you should probably say ‘pass.’</p><p><strong>They’re out of town indefinitely</strong></p><p>Maybe they’re out of town on work, or for a family emergency, but either way: long-distance relationships just don’t work. Of course this happens in non-scam situations, but you’re about to drop 30% of your annual income on a place — why risk it?</p><p><strong>“I’ll need a deposit before I can show you the place”</strong></p><p>In most states, you shouldn’t have to cough-up a dime until you’re ready to sign. According to the <a href="http://www.mass.gov/ocabr/docs/tenantsrights.pdf">MA Tenants’ Rights guide</a>:</p><blockquote>Do not put money down unless you are sure you want the apartment. Although you may be legally entitled to the return of your money up until the landlord formally accepts you as a tenant, that money may be difficult to recover.</blockquote><p><strong>They never take your calls</strong></p><p>Some scammers will go so far as to use fake numbers that make it seem like they’re from the area, but they rarely take phone calls and usually respond only by SMS. Don’t be afraid to demand a call or, if you’re ready to make a deal, a copy of their photo ID.</p><p>Following these tips ought to help (and <a href="https://www.wayhome.io/">using Wayhome</a> will <em>definitely</em> help) avoid getting hustled, until the online apartments game gets its act together, you’ll still need to tread carefully.</p><p>Have you been burned by one of the above M.O.s? Is there some scam we missed? <a href="/service/mailto:hey@wayhome.io">Drop us a note</a> or comment below, we’d love to hear about it.</p><p><strong>Further reading</strong></p><p>“<a href="http://www.mass.gov/ocabr/government/oca-agencies/dpl-lp/consumer-fact-sheets/consumer-fact-sheet-2.html#7">Things Renters Should Know when Dealing with a Real Estate Agent</a>” — MA Consumer Affairs Div.</p><p>“<a href="https://www.cityofboston.gov/consumeraffairs/education/renting.asp">How to avoid apartment scams</a>” — City of Boston.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e03af5d3b2cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wayhome-apartments-homes-communities/the-top-6-ways-to-get-screwed-by-an-internet-apartment-ad-e03af5d3b2cd">The top 6 ways to get screwed by an internet apartment ad</a> was originally published in <a href="https://medium.com/wayhome-apartments-homes-communities">Wayhome: Apartments, homes &amp; communities</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Happy Birthday America, here’s an app]]></title>
            <link>https://medium.com/wayhome-apartments-homes-communities/happy-birthday-america-heres-an-app-c40b9c40e332?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/c40b9c40e332</guid>
            <category><![CDATA[boston]]></category>
            <category><![CDATA[apartments]]></category>
            <category><![CDATA[real-estate]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[housing]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Tue, 04 Jul 2017 20:56:58 GMT</pubDate>
            <atom:updated>2017-07-04T20:56:58.987Z</atom:updated>
            <content:encoded><![CDATA[<h4>What do you get the hegemon who has everything?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xFMvYdoTBAvVcaOwVvzr_A.png" /><figcaption>Freedom: the greatest operating system of them all.</figcaption></figure><p>Tomorrow marks 241 years since America settled one of the greatest tenant/landlord disputes in history (or, at least, handed in its written notice). With the frequent rent-hikes &amp; a habit of popping-in unannounced, most of colonial America’s grievances with Britain sound all-too familiar to the modern apartment renter.</p><p>While it may be too late for us to help America weather its bad landlord situation (well, the 1776 version, anyway), the modern renter could still use a hand. That’s why today we’re announcing some big changes to <a href="http://bit.ly/2rUQswR">Wayhome</a> — like, <em>declaration</em>-big.</p><h4>We’re an app now</h4><p>By our last count, there were <em>84 </em>separate apartment listing websites in the U.S. Since one of our goals in <a href="https://blog.wayhome.io/why-were-building-the-first-people-powered-real-estate-site-fd3031b10a42">building Wayhome</a> was to help users navigate this jungle (both ‘Apartment Navigator’ &amp; ‘Rent Jungle’ are actual apartment sites, as it happens), we started with a website/Chrome extension product — sort of like Pinterest.</p><p>We learned pretty quickly from our users that this just didn’t work. Integrating our web app &amp; Chrome extension into a cohesive UX was a challenge, and the results weren’t nearly as seamless as we wanted them to be.</p><p>To remedy this, Wayhome’s top apartment-finding scientists locked themselves into our Innovation Basement along with some of the latest &amp; greatest tech &amp; enough Soylent for 3 weeks.</p><p>We weren’t disappointed. Take a look:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FyBx8xtazWAA%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DyBx8xtazWAA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FyBx8xtazWAA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f81fea68cbd12b6b2e2bca2542b90754/href">https://medium.com/media/f81fea68cbd12b6b2e2bca2542b90754/href</a></iframe><p>The new app brings improvements to the apartment search in three big areas:</p><h4>Convenience</h4><p>The new version of Wayhome takes a huge step towards putting the most basic tasks of an apartment search under one e-roof: searching for listings on different sites, saving your favorites and even communicating with roommates/partners/parents/tech-savvy pets/etc.</p><p>Finding an apartment is, for lots of people, among the biggest financial decisions they’ll ever make. While spreadsheets and Gmail are great, we thought such an important task ought to have its very own tool.</p><h4>Maps</h4><p>Location matters, and nothing helps you compare apartments’ locations better than maps. Google Maps helps, and lots of listing sites have great map features, but just as one might use both Tinder &amp; OkCupid to cast the widest net, most users aren’t interested in sticking with one real estate site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*UvOSLdrH0LI5gl9iu1EQMA.png" /><figcaption>Wayhome maps all the apartments you save neatly alongside other places you care about.</figcaption></figure><p>With Wayhome, you don’t have to settle down: once you save an apartment, we plot it on your map, right next to the other apartments you &amp; your pals have saved, and any important places you’ve added (say: work, or maybe school).</p><h4>Photos</h4><p>Apartment listings with fewer than 5 photos shouldn’t exist in 2017. When you find a listing online, you want to see deal-breakers front &amp; center. Listings with no pictures always feel like they’re hiding something, and the last thing you want is to waste your time getting apartment-catfished.</p><p>When you save an apartment with Wayhome, the app uses fancy science to find any other listings for that apartment our users have seen. If those listings had pics that the ad you’ve found doesn’t, we’ll show you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*j7e8OEC4BayBjPlI2dz6kA.gif" /><figcaption>If you found this listing on your own, you’d have to go in-person to see the ugly carpets. With Wayhome Extra Photos, you can save that time for finding the hardwood floors of your dreams.</figcaption></figure><p>Most will still want to visit their favorite places in-person, but with Wayhome, they’ll waste a lot less time viewing the duds.</p><h4>Next up!</h4><p>We’ve packed our roadmap with lots of cool stuff, from helping users message agents, to finding &amp; showing a listing’s real street address. We think tech’s been <a href="https://blog.wayhome.io/why-renters-shouldnt-bid-on-apartments-29d196060f69">too interested in helping landlords &amp; agents</a> lately, and we’re really excited to start fixing the renter side of the market once &amp; for all.</p><p>So, <a href="http://bit.ly/2rUQswR">check us out</a>. During our early beta tests, Wayhome only works for people moving to the Boston area. If you’ve got an idea of where we ought to focus on next (or a feature you’d like to see), let me know in the comments.</p><p>Happy 4th!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c40b9c40e332" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wayhome-apartments-homes-communities/happy-birthday-america-heres-an-app-c40b9c40e332">Happy Birthday America, here’s an app</a> was originally published in <a href="https://medium.com/wayhome-apartments-homes-communities">Wayhome: Apartments, homes &amp; communities</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cover your BaaS: Firebase, GraphQL, and your next project]]></title>
            <link>https://medium.com/@brandonmp/firebase-you-2017-ed-81462ef8775f?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/81462ef8775f</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Wed, 21 Jun 2017 02:35:48 GMT</pubDate>
            <atom:updated>2026-04-24T01:44:44.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vU6Uybk4ib5wjP7GlyRlbw.jpeg" /><figcaption><em>It was this, or some boring picture of two logos. I stand by my decision.</em></figcaption></figure><p>Firebase launched in 2011. It was, by most measures, a simpler time: Node.js was a precocious 2-year-old, jQuery ruled the land, and real-time web stuff was hard. Firebase changed one of these things, and in so doing, became a household name for developers seeking a backend-as-a-service (BaaS) with the holy trinity of fast, cheap, and easy.</p><p>Fast-forward to 2017, and Google (who owns Firebase (who owns the BaaS market)) is evolving their database product into a full-fledged (mostly mobile) app building platform. With most competing BaaS products having shuffled off this mortal coil, options for starting a new project are: Do a ton of stuff yourself, or use Firebase.</p><p>But things, as they’re wont to do, change: in the go-go world of the ‘17s, developers have options. In this post, I’m going to compare Firebase to one of those options: a GraphQL-as-a-service platform called called <a href="http://www.scaphold.io/">scaphold.io</a>.</p><h3>GraphQ-wha?</h3><p>Graph Query Language, or GraphQL, is Facebook’s attempt at addressing the shortcomings of RESTful APIs. This post isn’t an in-depth look at GraphQL, but for the purposes of comparison, think of a GraphQL server like an old-timey phone operator. It sits atop your app’s backend (not, as I’d initially thought, in lieu of your backend) &amp; knows where to find the different entities that make up your app’s schema (e.g., User, Group, PokeMan<a href="#ba69">¹</a>.). When your client makes a call, instead of calling directly to a specific endpoint, they call GraphQL, which routes their call to the data they need. The significance of this might not be apparent, but I think it’ll become more clear through comparison to Firebase.</p><p>Like Firebase, GraphQL can make frontend clients a lot less dependent on managing backends. Unlike Firebase, though, you have to actually build a GraphQL server, and this is where a new generation of BaaS come in. Essentially GraphQL-aaS, they run the entire backend operation, allowing you to build GraphQL clients as easily as (or easier than) Firebase would.</p><h3>The comparison</h3><p>Comparisons are hard to write, so I’m going to make it simple and make hard recommendations for different use-cases. By way of <em>bona fides</em>, I’ve built precisely one app on each of Firebase and <a href="http://www.scaphold.io/">Scaphold.io</a> (a GraphQL-aaS).</p><p>(<em>Side-note: Scaphold isn’t the only GraphQL-as-a-Service in town, they’re just the only one I’ve used. Their chief competitor, </em><a href="https://www.graph.cool/"><em>Graph.cool</em></a><em> offers a product that differs from Firebase in the same ways Scaphold does.)</em></p><h4><strong>Building a mobile-only app? Firebase</strong></h4><p>Firebase has added around half-a-dozen cool new features to their product in the past year or two: integrated analytics, push notifications, and even app A/B testing, all from your Firebase console — as close to a 1-stop-shop as a dev could hope for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/0*rVfOOTvS0HtswgLW." /><figcaption>Symbols representing the platforms supported by Firebase’s newest features. If I was looking for tea leaves to read about Firebase’s future, these would be a good start.</figcaption></figure><p>A mobile dev, that is. If your app has a significant web app (or Electron, or React Native, I think) component, most of these features won’t be available to you. Given Google’s parallel push for <a href="https://medium.com/javascript-scene/native-apps-are-doomed-ac397148a2c0#.4nflqflik">Progressive Web Apps</a>, it’s disappointing how opaque Firebase has been on the roadmap for web. Because of this drought of web SDK features, web app developers considering Firebase in 2017 are essentially looking at a 2013 feature set. If you’re a web dev who values using a product actively developed by its owners, this makes Firebase a tough sell.</p><p>But, if you <em>are</em> a mobile dev, go Firebase. While Scaphold et al <em>do </em>make mobile easier than doing it yourself (like push notifications on Android &amp; iOS), the services are smaller, younger and, on at least the features front, can’t hold (*<em>ahem</em>*) <em>a candle</em> to Firebase (sry).</p><h4><strong>Have relational data? GraphQL</strong></h4><p>Ask anyone who’s ever been dressed-down by some guy named Walter<a href="#ba69">²</a> on HackerNews or StackOverflow: tempers run hot in the NoSQL vs. SQL debate. Since I have a cat who depends on me, I’m not risking my neck to endorse one or the other here. But, since Firebase’s flavor of NoSQL schema presents some pretty significant challenges with relational data, we’ll have to unpack this point a bit.</p><p>In SQL, if you have users &amp; groups, the process for retrieving, adding or removing members from a group is as simple as as a single operation. This is thanks to the power of relationships &amp; such.</p><p>Firebase requires (and thus, <a href="https://firebase.googleblog.com/2013/04/denormalizing-your-data-is-normal.html">encourages</a>) a different approach: in order to fetch a group’s users, you have to retrieve that group by its ID and then, in the client, send new requests for each user’s profile. As you can imagine, after the first few relationships in your schema, you’re making quite a few round trips to the server (though Firebase <em>is</em> fast, and this seems to work well in practice).</p><p>The real problem with this, though, is state management. When the client bears responsibility for that much complex fetching logic, the room for error widens considerably. For me, it eventually felt less like Firebase was abstracting-away the backend, and more like it was putting the backend into the client.</p><p>This is where GraphQL shines. A GraphQL query for a group and all its users is as simple as:</p><pre>group {<br>  users {<br>   edges {<br>     node {<br>       firstName<br>       lastName<br>       email<br>      }<br>    }<br>  }<br>}</pre><p>Don’t let the indentation fool you: this isn’t Callback Hell. Instead, true to its namesake, GraphQL lets you conceptualize your schema as an actual graph, where entities ( User, Group) are the nodes, and relationships are the edges. In a single round trip to the server, you can traverse relationship edges &amp; fetch <em>precisely</em> the data you need.</p><p>Projects are just beginning to tap the power this brings to client-side tech. With Facebook’s Relay, for example, you merely point your app to your GraphQL endpoint &amp; declare which pieces of data each component needs, letting the library handle the rest. Imagine: fetching data for your entire app without writing even a single line of async code.</p><p>The tradeoff for this is development speed. <em>Someone’s </em>got to tell GraphQL where your entities live, so you’ll have to build your schema before you use your database. But, while Firebase’s carefree schemaless design might make it faster to get started, in my experience, Scaphold’s Schema Builder UI makes the difference in speed negligible.</p><p>So, any app with a relational schema should stick with GraphQL-aaS.</p><h4><strong>Need to query? GraphQL</strong></h4><p>A Firebase project isn’t a collection of JSON documents, but instead one big-ass JSON (<em>1BAJ</em>). In Javascript terms, instead of this:</p><pre>Users: [<br> { id: 1, name: &#39;brandon&#39; },<br> { id: 2, name: &#39;emily&#39; }<br>]</pre><p>You have this:</p><pre>Users: { <br>  1: {<br>    name: &#39;brandon&#39;<br>  },<br>  2: {<br>    name: &#39;emily&#39;<br>  }<br>}</pre><p>This has a few impacts on the development experience. First, Firebase’s querying ability is limited. To borrow from their docs, if you had a collection of dinosaurs with a height property, the closest you could come to a query would be sorting the collection by height &amp; fetching the top n results. If you need more, you’ll have to load the data into client state &amp; query it locally — in other words, more room for error. While being able to sort dinosaurs by height accounts for about 80% of my querying needs, this makes that last 20% tricky.</p><p>The second impact is a little more subtle: lists &amp; aggregations. It feels silly to write, but if you wanted to count your dinosaurs from the previous example, you’d have to download the <em>entire</em> collection — including <em>each </em>field for <em>every</em> dinosaur — before performing the count operation in the client side. This might seem like a trivial example, and there are (tedious) ways around it (e.g., incrementing and decrementing a total with each addition/deletion), but imagine working with a collection of <em>tens of thousands</em> of records. At that point, you start to wonder whether or not maintaining a backend was really all that bad in the first place.</p><p>There isn’t much to write about Scaphold or GraphQLaaS by comparison, because querying is as powerful as it ever was with plain SQL. Filtering, sorting, and aggregating records is as simple as writing any other query. Better still, GraphQL isn’t limited to fetching data from a database, so it’s possible to integrate other APIs into your data fetching calls — e.g., fetching coordinates &amp; resolving them to an address via the Google Places API in a single query of your GraphQL endpoint.</p><p>If your querying needs extend beyond identifying the top 5 tallest dinosaurs, go with GraphQLaaS.</p><h4><strong>Want type-safety? Probably GraphQL</strong></h4><p>This point is closer to a tossup than the previous few. On the one hand, Firebase’s authorization &amp; validation system is pretty powerful. Using a Javascript-like language, you can determine whether or not a read/write operation is permitted based on any number of arbitrary criteria. Is the value of some field in a different part of the database a 5 when it should be a 6? Read denied. Is this user’s submission a string of 17 characters when you wanted 16? Write denied. It’s that straightforward.</p><p>Scaphold, on the other hand, doesn’t offer much by way of data validation beyond primitive type (number, boolean, etc.), basic structures (e.g., JSON, List) and string enums (&#39;CAT&#39; or &#39;DOG&#39;). With both role and relational permissions on the row-level, authorization should be sufficient for most needs, but it still isn’t as flexible as Firebase.</p><p>All that said, though, I think I recommend GraphQLaaS in this instance. While Firebase’s validation/authorization system is definitely more powerful, it’s also (a) more complex to implement, and (b) optional.</p><p>Complexity is expected, given that it’s a proprietary language. But Scaphold’s schema builder GUI makes implementing good-enough validation/authorization a breeze. Because it’s not optional, though, I’m guessing it brings more stability on average than Firebase’s system.</p><p>Like they say about working out or unit testing: the best system is the one you’ll use, and GraphQLaaS’ compulsory typings are a better option for most than Firebase’s complexity &amp; optional nature.</p><h4>Need real-time? Firebase</h4><p>While Scaphold &amp; other GraphQL-aaS support real-time subscriptions (which, it should be noted, <a href="https://github.com/facebook/graphql/issues/284">aren’t the same as live queries</a>), the simplicity just can’t match Firebase yet. This isn’t surprising: Firebase’s team built the product from the ground-up with subscriptions in mind, whereas GraphQL sought to solve a broader range of problems.</p><p>If you just want a feature or two to have real-time capabilities, GraphQL-aaS might still work (hell, you can even use it alongside Firebase for some use cases). But, if you’re building something where real-time is critical, use Firebase.</p><h3>The conclusion</h3><p>For <a href="https://www.wayhome.io/">Wayhome</a>, <a href="https://www.scaphold.io/">Scaphold</a> &amp; GraphQL were the easy choice. Our data was just too relational to reliably manage it on the client, even with power-tools like Redux &amp; MobX. Coupled with Relay, GraphQL allows us to do-away with almost all of our client-side state management, substantially reducing the risk of sneaky bugs.</p><p>Firebase, while its positioned as general-purpose solution, is clearly optimized to solve a fairly narrow &amp; specific set of problems. If those problems aren’t yours, think twice before building on Firebase — don’t let yourself get… burned.</p><p><em>Firebase &amp; GraphQL are so significantly different that no comparison can really communicate every point worth considering. If yours are considerations I didn’t cover in this article, post a comment or </em><a href="/service/mailto:brandon@wayhome.io"><em>email me</em></a><em> &amp; I’m happy to chat.</em></p><p>1: …<em>[sic].</em> <a href="#444c">back</a><br>2: <em>What Walt lacks in social graces, he makes up for in SO rep</em><a href="#ba69"><em>³</em></a><em>. </em><a href="#c752">back</a><br>3: <em>And 143,412 posts edited! </em><a href="#ba69">back</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81462ef8775f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why renters shouldn’t bid on apartments]]></title>
            <link>https://medium.com/wayhome-apartments-homes-communities/why-renters-shouldnt-bid-on-apartments-29d196060f69?source=rss-94f744172c84------2</link>
            <guid isPermaLink="false">https://medium.com/p/29d196060f69</guid>
            <category><![CDATA[apartments]]></category>
            <category><![CDATA[real-estate]]></category>
            <category><![CDATA[new-york-city]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[san-francisco]]></category>
            <dc:creator><![CDATA[Brandon]]></dc:creator>
            <pubDate>Thu, 11 May 2017 18:08:19 GMT</pubDate>
            <atom:updated>2017-05-11T18:08:19.144Z</atom:updated>
            <content:encoded><![CDATA[<h4>Startups like Rentberry are bad for the apartment rental market, but not for the reasons you might expect</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GJLMMhAvo7NNgXK49pu_Wg.jpeg" /><figcaption><a href="http://query.nytimes.com/mem/archive-free/pdf?res=9E01EFDE113EE033A25754C2A9649D946697D6CF">The New York Times</a>, 1907</figcaption></figure><p>Being a renter used to mean something. Back when living on a block meant belonging to a community —to something bigger — “renter” was a shared identity. And we stuck together: in 1907, a 16 year-old Pauline Newman started a rent-strike that grew to 10,000 families, all of whom had the same message for their landlords: the rent is too damn high. These sorts of strikes happened again &amp; again, well into the 1970s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/0*mogv5MDAS0vKncg9." /><figcaption>Ms. Pauline Newman, ideological foremother of modern rent memes</figcaption></figure><p>Now, “renter” means something different. Rent’s still too high (by <a href="https://www.citylab.com/housing/2017/04/every-us-county-has-an-affordable-housing-crisis/524628/">some estimates</a>, every county in the U.S. has an affordable housing problem), and while the portion of people renting continues to rise, the strength of community among renters does anything but.</p><p>For all its potential, tech’s done little to help here. If you’re renting an apartment in 2017, you’re not doing it much differently than your parents were in 1997: find an advertisement, contact an agent, view a place for six minutes, then sign-away an unspeakable portion of your annual income. Thanks, tech.</p><p>But, hey: at least tech’s brought on a golden age of landlording. With instant background checks, credit reports, and even <a href="https://www.theverge.com/2016/6/10/11903082/landlord-social-media-credit-check">social media scraping</a> (modern-day redlining, for you students of history), tech has systematically de-risked the rental property industry. When Blackstone decides to jump into an industry <a href="http://www.investopedia.com/news/americas-biggest-landlord-files-ipo-bx/">with both feet</a>, you know it’s lucrative.</p><p>It was onto this scene that a young startup, Rentberry, saw a golden opportunity: instead of listing your property for a price, why not let people bid against each other, in <em>real time</em>?</p><h3>Pricing apartments</h3><p>At its heart, auction-style pricing isn’t much different than how apartments are priced already. When a landlord lists a unit, they consult the local market &amp; try to price their unit close to comparable apartments in the area. Realtors are a big help here: with an understanding of how a place stacks-up against other listings, they act as a check against a landlord’s potentially (and often) unrealistic expectations.</p><p>Auctions take a different approach to finding fair-market value. Where the traditional model has seasoned realtors estimate the worth of a unit, the auction model simply asks would-be renters what they’re willing to pay. In the Rentberry model, a landlord schedules an open-house, prospective tenants visit at the prescribed time, then, later that day, anyone interested places a bid on the Rentberry platform. It’s open bidding, too, so users can see what others are bidding &amp; compete in real-time.</p><p>While not as hotly contested as certain black/blue dresses, this auction system’s <a href="http://www.apartmenttherapy.com/want-an-apartment-on-rentberry-it-goes-to-the-highest-bidder-244468">sparked</a> <a href="http://www.bbc.com/news/technology-39355984">some</a> <a href="https://www.wsj.com/articles/want-that-apartment-you-may-have-to-bid-for-it-1491134407">controversy</a>. Proponents will tell you that efficient pricing is intrinsically good, and higher prices mean more incentive for developers to build. Detractors of the auction system argue that rents don’t really need any help rising, and that we ought not be so cavalier about squeezing inefficiencies out of a market that 111,000,000 people call ‘home.’</p><p>Whatever the merits of their arguments, though, both sides miss the most troubling part of the model.</p><h3>Monetizing ignorance</h3><p>For its part, Rentberry’s <a href="http://gizmodo.com/bidding-website-rentberry-may-be-the-startup-of-your-ni-1793940693">waffled on its impact</a>, claiming both that landlords can expect 5% hikes in rent, and that renters will see a 5% reduction in their rent. Like so much startup math, this is tough to decipher, so let’s agree for now that the broad economic impact of rent auctions is yet to be determined.</p><p>The clear &amp; present danger in a system like this has to do with norms &amp; transparency. Instead of realtors advising landlords on pricing, auctions call for renters to determine the value. If this were eBay, fine: just Google whatever trinket or action figure you’re buying to see if the seller’s price is fair. But real estate &amp; apartments are incredibly hard to price, and asking renters to do so isn’t much different than the pushy car salesman insisting you don’t need to call your uncle who’s good with cars, because, what — don’t you trust him? Apartment auctions are the same hard-sell, but with a high-tech veneer (again: thanks, tech).</p><p>The most insulting part, though, is the staging. To “stage” a unit, in real estate lingo, means to polish it up — to cover blemishes, add a few nice pieces of furniture, maybe a scented candle or two. In the conventional apartment-finding process, you may only get six minutes to see an apartment before signing a lease, but at least it’s an honest six minutes —since viewings are sporadic, it’s impractical to stage a unit, so you get a chance to scrutinize your would-be next home in its natural state (and, if you’re lucky, to ask a question-or-two of the current tenants &amp; neighbors).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*ZslAyw7BRa_WrSLe-MdlrQ.jpeg" /><figcaption>Catfishing: from apartment ads to online dating profiles, everyone lies on the internet.</figcaption></figure><p>By letting companies like Rentberry ‘streamline’ away what little transparency the rental process has, we’re being asked to spend more while being given less. While tech brings new levels of transparency to the landlord’s side of the transaction, life as a renter gets dimmer &amp; dimmer.</p><h3>Renters deserve better</h3><p>We <a href="https://blog.wayhome.io/why-were-building-the-first-people-powered-real-estate-site-fd3031b10a42">started Wayhome</a> with the quaint belief that dropping 30% of your salary on an apartment entitles you to better than being pitted against your fellow renter in hopes of winning an apartment you know nothing about. Our solution is simple: <a href="https://www.wayhome.io/">use Wayhome to search for your apartment</a>, then let us share what you learn about places with other apartment-hunters— just a simple courtesy for a fellow renter, like holding a door or leaving the light on.</p><p>We think the era of rent-strikes is probably behind us. But, if enough renters leave the light on, finding an apartment will get a lot less dark. We think Ms. Newman would’ve liked that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29d196060f69" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wayhome-apartments-homes-communities/why-renters-shouldnt-bid-on-apartments-29d196060f69">Why renters shouldn’t bid on apartments</a> was originally published in <a href="https://medium.com/wayhome-apartments-homes-communities">Wayhome: Apartments, homes &amp; communities</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>