From the course: Creating Better SDKs with Generative AI

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

What is code generation?

What is code generation?

- [Instructor] Generally, when we think of creating SDKs, we have two approaches. One of them is to hand-code every single line. While that works, it's painful because the amount of work only grows as our API grows. Even worse, as you release more SDKs, each one creates additional work in each language, and then you need to handle releasing numerous SDKs across numerous package managers, tracking versions, and compatibility at every step. When you consider that your SDKs should be consistent and predictable throughout, the work grows again, and we're not even factoring the different skill levels of experience among the developers updating these libraries over time. The better, more scalable approach is using code generation for SDKs. The traditional approach to code generation is a relatively straightforward pattern recognition. For example, for an API, your code generation looks at each endpoint and figures out a few things about it. It'll look at the verbs, GET, PUT, POST, and…

Contents