<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Kawin&#39;s Pages</title>
        <link>https://kawin.dev/</link>
        <description>Kawin&#39;s Pages &amp; Blogs</description>
        <generator>Hugo -- gohugo.io</generator><language>th</language><managingEditor>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</managingEditor>
            <webMaster>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</webMaster><lastBuildDate>Tue, 14 Jul 2026 09:00:00 &#43;0700</lastBuildDate>
            <atom:link href="https://kawin.dev/index.xml" rel="self" type="application/rss+xml" />
        <item>
    <title>Traits และ Generics</title>
    <link>https://kawin.dev/posts/rust/rust-traits-generics/</link>
    <pubDate>Sat, 11 Jul 2026 09:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/rust/rust-traits-generics/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpeg" referrerpolicy="no-referrer">
            </div><p>Traits และ Generics คือสองแนวคิดสำคัญที่ทำให้ Rust มีพลังในการเขียนโค้ดที่เป็น generic และสามารถแชร์พฤติกรรมระหว่างประเภทต่าง ๆ ได้อย่างปลอดภัยและมีประสิทธิภาพ บทความนี้เป็นภาคต่อจากภาค 4 ที่เราได้พูดถึง Collections, Iterators และ Error Handling มาแล้ว เราจะเจาะลึกว่า trait ทำหน้าที่เหมือน interface ในภาษาอื่น ๆ เช่น Go หรือ Java อย่างไร และ generics ช่วยให้เราเขียนฟังก์ชันและโครงสร้างข้อมูลที่ทำงานกับหลายประเภทได้โดยไม่สูญเสียประสิทธิภาพ เราจะพูดถึง trait bounds, trait objects รวมถึง trait ที่สำคัญในไลบรารีมาตรฐาน เช่น Display, Debug, Clone, Copy, From, Into และ Default แล้วเชื่อมโยงกับการใช้งานจริงในโปรเจกต์ rs-wsProxy ที่ใช้ Axum, clap และ async/await ด้วย</p>]]></description>
</item>
<item>
    <title>Collections, Iterators และ Error Handling</title>
    <link>https://kawin.dev/posts/rust/rust-collections-errors/</link>
    <pubDate>Fri, 10 Jul 2026 09:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/rust/rust-collections-errors/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpeg" referrerpolicy="no-referrer">
            </div><p>การเขียนโปรแกรมใน Rust ไม่ได้หยุดอยู่แค่การเขียนฟังก์ชันและโครงสร้างข้อมูลพื้นฐานเท่านั้น แต่ยังต้องเข้าใจกลไกการจัดการข้อมูลที่ซับซ้อนขึ้น เช่น คอลเลกชันต่างๆ ที่ช่วยให้เราจัดการข้อมูลหลายๆ ชิ้นได้อย่างมีประสิทธิภาพ รวมถึงการใช้อิเทอร์เรเตอร์เพื่อประมวลผลข้อมูลเหล่านั้นอย่างมีประสิทธิภาพ และที่สำคัญที่สุดคือการจัดการข้อผิดพลาดอย่างเหมาะสมด้วยระบบ Result และตัวดำเนินการ ? ซึ่งเป็นหัวใจสำคัญของการเขียนโค้ดที่ปลอดภัยและน่าเชื่อถือใน Rust บทความนี้เป็นส่วนที่ 4 ของซีรีส์ Rust โดยต่อเนื่องจาก Part 3 ที่พูดถึง Structs, Enums และ Pattern Matching และจะนำไปสู่ Part 5 ที่จะพูดถึง Traits และ Generics ต่อไป เราจะเจาะลึกแต่ละหัวข้อด้วยคำอธิบายอย่างละเอียดและตัวอย่างโค้ดที่สามารถนำไปใช้ได้จริง</p>]]></description>
</item>
<item>
    <title>Structs, Enums และ Pattern Matching</title>
    <link>https://kawin.dev/posts/rust/rust-structs-enums/</link>
    <pubDate>Thu, 09 Jul 2026 09:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/rust/rust-structs-enums/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpeg" referrerpolicy="no-referrer">
            </div>สร้างประเภทข้อมูลของเราเองด้วย Structs และ Enums จัดการทุกกรณีอย่างปลอดภัยด้วย Pattern Matching]]></description>
