Live data from Hacker News

Tips for programmers to stay ahead of generative AI

spectrum.ieee.org

251–260 of 319 posts

Re: Tips for programmers to stay ahead of generative AI

#251

"You will have to worry about people who are using AI replacing you" Oh yes. I should be very very afraid of the flying copypasta monster. As if my productivity is reduced to the mere rate at which I can write code! What's even project planning? Why even have meetings if it's all down to "is it done yet"? Who works at these coding sweatshops that are so afraid of AI? If they get fired and find a better place to work,…

Seriously, I wonder if these sweatshop people are paid by lines of code. That is a horrible way to Engineer things.

Re: Tips for programmers to stay ahead of generative AI

#253

the next 5+ years will see software proliferate rapidly as a result of things like chatgpt and llm augmented documentation pages. Building things end to end just got easier and will become more so soon.

> a result of things like chatgpt and llm augmented documentation pages. You mean like this? https://github.com/mdn/yari/issues/9208 https://news.ycombinator.com/item?id=36542267

those links are great counterarguments. But we are still in early stages, which i dont think is indicative of the end state of these tools (though that can be debated of course).

Re: Tips for programmers to stay ahead of generative AI

#254

Earlier quoted context omitted.

> a result of things like chatgpt and llm augmented documentation pages. You mean like this? https://github.com/mdn/yari/issues/9208 https://news.ycombinator.com/item?id=36542267

those links are great counterarguments. But we are still in early stages, which i dont think is indicative of the end state of these tools (though that can be debated of course).

also upon further inspection, it appears as though ai-explain was not added by the core team or MDNs steering team. It looks like someone just took it upon themselves to add it, without doing DD on the feature, if true, its not surprising it doesnt work well.

Re: Tips for programmers to stay ahead of generative AI

#255
post #194
post #54

Occurs to me as a retired 69 year old former coder that AI makes us old geezers and geezesses somewhat competitive again with our younger colleagues. Need to learn yet another new framework? Let AI do the nitty gritty bit. Capitalize on your experience and higher level know how.

It doesn't work. I asked GPT-4 to migrate the following PHP code to JS: $csv = array_map('str_getcsv', file($argv[1])); And this is the result: const csv = readFileSync(filename, 'utf-8').split('\n').map(line => line.split(',')); You can't parse CSV this way, because you need to respect delimiters. Counter example: 1,"1,5",2 "1,5" being the German notation for "1.5". Hence, a simple split(',') will break this thing.…

You couldn't get it to work, but it certainly does work: https://chat.openai.com/share/774fbe29-00b9-4e1f-815c-268707...

Re: Tips for programmers to stay ahead of generative AI

#256
post #194

Earlier quoted context omitted.

It doesn't work. I asked GPT-4 to migrate the following PHP code to JS: $csv = array_map('str_getcsv', file($argv[1])); And this is the result: const csv = readFileSync(filename, 'utf-8').split('\n').map(line => line.split(',')); You can't parse CSV this way, because you need to respect delimiters. Counter example: 1,"1,5",2 "1,5" being the German notation for "1.5". Hence, a simple split(',') will break this thing.…

I wonder if inputting an explicit function call $csv = str_getcsv(file($argv[1])) Would make it easier.

Yes: https://chat.openai.com/share/33466769-1e06-49af-8abd-7a4c0e...

Re: Tips for programmers to stay ahead of generative AI

#257

Earlier quoted context omitted.

The thing is the hallucinations, I also wasted few hours trying to work on solutions with GPT where it just kept making up parameters and random functions.

It referenced a made up a function I needed (that should probably exist lol) in BrightScript, the letdown after realizing as much was painful.

Did you try asking it to write the function?

Re: Tips for programmers to stay ahead of generative AI

#258

Is programming even the hard part about programming? In all seriousness, what we would really need from an AI to start really saving me time would be for it to interview all the customers/partners involved on the project, determine the scope of function needed, boil all that down to a set of sensible domain models that make sense to everyone, identify where/when messages need to be passed, determine which things can…

I am currently uplifting a 30 year old code to a somewhat newer codebase to try and give it another 20-30 years. I spend a lot of time talking with humans to rediscover the context of the system.

AI is not going to each my lunch. But it sure is handy being able to make sense of some old logic and syntax. It literally saves me hours in having to figure out strange code snippets and such.

GPT is very impressive. But we'll be fine. There's plenty more complexity to come, so be smart, be a part of that complexity.

Re: Tips for programmers to stay ahead of generative AI

#259
A few years ago, before the advent of Copilot (and ChatGPT), I was telling my students their future as programmer was bleak, because most coding is either interfacing stuff, or creating an often incorrect heuristic to solve a single instance of a well known class of problem -- and all those activities could well soon be automated thanks to datasets like StackOverflow.

I now consider that ChatGPT for programming is a confirmation of my intuition back then.

Now, I understand that article as being too shallow again, by defining short term strategies for working with ChatGPT without considering a long term view on what it means for programming overall.

And I'm sure I'm not alone in finding the impact of ChatGPT (and future generative AI) on programming as obvious...

Re: Tips for programmers to stay ahead of generative AI

#260
post #194

Earlier quoted context omitted.

It doesn't work. I asked GPT-4 to migrate the following PHP code to JS: $csv = array_map('str_getcsv', file($argv[1])); And this is the result: const csv = readFileSync(filename, 'utf-8').split('\n').map(line => line.split(',')); You can't parse CSV this way, because you need to respect delimiters. Counter example: 1,"1,5",2 "1,5" being the German notation for "1.5". Hence, a simple split(',') will break this thing.…

One shot code translation is very… September 2023

Hmm but what's the solution? Type out the reasoning for every line of code for an entire codebase?
Post reply on HN