<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>DavidFitz.dev</title>
    <description>Adventures with Creative Devlopment</description>
    <link>https://davidfitz.dev/</link>
    
      <item>
        <title>AccessiBILE</title>
        <link>https://davidfitz.dev/article/accessibile/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/accessibile/</guid>
        <pubDate>Tue May 27 2025 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>Accessibility is complicated. There's a lot of nuance, a lot of kinds of user, and a lot of ways to write code.</p>
<p>It's intimidating for a new developer. I'm even intimidated by it, and I've been writing code for years.</p>
<p>Some of this intimidation isn't as a result of the difficulty of the task though. It's as a result of some devs commenting negatively on others attempts to make things accessible. They take the efforts of someone else, who has the same beliefs and has put in hard work, and blast any error in public.</p>
<p>This is accessiBILE.</p>
<p>I understand the strain that accessibility experts feel when someone says something is accessible, but they can see the flaws. Especially when they themselves might require these accessibility features themselves. That frustration is completely valid. But in the cold light of day, they might be working against themselves by creating accessiBILE.</p>
<p>I've had conversations where devs have chosen to <strong>avoid</strong> doing accessibility on a project because it's easier to look like you didnt bother, rather than get torn apart for it not being perfect.</p>
<p>A good solution for devs who feel this way is to share a pared down demo with your community. Some of the Discords I'm a member of have an accessibility channel, and people often share demos there. Generous devs come in and share their thoughts on how to improve the code. This not only leads to more accessible code, but a more positive view in the community of accessibility.</p>
<p>I have huge respect for those who work hard on accessibility. I am by not means great at it myself, and they're the ones I try to learn from. They also have to constantly fight against all the shiney and new things that might ruin the accessibility they've worked so hard for. It is unfair to ask them to also take the burden of checking in on their emotions in this struggle. I would ask them though to think about if doing so might better serve their long term goals.</p>
<p>And to any devs who are intimidated by accessibility, keep trying. Share your concepts with others to double check your efforts. And try to ignore the accessiBILE.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>SyntaxError - parameter after rest parameter</title>
        <link>https://davidfitz.dev/article/rest-parameter-must-be-last-formal-parameter/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/rest-parameter-must-be-last-formal-parameter/</guid>
        <pubDate>Tue Apr 22 2025 07:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <aside>
TLDR: Wrap it in parenthesis to get rid of the issue
</aside>
<p>In this weeks <a href="https://buttondown.com/cassidoo/archive/all-you-touch-and-all-you-see-is-all-your-life/#:~:text=Interview%20question%20of%20the%20week">Interview question of the week in Cassidy's newsletter</a> (good luck with the new baby Cassidy), the main challenge is to try and get all the code onto one line.</p>
<p>I found a small syntax issue that I'd never seen before. We want to multiply all values in an array by a certain number.</p>
<p>Here's a really reduced example:</p>
<p>If we have a simple array</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> arr <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">]</span></code></pre>
<p>The long way, we could do</p>
<pre class="language-js"><code class="language-js">simpleArr<span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">item</span><span class="token operator">=></span><span class="token punctuation">{</span>
	<span class="token keyword">return</span> item<span class="token operator">*</span><span class="token number">2</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token comment">// returns [2, 4]</span></code></pre>
<p>We can use arrow functions implied return to get this on one line:</p>
<pre class="language-js"><code class="language-js">arr<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">item</span><span class="token operator">=></span>item<span class="token operator">*</span><span class="token number">2</span><span class="token punctuation">)</span> <span class="token comment">// returns [2, 4]</span></code></pre>
<p>Great, this all works.</p>
<p>Now, in the Interview question of the week, there's one small difference, the array is of objects, not values.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> arr <span class="token operator">=</span> <span class="token punctuation">[</span>
	<span class="token punctuation">{</span> <span class="token literal-property property">val</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
	<span class="token punctuation">{</span> <span class="token literal-property property">val</span><span class="token operator">:</span> <span class="token number">2</span> <span class="token punctuation">}</span>
<span class="token punctuation">]</span></code></pre>
<p>The long way works</p>
<pre class="language-js"><code class="language-js">arr<span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">item</span><span class="token operator">=></span><span class="token punctuation">{</span>
	<span class="token keyword">return</span> <span class="token punctuation">{</span><span class="token operator">...</span>item<span class="token punctuation">,</span> <span class="token literal-property property">val</span><span class="token operator">:</span> item<span class="token punctuation">.</span>val <span class="token operator">*</span> <span class="token number">2</span><span class="token punctuation">}</span> <span class="token comment">// returns [{val: 2}, {val: 4}]</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span></code></pre>
<p>Now I assumed I could just use the implied return, but instead I got an error</p>
<pre class="language-js"><code class="language-js">arr<span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">item</span><span class="token operator">=></span><span class="token punctuation">{</span><span class="token operator">...</span>item<span class="token punctuation">,</span> <span class="token literal-property property">val</span><span class="token operator">:</span> item<span class="token punctuation">.</span>val <span class="token operator">*</span> <span class="token number">2</span><span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token comment">// returns Uncaught SyntaxError: Rest parameter must be last formal parameter</span></code></pre>
<p>I found <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Parameter_after_rest_parameter">the MDN page that explains the error</a>. Honestly I find these pages arent great, the explain the error, but they dont explain how the error is affecting me.</p>
<p>It seems that passing a spread value (<code>...item</code>) to an implied return works like passing it to a function, and then it has to be the last parameter. I needed it to be the first, so the new <code>val</code> value could overwrite it. And I even wasnt passing this to a function (I think)!</p>
<p>Luckily, I found the solution, just wrap it in parenthesis. If I'm remembering Will Sentance's training crorrectly, this creates a new execution context, creates our object, and passees it back to be returned without the spread involved.</p>
<pre class="language-js"><code class="language-js">arr<span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">item</span><span class="token operator">=></span><span class="token punctuation">(</span><span class="token punctuation">{</span><span class="token operator">...</span>item<span class="token punctuation">,</span> <span class="token literal-property property">val</span><span class="token operator">:</span> item<span class="token punctuation">.</span>val <span class="token operator">*</span> <span class="token number">2</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token comment">// returns [{val: 2}, {val: 4}]</span></code></pre>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Takenobu Igarashi - Jazz Festival</title>
        <link>https://davidfitz.dev/pen/jazz-festival/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/jazz-festival/</guid>
        <pubDate>Mon Apr 14 2025 17:52:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "zxxOrmq";
    const penHeight = undefined;
    const title = "Takenobu Igarashi - Jazz Festival";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/zxxOrmq">Check out "Takenobu Igarashi - Jazz Festival" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/zxxOrmq/image/small.png"
    alt=Takenobu Igarashi - Jazz Festival
  />
</div>
<p>Discovered this <a href="https://www.tiktok.com/@twosstudio/video/7492081737359478034?_r=1&amp;_t=ZN-8vWLsKypkFK">great graphic designer Takenobu Igarashi on a TikTok</a> and decided to do a little animating!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Animated SVG VHS error effect</title>
        <link>https://davidfitz.dev/pen/animated-scg-vhs-error-effect/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/animated-scg-vhs-error-effect/</guid>
        <pubDate>Mon Feb 17 2025 13:30:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "OPJyxvM";
    const penHeight = undefined;
    const title = "Animated SVG VHS error effect";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/OPJyxvM">Check out "Animated SVG VHS error effect" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/OPJyxvM/image/small.png"
    alt=Animated SVG VHS error effect
  />
</div>
<p>Had a really interesting conversation about creating aberrations for video. Subtle effects to give a little atmosphere.</p>
<p>The aim was for SVG and CSS only. I came up with this not subtle way of containing an effect in CSS only.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Space Motion</title>
        <link>https://davidfitz.dev/pen/space-motion/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/space-motion/</guid>
        <pubDate>Fri Feb 14 2025 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "MYWwmEV";
    const penHeight = undefined;
    const title = "Space Motion";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/MYWwmEV">Check out "Space Motion" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/MYWwmEV/image/small.png"
    alt=Space Motion
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Receipt Shader - Earth and Moon</title>
        <link>https://davidfitz.dev/pen/receipt-shader-earth-and-moon/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/receipt-shader-earth-and-moon/</guid>
        <pubDate>Thu Feb 06 2025 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "jENjvvv";
    const penHeight = undefined;
    const title = "Receipt Shader - Earth and Moon";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/jENjvvv">Check out "Receipt Shader - Earth and Moon" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/jENjvvv/image/small.png"
    alt=Receipt Shader - Earth and Moon
  />
</div>
<p>Saw <a href="https://sams-receipt.vercel.app/">this cool effect</a>, and wondered about recreating it.</p>
<img src="/img/earth-moon-sam-peitz.png">
<p>What intrigued me about this was how the image was dithered in a totally binary way, jsut black and white. The shading was provided by essentially different sized black rectangles.</p>
<p>Totally black? That pixel would be totally black, a full rectangle.</p>
<svg viewBox="-1 -1 12 12" width="150px">
  <rect x="-1" y="-1" width="12" height="12" stroke="red" fill="white" />
  <rect x="0" y="0" width="10" height="10" fill="black" />
</svg>
<p>Totally white? That pixel would be totally white, a rectangle with no width.</p>
<svg viewBox="-1 -1 12 12" width="150px">
  <rect x="-1" y="-1" width="12" height="12" stroke="red" fill="white" />
  <rect x="0" y="0" width="0" height="10" fill="black" />
</svg>
<p>Grey? That pixel would be black on the left half, white on the right half. A rectangle 50% width rectangle within the pixel.</p>
<svg viewBox="-1 -1 12 12" width="150px">
  <rect x="-1" y="-1" width="12" height="12" stroke="red" fill="white" />
  <rect x="0" y="0" width="5" height="10" fill="black" />
</svg>
<p>I pixelated the image, averaging the color within each new &quot;pixel&quot;.</p>
<img src="/img/earth-moon-pixelated.png">
<p>Each color in each pixel then got the dithering treatment,and then added some steps to make things feel a little more old school.</p>
<img src="/img/earth-moon-final.png">
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>What is React really like? Part 2</title>
        <link>https://davidfitz.dev/article/what-is-react-really-like-part-2/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/what-is-react-really-like-part-2/</guid>
        <pubDate>Mon Feb 03 2025 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p><em><em>Note</em>: these are just my honest opinions as a vanilla / Svelte dev trying React out on a real project. Not looking to have a war with anyone on this</em></p>
<ul>
<li><a href="#how-did-it-go">How did it go?</a></li>
<li><a href="#how-did-it-turn-out">How did it turn out?</a></li>
<li><a href="#worries-before-starting">Worries before starting</a>
<ul>
<li><a href="#worry-1-css-is-supposed-to-be-weird">Worry 1: CSS is supposed to be weird.</a>
<ul>
<li><a href="#poor-recommendations-from-the-docs">Poor recommendations from the docs</a></li>
<li><a href="#missing-selectors">Missing selectors</a></li>
<li><a href="#difficult-maintenance">Difficult maintenance</a></li>
</ul>
</li>
<li><a href="#worry-2-what-packages-do-i-need-to-do-things">Worry 2: What packages do I need to do things?</a>
<ul>
<li><a href="#community">Community</a></li>
</ul>
</li>
<li><a href="#worry-3-jsx-just-uggggghhhhhhh">Worry 3: JSX. Just uggggghhhhhhh.</a></li>
</ul>
</li>
<li><a href="#moving-away-from-standards">Moving away from standards</a>
<ul>
<li><a href="#transfer-of-skills">Transfer of skills</a></li>
<li><a href="#mental-burden">Mental burden</a></li>
</ul>
</li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
<p>Ok, I said I'd give some little updates as I went, but honestly, I didnt have time because I was fixing soooooo many Typescript issues.</p>
<p>That's a bit of a joke, and a little bit true. There's a lot to say, so if you dont want to read it all, just read the first two sections.</p>
<h2>How did it go?</h2>
<p>Did I try to learn too much at once? React, Next, Tailwind and Typescript. I essentially hadnt used any of them before. I had a pretty steep learning curve.</p>
<p>For example, the errors in the terminal meant nothing to me. When there were errors. It felt like the feedback would either be &quot;catastrophic error&quot;, or silent errors skuttling my code in the background. And it wasnt always clear (to a beginner) if the error I made was a Typecript violation, misusing Next, or a fundamental React issue.</p>
<p>After a while, I did start getting the hang of it. I was able to put a component together pretty comfortably, and understand how to fix errors.</p>
<h2>How did it turn out?</h2>
<p>Now that I'm used to it, do I like the React ecosystem? No. I truly feel like it's a relic of a particular time, and isnt at all optimal for the tools we have now. I think users and developers alike are the victims here, and only that it appears to make hiring easier, therefore more juniors learn it, it survives.</p>
<p>Within that, then, I think the weight of the React ecosystem mental model is so heavy that devs feel they cant take on the mental weight of another framework.</p>
<p>On to the details.</p>
<h2>Worries before starting</h2>
<p>In <a href="/article/what-is-react-really-like-part-1/">my first post</a> I had a few things, lets see if they did.</p>
<h3>Worry 1: CSS is supposed to be weird.</h3>
<p>I <em>love</em> CSS. Styles, neatly cascading, intertwining, overriding and eventually displaying a neatly choreographed UI? * chefs kiss *</p>
<p>The change to Tailwind was jarring. My first note was that &quot;Tailwind feels like it doesnt <em>want</em> to use the cascade&quot;. Of course, with purely utility classes, that's true.</p>
<p>Like with everything else in this project, I got used to it. That said, I did have to escape a lot of Tailwind's own set classes (eg <code>p-[1.5rem]</code>). I also used <code>global.css</code> to write a class or two, for a grid system and some reset styles I didnt agree with in Tailwind.</p>
<p>There are limitations with Tailwind.</p>
<h4>Poor recommendations from the docs</h4>
<p>They dont recommend using <code>:before</code> or <code>:after</code>. <a href="https://tailwindcss.com/docs/hover-focus-and-other-states#before-and-after">&quot;It’s worth noting that you don’t really need ::before and ::after pseudo-elements for most things in Tailwind projects — it’s usually simpler to just use a real HTML element.&quot;</a>. They recommend using spans instead.</p>
<p>This is mind blowing, and I feel bad practice. These pseudo elements, even in their example, are purely for display. <code>:before</code> and <code>:after</code> are exactly what should be used here. I feel the developers realised they couldnt make this neat in Tailwind, so recommended something worse.</p>
<h4>Missing selectors</h4>
<p>Not only bad advice, but a whole class of selecting is lost: <code>:first-child</code>. Sure you can add <code>first:____</code> to the first element. But that's not the purposed of <code>:first-child</code>. The intent is to select the first child of the parent.</p>
<p>To get around this I initially had to arbitrarily set <code>first:</code> in several different components. This got messy, so I eventually changed my architecture to avoid needing to select the first child.</p>
<h4>Difficult maintenance</h4>
<p>Another issue is consistency. If you want the same styles on two different elements you have to copy and paste the whole class list. If you want variations, and then to change them later, you're doing a lot of find and replacing. I've only created one Tailwind project, but the thought of maintaining one is terrifying.</p>
<p>I can already hear the feedback &quot;make it a component&quot;. Really? I need to rig up a whole React component for what could be a single CSS class? That, to me, is insanity.</p>
<p>My conclusion for Tailwind is that, sure a smattering of utility classes is ok, but <em>only</em> utility classes as a paradigm is broken. Also, culturally, sticking to that paradigm leads to bad practices.</p>
<h3>Worry 2: What packages do I need to do things?</h3>
<p>So this one was a nightmare. I happened to start at a bad time. React 19 and Next 15 are both pretty new, so the ecosystem hadnt had time to catch up.</p>
<p>I wanted to use P5, but it didnt have an updated package. I knew Pixi had a React specific package <a href="https://pixijs.io/pixi-react/">@pixi/react</a>. Luckily that has a beta available for React 19.</p>
<p>Related to this is how I found out that Pixi has a beta. At various points in the project I was searching &quot;how to X in React 19 Next 15&quot;, and very little came back. In fairness, again, this was a new version so there might not be a lot of content out there.</p>
<p>What was striking though was that old examples wouldnt work. Samples of code for Next 14 are just broken in Next 15.</p>
<p>I find this crazy. 15 versions in, and the paradigms are still changing that much that a lot of the old basics are redundant now?</p>
<p>This makes me very happy, thinking of the Svelte eco system. I think Svelte 5 still supports Svelte 3. You can mix and match. &quot;<em>BUT SVELTE HAS A COMPILER</em>&quot;. Yeah, and so does every realistic way of working with React.</p>
<h4>Community</h4>
<p>The React based communities I visited were <em>very</em> helpful though. Especially the Pixi Discord.</p>
<p>Part of me wonders though if the React community is so large and vocal <em>because</em> of these issues with packages. They've had to deal with so many paradigm shifts, then need to band together.</p>
<p>Maybe Svelte and Vue need ruin the syntax more to bring people together.</p>
<h3>Worry 3: JSX. Just uggggghhhhhhh.</h3>
<p>Actually, this is one I was quite ok with.</p>
<p>I dont love the syntax. I find it messy and very jarring with standard JavaScript, but it works.</p>
<p>EG</p>
<pre class="language-jsx"><code class="language-jsx"><span class="token keyword">return</span> <span class="token punctuation">(</span>
    boolean <span class="token operator">&amp;&amp;</span> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Component</span></span><span class="token punctuation">></span></span><span class="token plain-text">
}
</span></code></pre>
<p>That's a trick. And it works. But it requires a decent amount of knowledge, knowledge that doesnt relate to templating. Dont even get me started on returning <code>()</code>.</p>
<p>&quot;What would be better?&quot;, fair questions. I'm not standards creator, but what about something like:</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">return</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">
    ?{boolean}
        &lt;Component />
    ?{/}
