5 ข้อ ที่เข้าใจผิดในการเขียน code

1. ต้องเป็นคนความจำดี
อันนี้ไม่จริงเลย จริงอยู่ความจำเป็นสิ่งสำคัญ แต่ความเข้าใจสำคัญกว่า และจากที่เขียน code เลี้ยงชีพมาหลายปี หลายๆ ครั้งก็ copy code มาจากตัวอย่าง แล้วเอามาแก้ไข แต่ผมไม่ได้หมายถึงว่า copy แนวคิดของ code ตัวอย่างนะ เราต้องทำการออกแบบ program ของเราเสียก่อน ว่ามันจะทำอย่างไร ด้วยวิธีการอย่างไร
2. ต้องเป็นคนเก่งเลขมากๆหรือฉลาดมากๆ
คือเลขจะใช้ต่อเมื่อเราต้องการ แก้ปัญหาที่ต้องใช้สูตรคณิตศาสตร์ หรือปัญหาที่เกี่ยวกับวิทยาศาสตร์ที่มีสูตรเช่น ฟิสิกซ์ เคมี เป็นต้น แต่โดยส่วนมากแล้ว program ที่เราเขียนมักจะใช้การออกแบบขั้นตอนการทำงานเสียมากกว่า และจะคำนึงถึงหน้าตา ( Graphic User Interface ) ของ program ที่ใช้งานง่าย เราไม่จำเป็นต้องฉลาดแต่แรก แต่เราสามารถเรียนรู้ได้ จากการสังเกต และประสบการณ์ ในทุกๆ วันที่เราลงมือเขียน code
3. ต้องมี computer แรงๆและแพงๆ
ข้อนี้ไม่จำเป็นเลย แต่ขอให้เลือก computer ที่มีหน้าจอชัดเจน รักษาสายตา ส่วนเรื่องความแรงคิดว่า แค่อยู่ในระดับค่อนข้างดี ที่มีขายอยู่ในตลาด ไม่จำเป็นต้องมีการ์ดจอแรงๆ ( ยกเว้นว่าเราจะเขียนเกี่ยวกับ graphic หนักๆ ) ส่วนเรื่อง RAM ถ้ามีเยอะๆก็จะดี เพราะช่วยให้ run program ได้เร็ว จะได้ไม่ขาดช่วง ทำให้เราเสียจังหวะ แต่ที่สำคัญควรทดลองเล่นก่อนที่จะซื้อ หรืออ่าน review จากหลายๆ ที่
4. ไม่จำเป็นต้องรู้หลายภาษาหรือยึดติดว่าภาษานั้นๆจะดีที่สุด
ไม่มีภาษาไหนที่ดีที่สุด ขึ้นอยู่กับว่ามันเหมาะสมกับงานของเราหรือไม่ และความถนัดของเราด้วย แต่ข้อดีที่ได้จากการเขียน code ได้หลายภาษาคือ เราจะได้เรียนรู้แนวคิดที่แตกต่างๆ กันไปในแต่ละภาษา ซึ่งจะมีรายละเอียดเล็กๆ น้อย ที่ช่วยให้เป็นเครื่องมือทางความคิดของเราเพิ่มขึ้น
5. ประสิทธิภาพของภาษามีผลอย่างมากต่อความเร็วของ program
จริงอยู่ถ้าเรานำ program ที่มีการทำงานเหมือนกัน แต่เขียนด้วยภาษาที่แตกต่างกันไป แล้วนำมาวัดเวลาในการทำงานของ program มันจะไม่เท่ากัน แต่มันจะแตกต่างกันในระดับ milli sec ซึ่งน้อยมาก ส่วนมากประสิทธิภาพของ program ที่ดี จะมาจาก กระบวนการแก้ปัญหา ( algorithm ) ที่แตกต่างกัน การออกแบบโครงสร้างข้อมูล ( data structure ) ที่เหมาะสม และการเรียกใช้ หรือ จัดเก็บข้อมูล ( data retrieval / store )
Get in Touch with us
Related Posts
- 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
- 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