<?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: Akkarapon Phikulsri</title>
    <description>The latest articles on DEV Community by Akkarapon Phikulsri (@akkaraponph).</description>
    <link>https://dev.to/akkaraponph</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%2F945711%2Fbd8f9c86-1d58-4f8c-b6c4-389c721f86dc.jpg</url>
      <title>DEV Community: Akkarapon Phikulsri</title>
      <link>https://dev.to/akkaraponph</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akkaraponph"/>
    <language>en</language>
    <item>
      <title>การเดินทางของ Software Engineer ขอบตาดำ ๆ 🐼</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sun, 15 Nov 2026 10:11:15 +0000</pubDate>
      <link>https://dev.to/akkaraponph/kaaredinthaangkhng-software-engineer-khbtaadam--gj2</link>
      <guid>https://dev.to/akkaraponph/kaaredinthaangkhng-software-engineer-khbtaadam--gj2</guid>
      <description>&lt;p&gt;สวัสดีครับผม วันนี้ไม่ได้มาเขียน Tutorial หรือสอนเขียนโค้ดอะไรเป็นพิเศษนะครับ ขอเปลี่ยนบรรยากาศมาเล่าเรื่องสบาย ๆ กันบ้าง...ไหมนะ &amp;gt;&amp;lt; และคาดว่าเนื้อหาจะกระโดดไปมาผสม ๆ หลายไอเดียในนี้นะครับ : ) เนื่องจากว่าทำเป็น draft ทิ้งไว้นานพอสมควรพึ่งมีเวลามาว่างเขียน ถือซะว่าส่งท้ายปี 2026 กันเลยทีเดียว&lt;/p&gt;

&lt;p&gt;สำหรับบทความนี้ก็ไม่ได้มีอะไรมาก ไม่ได้ตั้งใจจะมาโอ้อวดความสามารถหรือความสำเร็จอะไรทั้งนั้น แค่อยากเขียนเก็บไว้เป็นบันทึกเล็ก ๆ ของตัวเอง&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;บันทึกการเดินทางของ Developer ขอบตาดำคนหนึ่ง ที่เริ่มต้นจากการเขียน Backend และค่อย ๆ เรียนรู้ว่าการสร้างซอฟต์แวร์มีอะไรให้คิดมากกว่าการเขียนโค้ดให้ทำงานได้&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  จุดเริ่มต้นจาก Backend Developer ธรรมดาคนหนึ่ง
&lt;/h2&gt;

&lt;p&gt;ย้อนกลับไปช่วงต้นปี 2023 ตอนนั้นผมยังเป็นนักศึกษาจบใหม่ที่กำลังหาที่ฝึกงานอยู่เลยครับ (พูดเหมือนผ่านมาหลายสิบปี ทั้งที่เพิ่งไม่กี่ปีเอง ฮ่า ๆ)&lt;/p&gt;

&lt;p&gt;ตำแหน่งที่ผมเลือกสมัครคือ &lt;strong&gt;Backend Developer&lt;/strong&gt; เพราะเป็นสิ่งที่ตัวเองค่อนข้างถนัด และรู้สึกว่าน่าจะทำได้ดีที่สุดในตอนนั้น&lt;/p&gt;

&lt;p&gt;ช่วงแรกผมเขียน Python กับ Django เป็นหลัก งานส่วนใหญ่คือการพัฒนา API ตาม ER Diagram ที่พี่ ๆ ในทีมออกแบบไว้ให้&lt;/p&gt;

&lt;p&gt;โปรเจกต์แรก ๆ ที่ได้ทำเป็นระบบ Product Management ขนาดเล็ก เกี่ยวกับการจัดการข้อมูลสินค้าและ SKU งานหลักก็เป็น CRUD API เพื่อให้ทีม Frontend นำไปใช้งานต่อ&lt;/p&gt;

&lt;p&gt;ตอนนั้นรู้สึกว่างานไม่ได้ยากมาก เพราะสมัยเรียนผมก็ฝึกเขียนโค้ดกับลุง YouTube มาเยอะพอสมควรแล้ว อีกอย่าง AI ในช่วงต้นปี 2023 ก็ยังไม่ได้เก่งเหมือนทุกวันนี้ด้วย&lt;/p&gt;

&lt;p&gt;แต่พอทำงานไปสักพัก ความรับผิดชอบก็เริ่มเปลี่ยนไป&lt;/p&gt;

&lt;p&gt;จากเดิมที่มีคนออกแบบ Database และกำหนด API มาให้ ก็เริ่มต้องออกแบบเอง ได้รับมอบหมายโปรเจกต์ใหม่ที่ต้องเข้าไปพูดคุยกับ Project Manager ฝั่งลูกค้าโดยตรง เนื่องจากบริษัทที่ผมทำงานอยู่เป็น Software Vendor ที่พัฒนาระบบให้กับองค์กรอื่น&lt;/p&gt;

&lt;p&gt;ผมจึงเริ่มต้องทำความเข้าใจ Business Requirements ออกแบบ ER Diagram วางโครงสร้างข้อมูล และพัฒนา API ให้ตอบโจทย์การใช้งานจริง&lt;/p&gt;

&lt;p&gt;ทำแบบนั้นมาเรื่อย ๆ จนงานเริ่มขยายไปสู่การ Integration กับ Third-party Systems การใช้ Queue, Background Jobs และ Workflow Orchestration&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmhvaqaj1j1qlz2cqtnrf.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmhvaqaj1j1qlz2cqtnrf.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;บางวันต้องคุยกับลูกค้า บางวันต้องประสานงานกับทีม IT ของบริษัทอื่น บางครั้งก็ข้ามไปช่วยตั้งค่า Infrastructure บางส่วนด้วย&lt;/p&gt;

&lt;p&gt;ตอนแรกผมก็คิดว่า...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"ก็งาน Backend นี่แหละ จะมีอะไร"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;แต่พอทำไปเรื่อย ๆ ผมเริ่มรู้สึกว่าสิ่งที่ตัวเองรับผิดชอบมันไม่ได้หยุดอยู่แค่การเขียน Backend ให้ทำงานได้แล้ว&lt;/p&gt;

&lt;h2&gt;
  
  
  Backend Developer กับ Software Engineer ต่างกันตรงไหน?
&lt;/h2&gt;

&lt;p&gt;จริง ๆ แล้วสองคำนี้ไม่ได้แยกจากกันอย่างชัดเจนหรอกครับ Backend Developer ก็เป็น Software Engineer ได้เหมือนกัน และหลายบริษัทก็ใช้ชื่อตำแหน่งแตกต่างกันไป&lt;/p&gt;

&lt;p&gt;แต่ถ้าให้ผมอธิบายจากประสบการณ์ของตัวเอง ความแตกต่างที่รู้สึกได้ไม่ใช่เรื่องของตำแหน่ง แต่เป็นเรื่องของขอบเขตความรับผิดชอบและวิธีคิดมากกว่า แล้วยิ่งทุกวันนี้โลกจะบีบให้คนเรามี Skills sets หลาย ๆ แบบผสมผสานกลายเป็นตัวตนของเราให้เก่งยิ่งขึ้นไปอีก&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdeb5615ijwt5d9rig2pw.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdeb5615ijwt5d9rig2pw.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ช่วงแรกผมมักตั้งคำถามว่า&lt;/p&gt;

&lt;p&gt;"จะเขียน API นี้ยังไงให้ทำงานได้ตาม Requirement?"&lt;/p&gt;

&lt;p&gt;แต่พอรับผิดชอบระบบมากขึ้น คำถามก็เริ่มเปลี่ยนไปเป็น&lt;/p&gt;

&lt;p&gt;"ถ้า API นี้ทำงานสำเร็จ แต่ระบบปลายทางล่มล่ะ?"&lt;/p&gt;

&lt;p&gt;"ถ้าข้อมูลถูกบันทึกไปแล้วครึ่งหนึ่ง จะจัดการยังไง?"&lt;/p&gt;

&lt;p&gt;"ถ้าต้อง Retry แล้วเกิดข้อมูลซ้ำ ใครจะเป็นคนรับผิดชอบ?"&lt;/p&gt;

&lt;p&gt;"ถ้าต้องเปลี่ยน Database Schema โดยที่ระบบยังให้บริการอยู่ จะทำยังไง?"&lt;/p&gt;

&lt;p&gt;จากที่เคยมองเพียงว่า Feature ทำงานได้หรือไม่ ก็เริ่มต้องคิดถึง Reliability, Consistency, Failure Handling, Migration และผลกระทบที่เกิดขึ้นกับระบบโดยรวม&lt;/p&gt;

&lt;p&gt;แน่นอนว่า Backend Developer ที่มีประสบการณ์ก็ต้องคิดเรื่องเหล่านี้เช่นกัน ผมไม่ได้มองว่า Software Engineer เป็นตำแหน่งที่เหนือกว่า Backend Developer แต่อย่างใด&lt;/p&gt;

&lt;p&gt;สำหรับผม &lt;strong&gt;Software Engineer ไม่ใช่แค่ Job Title แต่มันคือวิธีคิดและความรับผิดชอบต่อซอฟต์แวร์ที่เราสร้างขึ้น&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  เมื่อระบบไม่ได้มีแค่ API แต่มี Workflow, Queue และ Orchestration
&lt;/h2&gt;

&lt;p&gt;ขอยกตัวอย่างจากระบบที่ผมเคยทำจริงสักหน่อยครับ&lt;/p&gt;

&lt;p&gt;เป็นระบบเกี่ยวกับการจัดการเอกสารและคำสั่งซื้อที่ต้องเชื่อมต่อกับ Third-party หลายแห่ง ส่วนรายละเอียดทางธุรกิจขออนุญาตไม่พูดถึงนะครับ เนื่องจากการเป็นมนุษย์เงินเดือนการรักษา NDA เป็นสิ่งสำคัญ &amp;gt;&amp;lt;&lt;/p&gt;

&lt;p&gt;ซึ่งระบบลักษณะนี้ไม่ได้จบแค่รับ Request แล้วบันทึกลง Database เพราะข้อมูลหนึ่งชุดอาจต้องเดินทางผ่านหลายระบบ และแต่ละระบบก็มีเงื่อนไขการทำงานแตกต่างกัน&lt;/p&gt;

&lt;p&gt;สิ่งที่ผมเลือกทำคือแยก Workflow ตามขอบเขตความรับผิดชอบของแต่ละระบบภายนอก แทนที่จะนำทุกอย่างมาผูกเป็น Flow เดียวกันทั้งหมด&lt;/p&gt;

&lt;p&gt;เหตุผลก็ไม่ได้ซับซ้อนอะไรครับ&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ถ้าระบบภายนอกเจ้าใดเจ้าหนึ่งล่ม ผมไม่อยากให้มันลากระบบส่วนอื่นล่มตามไปด้วย&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;แต่การแยก Workflow อย่างเดียวไม่ได้ทำให้ระบบทนต่อความผิดพลาดได้ทันที เรายังต้องคิดเรื่อง State, Dependency, Timeout และวิธี Recovery ของแต่ละขั้นตอนด้วย&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frsmd7dxhukvxx5u9lslh.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frsmd7dxhukvxx5u9lslh.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;อีกเรื่องหนึ่งที่สำคัญมากคือ Retry&lt;/p&gt;

&lt;p&gt;ไม่ใช่ทุก Operation ที่สามารถ Retry ได้อย่างปลอดภัย&lt;/p&gt;

&lt;p&gt;ตัวอย่างเช่น การส่ง Request เพื่อตรวจสอบข้อมูลกับ Third-party อาจ Retry ได้ หาก Operation นั้นไม่มี Side Effect และระบบปลายทางรองรับการ retry&lt;/p&gt;

&lt;p&gt;แต่ถ้าเป็นการสร้าง Resource หรือเปลี่ยนสถานะข้อมูล เราต้องระวังมากขึ้น เพราะการ retry อาจทำให้เกิดข้อมูลซ้ำหรือผลลัพธ์ที่ไม่ต้องการ&lt;/p&gt;

&lt;p&gt;แม้แต่การส่งอีเมลก็เช่นกัน Retry อาจทำให้ผู้รับได้รับอีเมลซ้ำได้ หากเราไม่มีวิธีจัดการเรื่องนี้&lt;/p&gt;

&lt;p&gt;ผมจึงไม่ค่อยเชื่อแนวคิดที่ว่า &lt;strong&gt;"Retry everything"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;สิ่งที่ควรทำคือทำความเข้าใจว่าแต่ละ Operation มี Side Effect อะไรบ้าง สามารถ retry ได้หรือไม่ และถ้าเกิดความผิดพลาดขึ้นมาจะตรวจสอบหรือกู้คืนอย่างไร&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fggm3skdp5f4zwfidmqc1.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fggm3skdp5f4zwfidmqc1.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;เพราะบางครั้งการ Retry โดยไม่เข้าใจ Business Flow อาจสร้างปัญหาใหม่ที่แก้ยากกว่าเดิมเสียอีก ซึ่งจริง ๆ แล้วถ้าเราออกแบบดี ๆ มันจะไม่ต้องมาดูและโฟกัสตรงนี้สักเท่าไหร่ แต่ก็นั่นแหละครับโดนบีบคอด้วย Timeline 🙀&lt;/p&gt;

&lt;h2&gt;
  
  
  Double Processing และ Data Inconsistency เรื่องเล็กที่ไม่เล็ก
&lt;/h2&gt;

&lt;p&gt;มีอยู่เคสหนึ่งที่ผมเคยเจอจริง และเป็นตัวอย่างที่ทำให้เห็นว่าระบบที่เชื่อมต่อกันหลายแห่งมีความซับซ้อนมากกว่าที่คิด เป็นเคสที่ error ในการจัดการข้อมูลครับ&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7ukh3cgd76damxunew3k.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7ukh3cgd76damxunew3k.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;สมมติว่ามีระบบ A และระบบ B&lt;/p&gt;

&lt;p&gt;ระบบ A ต้องส่งข้อมูลไปยังระบบ B จากนั้นนำผลลัพธ์กลับมาบันทึกลง Database ของตัวเอง&lt;/p&gt;

&lt;p&gt;ปัญหาคือระบบ A รับข้อมูลบางส่วนมาเป็น String เพื่อความสะดวกในการ Integration แต่ Column ใน Database กลับกำหนดไว้เป็น Integer&lt;/p&gt;

&lt;p&gt;พอถึงขั้นตอนแปลงข้อมูลก่อนบันทึก ปรากฏว่า Cast ไม่สำเร็จ ทำให้ระบบ A เกิด Error&lt;/p&gt;

&lt;p&gt;ฟังดูเหมือนเป็น Bug ธรรมดาใช่ไหมครับ?&lt;/p&gt;

&lt;p&gt;แต่ประเด็นอยู่ตรงที่ &lt;strong&gt;ก่อนจะเกิด Error ระบบ A ส่งข้อมูลไปสร้าง Resource ที่ระบบ B สำเร็จแล้ว&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;หมายความว่าในมุมมองของระบบ B งานนี้เสร็จเรียบร้อย แต่ในมุมมองของระบบ A งานกลับล้มเหลว&lt;/p&gt;

&lt;p&gt;ถ้าเรา Retry ทั้ง Workflow ตั้งแต่ต้น ระบบ A ก็จะส่ง Request ไปสร้าง Resource ที่ระบบ B อีกครั้ง&lt;/p&gt;

&lt;p&gt;ผลที่ตามมาอาจเป็นข้อมูลซ้ำ หรือเกิด Unique Constraint Violation เพราะ Resource นั้นมีอยู่แล้ว&lt;/p&gt;

&lt;p&gt;นี่คือตัวอย่างหนึ่งของปัญหา &lt;strong&gt;Distributed Data Inconsistency&lt;/strong&gt; ที่เกิดจากสถานะของสองระบบไม่สอดคล้องกัน&lt;/p&gt;

&lt;p&gt;การแก้ปัญหาแบบนี้ไม่ใช่แค่เพิ่ม Try-Catch หรือ Retry เข้าไปก็จบ&lt;/p&gt;

&lt;p&gt;เราต้องรู้ว่า Operation ไหนสำเร็จไปแล้ว มีวิธีตรวจสอบสถานะจากระบบปลายทางหรือไม่ และสามารถออกแบบ Idempotency เพื่อป้องกันการประมวลผลซ้ำได้อย่างไร&lt;/p&gt;

&lt;p&gt;บางกรณีอาจต้องใช้ Reconciliation Process เพื่อตรวจสอบและปรับสถานะของข้อมูลระหว่างระบบให้ตรงกัน&lt;/p&gt;

&lt;p&gt;เรื่องนี้ทำให้ผมเข้าใจมากขึ้นว่า การเขียนโค้ดให้ทำงานได้เป็นเพียงส่วนหนึ่ง แต่การออกแบบให้ระบบรับมือกับความผิดพลาดต่างหากที่ต้องใช้ความเข้าใจมากขึ้นอีกระดับ&lt;/p&gt;

&lt;h2&gt;
  
  
  แล้วเวลา Production มีปัญหา ผมทำยังไง?
&lt;/h2&gt;

&lt;p&gt;แน่นอนครับ ทำงานมาสักพักก็ต้องมีโอกาสเจอ Production Issue กันบ้าง&lt;/p&gt;

&lt;p&gt;บางครั้ง Job ค้าง บางครั้ง Log ก็ไม่ได้บอกอะไรชัดเจน หรือบางครั้งลูกค้าก็แจ้งมาว่า&lt;/p&gt;

&lt;p&gt;"ทำไมออเดอร์บางรายการหายไป?"&lt;/p&gt;

&lt;p&gt;เจอแบบนี้ใครจะไม่ปวดหัวบ้างล่ะครับ ฮ่า ๆ&lt;/p&gt;

&lt;p&gt;แต่สิ่งแรกที่ผมพยายามทำคือการหา Root cause ผมจะเริ่มจากการเก็บหลักฐานและตรวจสอบสถานะของระบบก่อน สิ่งแรกวิ่งไปทีม Intfa ขอดู logs monitor services &amp;amp; servers ก่อนเลยเพื่อขอดู logs ย้อนหลัง&lt;/p&gt;

&lt;p&gt;ทีนี้หากจำเป็นต้องนำข้อมูลมาจำลองใน Local ก็ต้องจำลองสถานะการณ์ในเครื่องก็ต้องทำ เพื่อหา เคสหรือมุมมองที่อาจจะเป็นไปได้สำหรับเคสนั้น โดยปัจจุบันเราจะมี AI คอยช่วยตรงนี้สามารถให้ AI ref ข้อมูลจาก schema code เราได้และจำลอง mocking data เพื่อทดสอบและจำลองเคสว่าอาจจะเกิดจากอะไร&lt;/p&gt;

&lt;p&gt;จากนั้นค่อยไล่ตรวจสอบว่า Job ที่มีปัญหาค้างอยู่ตรงไหน เกิด Connection Lost หรือ Timeout หรือเปล่า ระบบภายนอกตอบกลับมาว่าอะไร และมี Request Payload หรือหลักฐานเพียงพอสำหรับการตรวจสอบหรือ Retry ไหม๊&lt;/p&gt;

&lt;p&gt;เพราะการจะทำการ Retry งานโดยไม่ตรวจสอบก่อนว่า Operation เดิมสำเร็จไปแล้วหรือยัง เพราะอาจทำให้เกิด Double Processing เหมือนตัวอย่างก่อนหน้าที่ผมพูดถึงได้&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6utfq9tng7yxmmlsk0l4.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6utfq9tng7yxmmlsk0l4.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ผมมีสมมติฐานอย่างหนึ่งเวลาเจอปัญหาประเภทนี้&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ออเดอร์ที่สร้างสำเร็จแล้ว ไม่ควรหายไปจากระบบโดยไม่มีร่องรอย&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ถ้าลูกค้าบอกว่าออเดอร์หาย ผมจะเริ่มตรวจสอบก่อนว่ามันหายจริง หรือแค่ค้างอยู่ใน State บางอย่าง ถูกกรองออกจากหน้าจอ หรือเกิดปัญหาระหว่างการ Synchronize ข้อมูล&lt;/p&gt;

&lt;p&gt;แน่นอนว่าข้อมูลอาจสูญหายได้จริงจาก Bug หรือความผิดพลาดของระบบ ดังนั้นเราจึงต้องมีทั้ง Audit Trail, Backup และวิธี Recovery ที่เหมาะสม&lt;/p&gt;