</span><span class="token template-punctuation string">`</span></span></code></pre>
<p>The idea being ${} is for execution, but ?{} would be for evaluation, and ?{/} denotes the end of what is at stake within that evaluation?</p>
<p>There's talk of brining JSX into the browser as a standard. I'm less horrified by that now. That said, I think there has to be a neater way of achieving it.</p>
<h2>Moving away from standards</h2>
<p>There's a common refrain by React devs that &quot;it's just Javascript ™&quot;.</p>
<p>That's right and wrong, in two ways.</p>
<p>Yes, it is just JavaScript, that's right. It's ONLY JavaScript, no HTML, CSS, SVG etc.</p>
<p>It also isnt &quot;just&quot; JavaScript. It's JavaScript in the context of React. For example events arent simple browser events, they're synthetic events, and you need to get the <code>nativeEvent</code> back from it. I'm sure there are &quot;reasons&quot;, but I never saw a benefit to them.</p>
<p>The lifecycle loop of React is also so awkward and brittle. <code>useRef</code>, <code>useState</code>, <code>useEffect</code>. God forbid you have an issue with these. Most places React devs only respond with the url https://react.dev/reference/rules/rules-of-hooks, not helping the reader learn more. In fairness, this was rare, but there seems to be a culture of not helping explain these kinds of issues.</p>
<h3>Transfer of skills</h3>
<p>This and other small changes mean that a lot of my existing knowledge doesnt work in React-land. That's true of Svelte too. As percentages though, I would say React feels like 40-50% standards based, and Svelte feels 90-95% standards based.</p>
<p>I believe a Svelte developers skillset is significantly more transferable to other situations than a React developer.</p>
<h3>Mental burden</h3>
<p>The other way to look at this is that React at best, to me, only 50% feels like I'm working with the web platform.</p>
<p>BUT it's still being built for the web. So the mental lifting needed to make something work in React, while also thinking about how it works for the web is simply bigger than with other frameworks.</p>
<h2>Conclusion</h2>
<p>This was all a bit scattershot, because I could write so much more about any of these issues, and I wanted to keep things more succinct.</p>
<p>Overall I believe React devs would be <em>amazed</em> to see how much easier and lighter it is so write applications in other frameworks. Maybe that's one of the reasons they're so slow to move. They already carry so much mental weight. And each update is so heavy too. I'd be slow to try and add the weight of another framework too.</p>
<script>
    document.querySelectorAll("h2,h3,h4").forEach(h=>{
        h.setAttribute("id", 
            h.innerText
                .replaceAll(".","")
                .replaceAll("?","")
                .replaceAll(":","")
                .replaceAll("  ","-")
                .replaceAll(" ","-")
                .toLowerCase()
        )
})
</script>
<style>
    ul {
        background: #f9f9f9;
        padding: .5rem 2rem;
    }
</style>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Are We Matt Mullenweg?</title>
        <link>https://davidfitz.dev/article/are-we-matt-mullenweg/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/are-we-matt-mullenweg/</guid>
        <pubDate>Wed Jan 29 2025 08:51:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <h2>AI Frustration</h2>
<p>Perhaps, like me, you were frustrated to hear that OpenAI is likely to have hoovered up your blog posts and Github contributions to train the ChatGPT model.</p>
<p>Your work, that you did, and shared openly. What exactly is the issue you feel? Is it that the intention was to share with like minded individuals, rather than billion dollar companies?</p>
<h2>Wordpress frustration</h2>
<p>You might also have heard that (very rich man) <a href="https://techcrunch.com/2025/01/12/wordpress-vs-wp-engine-drama-explained/">Matt Mullenweg is frustrated that some using his open source tech is making money from it</a>.</p>
<p>Generally this has been met with jokes at Matt's expense. Truth be told, I've kind of agreed.</p>
<h2>AI Frustration: Part II</h2>
<p>Yesterday <a href="https://www.ft.com/content/a0dfedd1-5255-4fa9-8ccc-1fe01de87ea6">OpenAI has claimed that DeepSeek has stolen their intellectual property to train their AI model</a>.</p>
<p>I openly laughed at this news. They didnt care when it was our stuff. Now that it's theirs, it's an issue.</p>
<h2>Similarities</h2>
<p>These ideas were swirling around my head today. I think there's a huge parallel between all three stories.</p>
<p>[entity 1] creates intellectual property, only to have [entity 2] use it in a way that differs from [entity 1]'s intention for its use.</p>
<p>I'm not sure what my point is here, but I do find myself wondering, are we Matt Mullenweg?</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Hover Interaction (98/100)</title>
        <link>https://davidfitz.dev/pen/hover-interaction-98-100/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/hover-interaction-98-100/</guid>
        <pubDate>Fri Jan 24 2025 13:40:12 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "GgKwKKj";
    const penHeight = undefined;
    const title = "Hover Interaction (98/100)";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/GgKwKKj">Check out "Hover Interaction (98/100)" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/GgKwKKj/image/small.png"
    alt=Hover Interaction (98/100)
  />
</div>
<p>Saw this <a href="https://www.linkedin.com/posts/suzanne-sirunyan_motiondesign-webperformance-interactiondesign-activity-7279073676413579264-1dCT?utm_source=share&amp;utm_medium=member_desktop">amazing series by Suz Sirunyan</a> and had to have a go!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>What is React really like? Part 1</title>
        <link>https://davidfitz.dev/article/what-is-react-really-like-part-1/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/what-is-react-really-like-part-1/</guid>
        <pubDate>Thu Nov 28 2024 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>I've got a project coming in where I need to use React.</p>
<p>I tried to learn it back around 2017. I had a visceral reaction to it. It did not work for my mental model. It felt like I had to jump through increadible hoops to achieve what would normally be simple for me (think PHP and jQuery times).</p>
<p><q>In all affairs it's a healthy thing now and then to hang a question mark on the things you have long taken for granted.</q> – Bertrand Russel</p>
<p>Time to be healthy and put a question mark around my assumptions about React.</p>
<p>My aim here is to explore what modern React looks like, paired with Next.js. I'm going to compare that to my experiences with vanilla JS and Svelte/Kit.</p>
<p>Before even starting, here are...</p>
<h3>The things that I think are going to trip me up.</h3>
<ul>
<li>CSS is supposed to be weird. The idea of writing it in JS, or having to use Tailwind in HTML just feels wrong to me.</li>
<li>What packages do I need to do things? I'm hoping that by using Next.js they'll have sensible defaults and I wont need to worry about too much.</li>
<li>I'm going to probably be incorporating P5, interactinve SVG and maybe ThreeJS. I'm very used to using these vanilla style and bending them to my will. Will the React lifecycle get in the way there? I know GSAP has special functions to work with React. That makes me nervous.</li>
<li>JSX. Just uggggghhhhhhh. What's going on there.</li>
<li>Performance is typically brought up as an issue. Will I be able to understand the lifecycle well enough to get around this.</li>
<li>Apparently React is bad for accessibility. The project should be mostly pretty straightforward HTML... lets hope.</li>
</ul>
<p>And to be fair...</p>
<h3>The things I'm hopeful about</h3>
<ul>
<li>React is huge. People have hit and solved all the issues above. Hoping the community will be able to help me.</li>
<li>There's apparently a convergence between the frameworks recently. Svelte has become more like React, and React more like Svelte. With some luck, this will help me bridge the gap.</li>
</ul>
<p>This will be part 1 in a series. As I find something interesting in the adventure I'll add a post!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Red Moon</title>
        <link>https://davidfitz.dev/pen/red-moon/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/red-moon/</guid>
        <pubDate>Wed Oct 23 2024 20:44:12 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "JjgOrNZ";
    const penHeight = undefined;
    const title = "Red Moon";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/JjgOrNZ">Check out "Red Moon" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/JjgOrNZ/image/small.png"
    alt=Red Moon
  />
</div>
<p>Based on <a href="https://savee.it/i/P8gVDoH/">this cool poster on Savee</a>.</p>
<p>Thought about doing this with a custom shader, but happier with this vertex shifting!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Screenprint Racecar</title>
        <link>https://davidfitz.dev/pen/screenprint-racecar/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/screenprint-racecar/</guid>
        <pubDate>Thu Sep 26 2024 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "rNXagGX";
    const penHeight = undefined;
    const title = "Screenprint Racecar";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/rNXagGX">Check out "Screenprint Racecar" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/rNXagGX/image/small.png"
    alt=Screenprint Racecar
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Petit Stars</title>
        <link>https://davidfitz.dev/pen/petit-stars/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/petit-stars/</guid>
        <pubDate>Wed Aug 14 2024 00:08:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "gONXQxJ";
    const penHeight = undefined;
    const title = "Petit Stars";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/gONXQxJ">Check out "Petit Stars" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/gONXQxJ/image/small.png"
    alt=Petit Stars
  />
</div>
<p>Quick doodle of the cover of <a href="https://www.ebay.ie/itm/285928327005?_nkw=little+prince+book&amp;itmmeta=01J584RZJMSY8ZDRJWJDA79CHS&amp;hash=item4292a8075d:g:tv8AAOSw6Fxme6K7&amp;itmprp=enc%3AAQAJAAAA0HoV3kP08IDx%2BKZ9MfhVJKlQvneQZS1L8LKQp2NZJDztkrnnZMsYMB4jilAGuxS2uOhIoWiqPH8aCnZ0Pw3vOk39WdYMNe8%2FBK0Y%2FJpV2z4ZMCGHV%2Fzyqxvbau%2Fd83sPwRIJOVCK2dK3KbYAWdyLAlnF8%2FitslTDhDI%2FjKNI46WH98%2BhFxsrmn%2B6qsuQNTt5nqKIors0TBy3qBO7HjNf%2BrUSQS0TQsoetMsDK%2BIqUE9k6NaFuNQyhVOIBPPKiX6aYuUe2S6QD2oiKG8P%2BpLZwu8%3D%7Ctkp%3ABk9SR7T544SqZA">this notebook based on the Little Prince</a>.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Stack Overflow Pipes</title>
        <link>https://davidfitz.dev/pen/stack-overflow-pipes/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/stack-overflow-pipes/</guid>
        <pubDate>Thu Jul 25 2024 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "oNrzEVW";
    const penHeight = undefined;
    const title = "Stack Overflow Pipes";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/oNrzEVW">Check out "Stack Overflow Pipes" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/oNrzEVW/image/small.png"
    alt=Stack Overflow Pipes
  />
</div>
<p>I liked the pipes at <a href="https://survey.stackoverflow.co/2024/">the top of the Stack Overflow 2024 results page</a>, and thought I'd try a quick sketch.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Wiggly Walls</title>
        <link>https://davidfitz.dev/pen/wiggly-walls/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/wiggly-walls/</guid>
        <pubDate>Wed Jul 24 2024 21:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "VwJKPKx";
    const penHeight = undefined;
    const title = "Wiggly Walls";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/VwJKPKx">Check out "Wiggly Walls" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/VwJKPKx/image/small.png"
    alt=Wiggly Walls
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Fun Red Shader</title>
        <link>https://davidfitz.dev/pen/fun-red-shader/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/fun-red-shader/</guid>
        <pubDate>Tue Jul 23 2024 21:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "GRbjZvO";
    const penHeight = undefined;
    const title = "Fun Red Shader";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/GRbjZvO">Check out "Fun Red Shader" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/GRbjZvO/image/small.png"
    alt=Fun Red Shader
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Creative Week - Beatriz Lozano</title>
        <link>https://davidfitz.dev/pen/creative-week-beatriz-lozano/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/creative-week-beatriz-lozano/</guid>
        <pubDate>Thu May 23 2024 08:34:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "NWVryOw";
    const penHeight = undefined;
    const title = "Creative Week - Beatriz Lozano";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/NWVryOw">Check out "Creative Week - Beatriz Lozano" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/NWVryOw/image/small.png"
    alt=Creative Week - Beatriz Lozano
  />
</div>
<p><a href="https://beatrizl.com/project/creative-week" target="_blank">Based on these designs by Beatriz Lozano</a></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>The Shed - Stairs</title>
        <link>https://davidfitz.dev/pen/the-shed-stairs/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/the-shed-stairs/</guid>
        <pubDate>Wed May 15 2024 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "gOJpxBx";
    const penHeight = undefined;
    const title = "The Shed - Stairs";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/gOJpxBx">Check out "The Shed - Stairs" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/gOJpxBx/image/small.png"
    alt=The Shed - Stairs
  />
</div>
<p>I've always really loved the motion graphics work that Rare Volume did for <a href="https://rarevolume.com/work/theshed/">The Shed</a>.</p>
<p>There are plenty of examples in there, but one that always caught my eye for some reason was this one.</p>
<p><video src="https://rarevolu-me-site.s3.amazonaws.com/videos/shed_bw_3_web.mp4" loop controls ><video/></p>
<p>Initially I started making this with CSS and didnt have much luck. I havent played with the various 3D options in CSS very much.</p>
<p>To get things clear in my head, <a href="https://codepen.io/loficodes/pen/mdYJBRx">I recreated it in ThreeJS</a>.</p>
<p>Once I had that nailed down I was more confident coming back to CSS and applying what I had figured out.</p>
<p>There are two things that really stand out for me, the use of variables, and the use of mathematics.</p>
<p>Look at the <code>:root</code> element at the top of that CSS file.</p>
<pre class="language-css"><code class="language-css"><span class="token selector">:root</span> <span class="token punctuation">{</span>
<span class="token comment">/* 	angle of steps */</span>
	<span class="token property">--ang</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">cos</span><span class="token punctuation">(</span>pi * .25<span class="token punctuation">)</span> * 1rad<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">/* colors	 */</span>
	<span class="token property">--black</span><span class="token punctuation">:</span> #000<span class="token punctuation">;</span>
	<span class="token property">--white</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
	<span class="token property">--grey</span><span class="token punctuation">:</span> #ddd<span class="token punctuation">;</span>
<span class="token comment">/* 	fonts */</span>
	<span class="token property">--fz</span><span class="token punctuation">:</span> 50px<span class="token punctuation">;</span>
	<span class="token property">--lh</span><span class="token punctuation">:</span> 1.2rem<span class="token punctuation">;</span>
<span class="token comment">/* camera	 */</span>
	<span class="token property">--perspective</span><span class="token punctuation">:</span> 9<span class="token punctuation">;</span>
<span class="token comment">/* 	animation */</span>
	<span class="token property">--duration</span><span class="token punctuation">:</span> 2s<span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>Magestic! Look how much control we have. And that cascades through all our calculations later.</p>
<p>Then, more specifically, that first line.</p>
<pre class="language-css"><code class="language-css"><span class="token property">--ang</span><span class="token punctuation">:</span> <span class="token function">calc</span><span class="token punctuation">(</span><span class="token function">cos</span><span class="token punctuation">(</span>pi * .25<span class="token punctuation">)</span> * 1rad<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>This would have been mind blowing only a year or two ago. We're using <code>cos()</code> functions and constants like <code>pi</code> in <em>raw</em> CSS!</p>
<p>I really love where we've come to!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Painty blurry text</title>
        <link>https://davidfitz.dev/pen/painty-blurry-texy/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/painty-blurry-texy/</guid>
        <pubDate>Fri May 03 2024 13:40:12 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "NWmZyoX";
    const penHeight = undefined;
    const title = "Painty blurry text";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/NWmZyoX">Check out "Painty blurry text" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/NWmZyoX/image/small.png"
    alt=Painty blurry text
  />
</div>
<p>Messing with some SVG filters. Really like how the text is blurry on the top / left, but the colors are making it sharp on the right / bottom.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Scaled steps</title>
        <link>https://davidfitz.dev/pen/scaled-steps/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/scaled-steps/</guid>
        <pubDate>Wed May 01 2024 21:51:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "ZEZNROj";
    const penHeight = undefined;
    const title = "Scaled steps";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/ZEZNROj">Check out "Scaled steps" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/ZEZNROj/image/small.png"
    alt=Scaled steps
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Miami Sunset</title>
        <link>https://davidfitz.dev/pen/miami-sunset/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/miami-sunset/</guid>
        <pubDate>Wed Apr 17 2024 19:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "NWmLZeB";
    const penHeight = undefined;
    const title = "Miami Sunset";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/NWmLZeB">Check out "Miami Sunset" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/NWmLZeB/image/small.png"
    alt=Miami Sunset
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Happy Eye</title>
        <link>https://davidfitz.dev/pen/happy-eye/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/happy-eye/</guid>
        <pubDate>Fri Apr 12 2024 11:26:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "abxKjey";
    const penHeight = undefined;
    const title = "Happy Eye";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/abxKjey">Check out "Happy Eye" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/abxKjey/image/small.png"
    alt=Happy Eye
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Handy 3D Asset Sites</title>
        <link>https://davidfitz.dev/article/handy-3d-asset-sites/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/handy-3d-asset-sites/</guid>
        <pubDate>Tue Mar 05 2024 07:52:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>I'm always hopefully searching on Ecosia for these few sites. I'm never sure if I've forgotten some. This is going to be where I keep my list of handy sites for free 3D assets.</p>
<ul>
<li><a href="https://polyhaven.com/all">Poly Haven</a> - free everything, and really high quality</li>
<li><a href="https://www.pexels.com/search/hdr/">Pexels</a> - free HDRs</li>
<li><a href="https://ambientcg.com/">AmbientCG</a> - free textures, high quality</li>
<li><a href="https://www.cgtrader.com/">CG Trader</a> - high quality models, surprising amount of them free</li>
<li><a href="https://poly.pizza/">Poly.Pizza</a> - free low poly models</li>
<li><a href="https://www.poliigon.com/search/free">Poliigon</a> - small but nice selection of free assets</li>
</ul>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>The Potential Environmental Danger of AI Use</title>
        <link>https://davidfitz.dev/article/the-potential-environmental-danger-of-ai-use/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/the-potential-environmental-danger-of-ai-use/</guid>
        <pubDate>Mon Feb 26 2024 19:57:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>First thing's first, this is very much a back of a napkin set of calculations. The data is not clear, but I'm working with what I can.</p>
<p>My main data point is that GPT-3 uses <a href="https://arxiv.org/pdf/2304.03271.pdf">a 500ml bottle of water for roughly 10-50 responses</a>.</p>
<p>Lets try and measure the impact of GPT-5 based on this. I'm going to take two approaches. I'm also going to be pessimistic and say that, based on the study above, 50 responses = 500ml, or 1 response = 10ml.</p>
<ul>
<li>Compare based on parameter count</li>
<li>Compare based on created media</li>
</ul>
<h3>Parameter Count</h3>
<p>This is the least accurate method. I'm going to claim a 1:1 ratio between parameter count and water use. In the absence of other data.</p>
<p><a href="https://en.wikipedia.org/wiki/GPT-3">GPT-3 has 175 billion parameters</a>. So we will also say that, one 175 billion parameter response = 10ml of water.</p>
<p>Looking at each generation of GPT, we get the following water use, per response.</p>
<table>
<thead>
<tr>
<th>Year</th>
<th>GPT</th>
<th>Parameters</th>
<th>Water use</th>
</tr>
</thead>
<tbody>
<tr>
<td>2018</td>
<td><a href="https://en.wikipedia.org/wiki/Generative_pre-trained_transformer#Foundational_models">GPT-1</a></td>
<td>117million</td>
<td>0.007ml</td>
</tr>
<tr>
<td>2019</td>
<td><a href="https://en.wikipedia.org/wiki/Generative_pre-trained_transformer#Foundational_models">GPT-2</a></td>
<td>1.5billion</td>
<td>0.086ml</td>
</tr>
<tr>
<td>2020</td>
<td><a href="https://en.wikipedia.org/wiki/GPT-3">GPT-3</a></td>
<td>175 billion</td>
<td>10ml</td>
</tr>
<tr>
<td>2022</td>
<td><a href="https://en.wikipedia.org/wiki/GPT-4">GPT-4</a></td>
<td>1.76 trillion</td>
<td>100.6ml</td>
</tr>
<tr>
<td>2024</td>
<td><a href="https://en.wikipedia.org/wiki/GPT-4">GPT-5</a></td>
<td>17.6 trillion</td>
<td>1 liter</td>
</tr>
</tbody>
</table>
<p>We're seeing that essentially every 2 years or so, the parameters x10, as does the water use.</p>
<p>This is at a time where where <a href="https://geekdom.social/@FantasticalEconomics/111992643342946703">over 50% of the world experiences water stress at least once a year, and huge cities like Mexico City are months away from running out of water</a>.</p>
<p>Obviously, this is all very much &quot;back of a napkin&quot; style calculations. If this trend continues till 2030, just three more generational leaps for AI, we'll be consuming 1000 litres of water per response.</p>
<p>These aren't facts, but I don't hear many AI enthusiasts worrying about this, so I'm trying to sound the siren.</p>
<p>Some questions that would be useful to have answered.</p>
<h4>For you, the reader</h4>
<ul>
<li>what benefit are you truly getting from AI?</li>
<li>do you believe it's worth this potential impact?</li>
<li>do you believe it's worth the theft that went into it?</li>
<li>are you comfortable creating a culture where theft and environmental impact are acceptable consequences of doing business?</li>
</ul>
<h4>For the AI company</h4>
<ul>
<li>are there plans to <em>significantly</em> improve or eliminate the environmental impact of AI?</li>
<li>we're seeing AI responses move from text, to image, to video. These will mean an acceleration again of these numbers. How will you mitigate this?</li>
</ul>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Car at Night</title>
        <link>https://davidfitz.dev/pen/car-at-night/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/car-at-night/</guid>
        <pubDate>Mon Feb 26 2024 18:34:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "OJqbRLG";
    const penHeight = undefined;
    const title = "Car at Night";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/OJqbRLG">Check out "Car at Night" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/OJqbRLG/image/small.png"
    alt=Car at Night
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Fire</title>
        <link>https://davidfitz.dev/pen/fire/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/fire/</guid>
        <pubDate>Mon Feb 26 2024 17:34:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "vYPorLp";
    const penHeight = undefined;
    const title = "Fire";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/vYPorLp">Check out "Fire" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/vYPorLp/image/small.png"
    alt=Fire
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Colorful Knots</title>
        <link>https://davidfitz.dev/pen/colorful-knots/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/colorful-knots/</guid>
        <pubDate>Mon Feb 26 2024 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "XWGvaYr";
    const penHeight = undefined;
    const title = "Colorful Knots";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/XWGvaYr">Check out "Colorful Knots" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/XWGvaYr/image/small.png"
    alt=Colorful Knots
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Monster Eye</title>
        <link>https://davidfitz.dev/pen/monster-eye/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/monster-eye/</guid>
        <pubDate>Wed Feb 21 2024 20:02:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "dyrLKKE";
    const penHeight = undefined;
    const title = "Monster Eye";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/dyrLKKE">Check out "Monster Eye" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/dyrLKKE/image/small.png"
    alt=Monster Eye
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Distort ThreeJS Mesh and Retain Normals</title>
        <link>https://davidfitz.dev/pen/distort-threejs-maintain-normals/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/distort-threejs-maintain-normals/</guid>
        <pubDate>Mon Feb 19 2024 20:21:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "zYbbVJG";
    const penHeight = undefined;
    const title = "Distort ThreeJS Mesh and Retain Normals";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/zYbbVJG">Check out "Distort ThreeJS Mesh and Retain Normals" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/zYbbVJG/image/small.png"
    alt=Distort ThreeJS Mesh and Retain Normals
  />
</div>
<p>Ok this has actually been on the list for over a year.</p>
<p>I've been trying to find a method of changing the positions of points on a ThreeJS mesh, but maintaining all the normal information for easy lightling.</p>
<p>Shaders! That should be the solution, right? But the second we use a <code>ShaderMaterial</code>, we lose all lighting info, and our normals are broken. We now need to go and rset all of those. And the hoops you need to jump through are insane!</p>
<p>Next I kinda thought Nodes would get me there. And honestly, I think they will in the future, there just arent enough docs, and I dont have enought time.</p>
<p>But finally, after playing with the ThreeJS demo for <a href="https://flo-bit.github.io/every-noise/#simple-3d-noise-on-sphere-threejs">every-noise</a>, they had done this! And it seems pretty straight forward.</p>
<p>You can get the points of a geometry with <code>mesh.getAttribute(&quot;position&quot;).array</code>. Mess around with them, then pop in your new values with <code>geo.setAttribute(&quot;position&quot;, new THREE.BufferAttribute(editedData, 3))</code>. Finally, do a quick <code>mesh.computeVertexNormals()</code> and you're back in the game, with light control and correct normals! Woo!</p>
<p>Still havent moved much beyond the basics, but so happy to have a method for this now!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Beach letters</title>
        <link>https://davidfitz.dev/pen/beach-letters/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/beach-letters/</guid>
        <pubDate>Mon Feb 19 2024 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "zYbbMRx";
    const penHeight = undefined;
    const title = "Beach letters";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/zYbbMRx">Check out "Beach letters" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/zYbbMRx/image/small.png"
    alt=Beach letters
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Easing links</title>
        <link>https://davidfitz.dev/article/easing-links/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/easing-links/</guid>
        <pubDate>Tue Jan 30 2024 18:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>I've been sitting on some links for a while around easing and havent really been doing anything with them. I had in mind that I would do something <em>amazing</em> with them, but I still dont know what that would be.</p>
<p>I've had to come back to them often enough that it's worth just collecting them here to share with all you lovely people!</p>
<h3><a href="https://easings.net/" target="_blank">Easings.net</a></h3>
<p>This is the big deal for me. It's really quick (it's just a gallery of eases), and when you click in you get almost every kind of example of how it might work across animations and gradients. Also <code>CSS</code> and <code>JS</code> ready to copy and paste. (<a href="https://easings.net/" target="_blank">link</a>)</p>
<h3><a href="https://www.smashingmagazine.com/2023/09/path-css-easing-linear-function/" target="_blank">The Path to Awesome CSS Easing With The linear() Function</a></h3>
<p>Jhey is a great writer and this article and its examples really show you why people are so excited about the <code>linear()</code> function, and how you can use it too. (<a href="https://www.smashingmagazine.com/2023/09/path-css-easing-linear-function/" target="_blank">link</a>)</p>
<h3><a href="https://gsap.com/docs/v3/Eases/" target="_blank">GSAP Easing Visualiser</a></h3>
<p>Less of a set of instructions, and more of a tools for exploring timing ideas. Really lets you <em>see</em> the difference between easings. (<a href="https://gsap.com/docs/v3/Eases/" target="_blank">link</a>)</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Hand Lettering</title>
        <link>https://davidfitz.dev/pen/hand-lettering/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/hand-lettering/</guid>
        <pubDate>Fri Jan 26 2024 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "jOJaMpZ";
    const penHeight = undefined;
    const title = "Hand Lettering";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/jOJaMpZ">Check out "Hand Lettering" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/jOJaMpZ/image/small.png"
    alt=Hand Lettering
  />
</div>
<p>I came across a really nice After Effects tutorial by <a href="https://www.instagram.com/p/CvzuqG2NJqI/?igsh=MWttcmYwcG1sbGNmMw==">valeri_visuals</a> and thought it might be possible to replicate in SVG.</p>
<p>I really like the effect, but would love to get the filter working on HTML text elements like <code>h1</code>s and <code>h2</code>s. Seems like the outlines are lost when I try that.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Weak Force</title>
        <link>https://davidfitz.dev/pen/weak-force/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/weak-force/</guid>
        <pubDate>Tue Jan 02 2024 23:49:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "PoLPVjX";
    const penHeight = undefined;
    const title = "Weak Force";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/PoLPVjX">Check out "Weak Force" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/PoLPVjX/image/small.png"
    alt=Weak Force
  />
</div>
<p>Based on <a href="https://pin.it/40D6W2R">this pen</a>.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Rotating Clock</title>
        <link>https://davidfitz.dev/pen/rotatingClock/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/rotatingClock/</guid>
        <pubDate>Tue Dec 19 2023 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "Jjxgpyj";
    const penHeight = undefined;
    const title = "Rotating Clock";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/Jjxgpyj">Check out "Rotating Clock" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/Jjxgpyj/image/small.png"
    alt=Rotating Clock
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Merry Christmas 2023</title>
        <link>https://davidfitz.dev/pen/merry-xmas-2023/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/merry-xmas-2023/</guid>
        <pubDate>Fri Dec 15 2023 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "dyaBmbV";
    const penHeight = undefined;
    const title = "Merry Christmas 2023";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/dyaBmbV">Check out "Merry Christmas 2023" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/dyaBmbV/image/small.png"
    alt=Merry Christmas 2023
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Circle of Black Dots</title>
        <link>https://davidfitz.dev/pen/circle-of-black-dots/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/circle-of-black-dots/</guid>
        <pubDate>Tue Nov 28 2023 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "mdvjwBQ";
    const penHeight = 0;
    const title = "Circle of Black Dots";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/mdvjwBQ">Check out "Circle of Black Dots" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/mdvjwBQ/image/small.png"
    alt=Circle of Black Dots
  />
</div>
<p><codepen></codepen></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Stain Glass</title>
        <link>https://davidfitz.dev/pen/stain-glass/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/stain-glass/</guid>
        <pubDate>Mon Nov 27 2023 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "bGzjWKx";
    const penHeight = 0;
    const title = "Stain Glass";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/bGzjWKx">Check out "Stain Glass" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/bGzjWKx/image/small.png"
    alt=Stain Glass
  />
</div>
<p><codepen></codepen></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Sunflowers</title>
        <link>https://davidfitz.dev/pen/sunflowers/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/sunflowers/</guid>
        <pubDate>Fri Oct 06 2023 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "JjweBjv";
    const penHeight = 0;
    const title = "Sunflowers";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/JjweBjv">Check out "Sunflowers" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/JjweBjv/image/small.png"
    alt=Sunflowers
  />
</div>
<p><codepen></codepen></p>
<p>Click the sky to see the effect!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>70s Ovals</title>
        <link>https://davidfitz.dev/pen/seventies-ovals/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/seventies-ovals/</guid>
        <pubDate>Wed Sep 13 2023 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "qBLjaey";
    const penHeight = undefined;
    const title = "70s Ovals";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/qBLjaey">Check out "70s Ovals" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/qBLjaey/image/small.png"
    alt=70s Ovals
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Contextual Advertising</title>
        <link>https://davidfitz.dev/article/kill-the-cookie/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/kill-the-cookie/</guid>
        <pubDate>Fri Sep 08 2023 07:35:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p><em>Note: These are my own thoughts and dont represent the position of my employer.</em></p>
<p>There's a lot of talk in the advertising world that &quot;The End of the Cookie&quot; is coming. This refers to the blocking of third-party cookies in browsers. Some, like Safari, Firefox and Brave are already doing this. The reason for this is to ensure users privacy so that we cant be monitored across sites.</p>
<p>The biggest use case for tracking users across sites is for targeted advertising. By categorising the content you consume, advertising companies build a profile around your cookie. With this profile they can target you based on your interests.</p>
<p>Google is the biggest advertising company in the world. They also own the biggest browser in the world, Chrome with at present has a 65% hold of the worldwide market according to <a href="https://gs.statcounter.com/">statcounter</a>.</p>
<p>&quot;The End of the Cookie&quot; is in effect people waiting for Chrome to start blocking third-party cookies. Waiting for the worlds largest advertising company to take an action that would affect their entire business model. Google keep suggesting alternatives that actually undermine users privacy more, and then they push out the date for the end of the cookie, almost annually.</p>
<p>&quot;That sounds like a conflict of interest&quot;. You betcha.</p>
<p>This conflict feels immovable.</p>
<h3>Is there anything we can do about it?</h3>
<p>Actually, yes, and it's full of benefits.</p>
<p>Creating profiles about users based on their cookies is called Behavioural Advertising. There's an alternative called Contextual Advertising.</p>
<p>In a nutshell Contextual Advertising looks at the content on the page and allows advertisers to target that, instead of users.</p>
<h3>What benefits might this give us?</h3>
<h4>Technical simplicity</h4>
<p>When your cookie is being tracked, lots of companies scripts need to run on the page to update your info on their server. Think about that. Every pageload, from every user, needs many scripts to download, and then run code on many servers and in many databases to update your info.</p>
<p>With contextual targeting, the publisher would run a single script whenever they create or update content. This means that only once per content change, one script runs and updates one database. Notice this is done on the publisher end, so a user never has to take this cost.</p>
<h4>No advertising cookies needed</h4>
<p>Because no cookies are needed to track the user, this removes a use case for needing a cookie notice. This doesnt immediately mean you can remove your cookie notice, but it takes a big chunk of the need away.</p>
<h4>Better advertising performance</h4>
<p>What's the effect for the advertiser then? Well, actually their story improves too.</p>
<p><a href="https://iabeurope.eu/wp-content/uploads/2021/07/IAB-Europe-Guide-to-Contextual-Advertising-July-2021.pdf">According to the IAB</a>: &quot;69% of consumers would be more likely to look at an ad if it was relevant to the content they were reading&quot;.</p>
<p>This is more effective for the advertiser which saves them money.</p>
<h4>Environmental benefits</h4>
<p>I dont have data for this, but based on how much simpler the technology is, and how many fewer calls are being made, there must be a benefit here. Even if it's small, anything we can do is worth it.</p>
<p>That's not even the end of it. <a href="https://instapage.com/blog/contextual-advertising">There are more benefits I havent listed here</a>.</p>
<h3>Ok, so why isnt this happening?</h3>
<p>Given the benefits above, why wouldnt every advertiser be jumping on this? Here are some theories.</p>
<h4>Retargeting</h4>
<p>Advertisers love retargeting. You know when you buy something, and then you see ads for it again for the rest of the week? That's retargeting you across sites because you visited the page for that product.</p>
<p>This technique is effective at enough scale, but as in the example above it's really wasteful. Advertising is all about getting the message out there though, so companies are willing to take the waste, if the cost is less than their potential profit from a sale.</p>
<p>Purely contextual advertising wouldnt allow that.</p>
<h4>Habit</h4>
<p>Advertising companies are arranged to work with Behavioural Advertising. They're arranged to work with other companies that work the same way. It's really hard for one of these companies to change on their own, because no one else is doing it. It would take retraining almost all advertising related staff. There's too much inertia.</p>
<h4>Bias</h4>
<p>Because of <a href="https://en.wikipedia.org/wiki/Anchoring_(cognitive_bias)">anchoring</a> Advertisers are used to the higher cost of Behavioural Advertising. When they see the relatively lower cost of Contextual Advertising, they feel like it's &quot;cheap&quot; and possibly less effective.</p>
<h4>&quot;The End of the Cookie&quot;</h4>
<p>There's so much talk in the advertising about &quot;The End of the Cookie&quot;, that it's reinforcing that the cookie is still here. The good times are still here. We dont have to change yet. Keep doing what you're doing.</p>
<p>This is all minimising the fact that Contextual Advertising is actually superior in so many ways, and there's no reason not to do it now.</p>
<h3>Conclusion</h3>
<p>There's a huge opportunity here to help the environment, get rid of all those cookie popups, and make the decision easier for Google to block third-party cookies. If you're an advertiser, please help lead the way and start running more Contextual campaigns.</p>
<h3>Reading:</h3>
<ul>
<li><a href="https://iabeurope.eu/wp-content/uploads/2021/07/IAB-Europe-Guide-to-Contextual-Advertising-July-2021.pdf">The IAB Europe Guide to Contextual Advertising</a></li>
<li><a href="https://instapage.com/blog/contextual-advertising">Contextual Advertising 101: How it Works, Benefits &amp; Why It’s Necessary for Relevant Ads</a></li>
<li><a href="https://www.ibm.com/watson-advertising/thought-leadership/what-is-contextual-advertising">What is contextual advertising? Everything you need to know</a></li>
<li><a href="https://www.g2.com/articles/contextual-advertising">Contextual Advertising: What It Is, How It Works, And Benefits
</a></li>
</ul>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Nailing Arcs</title>
        <link>https://davidfitz.dev/pen/nailing-arcs/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/nailing-arcs/</guid>
        <pubDate>Mon Aug 21 2023 07:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "LYMYdde";
    const penHeight = undefined;
    const title = "Nailing Arcs";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/LYMYdde">Check out "Nailing Arcs" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/LYMYdde/image/small.png"
    alt=Nailing Arcs
  />
</div>
<p>I've spent a few years avoiding the arcs in P5. It always felt strange the point being the center of the circle, rather than some kind of bezier setup that I'm more comfortable with.</p>
<p>Decided to attack it with this doodle!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Frequency and Amplitude</title>
        <link>https://davidfitz.dev/article/frquency-and-amplitude/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/frquency-and-amplitude/</guid>
        <pubDate>Mon Aug 14 2023 07:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>It can be a real brain twister trying to remember the difference between frequency and amplitude.</p>
<p>Here's a quick breakdown.</p>
<h2>Frequency</h2>
<p>Changes how frequently there are changes. Higher frequency, more wiggles. Lower frequency, less wiggles.</p>
<div class="demo">
<div id="fna-freq">
<img loading="lazy" src="https://davidfitz.dev/img/demo/fna-freq.gif" alt="Demo of fna-freq" />
<p>This is an interactive demo, <a href="https://davidfitz.dev/article/frquency-and-amplitude/">try it out on the site</a> to see it in action!</p>
</div>
<script>
  document.getElementById("fna-freq").innerHTML = "";
</script>
<script src="/js/demo/fna-freq.js"></script>
<script src="/js/lib/p5.js"></script>
</div>
<h2>Amplitude</h2>
<p>Changes the size of the wiggles. Higher amplitude, higher wiggles. Lower amplitude, lower wiggles.</p>
<div class="demo">
<div id="fna-amp">
<img loading="lazy" src="https://davidfitz.dev/img/demo/fna-amp.gif" alt="Demo of fna-amp" />
<p>This is an interactive demo, <a href="https://davidfitz.dev/article/frquency-and-amplitude/">try it out on the site</a> to see it in action!</p>
</div>
<script>
  document.getElementById("fna-amp").innerHTML = "";
</script>
<script src="/js/demo/fna-amp.js"></script>
<script src="/js/lib/p5.js"></script>
</div>
<p>All of these examples are using a <code>sin</code> wave. But this it true also of <code>cos</code>, <code>noise</code>, and other kinds of wiggling that we do with numbers!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Cone Shapes</title>
        <link>https://davidfitz.dev/pen/cone-shapes/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/cone-shapes/</guid>
        <pubDate>Mon Jul 31 2023 12:30:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "dyQwXBe";
    const penHeight = undefined;
    const title = "Cone Shapes";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/dyQwXBe">Check out "Cone Shapes" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/dyQwXBe/image/small.png"
    alt=Cone Shapes
  />
</div>
<p>This was just a fun little idea I came across, multiplied.</p>
<p>I saw that a circle with a stroke, when moved, left a little bit of its fill behind, and that kinda looked like shading. Because of the curve, there was more fill visible in the center.</p>
<p>I decided to make these kind of cone shapes form over a few generations to fill the screen.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Shorthand Floor</title>
        <link>https://davidfitz.dev/article/shorthand-floor/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/shorthand-floor/</guid>
        <pubDate>Mon Jul 31 2023 07:17:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>We already know that <a href="https://davidfitz.dev/article/round">there are lots of ways of rounding in JS</a>. But did you know that there's a shorthand for <code>Math.floor()</code>?</p>
<p>If we use the Bitwise Operator <code>~</code> twice, we can floor a number.</p>
<pre class="language-javascript"><code class="language-javascript"><span class="token keyword">let</span> num <span class="token operator">=</span> <span class="token number">1.13542345</span><span class="token punctuation">;</span>
console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token operator">~</span><span class="token operator">~</span>num<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 1</span></code></pre>
<p>No, I dont really understand how it works either. It's probably not a great thing to write in your code, because other people might not understand it either. But in case you do come across it, now you know what it means.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Normalizing Vectors</title>
        <link>https://davidfitz.dev/article/normalizing-vectors/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/normalizing-vectors/</guid>
        <pubDate>Thu Jul 27 2023 07:03:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>Normalizing can be confusing because there are some slightly different, but similar meanings, in different dituations.</p>
<h3>Normalizing vectors</h3>
<p>Different to normalizing numbers, normalizing vectors is quite straight forward.</p>
<p>Lets take the example of the 2D vector <code>[3,4]</code>;</p>
<p>Normalizing this means returning a new vector, the length of which is equal to <code>1</code>. A vector of length <code>1</code> is also sometimes called a <em>unit vector</em>.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">function</span> <span class="token function">normalize2D</span><span class="token punctuation">(</span><span class="token parameter">v</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token keyword">const</span> x <span class="token operator">=</span> v<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
  <span class="token keyword">const</span> y <span class="token operator">=</span> v<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
  <span class="token keyword">const</span> len <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">sqrt</span><span class="token punctuation">(</span>x <span class="token operator">*</span> x <span class="token operator">+</span> y <span class="token operator">*</span> y<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">return</span> <span class="token punctuation">[</span>x <span class="token operator">/</span> len<span class="token punctuation">,</span> y <span class="token operator">/</span> len<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token function">normalize2D</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns [0.6, 0.8]</span></code></pre>
<p>To achieve this we get the length of the vector. Then divide the <code>x</code> and <code>y</code> component of the vector. This makes sense because, if the length is <code>5</code>, as in the case above, the vector is five times too large. So we divide <code>x</code> by <code>5</code>, and <code>y</code> by <code>5</code>, giving us the correct vector.</p>
<p>Most frameworks will have vector helpers with a normalize function, but it's important to see what it is, and understand how it works.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Normalizing Numbers</title>
        <link>https://davidfitz.dev/article/normalizing-numbers/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/normalizing-numbers/</guid>
        <pubDate>Wed Jul 26 2023 07:37:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>Normalizing can be confusing because there are some slightly different, but similar meanings, in different situations.</p>
<h3>Normalizing numbers</h3>
<p>Typically the target of normalizing is to get numbers either in the range [0 -&gt; 1], or [-1 -&gt; 1].</p>
<p>To do this you'll need to know the minimum and maximum numbers in the range, and map your value to them.</p>
<p>Let's make a function we can use to normalize. We'll work with the number <code>12</code>, and the range is 0 -&gt; 20.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">function</span> <span class="token function">normalize</span><span class="token punctuation">(</span><span class="token parameter">val <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">,</span> max <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">,</span> min <span class="token operator">=</span> <span class="token number">0</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token keyword">return</span> val <span class="token operator">/</span> max<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token function">normalize</span><span class="token punctuation">(</span><span class="token number">12</span><span class="token punctuation">,</span> <span class="token number">20</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 0.6</span></code></pre>
<p>If we pop in our value <code>12</code>, and set a <code>max</code> of <code>20</code>, we'll get a value back of <code>0.6</code>, which is correct.</p>
<p>We're not using the <code>min</code> yet, so lets use <code>12</code> as our value again, but make our range 10 -&gt; 20. We'll need to update our function.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">function</span> <span class="token function">normalize</span><span class="token punctuation">(</span><span class="token parameter">val <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">,</span> max <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">,</span> min <span class="token operator">=</span> <span class="token number">0</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token keyword">return</span> <span class="token punctuation">(</span>val <span class="token operator">-</span> min<span class="token punctuation">)</span> <span class="token operator">/</span> <span class="token punctuation">(</span>max <span class="token operator">-</span> min<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token function">normalize</span><span class="token punctuation">(</span><span class="token number">12</span><span class="token punctuation">,</span> <span class="token number">20</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 0.2</span></code></pre>
<p>There are lots of ways to do this, and lots of choices you can make for style. For example, what if your value is outside of your range?</p>
<pre class="language-js"><code class="language-js"><span class="token function">normalize</span><span class="token punctuation">(</span><span class="token number">22</span><span class="token punctuation">,</span> <span class="token number">20</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// What should this return?</span></code></pre>
<p><code>22</code>, our value, is larger than <code>20</code> our <code>max</code>. Our function will return <code>1.2</code> as it is. Should it return <code>1</code>? These are all options and fun you can have with normalizing that will give you different results in your experiments!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Flood</title>
        <link>https://davidfitz.dev/pen/flood/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/flood/</guid>
        <pubDate>Tue Jul 25 2023 06:48:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "eYQLgyG";
    const penHeight = undefined;
    const title = "Flood";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/eYQLgyG">Check out "Flood" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/eYQLgyG/image/small.png"
    alt=Flood
  />
</div>
<p><a href="https://sighack.com/post/flood-fill-art-using-random-walks">Based on this article by Manohar Vanga</a></p>
<p>I havent looked at their code, but just made an attempt at it myself based on their article</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Noise</title>
        <link>https://davidfitz.dev/article/noise/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/noise/</guid>
        <pubDate>Wed Jul 19 2023 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>We've already spoken about <a href="https://davidfitz.dev/article/math-random/">Math.random()</a>, which gives us a random number between <code>0-1</code>.</p>
<p>Noise does the same thing (though sometimes might be a number between <code>-1 - 1</code>), but in a very different way.</p>
<p>Lets compare <code>random</code> to <code>noise</code> in 1d. We'll get x100 values and plot them.</p>
<img src="https://davidfitz.dev/img/demo/random-vs-noise.png" alt="a row of random dots, with no pattern. Below is a row of noisy dots, with a descernable pattern">
<p>You can see in the pattern above that, yes, random and noise return unpredictable numbers, but they do it in a very different ways.</p>
<p>Random is complete chaos. It returns a number, with no regard for any other number.</p>
<p>Noise is more refined. It returns numbers that are random, but related. Two numbers near each other should return <em>similar</em>, but not idential numbers.</p>
<p>Lets look at some 2D noise.</p>
<img src="https://davidfitz.dev/img/demo/2D-noise.png" alt="a cloudy pattern of black and white noise">
<p><a href="https://codepen.io/loficodes/pen/vYQjQOB/62fc41944840ef50a873c03d253368f1" target="_blank">Play with this example on CodePen</a></p>
<p>Where we see black, the noise value is <code>0</code>, and where we see white, the noise value is <code>1</code>. This was generated with this code in <code>p5</code>.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">function</span> <span class="token function">setup</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token keyword">const</span> canvas <span class="token operator">=</span> <span class="token function">createCanvas</span><span class="token punctuation">(</span><span class="token number">600</span><span class="token punctuation">,</span> <span class="token number">300</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">let</span> x <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> x <span class="token operator">&lt;</span> width<span class="token punctuation">;</span> x<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">let</span> y <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> y <span class="token operator">&lt;</span> height<span class="token punctuation">;</span> y<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token function">noStroke</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

      <span class="token comment">// multiplying by .05 to make the scale smaller</span>
      <span class="token keyword">let</span> n <span class="token operator">=</span> <span class="token function">noise</span><span class="token punctuation">(</span>x <span class="token operator">*</span> <span class="token number">0.05</span><span class="token punctuation">,</span> y <span class="token operator">*</span> <span class="token number">0.05</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

      <span class="token comment">// noise values are between 0-1</span>
      <span class="token comment">// color values in p5 are between 0-255</span>
      <span class="token comment">// multiplying n by 255 to suit p5</span>
      <span class="token function">fill</span><span class="token punctuation">(</span>n <span class="token operator">*</span> <span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

      <span class="token function">rect</span><span class="token punctuation">(</span>x<span class="token punctuation">,</span> y<span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
<p>We're passing in the <code>x</code>, <code>y</code> values of each individual pixel to get a noise value. Then we're multiplying by <code>.05</code>. This changes the frequency of the noise. A little like zooming in and out of the noise.</p>
<img src="https://davidfitz.dev/img/demo/2D-noise-5.png" alt="a cloudy pattern of black and white noise. This time the variations between black and white are much closer together.">
<p>This is the same noise with a frequency of <code>.5</code></p>
<img src="https://davidfitz.dev/img/demo/2D-noise-005.png" alt="a cloudy pattern of black and white noise. This time the variations between black and white are much farther apart.">
<p>This is the same noise with a frequency of <code>.005</code></p>
<h2>What can we do with it?</h2>
<p>Noise is one of those tools that can be used in all sorts of cases. Lets look at three examples that might help you see its range.</p>
<p class="codepen" data-height="300" data-default-tab="result" data-slug-hash="NWEMErj" data-editable="true" data-user="loficodes" data-token="5e6bf11aa7260b545e7b74bd64762986" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
  <span>See the Pen <a href="https://codepen.io/loficodes/pen/NWEMErj/5e6bf11aa7260b545e7b74bd64762986">
  LoFi example - Noise 2d - heatmap</a> by David Fitz (<a href="https://codepen.io/loficodes">@loficodes</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<p>You can use noise to play with colors. Here we're adjusting the value of the <code>hue</code> in a <code>hsl</code> color to generate what looks like a heat map.</p>
<p class="codepen" data-height="300" data-default-tab="result" data-slug-hash="VwVxVbw" data-editable="true" data-user="loficodes" data-token="ef69a08556e2e994d0683e139f541d25" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
  <span>See the Pen <a href="https://codepen.io/loficodes/pen/VwVxVbw/ef69a08556e2e994d0683e139f541d25">
  LoFi example - Noise 2d - heatmap</a> by David Fitz (<a href="https://codepen.io/loficodes">@loficodes</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<p>You can create wiggly lines, in patterns that rarely repeat! Notice that we've used time as a parameter that we've put into the noise.</p>
<p>There's a whole constellation of ideas that noise can achieve, and in future posts, we'll be looking at more of them.</p>
<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>The Joy of Multiplying by Floats</title>
        <link>https://davidfitz.dev/article/the-joy-of-multiplying-by-floats/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/the-joy-of-multiplying-by-floats/</guid>
        <pubDate>Thu Jul 13 2023 07:52:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>This really confused me when I started creative coding, and I just accepted it was magic. After a lot of experience I now get it, and I want to help you get there quicker too.</p>
<p>This is a really unintuitive thing to understand, and might take a few tries before you're comfortable with it. Feel free to read this once, try things out, then come back to it later as you get more experience.</p>
<p>So what are floats? They're numbers with a decimal. EG <code>0.20983475</code>. Importantly, for this to work, we never go above <code>1</code>.</p>
<p>That sounds really limiting. Only numbers between <code>0-1</code>?!</p>
<p>But there's incredible power in it.</p>
<h2>Use in placing things</h2>
<p>Imagine we have a purple square and we want to place it in the center of our canvas.</p>
<img src="https://davidfitz.dev/img/demo/joy-of-floats-position-1.png" alt="gold bordered canvas with a purple square cut off in the top left corner">
<p>Initially our purple square is in the top left of the canvas. Because it's aligned to its center, it's getting copped off at the top and the left.</p>
<p>If this was in p5, the code for this might look like:</p>
<pre class="language-js"><code class="language-js"><span class="token function">rect</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>Lets say we dont know the size of the canvas, it automatically resizes to match the width and height of whatever screen it's on. How can we center our square?</p>
<p>We divide by a float of <code>.5</code>. This will half any value we give it. So we do that with the <code>width</code> and <code>height</code>.</p>
<pre class="language-js"><code class="language-js"><span class="token function">rect</span><span class="token punctuation">(</span>width <span class="token operator">*</span> <span class="token number">0.5</span><span class="token punctuation">,</span> height <span class="token operator">*</span> <span class="token number">0.5</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>And we get:</p>
<img src="https://davidfitz.dev/img/demo/joy-of-floats-position-2.png" alt="gold bordered canvas with a purple square, perfectly centered.">
<p>Why does this work? Well, floats are essentially percentages. <code>.5</code>, is <code>50%</code>! <code>.125</code> is <code>12.5%</code>.</p>
<h2>Control in Discovery</h2>
<p>You might think that that's not much better than just dividing by <code>2</code>. And you'd be right!</p>
<p>But the real value comes in when you want to try out different values. Lets play with an example.</p>
<div class="demo">
<div id="float-vs-division">
<img loading="lazy" src="https://davidfitz.dev/img/demo/float-vs-division.gif" alt="Demo of float-vs-division" />
<p>This is an interactive demo, <a href="https://davidfitz.dev/article/the-joy-of-multiplying-by-floats/">try it out on the site</a> to see it in action!</p>
</div>
<script>
  document.getElementById("float-vs-division").innerHTML = "";
</script>
<script src="/js/demo/float-vs-division.js"></script>
<script src="/js/lib/p5.js"></script>
</div>
<p>What if you want to a third of the way across?</p>
<p>Ok, so that's easy for the fraction, pop <code>3</code> in, and the line gets divided by three.</p>
<p>And same with the float, just pop in <code>.3333333</code>, or however many 3's you feel like typing.</p>
<p>Halves, quarters, that's all ok.</p>
<p>What about going 82% across the line? That's easy in the floats, enter <code>.82</code>. But what about the fraction? <code>1.2195121951219512</code>?! That's hard to understand.</p>
<p>These charts might make it clearer too, because the jumps between fractions are inconsistent, but with floats are easy.</p>
<p>Fractions</p>
<img src="https://davidfitz.dev/img/demo/joy-of-floats-multiple-fractions.png" alt="Three gold and purple squares, moved along three lines. The first is 1/2 way, the second 1/3, the third 1/4 of the way across the image.">
<p>These are really inconsistent. The difference between <code>/2</code>, <code>/3</code> is way bigger than between <code>/3</code>, <code>/4</code>. This inconsistency is really difficult for the human brain.</p>
<p>Floats</p>
<img src="https://davidfitz.dev/img/demo/joy-of-floats-multiple-floats.png" alt="Three gold and purple squares, moved along three lines. The first is 20%, the second is 30%, the third 40$ of the way across the image.">
<p>These are lovely! It's exactly the same gap between each, and I can immediately understand how I can play with these numbers.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Happy Accidents</title>
        <link>https://davidfitz.dev/article/happy-accidents/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/happy-accidents/</guid>
        <pubDate>Thu Jul 06 2023 18:10:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>This isn't about my conception, we're not going to get into that... this is about the happy accidents that happen with creative coding.</p>
<p>Sometimes the maths can be really complicated. Sometimes you get confused. Sometimes you make a mistake, and things can go wrong.</p>
<p>And sometimes that ends up being <em>amazing</em>!</p>
<p>When I was trying to make this <a href="http://davidfitz.dev/pen/chihuly/">Chihuly design</a>.</p>
<img src="https://codepen.io/loficodes/pen/YzWXyBY/image/small.png" alt="Chihuly style 3D art" />
<p>I got the logic wrong and ended up with this <a href="http://davidfitz.dev/pen/fire-circle/">Fire Circle</a> instead!</p>
<img src="https://codepen.io/loficodes/pen/eYzNYQN/image/small.png" alt="Crazy weird firey lookin circle thing" />
<p>The lesson here is that creative coding isnt like regular UI design. There isnt a right or wrong answer. You cant get it right, you cant get it wrong. The only important part is that you enjoy it! Maybe it's not what was in your imagination, and that can sometimes be even better.</p>
<p>So keep creating, keep enjoying, and enjoy the happy accidents!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Stand Out</title>
        <link>https://davidfitz.dev/pen/stand-out/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/stand-out/</guid>
        <pubDate>Mon Jul 03 2023 20:07:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "xxQrGXr";
    const penHeight = undefined;
    const title = "Stand Out";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/xxQrGXr">Check out "Stand Out" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/xxQrGXr/image/small.png"
    alt=Stand Out
  />
</div>
<p>Just one person standing out in a crowd. People who stand out often notice things that others wouldnt, like your mouse, or where you tap on the screen.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Rounding</title>
        <link>https://davidfitz.dev/article/round/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/round/</guid>
        <pubDate>Mon Jul 03 2023 07:17:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>You likely know about rounding from school, but in JavaScript, we have three flavors.</p>
<h3>Math.round()</h3>
<p>This is probably the one you're most familiar with. It takes any number where the fractional part is below <code>.5</code> and rounds down, and takes any value equal to or greater than <code>.5</code> and rounds up.</p>
<pre class="language-js"><code class="language-js">Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span><span class="token number">0.3</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 0</span>

Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span><span class="token number">0.5</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 1</span>

Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span><span class="token number">0.7</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 1</span></code></pre>
<p>This might not always be the effect you want though. So there are two other falvors.</p>
<h3>Math.floor()</h3>
<p>This will always round down to the nearest whole number, no matter the fractional amount. It brings the values to the 'floor', is an easy way to remember it.</p>
<pre class="language-js"><code class="language-js">Math<span class="token punctuation">.</span><span class="token function">floor</span><span class="token punctuation">(</span><span class="token number">0.1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 0</span>

Math<span class="token punctuation">.</span><span class="token function">floor</span><span class="token punctuation">(</span><span class="token number">0.9</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 0</span></code></pre>
<h3>Math.ceil()</h3>
<p>Opposite to <code>Math.floor()</code>, <code>Math.ceil()</code> will always round a number up to the nearest whole number. It brings the value to the &quot;ceiling&quot;.</p>
<pre class="language-js"><code class="language-js">Math<span class="token punctuation">.</span><span class="token function">ceil</span><span class="token punctuation">(</span><span class="token number">0.1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 1</span>

Math<span class="token punctuation">.</span><span class="token function">ceil</span><span class="token punctuation">(</span><span class="token number">0.9</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// returns 1</span></code></pre>
<p>There are no obvious times to recommend when to use one or the other, but it's important to have these in your arsenal for when you might need them!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>PI</title>
        <link>https://davidfitz.dev/article/pi/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/pi/</guid>
        <pubDate>Thu Jun 29 2023 08:11:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>PI is something that you're going to come across in creative coding. Most of us will have come across it in school. But what exactly is it?</p>
<p>It's a mathematical constant, it never changes, and we have it in JavaScript.</p>
<pre class="language-js"><code class="language-js">Math<span class="token punctuation">.</span><span class="token constant">PI</span><span class="token punctuation">;</span>
<span class="token comment">// returns 3.141592653589793</span></code></pre>
<p>That's great, but what is it for? It's all to do with circles.</p>
<p>PI is a ratio. The ratio between the diameter of a circle and its diameter. Meaning that to get the circumference you need to multiply the diameter by 3.141592653589793.</p>
<h3>Can we prove that with code?</h3>
<p>Yes we can!</p>
<p>If PI the ratio between the diameter and the circumference, that's the same ratio between the radius and the circumference of a semicircle, because they're both half as big.</p>
<p>We can use that to prove PI. To do this, we count the length of equal sized lines used to mimic the shape of a semi circle. Then get the ratio of the total length of those lines to the radius of the circle.</p>
<div class="demo">
<div id="prove-pi">
<img loading="lazy" src="https://davidfitz.dev/img/demo/prove-pi.gif" alt="Demo of prove-pi" />
<p>This is an interactive demo, <a href="https://davidfitz.dev/article/pi/">try it out on the site</a> to see it in action!</p>
</div>
<script>
  document.getElementById("prove-pi").innerHTML = "";
</script>
<script src="/js/demo/prove-pi.js"></script>
<script src="/js/lib/p5.js"></script>
</div>
<p>If you play with this demo you'll notice two things as we add more lines. First, it starts to <em>look</em> more like a semicircle. Second, the change to the ratio number is getting smaller and smaller. That means that, as we add more lines, we get closer to PI.</p>
<p>By the time we hit x100 lines we see very little change in the ratio number, and we have PI accurate to four decimal places!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Tau</title>
        <link>https://davidfitz.dev/article/tau/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/tau/</guid>
        <pubDate>Wed Jun 28 2023 18:51:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>Tau, what is it?!</p>
<p>This is a mathematical constant you might see sometimes in frameworks, especially in P5.</p>
<p>This one's easy, it's just <a href="https://davidfitz.dev/article/pi/">PI</a> * 2! It's handy when you're trying to make circles, because most drawing tools work with a radius.</p>
<pre class="language-js"><code class="language-js">Math<span class="token punctuation">.</span><span class="token constant">PI</span> <span class="token operator">*</span> <span class="token number">2</span> <span class="token operator">==</span> <span class="token constant">TAU</span><span class="token punctuation">;</span>
<span class="token comment">// returns true, if your framework has the constant TAU</span>

<span class="token comment">// Or create it yourself!</span>
<span class="token keyword">const</span> <span class="token constant">TAU</span> <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token constant">PI</span> <span class="token operator">*</span> <span class="token number">2</span><span class="token punctuation">;</span></code></pre>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Mod</title>
        <link>https://davidfitz.dev/article/mod/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/mod/</guid>
        <pubDate>Wed Jun 28 2023 06:47:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>You already know <code>+</code>, <code>-</code>, <code>*</code> and <code>/</code>. They're fun and all, but time to get to know <code>%</code>.</p>
<p>It's got a few names from what I can see, and people get very nitpicky about it. You'll hear it called &quot;modulo&quot;, &quot;modulus&quot;, &quot;the remainder operator&quot;, but I like to just call it &quot;mod&quot;.</p>
<h3>What does it do?</h3>
<p>You pass it two numbers, and it gives you whats left after you divide one number by another.</p>
<p>Let's look at some example.</p>
<pre class="language-js"><code class="language-js"><span class="token number">4</span> <span class="token operator">%</span> <span class="token number">2</span><span class="token punctuation">;</span>
<span class="token comment">// returns 0</span></code></pre>
<p>When you divide 4 by 2, you get exatly 2, with no remainder. The mod operator returns the remainder, so it's 0.</p>
<pre class="language-js"><code class="language-js"><span class="token number">5</span> <span class="token operator">%</span> <span class="token number">2</span><span class="token punctuation">;</span>
<span class="token comment">// returns 1</span></code></pre>
<p>When you divide 5 by 2, you get 2, with a remainder of 1. The mod operator returns the remainder, so it's 1;</p>
<pre class="language-js"><code class="language-js"><span class="token number">17</span> <span class="token operator">%</span> <span class="token number">5</span><span class="token punctuation">;</span>
<span class="token comment">// returns 2</span></code></pre>
<p>When you divide 17 by 5, you get 3, with a remainder of 2. The mod operator returns the remainder, so it's 2;</p>
<h4>Demo</h4>
<div style="display: grid; grid-template-columns: 1fr 2em 1fr; text-align: center; align-items: center;">
<input id="num" type="number" value="4" /><span>%</span><input id="divider" type="number" value="2" />
</div>
<div id="result"></div>
<script>
  const calc = () => {
    result.innerText = "= " + (num.value % divider.value);
  }
  
  num.addEventListener('change', calc)
  num.addEventListener('keyup', calc)
  divider.addEventListener('change', calc)
  divider.addEventListener('keyup', calc)
  calc()
</script>
<h3>What's it good for?</h3>
<p>You might look at this and wonder what the purpose of all this is? But where it comes in handy is when you want to loop through things, like an array of things, or for an animations.</p>
<p>Here's an example of an animation using mod.</p>
<p class="codepen" data-height="300" data-default-tab="result" data-slug-hash="abQJBxR" data-editable="true" data-user="loficodes" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
  <span>See the Pen <a href="https://codepen.io/loficodes/pen/abQJBxR">
  Using mod for an animation</a> by David Fitz (<a href="https://codepen.io/loficodes">@loficodes</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>
<p>We keep increasing the value of <code>frame</code>, and then create a value <code>t</code> using <code>%</code>;</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> t <span class="token operator">=</span> <span class="token punctuation">(</span>frame <span class="token operator">%</span> frameCount<span class="token punctuation">)</span> <span class="token operator">/</span> frameCount<span class="token punctuation">;</span></code></pre>
<p>This now gives us a normalised number telling us where we are in the animation.</p>
<p>Using mod for user input to loop through an array works the same way.</p>
<p class="codepen" data-height="300" data-default-tab="result" data-slug-hash="oNQZBxK" data-editable="true" data-user="loficodes" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
  <span>See the Pen <a href="https://codepen.io/loficodes/pen/oNQZBxK">
  Choose a Beatle</a> by David Fitz (<a href="https://codepen.io/loficodes">@loficodes</a>)
  on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>
<p>One thing to be careful of here though is that, when a user decrements a value, if it goes below 0, mod will start returning negative numbers, and in the opposite direction. That's why the function <code>chooseBeatle()</code> has that its if statement.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> <span class="token function-variable function">chooseBeatle</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>currentBeatle <span class="token operator">&lt;</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    currentBeatle <span class="token operator">+=</span> beatles<span class="token punctuation">.</span>length<span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
  beatle<span class="token punctuation">.</span>innerText <span class="token operator">=</span> beatles<span class="token punctuation">[</span>currentBeatle <span class="token operator">%</span> beatles<span class="token punctuation">.</span>length<span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span></code></pre>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>P5 Upload Image</title>
        <link>https://davidfitz.dev/article/p5-upload-image/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/p5-upload-image/</guid>
        <pubDate>Mon Jun 26 2023 08:27:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>Last week I was trying to make a file uploader, to then bring the image into P5.</p>
<p>The process (geddit?!) was a little different to what I expected, and thanks to <a href="https://bento.me/meodai">David Aerne</a> for showing me the solution!</p>
<h3>The issue</h3>
<p>At first, I tried what would seem natural, coming from the angle of typical DOM and JavaScript APIs.</p>
<p>In the HTML, I had something like the following.</p>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>file<span class="token punctuation">"</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>inputEl<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span></code></pre>
<p>And then in the JavaScript.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">let</span> img<span class="token punctuation">;</span>
<span class="token keyword">let</span> el <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"inputEl"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
el<span class="token punctuation">.</span><span class="token function">addEventListener</span><span class="token punctuation">(</span><span class="token string">"change"</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">e</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
  img <span class="token operator">=</span> <span class="token constant">URL</span><span class="token punctuation">.</span><span class="token function">createObjectURL</span><span class="token punctuation">(</span>e<span class="token punctuation">.</span>target<span class="token punctuation">.</span>files<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">function</span> <span class="token function">setup</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token function">createCanvas</span><span class="token punctuation">(</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">draw</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token function">background</span><span class="token punctuation">(</span><span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>img<span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">image</span><span class="token punctuation">(</span>img<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> width<span class="token punctuation">,</span> height<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
<p>This looks like it makes sense to me. We set up an <code>img</code> variable that's going to either be undefined, and not be rendered. Or, it will contain image data and be displayed.</p>
<p>However, this doesnt work! We get the error <code>Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'</code>. This was really confusing to me. I tried creating <code>&lt;img&gt;</code> elements and all sorts of things to try and turn that data image string into one of these valid formats.</p>
<p>After some chat with David he explained that with p5 we need to come at the issue a different way.</p>
<h3>The Solution</h3>
<p>Here is the actual JS that works (no HTML needed). In fact, <a href="https://p5js.org/reference/#/p5/createFileInput">p5 has a file input API in it</a>, for this exact scenario.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">let</span> input<span class="token punctuation">;</span>
<span class="token keyword">let</span> img<span class="token punctuation">;</span>

<span class="token keyword">function</span> <span class="token function">setup</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token function">createCanvas</span><span class="token punctuation">(</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  input <span class="token operator">=</span> <span class="token function">createFileInput</span><span class="token punctuation">(</span>handleFile<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">draw</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token function">background</span><span class="token punctuation">(</span><span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>img<span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">image</span><span class="token punctuation">(</span>img<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> width<span class="token punctuation">,</span> height<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>

<span class="token keyword">function</span> <span class="token function">handleFile</span><span class="token punctuation">(</span><span class="token parameter">file</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  <span class="token function">print</span><span class="token punctuation">(</span>file<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>file<span class="token punctuation">.</span>type <span class="token operator">===</span> <span class="token string">"image"</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    img <span class="token operator">=</span> <span class="token function">createImg</span><span class="token punctuation">(</span>file<span class="token punctuation">.</span>data<span class="token punctuation">,</span> <span class="token string">""</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    img<span class="token punctuation">.</span><span class="token function">hide</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
    img <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
<p>This feels really counterintuitive to me, but it all makes sense when you think about the p5 lifecycle.</p>
<p>P5 starts to exist in the <code>setup()</code> function. This seems to be the main key. We let p5 create the input, rather than doing it with regular HTML. This means p5 is completely aware of the input, and can put it's own listeners on there to work with it's lifecycle.</p>
<p>The <code>handleFile()</code> callback is creating an image and then hides it. But it's now available to us to use in the context of p5.</p>
<p>Then finally, in the drawFunction, we're ready to go and show the image!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Water Surface Shader</title>
        <link>https://davidfitz.dev/pen/water-surface-shader/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/water-surface-shader/</guid>
        <pubDate>Sun Jun 25 2023 17:50:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "oNQBNaY";
    const penHeight = undefined;
    const title = "Water Surface Shader";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/oNQBNaY">Check out "Water Surface Shader" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/oNQBNaY/image/small.png"
    alt=Water Surface Shader
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Water Surface Effect</title>
        <link>https://davidfitz.dev/pen/water-surface-effect/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/water-surface-effect/</guid>
        <pubDate>Mon Jun 19 2023 08:07:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "VwVjwGB";
    const penHeight = undefined;
    const title = "Water Surface Effect";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/VwVjwGB">Check out "Water Surface Effect" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/VwVjwGB/image/small.png"
    alt=Water Surface Effect
  />
</div>
<p>Feeling summery!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Formula1 Outlines Text</title>
        <link>https://davidfitz.dev/pen/formula-one-outlines-text/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/formula-one-outlines-text/</guid>
        <pubDate>Sat Jun 17 2023 20:38:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "poQydRJ";
    const penHeight = undefined;
    const title = "Formula1 Outlines Text";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/poQydRJ">Check out "Formula1 Outlines Text" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/poQydRJ/image/small.png"
    alt=Formula1 Outlines Text
  />
</div>
<p>I noticed in some of the Formula1 coverage that there was a really cool effect on some text that they show on some of their coverage. An animated text where the letters seem to be chopped into diagonal segments that have outlines making kinda of &quot;islands&quot; in them.</p>
<figure>
  <img src="/img/formula1-1.png" alt="Terrible potato quality screenshot of the effect, from that YouTube clip" style="max-width:300px; text-align: center; margin: 0 auto;">
</figure>
<p>You see this effect in the &quot;1&quot; above Max Versappens shoulder in <a href="https://youtu.be/i8fcV_CF_Rc?t=48" target="_blank">this clip on YouTube</a>.</p>
<p>This is my attempt at copying that!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Eccentric Circles</title>
        <link>https://davidfitz.dev/pen/eccentric-circles/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/eccentric-circles/</guid>
        <pubDate>Thu Jun 15 2023 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "dyQGpPx";
    const penHeight = undefined;
    const title = "Eccentric Circles";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/dyQGpPx">Check out "Eccentric Circles" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/dyQGpPx/image/small.png"
    alt=Eccentric Circles
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Magic Numbers</title>
        <link>https://davidfitz.dev/article/magic-numbers/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/magic-numbers/</guid>
        <pubDate>Mon Jun 12 2023 12:39:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>You might hear some people taling about &quot;Magic Numbers&quot; every so often. I was excited when I heard about them first! Magic Numbers sound like fun. But it's a bad kind of magic.</p>
<p>A Magic Number is a number that you're using, but you're not entirely sure what it's doing. Its effect is &quot;magic&quot;. This is a dangerous thing, because there can be unintended effects from Magic Numbers.</p>
<p>Imagine we're trying to center an item on a <code>Canvas</code>. Assuming it starts in the top left of the screen, we could nudge it down and right until it looks like it's in the center.</p>
<p>In some made up code, this might look like;</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> x <span class="token operator">=</span> <span class="token number">400</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> y <span class="token operator">=</span> <span class="token number">600</span><span class="token punctuation">;</span>
<span class="token function">drawItem</span><span class="token punctuation">(</span>x<span class="token punctuation">,</span>y<span class="token punctuation">)</span></code></pre>
<p>There are two dangers here.</p>
<ol>
<li>We dont <em>know</em> it's in the center.</li>
<li>If the user has a different size browser (eg the <code>Canvas</code> gets smaller) our item will be too far down or right, and could even leave the <code>Canvas</code> altogether!</li>
</ol>
<p>To avoid using a randomly chosen <code>x</code> and <code>y</code> value, let's be accurate. We'll assume the item is a 100 unit square.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> itemWidth <span class="token operator">=</span> <span class="token number">100</span><span class="token punctuation">;</span>

<span class="token comment">// find out the exact dimensions of the canvas</span>
<span class="token keyword">const</span> canvasBoundingRect <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">'canvas'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getBoundingClientRect</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> canvasWidth <span class="token operator">=</span> canvasBoundingRect<span class="token punctuation">.</span>width<span class="token punctuation">;</span>
<span class="token keyword">const</span> canvasHeight <span class="token operator">=</span> canvasBoundingRect<span class="token punctuation">.</span>height<span class="token punctuation">;</span>

<span class="token comment">// use the information we now have about the item and canvas to make accurate calculations</span>
<span class="token keyword">const</span> x <span class="token operator">=</span> <span class="token punctuation">(</span>canvasWidth <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token punctuation">(</span>itemWidth <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> y <span class="token operator">=</span> <span class="token punctuation">(</span>canvasHeight <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token punctuation">(</span>itemWidth <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// draw the item in the center</span>
<span class="token function">drawItem</span><span class="token punctuation">(</span>x<span class="token punctuation">,</span>y<span class="token punctuation">)</span></code></pre>
<p>Here, taking <code>x</code> as the example, we get <code>CanvasWidth</code> and divide by two. This gives us the exact center of the Canvas. Then, because our item is drawn from the top left corner, we remove half of it's width (<code>itemWidth</code>), meaning that when it's drawn, it'll be exactly in the center of the screen.</p>
<p>This is a small example, but it's important to look at the numbers in your app and try to understand why they're there. You will develop a kind of &quot;code smell&quot; for these numbers in time.</p>
<p>For example</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> itemCount <span class="token operator">=</span> <span class="token number">5</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> leftNudge <span class="token operator">=</span> <span class="token number">127</span><span class="token punctuation">;</span></code></pre>
<p>Here you might understand what <code>itemCount</code> is. It's the amount of things we want to show on the screen. But <code>leftNudge</code>? I'm not entirely sure what that's for, and 127 doesnt look like a number someone might know intuitively. That <code>leftNudge</code> variable feels like it might be a Magic Number.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Quick Color Themes</title>
        <link>https://davidfitz.dev/article/quick-color-themes/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/quick-color-themes/</guid>
        <pubDate>Sun Jun 11 2023 15:13:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>I'm not very good at color palettes. I typically reach for one from a site like <a href="https://coolors.co/">Coolors</a>.</p>
<p>A tip I got from the work of <a href="https://twitter.com/takawo">Shunsuke Takawo</a> is that each palette on Coolors has a url, eg <code>https://coolors.co/palette/ee6055-60d394-aaf683-ffd97d-ff9b85</code>.</p>
<p>Notice how the end of the url is actually the list of colors? This function will pluck those colors from the url, and pass you back an array with them in it.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> <span class="token function-variable function">getColors</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">url</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
  <span class="token keyword">return</span> url
          <span class="token punctuation">.</span><span class="token function">match</span><span class="token punctuation">(</span><span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">[a-f0-9]{6}?</span><span class="token regex-delimiter">/</span><span class="token regex-flags">gm</span></span><span class="token punctuation">)</span>
          <span class="token punctuation">.</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token parameter">c</span> <span class="token operator">=></span> <span class="token string">"#"</span><span class="token operator">+</span>c<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>Meaning you could now do something like this to get a color palette.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> url <span class="token operator">=</span> <span class="token string">"https://coolors.co/palette/ee6055-60d394-aaf683-ffd97d-ff9b85"</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> colors <span class="token operator">=</span> <span class="token function">getColors</span><span class="token punctuation">(</span>url<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>If you now use that array to edit or create your designs, you can paste in different urls to try different palettes, instead of having to copy and paste every value over! <a href="https://codepen.io/loficodes/pen/rNqgMMv/496a66a64f59ca20af72a4d8bbe4a5f5?editors=0110">Try it out in this CodePen</a>, I've added a few urls that you can comment and uncomment to see how it makes a difference.</p>
<p>One thing to not is that different palettes have a different amount of colors, you might need to account for that in your designs!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Math.random()</title>
        <link>https://davidfitz.dev/article/math-random/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/math-random/</guid>
        <pubDate>Sun Jun 11 2023 14:28:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>I'm starting a new vibe here with LoFi. I want to share smaller, more bit-sized pieces of information. Little nuggets that'll hopefully help you with your creative coding.</p>
<p>Creative coding tends to mean that you'll use some different skills to UI development, but also potentially pieces of JavaScript that you havent used before. The champ of these JavaScript APIs is <code>Math</code>. And within <code>Math</code>, <code>random()</code> is king!</p>
<p><code>Math.random()</code> only does one the, return a random number between 0-1. It's as simple as this.</p>
<pre class="language-js"><code class="language-js"><span class="token comment">// assigns a random number to num</span>
<span class="token comment">// eg: 0.6547161150703487</span>
<span class="token keyword">const</span> num <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">random</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>That might not sound like a lot, but you can do one or two more things to get any random number you want! Need a random number between 0-10, just multiply by 10.</p>
<pre class="language-js"><code class="language-js"><span class="token comment">// assigns a random number to num</span>
<span class="token comment">// eg: 8.558616898572417</span>
<span class="token keyword">const</span> num <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">random</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">*</span> <span class="token number">10</span><span class="token punctuation">;</span></code></pre>
<p>You might notice that this is a <code>float</code>, or a number with a decimal in normal language. Want those decimals to go away? Add a <code>Math.floor()</code>.</p>
<pre class="language-js"><code class="language-js"><span class="token comment">// assigns a random number to num</span>
<span class="token comment">// eg: 3</span>
<span class="token keyword">const</span> num <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">floor</span><span class="token punctuation">(</span>Math<span class="token punctuation">.</span><span class="token function">random</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">*</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>It's important to note here that this will only ever return the numbers 0 - 9. This is because we're flooring, rather than rounding. This comes in really handy when trying to pick a random item from an array.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> arr <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">"Paul"</span><span class="token punctuation">,</span><span class="token string">"John"</span><span class="token punctuation">,</span><span class="token string">"George"</span><span class="token punctuation">,</span><span class="token string">"Ringo"</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

<span class="token comment">// assigns a random number to num</span>
<span class="token keyword">const</span> num <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">floor</span><span class="token punctuation">(</span>Math<span class="token punctuation">.</span><span class="token function">random</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">*</span> arr<span class="token punctuation">.</span>length<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// assigns a random item to musician</span>
<span class="token comment">// eg: 'George'</span>
<span class="token keyword">const</span> musician <span class="token operator">=</span> arr<span class="token punctuation">[</span>num<span class="token punctuation">]</span><span class="token punctuation">;</span></code></pre>
<p>We can already get a number between 0-10, but what if we wanted a number between 5-10? First, we would need to get a number between 0-5, then simply add 5.</p>
<pre class="language-js"><code class="language-js"><span class="token comment">// assigns a random number to num</span>
<span class="token comment">// eg: 'George'</span>
<span class="token keyword">const</span> num <span class="token operator">=</span> <span class="token punctuation">(</span>Math<span class="token punctuation">.</span><span class="token function">random</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">*</span> <span class="token number">5</span><span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token number">5</span><span class="token punctuation">;</span></code></pre>
<p>This isnt very intuitive at first. We do two things, get a random number of the max - min, then after we add the min again. Putting that all into a function, we get.</p>
<pre class="language-js"><code class="language-js"><span class="token keyword">const</span> <span class="token function-variable function">rand</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">max <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">,</span> min <span class="token operator">=</span> <span class="token number">0</span></span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
  <span class="token keyword">return</span> <span class="token punctuation">(</span>Math<span class="token punctuation">.</span><span class="token function">random</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">*</span> <span class="token punctuation">(</span>max<span class="token operator">-</span>min<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token operator">+</span> min<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">// assigns a random number to num</span>
<span class="token comment">// eg: 6.255813315992315</span>
<span class="token keyword">const</span> num <span class="token operator">=</span> <span class="token function">rand</span><span class="token punctuation">(</span><span class="token number">10</span><span class="token punctuation">,</span><span class="token number">5</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
<p>Why max first? Most often you'll just need a number between 0-max, so this way we can only set max if we like.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Liquid Chequers</title>
        <link>https://davidfitz.dev/pen/liquid-chequers/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/liquid-chequers/</guid>
        <pubDate>Thu Jun 08 2023 11:58:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "mdQyEWP";
    const penHeight = undefined;
    const title = "Liquid Chequers";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/mdQyEWP">Check out "Liquid Chequers" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/mdQyEWP/image/small.png"
    alt=Liquid Chequers
  />
</div>
<p>Based on <a href="https://www.pinterest.ie/pin/280208408059026840/">this cool doodle I saw</a>.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Unintentionally Creepy Circles</title>
        <link>https://davidfitz.dev/pen/unintentionally-creepy-circles/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/unintentionally-creepy-circles/</guid>
        <pubDate>Mon May 22 2023 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "gOBZKaZ";
    const penHeight = undefined;
    const title = "Unintentionally Creepy Circles";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/gOBZKaZ">Check out "Unintentionally Creepy Circles" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/gOBZKaZ/image/small.png"
    alt=Unintentionally Creepy Circles
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Doodle</title>
        <link>https://davidfitz.dev/pen/doodle-4/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/doodle-4/</guid>
        <pubDate>Wed May 17 2023 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "poxxozO";
    const penHeight = undefined;
    const title = "Doodle";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/poxxozO">Check out "Doodle" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/poxxozO/image/small.png"
    alt=Doodle
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>My Thoughts on AI</title>
        <link>https://davidfitz.dev/article/my-thoughts-on-ai/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/my-thoughts-on-ai/</guid>
        <pubDate>Fri May 05 2023 07:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>AI is the big buzz word around at the moment. It's been on the front of newspapers and magazines, almost everyone has at least heard mention of it. It's &quot;The Next Big Thing™️&quot;.</p>
<p>As with anything that's The Next Big Thing, there's excitement and benefits, but also worry and liabilities. I want to take a little time and explain where I sit on the spectrum.</p>
<h3>Benefits</h3>
<p>Admittedly there are huge benefits to be excited about. What AI does is <em>incredible</em> both as an astonishing piece of computer science, but also in what it enables.</p>
<p><strong>Generation</strong></p>
<p>Obviously the biggest benefit is what AI can generate. It's a modern miracle that we can type in short prompts and get <a href="https://www.instagram.com/openaidalle/">incredible imagery</a> back, or ask it to write text for us that might help us to <a href="https://builtin.com/artificial-intelligence/chatgpt-examples">prepare for a job interview, play games or cook</a>.</p>
<p><strong>Innovations</strong></p>
<p>Using Neural Networks we're likely to see innovations in processes. In medicine alone it could <a href="https://www.nature.com/articles/s41591-021-01614-0">improve image analysis, speeding up and improving the accuracy diagnoses</a>.</p>
<p><strong>Conceptual Compression</strong></p>
<p>It used to be that, to make a really interesting and attractive artwork, you had two options. First, you could spend years learning the medium and crafting the art yourself. Alternatively, you could hire someone with those skills to create the piece for you, at a cost.</p>
<p>With AI, you can now access the <em>results</em> of that task, without needing to engage with anyone who has the skills. This is amazing. Word did this with spellchecking, Google Maps for navigation.</p>
<p>It's truly useful for the user when a complex concept can be compressed and abstracted to a point that they can avail of the results without needing any knowledge of the complexity of the process.</p>
<h3>Liabilities</h3>
<p>I've started with the benefits to make sure that you, dear reader, see that I can see what is good about AI. I truly understand that there are benefits to individuals and society in AI existing. My question for you is, do they outweigh the liabilities.</p>
<p><strong>Copyright and consent</strong></p>
<p>Let's get this out of the way immediately. We don't know where these AI companies are sourcing the content that they use to train their models. <a href="https://www.washingtonpost.com/technology/interactive/2023/ai-chatbot-learning/">Washington Post journalists have put in work to see where some AI's sourced their material</a>.</p>
<p>The argument from AI supporters here is that the information is publicly available. This is undeniably true. You can visit most of these sites and read all their content for free. But remember these are businesses.</p>
<p>A business needs to make money to survive. Typically for online publications that's achieved through subscriptions or advertising. This only works if you visit the site and see the ad. Typically chat based AI will give an answer on a topic, but without any attribution to the source. This means that the people who created the content cannot monetise it.</p>
<p><em>Note: for the next section, it's important to know I work for MediaHuis, owners of the largest set of news publications in Ireland and my job depends on advertising.</em></p>
<p>This might seem like a small thing, but many users already get some of their news from AI. They will ask about a topic, and for more elaboration on it. This directly hits the profitability of an industry that is already struggling.</p>
<p>Not only does AI affect advertising supported publications from surviving, but it also affects artists whose work needs to be promoted so they can be hired to make a living. The Washington Post report above shows that many of the biggest sites for designers to show their wares (Behance, DeviantArt, Dribbble) have been scraped for AI. You can now access the combined skills of all artists on these sites, without needing to pay those artists who only have the content up there to try and promote themselves.</p>
<p>All of this is done without consent. The models have been created. There's no opt out, there's no clarity that your labour has been included, and your ability to make money impacted.</p>
<p>At the <em>very</em> least this needs international government oversight, or to be made illegal without an ability to opt out.</p>
<p>You can hear more info on this from <a href="https://shoptalkshow.com/563/#t=09:30">the latest episode of ShopTalkShow</a>.</p>
<p><strong>Bias</strong></p>
<p>This is a big one for society.</p>
<p>Who are choosing the sites, what are their biases? Humans are so bad at recognising their own biases that there's a term for it, <a href="https://en.wikipedia.org/wiki/Bias_blind_spot">bias blond spot</a>. AI tools are being used internationally, but created by a small amount of people. There's no way to ensure that these people are completely without bias, and again that Washington Post article shows that many of the sites have huge bias.</p>
<p>What are the biases of the datasets? This is unknowable. But, given that people have managed to create <a href="https://gizmodo.com/why-cant-this-soap-dispenser-identify-dark-skin-1797931773">racist hand dryers</a> it seems impossible that large language models wont have some issues.</p>
<p><strong>Accuracy</strong></p>
<p>By the very definition of the &quot;generative&quot; in Generative Pre-trained Transformer (GPT), AIs start from a conceptual blur, and generate likely outcomes towards something with enough fidelity to appear to humans as if the content was created by another human. This is all blurry and fuzzy initially. AI does not understand the concepts or ideas it is working on, it's just creating a likely artifact, given the model it is trained on.</p>
<p>What does that mean? Well, when you ask it to create a legal document, it has no idea about the law. It's purely guessing, doing an impression of a legal document. It doesn't know the laws of your country. People are already getting into trouble with <a href="https://www.businessinsider.com/robot-lawyer-ai-donotpay-sued-practicing-law-without-a-license-2023-3?r=US&IR=T">AI lawyers</a>.</p>
<p>Purely anecdotally, I've noticed that my friends and colleagues who use it often seem to trust the results too much. As if ChatGPT has done research for them.</p>
<p>This misunderstanding is very dangerous. It could muddy knowledge as the AI generated content, published by humans, becomes reference material. This erodes the scientific method and society's ability to build upon itself.</p>
<p><strong>Experiential knowledge</strong></p>
<p>When it comes to creating knowledge too, I can already see friends and colleagues being deferential to AI. How did they come to a conclusion that this or that idea is correct? &quot;AI said so&quot;. They are receiving knowledge (again, by definition, inaccurate knowledge) from an AI and taking it as fact. They have put no effort into <em>understanding</em> the knowledge, they have not applied it and gained any experience as to whether the knowledge is correct or not.</p>
<p>This trend will lead, if it continues, would lead to people not understanding why they do things the way they do, and huge skillsets being lost.</p>
<p><strong>Unknown social impact</strong></p>
<p>I'm old enough to have known a time before Social Media and after. There's so much research out there about the negative impacts of Social Media that we only realised years later. We have no idea what the impacts of AI are, and my fear is that they'll be bigger.</p>
<p>Social Media, being social, had direct effects on how we communicate together personally. It then had further effects on society at large.</p>
<p>AI is affecting how we communicate together in every setting, how work is done, and how the world is understood. It's potentially bigger than Social Media, and its effects could be too.</p>
<p><strong>Environment</strong></p>
<p>This is a massive one not spoken about enough. <a href="https://www.datacenterdynamics.com/en/news/as-openai-releases-gpt-4-microsoft-details-azure-ai-infrastructure-behind-it/">AI requires some HUGE computing power</a>.</p>
<p>Have you noticed that most AI only runs through web interfaces? That's because the power required to run a model cant run on most peoples devices.</p>
<p>Have you noticed that those services are often overwhelmed? Even using Microsoft's Azure cloud infrastructure ChatGPT and DallE are still often over capacity.</p>
<p>We don't know the impact here, but it's significant enough to bottleneck one of the largest cloud infrastructure providers on the planet regularly.</p>
<p><strong>Free</strong></p>
<p>At the moment, most AI tools are free, at least to try. This sets the expectation on the user that using AI is cheap. It's not though, we're being used to further train the models, and to create a reliance on the tools.</p>
<p>Additionally, I worry that when the big companies start charging for their AI tools (which is inevitable), people will create less well monitored bootleg AIs that will be more likely to suffer from the liabilities above.</p>
<h3>Conclusion</h3>
<p>AI is amazing and we should absolutely take advantage of it. But only where we can understand its effects. For example in medical research or analysis. If we can show it's quick and accurate in making assessments, saving a doctor time and allowing them to first confirm the AI's diagnosis, then great.</p>
<p>Otherwise, we should come at this with an abundance of caution. I support the various leaders out there who have said progress should stop on AI for now, till we understand it better. I also believe it needs to be incredibly closely regulated, internationally.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Messy Lines</title>
        <link>https://davidfitz.dev/pen/messy-lines/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/messy-lines/</guid>
        <pubDate>Tue May 02 2023 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "OJBxoxq";
    const penHeight = undefined;
    const title = "Messy Lines";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/OJBxoxq">Check out "Messy Lines" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/OJBxoxq/image/small.png"
    alt=Messy Lines
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Mirror Shapes</title>
        <link>https://davidfitz.dev/pen/mirror-shapes/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/mirror-shapes/</guid>
        <pubDate>Wed Feb 08 2023 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "WNKBJLa";
    const penHeight = undefined;
    const title = "Mirror Shapes";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/WNKBJLa">Check out "Mirror Shapes" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/WNKBJLa/image/small.png"
    alt=Mirror Shapes
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Liquid Shot</title>
        <link>https://davidfitz.dev/pen/liquid-shot/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/liquid-shot/</guid>
        <pubDate>Sat Dec 03 2022 15:45:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "VwdVmJJ";
    const penHeight = undefined;
    const title = "Liquid Shot";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/VwdVmJJ">Check out "Liquid Shot" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/VwdVmJJ/image/small.png"
    alt=Liquid Shot
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Redesign 2022 - the move to Astro</title>
        <link>https://davidfitz.dev/article/redesign-2022-the-move-to-astro/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/redesign-2022-the-move-to-astro/</guid>
        <pubDate>Thu Nov 24 2022 20:15:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>It's only a few weeks till LoFi's 4th anniversary. It's' time for a redesign!</p>
<p>I've tried to bring in a little more color, but still keep things simple. I hope you like it.</p>
<p>There are also new adventures are afoot. I've been running out of steam with specifically just ThreeJS content. I'll be going more into the basics of creative coding. Stay tuned in, hopefully, January for the next piece of the puzzle!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Making a Fish Swim</title>
        <link>https://davidfitz.dev/talk/making-a-fish-swim/</link>
        <guid isPermaLink="true">https://davidfitz.dev/talk/making-a-fish-swim/</guid>
        <pubDate>Tue Jan 25 2022 17:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>Had great fun on FrontEnd Horse with Alex Trost!</p>
<p>Here's the video on YouTube:</p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/NH4rSzHLCp4?autoplay=1'>
      <img src='https://img.youtube.com/vi/NH4rSzHLCp4/sddefault.jpg' />
      Watch Making a Fish Swim on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/NH4rSzHLCp4?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/NH4rSzHLCp4/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="Making a Fish Swim"
    name="Making a Fish Swim"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Christmas Wreath</title>
        <link>https://davidfitz.dev/pen/christmas-wreath/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/christmas-wreath/</guid>
        <pubDate>Thu Dec 23 2021 19:34:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "mdBBvwG";
    const penHeight = undefined;
    const title = "Christmas Wreath";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/mdBBvwG">Check out "Christmas Wreath" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/mdBBvwG/image/small.png"
    alt=Christmas Wreath
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Dynamic Sounds</title>
        <link>https://davidfitz.dev/pen/sounds/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/sounds/</guid>
        <pubDate>Sun Nov 21 2021 08:30:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "porQPpO";
    const penHeight = undefined;
    const title = "Dynamic Sounds";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/porQPpO">Check out "Dynamic Sounds" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/porQPpO/image/small.png"
    alt=Dynamic Sounds
  />
</div>
<p>Having a little play with sounds. I've never really had a go of anything producting sound creatively before. A fun little beginning!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>QuadTree Cubes</title>
        <link>https://davidfitz.dev/pen/quadtree-cubes/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/quadtree-cubes/</guid>
        <pubDate>Mon Aug 09 2021 08:30:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "GRmwVYN";
    const penHeight = undefined;
    const title = "QuadTree Cubes";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/GRmwVYN">Check out "QuadTree Cubes" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/GRmwVYN/image/small.png"
    alt=QuadTree Cubes
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Nightmare Men</title>
        <link>https://davidfitz.dev/pen/nightmare-men/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/nightmare-men/</guid>
        <pubDate>Mon Jul 12 2021 21:37:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "gOWLzjb";
    const penHeight = undefined;
    const title = "Nightmare Men";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/gOWLzjb">Check out "Nightmare Men" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/gOWLzjb/image/small.png"
    alt=Nightmare Men
  />
</div>
<p>This one is dedicated to Ian Hubert and his <a href="https://www.youtube.com/watch?v=bgfJIZEDY44">Nightmare Men tutorial</a></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>McLaren MP4/5</title>
        <link>https://davidfitz.dev/pen/mclaren-mp4-5/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/mclaren-mp4-5/</guid>
        <pubDate>Wed Jul 07 2021 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "BaRzBWP";
    const penHeight = undefined;
    const title = "McLaren MP4/5";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/BaRzBWP">Check out "McLaren MP4/5" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/BaRzBWP/image/small.png"
    alt=McLaren MP4/5
  />
</div>
<p>This one I actually did a few months ago, but never uploaded.</p>
<p>The model I made myself, playing with <a href="https://www.vectary.com/">Vectrary</a>.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Zebra Stripes</title>
        <link>https://davidfitz.dev/pen/zebra-stripes/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/zebra-stripes/</guid>
        <pubDate>Sat May 15 2021 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "jOBrZWm";
    const penHeight = undefined;
    const title = "Zebra Stripes";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/jOBrZWm">Check out "Zebra Stripes" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/jOBrZWm/image/small.png"
    alt=Zebra Stripes
  />
</div>
<p>Just a fun one!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>WriggleLoop</title>
        <link>https://davidfitz.dev/pen/wriggleloop/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/wriggleloop/</guid>
        <pubDate>Thu Apr 29 2021 19:21:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "ExZzdVO";
    const penHeight = undefined;
    const title = "WriggleLoop";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/ExZzdVO">Check out "WriggleLoop" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/ExZzdVO/image/small.png"
    alt=WriggleLoop
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Fish</title>
        <link>https://davidfitz.dev/pen/fish/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/fish/</guid>
        <pubDate>Sat Feb 20 2021 14:47:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "abByYXQ";
    const penHeight = undefined;
    const title = "Fish";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/abByYXQ">Check out "Fish" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/abByYXQ/image/small.png"
    alt=Fish
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Andy and Marilyn</title>
        <link>https://davidfitz.dev/pen/andy-and-marilyn/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/andy-and-marilyn/</guid>
        <pubDate>Wed Jan 13 2021 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "poEqLwK";
    const penHeight = 0;
    const title = "Andy and Marilyn";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/poEqLwK">Check out "Andy and Marilyn" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/poEqLwK/image/small.png"
    alt=Andy and Marilyn
  />
</div>
<p><codepen></codepen></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Voronoi destruction image carousel</title>
        <link>https://davidfitz.dev/pen/voronoi-destruction-image-carousel/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/voronoi-destruction-image-carousel/</guid>
        <pubDate>Sun Dec 27 2020 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "JjRPeWw";
    const penHeight = undefined;
    const title = "Voronoi destruction image carousel";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/JjRPeWw">Check out "Voronoi destruction image carousel" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/JjRPeWw/image/small.png"
    alt=Voronoi destruction image carousel
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Spiral Dots Car</title>
        <link>https://davidfitz.dev/pen/spiral-dots-car/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/spiral-dots-car/</guid>
        <pubDate>Sat Nov 21 2020 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "VwjNEXv";
    const penHeight = undefined;
    const title = "Spiral Dots Car";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/VwjNEXv">Check out "Spiral Dots Car" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/VwjNEXv/image/small.png"
    alt=Spiral Dots Car
  />
</div>
<p>A doodle playing with images and pixels.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>ThreeJS - three ways</title>
        <link>https://davidfitz.dev/article/threejs-three-ways/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/threejs-three-ways/</guid>
        <pubDate>Sun Nov 15 2020 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
              <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/9fUEuxxMKCs?autoplay=1'>
      <img src='https://img.youtube.com/vi/9fUEuxxMKCs/sddefault.jpg' />
      Watch ThreeJS - three ways on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/9fUEuxxMKCs?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/9fUEuxxMKCs/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="ThreeJS - three ways"
    name="ThreeJS - three ways"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>
<p>It can be hard to know how to get ThreeJS examples with imports working sometimes.</p>
<p>The ThreeJS docs work based on the entire ThreeJS repo, not what you want in production. Parcel expects you to work in a Node environment. Rollup expects you to work in a Node environment, but deploy in a HTML environment. Vanilla JS expects a completely html environment.</p>
<p>This guide, while not perfect, should get you at least working in any of those setups.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Prettier and Svelte issues</title>
        <link>https://davidfitz.dev/article/prettier-and-svelte-issues/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/prettier-and-svelte-issues/</guid>
        <pubDate>Fri Nov 06 2020 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>I've been finding a lot of late that my <code>svelteSortOrder</code> settings have been getting knocked out of place. I know it's only a small thing but I cant stand when styles are between the script tag and HTML.</p>
<p>I've been changing my settings in my VSCode settings.json like this:</p>
<pre class="language-js"><code class="language-js"><span class="token string-property property">"editor.defaultFormatter"</span><span class="token operator">:</span> <span class="token string">"esbenp.prettier-vscode"</span>
<span class="token string-property property">"[svelte]"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
  <span class="token string-property property">"editor.defaultFormatter"</span><span class="token operator">:</span> <span class="token string">"svelte.svelte-vscode"</span>
<span class="token punctuation">}</span></code></pre>
<p>In the root of any folder, this .prettierrc</p>
<pre class="language-js"><code class="language-js"><span class="token punctuation">{</span> <span class="token string-property property">"svelteSortOrder"</span><span class="token operator">:</span> <span class="token string">"scripts-markup-styles"</span> <span class="token punctuation">}</span></code></pre>
<p>Thanks to the <a href="https://twitter.com/sveltejs">@sveltejs</a> discord. I've figured out the &quot;turn it off and on again&quot; solution for this issues that is.</p>
<ul>
<li>Delete both the Prettier and Svelte VSCode extensions</li>
<li>Restart VSCode and reinstalled extensions</li>
<li>Restart VSCode and it's working!</li>
</ul>
<p>Hopefully this is useful for someone, and thanks to <a href="https://twitter.com/SvelteSociety">@SvelteSociety</a> for the kick to blog it!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Riverside v2</title>
        <link>https://davidfitz.dev/pen/riverside-v2/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/riverside-v2/</guid>
        <pubDate>Mon Oct 26 2020 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "vYKxRMr";
    const penHeight = undefined;
    const title = "Riverside v2";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/vYKxRMr">Check out "Riverside v2" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/vYKxRMr/image/small.png"
    alt=Riverside v2
  />
</div>
<p>I've been slowly getting the hang of creative coding. recreating a nature look seems to be what I'm qualifying as quality as I'm learning.</p>
<p>I started with a forest that was <a href="https://davidfitz.dev/post/xmas-forrest">just some 2D rotations</a>, eventually getting to <a href="https://davidfitz.dev/post/riverside-v1-p5js">something a little more 3D</a>.</p>
<p>What amazes me in by learning here is how much more I've learned since the last attempt, but how little progress it truly looks like.</p>
<p>I feel there's a point coming where things will really click into place though, and I'mve very happy with how much I've learned to get this far.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Dice Roller</title>
        <link>https://davidfitz.dev/pen/dice-roller/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/dice-roller/</guid>
        <pubDate>Thu Oct 22 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "KKMNQqb";
    const penHeight = undefined;
    const title = "Dice Roller";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/KKMNQqb">Check out "Dice Roller" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/KKMNQqb/image/small.png"
    alt=Dice Roller
  />
</div>
<p>Found myself without dice, these are a backup just in case!</p>
<p>Could be good to add options for the amount of dice, and the numbers on them?</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Chihuly</title>
        <link>https://davidfitz.dev/pen/chihuly/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/chihuly/</guid>
        <pubDate>Sat Oct 10 2020 18:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "YzWXyBY";
    const penHeight = undefined;
    const title = "Chihuly";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/YzWXyBY">Check out "Chihuly" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/YzWXyBY/image/small.png"
    alt=Chihuly
  />
</div>
<p>I've been fascinated by Dale Chihuly and his fascinating art for a while. This was a very rudimentary attempt at something like that.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Fire Circle</title>
        <link>https://davidfitz.dev/pen/fire-circle/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/fire-circle/</guid>
        <pubDate>Thu Oct 01 2020 13:30:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "eYzNYQN";
    const penHeight = undefined;
    const title = "Fire Circle";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/eYzNYQN">Check out "Fire Circle" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/eYzNYQN/image/small.png"
    alt=Fire Circle
  />
</div>
<p>While trying to do something else entirely, I made a mistake in my shader. Put in '2.' instead of '.2'.</p>
<p>This was the sirprising and delightful result! An amazing <a href="http://davidfitz.dev/article/happy-accidents/">happy accident</a>!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Seven Nation Army - GSAP</title>
        <link>https://davidfitz.dev/pen/seven-nation-army-gsap/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/seven-nation-army-gsap/</guid>
        <pubDate>Tue Sep 22 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "bGpOqmp";
    const penHeight = undefined;
    const title = "Seven Nation Army - GSAP";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/bGpOqmp">Check out "Seven Nation Army - GSAP" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/bGpOqmp/image/small.png"
    alt=Seven Nation Army - GSAP
  />
</div>
<p>My former colleague <a href="https://codepen.io/collection/nNwWrk">Pete has been doing an amazing series of Swissted GSAP animations over the last few months</a>.</p>
<p>I've been spending more of my time checking out ThreeJS and P5, but finally bit the bullet tonight to try some GSAP, and it's amazing! It's pretty straighforward, I've just been working off of the docs, havent needed to Google anything yet, and I've made something I'm pretty happy with.</p>
<p>I do know that I've gone quite simple here. There's very little that hasnt been planned to avoid trouble, but still, I wouldnt have thought I could get this done in a night when I started it!</p>
<p>Definitely give GSAP a try and have some fun!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Sunset - threejs</title>
        <link>https://davidfitz.dev/pen/sunset-threejs/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/sunset-threejs/</guid>
        <pubDate>Sat Sep 19 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "LYNXYYW";
    const penHeight = undefined;
    const title = "Sunset - threejs";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/LYNXYYW">Check out "Sunset - threejs" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/LYNXYYW/image/small.png"
    alt=Sunset - threejs
  />
</div>
<p>Saw <a href="https://mobile.twitter.com/abduzeedo/status/1303192186989674497">a tweet from @abdz</a> where they made a sunset messing with Blender. I wanted to try someting similar in ThreeJS. What really interested me was if I could do reflections, or if there needed to be a trick.</p>
<p>Turns out there's no trickery needed, there's a reflector class in Three! The docs arent great, but you can get into it from <a href="https://threejs.org/examples/?q=reflection#webgl_mirror">the mirror example</a>.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Golden Triangle</title>
        <link>https://davidfitz.dev/pen/golden-triangle/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/golden-triangle/</guid>
        <pubDate>Mon Sep 14 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "yLOqoNj";
    const penHeight = undefined;
    const title = "Golden Triangle";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/yLOqoNj">Check out "Golden Triangle" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/yLOqoNj/image/small.png"
    alt=Golden Triangle
  />
</div>
<p>A doodle mainly for fun!</p>
<p>Based on: <a href="https://www.pinterest.ie/pin/623115298437304643/">pin</a></p>
<p>Texture from: <a href="https://w-dog.pw/android-wallpapers/15/10/446991157116815/gold-texture-golden-background.jpg">here</a></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Race Car - Postprocessing</title>
        <link>https://davidfitz.dev/pen/race-car-postprocessing/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/race-car-postprocessing/</guid>
        <pubDate>Fri Sep 04 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "oNxpjxB";
    const penHeight = undefined;
    const title = "Race Car - Postprocessing";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/oNxpjxB">Check out "Race Car - Postprocessing" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/oNxpjxB/image/small.png"
    alt=Race Car - Postprocessing
  />
</div>
<p>Ever since I saw this picture originally, I've wanted to find out how to copy it, but with race cars! And now I've figured it out!</p>
<p><img src="/media/el9d2k-xsaaf6zf.jpg" alt="3D pigs"></p>
<p>Unfortunately I cant find the original source, I stupidly just saved the image, not the tweet. Any help here would be welcome!</p>
<p>The steps in the end are reasonably easy. Import a model of what ever you want. I found <a href="https://sketchfab.com/3d-models/low-poly-formula-1-sf15-00daa729672e477daee6f11f895cfa7d#download">this cool F1 car model</a>. Set it up in a grid, and then comes the magic, shaders!</p>
<p>It took me a while to first learn that shaders werent just for your models, the can be put on your scene too. To do this you need EffectComposer (seems to hold the result of your effects) and RenderPass which gets your original view.</p>
<p>Now that you have a view (RenderPass) stored in a composer (EffectComposer), you can do ShaderPasses. This is where the magic happens.</p>
<p>For this effect I'm running the default Threejs LuminosityShader and SobelOperatorShader shaders, then a little custom one just to flip the black and white. Job done!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Sketched 3D tree</title>
        <link>https://davidfitz.dev/pen/sketched-3d-tree/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/sketched-3d-tree/</guid>
        <pubDate>Fri Aug 28 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "mdPwMWO";
    const penHeight = undefined;
    const title = "Sketched 3D tree";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/mdPwMWO">Check out "Sketched 3D tree" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/mdPwMWO/image/small.png"
    alt=Sketched 3D tree
  />
</div>
<p><a href="https://twitter.com/ralphammer">Ralph Ammer</a> is an incredible writer, artist and more. Looking through his site recently I found this picture in <a href="https://ralphammer.com/art/naturals/">his naturals series</a>.</p>
<p><img src="/media/disziplin_1000.webp" alt="Ralphs amazing sketched tree"></p>
<p>I loved the style and thought it might suit an experiemnt in learning more about shaders.</p>
<p>What I've learned in this sketch is the following:</p>
<ul>
<li>It's much easier to work with Three.js by using Parcel ( hat tip to <a href="https://twitter.com/akella">Yuri Artyukh</a> for <a href="https://www.youtube.com/playlist?list=PLswdBLT9llbheHhZdGNw9RehJP1kvpMHY">his incredible weekly live coding sessions</a> for teaching me this ).</li>
<li><a href="https://dust3d.org/">Dust3D</a> is easier for me than Blender. I'm still terrible at it, but I feel like I can get somewhere with it, whereas I dont have the time or interest in learning Blender fully. I'm only really every looking for low poly stuff.</li>
</ul>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Bees and Bombs 14 Aug 2020</title>
        <link>https://davidfitz.dev/pen/bees-and-bombs-14-aug-2020/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/bees-and-bombs-14-aug-2020/</guid>
        <pubDate>Sun Aug 23 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "QWNdYpN";
    const penHeight = undefined;
    const title = "Bees and Bombs 14 Aug 2020";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/QWNdYpN">Check out "Bees and Bombs 14 Aug 2020" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/QWNdYpN/image/small.png"
    alt=Bees and Bombs 14 Aug 2020
  />
</div>
<p>I love <a href="https://mobile.twitter.com/beesandbombs">@dave🐝💣</a>'s gifs on Twitter. They're
always so interesting, and have these fun little tricks for the eye.</p>
<p>Today's gif he popped up looked like something I could actually fathom doing in code, so here it is!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>The least technical next step</title>
        <link>https://davidfitz.dev/article/the-least-technical-next-step/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/the-least-technical-next-step/</guid>
        <pubDate>Thu Jul 09 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>So much of our work is coming up with something that's new. Something that's <em>incredible</em>.</p>
<p>I find more and more that the best next step to make is the least technical.</p>
<p>You're doing something with JS that could be done with CSS? Do that next.</p>
<p>You're thinking about learning a new JS framework to add something you're not sure users will need? Instead, what if you just improved the HTML in something existing for accessibility?</p>
<p>You have an awkward process with another team, so you're going to add in a technical solution to try and keep things neat? It's almost always easier to just have a conversation with the other team and explain how you can work better together.</p>
<p>Forget new, forget more complicated. What's the least technical next step you can make?</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Tweet Design #3 - Bokeh</title>
        <link>https://davidfitz.dev/pen/tweet-design-3-bokeh/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/tweet-design-3-bokeh/</guid>
        <pubDate>Sat Jul 04 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "WNrMEBP";
    const penHeight = undefined;
    const title = "Tweet Design #3 - Bokeh";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/WNrMEBP">Check out "Tweet Design #3 - Bokeh" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/WNrMEBP/image/small.png"
    alt=Tweet Design #3 - Bokeh
  />
</div>
<p>Havent really done any creative coding in a while, so this was just a happy little Sunday design!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Flower</title>
        <link>https://davidfitz.dev/pen/flower/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/flower/</guid>
        <pubDate>Sat Jun 06 2020 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "XWXbxJo";
    const penHeight = undefined;
    const title = "Flower";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/XWXbxJo">Check out "Flower" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/XWXbxJo/image/small.png"
    alt=Flower
  />
</div>
<p>A quick doodle based on the golden angle</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Digital Litter - how to remove 99% of your emails in an evening</title>
        <link>https://davidfitz.dev/article/digital-litter-how-to-remove-99-of-your-emails-in-an-evening/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/digital-litter-how-to-remove-99-of-your-emails-in-an-evening/</guid>
        <pubDate>Fri May 01 2020 11:21:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>I love Gerry McGovern. Not only does he make a lot of sense, but he gets you fired up about it!</p>
<p>His latest chat on <a href="https://shoptalkshow.com/413/">ShopTalkShow</a> Gerry points out that we have lots and lots of files, often on the cloud, that we dont use. These files actually need to sit on a physical server somewhere, even if it is &quot;on the cloud&quot;, that cloud is make up of many real boxes.</p>
<p>The issue here is that these boxes have a cost on the environment. They take up space, and they require energy. All our unused files on there are essentially just Digital Litter. Think about it, do you still need all those Bebo emails from 2008 telling you that someone wrote on your wall?</p>
<p>This idea blew my mind. Taking a look at my Gmail account alone though, I could see this was true, I had 5.94GB of emails built up since 2005. Just emails!</p>
<p>To see what effect I could have on this number, I took the following steps:</p>
<ol>
<li>Delete all emails with a sender address starting with noreply@, do-not-reply@, info@</li>
<li>Delete all emails with attachments that are not currently starred</li>
<li>Delete all emails over 500kb</li>
<li>Delete all emails recieved before this year</li>
<li>Go to the Trash and empty all the above delted emails</li>
</ol>
<p>This took my Gmail size from 5.94GB to 0.01GB, a 99% reduction! And that's with almost no effort, in one day! Sure it's small, but imagine we all did this, on every &quot;cloud&quot; service?!</p>
<p>The bigger point Gerry was making too, for web developers, was how can we design platforms that dont even lead to users doing this?</p>
<p>If you want to try it yourself I would do my steps above, but in the order 4, 3, 2, 1, 5.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Scribbles</title>
        <link>https://davidfitz.dev/pen/scribbles/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/scribbles/</guid>
        <pubDate>Mon Mar 02 2020 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "WNvxjEZ";
    const penHeight = undefined;
    const title = "Scribbles";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/WNvxjEZ">Check out "Scribbles" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/WNvxjEZ/image/small.png"
    alt=Scribbles
  />
</div>
<p>Browsing Pinterest I came across this image by <a href="https://twitter.com/elementaryarts">Elementary Art Resources</a>:</p>
<p><img src="/media/line-examples.jpg" alt="original piece of many doodles"></p>
<p><a href="https://www.pinterest.ie/pin/280208408054459987/" title="Link to image">Link</a></p>
<p>What I liked about this is that it would make me need to think as creatively as the artist who doodled it first. How do I do each image? How do i do all these images in one piece of code? Will it still be (reasonably) performant?</p>
<p>The pen has ended up very heavy, so it's probably best to <a href="https://cdpn.io/loficodes/debug/WNvxjEZ">view it in debug mode</a>.</p>
<p>This is the 63rd project since Jan 1st 2019, marking one a week up to my 35th birthday! Challenge complete!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Intro to Svelte - SvelteDublin</title>
        <link>https://davidfitz.dev/talk/intro-to-svelte/</link>
        <guid isPermaLink="true">https://davidfitz.dev/talk/intro-to-svelte/</guid>
        <pubDate>Thu Feb 20 2020 21:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p><a href="https://sveltedubl.in">Svelte Dublin</a> got off to a rough start this week. Some technical issues meant that I couldnt do my talk live. Below you'll see the backup talk I did to try and make up for the issues!</p>
<p>The aim of the talk is pretty simple, just a whilwind tour of Svelte to give you a taste of the basics and see if you want to learn more.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>LoFi - Colors 4 with boids</title>
        <link>https://davidfitz.dev/pen/lofi-colors-4-w-boids/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/lofi-colors-4-w-boids/</guid>
        <pubDate>Wed Feb 12 2020 21:32:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "gOpaBLX";
    const penHeight = undefined;
    const title = "LoFi - Colors 4 with boids";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/gOpaBLX">Check out "LoFi - Colors 4 with boids" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/gOpaBLX/image/small.png"
    alt=LoFi - Colors 4 with boids
  />
</div>
<p>I've been toying with idaes for the homepage of the site for a long time, and cant quite settle on anything. Thought it would be more fun to share than keep it to myself.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Banksy - Valentines Day</title>
        <link>https://davidfitz.dev/pen/banksy-valentines-day/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/banksy-valentines-day/</guid>
        <pubDate>Sat Feb 01 2020 08:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "MWwyaxj";
    const penHeight = undefined;
    const title = "Banksy - Valentines Day";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/MWwyaxj">Check out "Banksy - Valentines Day" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/MWwyaxj/image/small.png"
    alt=Banksy - Valentines Day
  />
</div>
<p>Last week on Valentine's Day, <a href="https://duckduckgo.com/?q=banksy+valentines+day&amp;t=ffab&amp;ia=images&amp;iax=images">Banksy created a new artwork</a>
in Bristol. It looked like something that could be played with and turned into a
little experiment.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Redesign 2020 - the move to Svelte</title>
        <link>https://davidfitz.dev/article/resdesign-2020/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/resdesign-2020/</guid>
        <pubDate>Mon Jan 27 2020 11:21:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>It's been over a year since this LoFi got going, and it seemed like time for an upgrade!</p>
<p>The design isnt complete, things are a little rough around the edges still, and the homepage isnt finished, but better to ship early and learn than wait for perfection. Especially on a personal site.</p>
<p>The site was running on Jekyll. It's a brilliant little SSG. I've loved it, but it was getting a little clunky. Not in any particular way. I knew how to get things done, it just felt like there were better ways to get things done. Especially when the plan is to expand the kind of content on show here.</p>
<p>So what did I go for? <a href="https://sapper.svelte.dev/">Sapper</a> a Nuxt equivalent for <a href="https://svelte.dev">Svelte</a>.</p>
<p>I never understood the appeal of Angular or React. They seemed like too much work for the return you get. Vue certainly did its best to charm me, but it still never felt like it clicked. It never &quot;felt right&quot;.</p>
<p>When I heard about Svelte, I fobbed it off as just another over hyped framework. Then I heard <a href="https://shoptalkshow.com/episodes/349/">Rich on ShopTalk Show</a>.</p>
<p>Everything he was saying made sense to me:</p>
<ul>
<li>use the platform.</li>
<li>keeping things simple with HTML - no virtual DOM, but some treats on board</li>
<li>just write CSS, nothing fancy, but the framework will try and optimise what it can</li>
<li>compiling instead of combining. Ending up with a massive React Create App app to do something small is crazy. With Svelte, you only end up with what you need to make your app work. No more.</li>
</ul>
<p>I have trudged through Angular/React/Vue tutorials, and I've been able to work the example, but it's always felt like they just showed a specific happy path, when I actually wanted to do something myself, it there would be lots of cruft and boilerplate needed.</p>
<p>Trying <a href="https://svelte.dev/tutorial/basics">the Svelte Tutorial</a> was quite the opposite. First of all, it's official, runs in the browser, and covers most of the framework. This you can tell in the first 10 seconds and it's very reassuring. None of the others have this.</p>
<p>Then, when you actually get going on it, trying out the code, it feels simple. Nearly too simple. Then you hit more complicated examples, the ones that would be avoided in Angular/React/Vue tutorials, and they make sense. This was it for me. An hour after starting the tutorial I knew Svelte was my new framework.</p>
<p>Realising that Sapper co-exists with Svelte and could let me build a PWA, basically without having to do any setup, sealed the deal fully, LoFi was getting a paint-job!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Fireworks</title>
        <link>https://davidfitz.dev/pen/fireworks/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/fireworks/</guid>
        <pubDate>Wed Jan 15 2020 21:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "povZxda";
    const penHeight = undefined;
    const title = "Fireworks";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/povZxda">Check out "Fireworks" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/povZxda/image/small.png"
    alt=Fireworks
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Mortgage explorer</title>
        <link>https://davidfitz.dev/pen/mortgage-explorer/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/mortgage-explorer/</guid>
        <pubDate>Wed Jan 15 2020 20:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "JjoaOEo";
    const penHeight = 750;
    const title = "Mortgage explorer";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/JjoaOEo">Check out "Mortgage explorer" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/JjoaOEo/image/small.png"
    alt=Mortgage explorer
  />
</div>
<p>My first exploration of Svelte. Have to say, I've loved it so far!</p>
<p>The documentation and tutorial are great. Plenty to learn, and you can play to your hearts content.</p>
<p>It's also got a REPL for you to play around with code. Wanna see the original code for this project? Check it out here on the REPL: <a href="https://svelte.dev/repl/d3ad81e615c3406b8817e8c8faad83b7?version=3.17.1" title="https://svelte.dev/repl/d3ad81e615c3406b8817e8c8faad83b7?version=3.17.1">https://svelte.dev/repl/d3ad81e615c3406b8817e8c8faad83b7?version=3.17.1</a></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Simple kaleidoscope</title>
        <link>https://davidfitz.dev/pen/simple-kaleidoscope/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/simple-kaleidoscope/</guid>
        <pubDate>Tue Jan 14 2020 22:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "xxbJqzj";
    const penHeight = undefined;
    const title = "Simple kaleidoscope";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/xxbJqzj">Check out "Simple kaleidoscope" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/xxbJqzj/image/small.png"
    alt=Simple kaleidoscope
  />
</div>
<p>Seems to have trouble on mobile, looking into it!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Ireland - Heightmap - Babylonjs</title>
        <link>https://davidfitz.dev/pen/ireland-heightmap-babylonjs/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/ireland-heightmap-babylonjs/</guid>
        <pubDate>Sun Jan 12 2020 17:36:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "wvBjVyW";
    const penHeight = undefined;
    const title = "Ireland - Heightmap - Babylonjs";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/wvBjVyW">Check out "Ireland - Heightmap - Babylonjs" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/wvBjVyW/image/small.png"
    alt=Ireland - Heightmap - Babylonjs
  />
</div>
<p>This one was just starting to play with BabylonJS. It's just a minor change on this <a href="https://www.babylonjs-playground.com/#95PXRY#0">documentation example on the BabylonJS site</a>.</p>
<p>I've been loving my adventures with p5js, but I was running into the limitations of the framework. Its intention is to get you up and running, to get you familiar with the concepts.</p>
<p>Where p5js starts to have limitations is when you want to create more complicated 3D shapes. Sure, they can be made, but not simply, and not performantly ( at least with my current level of knowledge ).</p>
<p>I'll be jumping between p5js and BabylonJS, but this has shown me just how powerful BabylonJS can be so I imagine I'll be using it more and more.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Fish Scales</title>
        <link>https://davidfitz.dev/pen/fish-scales/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/fish-scales/</guid>
        <pubDate>Sat Jan 11 2020 13:03:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "XWWbVjJ";
    const penHeight = undefined;
    const title = "Fish Scales";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/XWWbVjJ">Check out "Fish Scales" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/XWWbVjJ/image/small.png"
    alt=Fish Scales
  />
</div>
<p>Trying to learn about lighting and thought it might be fin to try and make something that looks like fish scales.</p>
<p>An interesting investigation, but there are definitely things to improve:</p>
<ul>
<li>collisions: the scales dont truly overlap and regularly clip through each other</li>
<li>camera control: what I have works, but there will be &quot;blank&quot; spaces on larger screens</li>
</ul>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Riverside v1 - p5js</title>
        <link>https://davidfitz.dev/pen/riverside-v1-p5js/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/riverside-v1-p5js/</guid>
        <pubDate>Thu Jan 09 2020 21:08:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "BayrZMN";
    const penHeight = 418;
    const title = "Riverside v1 - p5js";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/BayrZMN">Check out "Riverside v1 - p5js" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/BayrZMN/image/small.png"
    alt=Riverside v1 - p5js
  />
</div>
<p>It's amazing to see what happens when you start to get the hang of something.</p>
<p>I've been trying to do this creative coding stuff for nearly a year now, and improving day by day, but this project has shown me how that 1% improvement a day truly adds up.</p>
<p>It would have been impossible to me 12 months ago to think I could have coded what's above, and in only ~300 lines of code!</p>
<p>None of this would be possible without what I learned from <a href="https://frontendmasters.com/courses/canvas-webgl/">Matt DesLauriers</a>, <a href="http://www.codingmath.com/">Keith Peters</a> and <a href="https://www.youtube.com/user/shiffman">Dan Shiffman</a>. The incredible thing here is that their content is largely free.</p>
<p>It's important to think about that. Free. Look at the progress from <a href="https://davidfitz.dev/post/intro-to-canvas-pink-floyd/">my first sloppy canvas experient back in March</a> to what you see above. There's clearly HUGE value in what these people are giving away for free, and they've made it so ENJOYABLE. I've made sure to support each of them by buying, supporting or subscribing something that they're involved in.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Deciduous Trees</title>
        <link>https://davidfitz.dev/pen/deciduius-trees/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/deciduius-trees/</guid>
        <pubDate>Wed Jan 08 2020 21:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "BayraLX";
    const penHeight = undefined;
    const title = "Deciduous Trees";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/BayraLX">Check out "Deciduous Trees" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/BayraLX/image/small.png"
    alt=Deciduous Trees
  />
</div>
<p>Another part of a new mini project. Liking the N64 level graphics!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Conifer Trees</title>
        <link>https://davidfitz.dev/pen/conifer-trees/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/conifer-trees/</guid>
        <pubDate>Wed Jan 08 2020 20:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "jOEZzZV";
    const penHeight = undefined;
    const title = "Conifer Trees";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/jOEZzZV">Check out "Conifer Trees" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/jOEZzZV/image/small.png"
    alt=Conifer Trees
  />
</div>
<p>Quite a jump from the Xmas trees of a few weeks ago. To be part of a project.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Lighting Investigation - P5</title>
        <link>https://davidfitz.dev/pen/lighting-investigation-p5/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/lighting-investigation-p5/</guid>
        <pubDate>Tue Jan 07 2020 13:02:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "abzqbgX";
    const penHeight = undefined;
    const title = "Lighting Investigation - P5";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/abzqbgX">Check out "Lighting Investigation - P5" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/abzqbgX/image/small.png"
    alt=Lighting Investigation - P5
  />
</div>
<p>I was having trouble understanding exactly how lighting was affecting my scene in P5.</p>
<p>Here I have some different materials to play with, normal, specular, and a mouse controlled emissive light.</p>
<p>The main learning here is that you need to create your lights first before they will take effect on the other objects in the scene. This makes some sense. I imagine P5 is keeping not of all the lights, then working out for each new object how those lights affect the material.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Basic 3D physics in P5</title>
        <link>https://davidfitz.dev/pen/basic-3d-physics-in-p5/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/basic-3d-physics-in-p5/</guid>
        <pubDate>Sun Jan 05 2020 13:04:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "BaymEbq";
    const penHeight = undefined;
    const title = "Basic 3D physics in P5";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/BaymEbq">Check out "Basic 3D physics in P5" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/BaymEbq/image/small.png"
    alt=Basic 3D physics in P5
  />
</div>
<p>Still needs rotation on the balls, and collision detection, but a good start!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Spiky letters</title>
        <link>https://davidfitz.dev/pen/spiky-letters/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/spiky-letters/</guid>
        <pubDate>Sat Jan 04 2020 15:27:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "oNgoVxV";
    const penHeight = undefined;
    const title = "Spiky letters";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/oNgoVxV">Check out "Spiky letters" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/oNgoVxV/image/small.png"
    alt=Spiky letters
  />
</div>
<p>Playing with a kind of walker / random function to displace the points in type.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Colorful walker</title>
        <link>https://davidfitz.dev/pen/colorful-walker/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/colorful-walker/</guid>
        <pubDate>Sat Jan 04 2020 14:28:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "RwNjvME";
    const penHeight = undefined;
    const title = "Colorful walker";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/RwNjvME">Check out "Colorful walker" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/RwNjvME/image/small.png"
    alt=Colorful walker
  />
</div>
<p>Just some fun</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>p5nake</title>
        <link>https://davidfitz.dev/pen/p5nake/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/p5nake/</guid>
        <pubDate>Thu Jan 02 2020 15:38:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "LYEzwXj";
    const penHeight = undefined;
    const title = "p5nake";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/LYEzwXj">Check out "p5nake" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/LYEzwXj/image/small.png"
    alt=p5nake
  />
</div>
<p>This experiemnt was trying to recreate the game Snake with P5.</p>
<p>So far it seems to have gone well. It's desktop only, but mobile is to come!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Liquid Contours</title>
        <link>https://davidfitz.dev/pen/liquid-contours/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/liquid-contours/</guid>
        <pubDate>Mon Dec 30 2019 18:17:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "yLyzYRZ";
    const penHeight = undefined;
    const title = "Liquid Contours";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/yLyzYRZ">Check out "Liquid Contours" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/yLyzYRZ/image/small.png"
    alt=Liquid Contours
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Xmas Bauble Tree</title>
        <link>https://davidfitz.dev/pen/xmas-bauble-tree/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/xmas-bauble-tree/</guid>
        <pubDate>Thu Dec 26 2019 16:37:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "ExaXGZm";
    const penHeight = undefined;
    const title = "Xmas Bauble Tree";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/ExaXGZm">Check out "Xmas Bauble Tree" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/ExaXGZm/image/small.png"
    alt=Xmas Bauble Tree
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Xmas Forest</title>
        <link>https://davidfitz.dev/pen/xmas-forrest/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/xmas-forrest/</guid>
        <pubDate>Thu Dec 26 2019 14:52:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "oNgZvJW";
    const penHeight = undefined;
    const title = "Xmas Forest";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/oNgZvJW">Check out "Xmas Forest" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/oNgZvJW/image/small.png"
    alt=Xmas Forest
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Star lines</title>
        <link>https://davidfitz.dev/pen/star-lines/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/star-lines/</guid>
        <pubDate>Tue Dec 17 2019 12:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "PowWwxj";
    const penHeight = undefined;
    const title = "Star lines";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/PowWwxj">Check out "Star lines" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/PowWwxj/image/small.png"
    alt=Star lines
  />
</div>
<p>Another little doodle seeing what it's like to connect points at random</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Doodle</title>
        <link>https://davidfitz.dev/pen/doodle-3/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/doodle-3/</guid>
        <pubDate>Tue Dec 17 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "NWPdWpP";
    const penHeight = undefined;
    const title = "Doodle";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/NWPdWpP">Check out "Doodle" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/NWPdWpP/image/small.png"
    alt=Doodle
  />
</div>
<p>Simple one just playing with a triangle and lining up the radii</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Seaside Vectors</title>
        <link>https://davidfitz.dev/pen/seaside-vectors/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/seaside-vectors/</guid>
        <pubDate>Sat Dec 14 2019 14:49:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "rNaMzNo";
    const penHeight = undefined;
    const title = "Seaside Vectors";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/rNaMzNo">Check out "Seaside Vectors" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/rNaMzNo/image/small.png"
    alt=Seaside Vectors
  />
</div>
<p>Based on this pen <a href="https://www.pinterest.ie/pin/280208408053826026/" title="https://www.pinterest.ie/pin/280208408053826026/">https://www.pinterest.ie/pin/280208408053826026/</a></p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Animated Star</title>
        <link>https://davidfitz.dev/pen/animated-star/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/animated-star/</guid>
        <pubDate>Sat Dec 14 2019 11:21:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "RwNGgRz";
    const penHeight = undefined;
    const title = "Animated Star";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/RwNGgRz">Check out "Animated Star" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/RwNGgRz/image/small.png"
    alt=Animated Star
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Shadows</title>
        <link>https://davidfitz.dev/pen/shadows/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/shadows/</guid>
        <pubDate>Fri Dec 13 2019 22:15:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "KKwggKR";
    const penHeight = undefined;
    const title = "Shadows";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/KKwggKR">Check out "Shadows" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/KKwggKR/image/small.png"
    alt=Shadows
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Stairs</title>
        <link>https://davidfitz.dev/pen/stairs/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/stairs/</guid>
        <pubDate>Fri Dec 13 2019 21:33:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "YzPGWjz";
    const penHeight = undefined;
    const title = "Stairs";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/YzPGWjz">Check out "Stairs" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/YzPGWjz/image/small.png"
    alt=Stairs
  />
</div>
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Watery Lines</title>
        <link>https://davidfitz.dev/pen/watery-lines/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/watery-lines/</guid>
        <pubDate>Fri Dec 13 2019 17:57:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "abzmvbG";
    const penHeight = undefined;
    const title = "Watery Lines";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/abzmvbG">Check out "Watery Lines" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/abzmvbG/image/small.png"
    alt=Watery Lines
  />
</div>
<p>Just a little doodle</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Formula1 - Season Results</title>
        <link>https://davidfitz.dev/pen/formula1-season-results/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/formula1-season-results/</guid>
        <pubDate>Thu Nov 28 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "bXNayB";
    const penHeight = undefined;
    const title = "Formula1 - Season Results";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/bXNayB">Check out "Formula1 - Season Results" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/bXNayB/image/small.png"
    alt=Formula1 - Season Results
  />
</div>
<p>Fun with SVGs and using the amazing <a href="https://ergast.com/mrd/">Ergast Formula1 API</a>!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Thinking Inside the Box Model - DublinCSS</title>
        <link>https://davidfitz.dev/talk/thinking-inside-the-box-model/</link>
        <guid isPermaLink="true">https://davidfitz.dev/talk/thinking-inside-the-box-model/</guid>
        <pubDate>Tue Nov 26 2019 18:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <p>This talk was an investigation into the Box Model.</p>
<p>Most developers can tell you what the Box Model is. It's the margin, border, padding and content of an element. We've all seen this image describing it:</p>
<p><img src="/media/box-model.png" alt="Screenshot of FireFox dev tools"></p>
<p>What this talk tries to do is explore <em>how</em> the Box Model works, <em>why</em> it works that way, and to point out a few tips and issues that might not be immediately obvious.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Animated Time of Day SVG</title>
        <link>https://davidfitz.dev/pen/animated-time-of-day-svg/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/animated-time-of-day-svg/</guid>
        <pubDate>Fri Nov 08 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "rNBrPOP";
    const penHeight = undefined;
    const title = "Animated Time of Day SVG";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/rNBrPOP">Check out "Animated Time of Day SVG" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/rNBrPOP/image/small.png"
    alt=Animated Time of Day SVG
  />
</div>
<p>I worked on these SVGs for a talk for <a href="http://www.dublincss.org/">DublinCSS</a>, enjoy!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Walking Particles</title>
        <link>https://davidfitz.dev/pen/walking-particles/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/walking-particles/</guid>
        <pubDate>Fri Nov 01 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "GRKEExz";
    const penHeight = undefined;
    const title = "Walking Particles";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/GRKEExz">Check out "Walking Particles" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/GRKEExz/image/small.png"
    alt=Walking Particles
  />
</div>
<p>I've always been fascinated by these kinds of simulation, it that's what you call them.</p>
<p>Very special shoutout to <a href="https://twitter.com/takawo">Takawo</a> as this is basically a copy from <a href="https://twitter.com/takawo/status/1166578237755011077">this tweet of his</a> reverse engineered so I could understand it myself.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Doodle</title>
        <link>https://davidfitz.dev/pen/doodle-2/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/doodle-2/</guid>
        <pubDate>Thu Sep 26 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "ExYrebP";
    const penHeight = undefined;
    const title = "Doodle";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/ExYrebP">Check out "Doodle" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/ExYrebP/image/small.png"
    alt=Doodle
  />
</div>
<p>Just a little doodle</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Chaikin Curve Subdivision</title>
        <link>https://davidfitz.dev/pen/chaikin-curve-subdivision/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/chaikin-curve-subdivision/</guid>
        <pubDate>Thu Sep 19 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "vYBqKMM";
    const penHeight = undefined;
    const title = "Chaikin Curve Subdivision";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/vYBqKMM">Check out "Chaikin Curve Subdivision" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/vYBqKMM/image/small.png"
    alt=Chaikin Curve Subdivision
  />
</div>
<p>I came across the idea of Chaikin Curve Subdivisions and decided to try it out myself without looking up any examples. I think I've done ok!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>SVG for Teams - DublinCSS</title>
        <link>https://davidfitz.dev/talk/svg-for-teams/</link>
        <guid isPermaLink="true">https://davidfitz.dev/talk/svg-for-teams/</guid>
        <pubDate>Thu Sep 19 2019 18:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Tweet Design #2</title>
        <link>https://davidfitz.dev/pen/tweet-design-2/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/tweet-design-2/</guid>
        <pubDate>Fri Sep 13 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "oNvMgGK";
    const penHeight = undefined;
    const title = "Tweet Design #2";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/oNvMgGK">Check out "Tweet Design #2" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/oNvMgGK/image/small.png"
    alt=Tweet Design #2
  />
</div>
<p>Another design completed in less than a tweet!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Doodle</title>
        <link>https://davidfitz.dev/pen/doodle-1/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/doodle-1/</guid>
        <pubDate>Sun Aug 25 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "eYOvjzR";
    const penHeight = undefined;
    const title = "Doodle";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/eYOvjzR">Check out "Doodle" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/eYOvjzR/image/small.png"
    alt=Doodle
  />
</div>
<p>There's so much stress around this week, especially in the dev community.</p>
<p>Screw that, we're all here with the ablity to make cool things and share them with each other, everything you do doesnt have to be amazing or make a point.</p>
<p>Enjoy it.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>CSS-only dynamic animated cartoon</title>
        <link>https://davidfitz.dev/pen/css-only-dynamic-animated-cartoon/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/css-only-dynamic-animated-cartoon/</guid>
        <pubDate>Sat Aug 24 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "dybvpeX";
    const penHeight = undefined;
    const title = "CSS-only dynamic animated cartoon";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/dybvpeX">Check out "CSS-only dynamic animated cartoon" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/dybvpeX/image/small.png"
    alt=CSS-only dynamic animated cartoon
  />
</div>
<p>Thinking about selectors and how it might be possible to make a dynamic app.</p>
<p>Here we have a grid of divs, each of which is essentially informing the coordinates of the mouse for an animation. With this we can animate where the eyes are pointing, and tell if the mouse is over the characters face.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Round Maze</title>
        <link>https://davidfitz.dev/pen/round-maze/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/round-maze/</guid>
        <pubDate>Thu Aug 22 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "eYOgBYJ";
    const penHeight = undefined;
    const title = "Round Maze";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/eYOgBYJ">Check out "Round Maze" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/eYOgBYJ/image/small.png"
    alt=Round Maze
  />
</div>
<p>This time I took a little inspiration from the amazing <a href="https://mobile.twitter.com/takawo">Takawo Shunusuke</a> and specifically <a href="https://mobile.twitter.com/takawo/status/1164723663200870401">his tweets that contain an entire generative Processing app</a>.</p>
<p>His examples are definitely more complicated, but a really fun process trying to see how each character can be optimised in an app.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Simple Hexagon Forest - p5.js</title>
        <link>https://davidfitz.dev/pen/simple-hexagon-forest-p5/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/simple-hexagon-forest-p5/</guid>
        <pubDate>Fri Aug 02 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "pMPpRg";
    const penHeight = undefined;
    const title = "Simple Hexagon Forest - p5.js";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/pMPpRg">Check out "Simple Hexagon Forest - p5.js" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/pMPpRg/image/small.png"
    alt=Simple Hexagon Forest - p5.js
  />
</div>
<p>What started as an experiment to recreate something like <a href="https://www.pinterest.ie/pin/550705860667304554/">this image</a> grew legs and turning into a kind of &quot;breathing&quot; forest.</p>
<p>It might not look like much more than the <a href="https://davidfitz.dev/post/threejs-vectors-from-image-spiritualised-lgm">Spiritualised cover</a> from last time, but it actually took a lot more learning to get there. I had to add in learning about lights, their positioning and the kinds of material that can take them.</p>
<p>By default p5.js vertex shapes dont take light. You need to add a material ( in this case specularMaterial() ) to gain the effect.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Making a Realistic Glass Effect with SVG</title>
        <link>https://davidfitz.dev/article/making-a-realistic-glass-effect-with-SVG/</link>
        <guid isPermaLink="true">https://davidfitz.dev/article/making-a-realistic-glass-effect-with-SVG/</guid>
        <pubDate>Thu Aug 01 2019 11:21:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            
          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>ThreeJS Vectors from Image Spiritualized - LGM </title>
        <link>https://davidfitz.dev/pen/threejs-vectors-from-image-spiritualized-lgm/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/threejs-vectors-from-image-spiritualized-lgm/</guid>
        <pubDate>Tue Jul 23 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "QejqJM";
    const penHeight = undefined;
    const title = "ThreeJS Vectors from Image Spiritualized - LGM ";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/QejqJM">Check out "ThreeJS Vectors from Image Spiritualized - LGM " on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/QejqJM/image/small.png"
    alt=ThreeJS Vectors from Image Spiritualized - LGM 
  />
</div>
<p>This is one I've been waiting to do for a long time.</p>
<p>Coming from regular website development I havent had the skills needed to get into anything 3D. But, as the weeks have gone on I've learned a lot to get here.</p>
<p>The path has been:</p>
<ul>
<li><a href="https://frontendmasters.com/courses/canvas-webgl/">Matt DesLauriers course on FrontEnd Masters</a></li>
<li><a href="https://www.youtube.com/channel/UCF6F8LdCSWlRwQm_hfA2bcQ">Keith Peters' Coding Math on Youtube</a></li>
<li>Learn <a href="https://p5js.org/">P5.js</a></li>
<li>Learn <a href="https://threejs.org/">ThreeJS</a></li>
<li>Lots of trial and error</li>
</ul>
<h3>How the effect works:</h3>
<ol>
<li>Import a 300x300 image of the album cover into a 2D canvas element</li>
<li>Create an array of each pixel in the image, recording x and y, and then record z as a decimal percentage of the average of the pixels RGB value / 255</li>
<li>Create a 3D canvas element, pop the vertices into place</li>
</ol>
<h3>Improvements that could be made:</h3>
<ul>
<li>Camera controls</li>
<li>Lighting</li>
<li>Properly understand why x and y seem to be coming out sideways 🙈</li>
</ul>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Perlin Hills</title>
        <link>https://davidfitz.dev/pen/perlin-hills/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/perlin-hills/</guid>
        <pubDate>Sat Jul 20 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "mNJGyj";
    const penHeight = undefined;
    const title = "Perlin Hills";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/mNJGyj">Check out "Perlin Hills" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/mNJGyj/image/small.png"
    alt=Perlin Hills
  />
</div>
<p>Ever since seeing <a href="https://twitter.com/mattdesl/status/1135909866407469062">this tweet by Matt DesLauries</a> I wanted to do something with mountain looking results.</p>
<p>I've been hearing a lot about <a href="https://p5js.org/">p5.js</a> and wanted to try it out. It seemed liek a good option for this kind of project too.</p>
<p>While I had used it before on the <a href="https://davidfitz.dev/post/intro-to-canvas-pink-floyd">Off the Wall</a> cover I did, I was never very happy with how that turned out. I'd really just grabbed a demo and forced it to work with the idea I had, but the two pieces didnt really want to fit.</p>
<p>After playing with it for the day, it's actally a lovely framework. It's very simple, but very powerful! I'm really looking forward to getting some more complex ideas working with it.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Fibonacci circles</title>
        <link>https://davidfitz.dev/pen/fibonacci-circles/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/fibonacci-circles/</guid>
        <pubDate>Mon Jul 15 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "gNVgLN";
    const penHeight = undefined;
    const title = "Fibonacci circles";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/gNVgLN">Check out "Fibonacci circles" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/gNVgLN/image/small.png"
    alt=Fibonacci circles
  />
</div>
<p>Playing with the Fibonacci sequence!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Spider-verse dots</title>
        <link>https://davidfitz.dev/pen/spider-verse-dots/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/spider-verse-dots/</guid>
        <pubDate>Mon Jun 03 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "GawXVz";
    const penHeight = undefined;
    const title = "Spider-verse dots";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/GawXVz">Check out "Spider-verse dots" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/GawXVz/image/small.png"
    alt=Spider-verse dots
  />
</div>
<p>This week just a simple eploration of a style from the movie Spider-man Into the Spider-verse. In that movie they play a lot with a 3D effect where they split the cymk colors you would see in printing to create a kind of depth of field. I tried something similar with rgb here.</p>
<p>If you want to get more detial on the effects used in the movie, there's <a href="https://www.youtube.com/watch?v=l-wUKu_V2Lk" title="Youtube video explaining the making of into the spider-verse">a great little video from Wired</a> doing just that!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>SVG Glass Effect The xx - I See You</title>
        <link>https://davidfitz.dev/pen/svg-glass-effect-the-xx-i-see-you/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/svg-glass-effect-the-xx-i-see-you/</guid>
        <pubDate>Thu May 23 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "xNXQLb";
    const penHeight = undefined;
    const title = "SVG Glass Effect The xx - I See You";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/xNXQLb">Check out "SVG Glass Effect The xx - I See You" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/xNXQLb/image/small.png"
    alt=SVG Glass Effect The xx - I See You
  />
</div>
<p>This week I had another challenge from my mate Stuart. He wanted me to recreate the album cover for The xx <em>I See You</em>.</p>
<p>Here's the original cover.</p>
<p><img src="/media/xx-i-see-you.jpg" alt="The xx I See You album cover"></p>
<p>The trick to this is that there is a glassy effect on the page. It turned out that using almost the same trick of feDisplacementMap from <a href="/doodle/svg-turbulence-and-car-seat-headrest">Stuarts last request</a> did the job, with a little CSS <a href="/doodle/intro-to-css-masks">clip-path magic similar to the Velvet Underground cover</a>.</p>
<p>If you watch the videos from those two posts, and then have a look at the code for this week, you should have a good idea of how the effect was reached. If not, <a href="https://twitter.com/loficodes">let me know on Twitter!</a> I'm always happy to answer questions.</p>
<p>Also, for those eagle eyed amongst you, no I havent used the same picture as in the I See You cover. That's because the original is already distorted! Instead I used <a href="https://unsplash.com/photos/E_eWwM29wfU">this wonderful image from Unsplash</a> bu <a href="https://unsplash.com/@blackodc">Su San Lee</a>!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Japanese Seigaiha pattern</title>
        <link>https://davidfitz.dev/pen/japanese-seigaiha-pattern/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/japanese-seigaiha-pattern/</guid>
        <pubDate>Mon May 20 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "Ezmpbm";
    const penHeight = undefined;
    const title = "Japanese Seigaiha pattern";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/Ezmpbm">Check out "Japanese Seigaiha pattern" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/Ezmpbm/image/small.png"
    alt=Japanese Seigaiha pattern
  />
</div>
<p>After a trip to Japan last year I got found their pattern works lovely. Whether on cloths or paper, there always seemed to be a defined pattern, but with a little whimsy in there too.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Simple Clock</title>
        <link>https://davidfitz.dev/pen/simple-clock/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/simple-clock/</guid>
        <pubDate>Thu May 16 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "PvpEvK";
    const penHeight = undefined;
    const title = "Simple Clock";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/PvpEvK">Check out "Simple Clock" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/PvpEvK/image/small.png"
    alt=Simple Clock
  />
</div>
<p>Playing around with Canvas some more. This time, a simple clock.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Half Tone</title>
        <link>https://davidfitz.dev/pen/half-tone/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/half-tone/</guid>
        <pubDate>Tue May 07 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "KLwbQQ";
    const penHeight = undefined;
    const title = "Half Tone";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/KLwbQQ">Check out "Half Tone" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/KLwbQQ/image/small.png"
    alt=Half Tone
  />
</div>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Copying Art - Random Dots</title>
        <link>https://davidfitz.dev/pen/copying-art-random-dots/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/copying-art-random-dots/</guid>
        <pubDate>Mon May 06 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "Pvwzdo";
    const penHeight = undefined;
    const title = "Copying Art - Random Dots";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/Pvwzdo">Check out "Copying Art - Random Dots" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/Pvwzdo/image/small.png"
    alt=Copying Art - Random Dots
  />
</div>
<p>Another I cant find attribution for, any help appreciated!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Copying Art - Circles</title>
        <link>https://davidfitz.dev/pen/copying-art-circles/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/copying-art-circles/</guid>
        <pubDate>Sun May 05 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "YbPqPZ";
    const penHeight = undefined;
    const title = "Copying Art - Circles";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/YbPqPZ">Check out "Copying Art - Circles" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/YbPqPZ/image/small.png"
    alt=Copying Art - Circles
  />
</div>
<p>Cant find direct attribution for the original, any help greatly appreciated!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Copying Art - Erich Borchert</title>
        <link>https://davidfitz.dev/pen/copying-art-erich-borchert/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/copying-art-erich-borchert/</guid>
        <pubDate>Fri May 03 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "NVKaZG";
    const penHeight = undefined;
    const title = "Copying Art - Erich Borchert";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/NVKaZG">Check out "Copying Art - Erich Borchert" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/NVKaZG/image/small.png"
    alt=Copying Art - Erich Borchert
  />
</div>
<p>Following the same geometric path as I have been recently, but discovered Erich Borchert.</p>
<p>It seems he studied in the Bauhaus with Paul Klee, Wassily Kandinsky and Lyonel Feininger.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Canvas - Binocular Monochrome</title>
        <link>https://davidfitz.dev/pen/canvas-binocular-monochrome/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/canvas-binocular-monochrome/</guid>
        <pubDate>Thu May 02 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "VNJEzq";
    const penHeight = undefined;
    const title = "Canvas - Binocular Monochrome";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/VNJEzq">Check out "Canvas - Binocular Monochrome" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/VNJEzq/image/small.png"
    alt=Canvas - Binocular Monochrome
  />
</div>
<p>Pinterest is a great resource for finding inspiration, and I've found a rich vein of late. You can <a href="https://www.pinterest.ie/davidfitzgibbon/generative/">follow my board</a> if you're into that sort of thing. <a href="https://www.pinterest.ie/pin/280208408052961182/">The inspiration for this particular experiment is this pin</a>.</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Canvas - Sin Wave Circles</title>
        <link>https://davidfitz.dev/pen/canvas-sin-wave-circles/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/canvas-sin-wave-circles/</guid>
        <pubDate>Tue Apr 30 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "wZZZgL";
    const penHeight = undefined;
    const title = "Canvas - Sin Wave Circles";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/wZZZgL">Check out "Canvas - Sin Wave Circles" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/wZZZgL/image/small.png"
    alt=Canvas - Sin Wave Circles
  />
</div>
<p>The <a href="https://www.youtube.com/channel/UCF6F8LdCSWlRwQm_hfA2bcQ">Coding Math</a> YouTube channel, by Keith Peters, is incredible. In their short videos the explain trigonomerty as it applies to JavaScript in Canvas. I always found the idea of moving things around the screen and knowing <em>how</em> to very intimidating. It was something for other people, geniuses.</p>
<p>After watching only 3-4 of these videos Keith had me convinced I could do it on my own, so here is my attempt!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>SVGs with Vulfpeck - VueJS edition</title>
        <link>https://davidfitz.dev/pen/svgs-with-vulfpeck-vuejs-edition/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/svgs-with-vulfpeck-vuejs-edition/</guid>
        <pubDate>Thu Apr 11 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "MxgxEP";
    const penHeight = undefined;
    const title = "SVGs with Vulfpeck - VueJS edition";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/MxgxEP">Check out "SVGs with Vulfpeck - VueJS edition" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/MxgxEP/image/small.png"
    alt=SVGs with Vulfpeck - VueJS edition
  />
</div>
<p>The learning from <a href="https://davidfitz.dev/post/intro-to-svgs-with-vulfpeck/">the original Thrill of the Arts demo,</a> but upgraded to VueJS</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Squishy Bubble Animation</title>
        <link>https://davidfitz.dev/pen/squishy-bubble-animation/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/squishy-bubble-animation/</guid>
        <pubDate>Thu Apr 04 2019 23:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "GLpNYg";
    const penHeight = undefined;
    const title = "Squishy Bubble Animation";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/GLpNYg">Check out "Squishy Bubble Animation" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/GLpNYg/image/small.png"
    alt=Squishy Bubble Animation
  />
</div>
<p>Very simply just a little messing around with the kinds of effects seen in <a href="https://codepen.io/challenges/2019/february/3">the Blobs Challenge on Codepen</a>. Better late than never!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Counting Animtation</title>
        <link>https://davidfitz.dev/pen/counting-animtation/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/counting-animtation/</guid>
        <pubDate>Fri Mar 22 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "LaBexw";
    const penHeight = 680;
    const title = "Counting Animtation";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/LaBexw">Check out "Counting Animtation" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/LaBexw/image/small.png"
    alt=Counting Animtation
  />
</div>
<p>This week, instead of an album cover, I saw <a href="https://abduzeedo.com/node/85337">this illustration for the Adobe Animate CC splash screen on Abduzeedo</a> and thought it might be fun to animate it.</p>
<p><img src="/img/757c89726169815bed464c79eed.jpg" alt="Numbers counting as if behind glass"></p>
<p>What I've made isnt a perfect representation, but close enough, and a bit of fun!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Intro to Canvas with Pink Floyd</title>
        <link>https://davidfitz.dev/pen/intro-to-canvas-with-pink-floyd/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/intro-to-canvas-with-pink-floyd/</guid>
        <pubDate>Fri Mar 15 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "QoadBo";
    const penHeight = undefined;
    const title = "Intro to Canvas with Pink Floyd";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/QoadBo">Check out "Intro to Canvas with Pink Floyd" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/QoadBo/image/small.png"
    alt=Intro to Canvas with Pink Floyd
  />
</div>
<p>This week I started to look into Canvas, and more specifically p5.js.</p>
<p>It was really very easy to get started with! The docs seem to be great and I was able to put together a DIY The Wall album cover just with <a href="https://p5js.org/get-started/" title="the p5 Getting Started Tutorial">the Getting Started tutorial</a>!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Creative coding - copying art</title>
        <link>https://davidfitz.dev/pen/olafur-arnalds-remember/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/olafur-arnalds-remember/</guid>
        <pubDate>Fri Mar 08 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "WmpbdL";
    const penHeight = 570;
    const title = "Creative coding - copying art";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/WmpbdL">Check out "Creative coding - copying art" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/WmpbdL/image/small.png"
    alt=Creative coding - copying art
  />
</div>
<p>This week a change of pace.</p>
<p>Trying to figure out how to do a technique, and then also trying to explain it in a video, is a lot to take on in one week. I was feeling that the videos were starting to lack quality, you guys were actually feeding back that maybe video was a bad place to show code anyway, and it was adding to stress!</p>
<p>As a result, this week I have tried to copy the cover of the delightfully stress-free album re:member by Ólafur Arnalds. Every time you refresh you should get a new version of the cover.</p>
<p>Please take a look at the code and let me know what you think on Twitter!</p>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Hand drawn sketch effect in SVG with feDisplacementMap</title>
        <link>https://davidfitz.dev/pen/svg-turbulence-and-car-seat-headrest/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/svg-turbulence-and-car-seat-headrest/</guid>
        <pubDate>Fri Mar 01 2019 01:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "XOvzbw";
    const penHeight = 570;
    const title = "Hand drawn sketch effect in SVG with feDisplacementMap";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/XOvzbw">Check out "Hand drawn sketch effect in SVG with feDisplacementMap" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/XOvzbw/image/small.png"
    alt=Hand drawn sketch effect in SVG with feDisplacementMap
  />
</div>
<p>This week I got a request from my mate Stuart in work. He wanted to see the Car Seat Headrest - Twin Fantasy cover done in SVG.</p>
<p>Clearly the challenge here is the hand drawn effect. Vector tools arent famed for their spontaneity, so how can we get this done?</p>
<p>Luckily, as we've been learning, SVG on the web is often just as good or better than your design tool of choice.</p>
<p>Here are the links you need.</p>
<p>CodePen: <a href="https://codepen.io/loficodes/pen/XOvzbw" title="https://codepen.io/loficodes/pen/XOvzbw">https://codepen.io/loficodes/pen/XOvzbw</a></p>
<p>MDN feDisplacementMap: <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDisplacementMap" title="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDisplacementMap">https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feDisplacementMap</a></p>
<p>Sara Soueidan feDisplacementMap: <a href="https://tympanus.net/codrops/2019/02/12/svg-filter-effects-conforming-text-to-surface-texture-with-fedisplacementmap/" title="https://tympanus.net/codrops/2019/02/12/svg-filter-effects-conforming-text-to-surface-texture-with-fedisplacementmap/">https://tympanus.net/codrops/2019/02/12/svg-filter-effects-conforming-text-to-surface-texture-with-fedisplacementmap/</a></p>
<p>CSS Tricks - How SVG Line Animation Works: <a href="https://css-tricks.com/svg-line-animation-works/" title="https://css-tricks.com/svg-line-animation-works/">https://css-tricks.com/svg-line-animation-works/</a></p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/eaH2mbCY9aw?autoplay=1'>
      <img src='https://img.youtube.com/vi/eaH2mbCY9aw/sddefault.jpg' />
      Watch Hand drawn sketch effect in SVG with feDisplacementMap on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/eaH2mbCY9aw?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/eaH2mbCY9aw/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="Hand drawn sketch effect in SVG with feDisplacementMap"
    name="Hand drawn sketch effect in SVG with feDisplacementMap"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>CSS mix-blend-mode and GoGo Penguin</title>
        <link>https://davidfitz.dev/pen/css-blend-modes-and-gogo-penguin/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/css-blend-modes-and-gogo-penguin/</guid>
        <pubDate>Fri Feb 22 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "PVXOjZ";
    const penHeight = undefined;
    const title = "CSS mix-blend-mode and GoGo Penguin";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/PVXOjZ">Check out "CSS mix-blend-mode and GoGo Penguin" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/PVXOjZ/image/small.png"
    alt=CSS mix-blend-mode and GoGo Penguin
  />
</div>
<p>This week was a pretty straight forward win.</p>
<p>The aim was to reproduce the GoGo Penguin - Man Made Object cover, but figuring out blend modes in CSS. For some reason I felt this would be really complicated, but in the end it was super easy. One rule and I was done!</p>
<p>The main trick was not to use blend-mode from a background, but mix-blend-mode on the whole elements.</p>
<p>GoGo Penguin - Man Made Object <a href="https://codepen.io/loficodes/pen/PVXOjZ" title="https://codepen.io/loficodes/pen/PVXOjZ">https://codepen.io/loficodes/pen/PVXOjZ</a></p>
<p>Kasabian - 48:13: <a href="https://codepen.io/loficodes/pen/jdoNeX" title="https://codepen.io/loficodes/pen/jdoNeX">https://codepen.io/loficodes/pen/jdoNeX</a></p>
<p>MDN CSS mix-blend-mode: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode" title="https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode">https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode</a></p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/Y9CRSygQjv4?autoplay=1'>
      <img src='https://img.youtube.com/vi/Y9CRSygQjv4/sddefault.jpg' />
      Watch CSS mix-blend-mode and GoGo Penguin on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/Y9CRSygQjv4?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/Y9CRSygQjv4/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="CSS mix-blend-mode and GoGo Penguin"
    name="CSS mix-blend-mode and GoGo Penguin"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Intro to SVGs with Vulfpeck</title>
        <link>https://davidfitz.dev/pen/intro-to-svgs-with-vulfpeck/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/intro-to-svgs-with-vulfpeck/</guid>
        <pubDate>Fri Feb 22 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "PVwJmJ";
    const penHeight = undefined;
    const title = "Intro to SVGs with Vulfpeck";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/PVwJmJ">Check out "Intro to SVGs with Vulfpeck" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/PVwJmJ/image/small.png"
    alt=Intro to SVGs with Vulfpeck
  />
</div>
<p>My friend Stuart and I both love SVGs and Vulfpeck. The issue is, SVGs can be a bit intimidating when you start to look at the code.</p>
<p>This is a quick look at how simple SVGs can be, all through the cover for the brilliant album Thrill of the Arts by Vulfpeck!</p>
<p>Codepen: <a href="https://codepen.io/loficodes/pen/PVwJmJ" title="https://codepen.io/loficodes/pen/PVwJmJ">https://codepen.io/loficodes/pen/PVwJmJ</a></p>
<p>SVG Resources</p>
<ul>
<li>
<p>MDN: <a href="https://developer.mozilla.org/en-US/docs/Web/SVG" title="https://developer.mozilla.org/en-US/docs/Web/SVG">https://developer.mozilla.org/en-US/docs/Web/SVG</a></p>
</li>
<li>
<p>Sarah Drasner - Building an SVG video: <a href="https://www.youtube.com/watch?v=qA2DqKIjZ5I" title="https://www.youtube.com/watch?v=qA2DqKIjZ5I">https://www.youtube.com/watch?v=qA2DqKIjZ5I</a></p>
</li>
<li>
<p>Sarah's SVG Animations book: <a href="https://www.amazon.com/SVG-Animations-Implementations-Responsive-Animation/dp/1491939702" title="https://www.amazon.com/SVG-Animations-Implementations-Responsive-Animation/dp/1491939702">https://www.amazon.com/SVG-Animations-Implementations-Responsive-Animation/dp/1491939702</a></p>
<link rel='stylesheet' href='/comp/youtube/style.css' />
<noscript>
  <a
  href='https://www.youtube.com/embed/bhVftu8_VRs?autoplay=1'>
    <img src='https://img.youtube.com/vi/bhVftu8_VRs/sddefault.jpg' />
    Watch Intro to SVGs with Vulfpeck on YouTube
  </a>
</noscript>
<iframe
  class="w-full object-contain"
  srcdoc="
    <a
        href='https://www.youtube.com/embed/bhVftu8_VRs?autoplay=1'
        class='youtubeembed'
    >
        <img
      src='https://img.youtube.com/vi/bhVftu8_VRs/sddefault.jpg'
      class='youtubeembed'
        />
        <svg
      version='1.1'
      viewBox='0 0 68 48'
      width='68px'
      style='position: relative;'
        >
      <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
      <path d='M 45,24 27,14 27,34' fill='#fff'></path>
        </svg>
    </a>
  "
  title="Intro to SVGs with Vulfpeck"
  name="Intro to SVGs with Vulfpeck"
  allow="accelerometer; autoplay; encrypted-media; gyroscope;
  picture-in-picture"
  frameBorder="0"
  webkitallowfullscreen="true"
  mozallowfullscreen="true"
  width="600"
  height="400"
  allowFullScreen
  aria-hidden="true"></iframe>
</li>
</ul>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Intro to CSS clip-path</title>
        <link>https://davidfitz.dev/pen/intro-to-css-masks/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/intro-to-css-masks/</guid>
        <pubDate>Fri Feb 15 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "qgKQGp";
    const penHeight = undefined;
    const title = "Intro to CSS clip-path";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/qgKQGp">Check out "Intro to CSS clip-path" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/qgKQGp/image/small.png"
    alt=Intro to CSS clip-path
  />
</div>
<p>This week we're looking at CSS masks. An effect that's like peeling the skin off a banana, so that's what we've done.</p>
<p><a href="https://codepen.io/loficodes/pen/qgKQGp">Codepen - The Velvet Underground &amp; Nico</a></p>
<p><a href="https://codepen.io/loficodes/pen/QYBJPX">The Velvet Underground &amp; Nico x4</a></p>
<p><a href="https://css-tricks.com/almanac/properties/c/clip/">CSS tricks clip-path article</a></p>
<p><a href="https://codepen.io/loficodes/pen/MLqbmQ?editors=1100">My demo pen</a></p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/djHDEi3J6c0?autoplay=1'>
      <img src='https://img.youtube.com/vi/djHDEi3J6c0/sddefault.jpg' />
      Watch Intro to CSS clip-path on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/djHDEi3J6c0?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/djHDEi3J6c0/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="Intro to CSS clip-path"
    name="Intro to CSS clip-path"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Simple Neon Light Effect in SVG</title>
        <link>https://davidfitz.dev/pen/simple-svg-animation-using-blur-magic-whip/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/simple-svg-animation-using-blur-magic-whip/</guid>
        <pubDate>Fri Feb 08 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "LqLjMX";
    const penHeight = 300;
    const title = "Simple Neon Light Effect in SVG";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/LqLjMX">Check out "Simple Neon Light Effect in SVG" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/LqLjMX/image/small.png"
    alt=Simple Neon Light Effect in SVG
  />
</div>
<p>This time I wanted to explore some neon light effects in SVG. This involved trying to figure out some blur effects, so what better way than with the Blur album cover for Magic Whip.</p>
<p>The puns are free.</p>
<p>Codepen: <a href="https://codepen.io/loficodes/pen/LqLjMX" title="https://codepen.io/loficodes/pen/LqLjMX">https://codepen.io/loficodes/pen/LqLjMX</a></p>
<p>Blur: <a href="https://jsfiddle.net/g57red1p/" title="https://jsfiddle.net/g57red1p/">https://jsfiddle.net/g57red1p/</a></p>
<p>Flicker animation: <a href="https://www.sitepoint.com/community/t/replicating-2-different-flicker-animations-on-an-svg/309035" title="https://www.sitepoint.com/community/t/replicating-2-different-flicker-animations-on-an-svg/309035">https://www.sitepoint.com/community/t/replicating-2-different-flicker-animations-on-an-svg/309035</a></p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/zYIKR52LJP0?autoplay=1'>
      <img src='https://img.youtube.com/vi/zYIKR52LJP0/sddefault.jpg' />
      Watch Simple Neon Light Effect in SVG on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/zYIKR52LJP0?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/zYIKR52LJP0/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="Simple Neon Light Effect in SVG"
    name="Simple Neon Light Effect in SVG"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>SVG Decibel Meter - Arctic Monkeys AM</title>
        <link>https://davidfitz.dev/pen/svg-decible-meter-arctic-monkeys-am/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/svg-decible-meter-arctic-monkeys-am/</guid>
        <pubDate>Fri Feb 01 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "exZyzm";
    const penHeight = 270;
    const title = "SVG Decibel Meter - Arctic Monkeys AM";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/exZyzm">Check out "SVG Decibel Meter - Arctic Monkeys AM" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/exZyzm/image/small.png"
    alt=SVG Decibel Meter - Arctic Monkeys AM
  />
</div>
<p>I thought I would try an animated album cover.</p>
<p>The effect here is pretty simple, we're just changing the stroke-width of the SVG and background of the <code>&lt;body&gt;</code>. The trick was getting the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">Web Audio API</a> to give back the decibel level.</p>
<p>Luckily Chris Wilson has <a href="https://webaudiodemos.appspot.com/volume-meter/">a brilliant little plugin</a> to work with it and I was able to get the decibel level incredibly easily. And the code is tiny! It’s only about ~60 lines! Great for learning the very basics of what can be a complicated API to start out with!</p>
<p>Codepen: <a href="https://codepen.io/loficodes/pen/exZyzm" title="https://codepen.io/loficodes/pen/exZyzm">https://codepen.io/loficodes/pen/exZyzm</a></p>
<p>Chris Wilson's Volume Meter: <a href="https://webaudiodemos.appspot.com/volume-meter/" title="https://webaudiodemos.appspot.com/volume-meter/">https://webaudiodemos.appspot.com/volume-meter/</a></p>
<p>MDN Web Audio API: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API" title="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API</a></p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/aSdA6ANayEI?autoplay=1'>
      <img src='https://img.youtube.com/vi/aSdA6ANayEI/sddefault.jpg' />
      Watch SVG Decibel Meter - Arctic Monkeys AM on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/aSdA6ANayEI?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/aSdA6ANayEI/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="SVG Decibel Meter - Arctic Monkeys AM"
    name="SVG Decibel Meter - Arctic Monkeys AM"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Flex VS Float - Mirrored Media Elements</title>
        <link>https://davidfitz.dev/pen/flex-vs-float-mirrored-media-elements/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/flex-vs-float-mirrored-media-elements/</guid>
        <pubDate>Fri Jan 18 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "roqVGL";
    const penHeight = undefined;
    const title = "Flex VS Float - Mirrored Media Elements";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/roqVGL">Check out "Flex VS Float - Mirrored Media Elements" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/roqVGL/image/small.png"
    alt=Flex VS Float - Mirrored Media Elements
  />
</div>
<p>These days flexbox is the new hotness, but it still doesn't have universal browser support. This video will show you how to get back to floats and support every browser!</p>
<p>Links:</p>
<p>CodePen: <a href="https://codepen.io/loficodes/pen/roqVGL?editors=0100" title="https://codepen.io/loficodes/pen/roqVGL?editors=0100">https://codepen.io/loficodes/pen/roqVGL?editors=0100</a></p>
<p>Flex support data: <a href="https://caniuse.com/#search=flex" title="https://caniuse.com/#search=flex">https://caniuse.com/#search=flex</a></p>
<p>Float support data: <a href="https://caniuse.com/#search=float" title="https://caniuse.com/#search=float">https://caniuse.com/#search=float</a> ( you gotta scroll down )</p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/oA9Sa_G0MVE?autoplay=1'>
      <img src='https://img.youtube.com/vi/oA9Sa_G0MVE/sddefault.jpg' />
      Watch Flex VS Float - Mirrored Media Elements on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/oA9Sa_G0MVE?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/oA9Sa_G0MVE/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="Flex VS Float - Mirrored Media Elements"
    name="Flex VS Float - Mirrored Media Elements"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Basement Jaxx album cover with CSS and Prime Numbers</title>
        <link>https://davidfitz.dev/pen/basement-jaxx-album-cover-with-css-and-prime-numbers/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/basement-jaxx-album-cover-with-css-and-prime-numbers/</guid>
        <pubDate>Fri Jan 11 2019 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "yGwoaO";
    const penHeight = undefined;
    const title = "Basement Jaxx album cover with CSS and Prime Numbers";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/yGwoaO">Check out "Basement Jaxx album cover with CSS and Prime Numbers" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/yGwoaO/image/small.png"
    alt=Basement Jaxx album cover with CSS and Prime Numbers
  />
</div>
<p>I was doing a doodle of the Basement Jaxx Singles album in HTML / CSS and wanted
to create an infinitely ( or close to infinitely ) varied background using linear-gradients
and prime numbers.</p>
<p>Here's how I did it.</p>
<p>Pen: <a href="https://codepen.io/loficodes/pen/jXXzZE" title="https://codepen.io/loficodes/pen/jXXzZE">https://codepen.io/loficodes/pen/jXXzZE</a></p>
<p>The Cicada Principle and Why It Matters to Web Designers: <a href="https://www.sitepoint.com/the-cicada-principle-and-why-it-matters-to-web-designers/" title="https://www.sitepoint.com/the-cicada-principle-and-why-it-matters-to-web-designers/">https://www.sitepoint.com/the-cicada-principle-and-why-it-matters-to-web-designers/</a></p>
<p>List of primes: <a href="https://primes.utm.edu/lists/small/1000.txt" title="https://primes.utm.edu/lists/small/1000.txt">https://primes.utm.edu/lists/small/1000.txt</a></p>
<p>Prime Repetition Calculation: <a href="https://codepen.io/loficodes/pen/NLLVOV" title="https://codepen.io/loficodes/pen/NLLVOV">https://codepen.io/loficodes/pen/NLLVOV</a></p>
<p>Basement Jaxx Pen: <a href="https://codepen.io/loficodes/pen/yGwoaO" title="https://codepen.io/loficodes/pen/yGwoaO">https://codepen.io/loficodes/pen/yGwoaO</a></p>
<p>Variation 1: <a href="https://codepen.io/loficodes/pen/WLPKNa" title="https://codepen.io/loficodes/pen/WLPKNa">https://codepen.io/loficodes/pen/WLPKNa</a></p>
<p>Variation 2: <a href="https://codepen.io/loficodes/pen/VqgBYp" title="https://codepen.io/loficodes/pen/VqgBYp">https://codepen.io/loficodes/pen/VqgBYp</a></p>
<p>Variation 3: <a href="https://codepen.io/loficodes/pen/ZVwjpz" title="https://codepen.io/loficodes/pen/ZVwjpz">https://codepen.io/loficodes/pen/ZVwjpz</a></p>
<p>Variation 4: <a href="https://codepen.io/loficodes/pen/PXVBKB" title="https://codepen.io/loficodes/pen/PXVBKB">https://codepen.io/loficodes/pen/PXVBKB</a></p>
<p>Variation 5: <a href="https://codepen.io/loficodes/pen/dwajdZ" title="https://codepen.io/loficodes/pen/dwajdZ">https://codepen.io/loficodes/pen/dwajdZ</a></p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/Mmnlm_PzozA?autoplay=1'>
      <img src='https://img.youtube.com/vi/Mmnlm_PzozA/sddefault.jpg' />
      Watch Basement Jaxx album cover with CSS and Prime Numbers on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/Mmnlm_PzozA?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/Mmnlm_PzozA/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="Basement Jaxx album cover with CSS and Prime Numbers"
    name="Basement Jaxx album cover with CSS and Prime Numbers"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
    
      <item>
        <title>Animation Fill Mode</title>
        <link>https://davidfitz.dev/pen/animation-fill-mode/</link>
        <guid isPermaLink="true">https://davidfitz.dev/pen/animation-fill-mode/</guid>
        <pubDate>Fri Jan 04 2019 12:44:12 GMT+0000 (Coordinated Universal Time)</pubDate>
        <content:encoded>
          <![CDATA[
            <script>
    const pen = "REMPOK";
    const penHeight = 200;
    const title = "Animation Fill Mode";
</script>
<script src="/comp/codepen/script.js"></script>
<link rel="stylesheet" href="/comp/codepen/style.css" />
<noscript>
  <a href="https://codepen.io/loficodes/pen/REMPOK">Check out "Animation Fill Mode" on CodePen</a>
</noscript>
<div class="pen">
  <img
    src="https://codepen.io/loficodes/pen/REMPOK/image/small.png"
    alt=Animation Fill Mode
  />
</div>
<p>Learn about the animation-fill-mode property and the great control it gives you over the states of elements before, during, and after an animation is applied to it.</p>
  <link rel='stylesheet' href='/comp/youtube/style.css' />
  <noscript>
    <a
    href='https://www.youtube.com/embed/zpn4aU-yXF0?autoplay=1'>
      <img src='https://img.youtube.com/vi/zpn4aU-yXF0/sddefault.jpg' />
      Watch Animation Fill Mode on YouTube
    </a>
  </noscript>
  <iframe
    class="w-full object-contain"
    srcdoc="
      <a
          href='https://www.youtube.com/embed/zpn4aU-yXF0?autoplay=1'
          class='youtubeembed'
      >
          <img
        src='https://img.youtube.com/vi/zpn4aU-yXF0/sddefault.jpg'
        class='youtubeembed'
          />
          <svg
        version='1.1'
        viewBox='0 0 68 48'
        width='68px'
        style='position: relative;'
          >
        <path d='M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z' fill='#f00'></path>
        <path d='M 45,24 27,14 27,34' fill='#fff'></path>
          </svg>
      </a>
    "
    title="Animation Fill Mode"
    name="Animation Fill Mode"
    allow="accelerometer; autoplay; encrypted-media; gyroscope;
    picture-in-picture"
    frameBorder="0"
    webkitallowfullscreen="true"
    mozallowfullscreen="true"
    width="600"
    height="400"
    allowFullScreen
    aria-hidden="true"></iframe>
<style>
iframe {
  max-width: 100%;
  margin: 1rem auto 1rem;
  display: block;
}
</style>

          ]]>
        </content:encoded>
        <language>en-ie</language>
      </item>
  </channel>
</rss>