<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>About on Unnawut Leepaisalsuwanna</title><link>https://unnawut.com/</link><description>Recent content in About on Unnawut Leepaisalsuwanna</description><generator>Hugo -- gohugo.io</generator><language>th-th</language><lastBuildDate>Mon, 06 Jan 2025 22:50:00 +0700</lastBuildDate><atom:link href="https://unnawut.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Generative UI Design Tools: A Day&#39;s Review</title><link>https://unnawut.com/posts/2025-01-05-generative-ui-review/</link><pubDate>Mon, 06 Jan 2025 22:50:00 +0700</pubDate><guid>https://unnawut.com/posts/2025-01-05-generative-ui-review/</guid><description>Note: This post documents my one-day exploration of various AI design tools rather than providing an in-depth comparative analysis. Please take it with a grain of salt
For the past few months, I&amp;rsquo;ve been on-and-off conceptualizing a single-page website to communicate why Ethereum stands out as the best blockchain ecosystem for businesses and organizations building real-world applications, by integrating adoption metrics and examples from various sources.
To communicate the information well, aesthetics will be very important for this website.</description></item><item><title>GenServer, Registry, DynamicSupervisor. Combined.</title><link>https://unnawut.com/posts/2019-10-05-genserver-registry-dynamic-supervisor-combined/</link><pubDate>Sat, 05 Oct 2019 00:34:00 +0700</pubDate><guid>https://unnawut.com/posts/2019-10-05-genserver-registry-dynamic-supervisor-combined/</guid><description>Originally published at dev.to.
In omisego/ewallet, we&amp;rsquo;re building/refactoring a TransactionTracker that listens to a huge number of transactions (think money transactions) that also happen to be residing in an external source that is slow to update (Hello, Ethereum).
So we need a way for us to:
Run the trackers concurrently, so to enable massive amount of transaction tracking. Look up a running tracker, so we can reuse it for different purposes.</description></item><item><title>Clean and reusable test helpers with Elixir macros</title><link>https://unnawut.com/posts/2019-09-29-clean-reusable-test-helpers-elixir-macros/</link><pubDate>Sun, 29 Sep 2019 02:09:00 +0700</pubDate><guid>https://unnawut.com/posts/2019-09-29-clean-reusable-test-helpers-elixir-macros/</guid><description>Originally published at dev.to.
Sometimes, seemingly redundant tests could serve as an assurance that our code works. While it&amp;rsquo;s possible to abstract away the tests to a higher level, it may mean sacrificing readability.
In this post, I&amp;rsquo;d like to suggest a way to create test helpers that can be reused easily and works seamlessly with ExUnit. While we generally avoid creating macros as the official guide says:
Macros should only be used as a last resort.</description></item><item><title>[Article Review] Advantage Flywheels by Max Olson</title><link>https://unnawut.com/posts/2019-09-29-advantage-flywheels/</link><pubDate>Sun, 29 Sep 2019 00:15:00 +0700</pubDate><guid>https://unnawut.com/posts/2019-09-29-advantage-flywheels/</guid><description>Max Olson, a product strategist at Mashgin wrote an article about Advantage Flywheels, a way to represent business values in terms of feedback loops, making it easy to visualize how those values reinforces each other and become the company&amp;rsquo;s business advantage.
While advantage flywheels are not new, reportedly first mentioned in James C. Collins&amp;rsquo; Good to Great since 2001, I find Max Olson&amp;rsquo;s examples for Wal-Mart, Amazon, Microsoft and Google the easiest to unnderstand compared to abstract examples in other sources.</description></item><item><title>[Article Review] The Psychology of Money by Morgan Housel</title><link>https://unnawut.com/posts/2019-09-28-psychology-of-money/</link><pubDate>Sat, 28 Sep 2019 14:28:00 +0700</pubDate><guid>https://unnawut.com/posts/2019-09-28-psychology-of-money/</guid><description>This article, The Psychology of Money, was recommended to me by Ino Murko. It&amp;rsquo;s a great read on personal investment.
The author described 20 flaws, biases, and causes of bad behavior when people deal with money. Below are my favorite excerpts.
&amp;ldquo;In no other field does someone with no education, no relevant experience, no resources, and no connections vastly outperform someone with the best education, the most relevant experiences, the best resources and the best connections [&amp;hellip;] Managing money isn’t necessarily about what you know; it’s how you behave.</description></item><item><title>Koom Koom — Good coffee beans at affordable prices</title><link>https://unnawut.com/posts/2019-05-04-koom-koom-coffee/</link><pubDate>Sat, 04 May 2019 15:29:00 +0700</pubDate><guid>https://unnawut.com/posts/2019-05-04-koom-koom-coffee/</guid><description>First, a bold disclaimer that I&amp;rsquo;m no coffee expert, but I do have a difficult time finding coffee beans that I like. My coffee preference gradually moved towards bolder drinks, i.e. I started drinking coffee with iced mocha, then cappucino, then finally settling down with espresso.
Since I started drinking espresso, I noticed I&amp;rsquo;ve become more picky about the bean. I suppose it&amp;rsquo;s to do with espresso being pretty much concentrated coffee, not diluted in milk or anything other than a small amount of water.</description></item><item><title>Phil — The best cafe in Vienna</title><link>https://unnawut.com/posts/2019-04-22-phil-vienna/</link><pubDate>Mon, 22 Apr 2019 23:26:00 +0700</pubDate><guid>https://unnawut.com/posts/2019-04-22-phil-vienna/</guid><description>Despite so many cafes in Vienna, Phil, in my opinion, is the best one by far. I came here for a few hours of relax and work for both days of my stay in Vienna.
Phil&amp;#39;s atmosphere at night Phil calls itself a coffee shop, a bar, a book store, a vintage furniture store (most if not all furnitures used in the shop are available for sale), a small movie shop (sells DVDs) and a small record shop (sells vinyl).</description></item><item><title>สรุปทอล์ก Ethereum, Casper และ Sharding โดย Karl Floersch</title><link>https://unnawut.com/posts/2018-02-26-ethereum-casper-sharding-karl-floersch/</link><pubDate>Mon, 26 Feb 2018 12:00:00 +0700</pubDate><guid>https://unnawut.com/posts/2018-02-26-ethereum-casper-sharding-karl-floersch/</guid><description>Originally published at blog.omisego.network
เมื่อวานผมมีโอกาสไปร่วมงาน Asia-Pacific Ethereum Community Meetup ที่ตึก KX ของ ม.พระจอมเกล้าฯ บางมด ช่วงเช้ามีทอล์กของคุณ Karl Floersch ที่น่าจะเป็นทอล์กที่คนประทับใจมากที่สุดของวันนั้น(เคียงข้างทอล์กของ Vitalik Buterin) เลยอยากเขียนสรุปมาแบ่งปันให้เพื่อน ๆ ที่สนใจเกี่ยวกับพัฒนาการในอนาคตอันใกล้ของ Ethereum ครับ
ทอล์กของคุณ Karl Floersch แบ่งออกเป็น 3 ส่วน ซึ่งเป็น 3 องค์ประกอบหลักของ Ethereum ในอนาคตอันใกล้ ดังนี้:
Ethereum Casper Sharding Part 1: Ethereum คนส่วนใหญ่ถ้าเคยได้ยินคำว่า Ethereum น่าจะเข้าใจว่ามันคือคอมพิวเตอร์ที่ร่วมกันประมวลผลทั่วโลก (World’s computer) หรือแพลตฟอร์มสำหรับทำ ICO แต่จริง ๆ แล้วมีคำนิยาม Ethereum ที่ดีกว่านั้น คุณ Karl กล่าวถึงเหตุการณ์แบล็คสวอน (Black Swan) หรือเหตุการณ์ร้ายแรงที่มีผลกระทบต่อระบบหรือองค์กรอย่างสิ้นเชิง แต่โอกาสที่จะเกิดขึ้นนั้นมีน้อยมาก ๆ เหมือนการค้นพบห่านที่มีสีดำ โดยมีอยู่ 3 เหตุการณ์ที่เป็นชนวนให้เกิด Ethereum ขึ้น: Black Swan 1: วิกฤตแฮมเบอร์เกอร์เมื่อปี 2008 ที่สถาบันการเงินในอเมริกาล้มลงเนื่องจากหนี้เสียจำนวนมาก จนรัฐบาลต้องออกมาอุ้มแต่นายแบงก์ก็ลอยนวลไปด้วยกำไรมหาศาล โดยที่เรามองไม่เห็นว่าพวกเขาทำอะไรกันอยู่ ไม่รู้ว่าเขาบริหารเงินของเราอย่างไร และเราไม่มีสิทธิ์เรียกร้องใด ๆ ทั้งสิ้น ทำให้ประชาชนจำนวนมากหมดศรัทธากับระบบการเงินแบบศูนย์กลาง Black Swan 2: Vitalik Buterin ผู้ร่วมก่อตั้ง Ethereum ผู้ชื่นชอบเล่น Warlock (Lvl.</description></item><item><title>Don’t use Laravel’s config() inside config files</title><link>https://unnawut.com/posts/2016-12-19-laravel-config/</link><pubDate>Mon, 19 Dec 2016 18:00:00 +0700</pubDate><guid>https://unnawut.com/posts/2016-12-19-laravel-config/</guid><description>Originally published at blog.maqe.com
a.k.a. Underlying OS behavior can impact your web application’s behavior.
Update: As of 2017–10–12, config file loading in Laravel 5.5 is now ordered by file names. See the pull request [5.5] Ensure config load order across multiple installations.
A code excerpt from Laravel’s Illuminate\Foundation\Bootstrap\LoadConfiguration Last week we were working on implementing a feature for a Laravel project running on load-balanced EC2 instances. The feature that we built required two configuration values which normally would reside happily within a file or two in the config/ folder.</description></item><item><title>ให้เงินทำงานด้วย Money Pattern</title><link>https://unnawut.com/posts/2016-12-19-code-with-money-pattern/</link><pubDate>Mon, 19 Dec 2016 12:00:00 +0700</pubDate><guid>https://unnawut.com/posts/2016-12-19-code-with-money-pattern/</guid><description>เผยแพร่ครั้งแรกที่ blog.maqe.com
&amp;ldquo;เอ้า ตังค์ทอน 100 บาท มากัน 3 คน … ฉีกแบงค์กันไปคนละส่วนแล้วกัน&amp;rdquo;
ประโยคนี้น่าจะถูกใช้เป็นมุกบนโต๊ะอาหารอยู่บ่อย ๆ แต่ถ้าเหตุการณ์นี้เกิดขึ้นในระบบที่เราต้องให้ความมั่นใจผู้ใช้งานได้ ว่าเงินทุกบาททุกสตางค์ถูกคำนวนมาอย่างถูกต้อง เที่ยงตรง ไม่มีการมุมมิบ เราจะยังขำกันได้อยู่หรือเปล่า?
ในยุคที่การให้เหรียญสลึง = แช่ง การคำนวนเศษในหลักสตางค์ก็คงเป็นเรื่องที่ไม่สำคัญนัก หากแต่ในระบบที่มีคนใช้เป็นหมื่นเป็นแสนคน มีการทำรายการนับครั้งไม่ถ้วนต่อวัน ปัญหาของเศษเสี้ยวสตางค์จะกลายเป็นปัญหาระดับร้อยล้านพันล้านไปในทันที ค่าที่ผิดไปเพียง 0.01 บาทจาก 1 แสนรายการต่อวัน คิดเป็นเงินกว่า 350,000 บาทต่อปี เงินจำนวนนี้ไปตกอยู่ที่ไหน เราสามารถปล่อยให้มันหายไปในอากาศได้หรือเปล่า?
ถ้าคำตอบคือจะยอมให้หายไปไม่ได้ … Money Pattern (หรือ Money Object, Money Value ฯลฯ) จึงเป็นหนึ่งใน Design Pattern ที่ควรพกติดตัวไว้ เพราะในสมัยนี้ คงระบบที่จะไม่ได้ยุ่งกับจำนวนเงินเลยน้อยลงเรื่อย ๆ ทุกวัน
และถึงแม้ว่าเราจะไม่มีโอกาสได้ทำงานกับจำนวนเงินเลย ปัญหานี้ก็เป็นตัวอย่างเตือนสติได้อย่างดี ว่าการทำงานกับระบบคอมพิวเตอร์และการเขียนลอจิคให้ครอบคลุมการใช้งานของมนุษย์นั้น มันไม่ได้ง่ายเหมือนจิ้มเครื่องคิดเลขบวกลบคูณหารทีเดียวจบเสมอไป
ปัญหาของการเขียนโค้ดกับจำนวนเงิน ปัญหาที่ 1: การแบ่งเงินเป็นกองๆ … มีเศษที่หายไป มีเงินอยู่ 10,000 บาท จะแบ่งฝากเข้าบัญชี 3 บัญชีเท่า ๆ กัน (บัญชีเงินลงทุน, บัญชีเงินเก็บไปเที่ยว, บัญชีเงินค่าขนม) จะต้องฝากบัญชีละเท่าไหร่?</description></item><item><title>Load Testing ด้วย Apache JMeter</title><link>https://unnawut.com/posts/2016-09-30-load-testing-with-jmeter/</link><pubDate>Fri, 30 Sep 2016 12:00:00 +0700</pubDate><guid>https://unnawut.com/posts/2016-09-30-load-testing-with-jmeter/</guid><description>เผยแพร่ครั้งแรกที่ blog.maqe.com
เมื่อช่วงต้นปีที่แล้ว เว็บไซต์ที่บริษัทดูแลอยู่เกิด user surge ขึ้นเป็นช่วงระยะเวลาสั้นๆ ประมาณ 2 สัปดาห์ ถึงแม้ว่าเหตุการณ์จะจบลงอย่างน่าพอใจ สิ่งที่เกิดขึ้นทำให้ทีมต้องกลับมานั่งคิดขยับขยาย infrastructure ที่มีอยู่พอสมควร
แต่ในระหว่างที่วางแผนการสเกลก็มีคำถามเกิดขึ้น เราจะรู้ได้อย่างไรว่าระบบที่เราสเกลออกด้วยจำนวน web server ที่มากขึ้นและ database server ที่ทรงพลังขึ้นจะรับโหลดได้มากขึ้นเท่าไหร่ และที่สำคัญคือเราจะต้องสเกลขึ้นเท่าไหร่จึงจะพอ?
ในบทความนี้จะไม่พูดถึงการคาดการณ์จำนวนผู้ใช้งานในอนาคต ซึ่งเป็นมุมมองฝั่ง business ที่เราไม่ได้ข้อมูลที่แน่นอนมาทำ load testing ในครั้งนั้น จุดประสงค์ของการ load testing ที่เกิดขึ้นจึงเป็นการวัดจำนวนผู้ใช้งานที่ระบบสามารถรองรับได้ด้วย configration ที่แตกต่างกัน เพื่อให้ทาง business สามารถพิจารณาได้ว่ามันเพียงพอสำหรับเขาไหม มีคำตอบให้ทีมสำหรับการสเกลที่อาจเกิดขึ้นในอนาคต และมีหลักฐานยืนยันว่าระบบสามารถรองรับการใช้งานในระดับที่กล่าวถึงได้จริง
คำนิยาม คำจำกัดความของ load testing, performance testing, stress testing ฯลฯ นั้นแตกต่างกันไปตามลักษณะการทำงานของแต่ละบริษัท แต่เพื่อความเข้าใจที่ตรงกัน ในบทความนี้จึงขอนิยามไว้ 2 คำคือ performance testing และ load testing ไว้ดังนี้
Performance testing
“… general testing performed to determine how a system performs in terms of responsiveness and stability under a particular workload.</description></item><item><title>Donations</title><link>https://unnawut.com/donations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://unnawut.com/donations/</guid><description>Social and Environmental Issues Recurring COTAP - 10 USD/month (~1 CO2-tonne/month) since Aug 2019 Software I rely on many of the quality software below to improve my life. Many of them helped me making a living for the past few years. The people behind these great products below generously release their full (or very close to full) featured software without strict obligations to pay.
Apart from my contributions to open source and social causes, these are direct monetary contributions that I have made so far towards those software projects.</description></item><item><title>Wishlist</title><link>https://unnawut.com/wishlist/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://unnawut.com/wishlist/</guid><description/></item></channel></rss>