&lt;p&gt;สำหรับผม การแก้ Production Issue นั้นเป็นส่วนหนึ่งที่สำคัญในขั้นตอน Maintenance ซึ่งการหาสาเหตุหลัก ๆ ให้เจอ แก้ไขอย่างปลอดภัย และพยายามไม่ให้ปัญหาเดิมกลับมาเกิดซ้ำ เป็นสิ่งที่สำคัญมาก ๆ แต่ก็จะแบบเจอบางจังหวะที่แบบ เฮ้ยย ตรงนั้นมันจะทำให้เกิดปัญหา B C D ... ตามมานะ...หมายถึงปัญหาในอนาคต บางทีเรามองเห็นแล้ว แต่ยังไม่ถึงเวลาแก้เพราะติด Part Commercial อันนี้ก็จะคันไม้คันมือเป็นต้น แต่ก็ทำอะไรไม่ได้แบบนี้ก็มี &amp;gt;&amp;lt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ผมคิดเรื่อง Workflow Orchestration ยังไง?
&lt;/h2&gt;

&lt;p&gt;เวลาต้องออกแบบระบบที่มีหลาย Workflow ผมไม่ได้เริ่มจากการเลือก Tool หรือ Programming Language ก่อน&lt;/p&gt;

&lt;p&gt;ผมจะเริ่มจากการตั้งคำถามว่า ระบบนี้สำคัญต่อ Business Domain ของ User แค่ไหน มีข้อจำกัดอะไรบ้าง และยอมรับความผิดพลาดได้มากน้อยขนาดไหนก่อนจะเริ่ม design และแน่นอนแหละเราให้ความสำคัญสำหรับทุกการออกแบบของระบบ แต่ว่าตรงจุดที่ว่า Accept Failure ต่าง ๆ ได้มากน้อยแค่ไหนตรงนี้ผมก็มองว่าเป็นส่วนที่สำคัญส่วนหนึ่ง&lt;/p&gt;

&lt;p&gt;จากนั้นจึงค่อยทำความเข้าใจ Domain แบ่งขอบเขตความรับผิดชอบของแต่ละ Workflow และพิจารณาว่าควรแยก Process หรือ Component ออกจากกันตรงไหน&lt;/p&gt;

&lt;p&gt;เมื่อเข้าใจภาพรวมแล้วจึงค่อยลงรายละเอียดเรื่อง State Transition, Events, Failure Handling และ Recovery Strategy&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcx1cwcg688tfaowui0sb.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcx1cwcg688tfaowui0sb.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;โดยทั่วไปผมชอบแบ่งการออกแบบเป็นสองระดับ&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ระดับแรกคือ Conceptual Design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;เป็นภาพรวมของระบบที่ใช้พูดคุยกับทีมและผู้เกี่ยวข้อง ไม่ว่าจะเป็น Developer, QA, PM หรือฝั่ง Business&lt;/p&gt;

&lt;p&gt;จุดประสงค์คือทำให้ทุกคนเข้าใจตรงกันว่าข้อมูลเดินทางอย่างไร แต่ละขั้นตอนมีหน้าที่อะไร และหากเกิดปัญหาจะส่งผลกระทบกับส่วนไหนบ้าง&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ระดับที่สองคือ Technical Design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;เมื่อภาพรวมชัดเจนแล้วจึงค่อยลงรายละเอียดว่าเราจะใช้ Technology อะไร เช่น RiverQueue, Temporal, RabbitMQ หรือ Kafka&lt;/p&gt;

&lt;p&gt;แต่ละเครื่องมือมีหน้าที่และข้อจำกัดแตกต่างกัน บางตัวเหมาะกับ Background Job บางตัวเหมาะกับ Workflow Execution และบางตัวเป็น Messaging Infrastructure&lt;/p&gt;

&lt;p&gt;จึงไม่ใช่เรื่องของการเลือกเครื่องมือที่ดูเก่งที่สุด แต่เป็นการเลือกให้เหมาะกับปัญหาที่เรากำลังแก้&lt;/p&gt;

&lt;p&gt;ผมคิดว่าไม่ใช่ทุกคนในทีมจำเป็นต้องเข้าใจ Technical Detail ลึกเท่ากันทั้งหมด&lt;/p&gt;

&lt;p&gt;แต่ทุกคนที่เกี่ยวข้องควรเข้าใจภาพรวมของระบบและผลกระทบจากการเปลี่ยนแปลงในส่วนที่ตัวเองรับผิดชอบ&lt;/p&gt;

&lt;p&gt;เพราะสุดท้ายแล้ว Diagram ที่ดีไม่ได้มีไว้แค่ทำให้ Architecture ดูสวย แต่ควรช่วยให้ทีมสื่อสารและตัดสินใจได้ดีขึ้นจริง ๆ&lt;/p&gt;

&lt;h2&gt;
  
  
  ทำไมผมไม่ค่อยเชื่อคำว่า "If it works, don't touch it"
&lt;/h2&gt;

&lt;p&gt;ผมได้ยินประโยคนี้อยู่บ่อยเหมือนกันครับ เข้าใจแหละว่าเป็นโจ๊ก ซึ่งจริง ๆ แล้วอาจจะทำให้เป็นโจ๊กจริง (เละเป็นโจ๊ก &amp;gt;&amp;lt;)&lt;/p&gt;

&lt;p&gt;จริง ๆ ก็ไม่ได้คิดว่ามันผิดไปเสียทั้งหมด เพราะบางสถานการณ์การไม่แตะต้องระบบที่ทำงานอยู่ก็เป็นทางเลือกที่สมเหตุสมผล&lt;/p&gt;

&lt;p&gt;เช่น เวลามีจำกัด มีงานอื่นสำคัญกว่า หรือทีมยังไม่มีความเข้าใจและ Test Coverage เพียงพอที่จะเปลี่ยนแปลงระบบอย่างปลอดภัย และคุ้มค่ากับเวลาที่เสียไปกับมันจริง ๆ เพราะทุกอย่างล้วนมีต้นทุน&lt;/p&gt;

&lt;p&gt;แต่ผมไม่คิดว่าประโยคนี้ควรถูกนำมาใช้เป็นหลักการถาวรในการพัฒนาซอฟต์แวร์&lt;/p&gt;

&lt;p&gt;เพราะระบบที่ทำงานได้ในวันนี้ ไม่ได้หมายความว่าจะรองรับ Requirement ใหม่ในวันข้างหน้าได้เสมอไป&lt;/p&gt;

&lt;p&gt;สำหรับผม ระบบที่ดีควรเปิดโอกาสให้ Developer คนใหม่เข้ามาศึกษาและพัฒนาต่อได้ สามารถปรับเปลี่ยนตามความต้องการทางธุรกิจ และแก้ไข Edge Case ได้ง่าย โดยจะพยายามทำให้ไม่มี Learning Curve สูงมากนัก ในทาง Development เพราะเราควรเอาเวลาไปเข้าใจ Business Domain เป็นหลักเพื่อทำระบบให้ตอบโจทย์ลูกค้า&lt;/p&gt;

&lt;p&gt;ที่พูดถึงในลักษณะนี้เพราะผมเคยเจอระบบที่ไม่มี Source Code ต้นฉบับให้ ต้อง Reverse Engineering ซึ่งเป็นงานที่สนุกดี (เขาไม่ได้ให้ทำถึงขนาดนั้นหรอก แต่อยากทำเองเพราะเรามองเห็นความเป็นไปได้ที่ระบบมันจะกลับมาทำงานได้)&lt;/p&gt;

&lt;p&gt;งานแบบนี้ก็ถือเป็น Software Engineering รูปแบบหนึ่งเหมือนกัน เพียงแต่เป็นงานที่มีความไม่แน่นอนและใช้ความพยายามสูงมาก (ก่อนหน้านี้ยังไม่มี REA หรือ AI ยังไม่เก่งเลย แต่ก็สนุกไปอีกแบบ)&lt;/p&gt;

&lt;p&gt;บางทีก็นั่งคิดว่า ใครมันจะบ้าดันทุรังทำอะไรแบบนี้&lt;/p&gt;

&lt;p&gt;อ้าว... เราเองนี่หว่า (ขอ noted ไว้ว่าการทำในลักษณะนี้ทำในขอบเขตระบบที่จำกัด และมีจุดประสงค์ให้ระบบที่มีอยู่เดิมสามารถทำงานได้เท่านั้นครับไม่ได้ไปทำสุ่มสี่สุ่มห้า)&lt;/p&gt;

&lt;p&gt;แต่ประสบการณ์แบบนี้ก็ทำให้ผมเห็นความสำคัญของ Source Control, Documentation, Automated Tests และการถ่ายทอดความรู้ภายในทีมมากขึ้นกว่าเดิม&lt;/p&gt;

&lt;p&gt;เพราะเราไม่มีทางรู้เลยว่าวันหนึ่งคนที่เข้าใจระบบดีที่สุดจะยังอยู่กับทีมต่อไปหรือเปล่า&lt;/p&gt;

&lt;h2&gt;
  
  
  ถ้าวันหนึ่งผมหายเข้าป่าไปหนึ่งเดือนจะเป็นยังไง?
&lt;/h2&gt;

&lt;p&gt;นี่เป็นคำถามที่ผมชอบใช้คิดเวลาออกแบบหรือดูแลระบบ เพราะเวลาเราทำผลงานชิ้นหนึ่ง เราไม่ได้ทำคนเดียว ควรจะทำระบบ หรือออกแบบระบบให้ตามมาตรฐานและดูแลง่ายที่สุด&lt;/p&gt;

&lt;p&gt;ถ้าวันหนึ่งผมลาพักร้อนยาว ๆ หายเข้าป่าไปสักเดือนหนึ่ง ระบบที่ผมรับผิดชอบจะยังทำงานต่อได้ไหม? มันก็จะมีโมนเมนต์ขำ ๆ แบบว่า PM จะบอกเอา Laptop ไปด้วยนะ... ขอโทษเถอะผมจะไปปีนเสาสัญญาณที่ไหน &amp;gt;&amp;lt;&lt;/p&gt;

&lt;p&gt;แล้วถ้ามี Requirement ใหม่เข้ามา คนอื่นในทีมจะสามารถพัฒนาต่อได้หรือเปล่า?&lt;/p&gt;

&lt;p&gt;สำหรับผม คำตอบที่อยากได้คือ &lt;strong&gt;ได้ครับ&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ระบบควรมี Documentation ที่จำเป็น มี Diagram หรือ Blueprint ที่ช่วยอธิบายภาพรวม และมี Source Code ที่อ่านแล้วพอเข้าใจเจตนาของการออกแบบได้ ยิ่งทุกวันนี้แบบ AI ทำตรงจุดนี้ได้ง่ายมาก ๆ​ ยกตัวอย่าง ChatGPT ตัวนี้ทำเอกสารได้ดีและได้ไวสำหรับทั้งภาษาไทยและภาษาอังกฤ​ษ ​(ปัจจุบันปลายปี 2026 นะจ๊ะ) ซึ่งต้อง Prompt และ Brief ดี ๆ ช่วยทำเอกสารได้ง่ายมาก ๆ&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhoysu7tdy9q5re4zsyzf.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhoysu7tdy9q5re4zsyzf.png" alt=" " width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;แน่นอนว่าเราไม่จำเป็นต้องเขียนเอกสารอธิบายทุกบรรทัด เพราะบางอย่าง Source Code และ Automated Tests ก็สามารถอธิบายได้ดีกว่าเอกสารเสียอีก. แต่ก็อย่าลืมนะว่ามีดีกว่าไม่มี และยิ่งถ้าอยากให้มีมาตรฐานมาก ๆ ควรอย่างยิ่ง อันนี้ผมพูดองค์รวมนะ เพราะบริษัทไหนที่ทำ ISO จะมีเอกสารมากำกับอยู่แล้วจุดนี้คงไม่ต้อง Concern อะไรกันมาก&lt;/p&gt;

&lt;p&gt;สิ่งสำคัญคือทีมควรมีความรู้และหลักฐานเพียงพอที่จะดูแลระบบต่อได้ โดยไม่ต้องรอให้คนใดคนหนึ่งกลับมาตอบคำถาม ดังนั้นแล้วต้องมีการ Sync Knowledge ให้ทีมเสมอ ๆ สำคัญมาก ๆ &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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rwys4ibfjwe2ap2j409.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rwys4ibfjwe2ap2j409.png" alt=" " width="480" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ผมไม่ค่อยเชื่อในการสร้างระบบที่ต้องพึ่งพา "คนเก่งคนเดียว"&lt;/p&gt;

&lt;p&gt;ไม่ใช่เพราะคนเก่งไม่สำคัญนะครับ แต่เพราะซอฟต์แวร์ส่วนใหญ่ไม่ได้ถูกสร้างขึ้นมาเพื่อให้คนเพียงคนเดียวดูแลไปตลอดชีวิต&lt;/p&gt;

&lt;p&gt;ผมเองก็เป็นเพียงฟันเฟืองหนึ่งของทีม มีหน้าที่ช่วยให้ระบบและทีมเดินหน้าต่อไปได้&lt;/p&gt;

&lt;p&gt;ถ้าวันหนึ่งผมไม่อยู่ ทีมก็ควรทำงานต่อได้เหมือนเดิม&lt;/p&gt;

&lt;p&gt;และผมก็ไม่อยากให้มีส่วนไหนของระบบกลายเป็นพื้นที่ต้องห้ามที่ทุกคนกลัวจะแตะต้อง&lt;/p&gt;

&lt;p&gt;สิ่งที่ควรมีไม่ใช่คำว่า "ห้ามแก้" แต่เป็นความเข้าใจว่าอะไรมีความเสี่ยงสูง อะไรควรทำก่อนหรือหลัง และต้องเตรียมอะไรบ้างก่อนเปลี่ยนแปลง&lt;/p&gt;

&lt;p&gt;ทุกวันนี้เรามีเครื่องมือช่วยทำความเข้าใจ Codebase มากกว่าแต่ก่อน ทั้ง Static Analysis, Code Search, Diagram และ AI ที่ช่วยสำรวจโครงสร้างของโค้ดได้&lt;br&gt;
ในเมื่อเครื่องมือพัฒนาไปไกลขนาดนี้ การเข้ามาศึกษาระบบเดิมก็ควรจะง่ายขึ้น ไม่ใช่ยากขึ้นสิครับ!&lt;/p&gt;

&lt;p&gt;ถึง AI จะไม่ได้เข้าใจ Business Context ทั้งหมด และยังต้องอาศัยคนตรวจสอบความถูกต้องอยู่ดี แต่มันก็ควรช่วยลดเวลาที่ต้องใช้ในการเรียนรู้ระบบได้พอสมควร ทุกวันนี้เราผลัก Congnitive Load ไปที่ AI แล้วก็ Context บางส่วนให้ AI แทบจะทั้งหมด แต่อย่าลืมว่า Overview Over All Context ของระบบหรือปัญหานั้น ๆ เราจะต้องดูด้วยตัวเองเป็นหลัก ๆ ทุกวันนี้ผมยังเถียงกับ AI อยู่เลย มันเก่งนะแต่การจะใช้ให้มีประสิทธิภาพเราต้องใส่ ไอเดียของเรา Fundamental ที่แข็งแรง ๆ ของเรา Pair ไปกับ AI ด้วยถึงจะ Powerful  &lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;พอมองย้อนกลับไปตั้งแต่วันที่เริ่มฝึกงานจนถึงวันนี้ ผมก็ยังทำงานเกี่ยวกับ Backend อยู่และอาจจะมีแจมทำ Frontend บ้าง ไปจนถึงระบบ Edge Device &amp;amp; Computer Vision เองที่ถือเป็นน่านน้ำใหม่ และแปลกใหม่จากเดิม&lt;/p&gt;

&lt;p&gt;ยังเขียน API ยังออกแบบ Database ยังแก้ Bug และยังต้องนั่งไล่ Log เวลาอะไรสักอย่างทำงานผิดปกติ และใช้ AI ทุ่นแรงไปได้เยอะเลย&lt;/p&gt;

&lt;p&gt;สิ่งที่เปลี่ยนไปคือมุมมองต่อการสร้างซอฟต์แวร์&lt;/p&gt;

&lt;p&gt;จากวันที่สนใจแค่ว่าโค้ดทำงานได้หรือไม่ วันนี้ผมเริ่มสนใจมากขึ้นว่าระบบจะรับมือกับความผิดพลาดอย่างไร จะดูแลรักษาต่อไปได้อย่างไร และคนอื่นจะสามารถเข้ามาทำงานต่อจากเราได้ง่ายแค่ไหน&lt;/p&gt;

&lt;p&gt;ผมรู้สึกว่ายังมีอีกหลายเรื่องที่ไม่รู้ และอีกหลายอย่างที่ต้องเรียนรู้ต่อไปเยอะมาก ๆ&lt;/p&gt;

&lt;p&gt;เพียงแต่ทุกปัญหาที่เจอ ทุก Production Issue ที่ต้องแก้ และทุกระบบที่ได้มีโอกาสออกแบบ มันค่อย ๆ ปรับปรุงวิธีคิด และเปิดมุมมองของผมไปทีละนิด ทีละนิดตามประสบการณ์ที่สั่งสมมาในแต่ละโปรเจค&lt;/p&gt;

&lt;p&gt;สำหรับผม Software Engineer คือคนที่ไม่ได้รับผิดชอบแค่การเขียนโค้ด แต่ต้องคิดถึงระบบที่โค้ดนั้นเป็นส่วนประกอบด้วย ต้องยอมรับว่าความผิดพลาดเกิดขึ้นได้ ต้องออกแบบวิธีรับมือกับมัน และต้องพยายามทำให้ซอฟต์แวร์สามารถพัฒนาต่อไปได้โดยไม่ผูกติดกับคนใดคนหนึ่งมากเกินไป&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ถ้าวันหนึ่งผมหายเข้าป่าไป ระบบยังทำงานได้ ทีมยังพัฒนาต่อได้ และไม่มีใครต้องโทรมาตามให้ผมกลับไปแก้ Production&lt;/p&gt;

&lt;p&gt;นั่นแหละครับ คือซอฟต์แวร์ที่ผมอยากสร้าง&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;เอาล่ะถือว่าบ่นมายาวพอสมควรก็นั่นแหละครับนี่คือทั้งหมดที่ผมทำงานมาจาก เด็กฝึกงานและจนถึงทุกวันนี้ผมคงเรียกบทบาทตัวเองในฐานนะ Software Engineer เป็นหลัก ซึ่งยังคงชอบทำอะไรเกี่ยวกับ Software อยู่ในทุก ๆ วัน&lt;/p&gt;

&lt;p&gt;ตอนนี้ในโลกการทำงานเห็นหลาย ๆ ที่เปิดรับเป็น Full Stack แทบจะทั้งหมดแล้ว ซึ่งผมมองว่าก็ Makesense ส่วนหนึ่งได้อิทธิพลมาจาก AI เราอาจจะต้องเพิ่ม Skill Sets ด้านอื่น ๆ และพัฒนาตัวเองยิ่ง ๆ ขึ้นไปตราบใดที่เรายังอยู่ในโลกทุนนิยม นำความรู้ไปต่อยอดในสายอาชีพ หมั่นอัปเดตความรู้เสมอในโลกที่ไวอย่างไม่เคยมีมาก่อนเพราะว่า AI : ) &lt;/p&gt;

&lt;p&gt;สุดท้ายนี้ ขอฝากประโยคหนึ่งที่ผมเขียนไว้เตือนตัวเองเกี่ยวกับการสร้างซอฟต์แวร์&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Crafting software requires artistry, guided by imagination, grounded in logic, endlessly enduring.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Akkarapon Phikulsri&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;สำหรับ diagrams ต่าง ๆ ในบทความนี้ วาดโดยใช้ drawdy ซึ่งบอกเลยว่าลื่นปรื๊ด วาดแบบไม่มีสะดุดเลย ผมหา Tools อะไรแบบนี้มานานละ แล้วได้ฟังทีม Engineer ของ drawdy optimize tools ตัวนี้ใน Youtube ด้วยเลยลองใช้ดู&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://drawdy.io/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;drawdy.io&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;ส่วนตัวมองว่าตอบโจทย์ผมมาก ๆ ครับ&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>backenddevelopment</category>
      <category>softwarecraftsmanship</category>
      <category>developerjourney</category>
    </item>
    <item>
      <title>Why Passing Tests Doesn't Mean Your Software Is Correct</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sun, 15 Nov 2026 02:37:53 +0000</pubDate>
      <link>https://dev.to/akkaraponph/why-passing-tests-doesnt-mean-your-software-is-correct-4f6o</link>
      <guid>https://dev.to/akkaraponph/why-passing-tests-doesnt-mean-your-software-is-correct-4f6o</guid>
      <description>&lt;p&gt;A Go pricing example show my green tests and high coverage can still miss a business rule defect.&lt;/p&gt;

