<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>blog.NOVALISTIC</title>
	<atom:link href="https://blog.novalistic.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.novalistic.com</link>
	<description>The online home of Singapore-based software developer Daniel Tan aka BoltClock.</description>
	<lastBuildDate>Wed, 08 Mar 2023 15:57:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">1172979</site>	<item>
		<title>20 years of NOVALISTIC.com!</title>
		<link>https://blog.novalistic.com/archives/2021/11/20-years-of-novalistic/</link>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Tue, 02 Nov 2021 13:30:16 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[NOVALISTIC.com]]></category>
		<category><![CDATA[Life]]></category>
		<guid isPermaLink="false">https://blog.novalistic.com/?p=1776</guid>

					<description><![CDATA[Today marks 20 years since the domain NOVALISTIC.com was first registered!]]></description>
										<content:encoded><![CDATA[<figure>
<div><img fetchpriority="high" decoding="async" src="https://novalistic.com/images/logos/novalistic/novalgen_2.0.png" alt="NOVALISTIC Novalgen Logo, a glowing green spherical letter N with five overlapping, also glowing green electron shells to represent my favorite number, 5" height="225" width="225"> <img decoding="async" src="https://novalistic.com/images/logos/novalistic/n_256-256.png" srcset="https://novalistic.com/images/logos/novalistic/n_512-512.png 2x" alt="NOVALISTIC 'N' Logo, a similar green spherical N with a slightly smaller glow radius, an inner halo, and a glossy sheen" height="256" width="256"></div><figcaption>The Novalgen logo used in NOVALISTIC 2.0, and the &#8216;N&#8217; logo in use since NOVALISTIC 3.0 &#8220;Oltanis&#8221;.</figcaption></figure>
<p>Today, November 2, 2021, marks <strong>20 years since the domain NOVALISTIC.com was first registered</strong>, originally by my dad in support of my big brother for his personal website. To this day I don&#8217;t know how my brother came up with the name&#8230; but it&#8217;s unique, it&#8217;s (somewhat) pronounceable<sup id="fnref-1776-1"><a href="#fn-1776-1" class="jetpack-footnote">1</a></sup> <sup id="fnref-1776-2"><a href="#fn-1776-2" class="jetpack-footnote">2</a></sup>, and it&#8217;s got a certain timelessness that appeals to me. Which is why I was more than thrilled to take it so I could say I had my very own online domain name at the age of just ten, two years after first learning HTML at the age of eight (two years is a long time when your age is still a single digit!).</p>
<p>The fact that its first three syllables happen to be exactly the same as the name of a planet in the first Ratchet &amp; Clank game that came out the same year I took ownership of the domain is merely the icing on the cake!</p>
<p>You&#8217;d think a lot could&#8217;ve happened in 20 years. Well, a lot <em>did</em> happen, but not the kind of &#8220;a lot&#8221; you might expect. But still — in the interest of not being overly introspective in what is meant to be a quick commemorative post and an update of what&#8217;s going on — what my site has been through over the last two entire <em>decades</em>, what I&#8217;ve been through growing up together with the site, is pretty bittersweet to look back on.</p>
<p>From my brother&#8217;s teenage whims when he first owned the domain, then <em>my</em> eclectic childhood whims that made NOVALISTIC 1.5; up to my better-developed, standards-compliant personal online space in NOVALISTIC 2.0; past what NOVALISTIC 3.0 &#8220;Oltanis&#8221; aspired to be; through BoltPress 2.0 followed by a bona fide professional portfolio in NOVALISTIC 4.0 &#8220;Sarathos&#8221;; and back to my roots in NOVALISTIC 5.0 &#8220;Veldin&#8221;, where I can be my most authentic, personal and passionate self&#8230; it&#8217;s been, indeed, unquestionably a lot, even if I know due to my own insider knowledge there could&#8217;ve been so much more. And so I don&#8217;t want to beat myself up too much over it. Instead, what I have is an opportunity to congratulate myself on going through all this, iterating and learning, and doing it all with God even in the years before I knew Him personally.</p>
<p>The last day of this month will be the 6th anniversary of <a href="https://blog.novalistic.com/archives/2015/11/veldin">NOVALISTIC 5.0 &#8220;Veldin&#8221;</a>. This version of the site never actually reached my original vision for it, and indeed has evidently been falling into disrepair over the last couple of years.</p>
<p>Someone reached out to me through my contact form just last month inquiring about the <a href="https://novalistic.com/stuff/lego">LEGO Room</a>, which shows that people are still interested in my site and what I do. So, tough as it&#8217;s been for me, this month I will honestly, definitely, wholeheartedly make a renewed best effort to update my site again. The web platform and the technologies underpinning it have changed tremendously in such a short time (and &#8220;short&#8221; here is not the memetic exaggeration of the passage of time people have liked throwing around over the course of the pandemic), which means I&#8217;ll even have to re-learn certain things. I&#8217;d have to do so sooner or later anyway&#8230; so I might as well start with the safest space that is my own website, and start this month so I&#8217;ll be at a decent pace once 2022 comes around.</p>
<p>What this means is that, before the end of the year, my site will look pretty different beyond the home page (which will itself see one noticeable but not at all radical change). In fact, different enough to probably warrant a 6.0 version number (in time for the 6th anniversary) and a new codename&#8230; but it&#8217;ll match the original vision I had, thereby finally bringing 5.0 &#8220;Veldin&#8221; to a sort of finished state. You know what I mean; no need for additional comments to clarify, I won&#8217;t be approving those for the sake of reducing clutter.</p>
<p>I can&#8217;t really say I&#8217;m excited for this change; I don&#8217;t think &#8220;excited&#8221; is quite the right word for it due to the season I&#8217;ve been going through. But I&#8217;m feeling cautiously optimistic about it, and I can also feel my motivation creeping back in, and all I need now is for it to stay. I want my site to be the best it can be. And I want to show myself that I can do the work to make it happen. After all, I already did the work to make what you&#8217;re seeing right now happen. And I can do more.</p>
<p>See also, on this day last year: <a href="https://blog.novalistic.com/archives/2020/11/where-is-daniel-now">:where(:is(#daniel.now))</a></p>
<div class="footnotes">
<hr>
<ol>
<li id="fn-1776-1">
It was only last month that I finally met someone IRL who pronounced the name correctly the first time. I was so surprised and impressed, I just had to tell her.&#160;<a href="#fnref-1776-1">&#8617;</a>
</li>
<li id="fn-1776-2">
You can find the pronunciation in the <a href="https://novalistic.com/about">About page</a>.&#160;<a href="#fnref-1776-2">&#8617;</a>
</li>
</ol>
</div>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1776</post-id>	</item>
		<item>
		<title>Talk.CSS #56 with Eric Meyer and Daniel Tan</title>
		<link>https://blog.novalistic.com/archives/2020/11/talkcss-56/</link>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Wed, 04 Nov 2020 15:00:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Selectors]]></category>
		<category><![CDATA[Talk.CSS]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[Accessibility]]></category>
		<guid isPermaLink="false">https://blog.novalistic.com/?p=1717</guid>

					<description><![CDATA[For the last ever Talk.CSS, I presented my first ever CSS talk.]]></description>
										<content:encoded><![CDATA[<p>Remember in my last blog post I said Talk.CSS #56 would be a big one for me? Here&#8217;s why:</p>
<p class="bse"><strong><strong><strong><!-- Big strong emphasis is emphatically proud! -->I presented my first ever CSS talk.</strong></strong></strong></p>
<p>And I wasn&#8217;t alone in giving a talk today. I would have my turn&#8230; right after <a href="https://meyerweb.com">Eric Meyer</a>.</p>
<span class="embed-youtube" style="text-align:center; display: block;"><iframe class="youtube-player" width="640" height="360" src="https://www.youtube.com/embed/YRXq0DSMR98?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox"></iframe></span>
<p>Timestamps, courtesy of <a href="https://stackoverflow.com/users/3773011/makyen">Makyen</a>:</p>
<ol>
<li>19:25 for Eric&#8217;s talk, <i>Design in the background</i>. Or <a href="https://www.youtube.com/watch?v=2q15vuBrhXY">watch separately via Engineers.SG</a>.</li>
<li>58:48 for my talk, <i>Introducing <code>:is()</code> and <code>:where()</code></i>. Or <a href="https://www.youtube.com/watch?v=qGC683FOIpg">watch separately via Engineers.SG</a>.</li>
</ol>
<p>Before I get to the part about me, some brief thoughts on Hui Jing&#8217;s and Eric&#8217;s sharings:</p>
<ul>
<li>I was utterly gobsmacked when the emoji Hui Jing used for my talk title (as she always does with talk titles) turned out to be 🐙. How did she know the octopus was my favorite marine animal?! At the end of my talk she said it was a guess. Georgie, who thought it was <em>my</em> doing, said it was a &#8220;damn good guess&#8221; (her exact words), and I have to agree.</p>
</li>
<li>
<p>Before the event even started, I was secretly hoping that the CSS color of this month would be <span class="rebeccapurple"><code>rebeccapurple</code></span>, in honor of Eric. And well, I totally called it. And it was spectacular, wonderful and bittersweet at the same time. I&#8217;m sure a few heartstrings were pulled — I know mine was. There&#8217;s a reason I use it here on NOVALISTIC.com, too, which I&#8217;m super happy I got to tell Eric himself in as direct and personal a manner as this.</p>
</li>
<li>
<p>I was there when Eric unveiled his site redesign, <a href="https://meyerweb.com/eric/thoughts/2020/04/13/hamonshu">Hamonshū</a>, after <a href="https://css-naked-day.github.io/2020.html">CSS Naked Day 2020</a> (which I participated in as well!). He would publish an article as well about the background effects he implemented, so it came as no surprise, I said, that he&#8217;d develop a talk about it. That&#8217;s not a bad thing; it was great to be able to listen to him speak about it and get a visual insight into the process. Even if I was somewhat preoccupied with trying to keep my nerves (in fact, throughout both Hui Jing&#8217;s and Eric&#8217;s segments I was constantly talking to Georgie privately in the Zoom meeting chat)&#8230;</p>
</li>
<li>
<p>I&#8217;d like to extend my utmost gratitude to not only Hui Jing but also Eric and the rest of the audience for allowing me extra time to calm down until I was ready to share my screen and start talking, during which time Hui Jing shared some fun facts about me and dove into a chat with Chris, as filler. Thank you all for your patience, which you continued by my request in the first slide of mine you saw!</p>
</li>
</ul>
<p>So, getting to my talk now. Why the sudden decision to put together a presentation on PowerPoint about Selectors, my favorite thing? Because of this:</p>
<div class="twitter-tweet">
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr">We are incredibly honoured to have <a href="https://twitter.com/meyerweb?ref_src=twsrc%5Etfw">@meyerweb</a> speak at Talk.CSS next month. It&#39;s surreal to think that we have been around for 5 years now. Please join us (online) for this wind-up edition on 4 Nov. Details in the link :)<a href="https://t.co/bEISlxp2Ju">https://t.co/bEISlxp2Ju</a></p>
<p>&mdash; SingaporeCSS 🇸🇬 (@SingaporeCSS) <a href="https://twitter.com/SingaporeCSS/status/1320182572823891968?ref_src=twsrc%5Etfw">October 25, 2020</a></p></blockquote>
</div>
<p>While it was super cool that we actually managed to get Eric to share with us, it was the last part of the tweet that had me shook: &#8220;this wind-up edition&#8221;. That&#8217;s right: Talk.CSS #56 was going to be the last ever Talk.CSS (meetup in this format, anyway).</p>
<p>You see, after I started speaking for the first time at Talk.CSS #46 at the beginning of the year, I had written <a href="https://blog.novalistic.com/archives/2020/01/talkcss-46/#fn-1640-1">this footnote</a>:</p>
<p><span id="more-1717"></span></p>
<blockquote cite="https://blog.novalistic.com/archives/2020/01/talkcss-46#fn-1640-1">
<p>You might be wondering why I haven&#8217;t made the obligatory &#8220;putting the &#8216;talk&#8217; in Talk.CSS&#8221; quip&#8230; that&#8217;s because I&#8217;m not ready to give a full-on talk just yet. But maybe someday! I&#8217;m mostly just not comfortable being recorded (something Engineers.SG is <em>really</em> efficient at by the way). Much rather a written article were shared.</p>
</blockquote>
<p>And since I hadn&#8217;t been attending Talk.CSS all year (except in March), this would be my <em>only</em> chance to present a talk at Talk.CSS, before the curtain call. So I had only a little over a <em>week</em> to acquire equipment, think of a topic, put together said PowerPoint presentation, and practice. And I only managed to do all but the last one.</p>
<p>But I guess it didn&#8217;t matter that I didn&#8217;t get to practice, because I didn&#8217;t need it. In my very limited experience with presentations (due to anxiety and <a href="https://blog.novalistic.com/archives/2018/10/selective-mutism-awareness-month">selective mutism</a>), and my <em>extensive</em> experience answering questions on Stack Overflow, I&#8217;ve always known that I was a decent presenter, and I just needed the right, limited audience to feel safe and comfortable speaking. Presenting virtually on a Zoom conference was another great way to get me comfortable as well.</p>
<p>I told <a href="https://hey.georgie.nu">Georgie</a>, as well as the other Stack Overflow mods (mostly because Samuel happened to have been a regular attendee), and some folks from church. And they came to support me, alongside Hui Jing, Chris, and Eric. I shout these folks out at various points in my talk.</p>
<p>So&#8230; I have, indeed and at last, put the &#8216;talk&#8217; in Talk.CSS. And I had the utmost honor of having Eric Meyer listen to my very first talk. I&#8217;m glad people learned something new from it.</p>
<div class="twitter-tweet">
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr">☑ Went from being 100% non-verbal, to speaking my first ever tech talk<br />☑ Spoke at the same event as <a href="https://twitter.com/meyerweb?ref_src=twsrc%5Etfw">@meyerweb</a> <a href="https://t.co/NnYLjDwLzo">https://t.co/NnYLjDwLzo</a></p>
<p>&mdash; Daniel Tan (@NOVALISTIC) <a href="https://twitter.com/NOVALISTIC/status/1323986094724059142?ref_src=twsrc%5Etfw">November 4, 2020</a></p></blockquote>
</div>
<p>I only <code>&lt;tongue-in-cheek&gt;</code>regret<code>&lt;/tongue-in-cheek&gt;</code> the following misses:</p>
<ul>
<li>I didn&#8217;t get to say &#8220;NOVALISTIC&#8221; out loud. (Wait, did I at the final slide? I actually don&#8217;t remember.)</li>
<li>I didn&#8217;t get to reference the title of <a href="https://blog.novalistic.com/archives/2020/11/where-is-daniel-now">the previous blog post</a>.</li>
<li>My playful flexbox diss was supposed to be addressed to &#8220;flexbox fans&#8221; rather than the &#8220;flexbox users&#8221; I actually said.</li>
<li>I mentioned that I might&#8217;ve used the color <span class="rebeccapurple"><code>rebeccapurple</code></span> somewhere in my slides. Turns out the only slides I did use it in had been cut. Oops.</li>
</ul>
<p>Lastly, if you&#8217;ll indulge me, a couple of screenshots of the <a href="https://singaporecss.github.io/56">event page</a> for posterity before its layout goes through the typical archival metamorphosis:</p>
<a href="https://files.novalistic.com/blog/2020/11/47.png"><img loading="lazy" decoding="async" src="https://files.novalistic.com/blog/2020/11/47.png" alt="Design in the background by Eric Meyer: Our designs are filled with elements, and every element has its own background area, where a potentially infinite number of layers can be created. Eric will explore a number of ways to use that design space in ways both eye-catching and subtle. Introducing :is() and :where() by Daniel Tan: After many years, we’re finally close to using :is() and :where() to simplify our selectors everywhere. Daniel shares what these pseudo-classes are all about." height="307" width="939"></a>
<a href="https://files.novalistic.com/blog/2020/11/48.png"><img loading="lazy" decoding="async" src="https://files.novalistic.com/blog/2020/11/48.png" alt="Eric A. Meyer (@meyerweb) is an author, speaker, blogger, teacher, consultant, and co-founder of An Event Apart. He’s been working on the Web since 1993 and still finds it deeply compelling. Daniel (@NOVALISTIC) got their start on the web writing HTML on Neopets at the wee age of 8. You may know them as BoltClock from their Flash animations on Newgrounds or their HTML/CSS contributions on Stack Overflow." height="416" width="638"></a>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1717</post-id>	</item>
		<item>
		<title>:where(:is(#daniel.now))</title>
		<link>https://blog.novalistic.com/archives/2020/11/where-is-daniel-now/</link>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Mon, 02 Nov 2020 14:30:16 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[NOVALISTIC.com]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[LEGO®]]></category>
		<guid isPermaLink="false">https://blog.novalistic.com/?p=1710</guid>

					<description><![CDATA[As a strange year comes to an end, the 19th anniversary of NOVALISTIC.com the domain name sees us touch base.]]></description>
										<content:encoded><![CDATA[<aside>
<p>Strictly speaking, the selector in the title should&#8217;ve been simply <code>:where(#daniel.now)</code>, and better yet it could&#8217;ve been <code>:where(#daniel:current)</code>, but these wouldn&#8217;t have made for grammatical titles. Besides, you <em>are</em> allowed to nest <code>:is()</code> in <code>:where()</code> anyway. My only regret is that it overflows the Live Tile on my home page.</p>
<p>This is also not the announcement that the Stack Overflow community may have been awaiting ever since I stated my intention to publish one last September.</p>
</aside>
<p>Hey there. How are you doing? I hope you are well.</p>
<p>The COVID-19 outbreak has thrown everyone for a loop in both direct and indirect ways, and (I&#8217;m sure you and) I have been no exception. I&#8217;m happy to report that I have not caught the virus (Singapore has handled it well, <em>for certain definitions of &#8220;well&#8221; I won&#8217;t get into</em>), and will take utmost care to keep it that way.</p>
<p>My plan, as outlined in my <a href="https://blog.novalistic.com/archives/2020/01/its-my-28th-birthday">birthday post for the year</a>, was described thusly:</p>
<blockquote cite="https://blog.novalistic.com/archives/2020/01/its-my-28th-birthday">
<p>In the short term (i.e. sometime this month) I plan to update <a href="https://novalistic.com/stuff/battlestation">my battlestation</a> with my biggest incremental update to Radiance yet. Beyond that I will continue to work on the updates to the <a href="https://novalistic.com/stuff/lego">LEGO Room</a> that I mentioned <a href="https://blog.novalistic.com/archives/2019/01/its-my-27th-birthday">last year</a>, as well as miscellaneous housekeeping elsewhere on my site.</p>
<p>But in general, I will be taking things slow. I wish I didn&#8217;t have to, but right now I have to if I want to keep it together for a little longer, and to be clear it&#8217;s still a nice thing to be able to do, not something I&#8217;m reluctantly settling for. Talk to you later.</p>
</blockquote>
<p>That biggest incremental update to Radiance yet actually happened. Praise God! However due to world-changing events that took place soon after, I never got to work on the LEGO Room. I&#8217;m still actively pursuing my LEGO hobby, but I just haven&#8217;t had the energy to also update the site along with it. Furthermore, in March <a href="https://brickset.com/article/49510/new-version-of-brickset-api-now-available">a new version of the Brickset API was released</a>, with the current version on which my site depends no longer functional as of this writing. This has not broken the LEGO Room in any way, but it has prevented me from updating my collection until I finish upgrading it to the new API. <em>That</em> is indeed in progress but, for obvious reasons, will take a while.</p>
<p>Having said that, I <em>have</em> indeed been taking things slow; in fact, slower this year than any other year. I&#8217;ve been focusing my time on recuperating mentally at home, and navigating the &#8220;perilous&#8221; new normal outside world as it slowly reopens. I&#8217;ve been playing plenty of video games (the then-newly released DOOM Eternal actually saved me from a crisis, believe it or not, and remains one of my favorite games of the year). I wrote only <a href="https://blog.novalistic.com/archives/2020/03/array-every-array-some-performance">a single technical article</a> (not counting <a href="https://blog.novalistic.com/archives/2020/01/talkcss-46">Talk.CSS #46</a>) <em>and it was about JavaScript</em>, and have left my site pretty much dormant and been nearly completely inactive on Stack Overflow. I even stepped down as a Microsoft MVP and am now in the MVP Reconnect program.</p>
<p>And I suspect I will continue to take things slow for the foreseeable future. But I&#8217;ll be at <a href="https://singaporecss.github.io/56">Talk.CSS #56</a> tomorrow after months of not attending, and it&#8217;ll be a big one for me. Maybe I&#8217;ll see you there.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1710</post-id>	</item>
		<item>
		<title>Performance of Array.prototype.every(), Array.prototype.some()</title>
		<link>https://blog.novalistic.com/archives/2020/03/array-every-array-some-performance/</link>
					<comments>https://blog.novalistic.com/archives/2020/03/array-every-array-some-performance/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Mon, 30 Mar 2020 11:30:37 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">https://blog.novalistic.com/?p=1664</guid>

					<description><![CDATA[Some analysis of these two functions as they perform in different browsers.]]></description>
										<content:encoded><![CDATA[<p>I was writing a userscript a couple of weeks ago and had the opportunity to use <code>Array.prototype.every()</code>/<code>some()</code> for the first time. (I only needed one of them — I ended up going with <code>some()</code> for semantics reasons.)</p>
<p>This wasn&#8217;t a performance-critical context, but nevertheless I started to wonder if <code>every()</code> would immediately return false as soon as it found an element that didn&#8217;t meet the condition, and <code>some()</code> would immediately return true as soon as it found an element that did meet the condition.</p>
<p>MDN states that they do, but I wanted to see some numbers. So I ran a handful of quick n&#8217; dirty tests in the Firefox console to check it out. For the sake of organization, here&#8217;s the setup:</p>
<pre><code class="language-js">function bench(label, test, loops) {
    loops = +loops || 10;
    let t = [];

    for (let i = 0; i &lt; loops; ++i) {
        let tt = performance.now();
        test();
        t.push(performance.now() - tt);
    }

    let avg = Math.round(t.reduce((a, b) =&gt; a + b) / loops);
    console.log(`${label}: ${avg}ms avg of ${loops}`);
    return t.map(Math.round);
}

const a = [1, 1, 1, 1, 1, 1, 1, 1], b = [0, 0, 0, 0, 0, 0, 0, 0];
const isEqualToOne = n =&gt; n === 1;
</code></pre>
<p>Here are the tests:</p>
<pre><code class="language-js">bench('every() is true', () =&gt; {
    for (let i = 0; i &lt; 10_000_000; ++i)
        a.every(isEqualToOne);
});

bench('every() is false', () =&gt; {
    for (let i = 0; i &lt; 10_000_000; ++i)
        b.every(isEqualToOne);
});

bench('some() is true', () =&gt; {
    for (let i = 0; i &lt; 10_000_000; ++i)
        a.some(isEqualToOne);
});

bench('some() is false', () =&gt; {
    for (let i = 0; i &lt; 10_000_000; ++i)
        b.some(isEqualToOne);
});
</code></pre>
<p>Here are the relevant computer specs:</p>
<ul>
<li>Windows 10, version 1909 (build 18363.720)</li>
<li>AMD Ryzen 7 2700X (8 cores, 16 threads, tests running at 4.0 GHz via Precision Boost 2)</li>
<li>16 GB DDR4-3200 RAM</li>
</ul>
<p>And here are the results in Firefox 74.0:</p>
<pre><samp>every() is true: 1501ms avg of 10
every() is false: 1382ms avg of 10
some() is true: 1339ms avg of 10
some() is false: 1459ms avg of 10
</samp></pre>
<p>It looks like there is indeed a difference, albeit a small one. Specifically,</p>
<ul>
<li><code>Array.prototype.every()</code> returns false 7.9% faster when the first of 8 elements doesn&#8217;t meet its condition, than it returns true for all elements; and</li>
<li><code>Array.prototype.some()</code> returns true 8.2% faster than it returns false, in similar circumstances.</li>
</ul>
<p>I wanted to see how the results compared in other browsers, so I attempted to run these tests in both the new and legacy versions of Microsoft Edge, as well as Chrome. In doing so, I discovered that V8 and Chakra appear to cache function calls after the first couple of iterations, causing subsequent iterations to clock far shorter times and invalidating the output of <code>bench()</code>.</p>
<p>Frustratingly, there does not appear to be a way to disable this behavior, so I had to <em>significantly</em> decrease the iteration count using the <code>loops</code> parameter I just happened to have had the foresight to include. I also had to decrease the number of calls to <code>every()</code> and <code>some()</code> in Edge Legacy and increase it in the new Edge and in Chrome to get reasonable times.</p>
<p>Here are the results:</p>
<ul>
<li>Edge Legacy 44.18362.449.0:
<pre><samp>every() is true: 2451ms avg of 3
every() is false: 1897ms avg of 3
some() is true: 1811ms avg of 3
some() is false: 2488ms avg of 3
</samp></pre>
<li>Edge 80.0.361.69:
<pre><samp>every() is true: 467ms avg of 2
every() is false: 153ms avg of 2
some() is true: 154ms avg of 2
some() is false: 424ms avg of 2
</samp></pre>
<li>Chrome 80.0.3987.149:
<pre><samp>every() is true: 465ms avg of 2
every() is false: 153ms avg of 2
some() is true: 156ms avg of 2
some() is false: 428ms avg of 2
</samp></pre>
</ul>
<p>(Yes, I really did have to limit it to just 2 iterations in V8 before it started caching.)</p>
<p>The difference appears significantly larger in Chakra at 22.6%/27.2% faster, and is just ridiculous in V8 at a whopping <strong>67%</strong>/<strong>64%</strong> faster. It&#8217;s not immediately clear to me why when I compare the source implementations, so perhaps someone more familiar with the code might be able to shed some light? It doesn&#8217;t help that the SpiderMonkey and ChakraCore implementations are literally just JavaScript, so it&#8217;s got to be something way under the hood. But here are the links anyway:</p>
<ul>
<li>SpiderMonkey: <a href="https://github.com/mozilla/gecko-dev/blob/master/js/src/builtin/Array.js#L84">https://github.com/mozilla/gecko-dev/blob/master/js/src/builtin/Array.js#L84</a></li>
<li>ChakraCore: <a href="https://github.com/microsoft/ChakraCore/blob/master/lib/Runtime/Library/JsBuiltIn/JsBuiltIn.js#L591">https://github.com/microsoft/ChakraCore/blob/master/lib/Runtime/Library/JsBuiltIn/JsBuiltIn.js#L591</a></li>
<li>V8: <a href="https://github.com/v8/v8/blob/master/src/builtins/array-every.tq">https://github.com/v8/v8/blob/master/src/builtins/array-every.tq</a> and <a href="https://github.com/v8/v8/blob/master/src/builtins/array-some.tq">https://github.com/v8/v8/blob/master/src/builtins/array-some.tq</a></li>
</ul>
<p>All told, since I was just writing a userscript for Firefox, which is my daily driver, for personal use, I&#8217;m not too worried. But I did learn a thing or two about <code>Array.prototype.every()</code> and <code>Array.prototype.some()</code>, more than I bargained for, and I thought it might interest other JS performance junkies, which is why I&#8217;ve blogged about it. Hope you learned from it, too.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.novalistic.com/archives/2020/03/array-every-array-some-performance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1664</post-id>	</item>
		<item>
		<title>Talk.CSS #46</title>
		<link>https://blog.novalistic.com/archives/2020/01/talkcss-46/</link>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Wed, 08 Jan 2020 15:45:27 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Talk.CSS]]></category>
		<category><![CDATA[Health]]></category>
		<category><![CDATA[Accessibility]]></category>
		<guid isPermaLink="false">https://blog.novalistic.com/?p=1640</guid>

					<description><![CDATA[My first Talk.CSS blog post in a while, with my first breakthrough in 1.5 years of attending!]]></description>
										<content:encoded><![CDATA[<p>Well, I haven&#8217;t blogged about Talk.CSS since <a href="https://blog.novalistic.com/tags/talk.css">my first two times there</a>. That&#8217;s not good. I had a few more but I never got around to them due to chronic illness, executive dysfunction and whatnot. But today, the only thing I&#8217;m down with (and have been since Tuesday) is a throat infection that hasn&#8217;t gotten worse yet, so I&#8217;m making the most of tonight by pushing this one out.</p>
<p>So I went to Talk.CSS today, the first of the year. This time it&#8217;s at Microsoft Singapore&#8217;s new office at Frasers Tower. It would be my first time there after my last visit to the old office for last year&#8217;s Insider Dev Tour, so I was <strong>pumped</strong>.</p>
<p>But this being a new environment, I had to take precautions to ensure things went as smoothly as possible. To that end I pinged Hui Jing and Gao Wei on Twitter:</p>
<div class="twitter-tweet">
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr"><a href="https://twitter.com/hj_chen?ref_src=twsrc%5Etfw">@hj_chen</a> <a href="https://twitter.com/wgao19?ref_src=twsrc%5Etfw">@wgao19</a> What time y&#39;all setting up tomorrow? Thinking of being there super duper early to calm my nerves.</p>
<p>&mdash; Daniel Tan (@NOVALISTIC) <a href="https://twitter.com/NOVALISTIC/status/1214552404718276610?ref_src=twsrc%5Etfw">January 7, 2020</a></p></blockquote>
</div>
<p>And then I had the brilliant idea of going through Sarah, my Microsoft MVP contact from Microsoft Singapore, as well. It would be my first time meeting her in person. She said she&#8217;d pick me up after finishing her meeting; I couldn&#8217;t go inside so I waited at the lobby for her.</p>
<p>Turns out, when I first got to the lobby, I was so calm that I could confidently decide to tweet this to the former two:</p>
<div class="twitter-tweet">
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr"><a href="https://twitter.com/truckerfling?ref_src=twsrc%5Etfw">@truckerfling</a> knows I&#39;m here.</p>
<p>Also, don&#39;t get too excited when you hear my voice later&#8230; because you will hear my voice.</p>
<p>&mdash; Daniel Tan (@NOVALISTIC) <a href="https://twitter.com/NOVALISTIC/status/1214857680411447297?ref_src=twsrc%5Etfw">January 8, 2020</a></p></blockquote>
</div>
<p>That&#8217;s right: even before I&#8217;d set foot in the new office, my <a href="https://blog.novalistic.com/archives/2018/10/selective-mutism-awareness-month">selective mutism</a> was already a no-show. This could have partly been because I made it a point to be early so I had time to collect myself, but I&#8217;m serious, it&#8217;s all Microsoft. My 11 years of guaranteed speech at the old office appear to have carried over seamlessly.</p>
<p>Anyway, Sarah came to pick me up first; it would be another 10 minutes before Hui Jing got there. Naturally, she was the first person I spoke to.</p>
<p>And here I was, at Microsoft Singapore&#8217;s new office at Frasers Tower:</p>
<a href="https://files.novalistic.com/blog/2020/01/20200108_104408491_iOS.jpg"><img loading="lazy" decoding="async" src="https://files.novalistic.com/blog/2020/01/20200108_104408491_iOS-576x432.jpg" alt="The Microsoft logo at the new Singapore office." width="576" height="432" class="size-medium wp-image-1643" srcset="https://files.novalistic.com/blog/2020/01/20200108_104408491_iOS-576x432.jpg 576w, https://files.novalistic.com/blog/2020/01/20200108_104408491_iOS-768x576.jpg 768w, https://files.novalistic.com/blog/2020/01/20200108_104408491_iOS-1024x768.jpg 1024w, https://files.novalistic.com/blog/2020/01/20200108_104408491_iOS.jpg 2048w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a>
<p>Read on for Hui Jing&#8217;s reaction to hearing my voice for the first time and, of course, the talks themselves! I know the talks are probably what you came here for but this experience was particularly important to me so I just had to share. Let a disabled person have <a href="https://blog.novalistic.com/archives/2019/10/my-pronouns-are-they-them-and-he-him">their</a> limelight, won&#8217;t you?</p>
<p><span id="more-1640"></span></p>
<p>While it was still just me, Hui Jing and Sarah, with the former getting things ready and the latter about to head downstairs to check in attendees, I walked up to the former, showed her that second tweet, then said <i>Happy new year</i>, because she had first greeted me with the same. Immediately she beamed — in silence, but my point is that she beamed. And as people started coming in, I was able to keep speaking to her, <em>even with others in earshot this time</em>.</p>
<p>Finally, it was time for us to be seated and for the talks to start. With Sarah sharing <a href="https://cda.ms/1bM">this Microsoft Docs page on CSS in Microsoft Edge DevTools</a>, I felt silently (heh) important as a Microsoft Edge and CSS MVP. I just wish I could&#8217;ve strutted my stuff like I did at the Insider Dev Tour, but I wanted to let a lady have her limelight! (I didn&#8217;t take any more photos of the talks after this one.)</p>
<div class="twitter-tweet">
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr">Finally in the new Microsoft Singapore location for the first <a href="https://twitter.com/hashtag/talkcss?src=hash&amp;ref_src=twsrc%5Etfw">#talkcss</a> of the year! Here&#39;s <a href="https://twitter.com/truckerfling?ref_src=twsrc%5Etfw">@truckerfling</a> sharing about CSS <a href="https://twitter.com/docsmsft?ref_src=twsrc%5Etfw">@docsmsft</a>. As a stealth CSS MVP I feel like an important ninja. <a href="https://twitter.com/hashtag/MVPBuzz?src=hash&amp;ref_src=twsrc%5Etfw">#MVPBuzz</a> <a href="https://t.co/bHfu2tBAEz">pic.twitter.com/bHfu2tBAEz</a></p>
<p>&mdash; Daniel Tan (@NOVALISTIC) <a href="https://twitter.com/NOVALISTIC/status/1214870549635035137?ref_src=twsrc%5Etfw">January 8, 2020</a></p></blockquote>
</div>
<p>After Sarah finished her quick sharing, it was time for announcements. Engineers.SG, as usual, coming in hot with recordings available before the end of the day so you can watch it right now (and, if you&#8217;re new to SingaporeCSS, listen to all the Singlish goodness):</p>
<iframe loading="lazy" title="HTML &amp; CSS news for Jan 2020 - Talk.CSS #46" width="500" height="281" src="https://www.youtube.com/embed/I37a4prff98?feature=oembed&amp;wmode=transparent" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p>My non-Microsoft main boy Firefox shipped two new releases since the last Talk.CSS, whose release notes you can find below:</p>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/71">Firefox 71 for Developers</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/72">Firefox 72 for Developers</a></li>
</ul>
<p>Something intriguing and something groan-worthy from the announcements which I also highlighted on Twitter:</p>
<div class="twitter-tweet">
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr">Motion Path in CSS, now shipping in <a href="https://twitter.com/firefox?ref_src=twsrc%5Etfw">@firefox</a> 72, sounds like Motion Guides in Flash. I am ALL for this. <a href="https://twitter.com/hashtag/talkcss?src=hash&amp;ref_src=twsrc%5Etfw">#talkcss</a></p>
<p>&mdash; Daniel Tan (@NOVALISTIC) <a href="https://twitter.com/NOVALISTIC/status/1214872134364749825?ref_src=twsrc%5Etfw">January 8, 2020</a></p></blockquote>
</div>
<div class="twitter-tweet">
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr">Safari Technology Preview 97 now invalidates unitless zero &lt;time&gt;s. Only took it 12 years after it introduced CSS transitions (and 7 years after I called out all the other browsers)&#8230; <a href="https://twitter.com/hashtag/talkcss?src=hash&amp;ref_src=twsrc%5Etfw">#talkcss</a> <a href="https://t.co/xXmsaVVJlY">https://t.co/xXmsaVVJlY</a></p>
<p>&mdash; Daniel Tan (@NOVALISTIC) <a href="https://twitter.com/NOVALISTIC/status/1214883183608549377?ref_src=twsrc%5Etfw">January 8, 2020</a></p></blockquote>
</div>
<p>Then came the actual talks. First up was Ryan from TeamSpirit who gave a very fascinating (and probably eye-opening!) presentation on how culture permeates and shapes web design and user experience around the world. There were stark comparisons between American, Chinese and Japanese versions of several major websites, and an important closing message of diversity in teams.</p>
<iframe loading="lazy" title="Web design across different cultures - Talk.CSS #46" width="500" height="281" src="https://www.youtube.com/embed/NT2hoiR8qww?feature=oembed&amp;wmode=transparent" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p>Next, a talk by Sathish Kumar Thiyagarajan on why user experience makes a great product.</p>
<iframe loading="lazy" title="Why and for whom UX (really) matters - Talk.CSS #46" width="500" height="281" src="https://www.youtube.com/embed/JiqoWUlP578?feature=oembed&amp;wmode=transparent" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p>And finally, Murray who&#8217;s spoken about math previously returns with something less math-related. It&#8217;s to do with inaccessible email newsletters, specifically the horrific use of text in images where it doesn&#8217;t belong, and another sobering reminder that our pleas for accessibility still aren&#8217;t getting taken seriously, especially by the powers that be.</p>
<iframe loading="lazy" title="Text on Images - a Saga - Talk.CSS #46" width="500" height="281" src="https://www.youtube.com/embed/CEjxBfic2yk?feature=oembed&amp;wmode=transparent" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<p>Some particularly captivating content today which made the day even better. I&#8217;m glad. But what I&#8217;m most proud of, really, is my personal breakthrough. <strong>I was speaking at Talk.CSS<sup id="fnref-1640-1"><a href="#fn-1640-1" class="jetpack-footnote">1</a></sup> for the first time</strong> since I started attending it <a href="https://blog.novalistic.com/archives/2018/05/talkcss-28">a year and a half ago</a>. No doubt selective mutism will continue to affect me (because disability doesn&#8217;t just go away after a single breakthrough), but I&#8217;m really curious now if I&#8217;ll end up continuing to speak at future Talk.CSS meetups. There were several missing faces today who therefore haven&#8217;t had a chance to hear my voice yet and I&#8217;m nervous if I&#8217;ll be able to speak to them next time I see them. Only time will tell. (Yes, Gao Wei did eventually get to hear my voice too by the end of today.)</p>
<p>There was just one problem before we even got started with the event though: the food. You see, Talk.CSS often gets us pizza, which is all and well, except I can&#8217;t eat pizza from most places. It&#8217;s not a dietary issue; it&#8217;s an accessibility issue. I&#8217;d rather not talk about it on here, but let&#8217;s just say that the vast majority of food of all kinds is completely inaccessible to me, and hardly for dietary reasons. Thin crust pizza in particular gives me a very hard time. But I tend not to blame anyone for this — you can&#8217;t accommodate every single person at all times, and mine&#8217;s an <em>extreme</em> edge case, even among disabled folks.</p>
<p>But Sarah offered to help me search the office for utensils I could use. And when she couldn&#8217;t find any, she went down to a bakery just to get me something I could eat (since baked goods are some of the only accessible foods to me, and the pizza was right about depleted by now), and she&#8217;d cover the cost. <em>And</em> when she realized she wasn&#8217;t carrying any cash for one bakery <em>she went to a second one</em>. All while I sat in for the talks. Thank you so much, Sarah! Thanks for taking extra care of your guests/MVPs.</p>
<p>And Hui Jing, don&#8217;t worry too much over the event food. We&#8217;ll&#8230; think of something.</p>
<div class="footnotes">
<hr>
<ol>
<li id="fn-1640-1">
You might be wondering why I haven&#8217;t made the obligatory &#8220;putting the &#8216;talk&#8217; in Talk.CSS&#8221; quip&#8230; that&#8217;s because I&#8217;m not ready to give a full-on talk just yet. But maybe someday! I&#8217;m mostly just not comfortable being recorded (something Engineers.SG is <em>really</em> efficient at by the way). Much rather a written article were shared.&#160;<a href="#fnref-1640-1">&#8617;</a>
</li>
</ol>
</div>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1640</post-id>	</item>
	</channel>
</rss>
