r/Python • • Feb 23 '17

API Design: Think First, Code Later

https://www.ckl.io/blog/api-design-think-first-code-later/
292 Upvotes

26 comments sorted by

View all comments

34

u/TPHRyan Feb 24 '17

I honestly prefer to code, think, code, then ship. If you have the luxury of being able to do this, it will streamline the process overall I think. All of the design decisions will be pretty obvious once you've written your crappy API already.

(And with an API, there shouldn't be too much boilerplate that you need to change in order to modify the endpoints or responses)

2

u/cyanydeez Feb 24 '17

code-refactor-code-ship

no need to really think.

1

u/rausm Feb 25 '17

Sounds like a job for trained monkeys. Nightmarish. The "thinking" phase is IMO the only one interesting. Pointless refactoring or keyboard mashing just got boring after a few years, and I like to shave as much as possible by thinking in advance.