&lt;p&gt;Imagine a checkout service that gives customers a 10% discount on orders of $200 or more. The change has passed code review. The CI pipeline is green and the unit tests report 100% statement coverage.&lt;/p&gt;

&lt;p&gt;Then a customer places a $150 order and recieves the discount. The service is working as written but it is not following the business rule.&lt;/p&gt;

&lt;p&gt;How could the tests pass ? &lt;/p&gt;

&lt;p&gt;The answer is simple &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a test can run the code without checking whether the result is correct.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To understand this problem we need to seperate test execution, passing tests, code coverage, assertion quality and software correctness.&lt;/p&gt;

&lt;p&gt;A small Go service with a real defect&lt;/p&gt;

&lt;p&gt;Our business rule is&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Apply a 10% discount only when the order subtotal is at least $200, Otherwise return the original subtotal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The example stores money as integer cents. It assumes a non negative subtotal and rounds the discount down to a thole cent through integer division. We will focus on the discount threshold, not input validation.&lt;/p&gt;

&lt;p&gt;Create a go module&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir pricing-demo &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; pricing-demo
go mod init example.com/pricing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Add &lt;code&gt;pricing.go&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;pricing&lt;/span&gt;

&lt;span class="c1"&gt;// FinalPrice returns the price in cents after any eligible discount.&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nc"&gt;FinalPrice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subtotalCents&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;subtotalCents&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;10_000&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// BUG: the rule says 20_000.&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;subtotalCents&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;subtotalCents&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;subtotalCents&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The code gives the discount starting at $100 instead of $200 This matters for any subtotal from 10,000 to 19,999 cents.&lt;/p&gt;

&lt;p&gt;For example, FinalPrice(15_000) return 13_500. The correct result is 15_000 because a $150 order should not recived a discount.&lt;/p&gt;

&lt;p&gt;Test execution is not the same as verification&lt;/p&gt;

&lt;p&gt;Now add pricing_test.go&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;pricing&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s2"&gt;"testing"&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nc"&gt;TestFinalPrice_Weak&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;subtotal&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;9_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20_000&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;got&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nc"&gt;FinalPrice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subtotal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;got&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Fatalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="s2"&gt;"FinalPrice(%d) = %d, want a non-negative amount"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="n"&gt;subtotal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;got&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This test execute both path in FinalPrice one order without a discount and one with a discount. It also has an assertion, which is a check that compares an observed result with an expected condition.&lt;/p&gt;

&lt;p&gt;But the assertion is too weak. It only checks that result is not negative. A wrong price of 13_500 would satisfy that condition, just as the correct price of 15_000 would.&lt;/p&gt;

&lt;p&gt;Run&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;test&lt;/span&gt; -count=1 -cover ./...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmrvle0nz0i43d09qy8lq.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmrvle0nz0i43d09qy8lq.png" alt=" " width="799" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this isolated example the test passes and Go report&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;coverage: 100.0% of statements
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Both branches have run. Every statement in this small function has been exercised. The business rule defect is still present.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5y7dnixutvp15p2use28.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5y7dnixutvp15p2use28.png" alt=" " width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 1. Passing tests confirm only the checks the suite actually makes&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Test Execution&lt;br&gt;
Running tests confirms that the test code was executed. However, it does not mean the tests checked important behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Passing Tests&lt;br&gt;
Passing tests mean all executed checks succeeded. However they do not prove that every requirement was tested.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code coverage &lt;br&gt;
Code coverage shows which parts of the source code were executed duting testing. However, high coverage does not mean the results were correct.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assertion Quality, Can the tests detect incorrect behavior ? &lt;br&gt;
Good assertions help tests catch wrong results. However strong assertions do not guarantee that every possible scenario was tested.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Software Correctness, Does the software work as expected ? &lt;br&gt;
Software correctness means the system meets it requirements under relevant conditions. Passing tests provide edividence of correctness, but they cannot prove it on thier own.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Running tests, passings test and achieving high code coverage are not the same as proving software correctness. What matters is whether the tests can detect meaningful defects.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thesese concepts support each other, but they are not interchangeable.&lt;/p&gt;

&lt;p&gt;Go coverage tooling measures executed statement. It does not judge the quality of your expectations. The official&lt;br&gt;
 &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://go.dev/blog/cover" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;go.dev&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;explains how instrumentation redcords which parts of the source code are exercised.&lt;/p&gt;

&lt;p&gt;Stornger tests use the business rule as expeceted result&lt;/p&gt;

&lt;p&gt;A better test starts from the rule, not from what the implementation happens to return.&lt;/p&gt;

&lt;p&gt;Add pricing_rule_test.go&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;pricing&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s2"&gt;"testing"&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nc"&gt;TestFinalPrice_BusinessRule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;tests&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;name&lt;/span&gt;     &lt;span class="kt"&gt;string&lt;/span&gt;
        &lt;span class="n"&gt;subtotal&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;
        &lt;span class="n"&gt;want&lt;/span&gt;     &lt;span class="kt"&gt;int&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"ordinary order"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9_000&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"below threshold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15_000&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"just below threshold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;19_999&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;19_999&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"at threshold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18_000&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"above threshold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;22_500&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tt&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;range&lt;/span&gt; &lt;span class="n"&gt;tests&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;testing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;got&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nc"&gt;FinalPrice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subtotal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;got&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;tt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;want&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="s2"&gt;"FinalPrice(%d) = %d, want %d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;tt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subtotal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;got&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;want&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This test use a test oracle, meaning a source of expected results. Here the oracle is the written business rule, expressed as exact amounts in the test cases.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;test&lt;/span&gt; -count=1 -cover ./...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kwvyuccz8aehu097r1q.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kwvyuccz8aehu097r1q.png" alt=" " width="799" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The stronger suite fails on two cases&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FinalPrice(15000) = 13500, want 15000
FinalPrice(19999) = 18000, want 19999
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Notice what changed. We did not need more statement coverage to find this defect. We needed test inputs near the rule boundary and assertions that checked the actual price.&lt;/p&gt;

&lt;p&gt;Fix the condition in pricing.go&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if subtotalCents &amp;gt;= 20_000 {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwd26azmicb1nw4y8b03m.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwd26azmicb1nw4y8b03m.png" alt=" " width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now both test files pass. The coverage number remaings 100% in this small example, but the tests provide stronger evidence about the discount rule.&lt;/p&gt;

&lt;p&gt;Why 100% coverage is not 100% correctness &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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe11pxtziqrrmdtgy322n.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe11pxtziqrrmdtgy322n.png" alt=" " width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 2. Equal statement coverage does not mean equal defect-detection ability.&lt;/p&gt;

&lt;p&gt;Coverage answer an execution question&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which parts of this code ran while tests were running ? &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;it does not answer a requirements question&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Did the program produce the right result ? &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Coverage is useful when it points to a path that no test exercises. It is much less useful as a score for test quality. Martin Fowler makes this distinction in his article on &lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://martinfowler.com/bliki/TestCoverage.html" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmartinfowler.com%2Fbliki%2Fimages%2FtestCoverage%2Fcard.png" height="300" class="m-0" width="560"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://martinfowler.com/bliki/TestCoverage.html" rel="noopener noreferrer" class="c-link"&gt;
            Test Coverage
          &lt;/a&gt;
        &lt;/h2&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
          martinfowler.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Even 100% statement coverage leaves important gaps. A test might check only that a function returns without an error. It might use the wrong expected value. It might miss an input boundary. And a rule missing from the implementation cannot be discovered merely by measuring execution of the code that exists. &lt;/p&gt;

&lt;p&gt;Go's coverage report is also about instrumented source statements, not a guarantee that every possible input, condition or execution order has been explored. The &lt;a href="https://pkg.go.dev/cmd/go" rel="noopener noreferrer"&gt;Go command documentation&lt;/a&gt; describe the available coverage options and test behavior.&lt;/p&gt;

&lt;p&gt;Use coverage to find places that need attention. Do not treat its percentage as proof that the service meets its contract.&lt;/p&gt;

&lt;p&gt;A pasing test it evidence, not a proof&lt;/p&gt;

&lt;p&gt;A test has a limited claim for these inputs, in this environments, the observed result met these expectations.&lt;/p&gt;

&lt;p&gt;That is valuable edividence, it can prevent regressions, document an example of expected behavior and detect defects early. But its strength depends on the selected cases, the correctness of the expected results and the reliability of the test environment.&lt;/p&gt;

&lt;p&gt;A services has many more possible situations than a small test suite can usally exercise. Inputs can change dependencies can fail and concurrent requestes can arrive in difference orders. Passing tests cannot by themselves, establish that every possible behavior is correct.&lt;/p&gt;

&lt;p&gt;This does not make testing pointless. It means we should be precise about what our tests demonstrate. Formal verification can esablish specific properties under stated assumptions, but an orinary green &lt;code&gt;go test&lt;/code&gt; result its not that kind of mathematical proof.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to make test result more meaningful
&lt;/h2&gt;

&lt;p&gt;When reviewing a unit test, begin with the requirement. Ask what result should occur and which mistake the test should catch. In the pricing example, the key condition is the threshild at 20,000 cents, so the values just below and at that boundary are more useful than two arbitary positive amounts.&lt;/p&gt;

&lt;p&gt;Prefer assertions about observable behavior. Checking &lt;code&gt;got != want&lt;/code&gt; for the final amount is more informative than checking that the amount is non-negative. When a function returns an error, check both the error and relevant result, according to its contract.&lt;/p&gt;

&lt;p&gt;Next, use coverage reports to find the code that has not been exercised. in Go, these command produce and inspect a statement coverage profile&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;test&lt;/span&gt; -count=1 -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
go tool cover -html=coverage.out
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3xd54xgv3gfn8xf53vbx.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3xd54xgv3gfn8xf53vbx.png" alt=" " width="799" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The HTML view makes it easier to see which statements ran. It does not mark wak assertions or missing business requirements.&lt;/p&gt;

&lt;p&gt;Finally review failure cases as carefully as success cases. For services, that may include invalid input dependency timeouts, retries and concurrent updates. Choose these cases based on the service's actual contract not on a target coverage percentage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Passing tests are useful, but thier meaning is narrower than the green status suggests. Coverage tells us what ran Assertions tell us what was checked. Correctness depends on whether those checks reflect the real requirements.&lt;/p&gt;

&lt;p&gt;The important question is not only whether we have tests, but whether those tests whould fail when the behavior becomes wrong. Mutation testing explores this by deliberately changing code and checking whether the tests notice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://go.dev/doc/tutorial/add-a-test" rel="noopener noreferrer"&gt;Go: Add a test&lt;/a&gt;, an introduction to the built-in test workflow.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://go.dev/blog/cover" rel="noopener noreferrer"&gt;Go: The cover story&lt;/a&gt;, an explanation of statement coverage and reports.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.go.dev/cmd/go" rel="noopener noreferrer"&gt;Go command documentation&lt;/a&gt;, including &lt;code&gt;go test&lt;/code&gt; and coverage flags.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://martinfowler.com/bliki/TestCoverage.html" rel="noopener noreferrer"&gt;Martin Fowler: Test Coverage&lt;/a&gt;, on using coverage to find gaps rather than treating it as a quality score.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>go</category>
      <category>testing</category>
      <category>codecoverage</category>
      <category>softwarequality</category>
    </item>
    <item>
      <title>Agent Skill for Debugging Things</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Fri, 06 Nov 2026 01:42:15 +0000</pubDate>
      <link>https://dev.to/akkaraponph/agent-skill-for-debugging-things-694</link>
      <guid>https://dev.to/akkaraponph/agent-skill-for-debugging-things-694</guid>
      <description>&lt;p&gt;Today, I want to create an agent skill for debugging. Sometimes, I receive bug reports or tickets from QA, but I don't always know where to start the investigation or what prompts to use.&lt;/p&gt;

&lt;p&gt;I decided to use the &lt;code&gt;Engineering: Debug&lt;/code&gt; skill to help with this process. However, its responses can sometimes be too long, with large paragraphs that are difficult to follow.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5d2ou7jy8y63e49ds5on.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5d2ou7jy8y63e49ds5on.png" alt=" " width="800" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I want to improve the skill so that it breaks the investigation into clear, structured sections, such as &lt;strong&gt;Root Cause&lt;/strong&gt;, &lt;strong&gt;How the Issue Occurs&lt;/strong&gt;, and other relevant topics. This will make the investigation easier to understand, review, and share with the development team.&lt;/p&gt;

&lt;p&gt;That's why I decided to create &lt;a href="https://github.com/akkaraponph/panda-debugger" rel="noopener noreferrer"&gt;Panda Debugger&lt;/a&gt;, an agent skill designed to make debugging investigations more structured, clear, and easier to follow.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7py1btf9r3fbail99oht.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7py1btf9r3fbail99oht.png" alt=" " width="799" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It make debugging easier by guiding me through the investigation step by step. It also helps me understand the problem better, explore possible causes, and generate new ideas about where to look next&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa4ft1lhaq2lpy5a4z83a.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa4ft1lhaq2lpy5a4z83a.jpeg" alt=" " width="799" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the end, I just want a clear structure with specific sections sometimes I also want to skip the investigation details and go straight to ideas or possible directions for fixing the issue. That what why i decided to create this skill. It's not about saying one approach is better or worse than another. I just wanted somthing that better fits the way I work. :)&lt;/p&gt;

</description>
      <category>agentskills</category>
      <category>agents</category>
      <category>debugging</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Signing PDFs in Go? Meet pdfsign v1.0.0</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Wed, 28 Oct 2026 16:18:03 +0000</pubDate>
      <link>https://dev.to/akkaraponph/signing-pdfs-in-go-meet-pdfsign-v100-1nje</link>
      <guid>https://dev.to/akkaraponph/signing-pdfs-in-go-meet-pdfsign-v100-1nje</guid>
      <description>&lt;p&gt;Hi :) Have you ever needed to sign a PDF document from a Go application ?&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fadhtnxsq4x0ptao3e2vc.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fadhtnxsq4x0ptao3e2vc.png" alt=" " width="607" height="648"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well, I had to do that for one of my projects. I needed to digitally sign PDF documents using a certificate, so I started looking for a suitable Go package.&lt;/p&gt;

&lt;p&gt;After exploring serveral options, I found &lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/digitorus" rel="noopener noreferrer"&gt;
        digitorus
      &lt;/a&gt; / &lt;a href="https://github.com/digitorus/pdfsign" rel="noopener noreferrer"&gt;
        pdfsign
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Add/verify Advanced Electronic Signature (AES) and Qualified Electronic Signature (QES) in PDF (using pure Go)
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Signing PDF files with Go&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/digitorus/pdfsign/actions?query=workflow%3Abuild-and-test" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/digitorus/pdfsign/workflows/Build%20&amp;amp;%20Test/badge.svg" alt="Build &amp;amp; Test"&gt;&lt;/a&gt;
&lt;a href="https://github.com/digitorus/pdfsign/actions?query=workflow%3Agolangci-lint" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/digitorus/pdfsign/workflows/golangci-lint/badge.svg" alt="golangci-lint"&gt;&lt;/a&gt;
&lt;a href="https://goreportcard.com/report/github.com/digitorus/pdfsign" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/5dc3df26e98f3a14b4e14d04b3caf19814ca418a7a30f65ffc414e632569740a/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f64696769746f7275732f7064667369676e" alt="Go Report Card"&gt;&lt;/a&gt;
&lt;a href="https://codecov.io/gh/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cfa4f06407b443a6e7b33a283904f6631e6fd359e53e0dc5926ef9f4e53013a7/68747470733a2f2f636f6465636f762e696f2f67682f64696769746f7275732f7064667369676e2f6272616e63682f6d61696e2f67726170682f62616467652e737667" alt="Coverage Status"&gt;&lt;/a&gt;
&lt;a href="https://pkg.go.dev/github.com/digitorus/pdfsign" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/4933fd52bfdc8b8e05885e7ec2e7d8dbf036cd45095a1cb3be47e66e1b5f014a/68747470733a2f2f706b672e676f2e6465762f62616467652f6769746875622e636f6d2f64696769746f7275732f7064667369676e2e737667" alt="Go Reference"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A PDF signing and verification library written in &lt;a href="https://go.dev" rel="nofollow noopener noreferrer"&gt;Go&lt;/a&gt;. This library provides both command-line tools and Go APIs for digitally signing and verifying PDF documents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;See also our &lt;a href="https://github.com/digitorus/pdfsigner/" rel="noopener noreferrer"&gt;PDFSigner&lt;/a&gt;, a more advanced digital signature server that is using this project.&lt;/strong&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Quick Start&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; Sign a PDF&lt;/span&gt;
./pdfsign sign -name &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;"&lt;/span&gt;John Doe&lt;span class="pl-pds"&gt;"&lt;/span&gt;&lt;/span&gt; input.pdf output.pdf certificate.crt private_key.key

&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; Verify a PDF signature&lt;/span&gt;
./pdfsign verify document.pdf&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Package Architecture&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;The library is organized into specialized subpackages, though most users will primarily interact with the root &lt;code&gt;pdfsign&lt;/code&gt; package.&lt;/p&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;pdfsign&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Primary entry point&lt;/strong&gt;. Provides the fluent API for signing, verification, and document management.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;extract&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low-level signature inspection. Allows extracting raw PKCS#7 envelopes and signed data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;forms&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;PDF form handling. Logic for field discovery and generating PDF object updates.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;initials&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Configuration and placement logic for signing initials across multiple pages.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;signers/...&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;External Signers&lt;/strong&gt;. Optional&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/digitorus/pdfsign" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;and decided to give it a try. it seemed like a good fit for my case...&lt;/p&gt;

&lt;p&gt;Well let take a look deep drive into that package&lt;/p&gt;

&lt;p&gt;Maybe you're building a document management system, generating contracts or automating an approval process. At first, signing a PDF might seem simple &lt;/p&gt;

&lt;p&gt;load document&lt;br&gt;
add a signature&lt;br&gt;
and save it !&lt;/p&gt;

&lt;p&gt;However, things can get more complicated when you work with real-world documents. You might need timestamps, certificate validation, certification permissions, signature verification, encrypted PDFs, or metadata in languages other than English.&lt;/p&gt;

&lt;p&gt;That's where digitorus/pdfsign comes in.&lt;/p&gt;

&lt;p&gt;On October 26, 2026, pdfsign reached v1.0.0. This release introduces a redesigned Go API, PAdES Baseline support, stronger signature verification, post-quantum signing support, better handling of encrypted PDFs, and improved support for Unicode metadata.&lt;/p&gt;

&lt;p&gt;In this blog we will explore the package through practical Go examples. We will also learn how to test certification signature.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is pdfsign?
&lt;/h2&gt;

&lt;p&gt;pdfsign is a PDF signing and verification library written in Go. It also provides command line tools, so you can integrate PDF signing into an application or work with PDF files directly from your terminal.&lt;/p&gt;

&lt;p&gt;The root pdfsign package is now the main entry point for most signing and verification tasks. Other packages provide more focused functionality, such as signature extraction, forms, fonts, images and integrations with external signing systems.&lt;/p&gt;

&lt;p&gt;Well I recently discovered that digitorus/pdfsign has released its stable v1.0.0 version. This release introduces several improvements&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Redesigned Go API Makes signing and verification easier to configure.&lt;/li&gt;
&lt;li&gt;PAdES Baseline B-B and B-T Supports basic signatures and timestamped signatures.&lt;/li&gt;
&lt;li&gt;Stronger verification Improves checks for signatures, certificates, timestamps, and document permissions.&lt;/li&gt;
&lt;li&gt;ML-DSA support Adds a post-quantum digital signature algorithm.&lt;/li&gt;
&lt;li&gt;Better PDF handling Improves support for encrypted PDFs and Unicode metadata.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's start with the Go API and then see how these signing features behave in practice.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example 1: Sign a PDF using Go
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;First, add the package to your Go module:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go get github.com/digitorus/pdfsign
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The following example demonstrates the signing flow using PAdES B-T&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"crypto"&lt;/span&gt;
    &lt;span class="s"&gt;"crypto/x509"&lt;/span&gt;
    &lt;span class="s"&gt;"os"&lt;/span&gt;

    &lt;span class="s"&gt;"github.com/digitorus/pdfsign"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;signPDF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;privateKey&lt;/span&gt; &lt;span class="n"&gt;crypto&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Signer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;certificate&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;x509&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Certificate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tsaURL&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;pdfsign&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OpenFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"contract.pdf"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"contract-signed.pdf"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;defer&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Sign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;certificate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
        &lt;span class="n"&gt;Format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pdfsign&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PAdES_B_T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
        &lt;span class="n"&gt;Timestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tsaURL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
        &lt;span class="n"&gt;Reason&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Contract approval"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This example assumes that you have already loaded the private key and certificate, and that the configured TSA endpoint is reachable.&lt;/p&gt;

