What are the programming mistakes most inexperienced programmers make?

TL;DR

Answer 1

  • Deploy experimental feature on Friday, it crashes the whole system
    • Never put yourself in a position to make mistake
      • TDD
    • Not a good idea to deploy big stuff on Friday
    • Think about the risk before deploy
    • Confirm after deploy asap
    • Don’t be afraid to move fast and break things
      • Mistake make you grow

Short summary

We did everything he mentioned besides TDD, just keep it as a reminder.

Answer 2

  • Early optimization is bad
    • Lower readability
  • Readablility > Performance (in most cases)
    • only tune performance on bottleneck
    • compiler is smart enough to optimize
    • Note: firmware have performance > readability

Short summary

I argee the points. Premature optimization is bad, but sometime it is hard to determine what is premature optimization. We should have Readablility > Performance unless we are doing very low level stuff.

Answer 3

  • Ask for code review, read code of great engineer

Answer 4

  • Abuse OOP, don’t forget single responsibility
  • over-complicated
  • over-simplifying
  • extreme failure test
    • shutdown and turn on the database
    • flush all the cache

Answer 5

  • Reinvent the wheel
  • Code before think
  • Use the wrong tool, simply because it is popular

Answer 6

  • Infatuated with the process of building the product
    • Get things done, engineer are solving problems
  • Ingore code written by others

Answer 7

  • Someone make his AWS key public…
    • Luckily, Amazon recover the cost

Summary

  • Read others code to learn
  • Study TDD
  • Focus on problem solving
  • Code before think
  • Think about risk before deploy

Reference: What are the programming mistakes most inexperienced programmers make?.