<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: chris407x</title>
    <description>The latest articles on DEV Community by chris407x (@chris407x).</description>
    <link>https://dev.to/chris407x</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F271878%2F710aab91-309f-4718-ab1c-72cb7c829396.jpg</url>
      <title>DEV Community: chris407x</title>
      <link>https://dev.to/chris407x</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chris407x"/>
    <language>en</language>
    <item>
      <title>Halloween CSS Challenge 2025</title>
      <dc:creator>chris407x</dc:creator>
      <pubDate>Sun, 02 Nov 2025 03:22:10 +0000</pubDate>
      <link>https://dev.to/chris407x/halloween-css-challenge-2025-2g1g</link>
      <guid>https://dev.to/chris407x/halloween-css-challenge-2025-2g1g</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/frontend-2025-10-15"&gt;Frontend Challenge - Halloween Edition, CSS Art&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspiration
&lt;/h2&gt;

&lt;p&gt;A spooky house... each element will animate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;

&lt;iframe height="600" src="https://codepen.io/chris407x/embed/RNreBVx?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;As a backend/full-stack dev with over 25 years of experience, I don't have a lot of decorative CSS experience. On a lark, I decided to fire up ChatGPT and Cursor to see what I could come up with in a few hours while I was watching game 7 of the World Series. This reinforces to me how much I can extend my abilities with LLMs.&lt;/p&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;This project is released under the &lt;strong&gt;MIT License&lt;/strong&gt; — you are free to use, modify, and share it for any purpose, personal or commercial, provided that you include attribution to the original author.&lt;/p&gt;

</description>
      <category>frontendchallenge</category>
      <category>devchallenge</category>
      <category>css</category>
    </item>
    <item>
      <title>What Are Bitmasks and Bitwise Operators?</title>
      <dc:creator>chris407x</dc:creator>
      <pubDate>Sun, 20 Oct 2024 16:53:16 +0000</pubDate>
      <link>https://dev.to/chris407x/what-are-bitmasks-and-bitwise-operators-448m</link>
      <guid>https://dev.to/chris407x/what-are-bitmasks-and-bitwise-operators-448m</guid>
      <description>&lt;h3&gt;
  
  
  Part 1 of 11: a serialized version of Bitmasks for Fun and Profit: Practical Applications for Web Developers
&lt;/h3&gt;

&lt;p&gt;Bitmasks and bitwise operators are used in computer science to manage and manipulate data at the most basic level—bits. Each bit in a bitmask represents a binary state (on or off, 1 or 0).  In web development, bitmasks allow for compact data storage, simpler data relations, reduced memory usage, and faster data processing.  Developers can quickly check or change multiple conditions by reading the bits of an integer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bitmasks Work Like Light Switches:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Imagine you have a row of light switches in your room. Each switch can be ON (1) or OFF (0). Each switch controls a different light independently.&lt;/li&gt;
&lt;li&gt;You can track which lights are on or off by noting the switch positions. A bitmask lets you store all switch positions in a single unique number. &lt;/li&gt;
&lt;li&gt;Bitmasks can store and recall switch positions as presets.&lt;/li&gt;
&lt;li&gt;Bitwise operators can turn switches on and off and evaluate their current positions.&lt;/li&gt;
&lt;li&gt;When you have a group of bitmasks, you can compare, sort and filter them using bitwise operators.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Example: Four Switches (Bits)
&lt;/h3&gt;

&lt;p&gt;Four bits can store 16 unique positions. Since zero is the first, 15 will be the last.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Bitmask&lt;br&gt;(Binary)&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;Decimal Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All lights are off.&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0001&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only the first light is on.&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1000&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only the fourth light is on.&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0011&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The first and second lights are on.&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;0101&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The first and third lights are on.&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1111&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All lights are on.&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In a 32-bit integer, you can store up to 32 switches. In a 64-bit integer, you can store 64 switches. These are binary numbers that can be represented as a decimal integer. If you need more switches, you can store them as a set or array, but then you lose the ability to use bitwise operations. You can store an unlimited number of unique bits in a set.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bitwise operators:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AND         &amp;amp; 
OR          | 
XOR         ^ 
NOT         ~ 
LEFT SHIFT  &amp;lt;&amp;lt; 
RIGHT SHIFT &amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bitwise operators are mathematical operators that act on binary numbers. They are similar to addition, subtraction, multiplication, and division but work in binary math directly on bits. Bitwise operators make bitmasks possible by setting, clearing, toggling, manipulating, and checking bits. Comparison operators make bit identification extremely fast, sometimes in a single CPU instruction.&lt;/p&gt;

&lt;p&gt;If the light switches were set to &lt;code&gt;0101&lt;/code&gt; (5) and you needed to change them to &lt;code&gt;1111&lt;/code&gt; (15), you would simply turn on the second and fourth switches. Just as you would compare the two positions to find the differences and use your hand to flip the switches, computers use bitwise operators to find the differences and  turn specific bits on or off in a bitmask.&lt;/p&gt;

&lt;p&gt;We go over these operators in detail throughout the book/series.&lt;/p&gt;

&lt;h3&gt;
  
  
  This is part 1 of 11 of a serialized version of my book:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://amzn.to/4f3UA15" rel="noopener noreferrer"&gt;https://amzn.to/4f3UA15&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bitmasks for Fun and Profit: Practical Applications for Web Developers&lt;br&gt;
Use bitmasks as powerful filters that decouple rules from logic, simplify data relationships and reduce code complexity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15gvfwjet1591zgdnw6a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15gvfwjet1591zgdnw6a.jpg" alt="abstract decorative image of bitmasks as computer code" width="398" height="580"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All code in the book is syntax highlighted and printed in full color.&lt;/p&gt;

&lt;p&gt;I publish several books about Guitar, Music and Programming on my Author Page on Amazon:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://amzn.to/3QlvX5K" rel="noopener noreferrer"&gt;https://amzn.to/3QlvX5K&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow me at Torus Head Studios!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://torusheadstudios.com/" rel="noopener noreferrer"&gt;https://torusheadstudios.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bitmasks</category>
      <category>bitwiseoperators</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
