4 ms·
I’ve gotten ChatGPT to write a lot of mostly correct code for me. Mostly around the AWS SDK in different languages. There is so much sample code out there it h
by scarface74 3y ago
I’ve gotten ChatGPT to write a lot of mostly correct code for me. Mostly around the AWS SDK in different languages. There is so much sample code out there it helps.
It can also write CloudFormation, convert existing CF to Terraform and idiomatically correct CDK code in Python, convert code from Python to all of the target languages I’ve given it and convert Python AWS SDK (boto3) code to bash/AWS CLI.
- devjab 3y agoMaybe you are much better at prompting it than me, but I’ve gotten absolutely no value out of it in regards to my professional coding. Not for lack of trying either. I’ll give you a few examples of what I mean. Friday we decided to split our EF migration into multiple context files, something we should’ve done from the beginning to be fair. Anyway, we deploy with Azure DevOps and we migrate for our more permanent testing, staging and production slots through a VM agent on our VNET. We don’t have a DevOps engineer, and we don’t completely know what we’re doing but it works. I figure I could copy paste the code four teams, giving us 5, one for each context, but I didn’t want to do that. So I asked ChatGPT and it gave me an answer involving Bash, which doesn’t work in our DevOps pipeline, as in, it doesn’t exist in the context. I told GPT this, and fed it more information and it proceeded to give me the exact same code four times before it gave me something different, but also unusable code. That’s one of the good examples of it failing. Because it made things up and they didn’t work. So no harm done, aside from the wasted time. A few months back we tasked it with writing something for our Odata client library, and it did. It also worked, only, it didn’t reaaaaalllyyy work because it was flawed in a way you might not notice if you weren’t an experienced developer. Basically what it had build wouldn’t scale effectively, or at least not in a cost efficient manner. It would have been efficient enough to run for a long time without anyone noticing, however, but it would have been rather expensive and it would’ve broken down completely under “normal” loads, if we ever grow to twice the size we currently are. But it worked and it looked fine, and that’s sort of the scary scenarios. Or maybe they aren’t scary because we’ll likely be well paid to clean up those messes for years to come. I do think it’s likely to become more and more useful as time passes. I mentioned documentation in my GP, and I am genuinely amazed at how good it is at writing code documentation. You obviously don’t feed it sensitive code, but it’s been able to accurately describe functions from their name, input and return values alone. Seriously, it’s taken a function name and written a piece of JSDoc that was miles better than what I had written, accurately guessing complex context (which it only saw maybe 10% of) from the function and variable names alone.
- scarface74 3y agoI haven’t done in “development” projects since ChatGPT became a thing. It’s mostly DevOps these days. My specialty in consulting is combining App Dev + DevOps + cloud. I’ve mostly been using it for helper scripts and JSON and Yaml wrangling like this one. https://news.ycombinator.com/item?id=34566980 https://news.ycombinator.com/item?id=34566980
- devjab 3y agoI’ll be sure to check it out. To be more specific it’s about using dotnet EF core to generate a .sql artifact and then executing it using mssql server tool. I wanted to just generate one big .sql instead of one per context, but maybe you just can’t.