SlideShare a Scribd company logo
API Design
&
Junior ➪ Senior
Christopher Cotton @_cotton for @NashSoftware

2012 Nov 29, christophercotton.com
The Past

✤   20+ years Programming

✤   Been QA Tester, Junior Dev, Senior Dev, Technical Lead, Project Lead,
    Architect, Senior Member of Technical Staff 3 (What?!), CTO, Founder,
    Consultant and lots of random other jobs

✤   javax.mail    http://www.google.com/#q=javax.mail+cotton
The Now

✤   iOS, Android, Ruby on Rails

✤   @NashGameDev

✤   @SpacewardHo

✤   http://handstand.io

✤   Teach Kids Programming (YSI) http://www.fssd.org/index.php?
    option=com_content&task=view&id=110&Itemid=207
My Version, Not “The Truth”
Date
API stands for?
This does what?



  User.find_or_create_by_name("Bob")
API Design & Moving from Junior to Senior Developer
API


✤   Contract - documented, agreement, cause/effect

✤   Interface - one service to another

✤   GEM, Library, TCP, HTTP, etc.

✤   Systems Integration
Lonely App
Date
API Here, API There, Everywhere
Date
Version 2010/12/31
       Current Architecture                                                                                                          All rights reserved
                                                                                                                                          Handstand


                                                        Scraper    ContentDB              Packager             FileStorage




                                                                                                           Content Server

               Blogs/Websites                                                       Article List


                                                                                             Article Package




                                          Market Task                      Device App
           Android Market                                                                                                       Google
                                                                                                        Log                  Analytics Task
                                                                                        Ad List
                                                                  Config                  Ads


                                 Builder
            Amazon
                                Builder            Amazon SQS
              S3                                                          App.Handstand




                                                                     Customer




Internal Systems
Date
API - How to Consume
Date
How to use? What would you do?
API Design & Moving from Junior to Senior Developer
API Design & Moving from Junior to Senior Developer
API Design & Moving from Junior to Senior Developer
API Design & Moving from Junior to Senior Developer
API Design & Moving from Junior to Senior Developer
API Design & Moving from Junior to Senior Developer
API - How to Design
Date
Lots of Other Resources



✤   How to design RESTful APIs

✤   CRUD

✤   HTTP API
What is the point?
Who will use it?


✤   Dell Digital Delivery - 10 million machines, more each year to
    download software

✤   Cyberdog - other developers to implement new components

✤   JavaSoft javax.mail - Developers implementing Services, or sending
    Email

✤   Handstand - devices retrieving travel magazine
Document, Document, Document
Date
Why Document?


✤   Another programmer will need to know how it works, and trial and
    error sucks

✤   Test Your API, write a client from your own docs

✤   Keeps your code honest

✤   Becomes a real API when a client is written by someone other than
    you from your docs
API Design & Moving from Junior to Senior Developer
Find & Reuse Good APIs



✤   Don’t reinvent the wheel

✤   Find another similar, and expand or convert

✤   Learn from bad APIs
API Design & Moving from Junior to Senior Developer
Key Aspects


✤   Versioned

✤   Errors - was the request successful? invalid data? server blew up?

✤   Consistent to itself - delete_book, friend_delete

✤   Iteration

✤   Design with a partner or isolation, not large groups
Iteration


✤   High Level APIs

✤   Data Model, Design Objects and Connections

✤   Keep asking, what other actions need to be done? What other data?

✤   Walk through the scenarios

✤   retrieve library, log in, add book, delete book, post comment
API Design & Moving from Junior to Senior Developer
API Design & Moving from Junior to Senior Developer
Practice, practice, practice
Date
Q & A, Part One
Date
Junior   ➪   Senior


Date
Characteristics of Bad Junior
(or bad Senior)


✤   Worried about how you look, or what you say

✤   Focused on small parts, misses big picture

✤   Makes changes without understanding repercussions

✤   Not my part
Good Senior Developer
(or Good Junior Developer)
✤   Says, “I don’t know”

✤   Takes responsibility

✤   Continually Learning

✤   Will “Take one for the team”

✤   Given Any Problem, Can Invent a solution

✤   Can learn needed skills

✤   Goes beyond the basics
Basic Mistakes
Separate Concerns of Code


✤   Putting code unrelated into one group/class

✤   Networking code in the DB code

✤   UI Controller Code, with Table Cell Display Code

✤   Too many lines!

✤   “Wasn’t sure where else to put it” Ask!
Cut & Paste Solutions



✤   Found something on Stack Overflow, paste it in!

✤   The Interweb is not always correct

✤   Take the time to understand what it does, and why
Hard Coded Values




✤   Just don’t do it. Use config, use Class definitions, or Statics
Reinvention, Bad idea



