Growing with the Web 2022-01-09T19:03:35+00:00 http://www.growingwiththeweb.com/ Daniel Imms Copyright (c) 2012-2021, Daniel Imms; all rights reserved. Inlining constants with const enums in TypeScript 2021-01-13T00:00:00+00:00 http://www.growingwiththeweb.com/2021/01/typescript-inline-const-enums <p><p>An often overlooked part of writing high performance JavaScript apps is to consider how your code will be compiled and minified.</p> </p><p><a href="http://www.growingwiththeweb.com/2021/01/typescript-inline-const-enums.html">Read the full article</></p> Readonly Typed Arrays in TypeScript 2020-10-22T00:00:00+00:00 http://www.growingwiththeweb.com/2020/10/typescript-readonly-typed-arrays <p><p>A proposal to add support for built-in readonly typed arrays <a href="https://github.com/microsoft/TypeScript/issues/37792">got rejected</a> by the TypeScript team. This post shows how to build your own.</p> </p><p><a href="http://www.growingwiththeweb.com/2020/10/typescript-readonly-typed-arrays.html">Read the full article</></p> Replacing Google Analytics 2020-07-11T00:00:00+00:00 http://www.growingwiththeweb.com/2020/07/replacing-google-analytics <p><p>I’ve been on Google Analytics pretty much since moving the site off of Blogger. Technically if you use GA now you require a cookie consent dialog which got me thinking why I actually use GA.</p> </p><p><a href="http://www.growingwiththeweb.com/2020/07/replacing-google-analytics.html">Read the full article</></p> Migrating xterm.js from TSLint to ESLint 2020-03-29T00:00:00+00:00 http://www.growingwiththeweb.com/2020/03/migrating-xtermjs-from-tslint-to-eslint <p><p>As you may know, <a href="https://github.com/palantir/tslint">TSLint</a> is now deprecated in favor of <a href="https://eslint.org/">ESLint</a> with the <a href="https://github.com/typescript-eslint/typescript-eslint">typescript-eslint</a> plugin. This post dives into how <a href="https://github.com/xtermjs/xterm.js/pull/2786">the migration</a> went in <a href="https://github.com/xtermjs/xterm.js">xterm.js</a>, hopefully it will help save some time for people searching for the same errors.</p> </p><p><a href="http://www.growingwiththeweb.com/2020/03/migrating-xtermjs-from-tslint-to-eslint.html">Read the full article</></p> Testing using the Azure Cosmos DB Emulator in Azure Pipelines 2019-11-23T00:00:00+00:00 http://www.growingwiththeweb.com/2019/11/cosmos-db-emulator-pipelines <p><p>When working on an application that interfaces with an Azure Cosmos DB backend you could use an actual Cosmos DB instance to test against but that’s a bit of a hassle as it involves setting up and configuring an actual instance. It turns out there is an emulator that runs in a docker container that you can test against instead.</p> </p><p><a href="http://www.growingwiththeweb.com/2019/11/cosmos-db-emulator-pipelines.html">Read the full article</></p> Splay Tree: TypeScript Sample 2019-11-10T00:00:00+00:00 http://www.growingwiththeweb.com/2019/11/splay-tree-typescript <p><p>The <a href="/data-structures/splay-tree/overview/">Splay Tree</a> article now features a sample written in TypeScript that is also available on <a href="https://github.com/gwtw/ts-splay-tree">GitHub</a> and is installable through the <a href="https://github.com/gwtw/ts-splay-tree/packages">GitHub Package Registry</a>.</p> </p><p><a href="/data-structures/splay-tree/overview/">Read the full article</></p> How Shells Work: The cd Builtin Command 2019-07-01T00:00:00+00:00 http://www.growingwiththeweb.com/2019/07/how-shells-work-cd <p><p>I’m currently going through the POSIX specification and wanted to document some of the lesser known things you can do.</p> </p><p><a href="http://www.growingwiththeweb.com/2019/07/how-shells-work-cd.html">Read the full article</></p> Using the Intersection Observer web API to improve performance 2018-01-22T00:00:00+00:00 http://www.growingwiththeweb.com/2018/01/intersection-observer <p><p>xterm.js ran into a great problem to use the Intersection Observer web API. This post introduces the problem, what Intersection Observer is and why it’s such a good fit.</p> </p><p><a href="http://www.growingwiththeweb.com/2018/01/intersection-observer.html">Read the full article</></p> How to fix nvm slowing down terminal initialisation 2018-01-09T00:00:00+00:00 http://www.growingwiththeweb.com/2018/01/slow-nvm-init <p><p>I started using <a href="https://github.com/creationix/nvm">nvm</a> a while ago but ever since then my terminal has been very slow to start up.</p> </p><p><a href="http://www.growingwiththeweb.com/2018/01/slow-nvm-init.html">Read the full article</></p> Fast and Simple JavaScript FPS Counter 2017-12-30T00:00:00+00:00 http://www.growingwiththeweb.com/2017/12/fast-simple-js-fps-counter <p><p>A side project called for a JavaScript <abbr title="Frames per second">FPS</abbr> counter, here’s how I did it.</p> </p><p><a href="http://www.growingwiththeweb.com/2017/12/fast-simple-js-fps-counter.html">Read the full article</></p> VS Code - Integrated Terminal Performance Improvements 2017-10-03T00:00:00+00:00 http://www.growingwiththeweb.com/2017/10/vscode-terminal-renderer <p><p>Visual Studio Code version 1.17 is getting a new rendering engine based on <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas">HTML canvas</a>. This post dives into some of the motivation and how it was done.</p> </p><p><a href="https://code.visualstudio.com/blogs/2017/10/03/terminal-renderer">Read the full article</></p> Working with 32-bit processes on 64-bit Windows 2017-08-03T00:00:00+00:00 http://www.growingwiththeweb.com/2017/08/windows-wow64 <p><p>I hit <a href="https://github.com/Microsoft/vscode/issues/27915">a bug in VS Code</a> recently related to running a 32-bit process on a 64-bit machine that was interesting. Here’s what I learned.</p> </p><p><a href="http://www.growingwiththeweb.com/2017/08/windows-wow64.html">Read the full article</></p> Implement a maximum value aware stack 2017-05-01T00:00:00+00:00 http://www.growingwiththeweb.com/2017/05/max-aware-stack <p><p>This article looks at the interview question - <em>Implement a stack that can return its maximum value in constant time</em>.</p> </p><p><a href="http://www.growingwiththeweb.com/2017/05/max-aware-stack.html">Read the full article</></p> Five years 2017-04-22T00:00:00+00:00 http://www.growingwiththeweb.com/2017/04/five-years <p><p>Five years have passed since I posted my <a href="/2012/04/sass-syntactically-awesome-stylesheets.html">first article</a> on the blog. Time for a retrospective!</p> </p><p><a href="http://www.growingwiththeweb.com/2017/04/five-years.html">Read the full article</></p> Mastering VS Code's Terminal 2017-03-03T00:00:00+00:00 http://www.growingwiththeweb.com/2017/03/mastering-vscodes-terminal <p><p>Visual Studio Code’s integrated terminal can be launched with <kbd><kbd>ctrl</kbd>+<kbd>`</kbd></kbd>. This article goes into some of the lesser known things you can do with the terminal.</p> </p><p><a href="http://www.growingwiththeweb.com/2017/03/mastering-vscodes-terminal.html">Read the full article</></p> Radix sort (LSD) 2016-12-28T00:00:00+00:00 http://www.growingwiththeweb.com/2016/12/radix-sort-lsd <p><p><abbr title="Least significant digit">LSD</abbr> radix sort is a stable distribution sort similar to <a href="/2015/06/bucket-sort.html">bucket sort</a>, that distributes values into buckets based on the digits within the value.</p> </p><p><a href="/sorting/radix-sort-lsd/">Read the full article</></p> VS Code - Hot Exit Comes to Insiders 2016-11-30T00:00:00+00:00 http://www.growingwiththeweb.com/2016/11/vscode-hot-exit <p><p>Hot exit comes to Visual Studio Code in version 1.8.0.</p> </p><p><a href="https://code.visualstudio.com/blogs/2016/11/30/hot-exit-in-insiders">Read the full article</></p> Odd-even sort 2016-10-03T00:00:00+00:00 http://www.growingwiththeweb.com/2016/10/odd-even-sort <p><p>Odd-even sort is an <span class="math">O(n^2)</span> variation of the <a href="/2014/02/bubble-sort.html">bubble sort</a> sorting algorithm.</p> </p><p><a href="http://www.growingwiththeweb.com/2016/10/odd-even-sort.html">Read the full article</></p> Comb sort 2016-09-19T00:00:00+00:00 http://www.growingwiththeweb.com/2016/09/comb-sort <p><p>Comb sort is an <span class="math">O(n^2)</span> variation of the <a href="/2014/02/bubble-sort.html">bubble sort</a> sorting algorithm.</p> </p><p><a href="http://www.growingwiththeweb.com/2016/09/comb-sort.html">Read the full article</></p> Binary heap: Build heap proof 2016-08-13T00:00:00+00:00 http://www.growingwiththeweb.com/2016/08/build-heap-proof <p><p>The <a href="/data-structures/binary-heap/overview/">binary heap</a> data structure supports a <a href="/data-structures/binary-heap/overview/#build-heap"><em>build heap</em> operation</a> that runs in <span class="math">O(n)</span>. Intuitively it might seem that it should run in <span class="math">O(n \log n)</span> time since it performs an <span class="math">O(\log n)</span> operation <span class="math">n/2</span> times. This article provides a proof of the linear run time.</p> </p><p><a href="/data-structures/binary-heap/build-heap-proof/">Read the full article</></p>