&lt;p&gt;Here's what the main steps do&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;pdfsign.OpenFile(...) opens the source PDF.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;doc.Sign(...) configures the document for signing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Format(pdfsign.PAdES_B_T) selects the PAdES B-T profile.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Timestamp(tsaURL) requests a timestamp from the configured TSA.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reason(...) records the reason for signing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;doc.Write(output) writes the signed PDF.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fluent API makes the signing configuration easy to scan, especially when you need to add more options later.&lt;/p&gt;

&lt;p&gt;A production note: This is a focused example of the API, not a complete signing service. Your application still needs to handle credentials securely, validate inputs, define certificate and timestamp trust policies, and handle failures appropriately.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example 2 Verify a signed PDF
&lt;/h3&gt;

&lt;p&gt;Signing a PDF is only one part of the workflow. You may also need to verify a document before accepting it into your system.&lt;/p&gt;

&lt;p&gt;Here's a basic example using the verification builder&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"fmt"&lt;/span&gt;

    &lt;span class="s"&gt;"github.com/digitorus/pdfsign"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;verifyPDF&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;pdfsign&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OpenFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"contract-signed.pdf"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Verify&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Strict&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Valid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s"&gt;"PDF signature verification failed: %v"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"PDF passed strict signature verification"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can check it out in my playground!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/akkaraponph" rel="noopener noreferrer"&gt;
        akkaraponph
      &lt;/a&gt; / &lt;a href="https://github.com/akkaraponph/pdf-playground" rel="noopener noreferrer"&gt;
        pdf-playground
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;PDF signing playground — pdfsign v1.0.0&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Ten Go examples for learning and blog demonstrations, using &lt;code&gt;github.com/digitorus/pdfsign v1.0.0&lt;/code&gt;. Requires Go 1.27 or newer. Run commands from the indicated example folder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example1/README.md" rel="noopener noreferrer"&gt;Example 1: Sign using PAdES B-T&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example2/README.md" rel="noopener noreferrer"&gt;Example 2: Strict verification&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example3/README.md" rel="noopener noreferrer"&gt;Example 3: Diagnose verification failures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example4/README.md" rel="noopener noreferrer"&gt;Example 4: Detect changed signed content&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example5/README.md" rel="noopener noreferrer"&gt;Example 5: Trust a local test CA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example6/README.md" rel="noopener noreferrer"&gt;Example 6: Compare B-B and B-T timestamps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example7/README.md" rel="noopener noreferrer"&gt;Example 7: Produce a JSON verification report&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example8/README.md" rel="noopener noreferrer"&gt;Example 8: Verify a batch of PDFs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example9/README.md" rel="noopener noreferrer"&gt;Example 9: Thai certificate signing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/akkaraponph/pdf-playground/example10/README.md" rel="noopener noreferrer"&gt;Example 10: Chinese certificate signing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The root &lt;code&gt;go.mod&lt;/code&gt; pins v1.0.0 for all ten examples. To add that exact release to another module, use &lt;code&gt;go get github.com/digitorus/pdfsign@v1.0.0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Each folder contains sample PDFs and explains expected behavior. A command that demonstrates rejection is not a broken example. Signature integrity, certificate trust, and timestamp trust are separate checks.&lt;/p&gt;

&lt;p&gt;Examples 4–8 use a generated local test CA where appropriate…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/akkaraponph/pdf-playground" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;However at the 0.9.0 previous version, I ran into a problem. My certificate contained Thai language information, and after signing the PDF, I could not open the document in Adobe Acrobat Reader.&lt;/p&gt;

&lt;p&gt;Instead I got this error&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;There was an error opening this document. There was a problem reading this document (135).&lt;/code&gt;&lt;br&gt;
&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6a3of3ezzqjiuhme5057.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6a3of3ezzqjiuhme5057.png" alt=" " width="634" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But my deadline was getting closer. T_T&lt;/p&gt;

&lt;p&gt;As a last resort, I decide to clone the repository and modify the package to support certificates containing Thai language information &lt;/p&gt;

&lt;p&gt;I applied the fix locally and tested it. Luckily, it worked!&lt;/p&gt;

&lt;p&gt;After confirming that the fix solved my problem, I decided to contribute it back to the original project &lt;a href="https://github.com/digitorus/pdfsign" rel="noopener noreferrer"&gt;digitorus/pdfsign&lt;/a&gt; so that other developers could benefit from it too.&lt;/p&gt;

&lt;p&gt;I'm happy to see &lt;code&gt;pdfsign&lt;/code&gt; reach its stable &lt;strong&gt;v1.0.0&lt;/strong&gt; release. Even better, my first contribution to the project was included in this release!&lt;/p&gt;

&lt;p&gt;I also helped test and verify the fix to make sure it worked as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/digitorus/pdfsign/pull/169" rel="noopener noreferrer"&gt;contribution&lt;/a&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff6zi8ov8k6dyqtpx8ugd.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff6zi8ov8k6dyqtpx8ugd.png" alt=" " width="800" height="317"&gt;&lt;/a&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftopv0etgil9i5rv0iyjs.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftopv0etgil9i5rv0iyjs.png" alt=" " width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fun Fact
&lt;/h2&gt;

&lt;p&gt;That’s the story of how I rushed to meet a deadline, trying to get PDF signing working before it was too late. But in the end, fixing just one small issue made a difference to the community, and that’s something I’m proud of.&lt;/p&gt;

&lt;p&gt;Sometimes, even a one line change can make an impact  :)&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>pdfsign</category>
      <category>go</category>
      <category>backend</category>
    </item>
    <item>
      <title>Your AI-Generated UI Doesn't Need Another Gradient</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sun, 25 Oct 2026 14:03:38 +0000</pubDate>
      <link>https://dev.to/akkaraponph/your-ai-generated-ui-doesnt-need-another-gradient-3679</link>
      <guid>https://dev.to/akkaraponph/your-ai-generated-ui-doesnt-need-another-gradient-3679</guid>
      <description>&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://impeccable.style/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimpeccable.style%2Fog-image-v6.png" height="auto" class="m-0"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://impeccable.style/" rel="noopener noreferrer" class="c-link"&gt;
            Impeccable: The missing design vocabulary for agents
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Turn AI slop into interfaces you’re proud to ship. Impeccable gives your agent the design expertise to build from scratch, improve what you have, and stay true to your design system.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimpeccable.style%2Ffavicon.svg"&gt;
          impeccable.style
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The feature works. The buttons respond. The data loads.&lt;/p&gt;

&lt;p&gt;But the screen still feels off.&lt;/p&gt;

&lt;p&gt;There are cards inside cards. Every heading has an icon. Every status is a colorful badge. A giant title takes up half the space above a table that actually needs the room.&lt;/p&gt;

&lt;p&gt;Imagine trying to fix that with one more prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make this look more professional.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What should “professional” mean here? Less decoration? Better spacing? A completely different layout?&lt;/p&gt;

&lt;p&gt;That ambiguity is a good reason to give the next request a smaller job.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/akkaraponph/prompt-impeccable" rel="noopener noreferrer"&gt;Prompt Impeccable&lt;/a&gt; is a collection of 35 focused UI/UX prompts stored as standalone Markdown files. Instead of treating polish as one big redesign, it breaks the review into specific concerns: hierarchy, typography, tables, forms, loading states, accessibility, and more.&lt;/p&gt;

&lt;p&gt;Here's a practical way to use it without getting stuck in an endless redesign loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the task
&lt;/h2&gt;

&lt;p&gt;Consider a hypothetical document-processing app.&lt;/p&gt;

&lt;p&gt;A user opens the document list to answer three questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did the upload finish?&lt;/li&gt;
&lt;li&gt;Is the document ready?&lt;/li&gt;
&lt;li&gt;If processing failed, how can it be retried?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep those questions beside the component while reviewing it. They give you something more useful than “make it modern.”&lt;/p&gt;

&lt;p&gt;For this example, a proposed cleanup could look like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element&lt;/th&gt;
&lt;th&gt;Proposed change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Document name&lt;/td&gt;
&lt;td&gt;Give it the strongest emphasis in each row&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Processing status&lt;/td&gt;
&lt;td&gt;Keep a readable label visible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retry action&lt;/td&gt;
&lt;td&gt;Make it discoverable on failed items&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Updated timestamp&lt;/td&gt;
&lt;td&gt;Keep it available, but visually quieter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decorative icon beside every label&lt;/td&gt;
&lt;td&gt;Remove where it adds no information&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nested card wrappers&lt;/td&gt;
&lt;td&gt;Replace with rows or simpler grouping where appropriate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is an illustrative design proposal, not a tested before-and-after result. A different product might need a different treatment.&lt;/p&gt;

&lt;p&gt;The important part is the reasoning: each change should support what someone came to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick the relevant prompt
&lt;/h2&gt;

&lt;p&gt;You don't need to run all 35 prompts against every screen.&lt;/p&gt;

&lt;p&gt;The repository includes a &lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/11-table-data-grid-ux.md" rel="noopener noreferrer"&gt;table and data-grid prompt&lt;/a&gt; for data-heavy views. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Table / Data Grid UX
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/impeccable

Refine this table or data-heavy interface for fast scanning.

Prioritize:

* important columns
* alignment
* readable row density
* clear headers
* predictable actions
* useful filtering
* sorting
* pagination
* selection states

Reduce:

* icons in every cell
* excessive badges
* unnecessary borders
* oversized rows
* repeated information

Keep row actions visually secondary until needed.

Make large amounts of information easier to compare.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There are also separate prompts for &lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/06-card-reduction.md" rel="noopener noreferrer"&gt;card reduction&lt;/a&gt;, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Card Reduction
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/impeccable

Audit all cards and containers on this interface.

For every card, determine whether a visual container is actually necessary.

Flatten unnecessary cards.

Avoid:

* card inside card
* every section becoming a card
* excessive borders
* excessive shadows
* oversized radius
* decorative surfaces

Prefer:

* sections
* lists
* rows
* whitespace
* subtle separators
* typography

Keep cards only where they provide meaningful grouping.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/03-icon-discipline.md" rel="noopener noreferrer"&gt;icon discipline&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/impeccable

Review icon usage across this interface.

Preserve icons that improve:

* navigation
* recognition
* actions
* status
* scanning

Remove icons that are:

* decorative
* repeated unnecessarily
* placed beside every heading
* placed beside normal metadata
* duplicating obvious text
* used only to fill space

Do not make the interface icon-free.

Reduce icon density rather than removing iconography entirely.

Functional icons should remain.

Decorative icons should disappear.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/25-design-system-consistency.md" rel="noopener noreferrer"&gt;design-system consistency&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/impeccable

Audit this interface against the existing product design system.

Find inconsistencies in:

* spacing
* typography
* colors
* radius
* shadows
* buttons
* inputs
* cards
* badges
* icons
* states

Reuse existing components and tokens wherever possible.

Do not introduce a new visual pattern when an existing pattern already solves the problem.

Reduce one-off styling.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;For the document list, start with the table review. Open the Markdown file, read it, and give its instructions to your coding assistant along with the relevant component and the task you're trying to improve.&lt;/p&gt;

&lt;p&gt;Then add project-specific boundaries. For example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review the document-list component using the supplied table prompt.

Users need to check processing progress and retry failed documents.

Keep search, sorting, pagination, permissions, and API behavior unchanged.
Use the existing components and design tokens.
Do not change other screens.

Before editing, explain the proposed changes and any trade-offs.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This additional brief is an original example, not a copied repository prompt.&lt;/p&gt;

&lt;p&gt;Read the proposal before approving it. If the assistant suggests removing the owner column, check who uses that information. An administrator reviewing shared uploads may need it even when a single-user account doesn't.&lt;/p&gt;
&lt;h2&gt;
  
  
  Simpler doesn't mean emptier
&lt;/h2&gt;

&lt;p&gt;A cleanup can go too far.&lt;/p&gt;

&lt;p&gt;Suppose the new layout hides document status in a menu. The screen might look calmer, but the user now has to open each item to find the failed upload.&lt;/p&gt;

&lt;p&gt;That's not an improvement for the task above.&lt;/p&gt;

&lt;p&gt;The repository's &lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/05-information-density-optimization.md" rel="noopener noreferrer"&gt;information-density prompt&lt;/a&gt; explicitly warns against hiding useful information merely to simplify the interface.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Information Density Optimization
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/impeccable

Optimize the information density of this interface.

Reduce unnecessary visual noise without making the interface empty.

Keep important information visible and easy to scan.

Group related information together.

Reduce duplication.

Move secondary details into quieter presentation when appropriate.

Avoid solving complexity by simply hiding useful information.

The goal is:

high information value with low visual noise.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Try reducing emphasis before removing content. A timestamp can use quieter text. Row actions can remain accessible without looking like primary calls to action. Related metadata can share a line instead of occupying separate boxes.&lt;/p&gt;

&lt;p&gt;Likewise, don't remove every icon. Keep a recognizable action or status symbol when it helps. Question the icon whose only job is filling an empty corner.&lt;/p&gt;
&lt;h2&gt;
  
  
  Check the awkward states
&lt;/h2&gt;

&lt;p&gt;Once the populated screen looks reasonable, test the versions that aren't in the happy-path demo.&lt;/p&gt;

&lt;p&gt;What happens before the first upload? During processing? After a failed request? When a search returns nothing?&lt;/p&gt;

&lt;p&gt;Prompt Impeccable has dedicated prompts for &lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/17-empty-state.md" rel="noopener noreferrer"&gt;empty&lt;/a&gt;, &lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/18-loading-state.md" rel="noopener noreferrer"&gt;loading&lt;/a&gt;, and &lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/19-error-state.md" rel="noopener noreferrer"&gt;error&lt;/a&gt; states.&lt;/p&gt;

&lt;p&gt;For the hypothetical app, distinguish an empty library from an empty search result. One could offer an upload action; the other could offer a way to clear filters.&lt;/p&gt;

&lt;p&gt;For errors, only promise recovery actions the application supports. Don't add a “Retry” button with no retry behavior behind it, and don't invent a failure reason the backend never supplied.&lt;/p&gt;

&lt;p&gt;Then try the main path with the keyboard and on a narrow screen. Use the &lt;a href="https://github.com/akkaraponph/prompt-impeccable/blob/main/vibe-collections/23-accessibility-audit.md" rel="noopener noreferrer"&gt;accessibility audit&lt;/a&gt; as a checklist—not as proof that the result meets an accessibility standard.&lt;/p&gt;
&lt;h2&gt;
  
  
  Keep the change reviewable
&lt;/h2&gt;

&lt;p&gt;After each pass, inspect the diff and repeat the original task.&lt;/p&gt;

&lt;p&gt;Can you identify the document? Read its state? Find the retry action? Do sorting and pagination still work?&lt;/p&gt;

&lt;p&gt;If a visual cleanup also changes fetching logic or introduces a new dependency, ask why that belongs in this change. Keep unrelated work separate unless there's a clear reason to include it.&lt;/p&gt;

&lt;p&gt;There isn't a prompt that can make that judgment for your product. These files provide a useful review brief; you still need to check the implementation.&lt;/p&gt;

&lt;p&gt;Pick one screen that feels unfinished. Choose the prompt closest to its actual problem. Make one small change, then use the screen again.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/akkaraponph" rel="noopener noreferrer"&gt;
        akkaraponph
      &lt;/a&gt; / &lt;a href="https://github.com/akkaraponph/prompt-impeccable" rel="noopener noreferrer"&gt;
        prompt-impeccable
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Impeccable UX/UI Prompt Collection&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A modular collection of 35 targeted UX/UI prompts designed to eliminate AI-generated sloppiness, enforce design system consistency, and elevate web applications to production-grade craftsmanship.&lt;/p&gt;

&lt;p&gt;Each prompt is stored in its own standalone markdown file under this directory, ready to be used individually or combined for specific design, refactoring, and code review purposes.&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🎯 Categorized by Purpose&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;1. General Polish &amp;amp; AI-Slop Elimination&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;Targeted prompts to eliminate common AI design tropes (excessive containers, decorative gradients, random badges) and restore visual discipline.&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;

&lt;a href="https://github.com/akkaraponph/prompt-impeccable/./vibe-collections/01-base-production-polish.md" rel="noopener noreferrer"&gt;&lt;code&gt;01-base-production-polish.md&lt;/code&gt;&lt;/a&gt; — Base production polish for hierarchy, spacing, alignment, and responsiveness.&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://github.com/akkaraponph/prompt-impeccable/./vibe-collections/02-reduce-ai-sloppy-ui.md" rel="noopener noreferrer"&gt;&lt;code&gt;02-reduce-ai-sloppy-ui.md&lt;/code&gt;&lt;/a&gt; — Audit and remove cards-inside-cards, excessive pills, badges, and decorative noise.&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://github.com/akkaraponph/prompt-impeccable/./vibe-collections/03-icon-discipline.md" rel="noopener noreferrer"&gt;&lt;code&gt;03-icon-discipline.md&lt;/code&gt;&lt;/a&gt; — Retain functional navigation/action icons while purging decorative clutter.&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://github.com/akkaraponph/prompt-impeccable/./vibe-collections/04-visual-hierarchy-audit.md" rel="noopener noreferrer"&gt;&lt;code&gt;04-visual-hierarchy-audit.md&lt;/code&gt;&lt;/a&gt; — Establish clear primary vs secondary visual emphasis and contrast.&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://github.com/akkaraponph/prompt-impeccable/./vibe-collections/05-information-density-optimization.md" rel="noopener noreferrer"&gt;&lt;code&gt;05-information-density-optimization.md&lt;/code&gt;&lt;/a&gt; — Maximize information value while lowering visual noise.&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://github.com/akkaraponph/prompt-impeccable/./vibe-collections/30-ai-slop-detection-pass.md" rel="noopener noreferrer"&gt;&lt;code&gt;30-ai-slop-detection-pass.md&lt;/code&gt;&lt;/a&gt; — Dedicated sweep for sparkle icons, decorative gradients, floating cards, etc.&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://github.com/akkaraponph/prompt-impeccable/./vibe-collections/31-reduce-ui-noise.md" rel="noopener noreferrer"&gt;&lt;code&gt;31-reduce-ui-noise.md&lt;/code&gt;&lt;/a&gt;…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/akkaraponph/prompt-impeccable" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>ai</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>ux</category>
    </item>
    <item>
      <title>Theory of Humanistic Architecture</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sun, 06 Sep 2026 15:41:18 +0000</pubDate>
      <link>https://dev.to/akkaraponph/theory-of-humanistic-architecture-hg5</link>
      <guid>https://dev.to/akkaraponph/theory-of-humanistic-architecture-hg5</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh4ejm6eia4fcmjx1hxg6.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh4ejm6eia4fcmjx1hxg6.png" alt=" " width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Humanistic Architecture Learning to See Problems Differently
&lt;/h2&gt;

&lt;p&gt;I had the opportunity to attend a class called &lt;strong&gt;“Humanistic Architecture”&lt;/strong&gt; by Mr. Chakrit Riddhagni.&lt;/p&gt;

&lt;p&gt;The class was about applying &lt;strong&gt;humanistic principles to software development&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before talking about what I learned, I would like to share a little about my own perspective on software development.&lt;/p&gt;

&lt;p&gt;Personally, I have a quote and a belief about software development: &lt;strong&gt;it is both a science and an art.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I see software development as something that has an artistic side, while being grounded in logic, with almost endless possibilities.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Crafting software requires artistry, guided by imagination, grounded in logic, endlessly enduring.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This quote has been one of my inspirations since I started working as a developer.&lt;/p&gt;

&lt;p&gt;What I mean by this is that I have always liked thinking about software development as a kind of &lt;strong&gt;literature&lt;/strong&gt;. We are not simply writing code. We are solving problems. We are developing and creating something to solve a problem that either we or our customers are facing.&lt;/p&gt;

&lt;p&gt;Because of this, as a developer, I naturally work with &lt;strong&gt;problems&lt;/strong&gt; every day.&lt;/p&gt;

&lt;p&gt;But… I never really thought much deeper about what a “problem” actually is.&lt;/p&gt;

&lt;p&gt;Usually, when we solve a problem for a customer or develop software for them, we receive an issue or a scope of work and then start working on it.&lt;/p&gt;

&lt;p&gt;We know that something is a problem, so we focus on solving it.&lt;/p&gt;

