Danger Will Robinson!
& Eureka Moments
A running log of coding disasters survived —
and surprising discoveries worth remembering.
What Are DWR & Eureka Moments?
D.W.R. — Danger Will Robinson!
Remember the Robot from Lost in Space flailing its arms and warning young Will Robinson of impending doom? That’s us — warning you. A DWR entry is a coding pitfall we stumbled into so you don’t have to — or at least so you recognize the cliff when you’re standing at the edge.
Both are part of the same learning loop: blow something up, figure out why, write it down. That’s the TNT way.
Moments & Milestones
Newest entries at the top. Click any title arrow to expand the full story.
| Date | App / Topic | Type |
|---|---|---|
| 06/09/2026 |
F4 Whole Team Template —
Never Write Read more…A Copilot-generated comment at the bottom of the page included the literal closing tag What the Comment Looked LikeThe comment block near the end of the file read something like: <!-- END OF PAGE
</body> and </html> close below
-->
Why It BrokeSame family of problem as Entry 8. The HTML5 parser watches for certain tag sequences everywhere — including inside comments. When the browser encountered The symptom was odd comment fragments appearing as page text. The cause was a tag that was never meant to be parsed, being parsed anyway. The FixReplace any closing tag text in comments with plain descriptive words: <!-- END OF PAGE
body end and html end close below
-->
Same intent. Zero parser side effects. The Rule: Never write |
DWR |
| 06/09/2026 |
F4 Whole Team Template —
Read more…The W3C validator flagged this as an info message — not a hard error, but it signals a real incompatibility worth knowing. What Triggered ItA comment block used <!-- -- ABOUT EXTERNAL STYLESHEETS -------------------------------- --> The message was: “The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment.” Why It HappensThe XML 1.0 specification reserves the sequence The FixReplace <!-- == ABOUT EXTERNAL STYLESHEETS ================================ --> Visually identical. Completely valid. One character change. The Rule: Inside an HTML comment, |
DWR |
| 06/09/2026 |
F4 Whole Team Template —
Never Write Read more…The Bootstrap modals and accordion on the page were completely silent — clicking cards and buttons did nothing. The browser console showed a cryptic error: “Uncaught SyntaxError: Unexpected token ‘,’” at a line number that didn’t even exist in our source file. That last detail was the key clue: when an error points to a non-existent line, the JavaScript parser has gone off the rails somewhere before that line and is trying to parse HTML as if it were code. What We Had WrittenThe comment block just above the Bootstrap JS bundle tag read: <!-- BOOTSTRAP JS BUNDLE - always last, just before </body>
Without this <script>, the data-bs-* attributes won't work.
-->
<script src="...bootstrap.bundle.min.js"></script>
That looks completely harmless. It’s an HTML comment. Comments are ignored, right? Why It BrokeHTML5 parsers have a special rule when they are scanning for script tags: they watch for the sequence , the data-bs-* attributes won't work. --> That leading comma is valid HTML inside a comment, but it is completely illegal as the first token of a JavaScript statement. The parser threw “unexpected token ‘,’” and aborted the entire script block. Bootstrap never finished loading. Every component that depends on Bootstrap’s JavaScript — modals, accordions, dropdowns — was silently dead. Why It Was Hard to FindThree things made this especially tricky:
We also found that decorative Unicode box-drawing characters (═ and ─) used inside The FixReplace any <!-- BOOTSTRAP JS BUNDLE - always last, just before </body>
Without this JS bundle, the data-bs-* attributes won't work.
-->
The word “bundle” is clearer anyway. The Rules to Remember
|
DWR |
| 06/06/2026 |
TNT Image Gallery — TTG Acronym Tip + Precision Link to the Exact About Us Section Read more…We had a gallery comment that said TTG, but curious students had to hunt around manually to decode it. The navigation improvement was simple: make the acronym self-explanatory and link directly to the exact profile section in About Us. Step 1: Clarify the acronym in-placeIn the Slide Rule entry, TTG was wrapped with an abbreviation tooltip so hovering the acronym reveals its full meaning: <abbr title='Tech Tools Guru'>TTG</abbr> Step 2: Add a deep-link target to About UsThe TTG card in About Us received a stable anchor id: <div class="about-card" id="ttgProfile">...</div> Then the gallery link points directly there: <a href='aboutUs.html#ttgProfile'>About Us</a> Why This Is a EurekaThis is small-code, high-impact navigation design: students click once and land exactly where context lives. It reduces friction, reinforces acronym literacy, and models a best practice for internal documentation links across the site. Live example: Open the Circular Slide Rule gallery entry and click its About Us link. |
Eureka |
| 06/06/2026 |
TNT Image Gallery — Neat Trick: Open a Specific Modal from a Hyperlink Read more…We wanted a link on Loud Pictures movie page that did more than navigate to the gallery. The goal was to jump to the gallery and automatically open the exact card modal for Loud Pictures. It worked with one query parameter and a tiny startup script. Step 1: Put the target title in the link URLThe link passes the card title through <a href="../tnt_image_gallery.html?open=Loud%20Pictures#galleryGrid"> Open the gallery entry directly </a> Step 2: Read the URL and click the matching cardOn gallery page load, JavaScript checks for const openTitle = new URLSearchParams(window.location.search).get('open');
if (openTitle) {
const cards = document.querySelectorAll('.gallery-item');
const targetCard = Array.from(cards).find(card => card.dataset.title === openTitle);
if (targetCard) {
targetCard.scrollIntoView({ behavior: 'smooth', block: 'center' });
setTimeout(() => targetCard.click(), 250);
}
}
Why This Is a EurekaThis creates deep-link behavior without duplicating pages. One reusable modal still powers the whole gallery, but outside pages can point directly to a specific entry by title. Students click one link and land exactly where the lesson needs them. Live example: Open Loud Pictures movie page, then click “Open the gallery entry directly.” |
Eureka |
| 06/06/2026 |
TNT Image Gallery — Let CSS Stamp AI Entries with a Robot Marker Read more…Originally we were about to manually type a robot marker in front of every gallery blurb generated by Claude. Then we realized the browser can do that automatically with a CSS pseudo-element. That turned a repetitive editing job into one clean styling rule. You can see the live note in the gallery intro here: AI marker note in TNT Image Gallery. How the Technology WorksA pseudo-element is a virtual element created by CSS. It is not written in the HTML, but it behaves like content that appears before or after an element’s text. With <!-- Step 1: wrap AI-authored blurbs in a semantic class -->
<button data-desc="<span class='aiEntry'>AI-generated blurb text...</span>">
...
</button>
/* Step 2: style the AI blurb text itself */
.aiEntry {
color: #6d6e6e;
font-family: 'Courier New', Courier, monospace;
display: block;
}
/* Step 3: inject marker content before every AI blurb */
.aiEntry::before {
content: "🤖:";
font-weight: bold;
margin-right: 0.5em;
}
Translation: every element with class Quick swap trick. If you ever want a different prefix, change just one line: .aiEntry::before { content: "AI:"; }
That single edit updates every AI marker in the gallery. Why This Was a EurekaThis is a textbook separation-of-concerns win. HTML holds meaning and content; CSS controls presentation. The blurbs stay clean, while the “AI speaker tag” lives in one reusable design rule. Less manual work, fewer mistakes, and a style system that scales. Practical CaveatGenerated content from CSS is mainly visual. If a prefix is mission-critical information (not just a display cue), consider including that meaning in real HTML too. For our gallery context, the pseudo-element marker is exactly the right level of lightweight UI annotation. |
Eureka |
| 06/05/2026 |
Ask Copilot —
“Your Read more…When we ran the HTML validator on the Ask Copilot page, it came back with about ten identical warnings and one extra. All of them were quiet, easy-to-miss validator info messages — not hard errors, but still worth caring about. Here’s what they meant and why we fixed them. Warning 1 (×10): “Article lacks heading”What it means. In HTML, an Why we caused it. Each Ask Copilot entry had a label like “Entry #010 • Jun 2026” styled as a The fix. We promoted each span to an /* Reset heading defaults so it looks like the original span */
.column-entry-num {
font-size: 0.66rem;
font-weight: 700;
margin: 0; /* ← the key reset — removes h3 margin */
padding: 0;
font-family: inherit; /* don't use the heading font stack */
}
Why should you care? Roughly 1-in-25 people uses assistive technology at some point. Writing semantic HTML costs nothing extra — it’s just choosing the right tag. Using Warning 2 (×1):
|
DWR |
| 06/03/2026 |
Hero Background Bleeds Outside the Image on Small Screens — Read more…First: how did we even find this? We tested the page at different screen sizes — shrinking the browser window down to phone width to see how it looked. That one habit caught this bug immediately. Always test at multiple screen sizes. A page that looks great on your laptop can be broken on the phone in your pocket, and you’ll never know unless you look. The ProblemImagine you hang a wide poster on a narrow wall. The poster is wide enough to cover the wall perfectly — but now imagine making the wall skinnier and skinnier. The poster shrinks with it, and eventually it’s so short that it doesn’t reach the bottom of the wall anymore. Bare wall shows below it. That’s exactly what was happening to our hero section on phones. The CSS instruction The FixThe fix is a different CSS value: We only needed this fix on small screens, so we used a media query — a CSS rule that only activates when the screen is below a certain width: @media (max-width: 520px) {
#hero {
background-size: cover;
}
}
Translation: “If the screen is 520 pixels wide or less, switch to cover mode.” Wider screens keep the original The Takeaway
|
DWR |
| 06/03/2026 |
Read more…When you open a link in a new tab with // evil code on the destination site could do: window.opener.location = "https://fake-login-page.com";
<a href="https://example.com" target="_blank" rel="noopener noreferrer">Link text</a> It’s a free, zero-cost security habit. Add it to every |
Eureka |
| 06/03/2026 |
Fresh Start — 2026 TNT Upgrade Read more…As part of the 2026 TNT redesign, the old DWR & Eureka log was retired and this fresh version was born. The previous log (2022–2023) covered Bootstrap 5.0 quirks, case-sensitive filenames on servers, and data-type disasters in JavaScript — all still great lessons, preserved in New entries will document discoveries and disasters from the 2026 upgrade onward: Bootstrap 5.3, CSS custom properties (design tokens), Font Awesome 6.5, separation-of-concerns CSS architecture, and whatever we stumble into next. |
Eureka |