Finite state machines (FSMs) are a useful tool for representing stateful entities in code. In this tutorial, we'll learn how to implement the finite state design pattern in C++.| www.aleksandrhovhannisyan.com
Poorly designed API routes and an account creation loophole cause route collisions on Twitter.| www.aleksandrhovhannisyan.com
Use this trick with CSS Grid to prevent layout shifts when swapping text in status indicators.| www.aleksandrhovhannisyan.com
Set up ESLint to format on save in two popular code editors: VS Code and neovim.| www.aleksandrhovhannisyan.com
Learn how to implement a progressively enhanced theme switch component using HTML, CSS, and JavaScript.| www.aleksandrhovhannisyan.com
Learn why HTTP cookies are needed, how they're used on the client and server side, where they're stored, and how they impact security and privacy on the web.| www.aleksandrhovhannisyan.com
Learn how to build an accessible image carousel that supports multiple input modes and is progressively enhanced with CSS scroll snap and JavaScript.| www.aleksandrhovhannisyan.com
If you want to use a standalone HTML input to accept user input and store it locally in your app's state, you can use the checkValidity, reportValidity, and setCustomValidity methods to validate the user's input and provide feedback.| www.aleksandrhovhannisyan.com
Fluid typography allows each font size in a modular scale to vary responsively between a min and max. Learn the math behind fluid typography and how to programmatically generate a fluid type scale with CSS clamp and Sass.| www.aleksandrhovhannisyan.com
CSS has come a long way since the early days of web development. Learn how to write better CSS using modern strategies like the :is and :where pseudo-class functions, logical properties and values, clamp, gaps, and aspect-ratio.| www.aleksandrhovhannisyan.com
Load-more buttons are more accessible than infinite scrolling, but they also steal keyboard focus when new content loads in. We can fix this problem by manually focusing the first newly inserted result.| www.aleksandrhovhannisyan.com
Rather than using static font-face declarations for web fonts, you can take advantage of global data in 11ty to create a single source of truth for fonts and reuse those values in your templates and CSS.| www.aleksandrhovhannisyan.com
While imagery can enrich your content, it can also slow down your site if it's not used responsibly. Learn how to use the official 11ty image plugin to create optimized and responsive images.| www.aleksandrhovhannisyan.com
While NFTs are being hailed as the future of digital ownership, they're also the source of many problems. NFTs are artificially scarce, make it easier to commit fraud, undermine the intellectual property rights of content creators, and encourage consumptive mining practices.| www.aleksandrhovhannisyan.com
Currently, 11ty doesn't allow you to pass object arguments to shortcodes in Liquid. As a temporary workaround, you can assemble and parse a JSON string to pass along to the shortcode as an argument.| www.aleksandrhovhannisyan.com
Not all static imports are immediately needed, and unnecessary imports can be costly. With React.lazy, you can dynamically import components at run time to reduce the size of your static bundle.| www.aleksandrhovhannisyan.com
Tired of listing all of your Netlify redirects by hand? Generate them programmatically with a bit of 11ty templating magic!| www.aleksandrhovhannisyan.com
Often, you need to wait for multiple independent async tasks to finish before resuming where your code left off. Learn how to use JavaScript's Promise.all method to await multiple async operations, such as batch file uploads.| www.aleksandrhovhannisyan.com
In TypeScript, type predicates allow you to narrow down an abstract type to a more concrete type with a simple assertion. Together with derived types, they can greatly reduce repetition in your code.| www.aleksandrhovhannisyan.com
Once you get used to thinking in rems for font sizing, you'll find that it's easy to express familiar powers of two. But for other values, you may find it helpful to use the 62.5% font size trick.| www.aleksandrhovhannisyan.com
In typography, the ideal line height for text depends on a variety of factors, including font size, line length, and font family.| www.aleksandrhovhannisyan.com
An in-depth review of 11ty, an extensible static site generator written in Node that supports a variety of template languages.| www.aleksandrhovhannisyan.com
If an iframe re-renders in React, it can interfere with back navigation in your browser. The solution? Force the iframe to unmount with a unique key.| www.aleksandrhovhannisyan.com
When you set a width and height on image tags, browsers are able to reserve the correct amount of space ahead of time to minimize layout shifts as the images are downloaded.| www.aleksandrhovhannisyan.com
On paper, Tailwind CSS sounds like a great idea. In reality, it suffers from the same problems that it tries to solve.| www.aleksandrhovhannisyan.com
Sometimes, a React component needs to allow users to render a custom tag. Here's how you can pass dynamic tag names as props.| www.aleksandrhovhannisyan.com
If you ever find yourself in a sticky situation with git, don't panic. Here are some simple ways you can undo changes in git and clean up your commit history.| www.aleksandrhovhannisyan.com
Learn how to give any element an aspect ratio in CSS, using the modern aspect-ratio property or a trick with percentage padding.| www.aleksandrhovhannisyan.com
Promises are a powerful tool for writing asynchronous code in JavaScript. Here are a few interesting use cases.| www.aleksandrhovhannisyan.com
Images make the web a more beautiful place, but this sometimes comes at a price. Learn how to optimize images for the web using the WebP image format and lazy loading with JavaScript.| www.aleksandrhovhannisyan.com
The Ant Design UI library lets you sort tables by one or more columns, using a sorter prop. But the syntax can get quite repetitive. Let's fix that!| www.aleksandrhovhannisyan.com
Accessibility is a hot topic, but it's not always executed correctly. Learn how to use semantic HTML to create an accessible user experience on the web.| www.aleksandrhovhannisyan.com
Learn how to easily test localhost on mobile using ngrok, without deploying a single line of code.| www.aleksandrhovhannisyan.com
Add comments to your Jekyll blog with the GitHub issues API and lazily load them for improved performance.| www.aleksandrhovhannisyan.com
The binary number system underlies everything in computation and software. But what's the deal with all those 0s and 1s?| www.aleksandrhovhannisyan.com
Developers are often taught that JavaScript passes objects by reference. In reality, JavaScript is a pass-by-value language.| www.aleksandrhovhannisyan.com
SEO is the art of making strategic improvements to a site in order to rank higher in search results and gain more traffic. Learn how to use tried-and-true SEO strategies to drive more visitors to your site.| www.aleksandrhovhannisyan.com
Jekyll is a static site generator that makes it easy for you to create a website. Learn how to get started with Jekyll and GitHub Pages.| www.aleksandrhovhannisyan.com
On the surface, Outer Wilds is a space exploration game. But peel back the layers, and it's a captivating and philosophical story about life and our universe.| www.aleksandrhovhannisyan.com