&lt;p&gt;But we do not always stop and ask&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is the actual structure of this problem ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is this really the problem?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And does the solution we are building actually address the problem we are trying to solve?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That changed when I attended the &lt;strong&gt;“Humanistic Architecture”&lt;/strong&gt; class.&lt;/p&gt;

&lt;p&gt;One of the biggest things I gained from this class was a new perspective and a set of tools for defining what a &lt;strong&gt;“problem”&lt;/strong&gt; really is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Anatomy of a Problem
&lt;/h2&gt;

&lt;p&gt;We can look at a problem through the &lt;strong&gt;Anatomy of a Problem&lt;/strong&gt;, which consists of three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Current State&lt;/strong&gt; — where we are now&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gap&lt;/strong&gt; — the difference between where we are and where we want to be&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desired State&lt;/strong&gt; — where we want to go&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;Current State&lt;/strong&gt; is our situation at this moment.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Desired State&lt;/strong&gt; is the situation or outcome we want to reach.&lt;/p&gt;

&lt;p&gt;And the &lt;strong&gt;Gap&lt;/strong&gt; is the space between them — the part that needs to be changed in order to move from the Current State to the Desired State.&lt;/p&gt;

&lt;p&gt;Beyond understanding this structure, I also learned more about how to find solutions that address the &lt;strong&gt;root cause&lt;/strong&gt; of a problem as much as possible through psychological models.&lt;/p&gt;

&lt;p&gt;One of them is &lt;strong&gt;Satir's Iceberg Model&lt;/strong&gt;, where one of the most important concepts is &lt;strong&gt;Yearning&lt;/strong&gt; — our deep desire, motivation, or inner need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Another model is the 3 Centers Model
&lt;/h2&gt;

&lt;p&gt;Heart, Head, and Body&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Heart&lt;/strong&gt; — using our feelings and values to determine direction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Head&lt;/strong&gt; — using our thinking to make plans&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Body&lt;/strong&gt; — taking action and putting those plans into practice&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;Anatomy of a Problem&lt;/strong&gt;, together with these two models, became the main tools I learned for analyzing problems and finding solutions.&lt;/p&gt;

&lt;p&gt;And I don't think these tools are useful only for software development.&lt;/p&gt;

&lt;p&gt;I can also see how they can be applied to &lt;strong&gt;everyday life and many other situations&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, whenever we are not satisfied with our Current State and have a Desired State that we want to reach, a &lt;strong&gt;Gap&lt;/strong&gt; exists between them.&lt;/p&gt;

&lt;p&gt;And that Gap is where the problem lies.&lt;/p&gt;

&lt;p&gt;This simple way of looking at problems has changed the way I think.&lt;/p&gt;

&lt;p&gt;Overall, this class really resonated with me.&lt;/p&gt;

&lt;p&gt;It is something that I can actually apply in my work, and I believe it will also be useful in my everyday life.&lt;/p&gt;

&lt;p&gt;After coming back to work, I don't think I can look at problems in exactly the same way anymore.&lt;/p&gt;

&lt;p&gt;Instead of simply seeing an issue and thinking about how to fix it, I will probably have this structure in my head first:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Current → Gap → Desired&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And somehow, I think that's the biggest thing I took away from this class. 😆&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fio67njadrkgcu1mgr4ig.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fio67njadrkgcu1mgr4ig.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/akkaraponph/the-anatomy-of-a-problem-423g" class="crayons-story__hidden-navigation-link"&gt;The Anatomy of a Problem&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/akkaraponph" class="crayons-avatar  crayons-avatar--l  "&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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F945711%2Fbd8f9c86-1d58-4f8c-b6c4-389c721f86dc.jpg" alt="akkaraponph profile" class="crayons-avatar__image" width="400" height="400"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/akkaraponph" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Akkarapon Phikulsri
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Akkarapon Phikulsri
                
                
              
              &lt;div id="story-author-preview-content-4588288" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/akkaraponph" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F945711%2Fbd8f9c86-1d58-4f8c-b6c4-389c721f86dc.jpg" class="crayons-avatar__image" alt="" width="400" height="400"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Akkarapon Phikulsri&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/akkaraponph/the-anatomy-of-a-problem-423g" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Sep 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/akkaraponph/the-anatomy-of-a-problem-423g" id="article-link-4588288"&gt;
          The Anatomy of a Problem
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/humanistic"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;humanistic&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/problemsolving"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;problemsolving&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/softwareengineering"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;softwareengineering&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/humanisticarchitecture"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;humanisticarchitecture&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/akkaraponph/the-anatomy-of-a-problem-423g#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            4 min read
          &lt;/small&gt;
          
          &lt;div class="only-sidebar-menu-item trusted-visible-block print-hidden align-center"&gt;
                
                    
                
          &lt;/div&gt;

        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>humanistic</category>
      <category>problemsolving</category>
      <category>softwareengineering</category>
      <category>thinkingprocess</category>
    </item>
    <item>
      <title>The Anatomy of a Problem</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sun, 06 Sep 2026 13:42:12 +0000</pubDate>
      <link>https://dev.to/akkaraponph/the-anatomy-of-a-problem-423g</link>
      <guid>https://dev.to/akkaraponph/the-anatomy-of-a-problem-423g</guid>
      <description>&lt;p&gt;I recently had the opportunity to attend a class called &lt;strong&gt;“Humanistic Architecture”&lt;/strong&gt; by Mr.Chakrit Riddhagni. The class was about applying &lt;strong&gt;humanistic principles to software development&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before I talk about what I learned, I want to share a little about my own perspective on software development.&lt;/p&gt;

&lt;p&gt;Personally, I have a quote and a belief that I have carried with me throughout my career: &lt;strong&gt;software development is both a science and an art.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I see software development as something that has an artistic side, while being grounded in logic, with almost endless possibilities.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Crafting software requires artistry, guided by imagination, grounded in logic, endlessly enduring.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This quote has been one of my inspirations since I started working as a developer.&lt;/p&gt;

&lt;p&gt;What I mean by this is that I have always liked thinking about software development as a kind of &lt;strong&gt;literature&lt;/strong&gt;. We are not simply writing code. We are solving problems. We are developing and creating something to solve a problem that either we or our customers are facing.&lt;/p&gt;

&lt;p&gt;Because of this, being a developer means that we naturally work with &lt;strong&gt;problems&lt;/strong&gt; every day.&lt;/p&gt;

&lt;p&gt;But… I never really thought much deeper about what a “problem” actually is.&lt;/p&gt;

&lt;p&gt;Usually, when we work on a problem for a customer or develop software for them, we receive an issue or a scope of work and then start working on it. We know that something is a problem, so we focus on solving it.&lt;/p&gt;

&lt;p&gt;However, we do not always stop and think about the structure of the problem.&lt;/p&gt;

&lt;p&gt;Is this really the problem?&lt;/p&gt;

&lt;p&gt;What is actually causing it?&lt;/p&gt;

&lt;p&gt;And does the solution we are building really address the problem we are trying to solve?&lt;/p&gt;

&lt;p&gt;That changed when I attended the &lt;strong&gt;“Humanistic Architecture”&lt;/strong&gt; class.&lt;/p&gt;

&lt;p&gt;One of the biggest things I took away from the class was a new perspective and a set of tools for defining what a &lt;strong&gt;“problem”&lt;/strong&gt; really is.&lt;/p&gt;

&lt;p&gt;We can look at a problem through the &lt;strong&gt;Anatomy of a Problem&lt;/strong&gt;, which can be divided into three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Current State&lt;/strong&gt; — where we are now&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desired State&lt;/strong&gt; — where we want to be&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gap&lt;/strong&gt; — the difference between the current state and the desired state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;Gap&lt;/strong&gt; is where we need to focus in order to move from the Current State toward the Desired State.&lt;/p&gt;

&lt;p&gt;Beyond understanding the structure and components of a problem, another important thing I learned was how to find solutions that address the &lt;strong&gt;root cause&lt;/strong&gt; of a problem as effectively as possible.&lt;/p&gt;

&lt;p&gt;The class introduced ways of looking at problems through &lt;strong&gt;psychological models&lt;/strong&gt;, which helped me understand that solving a problem is not always about simply fixing what we can see on the surface.&lt;/p&gt;

&lt;p&gt;Sometimes, we need to understand the people, their behaviors, their expectations, and the reasons behind the problem before we can design a solution that truly solves it.&lt;/p&gt;

&lt;p&gt;And I think this is a perspective that can be very valuable for software developers.&lt;/p&gt;

&lt;p&gt;Because sometimes, &lt;strong&gt;the hardest part of solving a problem is not writing the code. It is understanding what the real problem is.&lt;/strong&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6parlq5qg6563eivzk2d.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6parlq5qg6563eivzk2d.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Anatomy of a Problem
&lt;/h3&gt;

&lt;p&gt;The first topic we learned was &lt;strong&gt;“The Anatomy of a Problem,”&lt;/strong&gt; which is about understanding the structure of a problem.&lt;/p&gt;

&lt;p&gt;A problem can be divided into three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Current State&lt;/strong&gt; &amp;gt; where we are right now&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gap&lt;/strong&gt; -&amp;gt; the difference between where we are and where we want to be&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desired State&lt;/strong&gt; -&amp;gt; where we want to go&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Current State&lt;/strong&gt; is the situation we are in at the moment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Desired State&lt;/strong&gt; is the situation or goal that we want to reach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gap&lt;/strong&gt; is the space or difference between the Current State and the Desired State. It represents what needs to change in order to move from where we are now to where we want to be.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Current State:&lt;/strong&gt; I cannot sleep.&lt;br&gt;
&lt;strong&gt;Gap:&lt;/strong&gt; I either do not sleep, or I try to sleep but cannot fall asleep.&lt;br&gt;
&lt;strong&gt;Desired State:&lt;/strong&gt; I can sleep well.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This way of thinking may look simple, but it gives us a useful framework for looking at problems.&lt;/p&gt;

&lt;p&gt;Instead of simply saying &lt;strong&gt;“I cannot sleep, so I need a solution,”&lt;/strong&gt; we can step back and ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where am I now? Where do I want to be? And what is preventing me from getting there?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I think this is an interesting way to start understanding a problem before jumping directly into finding a solution.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9au0znorqsnq9pd5sze0.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9au0znorqsnq9pd5sze0.jpeg" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whenever we are not satisfied with our current state and have a place we want to reach, a gap will exist between the two.&lt;/p&gt;

&lt;p&gt;That gap is exactly where we need to focus our effort to solve the problem, because the problem already exists.&lt;/p&gt;

&lt;p&gt;Before learning about “The Anatomy of a Problem,” I started with an exercise based on a simple but interesting question&lt;/p&gt;

&lt;p&gt;“What makes us, as human beings, get up and take action to solve a problem?”&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F15n92w0sdttr19okqg8n.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F15n92w0sdttr19okqg8n.jpg" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From my perspective, human beings always have &lt;strong&gt;needs or wants&lt;/strong&gt; that they want to fulfill in order to feel complete. When things do not go as we expect, we experience &lt;strong&gt;disappointment&lt;/strong&gt;. As a result, we usually look for a method or a tool to fill that gap or solve the problem in a way that &lt;strong&gt;we believe is appropriate&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;After learning about &lt;strong&gt;“The Anatomy of a Problem,”&lt;/strong&gt; I started to understand and reflect on this idea more deeply.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“A problem is a thing or situation that we cannot handle or solve at that moment.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Very often, when we solve one problem, &lt;strong&gt;new problems appear&lt;/strong&gt;. In fact, there are often other problems hidden inside a problem.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Every problem or solution can always create new problems.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In other words, &lt;strong&gt;every problem has a solution, and every solution can bring new problems.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However, a problem may not exist if we are satisfied with our &lt;strong&gt;Current State&lt;/strong&gt;. When we are satisfied with where we are, there is no &lt;strong&gt;Desired State&lt;/strong&gt; that we need to reach. Therefore, there is no &lt;strong&gt;Gap&lt;/strong&gt; between the two.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3xy1pyc5id74kfi2a2fa.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3xy1pyc5id74kfi2a2fa.png" alt=" " width="682" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, this leads me to the following understanding:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“The problem is the gap between the Current State and the Desired State.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>humanistic</category>
      <category>problemsolving</category>
      <category>softwareengineering</category>
      <category>humanisticarchitecture</category>
    </item>
    <item>
      <title>Git - Commit Message Format</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sun, 06 Sep 2026 07:29:58 +0000</pubDate>
      <link>https://dev.to/akkaraponph/git-commit-message-format-4h00</link>
      <guid>https://dev.to/akkaraponph/git-commit-message-format-4h00</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The commit message is something we write very frequently during the development process. It summarizes the changes made after completing a section or feature. It's important to keep commit messages clean and easy to read. Following best practices and using a pattern consistent with your team's or company's style is crucial. Here, &lt;/p&gt;

&lt;p&gt;I will show you a pattern that helps structure and organize commit messages effectively, making them easy to read and understandable&amp;nbsp;:)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pattern&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each commit message consists of a header, a body, and a footer. The header has a special format that includes a type, a scope, and a subject:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;type&amp;gt;(&amp;lt;scope&amp;gt;): &amp;lt;subject&amp;gt;
&amp;lt;BLANK LINE&amp;gt;

&amp;lt;body&amp;gt;
&amp;lt;BLANK LINE&amp;gt;
&amp;lt;footer&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The header is mandatory and the scope of the header is optional.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fix: remove unused dependency lodash.camelcase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any line of the commit message cannot be longer than 100 characters. This allows the message to be easier to read on GitHub as well as in various git tools.&lt;/p&gt;

&lt;p&gt;the component of message format are type, scope, subject, body and footer&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;br&gt;
Must be one of the following example below&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;feat: A new feature.&lt;/li&gt;
&lt;li&gt;fix: A bug fix.&lt;/li&gt;
&lt;li&gt;docs: Documentation only changes.&lt;/li&gt;
&lt;li&gt;style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).&lt;/li&gt;
&lt;li&gt;refactor: A code change that neither fixes a bug nor adds a feature.&lt;/li&gt;
&lt;li&gt;perf: A code change that improves performance.&lt;/li&gt;
&lt;li&gt;test: Adding missing tests.&lt;/li&gt;
&lt;li&gt;chore: Changes to the build process or auxiliary tools and libraries such as documentation generation.&lt;/li&gt;
&lt;li&gt;ci: Changes to our CI configuration files and scripts.&lt;/li&gt;
&lt;li&gt;build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm).&lt;/li&gt;
&lt;li&gt;revert: Reverts a previous commit.&lt;/li&gt;
&lt;li&gt;wip: Work in progress. Commit that may be removed later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;but some time i just have no idea for prefix message usally i use are &lt;code&gt;feat&lt;/code&gt; and &lt;code&gt;fix&lt;/code&gt; haha&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope&lt;/strong&gt;&lt;br&gt;
The scope is optional and could be anything specifying the place of the commit change. For example nsis, mac, linux, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;br&gt;
The subject contains a succinct description of the change:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the imperative, present tense: change not changed nor changes.&lt;/li&gt;
&lt;li&gt;Don't capitalize the first letter.&lt;/li&gt;
&lt;li&gt;No dot (.) at the end.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Body&lt;/strong&gt;&lt;br&gt;
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes".&lt;br&gt;
The body should include the motivation for the change and contrast this with the previous behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Footer&lt;/strong&gt;&lt;br&gt;
The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes. Breaking Changes should start with the word BREAKING CHANGE: with a space or two newlines. The rest of the commit message is then used for this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write Meaningful Commit Messages: Ensure that each commit message clearly conveys what the change is and why it was made. This is crucial for maintaining a clear project history.&lt;/li&gt;
&lt;li&gt;Keep Commits Small: Each commit should represent a single logical change. This makes it easier to review changes and revert them if necessary.&lt;/li&gt;
&lt;li&gt;Use Branches: For each new feature or bug fix, create a new branch. This helps in keeping the main branch stable and allows for easier collaboration.&lt;/li&gt;
&lt;li&gt;Squash Commits: Before merging a feature branch into the main branch, consider squashing commits to ensure a clean and concise project history.&lt;/li&gt;
&lt;li&gt;Review Before Commit: Review your changes before committing. Ensure that your code adheres to the project's coding standards and passes all tests.&lt;/li&gt;
&lt;li&gt;Automate Testing: Set up automated tests to run on each commit to ensure that changes do not introduce new bugs.&lt;/li&gt;
&lt;li&gt;Follow a Consistent Style: Adhere to the established style guide for the project to maintain consistency across the codebase.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How ever&lt;/strong&gt;&lt;br&gt;
In the AI era, we normally ask AI to generate the commit message. It would be better if we provide a commit message pattern for the AI agent. I think it would be better to make commit history  easier to read, not just dump messages that have no  prefix or too much noise&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reference&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FreeCodeCamp. (2022, March 2). How to write better Git commit messages. FreeCodeCamp. &lt;a href="https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Beams, C. (n.d.). How to write a Git commit message. Retrieved July 16, 2024, from &lt;a href="https://cbea.ms/git-commit/" rel="noopener noreferrer"&gt;https://cbea.ms/git-commit/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;2my. (2021, October 30). Git conventional commits. 2my Blog. &lt;a href="https://blog.2my.xyz/2021/10/30/git-conventional-commits/" rel="noopener noreferrer"&gt;https://blog.2my.xyz/2021/10/30/git-conventional-commits/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Akkaraponph. (n.d.). Commit messages. GitHub. Retrieved August 5, 2024, from &lt;a href="https://github.com/akkaraponph/commit-messages" rel="noopener noreferrer"&gt;https://github.com/akkaraponph/commit-messages&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>commit</category>
      <category>documentation</category>
      <category>writecommit</category>
    </item>
    <item>
      <title>PostgreSQL Cheat Sheet: Investigating and Terminating Database Blocking Sessions</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Fri, 28 Aug 2026 04:07:47 +0000</pubDate>
      <link>https://dev.to/akkaraponph/postgresql-cheat-sheet-investigating-and-terminating-database-blocking-sessions-4299</link>
      <guid>https://dev.to/akkaraponph/postgresql-cheat-sheet-investigating-and-terminating-database-blocking-sessions-4299</guid>
      <description>&lt;p&gt;If you run PostgreSQL in production for a long time, you will probably see this problem at some point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Queries start waiting.&lt;/li&gt;
&lt;li&gt;Connections increase.&lt;/li&gt;
&lt;li&gt;The database becomes slower.&lt;/li&gt;
&lt;li&gt;Connection usage gets close to &lt;code&gt;max_connections&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One common cause is a session that is blocking other sessions.&lt;/p&gt;

&lt;p&gt;A common example is a connection in the &lt;code&gt;idle in transaction&lt;/code&gt; state. The application started a transaction but did not &lt;code&gt;COMMIT&lt;/code&gt; or &lt;code&gt;ROLLBACK&lt;/code&gt; it.&lt;/p&gt;

&lt;p&gt;In this article, we will use &lt;code&gt;pg_stat_activity&lt;/code&gt; and several PostgreSQL functions to investigate these problems.&lt;/p&gt;

&lt;p&gt;We will also look at when to use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pg_cancel_backend()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pg_terminate_backend()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pg_blocking_pids()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not only to kill a bad session. The goal is to understand &lt;strong&gt;why it happened&lt;/strong&gt; and prevent it from happening again.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Can PostgreSQL Sessions Block Each Other?
&lt;/h2&gt;

&lt;p&gt;PostgreSQL uses MVCC (Multi-Version Concurrency Control) and locking to support many users at the same time.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;BEGIN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'PROCESSING'&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The transaction may hold locks until it finishes with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;COMMIT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ROLLBACK&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem happens when the application starts a transaction but never finishes it.&lt;/p&gt;

&lt;p&gt;The connection may then appear as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;idle in transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The session is not running a query anymore, but the transaction is still open.&lt;/p&gt;

&lt;p&gt;This can cause several problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Locks may still be held.&lt;/li&gt;
&lt;li&gt;Other queries may have to wait.&lt;/li&gt;
&lt;li&gt;Old transaction snapshots may stay open.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;VACUUM&lt;/code&gt; may not be able to clean some dead rows.&lt;/li&gt;
&lt;li&gt;Tables may become larger over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why it is important to understand the difference between:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;active
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;idle in transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An &lt;code&gt;active&lt;/code&gt; session is currently running a query.&lt;/p&gt;

&lt;p&gt;An &lt;code&gt;idle in transaction&lt;/code&gt; session is waiting for the client, but its transaction is still open.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Inspect All Non-Idle Sessions
&lt;/h2&gt;

