เราจะเข้าใจ code ของ project ที่มีความซับซ้อนได้อย่างไร ?
ในสมัยที่ผมเขียน code แรกๆ ผมเข้าใจว่าผมสามารถเข้าใจการทำงานของ program ทุกอย่างผ่านการอ่าน code เพียงอย่างเดียว ผมมีหนังสือหลายเล่มที่อยากแนะนำให้ programmer ลองอ่านดูนะครับ
กลับมาเข้าเรื่องของเราดีกว่า สิ่งที่ผมอยากให้ผู้อ่านลองนำไปใช้ดูนะครับ
- ทำความเข้าใจ program นั้นเสียก่อน ผ่านการใช้งาน program นั้น
- ทำความเข้าใจปัญหาหลัก ที่ program นั้นถูกสร้างขึ้นเพื่อแก้ไขปัญหานั้น โดยพยายามทำความเข้าใจในรูปแบบของคำพูดคนทั่วไป ที่ไม่ใช่ coding
- ทำความเข้าใจ config file, Makefile ของ project ว่ามีโครงสร้างอย่างไร
- ศึกษา directory structure ของ project เราจะได้เห็นความสัมพันธ์ของแต่ละ module
- อย่าหวังที่จะเข้าใจ program โดยใช้แต่ debugger เพียงอย่างเดียว การที่ใช้ debugger มากเกินไป จะทำให้เราใช้ความคิดวิเคราะห์น้อยลง
- แทรก code ของเราเข้าไปใน project code เพื่อทดสอบความเข้าใจของเรา
- ใช้โหมดความคิดแบบนักสืบ และการอ่าน code ของเราจะสนุกสนานมากขึ้น
Get in Touch with us
Related Posts
- 下一个前沿:面向富裕人群的数字私人俱乐部
- The Next Frontier: A Digital Private Club for the Affluent
- Thinking Better with Code: Using Mathematical Shortcuts to Master Large Codebases
- Building the Macrohard of Today: AI Agents Platform for Enterprises
- Build Vue.js Apps Smarter with Aider + IDE Integration
- Yo Dev! Here’s How I Use AI Tools Like Codex CLI and Aider to Speed Up My Coding
- Working With AI in Coding the Right Way
- How to Select the Right LLM Model: Instruct, MLX, 8-bit, and Embedding Models
- How to Use Local LLM Models in Daily Work
- How to Use Embedding Models with LLMs for Smarter AI Applications
- Smart Vision System for Continuous Material Defect Detection
- Building a Real-Time Defect Detector with Line-Scan + ML (Reusable Playbook)
- How to Read Source Code: Frappe Framework Sample
- Interface-Oriented Design: The Foundation of Clean Architecture
- Understanding Anti-Drone Systems: Architecture, Hardware, and Software
- RTOS vs Linux in Drone Systems: Modern Design, Security, and Rust for Next-Gen Drones
- Why Does Spring Use So Many Annotations? Java vs. Python Web Development Explained
- From Django to Spring Boot: A Practical, Visual Guide for Web Developers
- How to Build Large, Maintainable Python Systems with Clean Architecture: Concepts & Real-World Examples
- Why Test-Driven Development Makes Better Business Sense