[HN Gopher] Building a back end using only OpenAI Codex
       ___________________________________________________________________
        
       Building a back end using only OpenAI Codex
        
       I've published the sources for the code generation and the code
       that was generated on GitHub: https://github.com/sturdy-
       dev/codeball-todo-mvc  I've been experimenting with merging prompts
       together, with a goal to write the full backend in a single prompt.
       On the form:  > 1. Setup a flask web server  > 2. Add a /add
       endpoint  It works reasonably well, but it seems like it's loosing
       some precision in the prompts... The person that coined the term
       "prompt engineering" was right, it's really important to learn what
       words to use to get the AI to do exactly what you want it to do.
        
       Author : zegl
       Score  : 50 points
       Date   : 2022-08-24 10:52 UTC (12 hours ago)
        
 (HTM) web link (codeball.ai)
 (TXT) w3m dump (codeball.ai)
        
       | xrd wrote:
       | Why did you use sveltekit as the front end (as opposed to just
       | svelte)? Typically SK is used when you want to have both front
       | end and back end in the same app.
        
         | zegl wrote:
         | It's mostly what I'm used to these days, codeball.ai is written
         | in SK. I didn't end up using it, but SK also has a nice client
         | side router!
        
       | w1zzy wrote:
       | How much time did it take to wrote app?
        
         | zegl wrote:
         | It's hard to say, since I was writing the blog post in parallel
         | as I was making the app. But not too long, maybe an hour or
         | two? I'm not a Python/Flask developer, so I guess that's not
         | too bad.
        
           | lxe wrote:
           | You can also use gpt3 to write most of the blog content. I'm
           | willing to bet soon this is going to be everyone's workflow.
        
           | w1zzy wrote:
           | Thanks for info. I am gathering information about efficiency
           | of using code generators. Btw. Nice work!
        
             | teslelover_12 wrote:
             | yup its really cool
        
             | verdverm wrote:
             | I have a non-AI code generator if that would be of interest
             | to your info gathering. It's definitely meant for developer
             | efficiency over the entire software lifecycle. Happy to
             | tell you all about it if you are doing interviews, calls,
             | or the similar.
             | 
             | https://github.com/hofstadter-io/hof |
             | https://docs.hofstadter.io
        
       | sdwr wrote:
       | I like how the captions scroll along to match the code samples,
       | it's a fun reading experience.
       | 
       | Got scared for a second (most of what I code is CRUD backends!),
       | until I tried to see it from the perspective of a novice, where
       | all of this is impenetrable anyway.
        
       | daenz wrote:
       | It's very cool, but from an auditing perspective, it's a
       | nightmare. As a reviewer, I can't reason about the code in the
       | same way that I could reason about human code, since there is no
       | coherent formulation of the accomplished task. I can't say "why
       | did it apply CORS to the entire flask app?" and expect reasoning
       | that will fulfill my objective as a reviewer.
       | 
       | So while it could help blast out large swaths of code quickly, it
       | still needs an expert at the wheel to be accountable for the
       | changes to reviewers.
        
         | ShamelessC wrote:
         | As was the case before.
        
       | [deleted]
        
       | kevincox wrote:
       | This is mindblowing. The copilot autocomplete was very impressive
       | but actually editing the existing code is incredible.
       | 
       | I really want to see some examples of failed prompts and attempts
       | to ask it to cache sqlite connections.
        
       | akkartik wrote:
       | This needs a new format for source code. We could call it, oh,
       | Literate Programming. Check in only the prompts to version
       | control, expand them into code during CI, then file bugs when new
       | releases of OpenAI cause regressions.
        
       ___________________________________________________________________
       (page generated 2022-08-24 23:01 UTC)