&lt;p&gt;I normally start an investigation with this query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;usename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;application_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query_start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;query_start&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'idle'&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;query_start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This removes normal idle connections from the result.&lt;/p&gt;

&lt;p&gt;You can now see sessions that are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;running queries,&lt;/li&gt;
&lt;li&gt;waiting,&lt;/li&gt;
&lt;li&gt;or idle inside a transaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;application_name&lt;/code&gt; field is very useful when you have many services.&lt;/p&gt;

&lt;p&gt;For example, your PostgreSQL connection may include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;application_name=order-service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you may see something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pid     application_name   state
12345   order-service      active
12346   payment-service    idle in transaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is much easier than trying to guess which application owns a PID.&lt;/p&gt;

&lt;p&gt;For Go, Node.js, or other microservice systems, I strongly recommend setting &lt;code&gt;application_name&lt;/code&gt; for every service.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Use a Quick Triage Query
&lt;/h2&gt;

&lt;p&gt;During an incident, sometimes you do not need every column.&lt;/p&gt;

&lt;p&gt;You just want to quickly see what is happening.&lt;/p&gt;

&lt;p&gt;Use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;clock_timestamp&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;query_start&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="k"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'idle'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PID&lt;/li&gt;
&lt;li&gt;query age&lt;/li&gt;
&lt;li&gt;session state&lt;/li&gt;
&lt;li&gt;query text&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I use this kind of query as a quick first check.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PID 1596183
State: active
Duration: 00:08:32
Query: SELECT ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you know that one query has been running for more than eight minutes.&lt;/p&gt;

&lt;p&gt;The next question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is this query really slow, or is it waiting for another session?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is an important difference.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Find Idle-in-Transaction Sessions
&lt;/h2&gt;

&lt;p&gt;To check only sessions that are idle inside a transaction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;usename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;application_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;xact_start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;state_change&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;xact_start&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;transaction_age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'idle in transaction'&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;xact_start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pay special attention to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;xact_start&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells you when the transaction started.&lt;/p&gt;

&lt;p&gt;A transaction that has been open for a few seconds may be normal.&lt;/p&gt;

&lt;p&gt;A transaction that has been open for 30 minutes or several hours is much more suspicious.&lt;/p&gt;

&lt;p&gt;Do not immediately kill every &lt;code&gt;idle in transaction&lt;/code&gt; connection.&lt;/p&gt;

&lt;p&gt;First check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which application created it?&lt;/li&gt;
&lt;li&gt;How long has the transaction been open?&lt;/li&gt;
&lt;li&gt;Is this normal for the application?&lt;/li&gt;
&lt;li&gt;Is it blocking another session?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 4: Terminate an Idle Transaction
&lt;/h2&gt;

&lt;p&gt;If you confirm that a session is stuck and should not still be open, you can terminate it.&lt;/p&gt;

&lt;p&gt;For one PID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;pg_terminate_backend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1596183&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This closes the PostgreSQL session.&lt;/p&gt;

&lt;p&gt;PostgreSQL will roll back its open transaction and release its locks.&lt;/p&gt;

&lt;p&gt;For old idle transactions, you can also use a controlled query like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;pg_terminate_backend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'idle in transaction'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;state_change&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;interval&lt;/span&gt; &lt;span class="s1"&gt;'5 minutes'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pg_backend_pid&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example only terminates sessions that have been idle inside a transaction for more than five minutes.&lt;/p&gt;

&lt;p&gt;The condition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pg_backend_pid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;prevents the query from terminating your own PostgreSQL session.&lt;/p&gt;

&lt;p&gt;Be careful with this command in production.&lt;/p&gt;

&lt;p&gt;It is usually better to filter by things such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;datname&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;usename&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;application_name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;pg_terminate_backend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'idle in transaction'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;application_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'order-service'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;state_change&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;interval&lt;/span&gt; &lt;span class="s1"&gt;'5 minutes'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pg_backend_pid&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is much safer than terminating every idle transaction in the cluster.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: Cancel a Running Query
&lt;/h2&gt;

&lt;p&gt;Sometimes the connection itself is fine, but one query is taking too long.&lt;/p&gt;

&lt;p&gt;In that case, try:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;pg_cancel_backend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1596183&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;pg_cancel_backend()&lt;/code&gt; stops the current query but keeps the database connection alive.&lt;/p&gt;

&lt;p&gt;This makes it a good first choice for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a very expensive &lt;code&gt;SELECT&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;a report query,&lt;/li&gt;
&lt;li&gt;an accidental full-table operation,&lt;/li&gt;
&lt;li&gt;or a query that a user wants to cancel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think about it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pg_cancel_backend()
        |
        v
Stop the current query
        |
        v
Keep the connection
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;code&gt;pg_cancel_backend()&lt;/code&gt; vs &lt;code&gt;pg_terminate_backend()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;These two functions are similar, but they solve different problems.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;What happens&lt;/th&gt;
&lt;th&gt;Good for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;pg_cancel_backend(pid)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stops the current query but keeps the connection&lt;/td&gt;
&lt;td&gt;Long-running or unwanted active queries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;pg_terminate_backend(pid)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Closes the whole database session&lt;/td&gt;
&lt;td&gt;Stuck sessions, idle transactions, serious blocking problems&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My normal approach is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Active bad query
     |
     v
pg_cancel_backend()
     |
     | still causing problems
     v
pg_terminate_backend()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an &lt;code&gt;idle in transaction&lt;/code&gt; session, &lt;code&gt;pg_cancel_backend()&lt;/code&gt; normally does not solve the problem because there is no active query to cancel.&lt;/p&gt;

&lt;p&gt;In that situation, you may need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;pg_terminate_backend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 6: Find Who Is Blocking a Query
&lt;/h2&gt;

&lt;p&gt;A long-running query is not always slow.&lt;/p&gt;

&lt;p&gt;Sometimes it is simply waiting for another transaction.&lt;/p&gt;

&lt;p&gt;PostgreSQL provides a very useful function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;pg_blocking_pids&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;usename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;application_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;pg_blocking_pids&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;blocking_pids&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;cardinality&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pg_blocking_pids&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may get something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pid       blocking_pids
-----------------------
20002     {20001}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PID 20001
    |
    | blocks
    v
PID 20002
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not immediately kill PID &lt;code&gt;20002&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It is the &lt;strong&gt;blocked session&lt;/strong&gt;, not necessarily the real problem.&lt;/p&gt;

&lt;p&gt;You should investigate PID &lt;code&gt;20001&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding the Root Blocker
&lt;/h2&gt;

&lt;p&gt;A production problem can be more complicated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Session A
   |
   | blocks
   v
Session B
   |
   | blocks
   v
Session C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you kill Session B, Session C may improve, but you have not fixed the real source of the problem.&lt;/p&gt;

&lt;p&gt;The real blocker is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Session A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is why &lt;code&gt;pg_blocking_pids()&lt;/code&gt; is useful.&lt;/p&gt;

&lt;p&gt;You want to follow the blocking chain until you find the session that is not waiting for another backend.&lt;/p&gt;

&lt;p&gt;That session is usually the &lt;strong&gt;root blocker&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Investigate that session first.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 7: Check Which Database Uses the Most Connections
&lt;/h2&gt;

&lt;p&gt;If your PostgreSQL server contains several databases, check how connections are distributed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;datname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;datname&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;datname        count
-------------  -----
order_prod       82
notification     15
postgres          3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you know where most connections are being used.&lt;/p&gt;

&lt;p&gt;If one database has a very high number, investigate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;application connection pool size,&lt;/li&gt;
&lt;li&gt;PgBouncer settings,&lt;/li&gt;
&lt;li&gt;connection leaks,&lt;/li&gt;
&lt;li&gt;long-running queries,&lt;/li&gt;
&lt;li&gt;idle transactions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A high connection count does not always mean PostgreSQL itself is the problem.&lt;/p&gt;

&lt;p&gt;The application may simply be opening too many connections.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 8: Check Connection Headroom
&lt;/h2&gt;

&lt;p&gt;You should also check how close PostgreSQL is to its configured connection limit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;used_connections&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;setting&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;
        &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_settings&lt;/span&gt;
        &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'max_connections'&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;max_connections&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;used_connections | max_connections
-----------------+----------------
87               | 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You are now using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;87 / 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;connections.&lt;/p&gt;

&lt;p&gt;That means there is very little room left.&lt;/p&gt;

&lt;p&gt;This becomes dangerous because when an incident happens, you may not even be able to open another connection to investigate the problem.&lt;/p&gt;

&lt;p&gt;For production systems, I normally monitor connection usage before it gets close to the maximum.&lt;/p&gt;




&lt;h2&gt;
  
  
  Preventing Idle Transactions
&lt;/h2&gt;

&lt;p&gt;Manually killing sessions is useful during an incident.&lt;/p&gt;

&lt;p&gt;But it is not the real fix.&lt;/p&gt;

&lt;p&gt;PostgreSQL can automatically terminate connections that stay idle inside a transaction for too long.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;mydb&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;idle_in_transaction_session_timeout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'2min'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now PostgreSQL will close sessions that remain idle inside a transaction longer than the configured timeout.&lt;/p&gt;

&lt;p&gt;You should choose the timeout based on your workload.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;30 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;may work for a fast OLTP API.&lt;/p&gt;

&lt;p&gt;While:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 minutes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;may be safer for applications with longer business operations.&lt;/p&gt;

&lt;p&gt;Do not copy a timeout value without understanding your system first.&lt;/p&gt;




&lt;h2&gt;
  
  
  Protect Against Long-Running Queries
&lt;/h2&gt;

&lt;p&gt;You can also use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;statement_timeout&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;mydb&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;statement_timeout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'30s'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents individual SQL statements from running forever.&lt;/p&gt;

&lt;p&gt;However, be careful.&lt;/p&gt;

&lt;p&gt;A timeout that is good for API requests may be too short for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reports,&lt;/li&gt;
&lt;li&gt;migrations,&lt;/li&gt;
&lt;li&gt;ETL jobs,&lt;/li&gt;
&lt;li&gt;batch processing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Different applications may need different timeout values.&lt;/p&gt;




&lt;h2&gt;
  
  
  Log Lock Problems
&lt;/h2&gt;

&lt;p&gt;Another useful PostgreSQL setting is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;log_lock_waits
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can enable it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;SYSTEM&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;log_lock_waits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;PostgreSQL can then log queries that wait too long for a lock.&lt;/p&gt;

&lt;p&gt;This works together with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deadlock_timeout
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;SYSTEM&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;deadlock_timeout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'1s'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes lock problems much easier to investigate because PostgreSQL logs useful information when sessions wait for locks.&lt;/p&gt;

&lt;p&gt;Remember to reload the configuration when required.&lt;/p&gt;




&lt;h2&gt;
  
  
  Fix the Problem in the Application
&lt;/h2&gt;

&lt;p&gt;Database commands help during an incident.&lt;/p&gt;

&lt;p&gt;But if &lt;code&gt;idle in transaction&lt;/code&gt; keeps happening, the real bug is usually inside the application.&lt;/p&gt;

&lt;p&gt;For example, in Go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Begin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;defer&lt;/span&gt; &lt;span class="n"&gt;tx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Rollback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;tx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Commit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important idea is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BEGIN
  |
  +---- success ----&amp;gt; COMMIT
  |
  +---- error ------&amp;gt; ROLLBACK
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every transaction must have a clear ending.&lt;/p&gt;

&lt;p&gt;This is especially important when using libraries such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pgx&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;GORM&lt;/li&gt;
&lt;li&gt;&lt;code&gt;database/sql&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Node.js &lt;code&gt;pg&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every error path should either commit or roll back the transaction correctly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Connection Pools Matter Too
&lt;/h2&gt;

&lt;p&gt;Also check your connection pool configuration.&lt;/p&gt;

&lt;p&gt;For example, imagine you have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 services
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and every service allows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20 connections
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your applications may try to create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 × 20 = 200 connections
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But PostgreSQL may only allow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;max_connections = 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That architecture will eventually create problems.&lt;/p&gt;

&lt;p&gt;Tools such as PgBouncer can help reduce the number of PostgreSQL backend connections, but they do not replace correct transaction handling.&lt;/p&gt;

&lt;p&gt;You still need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;commit transactions,&lt;/li&gt;
&lt;li&gt;roll back transactions,&lt;/li&gt;
&lt;li&gt;set reasonable pool limits,&lt;/li&gt;
&lt;li&gt;monitor connection usage.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  My Production Troubleshooting Flow
&lt;/h2&gt;

&lt;p&gt;When PostgreSQL starts becoming slow, I normally think about the problem in this order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PostgreSQL is slow
        |
        v
Check pg_stat_activity
        |
        v
Are queries active or idle in transaction?
        |
        +------ idle in transaction
        |             |
        |             v
        |      Check transaction age
        |             |
        |             v
        |      Check if it is blocking
        |             |
        |             v
        |      pg_terminate_backend()
        |
        +------ active
                      |
                      v
              Check blocking_pids
                      |
              +-------+-------+
              |               |
           blocked         not blocked
              |               |
              v               v
         Find blocker    Investigate query
                              |
                              v
                      pg_cancel_backend()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important point is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not kill a PostgreSQL PID only because a query has been running for a long time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;First understand what that PID is doing.&lt;/p&gt;

&lt;p&gt;Ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Is it running?

Is it waiting?

Is it blocking?

Is it being blocked?

Is it idle inside a transaction?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then choose the correct action.&lt;/p&gt;




&lt;h2&gt;
  
  
  Useful Commands Summary
&lt;/h2&gt;

&lt;p&gt;Check non-idle sessions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;usename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;application_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query_start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;query_start&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'idle'&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;query_start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find idle transactions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;application_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;xact_start&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;xact_start&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;transaction_age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'idle in transaction'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find blocked sessions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;pg_blocking_pids&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;blocking_pids&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;cardinality&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pg_blocking_pids&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cancel a query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;pg_cancel_backend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1596183&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terminate a connection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;pg_terminate_backend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1596183&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check connections per database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="n"&gt;datname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;datname&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check connection limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;used_connections&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;setting&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;
        &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_settings&lt;/span&gt;
        &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'max_connections'&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;max_connections&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;When PostgreSQL has a connection or blocking problem, &lt;code&gt;pg_stat_activity&lt;/code&gt; is one of the first places I check.&lt;/p&gt;

&lt;p&gt;But the most important skill is not knowing how to kill a PID.&lt;/p&gt;

&lt;p&gt;It is knowing &lt;strong&gt;which PID should be killed and why&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A blocked query may only be a victim.&lt;/p&gt;

&lt;p&gt;An &lt;code&gt;idle in transaction&lt;/code&gt; session may be the real blocker.&lt;/p&gt;

&lt;p&gt;And a high connection count may be caused by an application pool instead of PostgreSQL itself.&lt;/p&gt;

&lt;p&gt;A good production investigation should therefore follow this process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Observe
   ↓
Find the blocker
   ↓
Understand the transaction
   ↓
Mitigate the incident
   ↓
Fix the application
   ↓
Add protection and monitoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commands like &lt;code&gt;pg_cancel_backend()&lt;/code&gt; and &lt;code&gt;pg_terminate_backend()&lt;/code&gt; are useful emergency tools.&lt;/p&gt;

&lt;p&gt;But the long-term solution is better transaction handling, good connection pool limits, proper timeouts, and enough monitoring to find the problem before production users notice it.&lt;/p&gt;

</description>
      <category>database</category>
      <category>postgres</category>
    </item>
    <item>
      <title>Fixing "GOPROXY list is not the empty string, but contains no entries" in Go</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Wed, 22 Jul 2026 10:05:57 +0000</pubDate>
      <link>https://dev.to/akkaraponph/fixing-goproxy-list-is-not-the-empty-string-but-contains-no-entries-in-go-lc8</link>
      <guid>https://dev.to/akkaraponph/fixing-goproxy-list-is-not-the-empty-string-but-contains-no-entries-in-go-lc8</guid>
      <description>&lt;p&gt;If you've ever run &lt;code&gt;go mod tidy&lt;/code&gt; and been greeted by a wall of red text ending in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go: todo-services imports
        github.com/99designs/gqlgen: GOPROXY list is not the empty string, but contains no entries
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...you're not alone. This error looks scary because it repeats for &lt;em&gt;every single import&lt;/em&gt; in your project, but the actual fix takes about 30 seconds. Here's what's going on and how to solve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Error Actually Means
&lt;/h2&gt;

