<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Poramin M on Medium]]></title>
        <description><![CDATA[Stories by Poramin M on Medium]]></description>
        <link>https://medium.com/@poramin.m1994?source=rss-3a3c620cbc6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*eOO87gV5GWxUBTlR</url>
            <title>Stories by Poramin M on Medium</title>
            <link>https://medium.com/@poramin.m1994?source=rss-3a3c620cbc6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 12:00:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@poramin.m1994/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ ดัชนีคืออะไร?]]></title>
            <link>https://medium.com/@poramin.m1994/%E0%B8%94%E0%B8%B1%E0%B8%8A%E0%B8%99%E0%B8%B5%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-4bfc896c77aa?source=rss-3a3c620cbc6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bfc896c77aa</guid>
            <category><![CDATA[s-p-500-index]]></category>
            <category><![CDATA[nasdaq100]]></category>
            <dc:creator><![CDATA[Poramin M]]></dc:creator>
            <pubDate>Fri, 02 May 2025 16:35:13 GMT</pubDate>
            <atom:updated>2025-05-02T16:35:13.721Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>ดัชนี (Index)</strong> คือ “คะแนนรวมของหุ้นหลายตัว” ที่ใช้บอกว่า <strong>ตลาดกำลังดีขึ้นหรือลงแค่ไหน</strong><br> ลองนึกภาพว่า… ถ้าดูหุ้นแค่ตัวเดียว 🏃‍♂️ = ดูนักวิ่งคนเดียว<br> แต่ <strong>ดัชนี = ดูทั้งสนามวิ่งพร้อมกัน</strong> ว่าทุกคนโดยรวมวิ่งดีไหม</p><blockquote><em>เหมือนเราดู “คะแนนเฉลี่ยของห้องเรียน” เพื่อรู้ว่าชั้นนี้เก่งแค่ไหน 🏫</em></blockquote><p>ทีนี้เราก็เข้าใจคร่าวๆแล้วว่า“ดัชนี” ที่เราเจอกันหรือได้ยินกันบ่อยๆว่า กองทุนดัชนี มันคืออะไร งั้นขอยกตัวอย่างดัชนีที่คนส่วนใหญ่ไปลงทุนกันมากที่สุดในโลกอย่าง ดัชนี S&amp;P 500 และ ดัชนี Nasdaq-100 ว่าคืออะไร</p><h3>🏦 S&amp;P 500 คืออะไร?</h3><p><strong>S&amp;P 500</strong> คือดัชนีที่รวม <strong>500 บริษัทใหญ่สุดในสหรัฐอเมริกา</strong> เอาไว้<br> ✅ ครอบคลุมหลายกลุ่มธุรกิจ เช่น:</p><ul><li>💻 เทคโนโลยี (Apple, Microsoft)</li><li>🍔 ร้านอาหาร (McDonald’s)</li><li>🏦 ธนาคาร (JPMorgan)</li><li>🥤 เครื่องดื่ม (Coca-Cola)</li></ul><blockquote><em>ใช้เป็นตัวแทนของ “เศรษฐกิจสหรัฐฯ โดยรวม” ได้เลย 🇺🇸</em></blockquote><p>📈 ถ้า S&amp;P 500 ขึ้น = บริษัทส่วนใหญ่กำไรกันดี<br>📉 ถ้าลง ก็อาจมีปัจจัยลบ เช่น ดอกเบี้ยสูง เงินเฟ้อ หรือข่าวโลก</p><h3>💡 Nasdaq-100 คืออะไร?</h3><p><strong>Nasdaq-100</strong> คือดัชนีที่รวม <strong>100 บริษัทใหญ่ที่สุดในตลาด Nasdaq</strong><br> ส่วนใหญ่เป็นสาย <strong>เทคโนโลยี &amp; นวัตกรรม</strong> เช่น:</p><ul><li>📱 Apple</li><li>🤖 Nvidia</li><li>🧠 Google (Alphabet)</li><li>🚗 Tesla</li><li>📸 Meta (Facebook)</li></ul><blockquote><em>เหมือน “ห้องเด็กสายวิทย์สุดเทพ” ที่เน้นนวัตกรรมล้ำ ๆ 🧪⚡</em></blockquote><p>🧗‍♂️ Nasdaq-100 เติบโตเร็ว แต่ก็ผันผวนมากกว่า เพราะพึ่งพาเทคโนโลยีล้วน ๆ</p><h3>✨ สรุปสั้น ๆ เข้าใจง่าย</h3><p>ดัชนี <strong>S&amp;P 500 </strong>คือ ดัชนีที่รวมหุ้นใหญ่ 500 ตัวทั่วอเมริกา เหมาะกับ มือใหม่ที่อยากลงทุนภาพรวมมั่นคง 🛡️</p><p><strong>Nasdaq-100 </strong>คือ ดัชนีที่รวมหุ้น Tech ใหญ่ 100 ตัว เหมาะกับ คนอยากโตเร็ว สาย AI, Cloud, นวัตกรรม 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bfc896c77aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Otelfiber คืออะไร? ]]></title>
            <link>https://medium.com/@poramin.m1994/otelfiber-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-f8fae0e59b98?source=rss-3a3c620cbc6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8fae0e59b98</guid>
            <dc:creator><![CDATA[Poramin M]]></dc:creator>
            <pubDate>Mon, 16 Dec 2024 08:20:03 GMT</pubDate>
            <atom:updated>2024-12-16T08:20:03.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zJbBwXhqDW5V3kOP7TPefA.png" /></figure><p><strong>Otelfiber</strong> (OpenTelemetry Fiber) คือ <strong>แพลตฟอร์มการตรวจสอบและติดตามระบบ (Observability Platform)</strong> ที่ทำงานร่วมกับ OpenTelemetry ซึ่งเป็นมาตรฐานแบบโอเพ่นซอร์สที่ออกแบบมาเพื่อรวบรวมและวิเคราะห์ข้อมูลการทำงานของระบบซอฟต์แวร์ ไม่ว่าจะเป็น <strong>Trace, Metrics และ Logs</strong> โดย Otelfiber จะโฟกัสไปที่การใช้งานร่วมกับ <strong>ภาษา Go (Golang)</strong> ผ่านการผสานรวมกับ <strong>Fiber Web Framework</strong> ซึ่งเป็นเว็บเฟรมเวิร์กที่รวดเร็วและเบาสำหรับภาษา Go</p><p>ถ้าให้พูดง่าย ๆ ก็คือ <strong>Otelfiber จะช่วยให้คุณสามารถติดตามการทำงานของแอปพลิเคชัน Go ที่พัฒนาโดยใช้ Fiber ได้อย่างง่ายดาย</strong> ไม่ว่าจะเป็นการติดตามว่าเส้นทาง (route) ไหนช้า, API ตัวไหนล่าช้า, หรือแม้แต่ดูการใช้งานหน่วยความจำและการประมวลผล (CPU Usage) ของระบบ</p><h3>🔥 Otelfiber ทำงานอย่างไร?</h3><p>Otelfiber จะทำงานร่วมกับ <strong>OpenTelemetry SDK</strong> ซึ่งจะช่วย “ดักจับ” การทำงานภายในแอปพลิเคชัน เช่น คำขอ (Request), การตอบกลับ (Response), การเรียกใช้งานฐานข้อมูล, รวมถึงการทำงานกับบริการภายนอก (External Services) โดยจะบันทึกข้อมูลเหล่านี้ในรูปแบบ <strong>Trace, Metrics และ Logs</strong></p><h3>🛠️ โครงสร้างการทำงาน</h3><p><strong>1.Instrumentation</strong> (การใส่ตัวจับสัญญาณ):</p><ul><li>Otelfiber จะทำการ “แทรก” (Inject) โค้ดเข้าไปในส่วนที่ต้องการติดตาม เช่น การรับส่งข้อมูลใน Fiber Routes</li><li>ทุกการ Request/Response จะถูกแทรกด้วย Context เพื่อให้ระบุได้ว่าข้อมูลนี้มาจากเส้นทางไหน</li></ul><p><strong>2.Data Collection</strong> (การรวบรวมข้อมูล):</p><ul><li>ข้อมูลที่ถูกเก็บได้จะประกอบไปด้วย <strong>Trace (ร่องรอยการทำงาน), Metrics (ค่าประสิทธิภาพ) และ Logs (ข้อความบันทึก)</strong></li><li>ตัวอย่างเช่น เส้นทาง GET /user ใช้เวลาในการประมวลผล 200ms และส่งคืนค่า 200 OK</li></ul><p><strong>3.Data Export</strong> (การส่งออกข้อมูล):</p><ul><li>ข้อมูลที่เก็บได้จะถูกส่งออกไปยังระบบปลายทาง เช่น <strong>Jaeger, Prometheus, Zipkin หรือ Grafana</strong> เพื่อให้ผู้ดูแลระบบวิเคราะห์ข้อมูลและทำการปรับปรุงประสิทธิภาพ</li></ul><p><strong>4.Data Visualization</strong> (การแสดงข้อมูล):</p><ul><li>ใช้เครื่องมือเช่น <strong>Grafana</strong> หรือ <strong>Jaeger</strong> เพื่อดูร่องรอยการทำงาน (Trace) หรือดูแผนภูมิประสิทธิภาพ เช่น ความเร็ว, การใช้หน่วยความจำ ฯลฯ</li></ul><h3>💡 <strong>ทำไมต้องใช้ Otelfiber?</strong></h3><ol><li><strong>ติดตาม API/Route ได้ง่าย</strong> — ทุกเส้นทาง (route) ที่สร้างใน Fiber จะมีข้อมูล Trace ติดมาด้วย</li><li><strong>ลดเวลา Debugging</strong> — คุณจะรู้ได้ทันทีว่า API ไหนทำงานช้า และทำไมถึงช้า</li><li><strong>วิเคราะห์ประสิทธิภาพได้ง่าย</strong> — ตรวจดูความเร็วการตอบกลับ (Response Time) ของ API และการใช้งานทรัพยากรของแอป</li><li><strong>มาตรฐานเปิด (OpenTelemetry)</strong> — สามารถส่งข้อมูลไปยังเครื่องมือหลายตัว เช่น <strong>Grafana, Jaeger, Prometheus, Zipkin</strong></li><li><strong>ใช้งานง่ายกับ Fiber</strong> — แค่เพิ่ม middleware ของ Otelfiber เข้าไปใน Fiber</li></ol><h3>⚙️ <strong>เริ่มต้นใช้งาน Otelfiber</strong></h3><h4>1️⃣ ติดตั้งไลบรารีที่จำเป็น</h4><p>ก่อนอื่นคุณต้องติดตั้ง <strong>OpenTelemetry SDK</strong>, <strong>OpenTelemetry Exporter</strong> และ <strong>Otelfiber</strong> ลงในโปรเจ็กต์ Go</p><pre>go mod init example.com/otelfiber-demo<br>go get go.opentelemetry.io/otel<br>go get go.opentelemetry.io/otel/sdk<br>go get go.opentelemetry.io/otel/exporters/jaeger<br>go get github.com/gofiber/fiber/v2<br>go get github.com/lannguyen-c0x12c/otelfiber</pre><h4>2️⃣ ตั้งค่า Jaeger Exporter</h4><p>ตัวอย่างนี้จะส่งข้อมูลไปยัง <strong>Jaeger</strong> ซึ่งเป็นเครื่องมือยอดนิยมในการติดตามการทำงาน (Distributed Tracing)</p><pre>package main<br><br>import (<br> &quot;context&quot;<br> &quot;fmt&quot;<br> &quot;log&quot;<br> &quot;time&quot;<br><br> &quot;go.opentelemetry.io/otel&quot;<br> &quot;go.opentelemetry.io/otel/exporters/jaeger&quot;<br> &quot;go.opentelemetry.io/otel/sdk/resource&quot;<br> &quot;go.opentelemetry.io/otel/sdk/trace&quot;<br> &quot;go.opentelemetry.io/otel/trace&quot;<br>)<br><br>func initTracer() (*trace.TracerProvider, error) {<br> exporter, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(&quot;http://localhost:14268/api/traces&quot;)))<br> if err != nil {<br>  return nil, err<br> }<br><br> tp := trace.NewTracerProvider(<br>  trace.WithBatcher(exporter),<br>  trace.WithResource(resource.NewWithAttributes(<br>   // ใส่ข้อมูลของแอปที่ต้องการติดตาม<br>   &quot;service.name&quot;, &quot;otelfiber-demo&quot;,<br>  )),<br> )<br> otel.SetTracerProvider(tp)<br> return tp, nil<br>}</pre><h4>3️⃣ เพิ่ม Middleware Otelfiber</h4><p>เมื่อเรามี Tracer แล้ว เราจะเชื่อมกับ Fiber ผ่าน middleware otelfiber ดังนี้</p><pre>package main<br><br>import (<br> &quot;log&quot;<br><br> &quot;github.com/gofiber/fiber/v2&quot;<br> &quot;github.com/lannguyen-c0x12c/otelfiber&quot;<br>)<br><br>func main() {<br> // 1. สร้าง Tracer<br> tp, err := initTracer()<br> if err != nil {<br>  log.Fatal(err)<br> }<br> defer func() {<br>  if err := tp.Shutdown(context.Background()); err != nil {<br>   log.Fatal(err)<br>  }<br> }()<br><br> // 2. สร้างแอป Fiber<br> app := fiber.New()<br><br> // 3. เพิ่ม Middleware otelfiber<br> app.Use(otelfiber.Middleware(&quot;otelfiber-demo&quot;))<br><br> // 4. สร้าง Route<br> app.Get(&quot;/hello&quot;, func(c *fiber.Ctx) error {<br>  return c.SendString(&quot;Hello, World!&quot;)<br> })<br><br> // 5. เริ่มเซิร์ฟเวอร์<br> log.Fatal(app.Listen(&quot;:3000&quot;))<br>}</pre><h4>4️⃣ ตรวจสอบการติดตามใน Jaeger</h4><ol><li>เปิด <strong>Jaeger UI</strong> ที่ <a href="http://localhost:16686/">http://localhost:16686/</a></li><li>เลือก “Service” เป็น otelfiber-demo</li><li>คลิก “Find Traces” และดูข้อมูลเกี่ยวกับคำขอ (Request) ต่าง ๆ ที่เข้ามาในแอป</li></ol><h3>🎉 สรุป</h3><ul><li><strong>Otelfiber</strong> คือเครื่องมือสำหรับติดตามการทำงานของแอป Go ที่ใช้ <strong>Fiber Web Framework</strong> โดยใช้มาตรฐานของ <strong>OpenTelemetry</strong></li><li>ใช้ร่วมกับเครื่องมือวิเคราะห์อย่าง <strong>Jaeger หรือ Grafana</strong> เพื่อวิเคราะห์ประสิทธิภาพแอป</li><li>ติดตั้งง่าย และสามารถดูเส้นทางการทำงานของทุก API ได้ในรูปแบบของ <strong>Trace, Metrics, Logs</strong></li><li>เป็นประโยชน์มากสำหรับ <strong>การแก้ไขข้อบกพร่อง (Debugging) และการวิเคราะห์ประสิทธิภาพ</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8fae0e59b98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DCA ดีจริงไหม?]]></title>
            <link>https://medium.com/@poramin.m1994/dca-%E0%B8%94%E0%B8%B5%E0%B8%88%E0%B8%A3%E0%B8%B4%E0%B8%87%E0%B9%84%E0%B8%AB%E0%B8%A1-c2a1f2e2683e?source=rss-3a3c620cbc6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2a1f2e2683e</guid>
            <dc:creator><![CDATA[Poramin M]]></dc:creator>
            <pubDate>Thu, 21 Nov 2024 07:23:54 GMT</pubDate>
            <atom:updated>2024-11-21T17:04:02.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*POAhZwmDr_A8Nxsz8ELKiA.jpeg" /></figure><h3>DCA คืออะไร? 🤔</h3><p><strong>DCA (Dollar-Cost Averaging)</strong> คือ กลยุทธ์การลงทุนที่ช่วยลดความเสี่ยงจากความผันผวนของตลาด 🌊 โดยการลงทุนเป็นจำนวนเงินที่เท่ากันในสินทรัพย์ที่เลือกในช่วงเวลาที่กำหนด 📅 เช่น รายเดือน หรือ รายสัปดาห์ แทนที่จะลงทุนทั้งหมดในครั้งเดียว 💰</p><p><strong>ตัวอย่าง:</strong><br>สมมติคุณลงทุนในหุ้นทุกเดือน เดือนละ 1,000 บาท ไม่ว่าจะเป็นช่วงที่ราคาหุ้นขึ้น 📈 หรือหุ้นลง 📉 คุณยังคงลงทุนจำนวนเงินเท่าเดิม</p><p><strong>ข้อดีของ DCA:</strong></p><ul><li>ช่วยลดผลกระทบจากความผันผวนของตลาด 🌪️</li><li>ไม่ต้องจับจังหวะตลาด (Market Timing) ⏳</li><li>สร้างวินัยในการลงทุน 💪</li></ul><h3>เปรียบเทียบ: DCA 🆚 ไม่ DCA</h3><h4>กรณี DCA</h4><ul><li>ลงทุนแบบสม่ำเสมอ เช่น ทุกเดือน 📆</li><li>ต้นทุนเฉลี่ยลดลงเมื่อราคาสินทรัพย์ผันผวน 📉📈</li><li>ลดความเครียดเรื่องการตัดสินใจลงทุน 🧘</li></ul><p><strong>ตัวอย่าง:</strong><br>เดือนแรก ราคาหุ้น = 100 บาท ซื้อได้ 10 หุ้น<br>เดือนที่สอง ราคาหุ้น = 50 บาท ซื้อได้ 20 หุ้น<br>เดือนที่สาม ราคาหุ้น = 75 บาท ซื้อได้ 13 หุ้น<br><strong>ต้นทุนเฉลี่ย</strong> = 70 บาท/หุ้น</p><h4>กรณีไม่ DCA (ลงทุนทีเดียว)</h4><ul><li>ลงทุนครั้งเดียวด้วยเงินก้อน 💼</li><li>ความเสี่ยงสูง เพราะต้องจับจังหวะตลาด 🎯</li><li>หากซื้อผิดเวลา เช่น ช่วงราคาสูง อาจขาดทุนระยะสั้น 💔</li></ul><p><strong>ตัวอย่าง:</strong><br>ลงทุน 10,000 บาทในเดือนแรก ตอนราคาหุ้น 100 บาท = ได้ 100 หุ้น<br>หากราคาลดลงเหลือ 75 บาท จะขาดทุนทันที 25% ❌</p><h3>คำถามชวนคิด: 🤔</h3><p>คุณลองพิจารณาแล้วหรือยังว่า DCA เหมาะสมกับเป้าหมายทางการเงินของคุณหรือไม่? 🎯</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2a1f2e2683e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>