Reacting to Controversial Opinions of Software Engineers

Fireship2 minutes read

Object-oriented programming, criticized for complexity and alternatives, involves encapsulating data and logic in objects from classes, leading to issues like boilerplate code and mutable states, while simpler alternatives are overlooked. JavaScript developers often favor modules over classes, simplifying code and aiding in tree shaking, prompting consideration of procedural or functional approaches as more optimal solutions. Passion for coding in spare time is debated, with emphasis on coding for fun boosting skills, advocating for breaks, learning new skills, and balancing effort and ingenuity in programming.

Insights

  • Object-oriented programming (OOP) is criticized for complexity and alternatives by Edgar Dijkstra, with concerns about boilerplate code and mutable states leading to testing and refactoring challenges.
  • In JavaScript, classes are often avoided in favor of simpler modules, highlighting the debate between OOP and procedural/functional approaches, emphasizing the importance of balancing effort and ingenuity in programming.

Get key ideas from YouTube videos. It’s free

Recent questions

  • What are the criticisms of object-oriented programming?

    Complexity, alternatives, and criticism by developers.

  • How does object-oriented programming work?

    Encapsulating data and logic in objects created from classes.

  • Why are classes often avoided in JavaScript?

    To simplify code and aid in tree shaking.

  • Is object-oriented programming always the best solution?

    Not always, prompting consideration of procedural or functional approaches.

  • What is the importance of balancing effort and ingenuity in programming?

    Advocating breaks and learning new skills for efficient solutions.

Related videos

Summary

00:00

Critique of Object-Oriented Programming and Coding Passion

  • Object-oriented programming is criticized by developers, including Edgar Dijkstra, for being complex and offering alternatives to correct programs.
  • OOP, existing since the 1960s, involves encapsulating data and logic in objects created from classes, allowing for inheritance and design patterns like singleton and dependency injection.
  • OOP languages are faulted for requiring more boilerplate code, leading to mutable states that are hard to test and refactor, with simpler alternatives often overlooked.
  • In JavaScript, classes are often avoided in favor of modules exporting functions and plain objects, simplifying code and aiding in tree shaking to eliminate dead code.
  • While OOP can be intuitive when done correctly, it may not always be the optimal solution, prompting consideration of procedural or functional approaches.
  • Passion for coding in one's spare time is debated, with the belief that those who code for fun excel, although exceptions exist, emphasizing the importance of soft skills in programming.
  • Being clever over working hard is advocated, suggesting breaks and learning new skills to find more efficient solutions, promoting a balance between effort and ingenuity in programming.
Channel avatarChannel avatarChannel avatarChannel avatarChannel avatar

Try it yourself — It’s free.