86. Lightning Talks

Topics covered
Popular Clips
Episode Highlights
Design Choices
Database design choices significantly impact performance and maintainability. Joe Zack and Alan Underwood discuss the challenges of treating stored procedures like functions in other programming languages, which can lead to inefficiencies. Alan highlights the importance of thinking in sets rather than objects when working with databases, as this approach optimizes performance 1. Joe questions whether using stored procedures that call other stored procedures is a code smell, as it complicates working with SQL Server results 2.
Good practices in your OO code make for horrible SQL, and good SQL practices make for horrible OO code.
--- Joe Zack
Balancing maintainability and performance often requires duplicating code, which contradicts traditional clean code principles 2.
Anti-Patterns
SQL anti-patterns often arise from treating SQL like any other programming language. Joe and Alan discuss the pitfalls of this approach, emphasizing the need to recognize when SQL is being misused as an application language 3. Joe points out that while duplicating code is generally discouraged, it can be necessary for performance in SQL, as true duplication differs from accidental duplication 4.
You can only scale SQL Server so much before you can't buy any more hardware.
--- Joe Zack
Alan notes that many applications won't face scaling issues, but when data grows unexpectedly, revisiting modularity for performance becomes crucial 4.
Logic Placement
The placement of business logic in databases versus application layers is a contentious topic. Alan and Joe debate whether logic should reside in the database or be handled by the application, with Joe noting that the decision depends on the type of logic involved 5. Alan argues that placing logic in the database can make it the central nervous system of an application, which may not be ideal for complex ecosystems with multiple data storage mechanisms.
It's not just the heart at that point. It's your heart and your brain.
--- Alan Underwood
This approach can complicate scaling and integration with other systems, suggesting that a balanced strategy is necessary for optimal performance and flexibility.
Related Episodes
87. Thunder Talks
Answers 383 questions

Thunder Talks
Answers 383 questionsHow to be a Programmer
Answers 383 questions
Tackling Tough Developer Questions
Answers 383 questionsClean Code - Formatting Matters
Answers 383 questions

Should You Speak at a Conference?
Answers 383 questionsHow to be an Intermediate Programmer
Answers 383 questionsJavascript Promises and Beyond
Answers 383 questionsHow to be an Advanced Programmer
Answers 383 questions95. Data Structures – Arrays and Array-ish
Answers 383 questionsClean Code - How to Write Amazing Functions
Answers 383 questionsSilverlighting through your College Enumeration
Answers 383 questionsThe Pragmatic Programmer - How to Generate Code
Answers 383 questions

Clean Code - Comments Are Lies
Answers 383 questions

Clean Code - How to Write Classes the Right Way
Answers 383 questions













