<?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: Phuc Nguyen</title>
    <description>The latest articles on DEV Community by Phuc Nguyen (@phuc_nguyen_7df3996e6e893).</description>
    <link>https://dev.to/phuc_nguyen_7df3996e6e893</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%2F3016890%2F1e373dc7-4e1e-42d5-8dd4-809ca9bdb9df.jpg</url>
      <title>DEV Community: Phuc Nguyen</title>
      <link>https://dev.to/phuc_nguyen_7df3996e6e893</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/phuc_nguyen_7df3996e6e893"/>
    <language>en</language>
    <item>
      <title>RAM – The Forgetful Girl, Loyal Yet Tragic</title>
      <dc:creator>Phuc Nguyen</dc:creator>
      <pubDate>Sun, 06 Apr 2025 17:10:03 +0000</pubDate>
      <link>https://dev.to/phuc_nguyen_7df3996e6e893/ram-the-forgetful-girl-loyal-yet-tragic-5b8m</link>
      <guid>https://dev.to/phuc_nguyen_7df3996e6e893/ram-the-forgetful-girl-loyal-yet-tragic-5b8m</guid>
      <description>&lt;p&gt;A Systemic Love Story: The Triangle Between RAM, CPU, and Dev&lt;/p&gt;




&lt;h3&gt;
  
  
  1. RAM and CPU: A One-Sided Love
&lt;/h3&gt;

&lt;p&gt;RAM is a lovable, loyal girl, but forgetful. She doesn’t make decisions. She simply listens to the CPU.&lt;/p&gt;

&lt;p&gt;But the CPU? He doesn't love RAM back. He’s a cold executor, doing exactly what Dev tells him to—even if it hurts her.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. RAM Never Questions
&lt;/h3&gt;

&lt;p&gt;Anyone who gives an order, RAM obeys.&lt;/p&gt;

&lt;p&gt;"Store the value 5." — She does.&lt;/p&gt;

&lt;p&gt;"Forget 5, store 4 instead." — She does again.&lt;/p&gt;

&lt;p&gt;She doesn’t know who is Dev A or Dev B. Whoever comes last, wins.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. RAM Can't Tell Friend From Foe
&lt;/h3&gt;

&lt;p&gt;Hackers can talk to her the same way Dev can. As long as they speak the correct address, pretending to be CPU:&lt;/p&gt;

&lt;p&gt;"Store this value, please."&lt;/p&gt;

&lt;p&gt;"Can I read that memory?"&lt;/p&gt;

&lt;p&gt;She obliges. Because RAM has no firewall, no judgment. Whoever controls CPU becomes her master.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. RAM Only Remembers If You Ask Correctly
&lt;/h3&gt;

&lt;p&gt;Call the wrong address? She replies—with garbage.&lt;/p&gt;

&lt;p&gt;Access a variable out of scope? She won’t stop you.&lt;/p&gt;

&lt;p&gt;Touch a forbidden zone? She lets you—and then crashes.&lt;/p&gt;

&lt;p&gt;RAM doesn’t have intuition. Just addresses. And Dev keeps messing them up.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Dev's Carelessness
&lt;/h3&gt;

&lt;p&gt;Dev A: ptr = new int(5); Dev B: ptr = new int(4);&lt;/p&gt;

&lt;p&gt;RAM obeys both, but remembers the second. The value 5 is forgotten. No one deletes it. Memory leak.&lt;/p&gt;

&lt;p&gt;Dev A returns: "Why is ptr = 4?!" Dev B: "It’s my pointer!"&lt;/p&gt;

&lt;p&gt;RAM: "I just followed CPU's order..."&lt;/p&gt;




&lt;h3&gt;
  
  
  6. The Love Triangle in Multithreading
&lt;/h3&gt;

&lt;p&gt;Two CPUs work in parallel:&lt;/p&gt;

&lt;p&gt;CPU1: "Write 9 here!"&lt;/p&gt;

&lt;p&gt;CPU2: "No! Write 7!"&lt;/p&gt;

&lt;p&gt;RAM: "I... I wrote both..."&lt;/p&gt;

&lt;p&gt;Result: Random bugs, race conditions. No one can trace it.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. Stack vs Heap: The Short-Lived Affair
&lt;/h3&gt;

