Standard Post with Image

Optimizing Your Automated Fertigation System with PID Control

In modern agriculture, automated fertigation systems have become essential for precise water and nutrient delivery. Combining irrigation and fertilization into one streamlined process, fertigation saves time, reduces waste, and boosts crop yields. To ensure such a system operates efficiently, integrating a PID control system is a game-changer.

Read More
Standard Post with Image

High-Performance API Development for Durian Farming in Chanthaburi, Thailand: Choosing the Right Python Framework with MongoDB

Durian farming, particularly in Chanthaburi, Thailand, has seen rapid technological adoption to optimize yield and quality. By leveraging IoT sensors, real-time data analysis, and image processing, modern farms can now provide data-driven insights to enhance fruit quality and optimize harvest schedules.

Read More
Standard Post with Image

การรักษาความปลอดภัยให้แอปพลิเคชัน Django ด้วย HashiCorp Vault (hvac): แนวคิดและตัวอย่างการใช้งาน

เมื่อแอปพลิเคชันเว็บมีความซับซ้อนมากขึ้น ความต้องการในการรักษาความปลอดภัยข้อมูลที่สำคัญ เช่น ข้อมูลลูกค้า ข้อมูลการรับรอง และความลับของแอปพลิเคชันจึงมีความสำคัญมากขึ้น HashiCorp Vault เป็นเครื่องมือที่มีประสิทธิภาพสำหรับการจัดการความลับ การเข้ารหัสข้อมูลที่ละเอียดอ่อน และการสร้างข้อมูลรับรองแบบไดนามิก ในบทความนี้ เราจะสำรวจแนวคิดพื้นฐานของ HashiCorp Vault การใช้งานผ่านไคลเอนต์ Python hvac และวิธีการปกป้องข้อมูลลูกค้าในโมเดล Django

Read More
Standard Post with Image

Securing Django Applications with HashiCorp Vault (hvac): Concepts and Practical Examples

As the complexity of web applications increases, so does the need for robust security measures to protect sensitive data, credentials, and application secrets. HashiCorp Vault, commonly used with the hvac Python client, provides an effective solution for managing secrets, encrypting sensitive data, and dynamically generating credentials. When integrated with Django, Vault enhances security by preventing […]

Read More
Standard Post with Image

เราจะเขียน OCPP server อย่างไร

ตอนนี้กระแส EV กำลังมา เวลาเราไปตามปั๊มน้ำมันเราก็จะเห็นจุด charge ev กันใช่ไหมครับ เราเคยสงสัยไหมว่า จุด charge ติดต่อกับ server และ mobile app ของเราอย่างไร เค้าสื่อสารผ่าน OCPP protocol กัน เราลองมาทำความเข้าใจกันดีกว่า

Read More
Standard Post with Image

เราจะทำให้ program ที่มีขั้นตอนการทำงานที่ซับซ้อน และ ต้องแบ่งงานให้กับ programmer หลายๆ คนได้อย่างไร ?

หลายๆคน คงได้อ่านหนังสือเกี่ยว software engineering มาหลายๆ เล่ม  ก็จะมีข้อเสนอแนะหลายวิธี แต่วันนี้ผมจะมาพูดถึงการควบคุมลำดับการทำงานของ program ที่ซับซ้อน  ให้ง่ายขึ้นด้วยการสร้าง workflow engine system ขึ้นมาใช้เอง ลองกลับไปอ่านบทความก่อนหน้านี้  สร้าง business workflow process system ด้วย networkx.org

Read More
Standard Post with Image

สร้าง business workflow process system ด้วย networkx.org

ในทุกๆ business จะต้องประกอบด้วย workflow ( ขั้นตอนการทำงาน ) มากมาย ในหนึ่ง Workflow จะประกอบด้วย หลายๆ process   ยกตัวอย่างเช่น 

Read More
Standard Post with Image

วิธีการออกแบบเพื่อลดการซับซ้อนของ software

ควรออกแบบให้เป็น Layer และ แต่ละ Layer ควรกำหนดจุดประสงค์ให้ชัดเจน ภาพจากหนังสือ  https://www.amazon.com/Grokking-Simplicity-software-functional-thinking/dp/1617296201 จากภาพด้านบนเราควรจะกำหนดวัตถุประสงค์ของแต่ละ layer ให้ชัดเจน และ call graph ก็ไม่ควรจะยุ่งเหยิง หรือมีลูกศรที่ข้าม layer   และใน layer เดียวกันก็ไม่ควรจะมีที่เรียกกันเอง  ( ถ้า function นั้นๆ เรียก function ใน layer เดียวกัน function นั้นก็ต้องอยู่บน layer ที่สูงกว่า ) 

Read More
Standard Post with Image

Web Socket คืออะไร

Web socket คือ technology ที่ใช้สื่อสารระหว่าง web browser และ server  เป็นการสื่อสารแบบสองทาง ข้อดีของ web socket คือ program ในฝั่ง web browser ไม่ต้องเขียนในลักษณะของการเรียก function ในแบบ interval วนไปเรื่อยๆ แต่ใช้วิธีการ  Event listening  สรุปง่ายๆ คือ  ถ้าเราเขียน code ว่า เราสนใจใน event นี้ เมื่อ event นั้นๆ เกิดขึ้นมา code ที่เราผูกกับ event. นั้นก็จะนำ event data ไป process  

Read More
Standard Post with Image

เทคนิคที่ช่วยให้เขียน program ให้ดีขึ้นอย่างรวดเร็ว

ข้อแรกเราต้องเข้าใจปัญหาของระบบที่เราต้องการจะแก้ โดยเราจะต้องค้นหาว่าอะไรคือปัญหาหลักๆ  เมื่อเราค้นพบแล้ว เราก็ควรจะออกแบบโครงสร้างของระบบ และลองร่าง code ในระดับที่เพียงพอจะทดสอบแนวคิดของเราได้  เราอาจจะเขียนใส่กระดาษก็ได้

Read More