3 ms·
Even before LLMs, I think that codegen (the model driven variety) was a good thing! For example, you could throw a WSDL file at SoapUI and get an API client th
by KronisLV 3y ago
Even before LLMs, I think that codegen (the model driven variety) was a good thing!
For example, you could throw a WSDL file at SoapUI and get an API client that let you play around with it (https://www.soapui.org/docs/soap-and-wsdl/working-with-wsdls/ https://www.soapui.org/docs/soap-and-wsdl/working-with-wsdls...) or client code for some frameworks (https://www.soapui.org/docs/soap-and-wsdl/soap-code-generation/ https://www.soapui.org/docs/soap-and-wsdl/soap-code-generati...), more or less what OpenAPI/Swagger is really nice for nowadays: https://swagger.io/tools/swagger-ui/ https://swagger.io/tools/swagger-ui/ and https://swagger.io/tools/swagger-codegen/ https://swagger.io/tools/swagger-codegen/
You can also do the reverse, say, go from a live MySQL/MariaDB database running somewhere or a script to a model of it by reverse engineering (https://dev.mysql.com/doc/workbench/en/wb-reverse-engineering.html https://dev.mysql.com/doc/workbench/en/wb-reverse-engineerin...), so that you can explore and change it in a visual manner. You can take either that, or a model created from scratch and either synchronize it with an existing schema, or get the full set of SQL migrations for setting it up from scratch: https://dev.mysql.com/doc/workbench/en/wb-design-schema.html https://dev.mysql.com/doc/workbench/en/wb-design-schema.html and https://dev.mysql.com/doc/workbench/en/wb-forward-engineering.html https://dev.mysql.com/doc/workbench/en/wb-forward-engineerin...
Codegen like that can even extend across architecture tiers. For example, I can take a live database with said schema, connect JetBrains Rider with an EntityFramework plugin (using ASP.NET and C# here as an example, though similar solutions exist in Java and other tech stacks) and generate a set of entities with mostly correct data types and relation mappings automatically: https://blog.jetbrains.com/dotnet/2022/01/31/entity-framework-core-inside-rider-ui-way/ https://blog.jetbrains.com/dotnet/2022/01/31/entity-framewor...
Not only that, but OpenAPI/Swagger codegen is integrated in ASP.NET so I can also end up with a web based UI to test any APIs that I might make, should I opt to create controllers that use those entities.
While most of the codegen I've seen in an academic context has been more or less a mess (broken Eclipse plugin based tools), practical approaches like this are wonderful - for the more boring and boilerplate stuff, I can basically draw a few boxes and get bunches of SQL and C# code that I can then change and/or fine tune as necessary, using the generated stuff as a basis (even though re-generating it would probably overwrite the changes).
LLMs feel like the logical next step: feed in a bunch of projects and language documentation and you can query the LLM with various questions about how to do something, to at least sometimes send you on the correct search path yourself without having to jump around 15 different documentation pages, maybe only 5 will suffice now. I use ChatGPT fairly liberally for my personal projects and while it's no silver bullet, it feels like a value add to me, since there's a surprising amount of boilerplate out there for the boring problems that I solve, with every framework and language solving the same stuff in slightly different ways.