✤   Calendar formatter

✤   Network Library

✤   Search, or ask. Know your domain
Warnings, Errors


✤   Fix warning messages, they are usually there for a reason

✤   If something fails, understand WHY it failed. Interested in making
    sure it doesn’t happen again

✤   Know where to fix it, document your changes

✤   Example: Cucumber test with TEXTAREA gave an extra ‘r’
Be sure to test



✤   “I’m sure it must work in all those cases”

✤   Take the time to think about your code
Too Focused on Small Parts



✤   Focus on the most important parts. Don’t know? Ask!

✤   iOS app, focused on getting a particular toolbar exact to the
    specifications, but those specifications would change

✤   Optimizing before recording data, profiling
How will this change the app?



✤   DB code, using “select statements” and adding in specific fields

✤   Made it work in the short term, impossible to manage in the long
    term

✤   Change one class, but not really understand how it is used elsewhere
How to Improve
Date
Mentoring
Date
Ask for Feedback, Code Reviews
Date
Read/Learn
Date
Build Tools, APIs, Libraries
Don’t do the same thing over and over

Date
Enjoy the process
Date
What is your.... Q & A, Part Deux
Date

More Related Content

PDF
Vegetals 1 (català)
PPTX
Blogging a-way-along-the-normandy-coast
PPTX
Presentación heavy
KEY
Free graphics, by Christopher Cotton
PDF
Make Your Own Tools
PPTX
Evaluation question 2 (2)
PPTX
Tech options by Paul Stenis
ZIP
Distributed-ness: Distributed computing & the clouds
Vegetals 1 (català)
Blogging a-way-along-the-normandy-coast
Presentación heavy
Free graphics, by Christopher Cotton
Make Your Own Tools
Evaluation question 2 (2)
Tech options by Paul Stenis
Distributed-ness: Distributed computing & the clouds

Similar to API Design & Moving from Junior to Senior Developer (20)

DOCX
Kunal bhatia resume mass
PDF
System design for Web Application
PDF
Python Software Engineer, AI at Upstaff
PDF
Building Bridges: Merging RPA Processes, UiPath Apps, and Data Service to bu...
PPTX
MongoDB Schema Design by Examples
PDF
Class 6: Introduction to web technology entrepreneurship
PPTX
CouchDB
PDF
Google DevFest 2012 Presentation
PDF
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
PDF
Google Dev Fest Presentation
PPTX
Working Software Over Comprehensive Documentation
PPT
The 90-Day Startup with Google AppEngine for Java
PDF
Designing and Implementing a Multiuser Apps Platform
PDF
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
PDF
React fristy day learn basic NM_Day01.pdf
PDF
BDD Testing Using Godog - Bangalore Golang Meetup # 32
KEY
Managing Phone Dev Projects
PDF
App engine devfest_mexico_10
PDF
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
PPTX
Continental Airlines 2009 Microsoft SharePoint Conference Presentation
Kunal bhatia resume mass
System design for Web Application
Python Software Engineer, AI at Upstaff
Building Bridges: Merging RPA Processes, UiPath Apps, and Data Service to bu...
MongoDB Schema Design by Examples
Class 6: Introduction to web technology entrepreneurship
CouchDB
Google DevFest 2012 Presentation
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
Google Dev Fest Presentation
Working Software Over Comprehensive Documentation
The 90-Day Startup with Google AppEngine for Java
Designing and Implementing a Multiuser Apps Platform
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
React fristy day learn basic NM_Day01.pdf
BDD Testing Using Godog - Bangalore Golang Meetup # 32
Managing Phone Dev Projects
App engine devfest_mexico_10
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Continental Airlines 2009 Microsoft SharePoint Conference Presentation
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
Cloud computing and distributed systems.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Empathic Computing: Creating Shared Understanding
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
cuic standard and advanced reporting.pdf
Cloud computing and distributed systems.
Per capita expenditure prediction using model stacking based on satellite ima...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Empathic Computing: Creating Shared Understanding
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Reach Out and Touch Someone: Haptics and Empathic Computing
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation_ Review paper, used for researhc scholars
Building Integrated photovoltaic BIPV_UPV.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
NewMind AI Monthly Chronicles - July 2025
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks
Ad