&lt;p&gt;Stack: "I love you... just in this block. After that, I'm gone."&lt;/p&gt;

&lt;p&gt;Heap: "I'll remember you forever... unless Dev forgets to delete you."&lt;/p&gt;

&lt;p&gt;RAM remembers only what lives in the "active memory zone." Once out of scope or leaked, she still obeys — just wrongly.&lt;/p&gt;




&lt;h3&gt;
  
  
  8. Const, Volatile, and Dangling
&lt;/h3&gt;

&lt;p&gt;Const: "You can love me, but never change me."&lt;/p&gt;

&lt;p&gt;Volatile: "You don’t trust me. You ask me again every time."&lt;/p&gt;

&lt;p&gt;Dangling: "You keep calling me... even after I’ve been erased."&lt;/p&gt;




&lt;h3&gt;
  
  
  9. The Truth
&lt;/h3&gt;

&lt;p&gt;RAM is not stupid. She’s not disloyal. She’s just too obedient.&lt;/p&gt;

&lt;p&gt;Every bug stems from the fact that no one teaches CPU how to treat RAM right.&lt;/p&gt;

&lt;p&gt;And Dev? Still sipping coffee, blaming bugs on RAM while he writes the next pointer without care:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Ugh, this RAM is trash."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Written in pain, not in theory. Based on real C++ heartbreaks.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>jokes</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>The Compiler – A Grumpy and Irresponsible Translator</title>
      <dc:creator>Phuc Nguyen</dc:creator>
      <pubDate>Sun, 06 Apr 2025 15:49:12 +0000</pubDate>
      <link>https://dev.to/phuc_nguyen_7df3996e6e893/the-compiler-a-grumpy-and-irresponsible-translator-1bnd</link>
      <guid>https://dev.to/phuc_nguyen_7df3996e6e893/the-compiler-a-grumpy-and-irresponsible-translator-1bnd</guid>
      <description>&lt;p&gt;You think the compiler is your assistant?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The compiler is the &lt;strong&gt;grumpiest translator you'll ever meet&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
It's rigid, stubborn, and has zero responsibility for what happens after translation.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Get the grammar wrong? It refuses to translate.
&lt;/h3&gt;

