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 )
Related Posts
- Understanding Wazuh by Exploring the Open Source Projects Behind It
- How to Integrate App Authentication with an OCPP Central System
- Beginner’s Guide: How EV Charging Apps Communicate, Track Charging, and Calculate Costs
- Building an OCPP 1.6 Central System with Flask async, WebSockets, and MongoDB
- How AI Supercharges Accounting and Inventory in Odoo (with Dev Insights)
- Building a Fullstack E-commerce System with JavaScript
- Building Agentic AI with Python, Langchain, and Ollama for eCommerce & Factory Automation
- Diagnosing the Root Cause of P0420 with Python, OBD-II, and Live Sensor Data
- How to Apply The Mom Test to Validate Your Startup Idea the Right Way
- When to Choose Rasa vs Langchain for Building Chatbots
- Introducing OCR Document Manager: Extract Text from Documents with Ease
- Testing an AI Tool That Finds Winning Products Before They Trend — Interested?
- Your Website Is Losing Leads After Hours — Here’s the Fix
- How Agentic AI is Revolutionizing Smart Farming — And Why Your Farm Needs It Now
- How to Apply RAG Chatbot with LangChain + Ollama
- Automating EXFO Instruments with SCPI: A Practical Guide
- Design Patterns That Help Tame Legacy Code (With Python Examples)
- How to Safely Add New Features to Legacy Code — A Developer’s Guide
- Modernizing Legacy Software — Without Breaking Everything
- How OpenSearch Works — Architecture, Internals & Real-Time Search Explained
Our Products
Related Posts
- Understanding Wazuh by Exploring the Open Source Projects Behind It
- How to Integrate App Authentication with an OCPP Central System
- Beginner’s Guide: How EV Charging Apps Communicate, Track Charging, and Calculate Costs
- Building an OCPP 1.6 Central System with Flask async, WebSockets, and MongoDB
- How AI Supercharges Accounting and Inventory in Odoo (with Dev Insights)
- Building a Fullstack E-commerce System with JavaScript
- Building Agentic AI with Python, Langchain, and Ollama for eCommerce & Factory Automation
- Diagnosing the Root Cause of P0420 with Python, OBD-II, and Live Sensor Data
- How to Apply The Mom Test to Validate Your Startup Idea the Right Way
- When to Choose Rasa vs Langchain for Building Chatbots
- Introducing OCR Document Manager: Extract Text from Documents with Ease
- Testing an AI Tool That Finds Winning Products Before They Trend — Interested?
- Your Website Is Losing Leads After Hours — Here’s the Fix
- How Agentic AI is Revolutionizing Smart Farming — And Why Your Farm Needs It Now
- How to Apply RAG Chatbot with LangChain + Ollama
- Automating EXFO Instruments with SCPI: A Practical Guide
- Design Patterns That Help Tame Legacy Code (With Python Examples)
- How to Safely Add New Features to Legacy Code — A Developer’s Guide
- Modernizing Legacy Software — Without Breaking Everything
- How OpenSearch Works — Architecture, Internals & Real-Time Search Explained