จด How to Become a Better Programmer

Nantipat
3 min readJun 27, 2022

จะศึกษาอะไรให้ลองค้น History ว่ามีความเป็นมาอย่างไร

การทำ System Design

  • Scaling → Vertical (Ram, CPU, etc), Horizontal
  • Load Balancer → Hight availability, เก็บ state ใน Browser หรือ Database

พอมี server หลายตัวมี Database ตัวเดียวจะเกิด Store Session (Wrong approach)

วิธีแก้คือแยก server Database ออกมา (Stateless Web Servers)

Stateless — Application ไม่ถือ state ไว้เอง

  • Database
  • Single Point OF Failure → ถ้าจุดนี้ตายคือระบบตาย
  • Data Replication → สำรองเพื่อกำจัด Single Point OF Failure
  • Database Sharding → Master DB full, partitions data across multiple servers
  • Database Storage
  • DNS
  • Content Delivery Network → static content
  • Cache
  • Queue → รอ request ที่เข้ามา,ไม่ block,รอบรับได้เยอะขึ้น
  • Data centor → ป้องกันปัญหา server ดับพร้อมกัน

Technical Guidelines

API

  • RESTFul API → HTTP
  • GraphQL → แก้ปัญหา Over fetching Problem, Multiples round-trips Problem ของ RESTFul API แต่ทำ cache ยาก

Clean Code & Software Design Pattern

Testing

  • Unit Test → ทดสอบ function เดียวเล็กๆ
  • Integration Test → ทดสอบการรวมหลายๆ unit
  • End-to-End Test → จำลองสถานการณ์จริง

Version Control

Code Reviews → Pull request

Software Delivery → CI/CD

  • Continuous Integration → deploy from my branch to the main code, automation test
  • Continuous Deployment → deployed to production automatically

Common Mistake

  • Copy/Paste
  • Ignore clean code
  • ไม่ให้ความสำคัญของการ test
  • Overengineer
  • Overpromise & Underdeliver → อย่าลืมเพิ่มเวลาเผื่อไว้ 20%

Non-Technical Guideline

Business Mindset → มองตัวเองเป็นสินค้าตัวนึง Service

People skill

Communication → เล่าภาพใหญ่มาภาพเล็ก

Marking Toght Decision → One-way door, Two-way

Product Mindset → focus ลูกค้ามากกว่าเทค

Career Path → เก็บสกิลให้ครบจำลองก่อนจะเป็นจริงๆ

Excellent Learner → เรียนหนึ่งภาษาให้ท่องแท้ แกะ priciple ให้แตก

SMART

  • Specific → เฉพาะเจาะจง
  • Measurable → วัดผล
  • Attainable → เป็นไปได้ไหม
  • Relevant → เกี่ยวของกับสิ่งที่เราสำเร็จ
  • Time-bond → ตั้งเวลาในการทำให้สำเร็จ

Book

--

--