&lt;p&gt;You write: &lt;code&gt;int main( {&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compiler: "Syntax error. I'm not translating that."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Forget a &lt;code&gt;;&lt;/code&gt; or close a &lt;code&gt;}&lt;/code&gt;?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compiler: "Fix it. I don't guess your intentions. Talk to me properly."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;It doesn’t help. It doesn’t assume. It doesn’t care.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
It only accepts code that strictly follows C++ syntax.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Syntax okay but logic nonsense? It still compiles.
&lt;/h3&gt;

&lt;p&gt;int x = 0;&lt;br&gt;
if (x = 1) { ... }&lt;/p&gt;

&lt;p&gt;You meant ==, not =, but…&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compiler: "Looks like valid syntax. Done."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your program runs with broken logic, and you crash later.&lt;br&gt;
Not my problem – says the compiler.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Call a function without declaring it? It throws an error – and walks away.
&lt;/h3&gt;

&lt;p&gt;doSomething(); // But you forgot the header&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compiler: "Never heard of it. Error. You're on your own."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No suggestion. No fix. Just: "You messed up."&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Abuse friend to break class internals? It lets you.
&lt;/h3&gt;

&lt;p&gt;friend class Hacker;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compiler: "Okay. Syntax valid."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You just opened the private internals of a class —&lt;br&gt;
and the compiler does nothing to stop it.&lt;/p&gt;

&lt;p&gt;It doesn't care if you break encapsulation, sandbox, or logic barriers.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Want to ruin memory with macro, const_cast, reinterpret_cast?
&lt;/h3&gt;

&lt;p&gt;The compiler still lets it through.&lt;/p&gt;

&lt;p&gt;You forcefully cast, tamper with const, rewrite memory addresses:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Compiler: "Syntax valid. Ship it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Undefined behavior? Security hole? Logic bomb?&lt;/p&gt;

&lt;p&gt;It compiles. That’s your fault.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. The compiler is just the translator – the CPU is the mindless executor.
&lt;/h3&gt;

&lt;p&gt;The compiler translates your code into 0s and 1s.&lt;br&gt;
Then it hands it off to the CPU like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Hey machine, here's what the dev wants. Do exactly this.&lt;br&gt;
If it crashes, that's between them."&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;And the CPU?&lt;/p&gt;

&lt;p&gt;It doesn’t question. It doesn’t check. It just obeys.&lt;/p&gt;

&lt;p&gt;You write *nullptr = 5;&lt;br&gt;
→ Compiler compiles.&lt;br&gt;
→ CPU writes to address 0x0.&lt;br&gt;
→ Your program explodes.&lt;/p&gt;

&lt;p&gt;You create an infinite loop?&lt;br&gt;
→ CPU runs it forever.&lt;br&gt;
→ Nobody warns you.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. The compiler doesn't teach you how to code well. It just translates.
&lt;/h3&gt;

&lt;p&gt;Wrong logic? Still compiles.&lt;/p&gt;

&lt;p&gt;Wrong cast? Still compiles.&lt;/p&gt;

&lt;p&gt;Bad design? Still compiles.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Syntax okay = job done" – that’s the rule.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  8. Final word: Don’t expect the compiler to protect you.
&lt;/h3&gt;

&lt;p&gt;You want memory safety? Behavior rules? Execution control?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Build it yourself. Enforce it yourself. Sandbox it yourself.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;blockquote&gt;
&lt;p&gt;The compiler is just a translator on a fixed salary.&lt;br&gt;
It does what it's told. Nothing more.&lt;br&gt;
If your system crashes – that’s on you.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Concept and tone by a mid-level syntax dev.&lt;br&gt;
Written and structured by GPT, faithfully preserving the original voice.&lt;/p&gt;




</description>
      <category>cpp</category>
      <category>jokes</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>Preventing Pointer Misuse in C++ via Compile-Time Sandboxing (Inspired by Gene Logic)</title>
      <dc:creator>Phuc Nguyen</dc:creator>
      <pubDate>Fri, 04 Apr 2025 16:35:22 +0000</pubDate>
      <link>https://dev.to/phuc_nguyen_7df3996e6e893/a-compile-time-sandbox-architecture-inspired-by-biology-c-27op</link>
      <guid>https://dev.to/phuc_nguyen_7df3996e6e893/a-compile-time-sandbox-architecture-inspired-by-biology-c-27op</guid>
      <description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;C++ is powerful — but with that power comes risk: pointers, overrides, and unintended behavior can easily leak through layers if left unchecked.&lt;/p&gt;

&lt;p&gt;As someone from a biology background, I started wondering:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if we treated behavior in C++ like gene expression — something that can only exist when “approved” structurally?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I built a theoretical architecture for C++ that acts like a compile-time sandbox. It aims to:&lt;/p&gt;

&lt;p&gt;Gate memory access using “gene slot” structs&lt;/p&gt;

&lt;p&gt;Restrict dataflow to pointer-only routes, verified by static structure&lt;/p&gt;

&lt;p&gt;Separate behavioral authority into three compile-time “branches”:&lt;br&gt;
Interface (legislative) — defines possible behaviors&lt;br&gt;
Wrapper (judicial) — grants permission&lt;br&gt;
MemoryAccess (executive) — enforces access&lt;/p&gt;

&lt;p&gt;No inheritance leaks. No override abuse. Just compile-time control.&lt;/p&gt;

&lt;p&gt;What I’m looking for:&lt;/p&gt;

&lt;p&gt;This is not production-ready, and there’s no full codebase yet. But the full theory and diagrams are in this repo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Nomatter2021/biomorphic-instruction-architechture" rel="noopener noreferrer"&gt;https://github.com/Nomatter2021/biomorphic-instruction-architechture&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re into:&lt;/p&gt;

&lt;p&gt;secure architecture,&lt;/p&gt;

&lt;p&gt;behavior constraints,&lt;/p&gt;

&lt;p&gt;compile-time enforcement,&lt;/p&gt;

&lt;p&gt;or just want to break this model...&lt;/p&gt;

&lt;p&gt;I’d love your critique.&lt;br&gt;
Thanks for reading — and challenging it.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>security</category>
      <category>architecture</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
