Hacker News new | ask | show | jobs
by com2kid 1107 days ago
How about what I did last night

"In typescript, Write me an express POST endpoint that takes in a JSON payload, assigns it a unique id of some sort, and uploads it to an s3 bucket"

"To continue on with the last request, in typescript, write me an express GET route that takes in an id of the JSON file that the POST request above uploaded, downloads it from s3 and sends it to the user."

For problems with well defined constraints, ChatGPT4 is amazing. Of course I had to rewrite all the error handling logic, and fill in some details, but it saved me a lot of time looking up APIs.

The flip side is, it originally tried writing against AWS SDK2, and I had to ask it to use SDK3. If I hadn't known about SDK3, I would've had less than optimal code.

Similar thing when I asked it to add ajv validation to an endpoint, I hadn't done that in a couple of years and I knew it'd take me awhile to remember exactly how, while ChatGPT pushed it out in a few seconds, but with non-optimal code (didn't use middleware). Because I already knew what it should do, I was able to ask for a correction.

I have a genuine fear for Junior developers using ChatGPT and never going through the struggles to learn the tools and technologies that makes a good Senior engineer.

2 comments

"I have a genuine fear for Junior developers using ..."

I have been around long enough to have heard the same about

- writing code on the terminal as oposed to on paper (their coding will become just trail and error)

- using debuggers (repeat until it works, they will never understand why it failed to begin with)

- using IDE's (real programmers don't need crutches)

- using languages with extensive standard libraries (how can they ever understand their code if they didn't write their own dictionary)

- using domain frameworks (TF is for people incapable of grokking NN's)

- ...

It's most often not the tool that is producing bad programmers, it's bad programmers holding it wrong ;)

From the HN discussion about the video of "A Conversation with Language Creators: Guido, James, Anders and Larry"

https://news.ycombinator.com/item?id=19568381

>James Gosling wants to punch the "Real Men Use VI" people.

>"I think IDEs make language developers lazy." -Larry Wall

>"IDEs let me get a lot more done a lot faster. I mean I'm not -- I -- I -- I -- I -- I'm really not into proving my manhood. I'm into getting things done." -James Gosling

Yeah I tend to agree. I also feel like the majority of my deeper software knowledge has come from reading/modifying existing code, debugging and reverse engineering rather than actually writing code.
I think it's kind of right though. Like we're in the midst of a generation of developers most of whom can't seem to be productive without stackoverflow or Google open in a tab somewhere.
Another great example!

With the out-of-date SDK, I had a similar experience. ChatGPT got me started with ManifestV2 for the Chrome extension and I found out it's getting deprecated and I should really use ManifestV3. But you know what, I asked ChatGPT how to update from ManifestV2 to ManifestV3 and it gave me the steps and things to fix. I had to do a few iterations as new errors were coming up and some things needed a bit of a refactor, but it was all done quite fast.

The fear of juniors skipping out on key learnings, or even perhaps having a hard time finding jobs in a few years is definitely interesting and something I'm super curious to see how it will go...