<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[seve.blog]]></title><description><![CDATA[building http://tscircuit.com (React & AI for Electronic Design), podcast host https://electronics.dev, prev founding CTO https://seam.co, I like open-source and startups.]]></description><link>https://seve.blog</link><image><url>https://substackcdn.com/image/fetch/$s_!mk4l!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0ba03b-eabc-4a43-ad2c-349b69666775_600x600.png</url><title>seve.blog</title><link>https://seve.blog</link></image><generator>Substack</generator><lastBuildDate>Tue, 21 Apr 2026 10:49:36 GMT</lastBuildDate><atom:link href="https://seve.blog/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Severin Ibarluzea]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[seveibar@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[seveibar@substack.com]]></itunes:email><itunes:name><![CDATA[Seve Ibarluzea]]></itunes:name></itunes:owner><itunes:author><![CDATA[Seve Ibarluzea]]></itunes:author><googleplay:owner><![CDATA[seveibar@substack.com]]></googleplay:owner><googleplay:email><![CDATA[seveibar@substack.com]]></googleplay:email><googleplay:author><![CDATA[Seve Ibarluzea]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[I made a 3D SVG Renderer that projects textures without rasterization]]></title><description><![CDATA[How can you make affine transformations (the only ones SVGs are capable of) resemble perspective transformations?]]></description><link>https://seve.blog/p/i-made-a-3d-svg-renderer-that-projects</link><guid isPermaLink="false">https://seve.blog/p/i-made-a-3d-svg-renderer-that-projects</guid><dc:creator><![CDATA[Seve Ibarluzea]]></dc:creator><pubDate>Thu, 05 Jun 2025 02:01:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!g-92!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;ve been building a <a href="https://github.com/tscircuit/simple-3d-svg">vanilla 3D object to SVG renderer in Typescript</a> to help render <a href="https://tscircuit.com/seveibar/usb-c-flashlight#3dhttps://tscircuit.com/seveibar/usb-c-flashlight#3d">circuit boards that are made in React</a> and discovered an interesting trick to keep the SVGs small while getting approximately-correct looking perspective transformations with image textures.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g-92!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g-92!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 424w, https://substackcdn.com/image/fetch/$s_!g-92!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 848w, https://substackcdn.com/image/fetch/$s_!g-92!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 1272w, https://substackcdn.com/image/fetch/$s_!g-92!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g-92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png" width="1456" height="708" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:708,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:115620,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!g-92!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 424w, https://substackcdn.com/image/fetch/$s_!g-92!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 848w, https://substackcdn.com/image/fetch/$s_!g-92!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 1272w, https://substackcdn.com/image/fetch/$s_!g-92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678b33b-52b0-4d92-9fa2-584644b6de0e_1550x754.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An example circuit board rendered with our vanilla Typescript 3D Renderer. Great for checking sizing! You can see we were able to project the &#8220;texture&#8221; containing the PCB traces!</figcaption></figure></div><p>SVGs don&#8217;t support perspective transforms like CSS (or at least they&#8217;re not guaranteed to work in image viewers), so we need a way to simulate this perspective transformation without creating a massive SVG. It&#8217;s easy to draw the box below, you can just project the face of each side of the cube into a polygon, but mapping the texture to that perspective transform isn&#8217;t natively possible!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yT_M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yT_M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 424w, https://substackcdn.com/image/fetch/$s_!yT_M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 848w, https://substackcdn.com/image/fetch/$s_!yT_M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 1272w, https://substackcdn.com/image/fetch/$s_!yT_M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yT_M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png" width="1456" height="738" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:738,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:123317,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yT_M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 424w, https://substackcdn.com/image/fetch/$s_!yT_M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 848w, https://substackcdn.com/image/fetch/$s_!yT_M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 1272w, https://substackcdn.com/image/fetch/$s_!yT_M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0113af28-53ef-43b0-bb67-b7c8b8716ae9_1566x794.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Perspective transforms in CSS using the transform attribute (from MDN)</figcaption></figure></div><p>So SVGs don&#8217;t support perspective transforms, what do they support? SVGs support this nice little transform called an affine transform. This 6 number transform is what you get when you do <code>transform: matrix(a,b,c,d,e,f)</code> in CSS. They are super useful for 2D transformations, like panning/scaling/dragging, but can&#8217;t really project into 3d.</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6zCo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6zCo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 424w, https://substackcdn.com/image/fetch/$s_!6zCo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 848w, https://substackcdn.com/image/fetch/$s_!6zCo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 1272w, https://substackcdn.com/image/fetch/$s_!6zCo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6zCo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png" width="473" height="600.0164744645799" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1540,&quot;width&quot;:1214,&quot;resizeWidth&quot;:473,&quot;bytes&quot;:436657,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6zCo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 424w, https://substackcdn.com/image/fetch/$s_!6zCo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 848w, https://substackcdn.com/image/fetch/$s_!6zCo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 1272w, https://substackcdn.com/image/fetch/$s_!6zCo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69eab9fb-301d-4ace-ad97-66acc2f70315_1214x1540.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Possible affine transforms <a href="https://en.m.wikipedia.org/wiki/File:2D_affine_transformation_matrix.svg">from wikipedia</a></figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OkcG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OkcG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 424w, https://substackcdn.com/image/fetch/$s_!OkcG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 848w, https://substackcdn.com/image/fetch/$s_!OkcG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 1272w, https://substackcdn.com/image/fetch/$s_!OkcG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OkcG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png" width="1456" height="621" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:621,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:284621,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OkcG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 424w, https://substackcdn.com/image/fetch/$s_!OkcG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 848w, https://substackcdn.com/image/fetch/$s_!OkcG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 1272w, https://substackcdn.com/image/fetch/$s_!OkcG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5135f752-eda2-40f9-b6c8-2ff507ad7be6_4977x2122.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">This projection isn&#8217;t possible with a single affine transform. You also can&#8217;t combine affine transformation matrices together to create this shape.</figcaption></figure></div><p></p><p>How can we approximate the transform? Here are some ideas I mulled over that could achieve a good result:</p><ul><li><p>Redraw the image with the distortion. This is potentially expensive and means that we can&#8217;t use SVGs as the images without converting them to bitmaps. It also means that things might look &#8220;fuzzy&#8221;</p></li><li><p>Ray trace everything! By projecting a ray to compute each pixel for the image, I could get a very conventional 3d renderer. This doesn&#8217;t achieve my goal of lightweight SVGs though</p></li><li><p>Subdivide the image and project each subdivision in the most locally-correct affine transformation. Use projected polygon clip paths to cut off the edges of regions.</p></li></ul><p>I was really curious how the last bullet point could work, and I could think of no other ideas that didn&#8217;t require rasterization. So with OpenAI O3&#8217;s help I implemented it into the vanilla Typescript 3D renderer. To test it, we&#8217;re going to project a checkerboard pattern onto a cube.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mojL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mojL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 424w, https://substackcdn.com/image/fetch/$s_!mojL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 848w, https://substackcdn.com/image/fetch/$s_!mojL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!mojL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mojL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png" width="1456" height="1009" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1009,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94975,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mojL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 424w, https://substackcdn.com/image/fetch/$s_!mojL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 848w, https://substackcdn.com/image/fetch/$s_!mojL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!mojL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5689e55c-e737-477b-a9c5-243904eacafd_1636x1134.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Cube with no texture</figcaption></figure></div><p></p><p>Ok here&#8217;s our starting point, 2 subdivisions, the 2 checkboard images with affine transformations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8uAq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8uAq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 424w, https://substackcdn.com/image/fetch/$s_!8uAq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 848w, https://substackcdn.com/image/fetch/$s_!8uAq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 1272w, https://substackcdn.com/image/fetch/$s_!8uAq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8uAq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png" width="1456" height="1033" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1033,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137143,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8uAq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 424w, https://substackcdn.com/image/fetch/$s_!8uAq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 848w, https://substackcdn.com/image/fetch/$s_!8uAq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 1272w, https://substackcdn.com/image/fetch/$s_!8uAq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa38af1d-5ffd-4d61-beda-0d6e9d5a2236_1468x1042.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Two subdivisions with a different affine transformation applied to each image</figcaption></figure></div><p>Oof, looks like it has some kind of bulge, let&#8217;s see it with 4 subdivisions!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!slAC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!slAC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 424w, https://substackcdn.com/image/fetch/$s_!slAC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 848w, https://substackcdn.com/image/fetch/$s_!slAC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 1272w, https://substackcdn.com/image/fetch/$s_!slAC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!slAC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png" width="1228" height="922" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:922,&quot;width&quot;:1228,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80990,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!slAC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 424w, https://substackcdn.com/image/fetch/$s_!slAC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 848w, https://substackcdn.com/image/fetch/$s_!slAC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 1272w, https://substackcdn.com/image/fetch/$s_!slAC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9bc6755-a022-45ef-afb3-dd609439fa24_1228x922.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Eight subdivisions/clip paths</figcaption></figure></div><p></p><p>Looks a bit rough (literally, it looks like it is not a flat surface). Let&#8217;s keep going!</p><p></p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6jDL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6jDL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 424w, https://substackcdn.com/image/fetch/$s_!6jDL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 848w, https://substackcdn.com/image/fetch/$s_!6jDL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 1272w, https://substackcdn.com/image/fetch/$s_!6jDL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6jDL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png" width="1240" height="888" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:888,&quot;width&quot;:1240,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79534,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6jDL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 424w, https://substackcdn.com/image/fetch/$s_!6jDL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 848w, https://substackcdn.com/image/fetch/$s_!6jDL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 1272w, https://substackcdn.com/image/fetch/$s_!6jDL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdc72e9d-c549-4ba6-ae56-6a88cae20d79_1240x888.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">16 images, 16 clip paths. Looks a bit wavy still</figcaption></figure></div><p></p><p>Alright let&#8217;s go to the end, we want it to look flat!!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gax3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gax3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 424w, https://substackcdn.com/image/fetch/$s_!Gax3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 848w, https://substackcdn.com/image/fetch/$s_!Gax3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 1272w, https://substackcdn.com/image/fetch/$s_!Gax3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gax3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png" width="1150" height="856" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:856,&quot;width&quot;:1150,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77429,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Gax3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 424w, https://substackcdn.com/image/fetch/$s_!Gax3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 848w, https://substackcdn.com/image/fetch/$s_!Gax3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 1272w, https://substackcdn.com/image/fetch/$s_!Gax3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce9a77b3-80a3-4718-b7ec-d9bd6937b11b_1150x856.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">512 Images and Clip Paths, looks good!</figcaption></figure></div><p></p><p>At around 512 images, it&#8217;s really hard to tell the difference. Awesome! We did image projection without any rasterization! Here&#8217;s an animated version that incorporates a fix from an HN commenter (<a href="https://github.com/tscircuit/simple-3d-svg/issues/14">thanks Masterjun</a>!)</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;f797d585-b449-47fd-9bd7-ed6e7fc1e9b0&quot;,&quot;duration&quot;:null}"></div><p></p><p>Now for the exciting part: The SVG isn&#8217;t that big! Because we can use the `defs` of the SVG to avoid repeating the image, we only need to define each clip path!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xAIG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xAIG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 424w, https://substackcdn.com/image/fetch/$s_!xAIG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 848w, https://substackcdn.com/image/fetch/$s_!xAIG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 1272w, https://substackcdn.com/image/fetch/$s_!xAIG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xAIG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png" width="1456" height="655" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:655,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:339186,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xAIG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 424w, https://substackcdn.com/image/fetch/$s_!xAIG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 848w, https://substackcdn.com/image/fetch/$s_!xAIG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 1272w, https://substackcdn.com/image/fetch/$s_!xAIG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87b7410c-48c8-48f6-9f2b-b1e598d5f4a8_2062x928.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">This is the full file for the subdivision-2 cube. The polygons are the sides of the cube. The groups and clip paths are the only things that you need for each subregion.</figcaption></figure></div><p>Here&#8217;s a table of the file size as you increase subdivisions. I _think_ some differences in the matrix calculation account for the somewhat weird scaling. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jWaF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jWaF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 424w, https://substackcdn.com/image/fetch/$s_!jWaF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 848w, https://substackcdn.com/image/fetch/$s_!jWaF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 1272w, https://substackcdn.com/image/fetch/$s_!jWaF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jWaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png" width="1456" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:75912,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jWaF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 424w, https://substackcdn.com/image/fetch/$s_!jWaF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 848w, https://substackcdn.com/image/fetch/$s_!jWaF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 1272w, https://substackcdn.com/image/fetch/$s_!jWaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3529abde-ef92-436b-af5e-2da469f4d17e_1844x788.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The math is fun but in the age of AI, below our pay-grade! <a href="https://github.com/tscircuit/simple-3d-svg">You can check out the full source code here</a>!</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pIkr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pIkr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 424w, https://substackcdn.com/image/fetch/$s_!pIkr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 848w, https://substackcdn.com/image/fetch/$s_!pIkr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 1272w, https://substackcdn.com/image/fetch/$s_!pIkr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pIkr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png" width="546" height="490.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1308,&quot;width&quot;:1456,&quot;resizeWidth&quot;:546,&quot;bytes&quot;:322256,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pIkr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 424w, https://substackcdn.com/image/fetch/$s_!pIkr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 848w, https://substackcdn.com/image/fetch/$s_!pIkr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 1272w, https://substackcdn.com/image/fetch/$s_!pIkr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ad1d2a-fd0c-4e4d-aea1-524ee4165579_1578x1418.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Relevant snippet from the source where we subdivide and use bilinear interpolation to find the relevant quads</figcaption></figure></div><p>I&#8217;m excited to flesh out this 3D renderer because 3D SVGs can make great artifacts on GitHub, we want to make it so that people can easily review changes to circuit boards made with <a href="https://github.com/tscircuit/tscircuit">tscircuit</a> in pull requests.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-GNP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-GNP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 424w, https://substackcdn.com/image/fetch/$s_!-GNP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 848w, https://substackcdn.com/image/fetch/$s_!-GNP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!-GNP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-GNP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png" width="662" height="471.49313186813185" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1037,&quot;width&quot;:1456,&quot;resizeWidth&quot;:662,&quot;bytes&quot;:97884,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://seve.blog/i/165235734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-GNP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 424w, https://substackcdn.com/image/fetch/$s_!-GNP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 848w, https://substackcdn.com/image/fetch/$s_!-GNP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 1272w, https://substackcdn.com/image/fetch/$s_!-GNP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8ec6c9-71da-44e1-a42d-718d36310be1_1544x1100.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A visual snapshot test with a 3D SVG</figcaption></figure></div><p>I hope you enjoyed this neat little 3D trick! <em>Back to coding&#8230;</em></p><p></p><p>Edit: A <a href="https://news.ycombinator.com/item?id=44187645">fine HN user found a bug in the projection</a> (thank you Masterjun and badmintonbaseba!) the code now correctly finds the subdivided triangle&#8217;s affine transformations properly!</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://seve.blog/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">I&#8217;m building an open-source electronics kernel! Also other things!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Fast, outside-in API Testing w/ Postgres]]></title><description><![CDATA[Using virtual databases to test end-to-end at lightning speed]]></description><link>https://seve.blog/p/a-simple-pattern-for-api-testing</link><guid isPermaLink="false">https://seve.blog/p/a-simple-pattern-for-api-testing</guid><dc:creator><![CDATA[Seve Ibarluzea]]></dc:creator><pubDate>Wed, 21 Aug 2024 17:59:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0gUW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Over the past 7 years there&#8217;s one pattern I keep coming back to for every new API project, I&#8217;m not sure it has a name but it might be best described as &#8220;virtual database per endpoint&#8221; pattern. It&#8217;s an incredibly effective pattern for doing &#8220;outside-in testing&#8221; (AKA <a href="https://medium.com/geekculture/london-vs-chicago-in-tdd-77067077d0cc">London-style TDD</a>), where you try to avoid unit tests and prefer to reproduce bugs or test functionality &#8220;as an API user would&#8221;, by probing the outside of the system.</p><p>Here&#8217;s how it works:</p><ol><li><p>Create or copy a virtual database each time you test an endpoint</p></li><li><p>Fixture the system from the outside, making all the API calls a user would make (e.g. signing up, creating a Foo)</p></li><li><p>Reproduce the bug/behavior you want to test</p></li></ol><p>Theses tests make for excellent regression tests, but if you&#8217;re able to get the configuration above to work quickly and in parallel (trust me, you can!!) then they&#8217;re also incredible for new feature development.</p><h2>The Perfect Test</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0gUW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0gUW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 424w, https://substackcdn.com/image/fetch/$s_!0gUW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 848w, https://substackcdn.com/image/fetch/$s_!0gUW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 1272w, https://substackcdn.com/image/fetch/$s_!0gUW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0gUW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png" width="618" height="276.3173076923077" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/feca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:651,&quot;width&quot;:1456,&quot;resizeWidth&quot;:618,&quot;bytes&quot;:176339,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0gUW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 424w, https://substackcdn.com/image/fetch/$s_!0gUW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 848w, https://substackcdn.com/image/fetch/$s_!0gUW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 1272w, https://substackcdn.com/image/fetch/$s_!0gUW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeca13db-4ea9-4aab-9414-77a73ad79c96_1914x856.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Every command is exactly what the user would do, encapsulate common steps into the fixture</figcaption></figure></div><p>Why is this the perfect test?</p><ul><li><p>We&#8217;re using the API exactly like a customer</p></li><li><p>We&#8217;ve encapsulated common steps into fixture functions</p></li><li><p>Every test has the same import <code>getTestServer</code> and <strong>doesn&#8217;t require understanding any internal workings of the server</strong></p></li></ul><p>The thing I love about this pattern is the code your customers/users are using becomes the same code you use to test. You don&#8217;t have any &#8220;special access&#8221; to the insides of your services for tests, which dramatically simplifies how complex the test suite is. </p><p>Many people will cheat and put <code>fixture.db</code> as a database client because let&#8217;s face it, your database probably has some weird legacy data you have to emulate for some tests. In those cases you might have tweaks or insertions as part of your test. If you&#8217;re feeling very lazy with fakes, you can use &#8220;internal access hacks&#8221; to get around e.g. email verification. A little bit of that is good, a lot of it is very bad!</p><h2>Setting up your tests</h2><p>Let&#8217;s go through setting up these tests very simply. First let&#8217;s get a postgres instance running in the background, passwordless for simplicity:</p><pre><code>docker run -d --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:16</code></pre><p>We&#8217;ll create all of our virtual databases inside this instance. I like the passwordless version because it requires no setup and is unopinionated, so your test suite can just grab onto postgres at port 5432 without any configuration.</p><p>Next let&#8217;s write our <code>getTestServer</code> function. This should be the only function that tests need to run!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nt8D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nt8D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 424w, https://substackcdn.com/image/fetch/$s_!nt8D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 848w, https://substackcdn.com/image/fetch/$s_!nt8D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!nt8D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nt8D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png" width="1438" height="1762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1762,&quot;width&quot;:1438,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:381710,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nt8D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 424w, https://substackcdn.com/image/fetch/$s_!nt8D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 848w, https://substackcdn.com/image/fetch/$s_!nt8D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 1272w, https://substackcdn.com/image/fetch/$s_!nt8D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6b88d69-ceab-41de-819b-791e6f584706_1438x1762.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>And that&#8217;s basically it! In our fixture we:</p><ul><li><p>Create our temporary virtual database</p></li><li><p>Create a database client for our application</p></li><li><p>Inject the database client into our server</p><ul><li><p>A lot of times this is just a middleware that sets <code>req.db</code>, then whatever middleware normally sets up your database just grabs <code>req.db</code> if it&#8217;s available</p></li></ul></li><li><p>Clean up the test database</p></li></ul><blockquote><p>Real world example of <a href="https://github.com/tscircuit/template-api-project/blob/main/tests/fixtures/get-test-server.ts">get-test-server.ts</a></p></blockquote><h2>Talking to External Services (spoiler: use fakes!)</h2><p>Most people will object to this pattern on the basis that external services are slow. This is absolutely true, which is why <strong>you should spin up a fake version of each dependent external service</strong>.</p><p>This <strong>does not mean mocking</strong>. You should write a dedicated lightweight module-server (a fake) that can be externally spun up and actually contains business logic. It should live independently of your codebase and only use in-memory data (i.e. it should be really fast). <strong>It&#8217;s critical that your fake encapsulates your knowledge of the external service.</strong> If there&#8217;s a bug or quirk of the external service, encode that knowledge into your fake. We&#8217;ve built fakes for many external services at this point, and even created a <a href="https://github.com/tscircuit/winterspec">typescript framework for quickly building API server-modules called winterspec</a>. Here&#8217;s an example of how you would fixture a test with a fake:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vpa8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vpa8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 424w, https://substackcdn.com/image/fetch/$s_!vpa8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 848w, https://substackcdn.com/image/fetch/$s_!vpa8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 1272w, https://substackcdn.com/image/fetch/$s_!vpa8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vpa8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png" width="520" height="223.76722817764164" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:562,&quot;width&quot;:1306,&quot;resizeWidth&quot;:520,&quot;bytes&quot;:97441,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vpa8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 424w, https://substackcdn.com/image/fetch/$s_!vpa8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 848w, https://substackcdn.com/image/fetch/$s_!vpa8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 1272w, https://substackcdn.com/image/fetch/$s_!vpa8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72905b26-9fef-4fe7-98c3-4fc11c049dc3_1306x562.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Most SDKs (including the stripe SDK) support replacing the their base API url because they use it for their own testing!</p><p>Here&#8217;s a conversation I&#8217;ve had a million times, but time and time again Engineer 1 comes around that fakes are an incredible pattern for external services. Every company should use these, even if they don&#8217;t adopt this database pattern.</p><blockquote><p>Engineer 1: You&#8217;re not testing against the real thing! It won&#8217;t be as robust!!!</p><p>Engineer 2: Actually it&#8217;s better than the real thing, because we can simulate scenarios that aren&#8217;t easily replicable with the real API, such as downtime or weird errors we see in our production logs!</p><p>Engineer 1: That may be so, but the lift of building a fake is a lot! How can we justify the cost?</p><p>Engineer 2: The upfront cost of building fakes is high, but the long term benefit is extremely high. We&#8217;ll be able to re-use these fakes whenever we integrate against the external service again, and we can easily create E2E tests and have a fast test suite!</p></blockquote><p>Good APIs are generally simple &amp; understandable by design, so they&#8217;re generally easy to emulate if you&#8217;re not concerned about optimization and scaling.</p><h3>Fakes: The Upfront Costs</h3><p>To implement this kind of outside-in testing, you&#8217;ll almost always need to implement the following fakes for whatever services you&#8217;re using, which will require a deeper understanding of each service than you probably wanted to get- but it&#8217;s worth it!</p><ul><li><p>Email Service - however you&#8217;re sending emails, e.g. sendgrid</p><ul><li><p>Easiest- you might have already done this one</p></li></ul></li><li><p>Auth Service - Auth0, Clerk etc.</p><ul><li><p>These are both the most difficult and highest ROI fakes- someone should really open-source fakes for these!</p></li></ul></li><li><p>Payments - Stripe etc.</p><ul><li><p>Also one of the most painful because there&#8217;s a lot of logic around computing money- but it&#8217;s worth it. Don&#8217;t trust Stripe&#8217;s test mode, it&#8217;s still too slow and difficult to fixture for parallel tests!</p></li></ul></li><li><p>Redis, AWS Services, SQS etc.</p><ul><li><p>A lot of people shy away from implementing these because they return binary or XML from endpoints. If you&#8217;re pressed on time, implement a <strong>fake for the client, not the web service</strong>. This means instead of writing a redis service, you would just implement <code>client.get(&#8220;mykey&#8221;) </code>and <code>client.put(&#8220;mykey&#8221;, &#8220;val&#8221;)</code>. You can then inject your new client in your server middleware.</p></li></ul></li></ul><p>I&#8217;ll write more on fakes in the future- they&#8217;re not really the main point of this article!</p><h2>Making it fast to create new databases</h2><p>I&#8217;ve scaled/seen this pattern scaled to many thousands of tests that can run in under 3 minutes. Here are tips to make it faster:</p><ul><li><p>Instead of migrating each time, migrate a &#8220;template database&#8221; at the beginning of your test run, then use <code>CREATE DATABASE testdb TEMPLATE template0;</code></p><ul><li><p>There is a really cool module called <a href="https://github.com/seamapi/ava-postgres">ava-postgres</a> we built at <a href="https://seam.co">Seam</a> that automatically handles starting postgres and doing templating automagically with one <code>getTestDatabase</code> call. I still can&#8217;t believe <a href="https://x.com/mtisom">Max</a> was able to pull this off!</p></li></ul></li><li><p>I&#8217;ve never found port-binding to be too slow, but it can be problematic with a lot of tests if you run out of ports. I think you should always bind your main API but you can sometimes get away with exporting a <code>fetch </code>function from your external service fake, then replacing the fetch/request client inside of your SDK clients. No port bind!</p></li><li><p>If you&#8217;ve implemented outside-in testing without cheating, you can use load-balancing techniques to run your tests on lambdas or firecracker VMs. This is how you get a <strong>test suite with 10,000+ tests to run in under a minute on CI</strong>. The basic technique for this:</p><ul><li><p>Deploy a preview of the new version of your server such that a request can be configured to use a different database, e.g. using a header <code>TestDatabaseName</code></p></li><li><p>Have <code>getTestServer</code> return the <code>serverUrl</code> to the external server, and insert a unique <code>TestDatabaseName </code>for each test server returned </p></li><li><p>This technique works particularly well for people who use postgres for everything including job queues and keystores</p></li></ul></li></ul><h2>Conclusion Paragraphs are dumb!</h2><p>Hope you enjoyed learning about this pattern. I wrote this to link people to because I&#8217;ve probably implemented this pattern across 100+ repos and every time people onboard they&#8217;re scratching their head wondering why our tests are so uniquely simple.</p><p>If you&#8217;re interested in fakes or have written similar patterns, I&#8217;d love to chat, <a href="https://x.com/seveibar">DM me on twitter</a>!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://seve.blog/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">I post about startup fun-having, typescript, electronics and postgres stuff!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Unlocking 40k visitors/month with the "chanceme" distribution hack]]></title><description><![CDATA[How CollegeAI rose to the top of search results with a multi-part growth strategy in 2017]]></description><link>https://seve.blog/p/collegeais-growth-strategy-chanceme</link><guid isPermaLink="false">https://seve.blog/p/collegeais-growth-strategy-chanceme</guid><dc:creator><![CDATA[Seve Ibarluzea]]></dc:creator><pubDate>Mon, 22 Jul 2024 21:53:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!yKjt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Startups in virtually any category have to figure out how to &#8220;hack distribution&#8221;- meaning find a way to get users quickly and sustainably. I have hacked distribution at each of my startups in different ways but CollegeAI&#8217;s distribution hack might be my favorite. It was by creating a service called &#8220;chanceme&#8221; that would guess your chances of getting into a college. I&#8217;ve told this story so many times I decided to write it down so I can just link people to it in the future.</p><p>&#8220;Hacking distribution&#8221; is different than a &#8220;growth hack&#8221;. When you &#8220;hack distribution&#8221; you&#8217;ve essentially found a &#8220;growth hack&#8221; that now has a barrier to entry (nobody else can do it) that can sustainably funnel users to your product. Many startups only need to hack distribution once, but may need to execute many growth hacks to achieve a single distribution hack. This was absolutely the case with CollegeAI</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yKjt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yKjt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 424w, https://substackcdn.com/image/fetch/$s_!yKjt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 848w, https://substackcdn.com/image/fetch/$s_!yKjt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 1272w, https://substackcdn.com/image/fetch/$s_!yKjt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yKjt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png" width="1453" height="562" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:562,&quot;width&quot;:1453,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114873,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yKjt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 424w, https://substackcdn.com/image/fetch/$s_!yKjt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 848w, https://substackcdn.com/image/fetch/$s_!yKjt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 1272w, https://substackcdn.com/image/fetch/$s_!yKjt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F282bd0ed-2c33-4446-b260-4874e40117a8_1453x562.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Before I take you on this adventure I should say that CollegeAI is in a maintenance state and has been for years. I doubt any of this works anymore, but at the time this one distribution hack worked to get us 100,000+ students yearly. I should also say that all the screenshots here were created/edited to reflect approximately what I was seeing at the time, but since this strategy was executed in 2017 not 2024 a lot of things have changed- Quora was huge, SEO generated content was just taking off etc.</p><h2>The search for a growth hack</h2><p>I discovered the &#8220;chanceme&#8221; strategy on the 44th page of the google search console for &#8220;CollegeAI&#8221;. We had barely any website traffic so it was basically one person who somehow got a result containing CollegeAI for the term &#8220;chance me harvard&#8221;. It was super deep in the search results- so deep most of the search terms didn&#8217;t make sense.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y7EL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y7EL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 424w, https://substackcdn.com/image/fetch/$s_!Y7EL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 848w, https://substackcdn.com/image/fetch/$s_!Y7EL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 1272w, https://substackcdn.com/image/fetch/$s_!Y7EL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y7EL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png" width="1456" height="1083" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1083,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:141228,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Y7EL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 424w, https://substackcdn.com/image/fetch/$s_!Y7EL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 848w, https://substackcdn.com/image/fetch/$s_!Y7EL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 1272w, https://substackcdn.com/image/fetch/$s_!Y7EL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8270bd6-0622-4aa5-8b4a-01a2380d6265_1968x1464.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">my recollection of what the page might have looked like, i remember being many many pages deep in when i found &#8220;chance me&#8221; mentioned for the first time</figcaption></figure></div><p>I googled &#8220;chance me harvard&#8221; to see what this person might have been searching for, and found a nascent subreddit where people were discussing their chances to get into College.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oh-I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oh-I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 424w, https://substackcdn.com/image/fetch/$s_!Oh-I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 848w, https://substackcdn.com/image/fetch/$s_!Oh-I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 1272w, https://substackcdn.com/image/fetch/$s_!Oh-I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oh-I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png" width="1456" height="595" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:595,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:200856,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Oh-I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 424w, https://substackcdn.com/image/fetch/$s_!Oh-I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 848w, https://substackcdn.com/image/fetch/$s_!Oh-I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 1272w, https://substackcdn.com/image/fetch/$s_!Oh-I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d66a29c-2755-45c5-bc88-046bb6343f95_2080x850.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">probably what i saw, this subreddit wasn&#8217;t super big at the time so I&#8217;d bet it wasn&#8217;t the first result</figcaption></figure></div><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JFFA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JFFA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 424w, https://substackcdn.com/image/fetch/$s_!JFFA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 848w, https://substackcdn.com/image/fetch/$s_!JFFA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 1272w, https://substackcdn.com/image/fetch/$s_!JFFA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JFFA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png" width="1456" height="850" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:850,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:542863,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JFFA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 424w, https://substackcdn.com/image/fetch/$s_!JFFA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 848w, https://substackcdn.com/image/fetch/$s_!JFFA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 1272w, https://substackcdn.com/image/fetch/$s_!JFFA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe1a3f3f-75d2-4c92-b807-e98c1faf98c2_2104x1228.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">/r/chanceme in 2024</figcaption></figure></div><p>Reading through this subreddit, I found a trend where people would give a bunch of their high school stats and ask what their chances were. Most of the answers were subjective like &#8220;You&#8217;ve got pretty good odds&#8221; or &#8220;Definitely look into safety schools&#8221; but there was something unsatisfying about an answer like that for someone who loves data and analysis. I wanted to do better.</p><p>My first idea was to create a bot account called &#8220;collegechancebot&#8221; that would output a fairly objective probability based on the bell curve distributions of scores and class position, this was data we already had. We built a simple function that took a bunch of scores, high school GPA etc. into a calculator and spit out an approximate probability. I would then manually respond on most the posts:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_p1l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_p1l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 424w, https://substackcdn.com/image/fetch/$s_!_p1l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 848w, https://substackcdn.com/image/fetch/$s_!_p1l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 1272w, https://substackcdn.com/image/fetch/$s_!_p1l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_p1l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png" width="1456" height="831" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:831,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:193299,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_p1l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 424w, https://substackcdn.com/image/fetch/$s_!_p1l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 848w, https://substackcdn.com/image/fetch/$s_!_p1l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 1272w, https://substackcdn.com/image/fetch/$s_!_p1l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4b855d-68a2-418e-9aba-6a43ae207bb5_1598x912.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This got a bit of traffic but because the subreddit was super nascent, this was totally unsustainable. There had to be a better way. I wanted to own the search traffic for anyone searching &#8220;chance me XXX&#8221;, but for that we needed backlinks.</p><h2>Quora</h2><p>Quora was huge in 2017, especially for this &#8220;chance me&#8221; phenomenon. We wanted to somehow link back to CollegeAI, but we wouldn&#8217;t have been allowed to spam our website on every answer (in fact our marketing intern tried this and was banned from Quora). Still we wanted a way to be able to use Quora as a channel and answer the hundreds of questions that looked like this:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L_ll!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L_ll!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 424w, https://substackcdn.com/image/fetch/$s_!L_ll!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 848w, https://substackcdn.com/image/fetch/$s_!L_ll!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 1272w, https://substackcdn.com/image/fetch/$s_!L_ll!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L_ll!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png" width="1372" height="342" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:342,&quot;width&quot;:1372,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58483,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L_ll!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 424w, https://substackcdn.com/image/fetch/$s_!L_ll!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 848w, https://substackcdn.com/image/fetch/$s_!L_ll!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 1272w, https://substackcdn.com/image/fetch/$s_!L_ll!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3eea6e3-fb78-4966-970d-1eec8ef8e998_1372x342.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>I liked to use data in my responses, and realized if I gave an extremely thorough answer, I could link back to CollegeAI by citing my data or background. This was good, but the great answers took a long time to write and moderators would still interpret it as spam. Moreover, it didn&#8217;t actually get anybody to click into it.</p><p>We were building a lot of tools around our core value proposition of guessing where students would go to college, and while we were building those algorithms and cleaning our data, we often looked at different admission graphs for schools. At the time many colleges didn&#8217;t release their SAT score acceptance distribution, so we were looking into ways of approximately deriving that data from other factors.</p><p>Eventually we had some graphs that we thought would be interesting to students so we made collegeai.com/chanceme, which was a website that took in various scores and output helpful graphs for understanding where you fit in the distribution of applying students.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wOru!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wOru!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 424w, https://substackcdn.com/image/fetch/$s_!wOru!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 848w, https://substackcdn.com/image/fetch/$s_!wOru!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 1272w, https://substackcdn.com/image/fetch/$s_!wOru!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wOru!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png" width="1456" height="1132" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1132,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:429241,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wOru!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 424w, https://substackcdn.com/image/fetch/$s_!wOru!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 848w, https://substackcdn.com/image/fetch/$s_!wOru!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 1272w, https://substackcdn.com/image/fetch/$s_!wOru!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a11f2c0-349a-4a58-8034-802fb9929663_2432x1890.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The CollegeAI chanceme page, the key to our distribution hack</figcaption></figure></div><p></p><p>We then realized that we write very short answers, then cite these graphs with a link. Suddenly we could write very short answers that were both helpful and gave us a backlink.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5K_b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5K_b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 424w, https://substackcdn.com/image/fetch/$s_!5K_b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 848w, https://substackcdn.com/image/fetch/$s_!5K_b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!5K_b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5K_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png" width="1296" height="1542" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1542,&quot;width&quot;:1296,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:767347,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5K_b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 424w, https://substackcdn.com/image/fetch/$s_!5K_b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 848w, https://substackcdn.com/image/fetch/$s_!5K_b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!5K_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c35ae6c-23d0-4038-9059-b7ad7078fc82_1296x1542.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The answers would vary wildly in popularity and we would answer other questions (answering Quora/Stack Overflow is good practice for understanding your audience) but it was a great growth hack to get our chanceme page off the ground.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2wAU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2wAU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 424w, https://substackcdn.com/image/fetch/$s_!2wAU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 848w, https://substackcdn.com/image/fetch/$s_!2wAU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 1272w, https://substackcdn.com/image/fetch/$s_!2wAU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2wAU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png" width="1456" height="1479" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1479,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:454986,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2wAU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 424w, https://substackcdn.com/image/fetch/$s_!2wAU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 848w, https://substackcdn.com/image/fetch/$s_!2wAU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 1272w, https://substackcdn.com/image/fetch/$s_!2wAU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f743353-cbe9-47d1-ab38-efac6fd09cd4_1674x1700.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Distribution Achieved</h2><p>After that CollegeAI blew up on google and we had hundreds of sign ups to our main service daily. I don&#8217;t have many records from 2017/2018 because it was my first startup and I was pretty sloppy- but the data below from 2023 shows that the distribution hack was incredibly enduring- 6 years later we&#8217;re still getting 100k visitors from our work.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KpWL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KpWL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 424w, https://substackcdn.com/image/fetch/$s_!KpWL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 848w, https://substackcdn.com/image/fetch/$s_!KpWL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 1272w, https://substackcdn.com/image/fetch/$s_!KpWL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KpWL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png" width="1456" height="763" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:763,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114784,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KpWL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 424w, https://substackcdn.com/image/fetch/$s_!KpWL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 848w, https://substackcdn.com/image/fetch/$s_!KpWL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 1272w, https://substackcdn.com/image/fetch/$s_!KpWL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e56b46e-0021-403f-aff2-c1dffdaaa132_1634x856.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Distribution is half the battle</h2><p>Ultimately CollegeAI failed because we didn&#8217;t figure out a good way to monetize this audience, and lacked a lot of focus committing to a single product. My takeaway is that distribution is a very difficult problem and half the puzzle for a startup, but the other half- building a great product and getting product-market or&#8230; product-monetization fit- is just a critical.</p><p>Hopefully it&#8217;s also pretty clear that we weren&#8217;t spamming all over the internet and hoping something would go viral. We had a methodology that centered on helping students where they were and tried to create a ton of value for all of our growth hacks. Finding areas where people are underserved is a great way to hack and own a niche.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://seve.blog/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Welcome! Each article on seve.blog is a love letter to a startup experience. They are infrequent, fleeting, and worth it.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Hello world!]]></title><description><![CDATA[This is my new blog!]]></description><link>https://seve.blog/p/coming-soon</link><guid isPermaLink="false">https://seve.blog/p/coming-soon</guid><pubDate>Sat, 08 Aug 2020 00:36:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mk4l!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa0ba03b-eabc-4a43-ad2c-349b69666775_600x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is my new blog! It&#8217;s going to have some stuff with open source and startups! Stay tuned!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://seve.blog/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://seve.blog/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item></channel></rss>