<?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 Sina Habibian on Medium]]></title>
        <description><![CDATA[Stories by Sina Habibian on Medium]]></description>
        <link>https://medium.com/@sinahab?source=rss-121949e865d0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Dtv_OCrbPp2ynwLCwhjGoA.jpeg</url>
            <title>Stories by Sina Habibian on Medium</title>
            <link>https://medium.com/@sinahab?source=rss-121949e865d0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:21:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sinahab/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[Research & Engineering Update — April 2018]]></title>
            <link>https://medium.com/truebit/truebit-april-update-9922c477b2c1?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9922c477b2c1</guid>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Tue, 01 May 2018 20:41:05 GMT</pubDate>
            <atom:updated>2018-05-01T21:32:35.221Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mxwl0_gdFfhnpXeh8RozCA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/FXFz-sW0uwo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Spiske</a> on <a href="https://unsplash.com/search/photos/network?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This is the first Truebit research &amp; engineering update.</p><p>For context on Truebit, please refer to our <a href="https://people.cs.uchicago.edu/~teutsch/papers/truebit.pdf">whitepaper</a> or <a href="https://medium.com/truebit/truebit-the-marketplace-for-verifiable-computation-f51d1726798f">overview</a>.</p><h4>WebAssembly in Truebit</h4><p>Truebit tasks are WebAssembly modules. The architecture allows efficient execution of these modules offchain, and resolves disputes on chain based on state snapshots.</p><p>WebAssembly is seeing widespread use in blockchains. As such, we spent a week-long design session with engineers from Ethereum, Parity, and Dfinity towards the end of March. These conversations helped us hone in on core trade-offs around metering, nondeterminism, and integrating with the host environment.</p><p>Following up on this collaboration, Truebit ran a session at the WebAssembly Community Group meeting. This annual gathering is where core WebAssembly engineers from Google, Apple, Mozilla, and Microsoft review new proposals and update the spec. In our session, titled WebAssembly in Blockchains (<a href="https://github.com/WebAssembly/meetings/blob/master/2018/CG-04.md#webassembly-in-blockchain">notes here</a>), we presented the requirements of the Blockchain platform as distinct from the Web. We will take part in discussions going forward, and help steer proposals in a direction helpful for blockchains.</p><p>Our team also doubled down on efforts to build a community of virtual machine engineers in the Bay Area. We hosted a meetup with Dfinity at the Polychain Capital offices which was attended by a talented group of engineers who are interested in blockchains.</p><p>Check out this video from that evening for a deep dive into our WebAssembly architecture.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FS7DVQb0NmBA%3Fstart%3D218&amp;src_secure=1&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DS7DVQb0NmBA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FS7DVQb0NmBA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="1280" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/fcc60b284d7e7d6674e02e15066aa4ad/href">https://medium.com/media/fcc60b284d7e7d6674e02e15066aa4ad/href</a></iframe><h4>Computation &amp; Dispute-Resolution layers: deployed to testnet</h4><p>Truebit is a modular system. The computation layer involves a WebAssembly VM running computations offchain and onchain. The dispute resolution layer enables interactive verification games between a solver and challenger. The incentive layer includes the jackpot and forced error mechanism.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*IQo3NWQ2brJ6g9f-NTLHIQ.png" /><figcaption>Truebit’s modular architecture</figcaption></figure><p>In April, we made substantial progress with the <a href="https://github.com/TrueBitFoundation/webasm-solidity/tree/master/contracts">contracts</a> handling the computation and dispute-resolution layers:</p><ul><li>submitting tasks (<a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/contracts/tasks.sol">link</a>).</li><li>processing of Merkle proofs (<a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/contracts/onchain.sol">link</a>).</li><li>handling ALU operations of the WASM machine (<a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/contracts/alu.sol">link</a>).</li><li>validating a single instruction onchain (<a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/contracts/judge.sol">link</a>).</li></ul><p>To ensure that the disputed instruction always fits within the Ethereum gas limit, we divide each WebAssembly opcode into phases. A single phase is then run onchain (<a href="https://github.com/TrueBitFoundation/ocaml-offchain/blob/master/interpreter/merkle/mrun.ml#L489">link</a>).</p><p>Truebit tasks can have data passed in directly. In the case of <a href="http://github.com/truebitfoundation/scrypt-interactive">Scrypt verification for the Doge-Ethereum bridge</a>, for instance, the block header fields are provided in the Solidity call.</p><p>Tasks can also reference content-addressed locations for data. This allows Task Givers to reference larger inputs that would not fit within a call, but which could be uploaded to a decentralized filesystem. To this end, we implemented an integration with IPFS (<a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/node/common.js#L369">link</a>).</p><p>The contracts are deployed on the <a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/node/kovan.json">Kovan</a>, <a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/node/rinkeby.json">Rinkeby</a>, and <a href="https://github.com/TrueBitFoundation/webasm-solidity/blob/master/node/ropsten.json">Ropsten</a> testnets.</p><h4>Configurable Truebit Client: truebit-os</h4><p>The Truebit client enables one to become part of the Truebit network; to create tasks, solve them for a reward, or submit challenges.</p><p>As a modular system, Truebit is composed of various computation, dispute resolution, and incentive layers. For instance, the Truebit implementation supporting <a href="http://github.com/truebitfoundation/scrypt-interactive">Scrypt verification</a> has the following components:</p><ul><li>Computation layer: Scrypt.</li><li>Dispute resolution layer: verification game.</li><li>Incentive layer: simplified altruistic verifiers.</li></ul><p>In contrast, the Truebit architecture in development for Livepeer, one of our first integrations, will have the Truebit WebAssembly virtual machine as its computation layer.</p><p>Going forward, we will implement various incentive layers for testing in the wild. These will include the original Truebit (forced errors and jackpots), Truebit Beta (multiple solvers and pairwise verification games as in the <a href="https://medium.com/truebit/truebit-the-marketplace-for-verifiable-computation-f51d1726798f">overview</a>), or other schemes (explored further in the <a href="https://medium.com/truebit/a-token-based-roadmap-to-trustless-computation-2264e80e82bd">Truebit token roadmap</a>).</p><p>In order to allow us to experiment with different computation, dispute-resolution, and incentive layers, we implemented <a href="http://github.com/truebitfoundation/truebit-os">Truebit OS</a>. It is a configurable client which allows layers as plugins, and has a built-in CLI to enable experimentation and early use. Watch the demo below.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVRQwmNGHbhI&amp;src_secure=1&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVRQwmNGHbhI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVRQwmNGHbhI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="960" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/840933e83280453a20c519702919ee6b/href">https://medium.com/media/840933e83280453a20c519702919ee6b/href</a></iframe><h4>The team</h4><p>We enjoyed connecting with the San Francisco over the last few months. We are now colocating in Berlin to work out of the <a href="https://www.fullnode.berlin/">Full Node</a> for the next two months. Our engineering team will maintain a presence in the Bay Area, and we will be back before long.</p><p>To that end, we are hiring and are looking for two additions to the Truebit family:</p><ul><li><a href="https://truebit.io/careers/senior-vm-engineer.html">Senior Software Engineer: Virtual Machines</a>.</li><li><a href="https://truebit.io/careers/senior-blockchain-engineer.html">Senior Software Engineer: Blockchains</a>.</li></ul><p>Please get in touch if you or anyone you know has an interest.</p><p>With that, we bid you farewell until the next update!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9922c477b2c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/truebit/truebit-april-update-9922c477b2c1">Research &amp; Engineering Update — April 2018</a> was originally published in <a href="https://medium.com/truebit">Truebit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Truebit: the marketplace for verifiable computation]]></title>
            <link>https://medium.com/truebit/truebit-the-marketplace-for-verifiable-computation-f51d1726798f?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f51d1726798f</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralization]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Sat, 24 Mar 2018 16:49:44 GMT</pubDate>
            <atom:updated>2018-03-25T17:14:03.375Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DGPZ1xdM1LbXFGD1yNNzEg.jpeg" /><figcaption>Photo credit: <a href="https://unsplash.com/photos/9TUIfLylgw8?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Mohdammed Ali</a>.</figcaption></figure><p>Decentralized applications hold promise for the future. They operate in a transparent, tamperproof, unstoppable manner. They leverage incentives and solve coordination problems on a global scale.</p><p>But there are obstacles in the way.</p><p>Decentralized computation is expensive and bound by the block gas limit, rendering many applications costly or infeasible.</p><h3><strong>The Problem: decentralized computation</strong></h3><p>Write some code in Solidity, compile it into EVM (Ethereum Virtual Machine) bytecode, and push it to the blockchain. From then on, the code is executed anytime a transaction is sent to the address. The blockchain consensus mechanism is redundant by design: all miners run the computation and come to agreement on the results.</p><p>Computation is metered, so that fees scale with the complexity of code. Each operation in the blockchain virtual machine’s instruction set is assigned a cost (called “gas”). The transaction sender thus pays per executed instruction.</p><p>Anything beyond simple business logic has a hefty price tag attached.</p><p>Moreover, computation on the network is gated by the block gas limit. This is an upper bound on the total gas consumed by all transactions within a block. Unfortunately, one cannot simply increase the gas limit because of the <a href="https://eprint.iacr.org/2015/702.pdf">Verifier’s Dilemma</a>; miners who receive a newly formed block need to first verify that it is correct before beginning their search for the next block; but they receive no fees for such verification. Their incentives pull them in two contradictory directions: to verify, or to skip verification. This is exacerbated with an increased block gas limit.</p><p>So computation is expensive and bounded.</p><p><a href="https://people.cs.uchicago.edu/~teutsch/papers/truebit.pdf">Truebit</a> solves this problem.</p><p>It does this by moving computation off-chain; and verifying its correctness via an interactive crypteconomic protocol.</p><h3>The Solution: offchain verifiable computation</h3><p>A dapp (decentralized application) wants to run computation that would be expensive or is larger than the gas limit.</p><p>Instead of running it directly on Ethereum, it passes it to the Truebit protocol.</p><h4><strong>The Truebit contracts</strong></h4><p>The API for interacting with the Truebit protocol is simple: a single function on the Truebit smart contract called <em>createTask</em>.</p><p>The dapp calls the <em>createTask</em> function, passing in the following:</p><ul><li><strong>program</strong>: the program code. Truebit uses the WebAssembly VM; the dapp can pass in the bytecode directly — or more likely include the IPFS hash or another content-addressed location for the code.</li><li><strong>inputs</strong>: the inputs to the program. The dapp can provide these directly, or include their content-addressed location.</li><li><strong>reward</strong>: a reward, paid to whoever runs this program.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WNhQuDM4rQmzlGMzBrhpNQ.png" /><figcaption>a Dapp creates a Truebit task.</figcaption></figure><p>Let’s look at two case-studies for illustrative purposes.</p><p><a href="http://livepeer.org/">Livepeer</a>, a platform for decentralized computation, wants to check that a transcoder did their job correctly. They call the Truebit <em>createTask</em> function, passing in <a href="https://www.ffmpeg.org/">FFmpeg</a> as the program and a segment of video as the input.</p><p><a href="https://aragon.one/">Aragon</a>, a platform for autonomous organizations, wants to tally votes. Iterating through a large array of votes on-chain is expensive and, if there are too many elements, impossible due to the gas limit. They call the Truebit <em>createTask</em> function, passing in a tallying function as the program, and the array of votes as the input.</p><p>This function creates a new <em>Task </em>in the Truebit contract.</p><h4><strong>The Truebit network</strong></h4><p>Truebit is a computation marketplace.</p><p>Anyone can install the Truebit client, join the free-entry network, and earn rewards in return for running tasks.</p><p>The client, installed by a Truebit miner, listens for events on the Truebit contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udfmXK3Gdipz0jeuX_jdIA.png" /><figcaption>Truebit miners listening for tasks.</figcaption></figure><p>Upon creation of a new Task, a Truebit miner can download the code, run it locally through their Truebit WebAssembly VM with the provided inputs, and submit the solution to the contract.</p><p>The Solver also includes a deposit, which ensures that they have skin in the game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S5XXEA_RwX3rFItXQ9plWQ.png" /><figcaption>Solver submits a solution.</figcaption></figure><p>A timer begins. Within this challengeTimeout, any Truebit Verifier can submit a challenge to the proposed solution, along with their own deposit.</p><p><strong>Case #1: no challenges.</strong></p><p>This is the expected case. The Solver ran the program correctly. The solution remains unchallenged for the duration of the challengeTimeout, and is therefore, deemed correct.</p><p>The Truebit contract makes a callback to the dapp with the solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jQyDRTGW8vfdfv3DZgR9Sg.png" /><figcaption>The TaskGiver receives a callback with the result.</figcaption></figure><p><strong>Case #2: a challenge is submitted.</strong></p><p>A Verifier submits a challenge, along with a deposit. There is now a dispute.</p><p>The contract is in possession of the original payment provided by the <em>TaskGiver</em>, a deposit from the <em>Solver</em>, and a deposit from the <em>Challenger</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aE_o5ybyhFcTI9F3tdNuAg.png" /><figcaption>A Verifier submits a challenge.</figcaption></figure><p>An interactive verification game between the Solver and Challenger begins.</p><h4><strong>The verification game</strong></h4><p>Note that a Truebit task is a WebAssembly program, a set of instructions that are executed one after another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZslpbOJZMudjeRt9Aphmcw.png" /><figcaption>A simple C program (left) &amp; its compiled WebAssembly text-format (right).</figcaption></figure><p>The challenger begins the game.</p><p>Both the Solver and the Challenger had the same starting point — at state 0, they booted up an empty VM, had the same program and the same inputs (as dictated by the description of the task on chain). At state 0, they agreed.</p><p>At the end of the program, let’s say it has 14 instructions, they got different results. Therefore, at state 14, they disagreed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*74enUrataLZWLYcOUpJkDQ.png" /><figcaption>The Solver and Challenger agree on State 0 and disagree on State 14.</figcaption></figure><p>The Challenger uses this knowledge and queries the Solver for their state at the half-way mark of program execution, i.e. after 7 instructions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CH9Ujy712KHypWknQk2Riw.png" /><figcaption>The Challenger queries for the Solver’s state.</figcaption></figure><p>Using the Truebit WebAssembly VM, the Solver calculates a hash of their state. This is a Merkle Root derived from the stacks, the memory, and the entire state of the Solver’s WebAssembly virtual machine. The Solver submits this root to the contract in a <em>Respond</em> message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQlBqJL0AZMCvFdJvo5Jag.png" /><figcaption>The Solver and Challenger play a verification game.</figcaption></figure><p>The Challenger now computes their own state Merkle Root locally and compares with the value provided by the Solver.</p><p>If the two values are the same, they deduce that the disagreement occurred in the second half of the computation. If the two values are different, they deduce that the disagreement occurred in the first half.</p><p>For the sake of illustration, let’s imagine that the two state roots are the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8P6rytLcWzOvmCQK7eSkPQ.png" /><figcaption>The Challenger has the same state root as the Solver at state 7.</figcaption></figure><p>The Challenger now sends a <em>Query</em> message, asking for the Solver’s state root at the midpoint of the second half of computation, i.e. after instruction 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*95W6ZJRo1ggLeIeuwiKs0w.png" /><figcaption>The Challenger queries for the next midpoint.</figcaption></figure><p>The Solver responds.</p><p>The Challenger observes that they have the same root at state 10. They then query for the right midpoint; i.e. for state 12.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d53nANh7LQjqDiqVnYAYvA.png" /><figcaption>The Challenger queries for the next midpoint.</figcaption></figure><p>The interactive game continues.</p><p>The Challenger forces the Solver towards the first point of disagreement using a binary search. The game takes O(log(n)) steps where n is the total number of instructions in the program.</p><p>The disagreement is eventually narrowed down to a single instruction, with the Solver having committed to a state root before and after.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uQsArlkYPXGUDWcHefYZlw.png" /><figcaption>The dispute: the instruction transitioning from state 12 to state 13.</figcaption></figure><p>At this point, the computation is small enough that the Truebit contract initializes a VM with the pre-state and runs the disputed instruction on-chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*zqlqMaIB4VlkRcDdjiBhBw.png" /><figcaption>On-chain WebAssembly interpreter runs the disputed instruction.</figcaption></figure><p>The Merkle Root of the state is calculated, and if it differs from the one provided by the Solver, their deposit is slashed.</p><p>That’s it!</p><p>We move the entire computation off-chain, and use Ethereum to run a single instruction in case of a dispute.</p><p>We achieve consensus on the result — but a kind of consensus that is stronger than the honest majority requirement of Nakamoto Consensus or the two-thirds honest requirement of BFT. We have “unanimous consensus”: safety is guaranteed as long as there is <em>one</em> honest verifier.</p><h3>Cryptoeconomics</h3><p>Truebit’s incentives include the task rewards, deposits, the selection of the Solver and Challenger, and the economic design of the computation marketplace.</p><p>We recently published <a href="https://medium.com/truebit/a-token-based-roadmap-to-trustless-computation-2264e80e82bd">an update</a> on Truebit’s token mechanics. Here are two solutions currently under consideration:</p><h4><strong>Incentive Layer #1: forced errors &amp; jackpot</strong></h4><p>Thinking through the above protocol, the discerning reader will notice a problem.</p><p>Knowing that their solution is checked and their deposits slashed in the case of a wrong answer, the Solver always tells the truth. As such, Verifiers never catch an error, never make any money, and eventually stop showing up. At this point, the Solver can begin posting wrong solutions. Then, Verifiers begin showing up again to catch errors.</p><p>The system flip flops. It does not have a stable equilibrium.</p><p>To resolve this issue, the <a href="https://people.cs.uchicago.edu/~teutsch/papers/truebit.pdf">Truebit whitepaper</a> introduces the concept of a forced error and a jackpot. With some probability, the protocol forces the Solver to provide the <em>wrong</em> answer. In these occasions, any verifiers who challenge automatically receive a jackpot. This windfall payment is so large that, amortized over the total number of tasks, it gives a positive expected return. Verifying tasks is profitable even if Solvers always tell the truth.</p><h4><strong>Incentive Layer #2: multiple solvers and pairwise verification games</strong></h4><p>An alternative approach stems from the realization that Solvers and Verifiers are all doing the same work: they download the program, run it locally, and get a solution. What if instead of the sequential nature of having one Solver and many Challengers, the protocol allows everyone to submit their solutions at the same time?</p><p>The contract would see whether all solutions agree. If they do, then we have arrived at the truth. If they don’t and there are clusters of solutions, the contract can facilitate pairwise verification games between the different groups.</p><p>This protocol achieves better timeliness guarantees, as games happen in parallel. It also does away with the forced error and jackpot. But it has added complexities in determining the cost to the TaskGiver and distributing rewards amongst the many Solvers.</p><p>We are actively researching variations of the protocol (and would like to give a shoutout to <a href="https://twitter.com/z1awrence">Zack Lawrence</a> and <a href="https://twitter.com/ali01">Ali Yahya</a> for helpful discussions related to these constructions!)</p><h3>Modular architecture:</h3><p>Truebit is a modular system and can be thought of in three layers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*NMv0v994y9RTFl7ox-WZuA.png" /><figcaption>Truebit’s modular architecture.</figcaption></figure><p><strong>The Computation layer</strong>: this is a WebAssembly VM (or a more limited state machine, such as in our <a href="https://github.com/truebitfoundation/scrypt-interactive">interactive scrypt</a> construction for the Doge-Etheruem bridge). It requires implementations offchain and onchain.</p><p>The Truebit WebAssembly interpreter is deterministic, metered, and has the ability to create Merkle trees of its internal state.</p><p><strong>The Dispute Resolution layer</strong>: this is an interactive game between two parties; a verification game involving multiple query-response calls between the Solver and Verifier.</p><p><strong>The Incentive layer</strong>: this involves the rewards, deposits, solver and challenger selection, and token mechanics.</p><p>The layers will communicate via well-defined interfaces.</p><h3>Fin</h3><p>Our engineering efforts are now focused on the computation and dispute-resolution layers. Our research efforts are focused on the incentive layer and token mechanics.</p><p>We recently launched Truebit for Scrypt verification, for use within the Doge-Ethereum bridge. Watch our <a href="https://youtu.be/8VLg3RuvYNI">demo</a> or view the code on <a href="http://github.com/truebitfoundation/scrypt-interactive">Github</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8VLg3RuvYNI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8VLg3RuvYNI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8VLg3RuvYNI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9caf3dc64b2104d2bc718ca4643b944/href">https://medium.com/media/c9caf3dc64b2104d2bc718ca4643b944/href</a></iframe><p>Our next implementation will support the WebAssembly VM.</p><p>Stay tuned!</p><p>If you want to discuss or say hi, ping me on <a href="https://twitter.com/sinahab">Twitter</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f51d1726798f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/truebit/truebit-the-marketplace-for-verifiable-computation-f51d1726798f">Truebit: the marketplace for verifiable computation</a> was originally published in <a href="https://medium.com/truebit">Truebit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enter the Rabbit Hole: The Doge-Ethereum Art Project]]></title>
            <link>https://medium.com/truebit/enter-the-rabbit-hole-the-doge-ethereum-art-project-31e8116043c4?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/31e8116043c4</guid>
            <category><![CDATA[community]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[art]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Thu, 22 Feb 2018 17:47:57 GMT</pubDate>
            <atom:updated>2018-02-25T20:44:32.179Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NbbEcWeag39O-fCaDHMtUw.jpeg" /><figcaption>The Doge-Ethereum art project at ETHDenver.</figcaption></figure><p>Two years ago, a handful of anonymous crypto hodlers funded a bounty for the development of the Doge-Ethereum bridge.</p><p>Truebit recently won part of this bounty.</p><p>The Doge-Ethereum bridge allows one to move coins between the Doge and Ethereum blockchains.</p><p>You send a transaction on the Dogecoin blockchain forfeiting control of your coins, and an Ethereum contract mints you an equal number of EthDoge (or should I say WOW) ERC20 tokens.</p><h3>Sina Habibian on Twitter</h3><p>Call to the community - what would be a fun name for the Doge ERC20 token? - Inspiration to be had from Python, Anaconda, Serpent, Viper.. There&#39;s gotta be something better than EthDoge? :) https://t.co/ccFZAn1tv1</p><h3>Sina Habibian on Twitter</h3><p>@ConradJohnson @lkngtn @evan_van_ness @mattgcondon WOW has received the official stamp of approval!! 😂😂 @ummjackson @derekminter @danheld</p><p>You can then use these tokens within the ethereum ecosystem — send them to smart contracts, trade them on decentralized exchanges, or use them to buy cryptokitties.</p><p>At any point, a WOW token holder can burn their tokens and receive Dogecoins back on the Doge chain. This completes the bridge.</p><p>To get into the history of the bridge and why it matters, refer to this tweetstorm from Alex van de Sande:</p><h3>alex van de sande on Twitter</h3><p>So, about doge and ethereum...</p><p>The sticking point, and the reason why the bridge hadn’t been built so far, is that the Ethereum relay needs to verify Dogecoin’s Proof-of-Work. Scrypt is a memory-hard and computationally intensive function, and cannot be computed within the Ethereum block gas limit.</p><p>The community has been playing with different solutions for years — you can see Vitalik’s 2015 solution of splitting Scrypt into multiple transactions <a href="https://www.reddit.com/r/dogecoin/comments/3xc0co/dogeethereum_twoway_peg_i_wrote_up_an/">here</a>.</p><p>The problem eventually drew the attention of Christian Reitwiessner and Jason Teutsch and was a good proof of concept for Truebit. One would run Scrypt off-chain and verify it using Truebit’s interactive protocol.</p><p>We recently <a href="https://youtu.be/8VLg3RuvYNI">demoed</a> this system on the Rinkeby testnet.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8VLg3RuvYNI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8VLg3RuvYNI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8VLg3RuvYNI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9caf3dc64b2104d2bc718ca4643b944/href">https://medium.com/media/c9caf3dc64b2104d2bc718ca4643b944/href</a></iframe><p>We were awarded 25% of the bounty for the progress shown in the demo.</p><p>We shared this with our collaborators Oscar Guinzberg and Coinfabrik, who built the ERC20 contract and the DogeRelay contract and client.</p><p>Truebit received $120k.</p><p>So what does a team do with this much money?</p><p>Jason, Truebit’s founder, had decided from the beginning that we would give the entire sum away to fund a massive open-source art project.</p><p>A physical representation of the Doge-Ethereum bridge.</p><p>This seemed in line with our core values at Truebit — having fun and giving back to the community while we work on high-impact research and engineering.</p><h3>The Doge-Ethereum art project</h3><p><a href="http://www.jessicaangelarts.com/">Jessica Angel</a>, a brilliant NYC-based artist, came to answer our calls.</p><p>She signed up as the art director for the project.</p><p>In one of her first bursts of creativity — she decided that building a normal bridge would be too boring. A bridge has one end and another; it shows separation. We want to show community and togetherness; bridging Ethereum and Dogecoin; bridging the onchain and the offchain worlds.</p><p>She was inspired by the mobius bridge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*Tq-a3a2RNL7byyWfm2J5uA.jpeg" /><figcaption>the Mobius bridge design in Bristol</figcaption></figure><p>After some noodling and wireframing, she came across the concept of a Klein bottle.</p><p>The Klein bottle is a mathematical object. It’s created by taking a torus and bending it onto itself.</p><p>It has no inside or outside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLonz5-dCI5pHDFo37jW_A.jpeg" /><figcaption>Jessica’s evolving design for the Klein bottle</figcaption></figure><p>You walk through a tunnel to enter a cavern.</p><p>It will fit 40 people at a time.</p><p>And it will be based in New York; in Central Park, Governors Island, or another public space pending permits.</p><h3>Open-source art</h3><p>What if we took a cue from open-source software and built this as an open-source art project?</p><p>Artists submit ideas and proposals to Jessica — ideas for what to add to the bridge.</p><p>Lights, sounds, interactions, movement.</p><p>The Klein bottle could have a wall covered with LEDs. As Ethereum moves forward steadily with each new block created, the LED wall splashes with colors derived from the current block hash.</p><p>Or we could involve sound — every time a Doge block is created, there is a deep bass sound; every time an Ethereum block is created, a higher-frequency snare kicks in; every time there is a Truebit verification game and a solver’s solution is challenged, the Jaws soundtrack plays.</p><h3>The Rabbit Hole</h3><p>Which brings me to this weekend and <a href="https://ethdenver.com/">ETHDenver</a>.</p><p><a href="https://twitter.com/J_Angel_Studio">Jessica</a>, <a href="https://twitter.com/hollym0ly">Holly</a>, <a href="https://medium.com/@dietexperiments">Emily</a>, and <a href="http://lindywilkins.com/">Lindy</a> had organized a maker space for having ETHDenverites hack on blockchain art.</p><p>It was at the introductory session that the conversation clicked in our group of 20.</p><p>As we went around the room, people shared stories of how they first heard about blockchains and fell into the rabbit hole.</p><p>We’d been so far referring to this amorphous project as the Doge-Ethereum art project, the Klein bottle, .. but none of the names had stuck.</p><p>That’s when <a href="https://twitter.com/lrettig">Lane</a> dropped a gem — we should call it “the rabbit hole”.</p><p>It fit. You walk into the narrow Klein bottle entrance to get to the main chamber. Just like a rabbit hole.</p><p>We talked about how we could make blockchains more understandable. Blockchains are abstract. Could we make them tangible?</p><p>Then, prodded by a comment from <a href="https://willmeier.cool/">Will</a>, ideas began to crystallize…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NbbEcWeag39O-fCaDHMtUw.jpeg" /><figcaption>The EthDenver maker space — the room started as a blank slate, and was transformed into a lively spot filled with interactive art over the weekend!</figcaption></figure><h3>The Physical Blockchain</h3><p>The bridge would have it’s own EVM sidechain.</p><p>And it would have its own Proof-of-Work.</p><p>Proof-of-Work as in real physical labor.</p><p>There would be a big button in some corner; every hundred times someone presses it, a block is created on the chain. A real block that you could see on a block explorer.</p><p>Or there could be a treadmill, and a block is created every time someone runs a mile.</p><p>Or instead of a treadmill, it could be a hamster’s wheel — to emphasize that it is “useless” work, as in Bitcoin and Ethereum.</p><p>Maybe the proof-of-work could be dancing — as measured by pressure sensors in the ground.</p><p>We could collectively mine the genesis block at the opening — with a big dance party at the strike of midnight (this one was <a href="https://twitter.com/robbiebent1">Robbie</a>’s idea).</p><p>How could we visualize the network, the peer-to-peer layer? When the proof-of-work is complete and a block is created, a trail of LEDs would show it being relayed around the structure.</p><p><a href="https://twitter.com/smpalladino">Santiago</a> and <a href="https://twitter.com/maraoz">Manuel</a> were in the room and dropped a doozy — in the real Ethereum network, miners compete to get the required proof of work first. In the same way, we could have multiple buttons at different spots in the bridge. People would compete for creating the next block — whoever makes it first, gets the block reward, while the other proofs-of-work go to waste.</p><p>What if a group of fit people visited the installation? Being fast runners, they would hit the one mile proof-of-work on the treadmills quickly, and create blocks too frequently.</p><p>We would need a difficulty adjustment algorithm.</p><p>The treadmill would autonomously increase it’s incline; increasing the resources needed for getting the proof-of-work.</p><p>Participants would receive tokens as a block reward or from playing games within the structure.</p><p>A relay — using the <a href="https://github.com/paritytech/parity-bridge">Parity bridge</a>, the <a href="https://github.com/GridPlus/trustless-bridges">Gridplus bridge</a>, or the <a href="https://github.com/poanetwork/deployment-bridge">PoA network bridge</a> — could be used to move tokens from the installation chain to mainnet Ethereum. We could leave people with a memento of their visit.</p><p>A physical blockchain. Real proof of work, miners competing, lights showing the P2P layer, coins you could take home.</p><p>Abstract concepts made tangible.</p><p>So respect. Much wow.</p><h3>The Decentralized Art Community</h3><p>The Doge-Ethereum installation and how we coordinate around it could form the basis of an ongoing Decentralized Art Community.</p><p>Artists fundraise using the blockchain; donators follow projects they’re interested in; interactions happen on and off chain.</p><p><a href="https://twitter.com/hollym0ly">Holly Chang</a>, a community builder and burning man aficionado, is leading the charge here.</p><p>She’s coordinating with some of the best teams in the space to bootstrap this community; Giveth as the transparent platform for funding and following projects; Aragon as the organizational backbone for voting on proposals and governance.</p><h3>Fin</h3><p>The Truebit Doge-Etheruem bounty provides the first piece of funding.</p><p>Now it’s a community effort.</p><p>Let’s build something f*cking awesome, and show the world how blockchains work.</p><p>To learn more or get involved, visit the <a href="http://artproject.io">art project website</a> or join our <a href="https://t.me/cryptoartproject">Telegram</a> group.</p><p>We are hosting events in SF and NYC soon to meet with the community.</p><p>Shoutout to everyone who has helped push this project forward so far — Jessica Angel, Holly Chang, Lindy Wilkins, Robbie Bent, Emily Hunter, Jason Teutsch, Karen Teutsch, Will King, Matt Condon, Aqeel Mohammad, Chris Hutchinson, Brady McKenna, Océane Boulais, Will Meier, and Lane Rettig.</p><p>Say hi to me on <a href="https://twitter.com/sinahab">Twitter</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31e8116043c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/truebit/enter-the-rabbit-hole-the-doge-ethereum-art-project-31e8116043c4">Enter the Rabbit Hole: The Doge-Ethereum Art Project</a> was originally published in <a href="https://medium.com/truebit">Truebit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Contrarian Beliefs Lead to Outsized Returns]]></title>
            <link>https://medium.com/@sinahab/contrarian-beliefs-lead-to-outsized-returns-5ae997be443c?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ae997be443c</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Fri, 12 May 2017 14:57:06 GMT</pubDate>
            <atom:updated>2017-05-12T15:48:32.331Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yZDrtPZpKLSwezrytZKOyA.jpeg" /><figcaption>Image credits: <a href="https://unsplash.com/@jillheyer">Jill Heyer</a></figcaption></figure><p>It’s easy to follow trends and chase the latest shiny object. In tech over the last few years, industry hype has followed anonymous messaging apps to blockchains to chatbots, with many others in the way. While these fields could have real merits, the truth is that it’s too late to enter the space when it is ‘hot’ and reported on daily by TechCrunch. Successful teams have usually been working on the problem for some time, deepening their domain expertise and building an early defensive moat.</p><p>Success comes from seeing opportunities before the broader market does, and having the conviction to act.</p><p>This has a direct parallel in the world of equity investing. Stocks begin the cycle by being generally invisible to the market, ignored by analysts, and undervalued. At some point, early contrarians notice that underlying fundamentals are sound, and invest. Over time, stock-picking models notice the divergence between analyst estimates and actual earnings, and begin to make allocations. The tide begins to turn and the broader market starts to notice. Expectations and consensus estimates rise, leading momentum-driven investors to get involved. And all the while, prices rise in accordance with growing demand, until the security is perhaps overvalued.</p><p>Interestingly enough, Merrill Lynch has a sell-side indicator which uses this logic as a quantitative signal. In a report, they <a href="http://www.investopedia.com/news/bullish-indicator-poses-threat-market-rally/">declare</a>: “We have found that Wall Street’s consensus equity allocation has been a reliable contrary indicator. In other words, it has historically been a bullish signal when Wall Street was extremely bearish, and vice versa.”</p><p>That’s a bold statement. Consensus allocations are inversely correlated with future returns. Securities that are ‘hot’ underperform, and those that are ignored outperform.</p><p>This makes me think of the famous <a href="https://www.quora.com/What-is-something-you-believe-that-nearly-no-one-agrees-with-you-on">question</a> posed by Peter Thiel to entrepreneurs: “What is something you believe that nearly no one else does?” This probes for original thinking and acknowledges an underlying truth: contrarian beliefs lead to outsized returns.</p><p><em>Want to say hi? Ping me on </em><a href="https://twitter.com/sinahab"><em>Twitter</em></a><em>.</em></p><p><em>P.S. I write daily about what I’m working on or find interesting. You can read more on </em><a href="http://sinahab.com/blog/"><em>my personal blog</em></a><em> and </em><a href="http://sinahab.com/subscribe"><em>sign up</em></a><em> to receive future posts, if you wish!</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F33f166%3Fas_embed%3Dtrue&amp;url=https%3A%2F%2Fupscri.be%2F33f166%2F&amp;image=https%3A%2F%2Fupscri.be%2Fmedia%2Fform.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/4683bf2f33fc98177c1535223d463130/href">https://medium.com/media/4683bf2f33fc98177c1535223d463130/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ae997be443c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Much Should You Raise?]]></title>
            <link>https://medium.com/@sinahab/how-much-should-you-raise-9492c5efa7d5?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9492c5efa7d5</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[venture-capital]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Fri, 12 May 2017 14:50:19 GMT</pubDate>
            <atom:updated>2017-05-12T15:48:39.513Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Htju3TB7A34iNCwZF-FOTQ.jpeg" /><figcaption>Image credits: <a href="https://unsplash.com/@jimiburg">Jimi Filipovski</a></figcaption></figure><p>I listened to the <a href="https://player.fm/series/masters-of-scale-with-reid-hoffman/the-money-episode-with-minteds-mariam-naficy">Masters of Scale episode on raising money</a> recently. Reid Hoffman makes a strong case that entrepreneurs should raise more than they think they need.</p><p>The core of the argument boils down to planning for the unknown.</p><p>Reid makes the point that tech startups, especially the kind created in Silicon Valley, are usually experimenting with new technology or unproven business models. They must navigate a long path of experimentation to uncover insights which will hopefully lead to product-market fit. They do not know the formula for success. Raising more enables them to continue in the face of unexpected setbacks, give a shot at their Plan B (or “Plans B” as Reid calls them), and take advantage of unforeseen opportunities when they present themselves.</p><p>The alternate viewpoint is that you can build successful internet businesses without raising much outside funding. These business are sometimes called ‘lifestyle business’, but I prefer the term ‘cashflow businesses’. They grow revenue incrementally and expand their ambitions according to their means. They are usually operating with understood business models and lower technology risks, and are not necessarily attempting world domination. Example of successful cashflow businesses are <a href="https://www.crunchbase.com/organization/basecamp#/entity">Basecamp</a>, <a href="https://news.distrokid.com/what-ive-been-up-to-for-the-past-4-years-ef06ab9c5cd6">Distrokid</a>, <a href="https://www.crunchbase.com/organization/plentyoffish">Plenty of Fish</a>, and the many listed on <a href="https://www.indiehackers.com/businesses">Indie Hackers</a>.</p><p>An interview with Brian Chesky, Airbnb’s founder, towards the end of the episode lists some of the benefits of raising less money:</p><blockquote>I think startups raise way too much money. The less money you raise, the more control of the company you keep. But more importantly the more constraints you create. They develop a scrappy culture. The scrappy culture requires you to build more novel solutions, use fewer out-of-the-box software things and you end up just building a scrappy, more frugal, more startup like environment. I would make sure that you give away control grudgingly.</blockquote><blockquote>- Brian Chesky</blockquote><p>It’s important for the entrepreneur to first understand what kind of a business they are trying to build. Some questions to ask are: can this market support a venture-scale business (i.e. what are the size and growth trajectories of TAM / SAM)? Do market conditions allow the creation of cashflow businesses, or is there a winner-take-all dynamic? Markets where there are network effects (e.g. marketplaces) or large infrastructure requirements (e.g. cloud storage) are for instance not as suitable for the creation of small businesses. The competitor with the most resources will get ahead and over-time squeeze out every other player. Reid makes this point in the podcast too:</p><blockquote>It’s easy to err on the side of caution — to raise less and to spend less. But there’s a potential mortal risk in being conservative. You might think you’re best serving your investors by being as efficient with capital as possible, but that’s actually not true. You reward your investors by creating a successful company. And raising only $20M might mean losing the $20M if your competitors out-spend you.</blockquote><blockquote>- Reid Hoffman</blockquote><p>Reid’s argument rings true once an entrepreneur decides that they are indeed building a venture-scale business. One should perhaps raise more money than one thinks is necessary.</p><p>This episode was thought-provoking, educational, and gave me lots to chew on. I’m happy that Reid has decided to share his experience and point-of-view with the rest of us. I’m looking forward to the rest.</p><p><em>Want to say hi? Ping me on </em><a href="https://twitter.com/sinahab"><em>Twitter</em></a><em>.</em></p><p><em>P.S. I write daily about what I’m working on or find interesting. You can read more on </em><a href="http://sinahab.com/blog/"><em>my personal blog</em></a><em> and </em><a href="http://sinahab.com/subscribe"><em>sign up</em></a><em> to receive future posts, if you wish!</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F33f166%3Fas_embed%3Dtrue&amp;url=https%3A%2F%2Fupscri.be%2F33f166%2F&amp;image=https%3A%2F%2Fupscri.be%2Fmedia%2Fform.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/4683bf2f33fc98177c1535223d463130/href">https://medium.com/media/4683bf2f33fc98177c1535223d463130/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9492c5efa7d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Should Write]]></title>
            <link>https://medium.com/@sinahab/why-you-should-write-ea971c13d68?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea971c13d68</guid>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Fri, 27 Jan 2017 19:02:11 GMT</pubDate>
            <atom:updated>2017-01-27T22:34:20.806Z</atom:updated>
            <content:encoded><![CDATA[<p>Writing online can be an arduous process. Anything you publish is public forever and can be read by anyone. Crafting material that stands up to this scrutiny is challenging and it is not always clear that the effort is worthwhile.</p><p>After some consideration, I’m convinced that it is a good idea to write publicly. I’m sharing this note to outline my thinking on why.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2edLFROjaMRrm-yQQpvueQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@szolkin">Sergey Zolkin</a></figcaption></figure><p>You should write because:</p><h4>1) You will clarify your thoughts</h4><p>Ideas often start taking shape as disordered insights coalesce over time. Since we are used to our internal monologues, it is possible to confuse personal opinions and unvalidated theories with facts at this stage. So it is important to occasionally pause and evaluate our logic from first principles.</p><p>Writing is a potent tool for facilitating this self-reflection. Knowing that your thoughts will soon be public on the internet pushes you to distill them into their meaningful core. The accountability forces you to critically evaluate your thought process, structure your arguments, and further research any uncertainties.</p><p>In the past, I’ve been guilty of persisting in projects despite having a vague awareness that I was ignoring an underlying issue. I invariably detected these holes in my logic when I attempted to explain the idea to a friend. Writing formalizes this process.</p><p>I recently came across Julie Zhuo’s recent <a href="https://medium.com/@joulee/after-four-years-of-blogging-a-change-e244f858178#.i6xyb3p9e">post</a> commemorating four years of writing. In there she says: “If I could say it out loud to the world, I could discover where my convictions lie.” Writing forces you to find out what you truly believe in.</p><h4>2) You will make helpful connections</h4><p>When you share your writing online, you become discoverable.</p><p>We are all connected in the fabric of the internet. We participate in social networks, read forums, and share relevant articles with friends and family. Thanks to these mechanisms, there is a good chance that the right people will come across your writing over time.</p><p>This dawned on me recently when I published a <a href="https://medium.com/@sinahab/the-programmers-guide-to-booking-a-concert-e048a580735f#.w6q3mzd2f">blog post</a> about organizing a concert as a programmer. At the time, I was working on a different music project and was exerting significant effort in order to connect with important players in the industry. As a result of this post and it’s circulation, these individuals reached out to me of their own accord.</p><p>I learned an important lesson about the social structure of the internet. Instead of trying to reach people, I could create the conditions in which they reached out to me.</p><p>I followed this trail of thought and read Austin Kleon’s book “<a href="https://www.amazon.com/Show-Your-Work-Creativity-Discovered/dp/076117897X">Show Your Work!</a>” which fleshes out the idea. Austin makes the point that even though we can spend our time networking, getting warm introductions, and sending cold emails, it is perhaps more effective to spend the equivalent time honing our work, sharing it online, and then connecting with the right individuals at scale. He quotes Dan Harmon (co-creator of Community and Rick and Morty) in saying: “Find your voice, shout it from the rooftops, and keep doing it until the people that are looking for you find you.”</p><h4>3) You will evolve your thoughts</h4><p>The individuals who engage with your writing usually do so because of a shared interest. Thanks to their varying backgrounds, experiences, and specialties, the feedback they provide will be diverse and valuable. They will surface insights which you were not aware of. As Christopher Hitchens once <a href="https://www.amazon.com/Quotable-Hitchens-Alcohol-Zionism-Christopher/dp/0306819589">said</a> “[writing] brings you into contact with people whose opinions you should have canvassed before you ever pressed pen to paper.”.</p><p>The process of sharing improves the final outcome of your work.</p><h4>4) You will become a better communicator</h4><p>By writing regularly, your ability to express yourself will improve. You will appreciate the value of phrasing and well-chosen examples. You will grow to empathize with your audience and anticipate their concerns before making your case. You will learn to tell better stories.</p><p>Writing is a proxy for other forms of communication. By becoming a better writer, you become a better communicator. This will positively impact many aspects of your life and career.</p><h4>5) You will become a better reader</h4><p>By focusing on your own writing, you notice the writing of others more. You appreciate nuances of the craft that are invisible to the uninitiated but which make a material difference. You notice the author’s use of narrative, suspense, or simply their original phrasing.</p><p>Enhancing your ability to write, and therefore read, will grow your respect for the written word. This will pay dividends for the rest of your life as you explore the large canon of human work with deeper appreciation.</p><h4>6) You will find another channel for creativity</h4><p>In a way that reminds me of programming, writing is a tool that can be used both practically and artistically. You may start writing because it serves some immediate practical purpose for communication. But there is a chance that over time you will grow to master the craft and appreciate it as a means of self-expression.</p><p>With all that in mind, I’m committing to writing more in 2017. I look forward to seeing where this journey takes me.</p><p><em>Want to say hi? Ping me on </em><a href="https://twitter.com/sinahab"><em>Twitter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea971c13d68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I designed an algorithm that mixes playlists of bands coming to your town]]></title>
            <link>https://medium.com/free-code-camp/the-machine-made-playlist-faec2c8bc7ba?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/faec2c8bc7ba</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Thu, 05 Jan 2017 15:15:57 GMT</pubDate>
            <atom:updated>2017-02-13T17:31:06.227Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T_4UZtxr2sGPwDS6FuSO6w.jpeg" /></figure><p>This is a retrospective on <a href="http://www.funkavinci.com">funkavinci.com</a>, a web project I worked on last summer. It was a series of weekly computer-generated playlists showcasing the best upcoming concerts in town.</p><p>Inspired by Spotify’s Discover Weekly, Funkavinci used an algorithm to generate a weekly playlist with 20 tracks. Each track corresponded to an artist who would be playing live during the following week. If a listener liked a track, they knew the artist was going to be in town and could purchase tickets to see them perform.</p><p>I recently ended support for Funkavinci after a few months of running it on the side. I’m writing this post to describe my process in building it and share some takeaways.</p><h3>Motivation</h3><p>I was discovering a lot of new music last summer. There were many acts I wanted to see live and who I knew would be performing in San Francisco sooner or later. I also wondered if a tool for music discovery could be built by monitoring artists who were touring through the city.</p><p>Services like Bands in Town and Songkick were partially addressing these ideas but had shortcomings. They sent daily notifications mentioning names of bands who were in town, but I had trouble recognizing <a href="https://www.youtube.com/watch?v=W_IzYUJANfk">the names</a>. I was missing shows that I would have gone to. Doing some research, I found that this was a common problem. A more effective approach would be to shift the attention from the artist’s name to their songs and let the music speak for itself.</p><p>I also learned that concerts were becoming more important within the overall music industry. Musicians today depend on live music, instead of recorded music, for the <a href="http://www.nytimes.com/2015/08/23/magazine/the-creative-apocalypse-that-wasnt.html">majority of their income</a>. Yet most concerts do not sell out. Building a service which outlined the best concerts in town would not only help fans discover music; it would also help musicians sell tickets.</p><p>I decided to build an app that would generate a new playlist every week with 20 tracks representing 20 upcoming concerts and deliver it to my email.</p><h3>Prototyping a Solution</h3><p>After checking out a few APIs, I decided to use <a href="http://platform.seatgeek.com/">Seatgeek</a> as a source for up-to-date concert listings. They have a relatively complete database of events, provide a JSON API, and allow commercial use of their API.</p><p>To generate a playlist with the best concerts, I devised the following algorithm:</p><ol><li>Query the <a href="http://platform.seatgeek.com/">Seatgeek API</a> for all upcoming concerts in San Francisco for the following week. This would usually return around 100 events.</li><li>Extract the primary performer for each event and query the <a href="https://developer.spotify.com/web-api/search-item/">Spotify Search API</a> for that artist.</li><li>Query the <a href="https://developer.spotify.com/web-api/get-artists-top-tracks/">Spotify top tracks API</a> for the most popular track by each artist.</li><li>Filter the resulting list to the top 20 tracks as ordered by popularity and add them to a Spotify playlist for listening. This was a list of the 20 best artists in town the following week, at least as decided by the popularity of their most popular track on Spotify.</li></ol><p>I was pleasantly surprised by the outcome. The playlist format had put the music front and center. No longer intimidated by eccentric band names, I listened and fell in love with a couple of artists. Better yet, they were all touring through San Francisco so I saw them live in less than a week. I shared the playlist with a few friends who had similar results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*HczXN7mbQCx13a4UT4U5Nw.png" /><figcaption>The first Funkavinci playlist</figcaption></figure><h3>Building a Product</h3><p>I quickly realized that adding 20 popular tracks to a playlist does not make for a smooth listening experience. There were electronic, hip hop, and rock tunes showing up in sequence. Moreover, the Seatgeek and Spotify search data were not always perfect. There were occasionally artists who were not performing in town but had similar names to ones who were.</p><p>I modified the algorithm to add the top 50 tracks to a private playlist. I would personally listen to these and prune to keep a top 20. I made sure that the artists were all performing in the city and that the music flowed through the playlist as a whole.</p><p>I built a Rails app to manage the various playlists, shows, artists, and tracks. I added an admin UI that would allow me to visualize, add, or remove these various entities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TaOkiwtsMfX8RrxACSStEA.png" /><figcaption>The Admin UI</figcaption></figure><p>There was a clean underlying structure linking artists to playlists and playlists to the city. This meant that in the future, I could add an abstraction layer to the backend to generate playlists for other cities as well.</p><p>I then moved onto the user facing site. I used a card-based layout to showcase the concerts and complement the playlist. This layout would also allow for easy experimentation and re-ordering if I ever decided to personalize the playlists for the logged in user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eM0bYQYr_dbqlFQcKhe74w.png" /><figcaption>Using cards to display concert information</figcaption></figure><h3>Into the Wild</h3><p>I pushed the site live in August. A group of friends signed up at first and the reach grew organically over the following weeks.</p><p>The Funkavinci playlist was delivered as a weekly newsletter every Sunday morning at 10am. The email provided a morsel of value and built a sense of expectation around it’s weekly arrival. Users were able to simply forward the email to friends, creating an organic pathway for growth.</p><p>Another growth hack was to use the Spotify social feed to spread awareness. The playlists had names like “<a href="http://www.funkavinci.com/playlists/24">Funkavinci.com | 12/29–01/05</a>”. If someone found a friend listening to the playlist and wanted to find out more, they could simply visit the website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*uZx6-OK7BRiagXSyY5W0Hw.png" /><figcaption>Funkavinci.com on the Spotify social feed</figcaption></figure><p>The process of putting together the weekly playlist was automated and took an hour of time per week. I would listen to 50 tracks and write a conversational blurb announcing the new playlist. This was included on the site and the newsletter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VANvPqiDOx7OjyWGybKUIg.png" /><figcaption>I had fun writing these weekly blurbs.</figcaption></figure><h3>My Takeaways</h3><p>As I close Funkavinci and move onto other things, some of my notes for myself are:</p><h4><strong>Understand the pros and cons of using external APIs</strong></h4><p>At one point, I entertained the idea of growing Funkavinci into a business. I was hearing regular accounts of friends purchasing tickets and going to concerts because of the service. I wondered if it could scale into something larger.</p><p>I ultimately decided against this due to a number of reasons, one of which was that Funkavinci was in a low-leverage position. It owned neither the content (i.e. the music) nor the data (i.e. listening metrics on Spotify or purchasing metrics on ticketing sites).</p><p>Building a consumer app requires deep insight into user behavior and I didn’t have access to important data points. A potential solution would have been to curb the reliance on Spotify (or it’s alternative Soundcloud) by independently hosting music and providing a media player. Sites like <a href="http://8tracks.com/">8tracks</a> or <a href="https://www.residentadvisor.net/">Resident Advisor</a> follow this approach. This entails added complications, including the handling of music rights, and did not seem worthwhile given the limited upside.</p><p>APIs allow us to leverage existing platforms and build solutions that would not have been possible otherwise. They can also put one in a low leverage position where one depends on an external platform for mere existence or for access to crucial data.</p><h4><strong>Kick off projects with a push for publicity</strong></h4><p>With Funkavinci, I fell into a classic engineer trap of shying away from publicity. Holding high standards for the product and still harboring traces of old perfectionist tendencies, I thought the app was not ready for prime time. I therefore did not make a real effort at marketing and only shared it in a few online forums.</p><p>I’ve now learned that publicizing a project early on can be very helpful. It will help create an early community of users who inform your decisions. Moreover, and perhaps more importantly in the early days, it will provide you with a sense of increased accountability and motivation.</p><h4><strong>Pick names that are easy to pronounce and to spell</strong></h4><p>As the saying goes: “there are only two hard things in Computer Science: cache invalidation and naming things.” The same applies to products. I picked the name Funkavinci as it brought to mind an image of a funky DaVinci and because it was edgy. Watching multiple people struggle with pronouncing or spelling it taught me a valuable lesson.</p><p>With that, I bid farewell to a fun project, and move onto the next.</p><p><em>Want to say hi? Ping me on </em><a href="https://twitter.com/sinahab"><em>Twitter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=faec2c8bc7ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/the-machine-made-playlist-faec2c8bc7ba">How I designed an algorithm that mixes playlists of bands coming to your town</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Programmer’s Guide to Booking a Concert]]></title>
            <link>https://medium.com/free-code-camp/the-programmers-guide-to-booking-a-concert-e048a580735f?source=rss-121949e865d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e048a580735f</guid>
            <category><![CDATA[music]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[san-francisco]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Sina Habibian]]></dc:creator>
            <pubDate>Tue, 20 Dec 2016 15:29:00 GMT</pubDate>
            <atom:updated>2018-12-13T07:00:09.122Z</atom:updated>
            <content:encoded><![CDATA[<p>About two months ago, a friend and I decided to organize a concert in San Francisco. We had no prior experience promoting shows, but we both loved live music and felt up to the challenge. Plus, 2016 had been a crappy year, and it seemed like this would be a good way to bring the community together and end the year on a positive note.</p><p>We began by reaching out to local acts we personally knew with hopes of booking them for a concert in December. A week later, we had exhausted our list of contacts and still had no success. I began thinking about whether we could analyze social media to scout local musicians.</p><p>I decided to look into Soundcloud, the de facto online hangout for musicians. Having met a few musicians through another project, I knew they routinely used the platform to distribute music and connect with fans. It didn’t matter who or where someone was — a bedroom DJ in SoMa, a garage band in Mountain View, or a singer-songwriter in Oakland — they all posted music on Soundcloud. And as long as they had posted a single track, I knew I would be able to find them.</p><h3>Crawling the Soundcloud Graph</h3><p>A quick look at Soundcloud’s Search API revealed that it wouldn’t be adequate. The simple keyword search would not allow me to write a query like “return any user based in San Francisco or Oakland who has less than 10k followers and has posted at least one track”.</p><p>Looking for a solution, I realized that crawling the social graph could be an effective approach. I could write an algorithm which, when seeded with a Soundcloud user, would pull all their followers and followings, and then in turn pull all followers and followings for each of those users. This simple recursive algorithm would expand to cover thousands of users after a few iterations. I would then have the luxury to analyze the social connections any which way, the easiest of which would be writing a SQL query.</p><p>I picked Afrolicious, Mark Slee, EARMILK and a few others as seed accounts. These users are deeply integrated into the hip hop, electronic, and indie scenes of San Francisco. I was confident that their combined social graph would provide a diverse and complete representation of Bay Area music.</p><p>As I began experimenting with the algorithm, I realized that it was impractical to pull a user’s followers. Musicians regularly have tens or hundreds of thousands of followers (Calvin Harris at the extreme end of the spectrum has 7.08m followers). Pulling all followers for all users was obviously a sub-optimal approach. I also didn’t intend on paying a thousand dollars a month in database costs.</p><p>The solution was to crawl only the <em>followings</em> and not the followers<em>.</em> Musicians follow other musicians. Interestingly enough, there are even papers that have analyzed this behavior and the “virtual scenes” that emerge (<a href="http://dx.doi.org/10.1080/09548963.2015.1066073">Allington et al., 2015</a>). By crawling the following graph, I could efficiently map out the local music scene. Furthermore, by keeping track of who follows who, I could later use an algorithm like PageRank to find up-and-comers who do not yet have many followers but nevertheless have a vote of confidence from the community.</p><p>I built a Sinatra app to crawl the Soundcloud social graph and saved all users and their relationships to a Postgres database. After a few iterations, there were over 200k users and 500k relationships. It was time to make sense of the data.</p><h3>Analyzing the Network</h3><p>I wrote a Python script to query the database for any Soundcloud user with at least 500 followers, at least one track, and based in San Francisco or Oakland. I then mapped out these users and their relationships onto a <a href="https://networkx.github.io/">Networkx</a> directed graph. It was then simple to export a .gexf graph file which could be consumed by <a href="https://gephi.org/">Gephi</a> for visual analysis.</p><p>Gephi turned out to be an incredible tool for visualizing social networks and gave me more than enough to play with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nf8zqZaL0U2EaVmiGupPew.png" /><figcaption>The Soundcloud Network in San Francisco and Oakland. Size corresponds to PageRank and color corresponds to community.</figcaption></figure><p>The above is a force-directed graph of the Soundcloud network. I first used PageRank to leverage the existing follower-following relationships and determine which the most important nodes are. This is represented as the size of a node. I then layered on a built-in modularity optimization algorithm to detect communities. The community is represented as the color of a node.</p><p>This graph provides an interesting viewpoint into the San Francisco music scene. The largest node, Anthony Mansfield, is a veteran Bay Area House DJ who is also deeply involved with the Disco Knights Burning Man camp. Another large node is Honey Sound System, a DJ collective who calls San Francisco home. The bottom-left of the graph is a Hip Hop cluster including San Francisco artists like Telli Prego and Show Banga.</p><p>Our goal was to find musicians for our upcoming concert. Ironically, this was now tough given the quantity of available options. We had identified over a thousand Soundcloud accounts as musicians in the Bay Area. We did not have a good way of listening to this amount of music short of copying each Soundcloud URL into the browser. Furthermore, we wanted input from our friends and community on who they liked to see live.</p><h3>Scouting Talent</h3><p>To address these issues, I added a UI layer to the Sinatra app so that we could streamline our scouting efforts. It showed a list of musicians ranked according to the results of the earlier network analysis. There was an embedded Soundcloud widget so that we could listen to an artist’s music without leaving the page. I also added a rating system so that we could assess each artist and comment on whether we wanted to see them live.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*ZrF0EafTT7Xtim-lBX0AcA.png" /><figcaption>Interface for evaluating an artist.</figcaption></figure><p>I then layered on a user authentication scheme so that multiple people could use the system at once. We enlisted the help of a few friends living in the city who also appreciate music. With their help and our newly built talent scouting system, we collectively listened to and voted on 400 artists. I then built an admin page so that I could see the best rated musicians across the platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*huMQ2NCHzfcrh1WKvCf7aA.png" /><figcaption>Admin UI with aggregated scout ratings.</figcaption></figure><p>We had crowd-sourced our scouting efforts and were starting to find some gems. More importantly, we had validated demand on which local acts our friends and community wanted to see live.</p><h3>Booking the Show</h3><p>With things coming together, we gave ourselves a name: the Gremlins. Gremlins are cute, mischievous, and are always messing around and breaking things. This seemed fitting given our progress so far.</p><p>We reached out to a few of our favorite new artists, and booked two funky and talented local acts: Foxtails Brigade and Baby’s Day Out. We were talking with venues in parallel and landed a night at The Lost Church, a cozy theatre in The Mission with capacity for 75 people. The wooden interior and the eclectic artwork strewn about the place were inline with the atmosphere we were trying to create.</p><h3>The Gremlins Present</h3><p>A month later, we walked into The Lost Church on the night of the concert. I felt a sense of fulfillment as we welcomed friends and friends-to-be into the theatre. The show was sold out.</p><p>Laura from Foxtails Brigade and Meggy and Mel from Baby’s Day Out shared their music with a lively audience. We followed them through joyful and melancholic moments. It was a memorable evening.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kRlbnNyhexTCvB_E_3h7dw.jpeg" /><figcaption>The Gremlins!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D0osQKWBqijlAvw7KYUrgA.jpeg" /><figcaption>The Gremlins present: Baby’s Day Out!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MK72NZ4vhpzTC4HJJKtj2Q.jpeg" /><figcaption>The Gremlins present: Laura Weinbach!</figcaption></figure><p>In coordinating this concert, I experienced two weirdly different perspectives on viewing a ‘musician’. First, as a node whose relative importance and degree of connectedness can be calculated in a connected network. Second, as a soulful and talented human being who can move an audience through the expression of their art.</p><p>This dichotomy is a fact of life in today’s world. We are each heavily networked within the social graphs of Facebook, Instagram, and Twitter. It’s fascinating to think of ourselves as nodes in this perspective. I wonder what insights tinkerers at these companies have gleaned about our inner lives.</p><p><a href="https://sinahab.com/subscribe/"><em>Subscribe</em></a><em> to follow my writing, or ping me on </em><a href="https://twitter.com/sinahab"><em>Twitter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e048a580735f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/the-programmers-guide-to-booking-a-concert-e048a580735f">The Programmer’s Guide to Booking a Concert</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>