<?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: chao xue</title>
    <description>The latest articles on DEV Community by chao xue (@chao_xue_34ee576abba0e8ed).</description>
    <link>https://dev.to/chao_xue_34ee576abba0e8ed</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3845039%2F96d6ede9-434e-4849-b10c-55b09980db83.png</url>
      <title>DEV Community: chao xue</title>
      <link>https://dev.to/chao_xue_34ee576abba0e8ed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chao_xue_34ee576abba0e8ed"/>
    <language>en</language>
    <item>
      <title>I built a free bedroom feng shui checker that doesn’t give generic advice</title>
      <dc:creator>chao xue</dc:creator>
      <pubDate>Sat, 05 Sep 2026 08:57:50 +0000</pubDate>
      <link>https://dev.to/chao_xue_34ee576abba0e8ed/i-built-a-free-bedroom-feng-shui-checker-that-doesnt-give-generic-advice-17ig</link>
      <guid>https://dev.to/chao_xue_34ee576abba0e8ed/i-built-a-free-bedroom-feng-shui-checker-that-doesnt-give-generic-advice-17ig</guid>
      <description>&lt;p&gt;When I first tried to arrange my bedroom according to feng shui, I quickly discovered how vague the rules can be. “Put your bed in the commanding position,” every article said. But what counts as commanding when the door is beside a sloping ceiling and the only wall wide enough for a bed also contains a window?&lt;/p&gt;

&lt;p&gt;I wanted a tool that could look at an actual room—not an ideal square diagram—and tell me whether the bed, mirror, desk, and windows conflicted with each other. After reading too many conflicting guides, I built a small JavaScript app that lets you draw your floor plan and checks it against the most common feng shui bedroom principles right in the browser. It is now live as &lt;a href="https://fengshuibedroomdesign.com" rel="noopener noreferrer"&gt;a free feng shui bedroom layout checker&lt;/a&gt; with illustrated guides, and this post explains the geometry and product thinking behind it.&lt;/p&gt;

&lt;h2&gt;Why generic answers are useless for real rooms&lt;/h2&gt;

&lt;p&gt;Feng shui bedroom advice usually takes the form of “the bed should not face the door” or “do not put a mirror where it reflects the bed.” Those rules assume a rectangular room with clear layouts. Actual bedrooms have angled walls, two doors, sliding doors, radiators, or shared-wall windows. A rule like “the bed should not be in line with the door” depends entirely on where the door and bed are, so an abstract rule cannot describe a room.&lt;/p&gt;

&lt;p&gt;That signaled a great software problem. Instead of writing a list of static tips, I could create a simple geometric model of the room and let the model answer questions. If the user draws the walls and places a bed, the code can calculate relative positions. The tool checks what actually applies to that floor plan. This approach also avoids superstition-heavy claims: the interface only highlights traditional concerns and lets the user decide whether it matters to them.&lt;/p&gt;

&lt;h2&gt;Sketching a room with canvas&lt;/h2&gt;

&lt;p&gt;To make the tool mobile-friendly and reduce friction, I used the browser's canvas with pointer events. Users draw their room by clicking or tapping corners to create walls. Unlike a general room-planner, it intentionally keeps the tool simple: walls, door, window, and furniture are the only object types needed for a feng shui assessment.&lt;/p&gt;

&lt;p&gt;Each object is stored as a set of coordinates. Walls are polygons; doors and windows become line segments placed on walls; the bed, mirror, desk, and screen are rectangles with a front edge so the code can tell which way the user would sleep or look. The drawing layer may feel like a rudimentary CAD, but it produces enough information to run a useful rule engine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a door is a segment with an opening direction&lt;/li&gt;
&lt;li&gt;a window is a segment with a normal side pointing outside&lt;/li&gt;
&lt;li&gt;a bed stores its orientation and the side where the headboard sits&lt;/li&gt;
&lt;li&gt;a mirror is represented by the wall or object it is mounted on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I deliberately skipped straight lines and perfect right angles because real rooms are rarely perfect. For every placement, the code compares vector angles and distances instead of assuming a grid. The result is a lightweight sketch tool where the visual output is not a polished render but a meaningful map for the checks that follow.&lt;/p&gt;

&lt;h2&gt;Commanding position as a vector calculation&lt;/h2&gt;

&lt;p&gt;The central feng shui concept in the bedroom is the commanding position: the bed should have a clear view of the door, but not be straight in line with it. In a normal room, the most commanding bed position is diagonal from the door, often with an angle between 30 and 60 degrees from the line between the door and the bed.&lt;/p&gt;

&lt;p&gt;Implementing that rule requires three pieces of information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the center of the bed&lt;/li&gt;
&lt;li&gt;the center of the door opening&lt;/li&gt;
&lt;li&gt;the bed's headboard direction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With those coordinates, the app calculates whether the door is visible from a seated or lying position, and whether the headboard points toward the door. It flags the bed if the door is behind the headboard line, or if opening the door would hit the bed frame. It also checks whether the body position aligns directly with the door; if that happens, the layout gets a warning.&lt;/p&gt;

&lt;p&gt;This is where the tool becomes more than a checklist. A bed that points toward the door on one side of a room is problematic under the traditional rule, but the same bed angle in a bigger room may be perfectly acceptable because an extra wall adds protection. A rules engine that understands room shape can see that distinction automatically.&lt;/p&gt;

&lt;h2&gt;What about mirrors and windows?&lt;/h2&gt;

&lt;p&gt;Mirrors have boggled many readers. Some traditions say they should never reflect the bed; others focus on not having a mirror directly behind a headboard. In the app, a mirror object stores its surface normal. The checker can then determine whether the mirror's reflected view can reach the bed.&lt;/p&gt;

