[VDBUH2024] - Victor Rentea - Code Smells - Hall of Fame

Join Victor Rentea at VDBUH2024 as he explores the concept of code smells, their implications on code quality, and how functional programming can help eliminate them, making code more maintainable and understandable.

Key takeaways
  • Code smells are bad smells in your code that make it hard to maintain and understand.
  • Many code smells can be detected by reviewing the code for certain patterns, such as long methods, complex conditionals, and duplicate code.
  • Refactoring is the process of restructuring your code to make it more maintainable and understandable.
  • Functional programming is a paradigm that emphasizes the use of pure functions, immutability, and the avoidance of side effects.
  • Pure functions are functions that always return the same output given the same inputs and have no side effects.
  • Immutable data structures are data structures that cannot be changed once they are created.
  • Avoid side effects by not changing state and not returning different values.
  • Use functional programming concepts, such as map, filter, and reduce, to transform data.
  • Code should be simple, clean, and easy to understand.
  • Avoid code smells, such as long methods, complex conditionals, and duplicate code.
  • Refactor your code regularly to keep it maintainable and understandable.
  • Code smells can make it hard to find bugs and debug code.
  • Functional programming can make it easier to reason about your code and ensure that it is correct.
  • Use tests to ensure that your code works correctly.
  • Keep your code organized and easy to understand by using a consistent coding style and breaking up complex logic into smaller functions.
  • Don’t be afraid to refactor your code if it is not maintainable or understandable.