</item>
<item>
    <title>เรียนรู้ Ownership, Borrowing และ Lifetimes</title>
    <link>https://kawin.dev/posts/rust/rust-ownership-borrowing/</link>
    <pubDate>Wed, 08 Jul 2026 09:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/rust/rust-ownership-borrowing/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpeg" referrerpolicy="no-referrer">
            </div><p>Ownership คือหัวใจของ Rust ที่ทำให้ปลอดภัยด้านหน่วยความจำโดยไม่ต้องมี Garbage Collector เชื่อมจากภาค 1 (<code>/posts/rust/rust-getting-started/</code>)</p>]]></description>
</item>
<item>
    <title>เริ่มต้นกับ Rust</title>
    <link>https://kawin.dev/posts/rust/rust-getting-started/</link>
    <pubDate>Tue, 07 Jul 2026 09:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/rust/rust-getting-started/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpeg" referrerpolicy="no-referrer">
            </div><h1 id="เรมตนกบ-rust">เริ่มต้นกับ Rust</h1>
<p>จุดเริ่มต้นของซีรีส์นี้มาจากโพสต์บน Facebook ที่เห็นจาก <a href="https://rayrag.com/" target="_blank" rel="noopener noreffer ">rayrag.com</a> ที่แสดงให้เห็นว่าเราสามารถเล่น <strong>Ragnarok Online (RO)</strong> บนเว็บเบราว์เซอร์ได้เลย ผ่านการเชื่อมต่อ WebSocket ไปยัง emulator server ของเกม นั่นทำให้ผมอยากรู้ว่ามันทำงานยังไง และอยากลองสร้าง WebSocket-to-TCP proxy ของตัวเองด้วยภาษาที่เร็วและปลอดภัย — นั่นคือจุดของการกลับมาทบทวน Rust อีกครั้ง และโปรเจกต์ <a href="https://github.com/bouroo/rs-wsProxy" target="_blank" rel="noopener noreffer ">rs-wsProxy</a></p>
<p>ทำไมต้อง Rust? เพราะมันให้ทั้งประสิทธิภาพระดับระบบ (ระดับ C/C++) ความปลอดภัยด้านหน่วยความจำโดยไม่ต้องใช้ garbage collector และรองรับการเขียนโปรแกรมแบบพร้อมกันได้อย่างปลอดภัย นี่เป็นบทแรกของซีรีส์ 8 ตอนที่จะพาคุณทบทวน Rust ไปจนถึงสร้าง WebSocket-to-TCP Proxy ที่ใช้งานจริงกับ roBrowser</p>]]></description>
</item>
<item>
    <title>รับ interface แล้วคืนค่า struct</title>
    <link>https://kawin.dev/posts/go/accept_interfaces_return_structs/</link>
    <pubDate>Sat, 08 Nov 2025 12:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/go/accept_interfaces_return_structs/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.png" referrerpolicy="no-referrer">
            </div><p>ในโลกของการเขียนโปรแกรมด้วย Go การออกแบบฟังก์ชันให้ยืดหยุ่นและดูแลง่ายคือกุญแจสำคัญของการสร้างแอปที่แข็งแรง หนึ่งในแพทเทิร์นที่ทรงพลังมากคือ</p>