&lt;p&gt;Go resolves modules through &lt;code&gt;GOPROXY&lt;/code&gt;, an environment variable that tells the toolchain where to fetch dependencies from. The error message is oddly specific:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"GOPROXY list is not the empty string, but contains no entries"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This means &lt;code&gt;GOPROXY&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; set to something, but once Go parses it, there are zero usable proxy URLs in it. Common causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A stray comma or pipe with no actual URL (&lt;code&gt;GOPROXY=,&lt;/code&gt; or &lt;code&gt;GOPROXY=|&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GOPROXY=off&lt;/code&gt;, which explicitly disables all proxying&lt;/li&gt;
&lt;li&gt;A shell-level override with a blank or whitespace value that shadows your real Go config&lt;/li&gt;
&lt;li&gt;A corporate/custom proxy URL that no longer resolves&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is especially common on &lt;strong&gt;Windows with Git Bash (MINGW64)&lt;/strong&gt;, where environment variables inherited from Windows user/system settings can silently override what Go has configured in its own env file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Fix
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Check for a shell-level override
&lt;/h3&gt;

&lt;p&gt;Environment variables set in your current shell session take priority over Go's own config file. Check what's actually there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"GOPROXY=[&lt;/span&gt;&lt;span class="nv"&gt;$GOPROXY&lt;/span&gt;&lt;span class="s2"&gt;]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If this prints &lt;code&gt;GOPROXY=[]&lt;/code&gt;, &lt;code&gt;GOPROXY=[ ]&lt;/code&gt;, or something malformed, that's your problem — the shell is passing Go a broken value.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Clear the session override
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;unset &lt;/span&gt;GOPROXY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This drops the bad value for the current session and lets Go fall back to its own configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Persist a valid proxy in Go's config
&lt;/h3&gt;

&lt;p&gt;This writes directly to Go's env file (&lt;code&gt;%USERPROFILE%\AppData\Roaming\go\env&lt;/code&gt; on Windows, &lt;code&gt;~/.config/go/env&lt;/code&gt; on Linux/macOS):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;env&lt;/span&gt; &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;GOPROXY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://proxy.golang.org,direct
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;,direct&lt;/code&gt; fallback tells Go to bypass the proxy and fetch directly from source control if a module isn't available there — a good safety net.&lt;/p&gt;

&lt;p&gt;If you're behind a corporate network or VPN, swap in your internal proxy instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;env&lt;/span&gt; &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;GOPROXY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://your-company-proxy.example.com,direct
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Sanity-check related settings
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;env &lt;/span&gt;GOPROXY GOFLAGS GOSUMDB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected healthy values:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Expected value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GOPROXY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;https://proxy.golang.org,direct&lt;/code&gt; (or your internal proxy + &lt;code&gt;,direct&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GOFLAGS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Empty, unless you intentionally use flags like &lt;code&gt;-mod=mod&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GOSUMDB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sum.golang.org&lt;/code&gt; (default), unless disabled for a reason&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  5. Clear Go's caches if the problem persists
&lt;/h3&gt;

&lt;p&gt;Sometimes a bad proxy state gets baked into cached build artifacts or module downloads. If steps 1–4 didn't fully resolve things, nuke the caches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go clean &lt;span class="nt"&gt;-cache&lt;/span&gt; &lt;span class="nt"&gt;-testcache&lt;/span&gt; &lt;span class="nt"&gt;-modcache&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Clears&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-cache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Compiled build cache&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-testcache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cached test results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-modcache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Downloaded modules (&lt;code&gt;$GOPATH/pkg/mod&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This forces a full re-download of every dependency on your next build, using your now-corrected proxy settings.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Retry
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go mod tidy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, all those &lt;code&gt;GOPROXY list is not the empty string...&lt;/code&gt; lines should be gone, replaced by normal module resolution output for &lt;code&gt;todo-services&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Windows/MINGW64 Gotcha
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;GOPROXY&lt;/code&gt; keeps reverting to a bad value in &lt;em&gt;new&lt;/em&gt; terminal sessions, the override probably lives in &lt;strong&gt;Windows System Properties → Environment Variables&lt;/strong&gt;, not just in &lt;code&gt;go env&lt;/code&gt;. Go's own persisted config won't help if Windows keeps re-injecting a bad value into every new shell. Check it directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$USERPROFILE&lt;/span&gt;&lt;span class="s2"&gt;/AppData/Roaming/go/env"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick Reference Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;echo "GOPROXY=[$GOPROXY]"&lt;/code&gt; — no stray/invalid shell override&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;unset GOPROXY&lt;/code&gt; — if a bad session override exists&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;go env -w GOPROXY=https://proxy.golang.org,direct&lt;/code&gt; — sets a valid persistent proxy&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;go env GOPROXY GOFLAGS GOSUMDB&lt;/code&gt; — confirms sane values&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;go clean -cache -testcache -modcache&lt;/code&gt; — if issues persist&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;go mod tidy&lt;/code&gt; — succeeds after the above&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Command Cheat Sheet
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go version                            &lt;span class="c"&gt;# Confirm installed Go version&lt;/span&gt;
go &lt;span class="nb"&gt;env&lt;/span&gt;                                &lt;span class="c"&gt;# Print all Go environment settings&lt;/span&gt;
go &lt;span class="nb"&gt;env &lt;/span&gt;GOPROXY                        &lt;span class="c"&gt;# Print a specific setting&lt;/span&gt;
go &lt;span class="nb"&gt;env&lt;/span&gt; &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="nv"&gt;KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;VALUE                   &lt;span class="c"&gt;# Persist a setting to Go's env file&lt;/span&gt;
go &lt;span class="nb"&gt;env&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; KEY                         &lt;span class="c"&gt;# Unset a persisted setting (revert to default)&lt;/span&gt;
go mod tidy                           &lt;span class="c"&gt;# Sync go.mod/go.sum with imports&lt;/span&gt;
go clean &lt;span class="nt"&gt;-cache&lt;/span&gt; &lt;span class="nt"&gt;-testcache&lt;/span&gt; &lt;span class="nt"&gt;-modcache&lt;/span&gt;  &lt;span class="c"&gt;# Clear build, test, and module caches&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;If this saved you a headache, drop a — and if you've hit a different flavor of this error, I'd love to hear about it in the comments.&lt;/p&gt;

</description>
      <category>go</category>
      <category>webdev</category>
      <category>troubleshooting</category>
    </item>
    <item>
      <title>GitHub Spark - A First Look at GitHub’s New Developer Tool</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sun, 15 Mar 2026 07:30:05 +0000</pubDate>
      <link>https://dev.to/akkaraponph/github-spark-a-first-look-at-githubs-new-developer-tool-hjo</link>
      <guid>https://dev.to/akkaraponph/github-spark-a-first-look-at-githubs-new-developer-tool-hjo</guid>
      <description>&lt;p&gt;GitHub Spark is an intuitive way to bring your ideas to &lt;strong&gt;life&lt;/strong&gt;. &lt;/p&gt;


&lt;div class="crayons-card c-embed"&gt;

  &lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; GitHub Spark is available to users on GitHub Copilot Pro+ and Enterprise plans.&lt;br&gt;

&lt;/div&gt;


&lt;h2&gt;
  
  
  What is GitHub Spark?
&lt;/h2&gt;

&lt;p&gt;GitHub Spark is an AI-powered tool that helps you "spark" ideas into functional "sparks" (micro-apps) quickly. You don't need to write every line of code; instead, you describe your idea in plain English. Just "vibe it to life," and the AI builds the app for you.&lt;/p&gt;

&lt;p&gt;You can &lt;a href="https://github.com/features/spark" rel="noopener noreferrer"&gt;get started with GitHub Spark here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick prompt
&lt;/h2&gt;

&lt;p&gt;We will quickly try out the cash flow app for managing personal finances in React Native. I started the process with a simple prompt, and i got some code and a quick preview&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%2F68zmf4bmvk6g9gb6navb.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%2F68zmf4bmvk6g9gb6navb.png" alt="A screenshot showing GitHub Spark referencing an existing repository for context" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Referencing Repositories
&lt;/h2&gt;

&lt;p&gt;As you can see in the image below, I can refer to my old repositories, and GitHub Spark will attempt to read the context of that code.&lt;/p&gt;

&lt;p&gt;This makes it incredibly powerful for building on top of your existing work.&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%2F86rn4v8ql3hwc3dhhqim.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%2F86rn4v8ql3hwc3dhhqim.png" alt=" " width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to the picture, this is about the suggestions section from Spark, which is where you can add feature suggestions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison with Lovable
&lt;/h2&gt;

&lt;p&gt;In my opinion, it feels similar to Lovable&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://lovable.dev" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;lovable.dev&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;However, because Spark is native to GitHub, we can easily reference other repositories as context. &lt;/p&gt;

&lt;h2&gt;
  
  
  Playground
&lt;/h2&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%2Ff433i37z8co2wfbwynuz.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%2Ff433i37z8co2wfbwynuz.png" alt=" " width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also easily quick-edit the code or try to change the line of code by hand using a quick editor&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%2Fnq3ms7xqg6kgglbns0o8.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%2Fnq3ms7xqg6kgglbns0o8.png" alt=" " width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I liked the modal that told me what went wrong and showed the button to tell the agent to "Fix all" right away.&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%2Fqvln7erlixnrgosf4tpb.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%2Fqvln7erlixnrgosf4tpb.png" alt=" " width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see the pair window of code and the preview section on the right side while AI is fixing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Theme
&lt;/h3&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%2Fo3dp39gy2luvgs2xdasg.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%2Fo3dp39gy2luvgs2xdasg.png" alt=" " width="799" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's easy for us to change the theme of our app; all we have to do is click and choose a color preset.&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%2Faqb0975tnwtgx3lpjkev.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%2Faqb0975tnwtgx3lpjkev.png" alt=" " width="799" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that... &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%2Fuems0nuu01uipcdqkxm6.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%2Fuems0nuu01uipcdqkxm6.png" alt=" " width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I just clicked a preset to quickly render and change the entire theme to a new color. We can also see how the theme changes based on adjustments to typography, color, and appearance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Mockup
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Table
&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%2Frgxni5841egbwn1lyfmz.png" alt=" " width="799" height="378"&gt;
&lt;/li&gt;
&lt;li&gt;JSON&lt;/li&gt;
&lt;/ul&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%2Foj1s7lbdj9os6xquxspl.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%2Foj1s7lbdj9os6xquxspl.png" alt=" " width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can quickly mock the data based on the table UI and also give JSON information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Assets
&lt;/h3&gt;

&lt;p&gt;The Assets tab is essentially your project's. We can drop files there that Spark needs to reference during the build or at runtime, like the logo image for our website, and can iterate to using them later. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visuals:&lt;/strong&gt; Logos, custom icons, or high-res background banners.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data&lt;/strong&gt; JSON or CSV files (like your personal spreadsheets).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Knowledge&lt;/strong&gt; PDFs or text files that give the AI specific instructions or context.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Turning Assets into Action
&lt;/h3&gt;

&lt;p&gt;The real power of Spark happens when you move from uploading to iterating. You can take old data and give it a modern "face" in seconds.&lt;/p&gt;

&lt;p&gt;For my review, I tested this by bringing in&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brand Assets: A custom logo.png and hero banner. jpg.&lt;/li&gt;
&lt;/ul&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%2Fxwj1qclu0xa6sfe7s63g.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%2Fxwj1qclu0xa6sfe7s63g.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;for the logo, we can iterate ai to redesign landing page with logo like&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%2From0if48wuvqcg5388j2.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%2From0if48wuvqcg5388j2.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legacy Data A 5-year-old income-expense dataset from my GitHub.
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/akkaraponph" rel="noopener noreferrer"&gt;
        akkaraponph
      &lt;/a&gt; / &lt;a href="https://github.com/akkaraponph/income-expense" rel="noopener noreferrer"&gt;
        income-expense
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      for fundamental data science
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Datasets-Income-Expense&lt;/h3&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;For fundamental data science&lt;/h4&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;Simple Datasets&lt;/h4&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;Repo. Directory Structure&lt;/h4&gt;

&lt;/div&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;├── Datasets-Income-Expense
│   ├── English
│       ├── Income_Expense_lacakp_Q1_2564_Eng.csv 
│       └── Income_Expense_lacakp_Q2_2564_Eng.csv
│   ├── Thai
│       ├── Income_Expense_lacakp_Q1_2564_Thai.csv 
│       └── Income_Expense_lacakp_Q2_2564_Thai.csv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;Exsamples&lt;/h4&gt;

&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Income&lt;/th&gt;
&lt;th&gt;Expense&lt;/th&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Where&lt;/th&gt;
&lt;th&gt;Payment Method&lt;/th&gt;
&lt;th&gt;Measurement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1-Jan-21&lt;/td&gt;
&lt;td&gt;3000&lt;/td&gt;

&lt;td&gt;owe&lt;/td&gt;
&lt;td&gt;online&lt;/td&gt;
&lt;td&gt;netbank&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-Jan-21&lt;/td&gt;
&lt;td&gt;3500&lt;/td&gt;

&lt;td&gt;income&lt;/td&gt;
&lt;td&gt;home&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-Jan-21&lt;/td&gt;

&lt;td&gt;2800&lt;/td&gt;
&lt;td&gt;rent fee, expense&lt;/td&gt;
&lt;td&gt;apartment&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-Jan-21&lt;/td&gt;

&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;water bill, expense&lt;/td&gt;
&lt;td&gt;apartment&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-Jan-21&lt;/td&gt;

&lt;td&gt;65&lt;/td&gt;
&lt;td&gt;electricity bill, expense&lt;/td&gt;
&lt;td&gt;apartment&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-Jan-21&lt;/td&gt;

&lt;td&gt;853&lt;/td&gt;
&lt;td&gt;music, expense&lt;/td&gt;
&lt;td&gt;online&lt;/td&gt;
&lt;td&gt;netbank&lt;/td&gt;
&lt;td&gt;tertiary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-Jan-21&lt;/td&gt;
&lt;td&gt;1600&lt;/td&gt;

&lt;td&gt;income, entertainment&lt;/td&gt;
&lt;td&gt;online&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;tertiary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3-Jan-21&lt;/td&gt;

&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;car fare, expense&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3-Jan-21&lt;/td&gt;

&lt;td&gt;35&lt;/td&gt;
&lt;td&gt;breakfast, expense&lt;/td&gt;
&lt;td&gt;market&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3-Jan-21&lt;/td&gt;

&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;dinner, expense&lt;/td&gt;
&lt;td&gt;market&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3-Jan-21&lt;/td&gt;

&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;expense&lt;/td&gt;
&lt;td&gt;shop&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3-Jan-21&lt;/td&gt;

&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;expense&lt;/td&gt;
&lt;td&gt;apartment&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;secondary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4-Jan-21&lt;/td&gt;

&lt;td&gt;65&lt;/td&gt;
&lt;td&gt;breakfast, expense&lt;/td&gt;
&lt;td&gt;Seven-Eleven&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4-Jan-21&lt;/td&gt;

&lt;td&gt;45&lt;/td&gt;
&lt;td&gt;expense, eggs&lt;/td&gt;
&lt;td&gt;Seven-Eleven&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4-Jan-21&lt;/td&gt;

&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;drinking water, expense&lt;/td&gt;
&lt;td&gt;apartment&lt;/td&gt;
&lt;td&gt;cash&lt;/td&gt;
&lt;td&gt;primary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4-Jan-21&lt;/td&gt;

&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;food, dinner, expense&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/akkaraponph/income-expense" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After dropping the files, I just iterate the prompt like &lt;br&gt;
&lt;code&gt;base on csv files give me mockup base on those data&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The agent looked at the headers and quickly built a working dashboard without having to do any manual mapping or coding. It's very satisfying to see a static file turn into an interactive app component right in front of your eyes.&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%2Fmy6otz3uv62rfb2xq5dx.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%2Fmy6otz3uv62rfb2xq5dx.png" alt=" " width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Publish
&lt;/h2&gt;

&lt;p&gt;We can make our spark public (need to sign in with GitHub to view) and also change the visibility setting.&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%2Fd79sl3fuahjdxjh23l8x.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%2Fd79sl3fuahjdxjh23l8x.png" alt=" " width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Is GitHub Spark the Future of Rapid Prototyping?
&lt;/h2&gt;

&lt;p&gt;In summary, GitHub Spark is a game changer for bridging the gap between a raw idea and a functional reality; it empowers creators to take the concepts in their heads and manifest them into tangible "Sparks" using nothing more than natural language and some simple prompts.&lt;/p&gt;

&lt;p&gt;Why it stands out&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Speed to market Whether you're a developer or a visionary, you can build a working product or mockup prototype at an incredible pace.&lt;/li&gt;
&lt;li&gt;Intuitive Customization The ability to tweak themes, typography, and data mockups with a few clicks makes it accessible without sacrificing control.&lt;/li&gt;
&lt;li&gt;The GitHub Advantage The killer feature is the native ecosystem. Being able to reference your existing private repositories for context is a superpower that other tools simply can't match&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are already a fan of tools like Lovable but prefer staying within the GitHub ecosystem, Spark is a fantastic alternative. At the current price point of $39 USD (GitHub Copilot Pro+), the value you get—combining AI-assisted coding with this rapid prototyping environment—is exceptionally comprehensive.&lt;/p&gt;

&lt;p&gt;GitHub Spark isn't just a toy; It's a high-velocity engine for the next generation of builders :)&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>githubcopilot</category>
      <category>github</category>
    </item>
    <item>
      <title>DeltaView - AI-Driven JSON Diff Viewer Built with GitHub Copilot</title>
      <dc:creator>Akkarapon Phikulsri</dc:creator>
      <pubDate>Sat, 14 Feb 2026 11:40:32 +0000</pubDate>
      <link>https://dev.to/akkaraponph/deltaview-ai-driven-json-diff-viewer-built-with-github-copilot-5107</link>
      <guid>https://dev.to/akkaraponph/deltaview-ai-driven-json-diff-viewer-built-with-github-copilot-5107</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  DeltaView - AI-Driven Diff Viewer Built with GitHub Copilot
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DeltaView&lt;/strong&gt; is a powerful web-based JSON diff viewer that showcases AI-driven development using GitHub Copilot. The application parses JSON inputs, generates structural diffs, and displays them with beautiful syntax highlighting and side-by-side comparison views.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent JSON Diff Engine&lt;/strong&gt; - Recursively compares JSON structures and categorizes changes (added, removed, modified)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Diff Visualization&lt;/strong&gt; - Side-by-side comparison with color-coded changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Syntax Highlighting&lt;/strong&gt; - Professional code display with proper formatting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Handling&lt;/strong&gt; - Graceful handling of invalid JSON and edge cases&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type-Safe Implementation&lt;/strong&gt; - Built with TypeScript for reliability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive UI&lt;/strong&gt; - Modern, clean interface built with React, TailwindCSS, and shadcn/ui&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Technology Stack:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend&lt;/strong&gt;: React + TypeScript&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling&lt;/strong&gt;: TailwindCSS + shadcn/ui components&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Tool&lt;/strong&gt;: Bun (ultra-fast JavaScript runtime)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Development Methodology&lt;/strong&gt;: AI-driven architecture with markdown specifications&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎬 Features &amp;amp; Demo
&lt;/h2&gt;

&lt;p&gt;Live demo available at: &lt;strong&gt;&lt;a href="https://deltaview.refactorroom.com" rel="noopener noreferrer"&gt;deltaview.refactorroom.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://deltaview.refactorroom.com/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdeltaview.refactorroom.com%2Fog-image.png" height="" class="m-0" width=""&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://deltaview.refactorroom.com/" rel="noopener noreferrer" class="c-link"&gt;
            DeltaView - All-in-One Developer Toolkit | JSON Converters, Generators, Editor &amp;amp; Schema Converters
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            All-in-one developer toolkit: JSON converters, generators, online editor, and schema converters. Compare JSON with visual diffs, format &amp;amp; validate, visualize as graphs or tables. Privacy-first, free forever.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdeltaview.refactorroom.com%2Flogo.svg" width="1200" height="1050"&gt;
          deltaview.refactorroom.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  1. 📝 JSON Compare Input Panel
&lt;/h3&gt;

&lt;p&gt;Easily input two JSON objects to compare. The interface features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Side-by-side JSON input panels&lt;/li&gt;
&lt;li&gt;Format buttons to validate and beautify JSON&lt;/li&gt;
&lt;li&gt;Load example data for quick testing&lt;/li&gt;
&lt;li&gt;Real-time error validation&lt;/li&gt;
&lt;li&gt;Support for large JSON structures&lt;/li&gt;
&lt;/ul&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%2F2qt4ov7izl3sri2bgu1d.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%2F2qt4ov7izl3sri2bgu1d.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  2. 🔍 JSON Comparison Results
&lt;/h3&gt;

&lt;p&gt;Get detailed, line-by-line diff visualization:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Orange highlights&lt;/strong&gt; - Removed or old values&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Purple highlights&lt;/strong&gt; - Added or new values&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Character-level precision&lt;/strong&gt; - See exactly what changed within each line&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copy buttons&lt;/strong&gt; - Easily copy individual sides&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expandable view&lt;/strong&gt; - Toggle between split and fullscreen modes&lt;/li&gt;
&lt;li&gt;Line numbers for easy reference&lt;/li&gt;
&lt;/ul&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%2Fzb5798hol85y52s6yoqf.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%2Fzb5798hol85y52s6yoqf.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Comparison Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recursive diff of nested objects&lt;/li&gt;
&lt;li&gt;Array element tracking&lt;/li&gt;
&lt;li&gt;Property addition/removal detection&lt;/li&gt;
&lt;li&gt;Value modification detection&lt;/li&gt;
&lt;li&gt;Type change detection&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. 📊 JSON Graph Visualization
&lt;/h3&gt;

&lt;p&gt;Visualize JSON structure as an interactive graph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node-based representation of objects and arrays&lt;/li&gt;
&lt;li&gt;Visual relationship mapping&lt;/li&gt;
&lt;li&gt;Interactive node exploration&lt;/li&gt;
&lt;li&gt;Zoom and pan controls&lt;/li&gt;
&lt;li&gt;Perfect for understanding complex JSON hierarchies&lt;/li&gt;
&lt;/ul&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%2Fr1nzzwkno3fb0ge9sbwf.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%2Fr1nzzwkno3fb0ge9sbwf.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graph Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto-layout for clarity&lt;/li&gt;
&lt;li&gt;Color-coded node types&lt;/li&gt;
&lt;li&gt;Expandable/collapsible nodes&lt;/li&gt;
&lt;li&gt;Connection visualization&lt;/li&gt;
&lt;li&gt;Ideal for API responses and config files&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. 📋 Table View
&lt;/h3&gt;

&lt;p&gt;Convert JSON data into structured table format:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic table generation from JSON objects&lt;/li&gt;
&lt;li&gt;Column headers from object keys&lt;/li&gt;
&lt;li&gt;Clean, organized data presentation&lt;/li&gt;
&lt;li&gt;Sortable columns&lt;/li&gt;
&lt;li&gt;Perfect for data-driven JSON&lt;/li&gt;
&lt;/ul&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%2F3n3drehcdq2n4ra82fdh.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%2F3n3drehcdq2n4ra82fdh.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto-detect and format columns&lt;/li&gt;
&lt;li&gt;Handle nested objects gracefully&lt;/li&gt;
&lt;li&gt;Array data visualization&lt;/li&gt;
&lt;li&gt;Easy copy and export functionality&lt;/li&gt;
&lt;li&gt;Responsive column sizing&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  5. ✨ JSON Formatter
&lt;/h3&gt;

