Published Sep 18, 2018

89. Does Big O Matter?

    Dive into the world of software development where Alan Underwood and Joe Zack unravel the significance of Big O notation, debate the optimal development environments, and stress the importance of math, clarity, and performance in coding practices. This episode offers key insights into algorithm analysis and programming decision-making, blending theory with real-world applications.
    Episode Highlights
    Coding Blocks logo

    Popular Clips

    Episode Highlights

    • Code Clarity

      Clear code intent and proper variable naming are crucial for code readability and maintainability. Joe Zack emphasizes naming internal variables descriptively, such as 'bad customer count' instead of just 'count', to make the code's purpose clear 1. He also discusses the practice of creating variables within methods to limit their scope and enhance clarity 2. Alan Underwood adds that this approach helps keep the code readable and maintainable without exposing unnecessary details to other parts of the program 2.

      I do feel a little bit better though because definitely with some of the comments that you made, Joe was kind of in the same thinking that where I've done this where, although I wouldn't, I wasn't thinking of necessarily anonymous functions, but I have, I don't know if I would call it a habit, but I have definitely found myself more in recent year or two using functions I'll create as a variable within a method.

      --- Joe Zack

      This method ensures that the code reads like a story, making it easier for developers to follow and understand the logic 2.

         

      Code Commenting

      The necessity and effectiveness of code comments are often debated among developers. Joe Zack highlights the dilemma of commented-out code, which can lead to confusion about whether the code should be deleted or retained for future use 3. He argues that comments can sometimes be a crutch for bad code, allowing developers to excuse poor practices by explaining them away in comments 4. Alan Underwood agrees, noting that outdated comments can mislead developers after code refactoring 4.

      Here's my reason for the overrated is because it's too easy to rely on. Hey, I'll just write bad code and then I'll, I'll explain it with a comment. And I've covered my butt. Right?

      --- Joe Zack

      Both agree that making code more expressive is a better approach than relying on comments 4.

         

      Performance Bottlenecks

      Identifying and solving performance bottlenecks is essential for efficient software operation. Alan Underwood explains that bottlenecks often occur in the data tier or UI, and issues may only become apparent as the system scales 5. He shares an example of an e-commerce platform that faced performance issues due to inefficient data structures as the number of products increased 5. Joe Zack adds that while performance considerations are crucial, they should be addressed at the right time, often revisiting them as the system grows 6.

      I think the standard devices basically use a profiler and try to figure out where your, your biggest bottlenecks are in your most common processes.

      --- Joe Zack

      Profiling tools can help identify the most CPU-intensive calls, allowing developers to optimize the most critical parts of their code 6.

    Related Episodes