&lt;p&gt;The implementation is not a naïve “rectangle intersection.” It finds the closest reflecting rectangle that covers the mirror, computes the line from the bed's front edge to the mirror center, reflects it across the mirror plane, and checks whether the reflected ray intersects another object. This gives a believable answer for an oddly-sized mirror placed on a closet door or side wall. If the result is false, the tool suggests simpler fixes: move the mirror, cover it at night, or place a screen between the mirror and the bed.&lt;/p&gt;

&lt;p&gt;Windows go through a separate check. A window above the headboard creates a draft and adds outside light in many homes. The tool flags this not as a taboo, but as a practical concern, using the bed's headboard side, the window segment, and the wall width. It will also warn if a desk faces a window and the user is working at night because screen glare is a more direct problem than any mystical principle.&lt;/p&gt;

&lt;h2&gt;Rules, not magic&lt;/h2&gt;

&lt;p&gt;One of the design decisions I am happiest about is keeping the language grounded. The long descriptions deliberately say “traditional preference” or “practical safety” instead of promising wealth or luck. That matters because a developer-made tool should earn trust through clarity. The illustrated guides also show floor-plan diagrams rather than abstract quotes, so a user can see why a change is recommended.&lt;/p&gt;

&lt;p&gt;The feng shui labels are just culturally learned heuristics for comfort, light, direction, and room flow. Behind them are useful questions I can phrase to a browser: Is this spot visible from the door? Does a mirror reflect a sleeping person? Is there enough clearance on both sides of the bed? Developers can rarely agree on what “comfortable” means, but we can agree on vector distances. Framing features that way helped me build a tool that feels actionable instead of mystical.&lt;/p&gt;

&lt;h2&gt;What I learned from shipping it&lt;/h2&gt;

&lt;p&gt;Building the checker taught me that a niche browser tool can be valuable if it gives people a feeling of control. Users do not need a room design service; they need a quick answer with a visual explanation. The free tool at the start of this post includes all of this logic and more, works on mobile, and requires no signup. You can draw your actual room in under a minute and experiment with moving the bed around.&lt;/p&gt;

&lt;p&gt;If you have ever struggled with a bedroom that never feels right—and if you know enough JavaScript to be curious how “feng shui” can be represented as coordinates—I hope this gives you an idea for your next weekend project: the best tools are not the ones with endless options, but the ones that tell you what is wrong with the layout you already have.&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Power of Simple Tools: Why Sometimes All You Need is a Counter</title>
      <dc:creator>chao xue</dc:creator>
      <pubDate>Thu, 26 Mar 2026 17:00:54 +0000</pubDate>
      <link>https://dev.to/chao_xue_34ee576abba0e8ed/the-power-of-simple-tools-why-sometimes-all-you-need-is-a-counter-2f3j</link>
      <guid>https://dev.to/chao_xue_34ee576abba0e8ed/the-power-of-simple-tools-why-sometimes-all-you-need-is-a-counter-2f3j</guid>
      <description>&lt;p&gt;As developers and tech enthusiasts, we often get caught up in the "feature race." We build complex systems, integrate AI into everything, and obsess over syncing data across every possible cloud. But over time, I’ve realized that the tools people actually stick with are often the ones that do exactly one thing—and do it perfectly.&lt;/p&gt;

&lt;p&gt;Think about the small, repetitive tasks that pop up throughout the day: counting inventory in a warehouse, tracking sets at the gym, or even just tallying attendance at a local meetup. These aren't massive engineering problems, but they are frequent ones. When you’re in the middle of a task, the last thing you want is to wait for a bloated app to load, sit through a 5-second ad, or—worst of all—be forced to "Create an Account" just to start counting.&lt;/p&gt;

&lt;p&gt;This is why lightweight, browser-based utilities still feel like magic in 2026. They are "zero-friction." You open a tab, you do the work, and you close it. No strings attached.&lt;/p&gt;

&lt;p&gt;Lately, I’ve been focusing on this philosophy of "minimalist utility." I wanted to see how much I could strip away while still making a tool incredibly useful. The result is onlinecounter.org.&lt;/p&gt;

&lt;p&gt;In building it, I focused on two specific pain points I noticed in other tools:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mobile-First Interaction&lt;/strong&gt;: Most web counters feel clunky on a phone. I wanted something that felt like a native app—responsive, snappy, and easy to tap with one hand while you're on the move.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The "Copy" Workflow&lt;/strong&gt;: Usually, after you finish counting, you need that number somewhere else—a spreadsheet, a text message, or a note. Instead of making users manually type it out, I added a "one-click copy" feature. It’s a small detail, but it saves a massive amount of hassle.&lt;/p&gt;

&lt;p&gt;I also made a conscious choice to skip "cloud sync." By keeping the data strictly in your local browser, the site stays lightning-fast and respects your privacy. No data leaves your device; it’s just you and your tally.&lt;/p&gt;

&lt;p&gt;At the end of the day, not every problem needs a "platform." Sometimes, the most effective tools are the ones that quietly do their job, stay out of your way, and let you get back to what really matters.&lt;/p&gt;

&lt;p&gt;If you’re looking for a straightforward, ad-free way to keep track of... well, anything... feel free to give it a try:&lt;br&gt;
&lt;strong&gt;&lt;a href="https://onlinecounter.org/" rel="noopener noreferrer"&gt;https://onlinecounter.org/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because sometimes, less really is more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F97tde5sh4z9bolwzmgq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F97tde5sh4z9bolwzmgq5.png" alt=" " width="800" height="1007"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>softwaredevelopment</category>
      <category>tooling</category>
      <category>ux</category>
    </item>
  </channel>
</rss>
