ข้ามไปยังเนื้อหา

Refactoring — From Zero to Hero

คอร์ส refactoring ตั้งแต่เริ่มต้นจนถึงขั้นสูง จบในตัว — ปรับโครงสร้างภายในของ code โดยไม่เปลี่ยน behavior ภายนอก คุณจะได้เรียนวินัยการทำทีละขั้นเล็ก ๆ โดยมี test คุ้มกัน มองออกว่า code smell อยู่ตรงไหน และใช้แคตตาล็อก refactoring ที่มี before→after ครบทั้ง TypeScript, Python, Go และ Rust

Intro & Principles

refactoring คืออะไร, ทำไมและเมื่อไร, การทำทีละขั้นเล็ก ๆ โดยมี test และการอ่าน code smell เริ่ม →

Composing Methods

Extract & Inline Function, Extract Variable, Replace Temp with Query, Split Phase ประกอบ →

Moving Features

Move Function & Field, Extract & Inline Class, Hide Delegate / Remove Middle Man ย้าย →

Simplifying Conditionals

Decompose & Consolidate, Guard Clauses, Replace Conditional with Polymorphism, Null Object ทำให้ชัด →

Simplifying APIs

Rename, Parameterize, Introduce Parameter Object, Remove Flag Argument, Factory ปรับ →

Before → After สี่ภาษา

ทุก refactoring วาง code ที่ยุ่งไว้คู่กับรูปแบบที่ดีกว่า ครบทั้ง TypeScript, Python, Go และ Rust ผ่านแท็บที่ sync กัน เลือกภาษาครั้งเดียวจบ

ขับเคลื่อนด้วย smell

ทุก refactoring เริ่มจาก code smell ที่ต้องแก้ คุณจึงรู้ว่าควรหยิบมาใช้ตอนไหน

ขั้นเล็ก ๆ ที่ปลอดภัย

Mechanics ซอยการเปลี่ยนแปลงเป็นขั้นเล็ก ๆ ที่รักษา behavior ไว้ แล้วรัน test คั่นทุกขั้น — refactor ได้โดยไม่ต้องกลัว

สองภาษา + read mode

มีทั้งอังกฤษและไทย แบบทดสอบที่จำความคืบหน้าให้ และโหมดอ่านแบบไร้สิ่งรบกวน