Episode 542: Brendan Callum on Contract-Driven APIs

Topics covered
Popular Clips
Episode Highlights
Approach Overview
, engineering manager for Pinterest's developer platform team, introduces the spec first approach to API development. Unlike the API first strategy, which is a product philosophy, spec first is a tactical method ensuring APIs align with product goals and maintain high quality. This approach organizes development processes to deliver consistent and reliable APIs, crucial for scaling products effectively 1.
Spec first is one way to organize the process of development to ensure those kinds of outcomes.
---
This method emphasizes the importance of aligning API development with product objectives from the outset.
Design Consistency
The spec first approach significantly enhances API design consistency by focusing on the client's experience before backend logic. explains that starting with the API's consumer perspective ensures standardization and predictability across endpoints 2. This method addresses past inconsistencies where different endpoints had varying design patterns, causing confusion among developers.
What they're really asking for was consistency, predictability, and not having lots of undocumented changes that cause them to thrash and break their apps.
---
By prioritizing the spec, Pinterest has achieved a more flexible yet consistent API design, accommodating new creative formats and analytics frameworks 3.
Implementation Challenges
Implementing the spec first approach presented challenges, particularly in maintaining consistency across diverse API endpoints. highlights the tension between designing for specific use cases and ensuring overall API uniformity 4. A rotating review group was established to address these challenges, ensuring partner-centric consistency reviews.
There's definitely a healthy tension between maximum consistency across the entire API surface versus designing like a single endpoint for a very specific use case.
---
Additionally, migrating partners to new API versions required careful planning to maintain feature parity and ease the transition 5.
Development Insights
The launch of Pinterest's V5 API, using the spec first approach, has provided valuable insights both internally and externally. notes that the API's predictability and ease of use have significantly increased developer engagement and daily active usage 6. Internally, the adoption of tools like IDE plugins and linters has streamlined the development process, embedding best practices directly into the workflow.
Bringing the best practices and the guidance into real, concrete, actionable rules for developers has been huge.
---
These tools have facilitated learning and ensured adherence to standards, reducing the need for extensive code reviews.
Related Episodes


Episode 51: Design By Contract
Answers 383 questions

Episode 143: API Design with Jim des Rivieres
Answers 383 questions

Episode 17: Feedback and Roadmap
Answers 383 questions

Episode 47: Interview Grady Booch
Answers 383 questions

Episode 55: Refactoring Pt. 2
Answers 383 questions

SE-Radio Episode 313: Conor Delanbanque on Hiring and Retaining DevOps
Answers 383 questions

Episode 36: Interview Guy Steele
Answers 383 questions

Episode 180: Leading Agile Developers with Jurgen Appelo
Answers 383 questions
Episode 103: 10 years of Agile Experiences
Answers 383 questions
Episode 172: Feature-Oriented Software Development with Sven Apel – Pt 1
Answers 383 questions

Episode 441 Shipping Software - With Bugs
Answers 383 questions

Episode 213: James Lewis on Microservices
Answers 383 questions

Episode 540: Joe Nash on DevRel
Answers 383 questionsEpisode 147: Software Development Manager
Answers 383 questions

Episode 31: Agile Documentation
Answers 383 questions