&lt;p&gt;Format, validate, and beautify JSON with professional formatting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One-click JSON formatting&lt;/li&gt;
&lt;li&gt;Automatic indentation (2 spaces)&lt;/li&gt;
&lt;li&gt;Syntax highlighting&lt;/li&gt;
&lt;li&gt;Error detection with line numbers&lt;/li&gt;
&lt;li&gt;Copy formatted output&lt;/li&gt;
&lt;/ul&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%2F0iiam5uonabi6v4fmz1v.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%2F0iiam5uonabi6v4fmz1v.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Formatter Capabilities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate JSON syntax&lt;/li&gt;
&lt;li&gt;Detect and report errors&lt;/li&gt;
&lt;li&gt;Pretty-print with proper indentation&lt;/li&gt;
&lt;li&gt;Remove unnecessary whitespace&lt;/li&gt;
&lt;li&gt;Support for large files&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🌐 Technology &amp;amp; Performance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instant Validation&lt;/strong&gt; - Real-time error checking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive Design&lt;/strong&gt; - Works perfectly on desktop, tablet, and mobile&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dark/Light Mode&lt;/strong&gt; - Comfortable viewing in any lighting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast Processing&lt;/strong&gt; - Handles large JSON files efficiently&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type-Safe&lt;/strong&gt; - Built with TypeScript for reliability&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How I Used GitHub Copilot CLI
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Architecture Definition&lt;/strong&gt; - Used natural language in &lt;code&gt;docs/architecture.md&lt;/code&gt; to define the diff engine specifications, component structure, and data contracts. GitHub Copilot CLI helped generate detailed TypeScript interfaces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Component Generation&lt;/strong&gt; - Leveraged &lt;code&gt;gh copilot&lt;/code&gt; in the terminal to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate React component scaffolds with proper TypeScript types&lt;/li&gt;
&lt;li&gt;Create utility functions following project conventions&lt;/li&gt;
&lt;li&gt;Generate UI component wrappers for shadcn/ui integration&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Complex Logic Implementation&lt;/strong&gt; - Used Copilot Chat for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementing the recursive JSON diff algorithm&lt;/li&gt;
&lt;li&gt;Handling edge cases and data type comparisons&lt;/li&gt;
&lt;li&gt;Creating proper error handling patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Code Quality &amp;amp; Consistency&lt;/strong&gt; - Copilot CLI suggested:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linting fixes and TypeScript improvements&lt;/li&gt;
&lt;li&gt;Best practice patterns for React hooks and state management&lt;/li&gt;
&lt;li&gt;Proper accessibility attributes for UI components&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Impact on Development
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Productivity Gains:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚡ &lt;strong&gt;60-80% faster development&lt;/strong&gt; - Boilerplate and repetitive code generation done by AI&lt;/li&gt;
&lt;li&gt;🎯 &lt;strong&gt;Consistency&lt;/strong&gt; - All components follow the same patterns defined in agent markdown files&lt;/li&gt;
&lt;li&gt;📚 &lt;strong&gt;Better Documentation&lt;/strong&gt; - Architecture markdown files serve as both specs and living documentation&lt;/li&gt;
&lt;li&gt;🐛 &lt;strong&gt;Fewer Bugs&lt;/strong&gt; - Type-safe implementations and consistent error handling patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Developer Experience:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Natural language to code conversion eliminated context switching&lt;/li&gt;
&lt;li&gt;AI understood project conventions and applied them automatically&lt;/li&gt;
&lt;li&gt;Focus shifted from syntax to architecture and user experience&lt;/li&gt;
&lt;li&gt;Iterative refinement became faster with AI assistance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Learnings
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Markdown-First Development&lt;/strong&gt; - Well-structured architecture docs enable AI to maintain consistency across large codebases&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context is King&lt;/strong&gt; - Providing clear specifications in agent files dramatically improves code quality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration Model&lt;/strong&gt; - Human architects design system, AI implements details, humans review and refine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt; - This methodology scales better than traditional development for complex projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project demonstrates that modern web applications can be built faster, with higher quality, and better maintainability when humans and AI work together with clear architectural specifications.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Get Started with GitHub Copilot - Easy, Fun &amp;amp; Productive!
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why GitHub Copilot?
&lt;/h3&gt;

&lt;p&gt;GitHub Copilot transforms your coding experience into a &lt;strong&gt;productive conversation&lt;/strong&gt; with AI! Whether you're building new features, debugging code, or learning new frameworks, Copilot is your &lt;strong&gt;24/7 coding companion&lt;/strong&gt; that makes development easier, faster, and more enjoyable.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✨ Key Benefits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Easy to Use&lt;/strong&gt; - Just install and start coding! Copilot understands natural language and suggests code as you type&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚡ Boost Productivity&lt;/strong&gt; - Cut development time in half by letting AI handle boilerplate, repetitive tasks, and scaffolding&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;💡 Learn While You Code&lt;/strong&gt; - Discover best practices, new APIs, and coding patterns through intelligent suggestions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎨 Focus on Creativity&lt;/strong&gt; - Spend less time on syntax, more time on solving problems and building amazing features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🤖 CLI Power&lt;/strong&gt; - Use &lt;code&gt;gh copilot&lt;/code&gt; in your terminal for instant help, command suggestions, and code generation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📦 Super Simple Installation
&lt;/h3&gt;

&lt;p&gt;Getting started with GitHub Copilot is as easy as 1-2-3:&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%2Fjbcwqgnxf4v1tb1skfto.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%2Fjbcwqgnxf4v1tb1skfto.png" alt=" " width="795" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install the Extension&lt;/strong&gt; - One click in VS Code or your favorite IDE&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sign In&lt;/strong&gt; - Connect with your GitHub account&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start Coding&lt;/strong&gt; - That's it! Copilot is ready to assist you&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🎉 Why Developers Love It
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;"Instead of manually writing everything from scratch, I just describe what I want and Copilot generates it. This cuts out boilerplate and lets me focus on the actual logic and user experience."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Key Features That Make Coding Fun:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Natural Language → Code&lt;/strong&gt;: Describe what you want in comments, get working code instantly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context-Aware&lt;/strong&gt;: Understands your project structure and adapts to your coding style&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Language&lt;/strong&gt;: Works seamlessly with dozens of programming languages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal Integration&lt;/strong&gt;: GitHub Copilot CLI for command suggestions and explanations right in your terminal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Assistance&lt;/strong&gt;: Get suggestions as you type, no interruptions to your flow&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💪 Productivity Boosters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Generate entire functions from a single comment&lt;/li&gt;
&lt;li&gt;Convert ideas into working code in seconds&lt;/li&gt;
&lt;li&gt;Automate repetitive coding tasks&lt;/li&gt;
&lt;li&gt;Get instant code explanations and documentation&lt;/li&gt;
&lt;li&gt;Fix bugs faster with AI-powered suggestions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ready to supercharge your coding?&lt;/strong&gt; &lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;Get GitHub Copilot today!&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤖 AI-Driven Development with Agent Markdown Files
&lt;/h2&gt;

&lt;p&gt;This project demonstrates a powerful &lt;strong&gt;AI-first development methodology&lt;/strong&gt; using structured markdown documentation to guide AI coding agents. Instead of traditional specification documents, we use &lt;strong&gt;agent-optimized markdown files&lt;/strong&gt; that serve as both documentation and instruction sets for AI assistants like GitHub Copilot.&lt;/p&gt;

&lt;h3&gt;
  
  
  📋 The Agent MD File Pattern
&lt;/h3&gt;

&lt;p&gt;Our &lt;code&gt;docs/&lt;/code&gt; folder contains markdown files specifically designed for AI agents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs/
  ├── agent.md              # Core agent instructions &amp;amp; principles
  ├── architecture.md       # System architecture &amp;amp; structure
  ├── coding-standards.md   # Code quality rules
  ├── prompt.md             # Initial project prompt
  ├── ui-guidelines.md      # UI/UX specifications
  ├── vision.md             # Project scope &amp;amp; constraints
  └── tasks/                # Task breakdown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🎯 Why This Approach Works
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Traditional Development:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write specs → Translate to code → Review → Refactor&lt;/li&gt;
&lt;li&gt;High cognitive load on developers&lt;/li&gt;
&lt;li&gt;Specs often become outdated&lt;/li&gt;
&lt;li&gt;Inconsistent implementation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI-Driven Development:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write clear markdown requirements → AI generates code → Human reviews&lt;/li&gt;
&lt;li&gt;AI maintains consistency across codebase&lt;/li&gt;
&lt;li&gt;Documentation stays synchronized with code&lt;/li&gt;
&lt;li&gt;Faster iteration cycles&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔧 How We Use Agent Files
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Architecture as Code&lt;/strong&gt; (&lt;a href="//docs/architecture.md"&gt;architecture.md&lt;/a&gt;)
&lt;/h4&gt;

&lt;p&gt;Defines the entire system structure, component responsibilities, and technical constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tech stack decisions (React, TypeScript, shadcn/ui)&lt;/li&gt;
&lt;li&gt;File organization and structure&lt;/li&gt;
&lt;li&gt;Data contracts and interfaces&lt;/li&gt;
&lt;li&gt;Performance constraints&lt;/li&gt;
&lt;li&gt;Non-goals and boundaries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI Agent Benefit:&lt;/strong&gt; Understands the full context and makes consistent architectural decisions.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. &lt;strong&gt;Agent Instructions&lt;/strong&gt; (&lt;a href="//docs/agent.md"&gt;agent.md&lt;/a&gt;)
&lt;/h4&gt;

&lt;p&gt;Core principles and rules for the AI coding agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code style preferences&lt;/li&gt;
&lt;li&gt;Component patterns to follow&lt;/li&gt;
&lt;li&gt;JSON handling rules&lt;/li&gt;
&lt;li&gt;UI tone and approach&lt;/li&gt;
&lt;li&gt;Error handling standards&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI Agent Benefit:&lt;/strong&gt; Maintains code quality and follows project conventions automatically.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;Project Prompt&lt;/strong&gt; (&lt;a href="//docs/prompt.md"&gt;prompt.md&lt;/a&gt;)
&lt;/h4&gt;

&lt;p&gt;The initial project specification in natural language:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feature requirements&lt;/li&gt;
&lt;li&gt;Component structure&lt;/li&gt;
&lt;li&gt;UX guidelines&lt;/li&gt;
&lt;li&gt;API contracts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI Agent Benefit:&lt;/strong&gt; Can regenerate or extend features while staying aligned with original vision.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. &lt;strong&gt;Vision Document&lt;/strong&gt; (&lt;a href="//docs/vision.md"&gt;vision.md&lt;/a&gt;)
&lt;/h4&gt;

&lt;p&gt;Clear boundaries and constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What the project &lt;strong&gt;IS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;What the project &lt;strong&gt;IS NOT&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Scope limitations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI Agent Benefit:&lt;/strong&gt; Prevents scope creep and keeps AI focused on core functionality.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✨ Benefits of AI-Driven Development
&lt;/h3&gt;

&lt;h4&gt;
  
  
  🚀 Speed
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate entire components&lt;/strong&gt; from markdown specifications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boilerplate elimination&lt;/strong&gt; – AI handles repetitive code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel development&lt;/strong&gt; – AI works on multiple files simultaneously&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🎯 Consistency
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Architectural alignment&lt;/strong&gt; – AI follows defined patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code style uniformity&lt;/strong&gt; – Automatic adherence to standards&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No drift&lt;/strong&gt; – Documentation and code stay in sync&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  📚 Living Documentation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Markdown files are human-readable project docs&lt;/li&gt;
&lt;li&gt;AI references them for every code generation&lt;/li&gt;
&lt;li&gt;Easy to update and maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🧠 Knowledge Transfer
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;New team members read markdown files&lt;/li&gt;
&lt;li&gt;AI onboards instantly with same context&lt;/li&gt;
&lt;li&gt;Reduces tribal knowledge problems&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🛠️ Practical Workflow Example
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Manual Project Initialization
&lt;/h4&gt;

&lt;p&gt;Before leveraging GitHub Copilot, we start with a basic project setup. This project was initialized using Bun:&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%2Fzrkqanfa1bticp08grux.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%2Fzrkqanfa1bticp08grux.png" alt=" " width="727" height="353"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running &lt;code&gt;bun init&lt;/code&gt;, your project structure is ready:&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%2Fnryy324wi4edfzpaq6gp.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%2Fnryy324wi4edfzpaq6gp.png" alt=" " width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This creates the initial project structure with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic &lt;code&gt;package.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;TypeScript configuration&lt;/li&gt;
&lt;li&gt;Entry point files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why manual first?&lt;/strong&gt; This establishes the foundation and project structure that Copilot will then enhance and build upon. You control the tech stack decisions, and AI handles the implementation details.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Trust Your Workspace
&lt;/h4&gt;

&lt;p&gt;When you open your project folder in VS Code, you'll need to trust the workspace to enable all features:&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%2F11hz3n5zjnokrgd1jteq.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%2F11hz3n5zjnokrgd1jteq.png" alt=" " width="783" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;"Yes, I trust the authors"&lt;/strong&gt; to allow VS Code and GitHub Copilot to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access your project files&lt;/li&gt;
&lt;li&gt;Provide context-aware suggestions&lt;/li&gt;
&lt;li&gt;Run scripts and tools&lt;/li&gt;
&lt;li&gt;Enable full extension functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a one-time security step that ensures you're comfortable with the code in your workspace.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Start Prompting with Copilot
&lt;/h4&gt;

&lt;p&gt;Now you're ready to start working with GitHub Copilot! Open the Copilot chat and start describing what you want to build:&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%2F74o831ots5hga06f8xyr.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%2F74o831ots5hga06f8xyr.png" alt=" " width="786" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simply describe your requirements in natural language:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Create a JSON formatter component following docs/architecture.md"&lt;/li&gt;
&lt;li&gt;"Build a diff viewer with syntax highlighting"&lt;/li&gt;
&lt;li&gt;"Add error handling for invalid JSON input"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Copilot understands your project context and generates code that fits your architecture!&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4: AI Takes Over Development
&lt;/h4&gt;

&lt;p&gt;Once the foundation is set, GitHub Copilot accelerates development:&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%2Fxwjq1z9y4w5ejzvjnkm3.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%2Fxwjq1z9y4w5ejzvjnkm3.png" alt=" " width="724" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt; Add a new "Export to CSV" feature&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional Approach:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write feature spec&lt;/li&gt;
&lt;li&gt;Manually code the export logic&lt;/li&gt;
&lt;li&gt;Create UI components&lt;/li&gt;
&lt;li&gt;Write tests&lt;/li&gt;
&lt;li&gt;Update documentation&lt;/li&gt;
&lt;li&gt;Code review&lt;/li&gt;
&lt;li&gt;Refactor&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;AI-Driven Approach:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Update &lt;code&gt;docs/architecture.md&lt;/code&gt; with CSV export requirements&lt;/li&gt;
&lt;li&gt;Ask Copilot: "Implement CSV export feature following docs/architecture.md"&lt;/li&gt;
&lt;li&gt;AI generates:

&lt;ul&gt;
&lt;li&gt;Export logic in &lt;code&gt;lib/export/csv.ts&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;UI button component&lt;/li&gt;
&lt;li&gt;Integration with existing panels&lt;/li&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;li&gt;TypeScript types&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Human reviews and refines&lt;/li&gt;
&lt;li&gt;Documentation already updated (step 1)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Time saved:&lt;/strong&gt; 60-80% reduction in implementation time&lt;/p&gt;

&lt;h3&gt;
  
  
  📖 Example: JSON Diff Implementation
&lt;/h3&gt;

&lt;p&gt;Our &lt;a href="//docs/architecture.md"&gt;architecture.md&lt;/a&gt; specifies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Diff Engine&lt;/span&gt;
Must be:
&lt;span class="p"&gt;-&lt;/span&gt; Structural (parse JSON first)
&lt;span class="p"&gt;-&lt;/span&gt; Recursive
&lt;span class="p"&gt;-&lt;/span&gt; Deterministic
&lt;span class="p"&gt;-&lt;/span&gt; Library-free

type DiffEntry = {
  path: string
  type: "added" | "removed" | "modified"
  oldValue?: unknown
  newValue?: unknown
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AI Agent reads this and generates:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete recursive diff algorithm&lt;/li&gt;
&lt;li&gt;Type-safe implementation&lt;/li&gt;
&lt;li&gt;Proper error handling&lt;/li&gt;
&lt;li&gt;Exact data contract adherence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Developer role:&lt;/strong&gt; Review logic, test edge cases, refine algorithm&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Best Practices for Agent Markdown Files
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Be Specific, Not Vague&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ "Make it look nice"&lt;/li&gt;
&lt;li&gt;✅ "Use monospace font, 2-space indentation, subtle colors (green for added, red for removed)"&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Define Data Contracts&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Include TypeScript types in markdown&lt;/li&gt;
&lt;li&gt;Specify exact field names and types&lt;/li&gt;
&lt;li&gt;Show example inputs/outputs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set Boundaries&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explicitly state what NOT to do&lt;/li&gt;
&lt;li&gt;Define scope limitations&lt;/li&gt;
&lt;li&gt;Prevent feature creep&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Keep It Organized&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One concern per file&lt;/li&gt;
&lt;li&gt;Cross-reference related files&lt;/li&gt;
&lt;li&gt;Use clear headings&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Write for Both AI and Humans&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Natural language that humans can read&lt;/li&gt;
&lt;li&gt;Structured format AI can parse&lt;/li&gt;
&lt;li&gt;Examples and counterexamples&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🎓 Getting Started with Agent-Driven Development
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a &lt;code&gt;docs/&lt;/code&gt; folder&lt;/strong&gt; in your project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write an architecture.md&lt;/strong&gt; – Define your system structure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add agent.md&lt;/strong&gt; – Specify coding principles and patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create vision.md&lt;/strong&gt; – Set clear boundaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reference these files&lt;/strong&gt; when working with GitHub Copilot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterate&lt;/strong&gt; – Update markdown files as requirements evolve&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🔮 The Future of Development
&lt;/h3&gt;

&lt;p&gt;AI-driven development with agent markdown files represents a paradigm shift:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Documentation-first&lt;/strong&gt; development&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI as implementation partner&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human as architect and reviewer&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Faster, more consistent codebases&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project (&lt;code&gt;deltaview.refactorroom.com&lt;/code&gt;) was built almost entirely using this methodology, demonstrating that complex applications can be developed with AI assistance while maintaining high code quality and clear architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Deploying to Cloudflare Pages
&lt;/h2&gt;

&lt;p&gt;DeltaView is deployed to Cloudflare Pages for fast, global distribution. Here's how to deploy:&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare Account&lt;/strong&gt; - Sign up at &lt;a href="https://cloudflare.com" rel="noopener noreferrer"&gt;cloudflare.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrangler CLI&lt;/strong&gt; - Install with:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; wrangler
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt; - Run &lt;code&gt;wrangler login&lt;/code&gt; to connect your account&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Your Current Setup
&lt;/h3&gt;

&lt;p&gt;Your project is configured for Cloudflare Pages with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project name&lt;/strong&gt;: &lt;code&gt;deltaview&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build output&lt;/strong&gt;: &lt;code&gt;dist/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build command&lt;/strong&gt;: &lt;code&gt;bun run build.ts&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Deployment Steps
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Authenticate with Cloudflare&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wrangler login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. &lt;strong&gt;Build Your Project&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun run build.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This generates the &lt;code&gt;dist/&lt;/code&gt; folder with your static assets.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. &lt;strong&gt;Deploy to Pages&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wrangler pages deploy dist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or deploy to a specific environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wrangler pages deploy dist &lt;span class="nt"&gt;--branch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;production
wrangler pages deploy dist &lt;span class="nt"&gt;--branch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;preview
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4. &lt;strong&gt;Add Custom Domain (via Dashboard)&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://dash.cloudflare.com" rel="noopener noreferrer"&gt;Cloudflare Dashboard&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;deltaview&lt;/strong&gt; project&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Settings → Custom domains&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Add your domain (e.g., &lt;code&gt;deltaview.refactorroom.com&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Using Package Scripts
&lt;/h3&gt;

&lt;p&gt;We've provided convenient npm scripts in &lt;a href="//package.json"&gt;package.json&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun run pages:build      &lt;span class="c"&gt;# Build the project&lt;/span&gt;
bun run pages:deploy     &lt;span class="c"&gt;# Deploy to Pages&lt;/span&gt;
bun run pages:dev        &lt;span class="c"&gt;# Local Pages preview&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CI/CD Automatic Deployment
&lt;/h3&gt;

&lt;p&gt;For automatic deployments on every push:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Cloudflare Dashboard&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;deltaview&lt;/strong&gt; project → &lt;strong&gt;Settings → Build and deployment&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Connect your GitHub repository&lt;/li&gt;
&lt;li&gt;Configure:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build command&lt;/strong&gt;: &lt;code&gt;bun run build.ts&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build output directory&lt;/strong&gt;: &lt;code&gt;dist&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Push to main branch - deployment happens automatically!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Live Site
&lt;/h3&gt;

&lt;p&gt;Your site is live at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pages domain&lt;/strong&gt;: &lt;code&gt;https://deltaview-ap7.pages.dev&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom domain&lt;/strong&gt;: &lt;code&gt;https://deltaview.refactorroom.com&lt;/code&gt; (once configured)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Project Setup
&lt;/h2&gt;

&lt;p&gt;To install dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To start a development server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To run for production:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This project was created using &lt;code&gt;bun init&lt;/code&gt; in bun v1.2.19. &lt;a href="https://bun.com" rel="noopener noreferrer"&gt;Bun&lt;/a&gt; is a fast all-in-one JavaScript runtime.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
  </channel>
</rss>