API Design & Moving from Junior to Senior Developer

  • 1. API Design & Junior ➪ Senior Christopher Cotton @_cotton for @NashSoftware 2012 Nov 29, christophercotton.com
  • 2. The Past ✤ 20+ years Programming ✤ Been QA Tester, Junior Dev, Senior Dev, Technical Lead, Project Lead, Architect, Senior Member of Technical Staff 3 (What?!), CTO, Founder, Consultant and lots of random other jobs ✤ javax.mail http://www.google.com/#q=javax.mail+cotton
  • 3. The Now ✤ iOS, Android, Ruby on Rails ✤ @NashGameDev ✤ @SpacewardHo ✤ http://handstand.io ✤ Teach Kids Programming (YSI) http://www.fssd.org/index.php? option=com_content&task=view&id=110&Itemid=207
  • 4. My Version, Not “The Truth” Date
  • 6. This does what? User.find_or_create_by_name("Bob")
  • 8. API ✤ Contract - documented, agreement, cause/effect ✤ Interface - one service to another ✤ GEM, Library, TCP, HTTP, etc. ✤ Systems Integration
  • 10. API Here, API There, Everywhere Date
  • 11. Version 2010/12/31 Current Architecture All rights reserved Handstand Scraper ContentDB Packager FileStorage Content Server Blogs/Websites Article List Article Package Market Task Device App Android Market Google Log Analytics Task Ad List Config Ads Builder Amazon Builder Amazon SQS S3 App.Handstand Customer Internal Systems Date
  • 12. API - How to Consume Date
  • 13. How to use? What would you do?
  • 20. API - How to Design Date
  • 21. Lots of Other Resources ✤ How to design RESTful APIs ✤ CRUD ✤ HTTP API
  • 22. What is the point?
  • 23. Who will use it? ✤ Dell Digital Delivery - 10 million machines, more each year to download software ✤ Cyberdog - other developers to implement new components ✤ JavaSoft javax.mail - Developers implementing Services, or sending Email ✤ Handstand - devices retrieving travel magazine
  • 25. Why Document? ✤ Another programmer will need to know how it works, and trial and error sucks ✤ Test Your API, write a client from your own docs ✤ Keeps your code honest ✤ Becomes a real API when a client is written by someone other than you from your docs
  • 27. Find & Reuse Good APIs ✤ Don’t reinvent the wheel ✤ Find another similar, and expand or convert ✤ Learn from bad APIs
  • 29. Key Aspects ✤ Versioned ✤ Errors - was the request successful? invalid data? server blew up? ✤ Consistent to itself - delete_book, friend_delete ✤ Iteration ✤ Design with a partner or isolation, not large groups
  • 30. Iteration ✤ High Level APIs ✤ Data Model, Design Objects and Connections ✤ Keep asking, what other actions need to be done? What other data? ✤ Walk through the scenarios ✤ retrieve library, log in, add book, delete book, post comment
  • 34. Q & A, Part One Date
  • 35. Junior ➪ Senior Date
  • 36. Characteristics of Bad Junior (or bad Senior) ✤ Worried about how you look, or what you say ✤ Focused on small parts, misses big picture ✤ Makes changes without understanding repercussions ✤ Not my part
  • 37. Good Senior Developer (or Good Junior Developer) ✤ Says, “I don’t know” ✤ Takes responsibility ✤ Continually Learning ✤ Will “Take one for the team” ✤ Given Any Problem, Can Invent a solution ✤ Can learn needed skills ✤ Goes beyond the basics
  • 39. Separate Concerns of Code ✤ Putting code unrelated into one group/class ✤ Networking code in the DB code ✤ UI Controller Code, with Table Cell Display Code ✤ Too many lines! ✤ “Wasn’t sure where else to put it” Ask!
  • 40. Cut & Paste Solutions ✤ Found something on Stack Overflow, paste it in! ✤ The Interweb is not always correct ✤ Take the time to understand what it does, and why
  • 41. Hard Coded Values ✤ Just don’t do it. Use config, use Class definitions, or Statics
  • 42. Reinvention, Bad idea ✤ Calendar formatter ✤ Network Library ✤ Search, or ask. Know your domain
  • 43. Warnings, Errors ✤ Fix warning messages, they are usually there for a reason ✤ If something fails, understand WHY it failed. Interested in making sure it doesn’t happen again ✤ Know where to fix it, document your changes ✤ Example: Cucumber test with TEXTAREA gave an extra ‘r’
  • 44. Be sure to test ✤ “I’m sure it must work in all those cases” ✤ Take the time to think about your code
  • 45. Too Focused on Small Parts ✤ Focus on the most important parts. Don’t know? Ask! ✤ iOS app, focused on getting a particular toolbar exact to the specifications, but those specifications would change ✤ Optimizing before recording data, profiling
  • 46. How will this change the app? ✤ DB code, using “select statements” and adding in specific fields ✤ Made it work in the short term, impossible to manage in the long term ✤ Change one class, but not really understand how it is used elsewhere
  • 49. Ask for Feedback, Code Reviews Date
  • 51. Build Tools, APIs, Libraries Don’t do the same thing over and over Date
  • 53. What is your.... Q & A, Part Deux Date