เราจะเข้าใจ 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
- 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
- Continuous Delivery for Django on DigitalOcean with GitHub Actions & Docker
- Build a Local Product Recommendation System with LangChain, Ollama, and Open-Source Embeddings
- 2025 Guide: Comparing the Top Mobile App Frameworks (Flutter, React Native, Expo, Ionic, and More)
- Understanding `np.meshgrid()` in NumPy: Why It’s Needed and What Happens When You Swap It
- How to Use PyMeasure for Automated Instrument Control and Lab Experiments
- Supercharge Your Chatbot: Custom API Integration Services for Your Business
- How to Guess an Equation Without Math: Exploring Cat vs. Bird Populations
- How to Build an AI-Resistant Project: Ideas That Thrive on Human Interaction
- Build Your Own Cybersecurity Lab with GNS3 + Wazuh + Docker: Train, Detect, and Defend in One Platform
- How to Simulate and Train with Network Devices Using GNS3
- What Is an LMS? And Why You Should Pay Attention to Frappe LMS
- Agentic AI in Factories: Smarter, Faster, and More Autonomous Operations