<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Louis Stowasser on Medium]]></title>
        <description><![CDATA[Stories by Louis Stowasser on Medium]]></description>
        <link>https://medium.com/@louisstow?source=rss-4952c556d7fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PSCWX7YWMU4rBfAK.png</url>
            <title>Stories by Louis Stowasser on Medium</title>
            <link>https://medium.com/@louisstow?source=rss-4952c556d7fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:15:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@louisstow/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Making of Wall of Text]]></title>
            <link>https://medium.com/@louisstow/the-making-of-wall-of-text-d95f63dada2d?source=rss-4952c556d7fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/d95f63dada2d</guid>
            <dc:creator><![CDATA[Louis Stowasser]]></dc:creator>
            <pubDate>Wed, 12 Nov 2014 12:05:06 GMT</pubDate>
            <atom:updated>2014-11-12T12:09:29.235Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://walloftext.co/"><em>Wall of Text.co</em></a><em> is a multiplayer note-taking app for purists. Collaborate on an infinite canvas of text, kind of like a whiteboard.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lQjxt3Xeos-NWuTumCPXaQ.png" /><figcaption>The power of anonymous speech (/reddit wall)</figcaption></figure><h3>Genesis</h3><p>The inspiration for <a href="http://walloftext.co/">Wall of Text.co</a> came from a web app called <em>yourworldoftext.com</em>. I liked the concept of an infinite grid of text for general note-taking and brainstorming, like a whiteboard. Click anywhere and start typing. Though <em>yourworldoftext.com</em> wasn’t built for such purposes so I decided to build one that was; with colors!</p><h3>Technical Details</h3><p><strong>Front End</strong></p><p>Text is grouped together as “blobs” rather than a grid of characters. Blobs have a position on the grid which is translated to a position on the screen. The grid dimensions are the size of one mono-space character at <em>14px</em> which turned out to be <em>8.39px</em> wide and <em>14px</em> high.</p><p>Text blobs are rendered as a <em>&lt;PRE&gt;</em> element with <em>position: absolute</em> and the screen position set to the CSS <em>left/top</em> properties.</p><p>Scrolling is done with a CSS transform (<em>translate(x, y)</em>) on the parent <em>&lt;DIV&gt;</em> that contains all the blobs. This makes it essentially infinite. No chunking necessary. All blobs in a wall are downloaded when the page loads.</p><p>Selecting a blob at a specific index in the text proved to be one of the bigger challenges. There is nothing in the click event object that tells you the string position in a DOM element. I accomplished it by splitting the text into <em>&lt;SPAN&gt;</em> elements by spaces and newlines. The <em>&lt;SPAN&gt;</em> that was clicked will be <em>eventData.target</em>. I could find the index of the <em>&lt;SPAN&gt;</em> by summing all preceding <em>&lt;SPAN&gt;</em> lengths.</p><p>So now we have the index of the word but a user could click in the middle of a word. To find the index relative to the word we can use <em>eventData.clientX</em> and subtracting it by the position of the <em>&lt;SPAN&gt;</em> (which we can get from <em>span.getBoundingClientRect()</em>). Once you get the result and divide it by grid width (<em>8.39</em>) you have the offset within the word, add it together and we know the index in the blob where the user clicked.</p><p><strong>Back End</strong></p><p>A blob is given a unique-ish ID and is stored as a JSON string in redis using:</p><blockquote>hset wall:&lt;wallName&gt; &lt;blobID&gt; &lt;blob data&gt;</blockquote><p>To return all the blobs for a wall:</p><blockquote>hgetall wall:&lt;wallName&gt;</blockquote><p>Real-time communication is done through <a href="http://socket.io/">socket.io</a> using the room feature.</p><h3>Community Response</h3><p>Once it was on HN it quickly turned into an interactive art piece with all sorts of offensive comments and ASCII collages as you can see in the screenshot above. Unintended function is always a nice surprise.</p><p>Have a play with Wall of Text at <a href="http://walloftext.co/">http://walloftext.co</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d95f63dada2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>