<blockquote>
<p>รับค่าเป็น <strong>interface</strong> แล้วคืนค่าเป็น <strong>struct</strong></p></blockquote>
<p>แนวคิดนี้ช่วยให้เทสง่ายขึ้น ลดการผูกติด (coupling) ระหว่างส่วนต่าง ๆ ในระบบ และทำให้โค้ดของเราปรับตัวตาม requirement ที่เปลี่ยนไปได้ดีขึ้นมาก</p>]]></description>
</item>
<item>
    <title>เลือก Messaging System ตัวไหนดี? Kafka, Valkey, RabbitMQ, NATS... โอย เยอะไปหมด!</title>
    <link>https://kawin.dev/posts/dev/messaging-system-comparison/</link>
    <pubDate>Fri, 11 Jul 2025 10:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/dev/messaging-system-comparison/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpg" referrerpolicy="no-referrer">
            </div><p>เวลาจะทำระบบที่มันคุยกันเยอะๆ (distributed systems) เนี่ย เรื่องปวดหัวอย่างนึงคือจะเลือกระบบ Messaging ตัวไหนดี มันมีให้เลือกเยอะซะเหลือเกิน ทั้ง Kafka, Valkey (ที่เกิดใหม่จาก Redis), RabbitMQ, แล้วก็ NATS อีก แต่ละตัวก็มีดีมีเสียต่างกันไป งั้นโพสต์นี้ขอมาจดโน้ตเทียบให้ตัวเองดูหน่อยละกัน ว่าตัวไหนมันเหมาะกับงานแบบไหน</p>]]></description>
</item>
<item>
    <title>Programmer vs Software Developer vs Software Engineer</title>
    <link>https://kawin.dev/posts/dev/carreer_roles/</link>
    <pubDate>Sun, 19 Jan 2025 11:49:47 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/dev/carreer_roles/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpg" referrerpolicy="no-referrer">
            </div><p>ในโลกของเทคโนโลยี คำว่า <strong>Programmer</strong> <strong>Software Developer</strong> และ <strong>Software Engineer</strong> มักถูกใช้แทนกันได้ อย่างไรก็ตาม แต่ละคำมีบทบาทและความรับผิดชอบที่แตกต่างกัน การเข้าใจความแตกต่างนี้สามารถช่วยในการเลือกเส้นทางอาชีพหรือในการจ้างงานบุคลากรที่เหมาะสมสำหรับทีม</p>]]></description>
</item>
<item>
    <title>ลองสร้างระบบลงคะแนนเลือกตั้งด้วย Go และ Svelte</title>
    <link>https://kawin.dev/posts/go/sse/</link>
    <pubDate>Wed, 01 Jan 2025 00:00:00 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/go/sse/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpg" referrerpolicy="no-referrer">
            </div><p>ช่วงนี้เห็นมีหาเสียงเลือกตั้งองค์กรปกครองส่วนท้องถิ่นกัน เลยถือโอกาสหยิบเว็บเทคโนโลยีนึงที่เหมือนจะถูกมองข้ามเช่น Server-Sent Events (SSE) มาสร้างเป็นระบบลงคะแนนเสียงแบบออนไลน์ที่รองรับการแสดงผลคะแนนแบบเรียลไทม์อย่างง่ายโดยใช้ภาษา <strong>Go</strong> สำหรับ backend และ <strong>Svelte</strong> สำหรับ frontend ดู</p>]]></description>
</item>
<item>
    <title>เขียน Go เรียกใช้ resource เดียวกันแต่ไม่อยากใช้ Exclusive Lock มีทางไหนบ้าง</title>
    <link>https://kawin.dev/posts/go/avoid_locks/</link>
    <pubDate>Sat, 21 Dec 2024 18:07:21 &#43;0700</pubDate>
    <author>kawin.v@kkumail.com (Kawin Viriyaprasopsook)</author>
    <guid>https://kawin.dev/posts/go/avoid_locks/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/featured-image.jpg" referrerpolicy="no-referrer">
            </div><p>ในภาษา Go การใช้ Mutex (Mutual Exclusion) เป็นวิธีการหนึ่งในการจัดการกับการเข้าถึงข้อมูลที่ใช้ร่วมกันในหลายๆ โค้ดหรือ Goroutine เพื่อป้องกันการเกิด Race Conditions ซึ่งอาจทำให้ข้อมูลเสียหายได้ แต่ในบางครั้งการใช้ Mutex ก็อาจทำให้เกิดปัญหาด้านประสิทธิภาพและความซับซ้อนของโปรแกรม และเสีย performance ดังนั้นเราลองมาเขียนโดยการหลีกเลี่ยง Mutex Lock โดยไม่จำเป็นกันดูว่าทำยังไงบ้าง</p>]]></description>
</item>
</channel>
</rss>
