<?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 Violet Whitney on Medium]]></title>
        <description><![CDATA[Stories by Violet Whitney on Medium]]></description>
        <link>https://medium.com/@violet.whitney?source=rss-b6345574fa42------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Q3QzZcdDiMtkFVrEzsU4WA.jpeg</url>
            <title>Stories by Violet Whitney on Medium</title>
            <link>https://medium.com/@violet.whitney?source=rss-b6345574fa42------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 08:10:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@violet.whitney/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[Tutorial: Web Prototype — Adding AI]]></title>
            <link>https://medium.com/@violet.whitney/tutorial-web-prototype-adding-ai-8e5b413bb3dc?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e5b413bb3dc</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[nondeterminism]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Sun, 03 Nov 2024 03:50:31 GMT</pubDate>
            <atom:updated>2024-11-03T03:50:31.557Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial: Web Prototype — Adding AI</h3><p>This is the third in a series of 3 Tutorials.</p><p><em>In this tutorial you’ll add basic AI functionality to your web prototype (from the previous tutorial) by making an OpenAI API request.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*d9cuxTQIo0ag5iKb.gif" /></figure><ul><li>1 —Using AI’s Non-Determinism</li><li>2—APIs, Keys, and OpenAI’s API</li><li>3— Making an OpenAI API Request</li><li>4 — Checking errors</li><li>5— How far can you get…</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*d9cuxTQIo0ag5iKb.gif" /></figure><h3>1 — Using AI’s Non-Determinism</h3><p>For the sake of this portion of the class we will focus specifically on AI’s non-deterministic properties and thinking through how to leverage this in a web interaction.</p><h4>What is Non-Determinism and how is it useful?</h4><p>Non-determinism means something behaves differently each time. Its unpredictable, maybe even intentionally. If a user asks the same question, they may get a different response.</p><p>There are likely many useful ways to leverage AI’s non-determinism. For simplicity we’ll focus on two of non-determinism’s main utilities: using it to produce more choice (lots of options), or using it to choose (choose a single option from many possibilities).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8S4kZkGMcUyvo84BuXiLKA.png" /></figure><h4>Choice</h4><p>Generative interfaces and interactions are becoming more popular with the rise of AI. Producing more and producing variety can help us iterate more quickly on an idea, or explore possibilities we might not have otherwise considered. However, more is not always better. More options can mean decision fatigue. So be intentional about how many options you use, and how varied the results are that you produce.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*M_iXnbymd-Oq-K33MRnpgw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yttBh4lbLknsoMt2.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1gSssEDSyVlxu6WkVhaqfg.gif" /><figcaption>Three interfaces that use choice: Left example interaction showing multiple options from code, middle: Midjourney options, right: Delve showing options for a neighborhood development.</figcaption></figure><h4>Choosing</h4><p>Adaptive interfaces and interactions are also becoming more popular with the rise of AI. Adaptive interactions can help us choose from the wide range of possibilities. An “adaptive interface” reduces options and information that someone sees by adapting the interface to the specific preferences of a person, or context about the time of day, place, or context to help them make a choice. In a sense it is pre-bakes decisions before they are ever exposed to a user. Note that adaptive is also not always useful. For example the early Microsoft word adapted menus automatically based on which actions a someone clicked most often, but this led to users getting frustrated with menu structures that were constantly changing and unlearnable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*fgjSL6yRzuYr5zkW" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*2YkbY86NVHZyYRO_yHsZXQ.png" /><figcaption>Left: example of an adaptive interface “Microsoft Word” where menus adapt to most used interactions, Right: interface that adapts based on the status of a plane.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*iZYp_9Paa7HbJC1H.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ohzw14CW3x__4lad.jpeg" /></figure><h3>2— APIs, Keys, and OpenAI’s API</h3><h4>What is an API?</h4><p>An API, or an <em>Application Programming Interface,</em> is just that, an interface for someone using a web app.<em> </em>For example, <a href="https://developers.google.com/maps/documentation/routes">Google Maps</a> has an API a software developer might use when adding a maps page on their personal website. The API exposes the various capabilities and controllable parameters of the Google Maps service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qZdLOS2TpI39nRrP.jpeg" /></figure><p>If a website or application has an API, they typically have a page on their website dedicated to describing their API and how to interact with it such as this: <a href="https://developers.google.com/maps/documentation">API Documentation</a>. Within the documentation you will often find pages within that page that describe the specific syntax in order to create <a href="https://developers.google.com/maps/documentation/streetview/request-streetview">API call/API requests</a> to their application.</p><p>In this tutorial, we’ll create an API request to OpenAI to build a non-deterministic capability in your website. This can be either “generative” produce choices, or “adaptive” make a choice.</p><h4>Get an API Key from OpenAI</h4><p>To add AI functionality to your website prototype you’ll need to get an API Key from OpenAI. This key lets us connect to OpenAI and use it in our program. It’s similar to logging into an email service to prove who you are — this key “authenticates” our API requests, letting OpenAI know that we’re allowed to use their tools.</p><p><strong>2a — Sign Up/Log In to OpenAI:</strong> Visit <a href="https://platform.openai.com/signup">OpenAI’s website</a> and sign up or log in. Once logged in, click “API.”</p><p><strong>2b — Create a new Project: </strong>Click the “Default project” and create a new project. You can name this whatever you want. This is helpful for tracking the API spending for your different projects.</p><p><strong>2c — Create an API key:</strong> Click “Dashboard” (upper right hand corner). In the left panel navigate down to “API Keys.” A new window will pop up. Click “Create New Secret Key.” Name it whatever you want, click “create” and then copy the key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*ouMaaSfQJp6Bp8EV.gif" /></figure><p><strong>2d — Store the Key:</strong> Keep your API key safe and ready to use in your code. Once you close the window you will not be able to access the key again, but you can always create a new one. Be careful about where it is placed (e.g. never paste your key into ChatGPT or upload your API key to gitHub).</p><p><strong>2e — add your API key to your code:</strong> Back in Visual Studio code, at the top of your Javascript add the below code, and paste your new API key where it says YOUR CODE HERE. This assigns this text, called a “string”of your API key to a constant named apiKey, so we can easily access it later in our code.</p><pre>//IMPORTANT!!! do NOT add your API Key to CodePen unless you have a private account and can set this to private!<br>//Any sketch you make will be saved automatically and public and your API Key will likely be scraped by bots and used by other people leading to charges$$$!<br>const apiKey = &#39;YOUR KEY HERE&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*iZYp_9Paa7HbJC1H.gif" /></figure><h3>⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️</h3><blockquote>Very important note about simplicity!</blockquote><blockquote>Note that in my case my prompts are about a fortune cookie and that my Javascript is specific to that interaction. You might choose to adapt this to your needs using your code. However, I recommend first starting with something very simple like this fortune teller interaction where a button gets a simple 5–10 word text response from OpenAI. Keep your code VERY simple to start, so you can first get a sense of how the API request works, before applying this to your interaction.</blockquote><h3>⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*iZYp_9Paa7HbJC1H.gif" /></figure><h3>3— Create an OpenAI API Request</h3><p>In this step, we’ll use our API key to request a specific response — “a short fortune cookie phrase” — from OpenAI.</p><p>3a — <strong>Check the OpenAI documentation:</strong> You can find API documentation under “API reference”. We’ll look at the “Create chat completion” here: <a href="https://platform.openai.com/docs/api-reference/chat/create?lang=curl">https://platform.openai.com/docs/api-reference/chat/create?lang=curl</a>. Select and copy the entire curl command.</p><p>3b — <strong>Use ChatGPT to Translate</strong>: Instead of curl, we want to translate this into Javascript since Javascript is the standard for building a website. This is where we can put ChatGPT to work. Paste the command into ChatGPT and ask it to translate the curl command into JavaScript code.</p><p>Your prompt should look something like this:</p><pre>Can you help me translate this below curl command into JavaScript that runs locally? <br>Please put it into an async function called &#39;getFortune&#39; with a try catch. <br>I do not need a system level prompt. <br>The message should be &#39;Give me a short fortune cookie phrase.&#39; <br>I already have an API key above this code segment in a constant called &quot;apiKey&quot;.<br><br>curl https://api.openai.com/v1/chat/completions \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -H &quot;Authorization: Bearer $OPENAI_API_KEY&quot; \<br>  -d &#39;{<br>    &quot;model&quot;: &quot;gpt-4o&quot;,<br>    &quot;messages&quot;: [<br>      {<br>        &quot;role&quot;: &quot;system&quot;,<br>        &quot;content&quot;: &quot;You are a helpful assistant.&quot;<br>      },<br>      {<br>        &quot;role&quot;: &quot;user&quot;,<br>        &quot;content&quot;: &quot;Hello!&quot;<br>      }<br>    ]<br>  }&#39;</pre><p>You’ll notice we can add a lot of instructions in this prompt to make the code better formatted for our needs. Here’s some of the rationale for those additional instructions in the above prompt:</p><p>Can you help me translate this curl command...</p><p><strong><em>Why translate? </em></strong>We’re translating this cURL command to JavaScript so we can use the REST API directly without additional installations.</p><p>There are typically 3 ways to talk to an API: Python, Javascript, or REST.</p><p>Using something like Javascript would require us to install both openAI’s SDK and node.js. However the REST API allows us to use cURL a command-line tool used to send HTTP requests to interact with APIs which is a more standard universal protocol for multiple types of computers thus wont require the same installation process.</p><p>Please put it into an async function...</p><p><strong><em>Why put it in an Async Function? </em></strong>This allows to wait for OpenAI’s response to our request asynchronously so that our entire program doesn’t stop and wait while OpenAI is working on the response.</p><p>I do not need a system level prompt.</p><p><strong><em>Why take out the system level prompt? </em></strong>Because we just need a single response and are not handling a back and forth conversation, we can stick to a user prompt, and skip the system level one.<strong><em> </em></strong>A system level prompt as opposed the the user level prompt is akin to higher level instructions you’d give for an entire chat thread within ChatGPT — for example, “you are a medical assistant, please respond accordingly.” Whereas a user level prompt is akin to a specific prompt within that system thread, for example “I have a fever what might be causing this?”</p><p>Ok, so your original Javascript code was likely something like this:</p><pre>const apiKey = &#39;YOUR KEY HERE&#39;;<br><br>//WE&#39;LL WANT TO ADD YOUR NEW ASYNC FUNCTION WITH THE OPENAI REQUEST IN HERE<br><br>const fortuneButton = document.querySelector(&#39;#generate&#39;);<br>fortuneButton.addEventListener(&#39;click&#39;, () =&gt; {<br>    const fortune = &quot;Your default fortune: Success is in your future!&quot;;<br>    <br>    // Update the h1 text with the default fortune<br>    const fortuneDisplay = document.querySelector(&#39;#fortune-text&#39;);<br>    fortuneDisplay.textContent = fortune;<br>});</pre><p>but your new Javascript code likely looks more like this:</p><pre>async function getFortune() {<br>  try {<br>    const response = await fetch(&quot;https://api.openai.com/v1/chat/completions&quot;, {<br>      method: &quot;POST&quot;,<br>      headers: {<br>        &quot;Content-Type&quot;: &quot;application/json&quot;,<br>        &quot;Authorization&quot;: `Bearer ${apiKey}`<br>      },<br>      body: JSON.stringify({<br>        model: &quot;gpt-4&quot;,<br>        messages: [<br>          {<br>            role: &quot;user&quot;,<br>            content: &quot;Give me a short fortune cookie phrase.&quot;<br>          }<br>        ]<br>      })<br>    });<br><br>    if (!response.ok) {<br>      throw new Error(`Error: ${response.status} ${response.statusText}`);<br>    }<br><br>    const data = await response.json();<br>    const fortune = data.choices[0].message.content;<br>    console.log(&quot;Fortune Cookie Phrase:&quot;, fortune);<br>    return fortune;<br>  } catch (error) {<br>    console.error(&quot;An error occurred:&quot;, error);<br>  }<br>}</pre><p>We can now ask ChatGPT to adapt this into our code so that it runs when we press our button. With a prompt like this:</p><pre>Here&#39;s my Javascript: <br>PASTE THE 1ST SCRIPT<br> <br>Can you adapt this code so that it runs whenever the button is pressed: <br>PASTE THE 2ND SCRIPT</pre><p>Your full Javascript code should look like this:</p><pre>const apiKey = &#39;YOUR KEY HERE&#39;;<br><br>async function getFortune() {<br>  try {<br>    const response = await fetch(&#39;https://api.openai.com/v1/chat/completions&#39;, {<br>      method: &#39;POST&#39;,<br>      headers: {<br>        &#39;Content-Type&#39;: &#39;application/json&#39;,<br>        &#39;Authorization&#39;: `Bearer ${apiKey}`,<br>      },<br>      body: JSON.stringify({<br>        model: &quot;gpt-4o&quot;,<br>        messages: [<br>          {<br>            role: &quot;user&quot;,<br>            content: &quot;Give me a short fortune cookie phrase.&quot;,<br>          },<br>        ],<br>      }),<br>    });<br><br>    if (!response.ok) {<br>      throw new Error(`HTTP error! status: ${response.status}`);<br>    }<br><br>    const data = await response.json();<br>    const fortune = data.choices[0].message.content;<br>    console.log(fortune);<br>    return fortune;<br>  } catch (error) {<br>    console.error(&#39;Error fetching the fortune:&#39;, error);<br>    return &quot;Your default fortune: Success is in your future!&quot;;<br>  }<br>}<br><br>const fortuneButton = document.querySelector(&#39;#generate&#39;);<br>fortuneButton.addEventListener(&#39;click&#39;, async () =&gt; {<br>    // Call the getFortune function and await the result<br>    const fortune = await getFortune();<br>    <br>    // Update the h1 text with the fetched fortune<br>    const fortuneDisplay = document.querySelector(&#39;#fortune-text&#39;);<br>    fortuneDisplay.textContent = fortune;<br>});</pre><p>Paste this back into your VSCode. <br>Remember you’ll need to replace the API Key at the top of this Javascript with your own: const apiKey = ‘YOUR KEY HERE’;</p><p>Give it a try!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tFUxPCJk8ttt2XIq.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*ouVIO5Bm-ZgaeMYy.gif" /></figure><h3>4 — Checking errors</h3><p>If you run into errors. Don’t worry! This is actually part of a usual software development process. Errors are the norm.</p><p>If your code isn’t working. Here are some helpful tips to work through the error step by step:</p><ul><li><a href="https://www.youtube.com/watch?v=eF1j8J3p7X8">Check for errors.</a></li><li>Can you determine what part of the code, or what step the error refers to? If not you can paste the error into ChatGPT and ask what the error is from. This will work better if you do this in the same ChatGPT thread as you’ve been using to develop your initial code so that it has context on your work.</li><li>As much as possible try to isolate the problem: Simplify your code by isolating the part that is causing the issue. Comment out parts of your code or temporarily remove sections.</li><li>Use print statements: Ask ChatGPT to write you print() or console.log() statements in your code to track where the error emerges.</li><li>Consider going back a step back (e.g. refer to your code before your last change). Was there anything in this step that produced the issue?</li><li>When in doubt, simplify!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*ouVIO5Bm-ZgaeMYy.gif" /></figure><h3>5 — How far can you get?</h3><p>Now that you’ve braved an OpenAI request, see if you can adapt this to an interaction you’d like to make that leverages non-determinism.</p><p>Keep it simple and slowly build up the capabilities. Paste in only small segments of code or subtle changes. For example can you change the content of the prompt content: “Give me a short fortune cookie phrase.” in the Javascript? Perhaps instead of a simple button click you try sending a short phrase to OpenAI when you click the button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*ouVIO5Bm-ZgaeMYy.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e5b413bb3dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Web Prototype — Browser]]></title>
            <link>https://medium.com/@violet.whitney/tutorial-web-prototype-browser-14ec8b7cf7ec?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/14ec8b7cf7ec</guid>
            <category><![CDATA[website-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[low-code]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 20:31:56 GMT</pubDate>
            <atom:updated>2024-10-20T20:31:56.686Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial: Web Prototype — Browser</h3><p><em>This is the first in a series of 3 Tutorials.</em></p><p><em>In this tutorial we’re going to create a very simple web prototype in the browser.<br>You‘ll choose a website interaction you like and use some prompting with ChatGPT to mimic it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><ul><li>What is HTML, CSS, &amp; Javascript?</li><li>Code Pen for quick web prototyping</li><li>Natural Language Programming with ChatGPT</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>What is HTML, CSS, &amp; Javascript?</h3><p>Most websites today include three primary languages: HTML, CSS and Javascript. <em>HTML: Structure, CSS: Style, JavaScript: Interactivity</em></p><ul><li><strong>HTML</strong> (Hypertext Markup Language) is the standard language used to create and structure the content on web pages, such as text, images, and links.</li><li><strong>CSS</strong> (Cascading Style Sheets) is the language used to style and layout web pages, controlling the appearance of elements like colors, fonts, and spacing.</li><li><strong>JavaScript</strong> is a programming language that adds interactivity to web pages, for dynamic content, animations, and communication with APIs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mOq1OX66aYB3Q4ql.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Code Pen for quick web prototyping</h3><h4><strong><em>Code Pen</em></strong></h4><p><strong><em>1 — Sign up for a free version of </em></strong><a href="https://codepen.io/"><strong><em>Code Pen</em></strong></a><br>Code Pen allows you to quickly test a website without worrying about setting up a server just yet. Be sure not to use/paste any API keys in your Code Pen code, because it’s public and thus scrape-able/exploitable.</p><p><strong><em>2 — Rename and Save Often<br></em></strong>In the upper left hand corner name your sketch whatever you like. I’m naming mine “Basic Web.” Save regularly so you don’t lose work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yzEMk6bNn7XqfZ6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>HTML</h4><p><strong><em>3 — Create the basic structure of your page.</em></strong></p><pre>&lt;h1 id=&quot;Hello&quot;&gt;🥠 Hello World!&lt;/h1&gt;<br>&lt;button id=&quot;generate&quot;&gt;Click Me&lt;/button</pre><h4>CSS</h4><p><strong><em>4 — Add styling to your page</em></strong></p><p>The CSS will style the page and its elements. Play with making some adjustments here. Can you make the font bigger? Change the background color?</p><pre>body {<br>  font-family: system-ui;<br>  background: #f06d06;<br>  color: white;<br>  text-align: center;<br>}</pre><h4>Javascript</h4><p><strong><em>5 — Add functionality to your page</em></strong></p><p>The Javascript will allow you to build interactivity and the functionality of the page. Its the web behavior. Below we’ll make the button clickable, and have it change both text and the website background color:</p><pre>document.getElementById(&quot;generate&quot;).addEventListener(&quot;click&quot;, function() {<br>  // Change the text<br>  document.getElementById(&quot;hello&quot;).textContent = &quot;🥠 Greeen is the color!&quot;;<br>  <br>  // Change the background color<br>  document.body.style.backgroundColor = &quot;#4CAF50&quot;; // Change to green<br>});</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Natural Language Programming with ChatGPT</h3><h4>Prompt ChatGPT for an interaction pattern.</h4><p><strong><em>5 — Screenshot an interaction <br></em></strong>Find an interaction pattern you like in a website you like. Screenshot just a portion of it. Don’t worry about anything too complex just yet like AI interactions or API requests. For now just focus on one portion of the site.</p><p><strong><em>6 — Paste the screenshot into ChatGPT</em><br></strong>and ask for a simple website that mimics this interaction, describing the interaction and asking for it to separate the HTML, CSS, and Javascript so that it can easily be pasted into Code Pen. Some basic natural language prompt techniques that have worked for me:</p><ul><li><strong>keep it simple</strong> — one at a time prompts that focus on one segment of what you are trying to do.</li><li><strong>aesthetics first</strong> — I find starting prompts with the aesthetics first, and then adding more functionality (Javascript) after tends to work better. So your prompt might emphasize “make me a website that looks like this”</li></ul><pre>Example Prompt:<br>Can you build a website to make this into an interaction where if I click the buttons it will generate a textbox that is connected like this? Generate it as separate (html,css, javascript) so that I can paste each segment into codepen?</pre><p><strong><em>7— Paste your results into the respective segments of Code Pen.</em></strong></p><p><strong><em>8 —Debugging the console</em></strong></p><p>If you run into errors, you will see them as a red “!”. You can click these to reveal the error. If its not immediately clear what the error is, try pasting this into ChatGPT for help on explaining the error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*J5dXB-BWxCqMaJ0Wr1Miug.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>Up Next, <a href="https://medium.com/@violet.whitney/tutorial-web-prototype-locally-07d64e00dbc1">Tutorial: Create A Website Locally with a Server</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14ec8b7cf7ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Web Prototype — Locally]]></title>
            <link>https://medium.com/@violet.whitney/tutorial-web-prototype-locally-07d64e00dbc1?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/07d64e00dbc1</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[website-development]]></category>
            <category><![CDATA[low-code]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 20:31:01 GMT</pubDate>
            <atom:updated>2024-10-24T19:20:22.663Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial: Web Prototype — Locally</h3><p>This is the second in a series of 3 Tutorials.</p><p><em>In this tutorial we’re going to create a very simple web prototype in locally.<br>You’ll use the you created in the previous tutorial, but run it locally now.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><ul><li>Why Run Websites Locally?</li><li>Getting Set Up with Visual Studio Code</li><li>What’s a server?</li><li>Assignment — How Far Can You Get?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lKhmNVqIJIQxDKkIYh7sNw.png" /></figure><h3>Why Run Websites Locally?</h3><p><strong>Protecting API Keys</strong><br>Running websites locally allows us to securely make API requests without exposing sensitive keys. In environments like Code Pen, API keys are visible in the frontend code (unless you have a paid account). When API keys are posted publicly they can often be scraped and exploited — meaning someone will grab your API key and run up your bill using it for their own projects. Locally, we can keep these keys hidden in secure files.</p><p><strong>Direct Control Over Code</strong><br>Local development gives you full control over the code (HTML, CSS, JavaScript), so you can observe exactly how each segment works and make changes in real-time. This hands-on approach helps you understand the impact of each modification.</p><p><strong>Why We’re Still Copying and Pasting Code</strong><br>Although AI tools like Claude or CoPilot could automate some code generation, tools like Claude will cost an addition $20/mo and compress the HTML, CSS, and Javascript into a single file giving you less understanding and control over the code changes. Since we are very interested in what works/what doesn’t and understanding the relationships between the prompts and the code generated, copying and pasting may actually help us retain some control over what we are creating and understand how various prompts behave.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-nclPpBXtZGLAzqgnJuG4w.png" /><figcaption>3 AI Website Prototyping Techniques. Left: Local server version we will be doing in this tutorial, Middle: First Tutorial website in a browser with Code Pen, Right: public AI tools like Claude (additional costs with collapsed code)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14JIhbTEMXg-oXXXKnuF5Q.png" /></figure><h3>Getting Set Up with Visual Studio Code</h3><p>Next we’re going to move your files from the Code Pen website from the last tutorial to your computer and install some tools for running that code locally.</p><p><strong><em>1 — Create a local folder<br></em></strong>Create a folder somewhere locally on your computer called “LLMs for UX Prototyping.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*r5WltoJZM1F8O_424FB08w.gif" /></figure><p><strong><em>2 — Install </em></strong><a href="https://code.visualstudio.com/download"><strong><em>Visual Studio Code</em></strong></a><strong><em><br></em></strong>Install whichever version matches your computer. Follow all instructions to make sure its installed. Then open Visual Studio Code. Visual Studio Code is a code editor for software developers.</p><p><strong><em>3 —Create 3 files for each of your Code Pen files</em></strong><br>Inside of Visual Studio Code, go to the lefthand explorer panel and click open folder, and navigate to the “LLMs for UX Prototyping” folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ZP_tmKWHKgl5lH9MwUmZ_w.gif" /></figure><p>Next in the explorer panel in VS Code right click “New File” to add a new file and name it “index.html”. Next you will paste your HTML code from CodePen in this file. Save and close.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*K4icNJc7SGCHH8XL2_wzUQ.gif" /></figure><p>Do the same for your Javascript and CSS files as well naming them “basic.js” and “styles.css” respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZRm34wQuCq7-579i5v73A.png" /></figure><p><strong><em>4 — Add code to the HTML file to reference the CSS and Javascript<br></em></strong>In order to have your code work, the HTML needs to reference the CSS and Javascript. Copy and paste your HTML code into ChatGPT and ask it to add a reference to “basic.js” and “styles.css”. A reasonable output should look somewhat like this (though your html will likely be more complex):</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>  &lt;meta charset=&quot;UTF-8&quot;&gt;<br>  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>  &lt;title&gt;Green Fortune&lt;/title&gt;<br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>  &lt;h1 id=&quot;hello&quot;&gt;🥠 Hello World!&lt;/h1&gt;<br>  &lt;button id=&quot;generate&quot;&gt;Click Me&lt;/button&gt;<br>  &lt;script src=&quot;basic.js&quot;&gt;&lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p><strong><em>5 — Install — Live Preview VS Code Extension</em></strong><br>Inside of VS Code, we will go to the “extensions” button on the left panel, search for “<strong>Live Preview</strong>” and click “install” to install it. Live Preview is an extension that will allow us to preview your files on a local server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wx8B3cl7KAF0lB0DvaxtbA.gif" /></figure><ul><li><strong>Use — Live Preview<br></strong>Next click the “explorer” button on the left panel to return to your files. Click your index.html file and then click the “<strong>live preview</strong>” button in the upper right which looks like this:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/234/1*0WhIomlqIZrnHKwqExKy2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/66/1*NUQ0fxfD6SxbulGT1EIXCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/234/1*0WhIomlqIZrnHKwqExKy2A.png" /><figcaption>this is what the “live preview” button looks like</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x4NbmZzPkRANDJcmxkW6mQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>FAQ — What is a Server?</h3><p>A <strong>server</strong> stores your website’s files and makes them available to people when they visit your website. It handles requests, like loading a page or accessing information, and delivering the website content to someone who visits the site. A local server is a server that runs on your own computer instead of being hosted online (e.g. not Amazon Web Services, or Google Cloud). It lets you develop and test websites on your computer before making them live to the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Assignment — How far can you get?</h3><p>Now that you have a basic local website working, see how far you can get in mimicking the interaction? Try to get as far as you can.</p><p>You may choose to jump into portions of the code and make changes directly. Don’t forget to save as you go.</p><p>As you go, notice where AI prompting falls short and where it excels. What are your 3 main takeaways on what worked and what didn’t?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07d64e00dbc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick AI UX Prototyping]]></title>
            <link>https://medium.com/@violet.whitney/quick-ai-ux-prototyping-c347edffb79a?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/c347edffb79a</guid>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 11:01:48 GMT</pubDate>
            <atom:updated>2024-10-02T01:50:43.128Z</atom:updated>
            <content:encoded><![CDATA[<h4>A tutorial using Code Pen &amp; OpenAI’s API</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p><em>In this tutorial we’re going to create a simple prototype that returns a new 🥠 fortune from OpenAI each time a button is clicked.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phav2Ky5ISavYrCLWL43gg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Getting started in Code Pen</h3><p>This is what we’ll use for basic programs that we’ll prototype directly in the browser. Why in the browser? Code Pen will allow us to quickly and easily prototype without worrying about setting up a server just yet.</p><h4><strong>1 — Sign up for </strong><a href="https://codepen.io/"><strong>Code Pen</strong></a></h4><h4><strong>2 —Rename and Save Often</strong></h4><p>In the upper left hand corner name your sketch whatever you like. I’m naming mine “AI Fortune.” Save regularly so you don’t lose work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IC0ziPU1X7q3LuTdHzraA.png" /></figure><h4>📖 <em>What is HTML, CSS, &amp; Javascript?</em>📖</h4><p>Most websites today include three primary languages: HTML, CSS and Javascript. <em>HTML: Structure, CSS: Style, JavaScript: Interactivity</em></p><ul><li><strong>HTML</strong> (Hypertext Markup Language) is the standard language used to create and structure the content on web pages, such as text, images, and links.</li><li><strong>CSS</strong> (Cascading Style Sheets) is the language used to style and layout web pages, controlling the appearance of elements like colors, fonts, and spacing.</li><li><strong>JavaScript</strong> is a programming language that adds interactivity to web pages, for dynamic content, animations, and communication with APIs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*niV0uY4n3jIMNgn2JRp5lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Setting up your HTML</h3><h4><strong>3 —Create the structure for the “fortune text” and “button” on your page.</strong></h4><p><strong>Fortune Text:</strong><br>First we’ll change &lt;h1&gt;👋 Hello World!&lt;/h1&gt; to include whatever you want the starting phrase to be. We’ll also add an id id=”fortune-text” to this phrase which will allow us to update the h1 text element when we get a response from OpenAI.</p><p><strong>Button:</strong><br>We’ll also add a button which we’ll use to get a fortune from OpenAI.</p><pre>&lt;h1 id=&quot;fortune-text&quot;&gt;🥠 Your fortune awaits!&lt;/h1&gt;<br>&lt;button id=&quot;generate&quot;&gt;Get a Fortune&lt;/button&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Setting up your CSS</h3><h4><strong>4 — Keep the styling the same.</strong></h4><p>For now you can keep the CSS styling the same. You are welcome to change it if you like.</p><pre>body {<br>  font-family: system-ui;<br>  background: #f06d06;<br>  color: white;<br>  text-align: center;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Setting up your Javascript</h3><h4><strong>5 — Make the button functional.</strong></h4><p>Before we start worrying about any AI functionality or the OpenAI API, lets just make sure we can make our button somewhat functional. Let’s start by having the button update the fortune text to a new default fortune phrase when clicked. In the bellow code we are:</p><p><strong>5a — Selecting the Button:</strong> We use document.querySelector(‘#generate’) to grab the button by its id.</p><p><strong>5b — Adding a Click Event: </strong>We attach a click event listener to the button. When clicked, the function inside will run.</p><p><strong>5c — Setting a Default Fortune:</strong> We define fortune with a default phrase: “Your default fortune: Success is in your future!”.</p><p><strong>5d — Updating the &lt;h1&gt; Text: </strong>We select the &lt;h1&gt; element using document.querySelector(‘#fortune-text’) and set its textContent to the fortune value.</p><pre>const fortuneButton = document.querySelector(&#39;#generate&#39;);<br>fortuneButton.addEventListener(&#39;click&#39;, () =&gt; {<br>    const fortune = &quot;Your default fortune: Success is in your future!&quot;;<br>    <br>    // Update the h1 text with the default fortune<br>    const fortuneDisplay = document.querySelector(&#39;#fortune-text&#39;);<br>    fortuneDisplay.textContent = fortune;<br>});</pre><h4><strong>6 — Get an API Key</strong></h4><p>Next we‘ll need to get an API Key from OpenAI. This key lets us connect to OpenAI and use it in our program. It’s similar to logging into an email service to prove who you are — this key “authenticates” our API requests, letting OpenAI know that we’re allowed to use their tools.</p><p><strong>6a — Sign Up/Log In to OpenAI:</strong> Visit <a href="https://platform.openai.com/signup">OpenAI’s website</a> and sign up or log in. Once logged in, click “API.”</p><p><strong>6b —Create a new Project: </strong>Click the “Default project” and create a new project. You can name this whatever you want. This is helpful for tracking the API spending for your different projects.</p><p><strong>6c —Create an API key:</strong> Click “Dashboard” (upper right hand corner). In the left panel navigate down to “API Keys.” A new window will pop up. Click “Create New Secret Key.” Name it whatever you want, click “create” and then copy the key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*KqbNFF3ed14gPev-zX_BdA.gif" /></figure><p><strong>6d — Store the Key:</strong> Keep your API key safe and ready to use in your code. Once you close the window you will not be able to access the key again, but you can always create a new one. Be careful about where it is placed (e.g. never paste your key into ChatGPT or upload your API key to gitHub).</p><p><strong>6e — add your API key to your code:</strong> Back in Code Pen, at the top of your Javascript add the below code, and paste your new API key where it says YOUR CODE HERE. This assigns the string of your API key to a constant named apiKey, so we can easily access it later in our code. <br>IMPORTANT!!! Do <strong>NOT</strong> add your API Key to CodePen unless you have a private account and can set this to private! Any sketch you make will be saved automatically and public and your API Key will likely be scraped by bots and used by other people leading to charges to your account!</p><pre>//IMPORTANT!!! do NOT add your API Key to CodePen unless you have a private account and can set this to private!<br>//Any sketch you make will be saved automatically and public and your API Key will likely be scraped by bots and used by other people leading to charges$$$!<br>const apiKey = &#39;YOUR KEY HERE&#39;;</pre><h4><strong>7 — Create an OpenAI API Request</strong></h4><p>In this step, we’ll use our API key to request a specific response — “a short fortune cookie phrase” — from OpenAI.</p><p>7a — <strong>Check the OpenAI documentation:</strong> You can find API documentation under “API reference”. We’ll look at the “Create chat completion” here: <a href="https://platform.openai.com/docs/api-reference/chat/create?lang=curl">https://platform.openai.com/docs/api-reference/chat/create?lang=curl</a>. Select and copy the entire curl command.</p><p>7b— <strong>Use ChatGPT to Translate</strong>: Instead of curl, we want to translate this into Javascript so that it will work from the browser. This is where we can put ChatGPT to work. Paste the command into ChatGPT and ask it to translate the curl command into JavaScript code suitable for a web application.</p><p>You could use a prompt like:</p><pre>Can you help me translate this curl command into JavaScript that runs in a browser? <br>Please put it into an async function called &#39;getFortune&#39; with a try catch. <br>I do not need a system level prompt. <br>The message should be &#39;Give me a short fortune cookie phrase.&#39; <br>I already have an API key above this code segment in a constant called &quot;apiKey&quot;.</pre><p>You’ll notice we can add a lot of instructions in this prompt to make the code better formatted for our needs. Here’s some of the rationale for those additional instructions in the above prompt:</p><p>Can you help me translate this curl command...</p><p><strong><em>Why translate? </em></strong>We’re translating this to use the REST API.<strong><em> </em></strong>Typically, you’d use the node.js client, when developing locally on your computer with a server. However, to keep things simple and avoid installing additional libraries, we’ll use the REST API, which allows us to send HTTP requests directly from the browser. That’s why we are translating the curl command to javascript.</p><p>Please put it into an async function...</p><p><strong><em>Why put it in an Async Function? </em></strong>This allows to wait for OpenAI’s response to our request asynchronously so that our entire program doesn’t stop and wait while OpenAI is working on the response.</p><p>I do not need a system level prompt.</p><p><strong><em>Why take out the system level prompt? </em></strong>Because we just need a single response and are not handling a back and forth conversation, we can stick to a user prompt, and skip the system level one.<strong><em> </em></strong>A system level prompt as opposed the the user level prompt is akin to higher level instructions you’d give for an entire chat thread within ChatGPT — for example, “you are a medical assistant, please respond accordingly.” Whereas a user level prompt is akin to a specific prompt within that system thread, for example “I have a fever what might be causing this?”</p><p>Ok, so now your original code is this:</p><pre>const apiKey = &#39;YOUR KEY HERE&#39;;<br><br>//WE&#39;LL WANT TO ADD YOUR NEW ASYNC FUNCTION WITH THE OPENAI REQUEST IN HERE<br><br>const fortuneButton = document.querySelector(&#39;#generate&#39;);<br>fortuneButton.addEventListener(&#39;click&#39;, () =&gt; {<br>    const fortune = &quot;Your default fortune: Success is in your future!&quot;;<br>    <br>    // Update the h1 text with the default fortune<br>    const fortuneDisplay = document.querySelector(&#39;#fortune-text&#39;);<br>    fortuneDisplay.textContent = fortune;<br>});</pre><p>And your new code for getting a request looks like this:</p><pre>async function getFortune() {<br>  try {<br>    const response = await fetch(&#39;https://api.openai.com/v1/chat/completions&#39;, {<br>      method: &#39;POST&#39;,<br>      headers: {<br>        &#39;Content-Type&#39;: &#39;application/json&#39;,<br>        &#39;Authorization&#39;: `Bearer ${apiKey}`,<br>      },<br>      body: JSON.stringify({<br>        model: &quot;gpt-4o&quot;,<br>        messages: [<br>          {<br>            role: &quot;user&quot;,<br>            content: &quot;Give me a short fortune cookie phrase.&quot;,<br>          },<br>        ],<br>      }),<br>    });<br><br>    if (!response.ok) {<br>      throw new Error(`HTTP error! status: ${response.status}`);<br>    }<br><br>    const data = await response.json();<br>    const fortune = data.choices[0].message.content;<br>    console.log(fortune);<br>    return fortune;<br>  } catch (error) {<br>    console.error(&#39;Error fetching the fortune:&#39;, error);<br>    return null;<br>  }<br>}</pre><p>We can now ask ChatGPT to adapt this into our code so that it runs when we press our button. With a prompt like this:</p><pre>Here&#39;s my Javascript: <br>PASTE THE 1ST SCRIPT<br> <br>Can you adapt this code so that it runs whenever the button is pressed: <br>PASTE THE 2ND SCRIPT</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*XXgjEJe29c8wu2SaZLE6-g.gif" /></figure><p>Your full Javascript code should look like this:</p><pre><br>const apiKey = &#39;YOUR KEY HERE&#39;;<br><br>async function getFortune() {<br>  try {<br>    const response = await fetch(&#39;https://api.openai.com/v1/chat/completions&#39;, {<br>      method: &#39;POST&#39;,<br>      headers: {<br>        &#39;Content-Type&#39;: &#39;application/json&#39;,<br>        &#39;Authorization&#39;: `Bearer ${apiKey}`,<br>      },<br>      body: JSON.stringify({<br>        model: &quot;gpt-4o&quot;,<br>        messages: [<br>          {<br>            role: &quot;user&quot;,<br>            content: &quot;Give me a short fortune cookie phrase.&quot;,<br>          },<br>        ],<br>      }),<br>    });<br><br>    if (!response.ok) {<br>      throw new Error(`HTTP error! status: ${response.status}`);<br>    }<br><br>    const data = await response.json();<br>    const fortune = data.choices[0].message.content;<br>    console.log(fortune);<br>    return fortune;<br>  } catch (error) {<br>    console.error(&#39;Error fetching the fortune:&#39;, error);<br>    return &quot;Your default fortune: Success is in your future!&quot;;<br>  }<br>}<br><br>const fortuneButton = document.querySelector(&#39;#generate&#39;);<br>fortuneButton.addEventListener(&#39;click&#39;, async () =&gt; {<br>    // Call the getFortune function and await the result<br>    const fortune = await getFortune();<br>    <br>    // Update the h1 text with the fetched fortune<br>    const fortuneDisplay = document.querySelector(&#39;#fortune-text&#39;);<br>    fortuneDisplay.textContent = fortune;<br>});</pre><p>Give it a try! If you run into errors check your console log!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phav2Ky5ISavYrCLWL43gg.gif" /></figure><h3>Congrats!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Now make your own AI Interface</h3><p>Create your own AI interface using AI prompting. You might use ChatGPT or a similar tool to change this further.</p><h4>1 — Change the HTML Structure and Javascript Functionality</h4><p>Change the Javascript functionality. Some possible ideas to make it your own:</p><ul><li>A clock that displays a new AI-generated haiku every minute.</li><li>Two buttons, “Pro” and “Con,” that generate opposing arguments on any given topic.</li><li>Devil and Angel — A text field that allows a user to type. With an interface that responds with a for and an against argument.</li><li>A dial you spin to receive AI-generated advice, akin to a custom magic 8 ball.</li><li>A brainstorm tool that generates 10 varied ideas based on an initial phrase.</li><li>Get some ideas <a href="https://www.youtube.com/@MaggieAppleton/videos">from creatives like this</a> or from <a href="https://aiverse.design/">existing products here</a>.</li></ul><p>Consider the changes you’ll need to make to the OpenAI response and whether a system prompt is needed.</p><h4>2 — Change the CSS Styling</h4><ul><li>adapt the CSS styling</li><li>find an existing style you’d like to mimic from another website, upload the image to ChatGPT. Again consider ideas from resources across the web.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c347edffb79a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spatial Pixel — Research, Research & More Research]]></title>
            <link>https://medium.spatialpixel.com/spatial-pixel-research-research-more-research-650bc398b3e0?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/650bc398b3e0</guid>
            <category><![CDATA[spatial-ux]]></category>
            <category><![CDATA[spatial-computing]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[lecture]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Sat, 14 Sep 2024 21:29:29 GMT</pubDate>
            <atom:updated>2024-09-14T21:36:51.070Z</atom:updated>
            <content:encoded><![CDATA[<h3>Spatial Pixel — Research, Research &amp; More Research</h3><h4>This Week at Spatial Pixel — Sep 9, 2024</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>1—People are starting to test the Procession beta.<br>2—We added generative-text capabilities.<br>3—We ran a creative AI workshop with local artists.<br>4—We hosted some guest speakers in our classes who spoke about spatial interaction and AI+UX Trends.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/48/1*JmDELk-0a9PRaN033vKADg.png" /></figure><p><em>How might we enable spatial computing beyond glasses? — In the spirit of fostering an open environment for research that can enable this future, we’re sharing experiments as we go.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/48/1*JmDELk-0a9PRaN033vKADg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>1—People are starting to test the Procession beta.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GCkXv-wsyNmK5FyczbYDvA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXX8JIU90ftswA1KYkUYUw.png" /><figcaption>Left: clips from Procession, Right: Procession spatial configurations we’re working towards.</figcaption></figure><h4>Who is testing Procession?</h4><p>We’re thrilled at the inbound interest for <a href="https://spatialpixel.com/procession/">Procession</a>, a spatial computing environment “for your space, not for your face.”</p><p>It’s currently being tested as a private beta by three classes, at Columbia University, University of Michigan, and University of Pennsylvania. We’ve also provided access to a few more academic and artist labs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJi6eggWJ2l5fhDbdZQdxA.gif" /></figure><h4>How can I get access to the Procession beta?</h4><p>We’re a small team committed full time to this dream!</p><p>Because it’s early, we’re first prioritizing developers and researchers who can expand the reach of a glasses-free spatial computing.</p><ul><li><strong>Research Beta </strong><br>If you have an idea in mind for developing a library or extension to Procession, please get in touch by messaging us through our <a href="https://www.linkedin.com/company/spatialpixel/">LinkedIn page</a>. We’re providing access to a small number of researchers who able to contribute new library capabilities. It’s our intent for contributions to first be open-source and non-commercial.</li><li><strong>Non-Research Beta (not released yet)</strong><br>Our broader focused non-research beta has not yet been released. If you’d like to stay tuned for this, you can follow along via our <a href="https://www.linkedin.com/company/spatialpixel/">LinkedIn page</a>.</li></ul><h4>A research brief.</h4><p>This week we were invited to share a research brief for Columbia University GSAPP’s Computational Design Master’s program to solicit student researchers. We’re excited to invite them to explore opportunities with us!</p><p>We’re sharing it below in case you’re also working towards a similar glasses-free future of spatial computing.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fembed%3Fid%3D1hihQXyOPUZtYdcpVFmyMyeTt7LzloGoOhwshV6dig1k%26size%3Dl&amp;display_name=Google+Docs&amp;url=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fd%2F1hihQXyOPUZtYdcpVFmyMyeTt7LzloGoOhwshV6dig1k%2Fedit%3Fusp%3Dsharing&amp;image=https%3A%2F%2Flh7-us.googleusercontent.com%2Fdocs%2FAHkbwyLT6BCcJh3lN2w-I1OyiihgYgXYKBkl0Q9rsgQOAsFolrP2pvLB_WMc4HP-1I6l8Xp_LXwq-aT8fpBOpFbKNfg9I8QX0vyzONWRVC9kCpn-S6TkLXHT%3Dw1200-h630-p&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="700" height="559" frameborder="0" scrolling="no"><a href="https://medium.com/media/66dcd3f297eec72d80985dbb3a98d46e/href">https://medium.com/media/66dcd3f297eec72d80985dbb3a98d46e/href</a></iframe><h4>A Special Request — Hardware Research</h4><p>We’re particularly interested in folks who are investigating camera-projector combinations and spatial awareness with sensors. If you’re working on this kind of hardware, please reach out!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>2—We added generative-text features to Procession.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>NEW: Generative Text — AI <em>inside</em> the AI</h4><p>This week we added generative-text capabilities to Procession. This means that in addition to using to programming with natural language to generate running code—the basic UI flow in Procession—you can also prompt Procession to incorporate text completions from OpenAI (and other APIs in the future). This means you can build sketches that generate haikus, poems, or other meaningful prose. We’ll soon be vetting function-calling to investigate the uses of generative logic.</p><h4>IN PROGRESS: RFIDs &amp; Sensor Inputs</h4><p>We’re currently working on getting more physical inputs from sensors into Procession. We’ve built a working prototype of RFID sensor inputs (commercial readers and an Arduino-based ones) into Procession and workshopped this on Friday with artists (see below). We’re also aiming to extend this to environments like IFTTT, by which we can connect to all kinds of sensors and actuators downstream. This can help spatial computing extend beyond an individual device and more into the physical hardware that can enable an intelligent space.</p><h4>FUTURE: Open Programmable Spaces</h4><p>We’re also working towards a more general beta. We’re inspired by environments like <a href="https://www.openinterpreter.com/">Open Interpreter</a>, <a href="https://processing.org/">Processing</a>, <a href="https://p5js.org/">P5.js</a>, and <a href="https://dynamicland.org/">Dynamicland</a> that are community led and open. We hope to work with other researchers to build out such an environment.</p><p>Our long term vision is to have a programming environment where <strong>artists, creatives, and spatial designers</strong> can build intelligent spaces and develop and share research in the space in an open way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JyM5hg0vVdfzApkiYAGSbA.png" /><figcaption>Spatial Pixel’s Procession: product architecture we’re building towards</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>3—We ran a creative AI workshop with local artists.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>AI with not for Artists</h4><p>This week we ran a creative AI workshop with a group of artists at the <a href="https://www.moabank.org/">Ministry of Awe in Philadelphia</a>. Artists came up with ideas for material objects throughout the museum that could serve as input into Procession and then eventually combine into a collective, generated, realtime mural.</p><p>The Ministry of Awe is a new immersive museum being collectively created by artists in the heart of Philadelphia’s Old City, spearheaded by the renowned <a href="https://en.wikipedia.org/wiki/Meg_Saligman">mural artist Meg Saligman</a>. She is pulling together multimedia artists from all domains, from painting to projection mapping to object-making. We’re excited to share more of our work with them as it develops.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gX0eP3sWHUSKXtNwtd9Vlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>4—Academic Recap</h3><p><a href="https://www.linkedin.com/in/awmartin/"><em>William Martin</em></a><em> teaches “</em><a href="https://awmartin.xyz/proposing-spatial-ai/"><em>Spatial AI</em></a><em>” and “Colloquium I for Computational Design Practices” at Columbia University GSAPP. </em><a href="https://www.linkedin.com/in/violetwhitney/"><em>Violet Whitney</em></a><em> teaches “</em><a href="https://docs.google.com/document/d/1vigGsSX3gb3e0dguQjL4Alh9EfiQQHZI_rXaq4s1F6w/edit?usp=sharing"><em>Spatial UX</em></a><em>” at Columbia University,“</em><a href="https://docs.google.com/document/d/18ynHxmvIxhBs9sZL9AC9EPOLcWyJV7zMfPEuSlBuFXI/edit?usp=sharing"><em>LLMs for UX Prototyping</em></a><em>” at University of Pennsylvania,“</em><a href="https://docs.google.com/document/d/158uyTRY3nk1XDWfaTCf-7gcgoeEWcEvDQNyTVIvnJjE/edit?usp=sharing"><em>Reading and Writing the World</em></a><em>” at University of Michigan.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*fWH3Vp2xD-X0KdB8LyimIg.gif" /></figure><p><strong><em>Josh Goldblum serial entrepreneur, Founder &amp; CEO<br></em></strong><a href="https://www.bluecadet.com/"><strong><em>Bluecadet</em></strong></a><strong><em>, </em></strong><a href="https://futurespaces.com/"><strong><em>FutureSpaces</em></strong></a><strong><em>, </em></strong><a href="https://artwrld.com/"><strong>Artwrld</strong></a><br><strong><em>Guest Lecture: Spatial UX @ Columbia University</em></strong></p><ul><li><strong>Find Your People—</strong>As a serial entrepreneur, Josh talked about working on the cutting edge and “finding your people.” If you don’t have a scene make it. Josh struck me as an explorer. Someone who’d gladly venture into new scenes whether that’s the world of crypto or the world of artists.</li><li><strong>It’s okay to pivot—</strong>As someone working in emerging spaces, a big part of working in an exploratory way is being okay to change course as you learn. When asked about shifting Artwrld from NFTs to artist talks, Josh spoke about taking stock of what you have. As the market shifts, or the ethos of movement shifts, don’t be afraid to change!</li><li>Link to <a href="https://www.bluecadet.com/"><strong>Bluecadet</strong></a>—many interactive spatial experiences</li><li>Link to <a href="https://futurespaces.com/"><strong>FutureSpaces</strong></a>—talks/community on physical/digital installations</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*30TzQ8l50QBwembvfPhifw.gif" /></figure><p><strong><em>Kshitij Agrawal, Creator of <br></em></strong><a href="https://aiverse.design/"><strong><em>AI Verse</em></strong></a><strong><em> AI + UX Trends<br>Guest Lecture: LLMs for UX Prototyping @ University of Pennsylvania</em></strong></p><ul><li><strong>Research Aloud</strong>—Kshitij has been researching and categorizing interaction patterns and trends emerging around AI. His research has garnered quite the following since so much of what he does is useful those of us also trying to figure out this AI thing too.</li><li><strong>Trend: Nonlinear &amp; Agentic UX</strong>—Techniques that give a user control to configure a UX flow in a <em>nonlinear</em> fashion. Natural language programming is all about being able to structure the flow of information.</li><li><strong>Trend: Ambient</strong> — Embedded directly on top of the environment around you: the tables, the walls, the books. Most of these interaction patterns exist in the world of museum installations where Josh Goldblum (above) and Bluecadet reside. But these types of interactions are becoming much more meaningful to the world of everyday technology.</li><li><a href="https://drive.google.com/file/d/1Xf4oIQIkNDQ2HSyXcKbjyMXVSuQdbhw6/view?usp=drive_link">Link to his presentation.</a></li><li><a href="https://aiverse.design/">Link to his website</a>.</li><li><a href="https://x.com/aiversedesign">Link to his Twitter/X.</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p><em>Thanks for reading. Have something to share or interested in learning more?</em></p><p><em>We run </em><a href="https://spatialpixel.com/"><em>Spatial Pixel</em></a><em>: spatial computing “for your space, not for your face.”</em></p><p><em>Spatial Pixel is committed to creating and fostering an open environment for spatial design research that can enable a future for spatial computing that is inherently embodied, environmental, and collective. We hope this research can build counter-practices to the glasses-only future being created by Big Tech.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=650bc398b3e0" width="1" height="1" alt=""><hr><p><a href="https://medium.spatialpixel.com/spatial-pixel-research-research-more-research-650bc398b3e0">Spatial Pixel — Research, Research &amp; More Research</a> was originally published in <a href="https://medium.spatialpixel.com/">Spatial Pixel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flat screen. Flat thoughts.]]></title>
            <link>https://medium.spatialpixel.com/flat-screen-flat-thoughts-2f55efa1dedb?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f55efa1dedb</guid>
            <category><![CDATA[lecture]]></category>
            <category><![CDATA[embodiment]]></category>
            <category><![CDATA[the-extended-mind]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[embodied-cognition]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Mon, 02 Sep 2024 10:49:06 GMT</pubDate>
            <atom:updated>2024-09-02T10:49:06.392Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uzyPo8_O1ehqB3cDYby2pg.png" /></figure><h4>User Interface Bureaucracy and How a Philosophy from 1900s Capitalism Could Save Us.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>Chapter 1 —Flat screen. Flat thoughts.</p><p>Chapter 2— We need space to think.</p><p>Chapter 3 —Can we study <strong>knowledge work</strong> like <strong>manual work</strong>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*eCT_2mLmfUY8c67LOs3Wuw.gif" /></figure><blockquote>I have this syncing feeling that every little task I have inside the computer is like a mini <a href="https://en.wikipedia.org/wiki/Bullshit_Jobs#cite_note-1">bullshit job</a> — a bullshit task…</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/16/1*FRdJdtoXFhMo8PzBlVlHbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Chapter 1 — Flat screen. Flat thoughts.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>If you’re anything like me, you spend most of your day looking at your screen. If you’re a knowledge worker it’s likely worse.</p><p>Steve Jobs said the <strong>computer is like a bicycle for the mind</strong>. <br>This is <em>my</em> “mind bicycle” right now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3DTctS_R7mHZPjJYFx4Ng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/16/1*FRdJdtoXFhMo8PzBlVlHbw.png" /></figure><p>I think <em>my</em> mind bicycle has two flat tires going uphill both ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/16/1*FRdJdtoXFhMo8PzBlVlHbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tBQq498boKQVtB-2yjmxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wcRrs7lp4oAooKheX0NluQ.png" /></figure><h4>Computers — like a scattered pile of papers</h4><p>What makes computer work feel <em>so</em> scattered? Well, computers today lack the spatial structure that we’re used to in the material world. So while working on a computer requires tons of context switching between apps, there’s very little spatially to help us organize the context switching between apps.</p><p>I sometimes find myself clicking around tabs having completely forgotten what I was even doing. Was it my calendar I needed? A link from an email? Was I looking up a reference on the web?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPCkigFj7722rN4TlVIdqw.png" /></figure><p>Even more concerning is that we’re spending more and more time on our computers, often missing the world and people around us. It’s impacting how we think: <a href="https://pubmed.ncbi.nlm.nih.gov/35430923/">shortening children’s attention spans</a>, <a href="https://www.apa.org/news/podcasts/speaking-of-psychology/anti-empathy-machine">making us less empathetic</a>.</p><p>We’re burnt out and screen fatigued. <br>And yet, we’re all still here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Chapter 2 —We need space to think.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>If you were a designer when tools like Miro and Mural emerged, it felt like a big step forward. Their killer feature: just the simple ability to <strong>zoom out</strong> on a canvas. What it meant was that you could finally organize work spatially. You could collect and group material like we do in the real world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*C6KP4AzIL654wS4jsrsPKQ.gif" /></figure><p>For knowledge workers who need to organize, research, brainstorm, or structure plans — the <strong>spatial relationships</strong> <em>are</em> the thinking. So the space helps us think.</p><h4>We think through our bodies, not just our brains.</h4><p>Humans have embodied cognition. Our thoughts, reasoning, and behaviors are affected by our physical body. How information is organized and arranged, and our sensory interaction with the environment impacts our thinking. Students in math competitions <a href="https://www.youtube.com/watch?v=y3e2DNXMq1A">use physical gestures</a> to solve the problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/112/1*1ul6PxjPoSqt7clg7yZReA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*6wUlU6yO1g5fGTCNgjo5kQ.gif" /></figure><p><strong>We use proximity </strong>— we’ll place tools we’re using now nearby and tools we plan to use later far away. We naturally organize our desks spatially. We put sticky notes on the sides of our monitors to remind us in a way that isn’t distracting, but close enough to help us remember. A sticky note is basically useless if it’s in the wrong place.</p><p><strong>We group spatially — </strong>We group like items together: tools and materials for sewing and laundry get stored together while tools and materials for cooking go another place.</p><p><strong>We use our gestures</strong> — I might say, “let’s brainstorm this later,” while pointing at a sketch. Or “can you make this part blue while circling an area of a drawing.” I might point at something and ask “what is it?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*8aK_ao6q3kSJMfXlUlt9rg.gif" /><figcaption>motion capture of my finger moving around</figcaption></figure><p><strong>We use imitation</strong> — an animator might demonstrate how water in a scene should behave by acting out its motions. A choreographer shows dancers how to move. Toy cars might can help us understand the the events of a car accident.</p><p><strong>We use material affordances</strong> — Building physical models or prototypes might help us understand how elements work together and behave. “<em>This</em> will slide off of <em>that</em>.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*3vxXJ9zaW2-wRI4ALM2IuA.gif" /><figcaption>thinking in the shower</figcaption></figure><p>Some of my best thinking comes when I’m <strong>away from the computer</strong>. When I’m out for a walk I can associate ideas more freely. When I make a physical prototype it quickly clarifies what works and what doesn’t. Sometimes just taking a shower and disassociating completely is where I resolve problems I’ve forgotten about.</p><p>If our thinking is tied to our bodies, our rooms, our materials, our neighborhoods, the sounds and the smells around us, then we must find ways to make our tools for thinking leverage the spatial and embodied capabilities of the natural world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OhH-eg7yvONexmqVJo4eA.gif" /><figcaption><a href="https://www.ted.com/talks/deb_roy_the_birth_of_a_word?subtitle=en">“Wordscapes” by MIT researcher Deb Roy</a> shows how his son’s learning of various words was tied directly to the physical environment: the rooms of his home. Above shows the wordscape where his son learned the word “water.”</figcaption></figure><p>In “Externalism, Epistemic Artefacts and the Extended Mind,” Kim Sterelny shows how humans use the environment and external tools for cognitive processing. Most transformative to me was the idea that the homosapien isn’t actually much smarter than our previous distant cousins. There wasn’t some genetic breakthrough in human brain structure making homosapiens smarter. Rather a subtle change in our genome allowed us to build external tools and use them in combination with our minds to build cognitive processing capabilities into the world around us. More-so, it was the “proliferation and transmission” of these tools for thinking that led to the explosion of human’s cognitive capabilities.</p><blockquote>“Yet in all probability human cognitive powers have expanded without any significant change in human genomes. Instead, their expansion is a result of the proliferation and transmission of epistemic artifacts; of tools for thinking. As he sees it, we have got smarter, even though our naked brains have not.”<br> — “Externalism, Epistemic Artefacts and the Extended Mind,” Kim Sterelny</blockquote><p>In short, our thinking capacity is <strong>tied more to external tools</strong> than it is to our <strong>internal minds</strong>.</p><p>Thus, if our tools are what defines our intellect, <br>but our “mind bicycles” are modern day thought interrupters, <br>then its time to rethink the computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Mac1XGgEhbYzSSnBfSBJEQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/112/1*1ul6PxjPoSqt7clg7yZReA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Chapter 3 — Can we study knowledge work like manual work?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>Motion Studies of Manual Work</h4><p>In the early 1900s, Frank and Lilian Gilbreth pioneered scientific management by looking at how processes in factories — and even kitchens in the home — could be optimized for efficiency. The looked at each step of a worker’s task whether that was laying brick in construction, assembling a part of a physical product in a factory, or baking a cake in the home. Each task study was documented against a gridded backdrop with cameras and timers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQniWgU_Zv6qXuRkC9H8dA.png" /><figcaption>Motion Study of Cooking</figcaption></figure><p>By tracking movement over time they were able to study <strong>manual labor</strong> and diagnose its parts and make recommendations to “optimize” each job. The aim was to save wasted time in the work.</p><p>Their work shaped the structure of factories and even office work today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lyq0GVkkm3ltgH-lzn-FaA.png" /><figcaption>Left: Patent of the hardware setup for Motion Studies, Right: “Therbligs” units of common tasks that made up a job</figcaption></figure><p>But while it may have saved time on a job, the drive for efficiency ignored people’s humanity, their well-being, their creativity, and the broader social aspects of work. All were simply missing.</p><h4>Can Knowledge Work Be Motion-Studied?</h4><p>Just like manual work, knowledge work takes place in sequence through time. But when the computer is introduced, the sequences are chopped into fragments: I’m going to find a file, attach it to my email, then send it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*mCFRxIMXcat2ACNdin1fNg.gif" /></figure><p>Just like manual work, knowledge work takes place through motions. But on the computer our motions get constrained to tiny finger movements on a mouse stuck on a two dimensional plane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*xYeScjIV-cUy7YOLN86t3Q.gif" /><figcaption>flat mouse movements</figcaption></figure><p>We need to view our digital interaction with the same scrutiny as the Gilbreth’s but with a fresh take. It’s not about physical labor, but a mental one.</p><p>We should investigate our own knowledge work interaction patterns. We should appropriate <strong>work measurement tools </strong>like<strong> </strong>time motion studies, employee monitoring, mouse tracking, UI heat maps, image segmentation, body tracking, gesture recognition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bPVSnDYu8Qk9Rv3irORGQ.png" /></figure><p>But instead of focusing on “productivity,” our goal should be to <strong>reinvent</strong> <strong>knowledge work altogether-working from our own values</strong>, whether they are creativity, self-actualization, connection, or something else. We should look to the anti-work movement to understand what’s going wrong.</p><p>Like David Graeber’s postulation that much of our <a href="https://en.wikipedia.org/wiki/Bullshit_Jobs#cite_note-1">jobs today are bullshit</a>, I have this syncing feeling that every little tasks I have inside the computer is like a mini bullshit job — a bullshit task. Just UI bureaucracy playing out, but I’m just the cog in the machine, jumping through hoops to make it all work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M5Yndknthrq5Lbh0Zv-6BA.png" /><figcaption>Fun fact: “therbligs” is just “Gilbreth” spelled backwards.</figcaption></figure><p>Time Motion Studies made “therbligs” to describe and categorize the sub-tasks that made up a task like “search” or “grasp”. We can invent our own therbligs to describe and categorize the sub-tasks of knowledge work.</p><p>We can dissect the choreography of clicks, searches, drags and drops as spatial and sequenced, just as the motion studies did. Within the scatter between the apps and pop-ups, perhaps there’s a way after all to create order from the chaos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>Today’s work, knowledge work, is in crisis! It has us fixed to a chair 8 hours a day, completely screen fatigued, with a constant stream of thought patterns interrupters. Perhaps most importantly, the bounds of what we can <strong>think</strong> of is being held back by our 2 dimensional tools.</p><p>It’s time to deliver on the promise of computers as “bicycles for the mind.” We need to expand our thinking to the spatial and material dimensions, but to do so, we must untangle this 2-dimensional mess that is the UI bureaucracy of our time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p><em>Thanks for reading. Have something to share or interested in learning more?</em></p><p><a href="https://www.linkedin.com/in/violetwhitney/"><em>Violet Whitney</em></a><em> teaches “Spatial UX” at Columbia University, “LLMs for UX Prototyping” at University of Pennsylvania, and “Reading and Writing the World (Physical Computing)” at University of Michigan.</em></p><p><em>She and her partner </em><a href="https://www.linkedin.com/search/results/all/?fetchDeterministicClustersOnly=true&amp;heroEntityKey=urn%3Ali%3Afsd_profile%3AACoAAADH48YBSSkC1Q1O5-C3TZTgffpRNMNmH4k&amp;keywords=william%20martin&amp;origin=RICH_QUERY_SUGGESTION&amp;position=0&amp;searchId=0acf2f7a-9f42-4a65-a34c-4732b291ab1a&amp;sid=)Jl&amp;spellCorrectionEnabled=false"><em>William Martin</em></a><em> run </em><a href="https://spatialpixel.com/"><em>Spatial Pixel</em></a><em>: spatial computing for your space not your face.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f55efa1dedb" width="1" height="1" alt=""><hr><p><a href="https://medium.spatialpixel.com/flat-screen-flat-thoughts-2f55efa1dedb">Flat screen. Flat thoughts.</a> was originally published in <a href="https://medium.spatialpixel.com/">Spatial Pixel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Abstraction — P5.js Intro]]></title>
            <link>https://medium.com/@violet.whitney/abstraction-p5-js-intro-bf294473c86f?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf294473c86f</guid>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Tue, 27 Aug 2024 20:10:24 GMT</pubDate>
            <atom:updated>2024-08-27T20:58:42.350Z</atom:updated>
            <content:encoded><![CDATA[<h3>Abstraction — P5.js Intro</h3><h4>Low-level Abstraction Code Intro — for course LLMS for UX Prototyping</h4><h3>Learning Objectives</h3><ul><li>Intro to the P5.js environment</li><li>build a simple sketch</li><li>learn how to find, understand, and use P5 documentation</li><li>Introduction to <strong>abstraction</strong> in coding</li></ul><h3>The Basics</h3><h4>What is p5.js and why use it?</h4><p>P5.js is a JavaScript library for creative code. It’s a flexible software sketchbook and a language for learning how to code visually and use it for the creative arts. Its an especially great environment for physical computing because it will allow you to prototype projection mapping that responds to interactive inputs like (a web cam, markers, or a multitude of triggers from the web). Many artists choose to work with P5 because of its visual interface and its simplicity. P5 can be a great environment to prototype interfaces, tie together IOT devices, and work with interactive audio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*uQBGae2AqSRAnG2SL1BVPg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*dpD6x4maLVbiFUNMGVNWpA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*OvGODvsoH2mzFc2GtPKgDQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*yisp4z9a7on1KUsmJ-PBYw.gif" /><figcaption>example artist works in P5 and Processing</figcaption></figure><h4>Setting Up P5</h4><ol><li><strong>Open the p5.js </strong>web editor at <a href="https://editor.p5js.org/">https://editor.p5js.org/.</a><br>No downloads needed. It’s all online!</li><li><strong>Login</strong> and create an account. (top right corner) <br>This lets you save and revisit your sketches.</li></ol><h4>P5 Architecture</h4><ul><li><strong>text editor </strong>— where you write your code (called a “sketch” in P5). Your code is written in JavaScript, just like on the web.</li><li><strong>compiler </strong>— translates code into machine-readable instructions</li><li><strong>display window </strong>— where visuals created by your sketch are displayed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DyAQv06V49Z-2dYbruILng.gif" /><figcaption>breakdown of P5 IDE (integrated development environment) and Canvas</figcaption></figure><h4>Basics</h4><p>You will have two basic parts within a Processing “<strong>sketch</strong>”, the “<strong>setup</strong>” and the “draw” loop. The setup loop runs once when launching your script, whereas the draw loop runs repeatedly. This allows you to save computing power by sticking parts of the code that only need to run at the start in the setup loop. The draw loop will continually update so it can change over time, or get realtime information such as the location of your mouse or update a camera feed.</p><pre>function setup() {<br>  createCanvas(1280, 960); // Create a canvas<br>}<br><br>function draw() {<br>  background(0); // Set black background<br>  ellipse(mouseX, mouseY, 500, 510); // Draw ellipse at mouse position<br>}</pre><h4>Reference</h4><p>The basis of learning to code is really about learning how to find and use information (usually online). Rarely does anyone know off hand the exact syntax and operations to write all of their code from scratch. Rather, creative technologists and even seasoned software engineers regularly use the reference pages for a programming language or a development environment to understand how a particular programming language functions, its operations, and so they can borrow from what’s already written. You can find P5’s reference here: <a href="https://p5js.org/reference/">P5 Reference</a>.</p><p><strong>Using Documentation</strong></p><p>If we look around within P5’s reference, we’ll see all kinds of operations and parameters we can use in our code. So much possibility! Poke around and click into some of the functions you see. Lets look into background(). You&#39;ll see if we click into <a href="https://p5js.org/reference/#/p5/background">background</a> we&#39;ll get information on how to use this function, what parameters it expects, and some examples. It looks like it takes a single number background(51); for a value between black and white, or 3 numbers (background(152,190,100); for RGB values.</p><pre>//images below from left to right<br>background(0);<br>background(0,255,0);<br>background(255,255,0)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DMXeTqIjmtIzUenvGwnuJQ.png" /><figcaption>3 Processing canvases with RBG values of the background changed</figcaption></figure><p>🧠<strong>CHALLENGE</strong>🧠<br>Can you change the background to yellow?</p><p>Here are some other fun functions to play with in your sketch.</p><pre>fill()<br>noFill()<br>stroke()<br>brightness()<br>color()<br>hue()<br>saturation()</pre><p>🧠<strong>CHALLENGE</strong>🧠<br>Can you change the fill and stroke of the ellipse?</p><h4>Understanding the Draw Loop</h4><p>Remember the draw loop runs continuously so you can build interactive functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*XsBLjkZydCaq7UdGF6UBzA.png" /></figure><p>Lets take advantage of this to see other ways we can get our ellipse on the screen to move. You can think about your sketch as one long algebra formula where substitutions can be made to the code. Most locations where you see () accept parameters that are specific to the function. Remember the &quot;R,G,B&quot; number values we added as parameters to our background() function. To make the ellipse move we can edit its x and y parameters. <a href="https://p5js.org/reference/#/p5/ellipse">Let&#39;s look up what parameters the ellipse accepts</a>. Looks like its syntax is ellipse(x-coord, y-coord, width, height) where each of those parameters is a number (a float to be more specific).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M3iJsufaaMcdYQicADEdIQ.gif" /><figcaption>LEFT: x moves each second; MIDDLE: width and height grow each second; RIGHT: width and height grow each millis</figcaption></figure><p>🧠<strong>CHALLENGE</strong>🧠<br>With the help of the exercises above, please create your own sketch. Consider changing the:</p><ul><li>colors,</li><li>shape (ellipse, square, etc)</li><li>time (second, month, minute, millis, hour, day)</li><li>ADVANCED — Consider using a new function not referenced in this tutorial from the P5 Reference. For example use your mouse (<a href="https://p5js.org/reference/#/p5/mousePressed">mousePressed</a>) to control the above elements of your script. Or consider adding <a href="https://p5js.org/reference/#/p5/text">text</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Abstractions</h3><p>Abstraction is a crucial concept in programming that allows us to describe logic at a high level and simplify a program. In the context of code, an abstraction can help us create a general solution that can handle many specific cases, rather than writing out every possible scenario individually.</p><p>In a program an abstraction is meant to represent what a piece of that program does. For example: an ecologist’s program might have a representation (an abstraction) of “trees” that “grow”. Both a the tree and grow can be built in code are abstractions that will have to encapsulate what each does. A tree could have parameters for its tree-ness: a species, height, deciduous, average number of branches, while grow might include how something grows: fast, slow, or in rhythmic spurts. Now that “tree” and “grow” are abstracted out — they could be used elsewhere. “Grow” could be used on other parts of the program — like flowers and grass.</p><p>Abstractions are used all over programs. A racing game might have an abstraction for a “car” that “drives.” Or perhaps you could build a sketch with different “paint brushes” that can paint different colored “strokes”.<br>But before we get too complex, lets just start simple with our existing sketch.</p><h4>Abstracting our circle’s position</h4><p>Ok so lets say we have a circle that moves on the screen, but we want to create 5 circles that each get bigger and are each in a different place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*6NVgD1SE7rCiT-vxkfyNaw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/1*0gNNOf4Q6hW-_C98h-qAwA.png" /></figure><p>Code for box on the left:</p><pre>function setup() {<br>  createCanvas(400, 400);<br>}<br><br>function draw() {<br>  background(255);<br>  fill(255, 0, 0);<br>  ellipse(100, second() * 3, 20);<br></pre><p>Code for box on the right:</p><pre>function setup() {<br>  createCanvas(400, 400);<br>}<br><br>function draw() {<br>  background(255);<br>  <br>  fill(255, 0, 0);<br>  ellipse(100, second() * 3, 20);<br>  ellipse(150, second() * 3, 30);<br>  ellipse(200, second() * 3, 40);<br>  ellipse(250, second() * 3, 50);<br>  ellipse(300, second() * 3, 60);<br>}</pre><p>But once you get to 100, 1000 or more this gets very tedious. So abstraction can help us generalize the rule.</p><p>🧠<strong>CHALLENGE</strong>🧠</p><p><strong>How can we draw the circle 5 times in a slightly increasing </strong><strong>x location?</strong></p><p>First we need a way to draw the circle 5 times. We can do this by making a for loop. This for loop will run all of the code inside of the brackets {}. <br>Try adding some additional shapes inside the for loop.</p><p>You’ll notice there’s still just 1 ellipse. Not 5. Why?</p><pre>for (let i = 0; i &lt; 5; i++) {<br>    ellipse(100, second()*3, 20);<br>  }</pre><p>Well, this for loop will run until its condition is met. The for loops condition is here: (let i = 0; i &lt; 5; i++).</p><ul><li>This means a variable i will start at 0 when the for loop begins, and</li><li>i++ means each next time the loop runs i will increase by 1 each time until this statement is met: i &lt; 5.</li></ul><p>Since every time the for loop is run, i gets greater by 1, e.g. i=1, 2, 3, 4, 5 then we can multiple this by our the x position of our ellipse.</p><p>So if a circle is structured like this ellipse(x, y, radius); then if we want to have the x change location for each we just need to increment the size each time the circle is drawn: ellipse(100+i, second()*3, 20);. But you’ll notice these are each only 1 pixel apart. So we can increase this by multiplying i: ellipse(100+i*50, second()*3, 20).</p><p>You could abstract this even further by creating a separate variable called ‘x’ inside of a for loop that increases by 1 each time:</p><pre>function setup() {<br>  createCanvas(400, 400);<br>}<br><br>function draw() {<br>  background(255);<br>  fill(255, 0, 0);<br>  <br>  for (let i = 0; i &lt; 5; i++) {<br>    let x = 100 + i * 50; <br>    ellipse(x, second() * 3, 20);<br>  }<br>}</pre><p>This is a basic demonstration of abstraction. We now have a variable that represents the x position and the functionality of how x changes abstracted into its own logic.</p><p>🧠<strong>CHALLENGE</strong>🧠</p><p><strong>Change this sketch with your abstractions.</strong></p><p>Ex:</p><ul><li>A color abstraction — Make the color change for each circle?</li><li>A shape abstraction — Create different shapes each time?</li><li>A movement abstraction — make each circle move differently based on your mouse position?</li></ul><p>You decide!</p><p>Or make an entirely new sketch that encapsulates an abstraction of something in the real world:</p><ul><li><strong>Paintbrush:</strong> Changes color and stroke based on mouse movement.</li><li><strong>Staircase:</strong> Steps appear as you click upward.</li><li><strong>Tree:</strong> A fractal structure that grows more branches over time.</li><li><strong>Bouncing Ball:</strong> Changes direction and speed with clicks.</li><li><strong>Solar System:</strong> Planets orbit each other.</li><li><strong>Ripple Effect:</strong> Expanding circles from mouse clicks.</li><li><strong>Music Notes:</strong> Appear and move when keys are pressed.</li><li><strong>Growing Vine:</strong> Extends and wraps as you drag the mouse.</li><li><strong>Lightbulb:</strong> Adjusts brightness when clicked.</li></ul><h4>Tips and Tricks</h4><ul><li><strong>Example Sketches</strong><br>If you are looking for more examples — you can find some great things to try under File &gt; Examples. This brings up a lot of various examples which you can play around with and learn how different bits of code are functioning.</li><li><strong>Commenting Code</strong><br>You can add comments to your code which don’t run and are stricly to help the readability of your code like this //these two slashes create a comment in your code.</li><li><strong>Print</strong><br>print() allows you to see the values of a parameter in the console. For example, if you add this print(second()); in the draw loop, you will see a continual update in the console of your second parameter. Give it a try!</li><li><strong>Use Giphy Capture</strong><br>For screen capturing gifs, <a href="https://giphy.com/apps/giphycapture">Giphy Capture</a> is great for macs.<br>For more ways of creating gifs with windows and <a href="https://medium.com/measuring-the-great-indoors/how-to-make-gifs-fb0e33590ba2">mac go here</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf294473c86f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Programmable Space]]></title>
            <link>https://medium.spatialpixel.com/programmable-space-ef33ed5bccd1?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef33ed5bccd1</guid>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[lecture]]></category>
            <category><![CDATA[tangible-computing]]></category>
            <category><![CDATA[spatial-computing]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Sun, 23 Jun 2024 23:09:29 GMT</pubDate>
            <atom:updated>2024-06-23T23:10:26.355Z</atom:updated>
            <content:encoded><![CDATA[<h4>Spatial computing for <em>space</em> not your face</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8UakaDAl-V3niSyxIb_cQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>What is “programmable space”?</h3><p>We’re imagining a “programmable space.” In a programmable space you create programs not in a computer or a screen, but rather in a physical space (a room, a street, a city).</p><p>In 2017, I was introduced to Dynamicland, a project led by Bret Victor aimed at interacting with computers in a <strong>tangible</strong> and <strong>communal</strong> way. Their pitch: the <em>environment itself</em> is the computer. This flipped the typical dynamic of using computers. Instead of typing in isolation, groups of people could work together on programs that would then change the environment around them; projections and sounds would emerge in the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DelYU8634HAA00HKkMQymg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*CSVCkaUpPB1XqKmGR8Ug0Q.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*ftAJtRSoJaEymOLdVvfpIw.gif" /></figure><p>Dynamicland was an experimental computing environment where physical objects and spaces were embedded with sensors, cameras, and projectors to enable real-time, tangible interaction with digital information. Users could collaboratively manipulate and create interactive programs by moving and arranging physical items like pieces of paper, thus blending the digital and physical worlds. It’s an amazing vision!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Programmable space, a failed vision?</h3><p>Unfortunately, Dynamicland failed to gain funding and closed.</p><p>I wonder whether it was just ahead of its time. Was the technology struggling to catch up? When it first opened, Dynamicland required writing the programs in code. That meant it was painstaking for most folks (non-engineers) to really use it.</p><blockquote>To enable programmable space, we’ll need even easier ways to program.</blockquote><p>To enable programmable space, then we’ll need even easier ways to program. That means no writing code and no required software engineering degree. It should be easy for non-engineers, for designers, for the humanities, for artists, for kids to program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qyIZUfl9YKW5n-7SRdm5Ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AhqOudpre_kqujHcK0E-Rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qyIZUfl9YKW5n-7SRdm5Ug.png" /></figure><p>Dynamicland may have emerged at time when the technology for programmable space wasn’t ready, <em>however</em> it seems the technology has finally caught up.</p><p>I recently saw the <a href="https://dynamicland.org/">Dynamicland website</a> says there’s a reboot coming summer 2024! 👀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>AI → Programmable Space</h3><p>The multi-modal AI technology emerging today seems like <em>just</em> the thing to make programmable spaces a viable reality.</p><p><strong>Multimodal AI</strong> can understand and combine different types of information, like speech, gesture, imagery, all at once. It’s more akin to how people interpret information from all kinds of context. You might point at something and say, “Hey what’s this?” Because you’re pointing at it, I know that “this” object is what you’re asking about. Multimodal AI is about that same kind of reasoning from multiple points of context.</p><p>This was an experiment we did at Spatial Pixel where you can point and ask about objects in the environment to have conversations with an AI that understands what you’re asking about.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F_rLP7b_ScQQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D_rLP7b_ScQQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F_rLP7b_ScQQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1cc24e20c54b8688fb3adaf09310bec/href">https://medium.com/media/b1cc24e20c54b8688fb3adaf09310bec/href</a></iframe><p>Instead of having to write code, we can speak instructions in natural language. Instead of having to interact with an obscure gaming environment, you could draw a shape with a pencil and assign rules to it by speaking. A programmable space will need to leverage the way people naturally interact with their environments: pointing at things, moving them around, rather than writing chunks of code.</p><p>Here are more experiments we did towards programmable spaces. It’s a way of creating interactive programs and sketches that adapt to what you say, how you move, and the environment around you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*cRUoxDBQR1y3KPVinR7LVg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*2i2dd4M6G7RV_QmtjgXLRw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*03eUyP3bBkc2N112VxQ--w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*XtyRImjIQRMKUmHmIp3bKA.gif" /></figure><p>I really dislike being on a computer, but this was fun. You end up:</p><ul><li>interacting more with people instead of your computer.</li><li>interacting more with your environment instead of your computer.</li><li>interacting more with your body than your computer.</li></ul><p>And because you’re making the programs in a more tangible way — with your voice, your body, and objects in the environment — perhaps it makes you a bit more present. I’d like the future of computing to be more inherently collective, tangible and bodily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3><strong>Real world AI will get better</strong></h3><p>Multimodal AI has been a major investment by Google, Meta, OpenAI, and others. <a href="https://www.youtube.com/watch?v=AYSfcgVv9-U&amp;ab_channel=NVIDIA">Major companies like NVIDIA are investing in “physical AI”</a>. Physical AI means using devices like sensors or robots that leverage AI to understand and react to an environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*-97oIvwPfjyZ3seNoNvQ3Q.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*FGFxTAcrtQgTdzXxzzR3VA.gif" /></figure><p>We’re glad to see investment in technologies that interact with the real world. These will likely only get better, making programmable spaces more viable. But as these technologies develop, it will be important that artists, designers, and people outside of Big Tech shape this technology so that it’s designed for human aims, not just capitalist ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>Programmable Space Lab</h3><p>With the rise of AI, we’d like to see programmable spaces and academic labs that further explore this kind of computing in the real world, and ensure it’s done in ways that everyday people can create programs with more intuitive means like natural language and drawing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*Q31OxxrlJa0_Ve3HLQaYnw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*wCnqGqDFaeYyXX6ivl60Zg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*Q31OxxrlJa0_Ve3HLQaYnw.png" /></figure><p>We like the spirit of Dynamicland: the communal creative expression. We like the idea of co-creation and we think the technology is ripe for it. We’ve been thinking about how programs could adapt to be more environmental allowing us to more naturally reference the world around us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pcEAevnJo3sC95smzwlVtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*mS9zyxQqhsyzPKoRfrK5gw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kgw6G_ynVhROYI5zlK5jpQ.png" /></figure><blockquote>And what more would we do with programmable spaces? Well, nearly everything we do on computers today, but in a way that allows for more collective creation and more presence in the physical world. I’d be curious to see how a programmable space would change what we create and how we relate to each other. Would it make us more creative? More cooperative? Maybe most importantly, more present in this world and life we live?</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef33ed5bccd1" width="1" height="1" alt=""><hr><p><a href="https://medium.spatialpixel.com/programmable-space-ef33ed5bccd1">Programmable Space</a> was originally published in <a href="https://medium.spatialpixel.com/">Spatial Pixel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We Need a Natural Language Programming Environment!]]></title>
            <link>https://medium.spatialpixel.com/we-need-a-natural-language-programming-environment-c4dfd3efcc7f?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4dfd3efcc7f</guid>
            <category><![CDATA[low-code-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[natural-language]]></category>
            <category><![CDATA[low-code-platform]]></category>
            <category><![CDATA[lecture]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Wed, 06 Mar 2024 18:06:57 GMT</pubDate>
            <atom:updated>2024-03-19T02:52:24.391Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5A57_oQfD0xPUFXBKiWGHA.gif" /></figure><h4>Forget code editors for Python, Javascript, and computer code. What about code editing in natural language?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>TLDR: This is the beginning of a research and design exercise for creating a natural language programming environment. My partner, William and I’ve only just started to experiment with these ideas: here’s a <a href="https://spatialpixel.com/natural-language-ide/">bare bones one for P5</a>, and <a href="https://spatialpixel.com/programmable-spaces/">one for physical space</a>. Now we’re looking for topics related to code editors, visual programming, and programming languages that can spur ideas to help in this journey. If you have references you think might help us, <a href="https://www.linkedin.com/in/violetwhitney">please send them to us</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><ol><li>Rise in <strong>Natural Language Programming</strong>.</li><li><strong>Prompting</strong> Isn’t Enough.</li><li>What to Borrow from <strong>Code Editors.</strong></li><li><strong>Emerging</strong> <strong>Experiments</strong> in Natural Language Programming</li><li><strong>Provocations</strong> for Natural Language Programming.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/28/1*54pAFbOafE2xc2XDfk49Yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*f6kwC48aFZZd27HX2wsQsA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/28/1*54pAFbOafE2xc2XDfk49Yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>1 — Rise in Natural Language Programming (NLP)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>If you write code you’ve probably spent a decent amount of time in a <strong>Code Editor</strong> or an <strong>IDE</strong> (Integrated Development Environment). Code editors like <a href="https://code.visualstudio.com/">Visual Studio Code</a> help developers write, edit, and test code. But as we see the emergence of “<strong>natural language programming</strong>” where we can write executable programs with everyday language, will we still need a programming environment for natural language? I think so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*xei_PjkW5iZG5R275fV3HQ.gif" /></figure><p>Natural Language Programming, related but not to be confused with Natural Language Processing, is a way of programming with natural-language sentences, like writing in English.</p><p>A very simple NLP: “Can you turn off the bedroom light off after 10 o’clock?”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*zNRR8oDc3axPl_cikLixoA.gif" /></figure><p>What makes this a program and not just plain english? It becomes a program when it moves beyond a description and becomes something a computer can execute. Its a set of instructions meant to be computed, calculated, decided on or carried out.</p><p>Last summer my partner, <a href="https://awmartin.xyz/">William Martin</a> and I taught a course in the new Computational Design program at Columbia University GSAPP. For the first time, we used natural language (ChatGPT) to write programs rather than starting with raw code. Typically in academic programs, we have to dedicate a decent amount of time to up-skilling students in programming. In the past learning the ins and outs of Python or Javascript syntax was a prerequisite to really designing anything that leveraged computation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EOCV3Uc9GZ4s8hE3t8BfnQ.gif" /><figcaption>back: Visual Studio Code IDE, front: P5 IDE</figcaption></figure><p>However, in this go-round, <a href="https://gsapp-cdp.github.io/colloquium-1-2023/work/">students were able to develop complete websites, totally bespoke to their ideas, relying much more heavily on Natural Language Programming.</a> And for as much as ChatGPT “did their homework” developing their website code, so much of these designs were inherently theirs. Students still had to design the website, its functionality; spend days prompting to get useful responses; and struggle through actual code to develop meaningful programs. It was ultimately their ideas, their designs, and their visions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*v_kJDJ45aGxUVCnzzNpG6g.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*PIcckU9rbib-5fuhLj6Qag.gif" /><figcaption>Left: Matthew Heaton, Right: Hongqian Li</figcaption></figure><p>In all fairness NLP is not <em>that</em> good yet. Students still needed a good technical understanding of Javascript syntax to string these websites together.</p><p>But that’s changing.</p><p>Recently Jensen Huang, CEO of NVIDIA, has predicted the <strong>death of coding</strong>. He argued, “It is our job to create computing technology such that nobody has to program and that the programming language is human. Everybody in the world is now a programmer. This is the miracle of AI.” [<a href="https://www.techradar.com/pro/nvidia-ceo-predicts-the-death-of-coding-jensen-huang-says-ai-will-do-the-work-so-kids-dont-need-to-learn#:~:text=Pro-,Nvidia%20CEO%20predicts%20the%20death%20of%20coding%20%E2%80%94%20Jensen%20Huang%20says,don&#39;t%20need%20to%20learn&amp;text=Nvidia%20CEO%20Jensen%20Huang%20has,potentially%20far%20more%20influential%20audience.">source</a>][<a href="https://www.youtube.com/watch?v=2nLq6xzTx-A&amp;ab_channel=DjamgaTechEduSportHub">video</a>]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*xM9FtQYR6eRUuIaEqMIrKQ.gif" /><figcaption>coding says goodbye</figcaption></figure><h4>Programming Isn’t Going Away</h4><p>So while coding may be going away, programming is not. There are useful ways of thinking that someone develops when they learn to code. They learn to think systematically about how things are connected. They learn concepts like recursion, and learn how the language itself can impact the capabilities of a program. Those ways of thinking will still be important to develop. But a lot of the nuances of coding keeps us too deep in the technical weeds and prevent us from thinking more strategically and conceptually. Natural language programming allows us to dedicate our brain power at a higher level to the problems that matter.</p><p>Today, most people aren’t writing sophisticated programs with ChatGPT, but I do believe that will come. A wave of “programming” literacy is coming via natural language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UEGjqSWu9I5OjSxB7Xx41w.png" /><figcaption>Left: Data from World Bank (2023) showing % of literacy over the last 200 years; van Zanden, J. et al. (2014) — with major processing by Our World in Data, Right: My highly speculative possible curves of future “programming literacy” worldwide.</figcaption></figure><p>Today, only 2.54% of the global workforce are software engineers. [<a href="https://qubit-labs.com/how-many-programmers-in-the-world/">source</a>] In 1820 only 12% of the world was able to read and write, but today 87% can read and write. [<a href="https://ourworldindata.org/literacy#:~:text=Historical%20change%20in%20literacy,-Global%20literacy%20has&amp;text=It%20was%20only%20in%20the,for%20the%20period%201800%2D2016.">source</a>] Like the steep incline of literacy following the Industrial Revolution, will most people be programming literate 200 years from now? Or perhaps even sooner? Today so much control of our world is only achievable by this tiny % of people who are software engineers. I welcome a future where programming is far more accessible and more people can write programs specific to their own interests and domains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>2 — Prompting Isn’t Enough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*gq1MCjfzB5TM0XuHENZHfQ.gif" /></figure><p>Great so most people in the future will be programming and doing so in natural language. So does that mean we’re all just going to ChatGPT our programs into existence? Not exactly. Language is very useful for thinking, but writing prompts is hardly programming.</p><p>As folks who program regularly will tell you, programming is not about coding. It’s a way of thinking. My partner recently pointed out that when software engineers discuss problems with one another, they rarely talk about code. They speak more <strong>abstractly</strong> about the structure of the system and its behavior. They consider how to structure the <strong>semantics</strong> of the program and how that will translate into the program’s capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CLhYcB0NsxsCVYFKEtC5Aw.png" /></figure><p>Programming teaches you to think holistically about the <strong>system</strong> grappling with scale, recursion, network affordances, and emergent behaviors. It teaches <strong>problem solving</strong>, forcing someone to think critically, logically, and about operational flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rOLREqG-irWvJ3XmE5JbOw.png" /></figure><p>Prompting in contrast to programming today isn’t always the easiest way to think programmatically.</p><p>There’s a danger that as we move towards prompting that we’ll rely too heavily on computers to think on our behalf. Prompting is more about a wait and see what the computer does that’s more reactive, vs programming which is more about designing, orchestrating, thinking and creating. Prompting also doesn’t allow you to build the holistic system. You’re only ever working on segments. And you must bring those segments to a different environment to build anything more complex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sxixRWqg-KUdmr-AUICRBA.png" /></figure><p>But there’s a great opportunity if we leverage natural language’s ease and flexibility with the more systemic capabilities of programming. My hope and aim is to help contribute to a best of both worlds scenario where we harness the capabilities of both to help people think at a higher level.</p><h4>Why we need a programming environment!</h4><p>But why do we need a programming environment if AI’s going to do all of the work anyway? Even if AI is going to do all the program writing on our behalf, we’ll still need a way to communicate with it, clarify our intentions, and hopefully design programs together <em>with</em> AI.</p><blockquote>We need an environment better than a chatbot to write natural language programs.</blockquote><p>My hope is that programming literacy is not about having AI think for you, but that it empowers many more people to think creatively in terms of holistic systems and interconnected programs. I’m bullish that we’ll need an environment better than a chatbot, beyond just language to help us become sophisticated programmers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>3 — What to Borrow from Code Editors.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>Luckily we’re not starting from scratch. There’s a great lineage of programming environments. Integrated development environments include a place to <em>make</em>, <em>see</em>, and <em>check</em> your program. Each of these capabilities is useful for an NLP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/18/1*Gtah_lYXglkRVwbSGr9gUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*Z5atfCx0z87E9Yk_i08i1g.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/18/1*Gtah_lYXglkRVwbSGr9gUA.png" /><figcaption>Structure of P5.js Integrated Development Environment</figcaption></figure><ol><li><strong>Make. . . . . . . . . .[Code Editor]</strong><br><em>This is where you author and design a program. Where you actually write the code. It usually includes some form of syntax highlighting. This might also include tools like auto-complete to improve the ease of writing code. It also might include higher level maps that help you author the hierarchy and components of your program.</em></li><li><strong>See . . . . . . . . . . .[Playground]</strong><br><em>A way to run the programs to see how they behave, so you can actively test and iterate on your program. Some environments include a “playground” where you can “play” a version of your program.</em></li><li><strong>Check . . . . . . . . .[De-bugging]</strong><br><em>Tools for testing and understanding bugs and errors, including things like error logs.</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>4 — Emerging Experiments in Natural Language Programming</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>A Showcase of NLP-First Programming</h4><p>In 2021 <a href="https://openai.com/blog/openai-codex">OpenAI published CodeX</a>, an environment for natural language programming. Today the programming capabilities you access in ChatGPT are from this CodeX model. This environment demonstrates the ability to write a longer structured program by iteratively providing natural language instructions. I’m really encouraged by this environment. However, it also shows there’s definitely a ways to go to make something that can write sophisticated programs and that anyone can use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*EJ2ju3iwWE9aHcX_3ST3bQ.gif" /><figcaption>OpenAI CodeX — 2021</figcaption></figure><h4>NLP Environments Aren’t There Yet</h4><p><strong>Lacks the Natural Language <em>Program</em> </strong>— In the CodeX environment you never see more than a single prompt at a time which really limits your ability to control and design the program structure. What I’d consider your program code (all of the iterative prompts provided) isn’t viewable, scannable, editable. You’re always prompting one at a time one or two sentences. How can this become a designed and structured part of the interface?</p><p><strong>No Referencing Between Contexts</strong> — Additionally this environment makes it difficult to understand how the contexts interact. How does the prompt impacts portions of the formal code on the right? Where is “animate” in the formal code? And how does my prompt or elements in the formal code impact the behavior in the canvas (where the game is running)? Its hard to understand really how they all relate to one another beyond a general “they seem to relate”. In an environment that supports natural language which is inherently more abstract, it will be more important to be able to understand the relationships across these contexts.</p><h4>Other Emerging NLP Trends</h4><p><strong>Engineer-First NLP </strong>— Since CodeX, there’s been an explosion in AI coding Copilots: from <a href="https://github.com/features/copilot">Github Copilot</a>, <a href="https://aws.amazon.com/codewhisperer/?ref=codesubmit">Amazon AI Code Generator</a>, and <a href="https://about.sourcegraph.com/cody?utm_source=codesubmit">Sourcegraph</a>. These copilots allow you to type prompts in natural language, but they still return responses in formal code. For the time being, you’ll still need to be a software engineer or at least rather technical to use them.</p><p><strong>Novice Programming-NLP — </strong>Meanwhile, gaming companies like Roblox an Unity have started to advertise their aims of creating natural language programming capabilities natively inside of their development environments for novice programmers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*TFAsOUAl4EmPieXY-ozR2w.gif" /><figcaption>Draw-A-UI Demo — 2023</figcaption></figure><p><strong>Designer-first-NLP</strong> — Designer-first AI tools like <a href="https://www.draw-a-ui.com/">Draw-A-UI</a> could point to how future natural language environments could evolve in a way that leverages more native design skills like drawing. Here someone can draw shapes on a canvas and by adding labels to the elements the environment can intuit the program functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBNI_4fdcTU0LdRIZsBlCA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>5 —Provocations for Natural Language Programming.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>If we want a programming environment for natural language, it’ll need to be honed to the affordances of natural language. So how is natural language different from a formal language?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWwYrf35vTBF5iPV98w-dg.png" /><figcaption>My Comparison of Formal and Natural Languages</figcaption></figure><h4>Ambiguity</h4><p><strong>Sequence Ambiguity — </strong>Today its hard to understand the order and sequence of natural language programs. To develop a complex program through prompt engineering, you’d have pages worth of instructions making it difficult to follow<strong> operational flow</strong>. It gets really muddy. A development environment should help reveal the inherent structure and sequence of the program. Perhaps like some visual programming environments attempt to do? This could facilitate a programmer’s ability to navigate and design that higher level structure of the program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YFWtVR0dP4QD0nlHHAkn9Q.gif" /></figure><p><strong>Syntax Ambiguity </strong>— Natural language in contrast to structured language programming is far more flexible and ambiguous. It relies more heavily on the contextual semantics of the language and even the context of where and when the program takes place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T8l3W28PUuKaXFAmt47hJQ.png" /><figcaption>The same program demonstrated on the left as a Python program, and on the right as a natural language program.</figcaption></figure><p>So what might the syntax highlighting be in natural language? Perhaps its actually useful to reveal the grammar through highlighting each <strong>word class</strong>? Verbs <em>are</em> similar to functions and methods, whereas nouns <em>are</em> more like variables and objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mWfxGhkEE4zpKf4Ncbt-sg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*12Y9wXKgDDJIeuCxUF5zxA.gif" /><figcaption>Example of word class syntax highlighting to reveal the part-of-speech. Above experiment by Spatial Pixel.</figcaption></figure><p>But syntax highlighting that follows the grammar of natural language doesn’t quite feel useful because so much of the meaning is determined by the entire sentence from the semantics in the context of the whole sentence. Perhaps more appropriate than syntax highlighting would be a semantic highlighting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8PlYNATHcANsIXfx7YjKQ.png" /><figcaption>Example of semantic highlighting to reveal whether instructions are a command, conditional or calculation.</figcaption></figure><p>But within natural language’s ambiguity, perhaps even more important is than highlighting is that in natural language programming, AI interprets <strong>intent</strong>, whereas in formal language the computer follows explicit instructions. , it’s more important to be able to continually control, check and account for that hidden context. I can give an abstract command like “make me something pretty” and AI will have to interpret what “pretty” is. Even for something that seems more concrete like “draw a line” the AI is still interpreting what I mean by “a line” and what I mean by “draw”.</p><p>In a natural language environment, it becomes more important to reveal what the program is inferring. We should make it easier to specify our intent by making the design and control its inference more explicit.</p><blockquote>Formal language: follows explicit instructions</blockquote><blockquote>Natural language: interprets ambiguous intent</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*9ct2p42SP9FtZvBr5hS2DA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*qAoZPD6YzsszFW23C_AAJA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*t69mCECZJouNnOvdnDyESg.gif" /><figcaption>Examples of inferring intent source: Spatial Pixel’s natural language program</figcaption></figure><p><strong>Inspecting hidden assumptions</strong>— This means future programs will need to be able to navigate between abstract and specific more quickly. Language is especially abstract in contrast to programs like C# which are highly specific. We’ll need to create better ways to help NL programmers navigate levels of specificity and abstraction. Consider a simple instruction for a robot “bring the cup downstairs” and how many assumptions (mini-decisions) the program would have to make. This designer of this program likely wants the ability to control more finite parameters of the program buried in the assumptions of that program. This might warrant <a href="https://www.telescopictext.org/text/KPx0nlXlKTciC">an interface that allows you to zoom into levels of specificity within the text</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*hpmtkhF1rhZ5DcBijSy-bw.gif" /></figure><p>This article has gotten so long that I’ve decided to create a separate one to to focus solely on mock-ups of what a natural language programming environment could be. That way I can explore more of these little ideas, and focus on the design itself.</p><p>Hopefully you have ideas too! I’m looking for more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p><em>Hey, you! Thanks for reading. <br>If you’re a researcher, designer, or just interested in natural language programming, </em><a href="https://www.linkedin.com/in/violetwhitney"><em>please reach out</em></a><em>! I’m actively looking for projects, case studies, research, and ideas for what a natural language code editor should be. If you have anything to share it’s much appreciated!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4dfd3efcc7f" width="1" height="1" alt=""><hr><p><a href="https://medium.spatialpixel.com/we-need-a-natural-language-programming-environment-c4dfd3efcc7f">We Need a Natural Language Programming Environment!</a> was originally published in <a href="https://medium.spatialpixel.com/">Spatial Pixel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turning Your Hand Into a Keyboard]]></title>
            <link>https://medium.spatialpixel.com/turning-your-hand-into-a-keyboard-6b21d092cfd0?source=rss-b6345574fa42------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b21d092cfd0</guid>
            <category><![CDATA[gesture-recognition]]></category>
            <category><![CDATA[natural-language-process]]></category>
            <category><![CDATA[keyboard]]></category>
            <category><![CDATA[lecture]]></category>
            <category><![CDATA[spatial-computing]]></category>
            <dc:creator><![CDATA[Violet Whitney]]></dc:creator>
            <pubDate>Tue, 12 Dec 2023 21:29:42 GMT</pubDate>
            <atom:updated>2023-12-13T15:51:13.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UmfJj5GebQZjQL3_gk0r8A.jpeg" /></figure><h4>Exploration of how bodies can create more natural interfaces</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*HlyOi0Tfq6ftd_8iXYIjHA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p><em>Sections of this article:</em></p><ol><li><strong>Precedents </strong>— Hands as controllers</li><li><strong>Why</strong> — Why do we need a hand keyboard?</li><li><strong>Natural Language Programming </strong>— The body in natural language.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>1 — Precedents — Hands as controllers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>My Student Gave Me This Idea</h4><p>Might I start by saying, this idea is not wholly my own, but rather a Frankenstein of ideas stolen from many creative people who’ve built up these ideas around me. Most importantly, I’ve had a student in my Physical Computing course in the Urban Technology program this semester who has been very keen on developing screen-less remotes by using key presses on the fingers, which planted this idea in my brain. He’s been focusing on this interaction as a sort of universal remote. <a href="https://youtu.be/YKOw4kwd42I">You can see his project here</a>. He also pointed out this technology called <a href="https://gest.co/">Gest</a> which was another point of inspiration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mgrHpoRpRUtaol3HNZ_1zw.jpeg" /><figcaption>Above: Technical Diagram and hand remote by Owen Sims (University of Michigan’s Urban Technologies).</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*A49yxFO4Uip6mz6mr668dA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*F5V30FwCLtftIzYeXhZ2Uw.jpeg" /></figure><p>I‘ve been inspired by so many projects, some which have shown the potential for digital interactions through more natural ways of interacting with the hands, others which leverage computer vision and pose detection, such as in the image above. Projects such as <a href="https://www.youtube.com/watch?v=0QNiZfSsPc0&amp;ab_channel=GoogleATAP">Google ATAP’s Soli</a> pictured below show the potential for more natural microgetures without physically interacting with any hardware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*s2F5brhEKpSceN7Fruds8Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*tT_lPn0tMpI79tFTKFMZwQ.gif" /></figure><p>Many tech companies have this same fascination and there are numerous <a href="https://www.google.com/search?q=patents+that+use+displays+on+hands&amp;tbm=isch&amp;ved=2ahUKEwjOw62cxKGCAxV0VjUKHQEsDH8Q2-cCegQIABAA&amp;oq=patents+that+use+displays+on+hands&amp;gs_lcp=CgNpbWcQAzoECCMQJ1DfBViMNmDbN2gAcAB4AIABRYgBnAuSAQIyNZgBAKABAaoBC2d3cy13aXotaW1nwAEB&amp;sclient=img&amp;ei=OZpBZY7DLPSs1QGB2LD4Bw&amp;bih=1169&amp;biw=2092">patents showing XR interfaces</a> on top of the hands such as the Apple patent drawing below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2zOoLIR4lRFzrB9ktqsrQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*F5V30FwCLtftIzYeXhZ2Uw.jpeg" /></figure><p>If you need anymore convincing about why our hands are so special, just take a look at Bret Victor’s useful rant about hands in his article on <a href="http://worrydream.com/ABriefRantOnTheFutureOfInteractionDesign/">the future of interaction design</a>.</p><p>It got me to thinking about what else we can do with hands?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>2 — Why do we need a hand keyboard?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h4>FAQ</h4><p><strong>Q — Why don’t you just bring a phone or computer? </strong><br>A —I’ve been fascinated by the idea of not needing to carry a phone or a computer around to do computing tasks. I don’t want to bring my clunky keyboard. And I don’t really like the idea of carrying around a bunch of devices: computers, phones, or otherwise. What if we could rely on environmental computers and cloud-based software for interactions?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*OebfX_RVlOQ52QsT56_DKQ.gif" /></figure><p><strong>Q — Why don’t you just use speech?</strong><br>A — Speech is great, but most computer interactions and conversations are private. Either you’re looking something up, or texting someone. I’d prefer not to be that person at the cafe saying “Hey Siri, can you text my mom and ask her when we’re all getting together this year.”</p><p><strong>Q — Why don’t you just use sign language?</strong><br>A — That’s a great idea. The idea didn’t come across my mind until I wrote this article. Since I don’t sign, I’m not sure what the cons and benefits may be between these two systems. I’d love to hear from anyone more familiar here. I assume signing may not be as fast.</p><p><strong>Q — Doesn’t this hand keyboard thing exist already?</strong><br>A — That’s what I was wondering. Apparently it does, and <a href="https://androidcommunity.com/samsung-patent-rethinks-the-keyboard-for-augmented-reality-wearables-20140305/">Samsung patented it</a>. Amazing how quickly things get marked by large companies. But that’s a post for another time. In the mean time, I’ll let you enjoy their hilariously passive aggressive patent drawing below.</p><blockquote>At last you can harass your coworkers while away from your computer.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/0*eOA98_kr2xzO7qRI.jpg" /><figcaption>above: Samsung’s oddly passive aggressive patent drawing</figcaption></figure><p>But in all seriousness, this is a great idea.</p><blockquote>FUN FACT:</blockquote><blockquote>Did you know the QWERTY keyboard was invented in 1867 and gains its logic from the printing press where typesetters manually set individual characters?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3qv-6kRvwoacnJ7H42OEA.jpeg" /></figure><blockquote>“Ok, you convinced me. Now I want a hand keyboard.</blockquote><blockquote>But how would I make one?” — You</blockquote><h4>It’s technically achievable.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1QuBqLU0upw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1QuBqLU0upw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1QuBqLU0upw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/882247bd734d1eb15718a5983e5dc473/href">https://medium.com/media/882247bd734d1eb15718a5983e5dc473/href</a></iframe><p>The above is just a rough demo of how to use the position of the hand to recognize letters pressed. It is by no means a working keyboard. If you were building out a more robust system you’d instead use the skeleton structure of the hand. This is what we’re currently working on [end of this post] and what we hope to include in future posts along the way. If you’d like to see how to make this above simpler demo, its quite easy with Teachable Machine. <a href="https://spatialpixel.com/teachable-machine-tutorial-00437e01a793">You can find my tutorial for it here.</a></p><h4>Hands are great symbols.</h4><p>The hands are great symbols for, well, tons of things.</p><p>When I was working on <a href="https://spatialpixel.com/distant-prosthetics-851504f7680">this lecture</a>, I spent a bunch of time looking at these ancient drawings from witchcraft and alchemy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_3191TsR-nLvFG2gT74jw.jpeg" /></figure><p>The more I perused the depth of the internet, I came across more and more examples where the hand is used as a symbol or for signs. It’s used for sign language, Palmistry, Mudras, cultural gestures like thumbs up, as <a href="https://www.fulltable.com/vts/m/memh/mh.htm">a mnemonic device</a>. The list could go on. So because we can map so many different recognizable meanings onto the hands, they become a really relevant interface for real world interactions.</p><p>This project is not really about turning your hand into a keyboard. Rather it’s an exploration of how to leverage our hands directly to interact with computers.</p><blockquote>It’s not just about typing, its about all the ways we use computers with our hands.</blockquote><p>Why should mice and keyboards confine our creativity? We should be able to tap into the flexibility of both our hands and of language to create our own controls for computers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><h3>3 — Natural Language Programming</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>One idea we’ve been working on at Spatial Pixel is how to <a href="https://vimeo.com/893379256?share=copy">speak programs into the world around you like this working demo</a>.</p><p>In the future, we’ll be able to speak the changes we want in an interface and even speak changes we want to make to change how our hands behave as inputs, to swap our hands from a keyboard, to a paintbrush, or from a paintbrush to a puppet, or from a puppet to a music control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*oy_vHRSwvuctwMaiobGB9g.gif" /></figure><p>This “Speech to Hand” project above is about turning your hand into an interface. But its still in concept mode because there’s a lot to build! Each of these demos on the right is a working program with hand tracking. However, we’re still actively working on the speech functionality to translate programmed actions to the hand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLPR-FL-1t4zWZoH7wBc5g.gif" /></figure><p>This includes inferring:</p><ol><li><strong>body identifier</strong>— what part of the hand the speaker is referring to: finger joints, hand, position of the whole hand or what part of each component (top, bottom, left, right)</li><li><strong>task identifier — </strong>what action the speaker is trying to map to the hand: pressing, tracking distance between fingers, position of the hand, shape or structure of hand which must be inferred from a higher level command such as “turn my hand into a paintbrush”. We’re still trying to sort out the best ways to break down and categorize motions with the hand, but we did come across this <a href="https://www.eng.yale.edu/grablab/pubs/Dollar_STAR14.pdf">amazing paper from the Yale Grab Lab</a>.</li></ol><p>If you have any ideas on how we might categorize tasks in terms of motions, please send your ideas, papers, or projects our way! There’s a lot we have to learn on converting language into actions that can be mapped to the hands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*vXEd1gEQI_mxVEIJCyhs3w.gif" /></figure><p>By the way, I typed this whole article on my hand keyboard while lying under the canopy of a beautiful tree.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*HlyOi0Tfq6ftd_8iXYIjHA.gif" /></figure><p>No, that was a lie.</p><p>I only made a demo version with a few letters.</p><p>But wouldn’t that have been cool?</p><p>Thanks for reading!</p><p>Now go type!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b21d092cfd0" width="1" height="1" alt=""><hr><p><a href="https://medium.spatialpixel.com/turning-your-hand-into-a-keyboard-6b21d092cfd0">Turning Your Hand Into a Keyboard</a> was originally published in <a href="https://medium.spatialpixel.com/">Spatial Pixel</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>