Live data from Hacker News

Tips for programmers to stay ahead of generative AI

spectrum.ieee.org

1–10 of 319 posts

Re: Tips for programmers to stay ahead of generative AI

#2
> Software engineers should be critical of the outputs of large language models, as they tend to hallucinate and produce inaccurate or incorrect code.

This seems to be the case more than not for certain tasks, anything assembler or C I have ever asked it has turned out to be at least somewhat wrong. Mixing styles and syntax all over the place. I am not afraid that some generative AI will take my job anytime soon.

Re: Tips for programmers to stay ahead of generative AI

#3
How to survive in an AI world? Shift your mindset from “I write code” to “I deliver value”.

Now instead of AI replacing you, it’s helping you get more done (in theory). Everyone wins.

Staking your career on being a pair of hired hands that executes somebody else’s exacting specifications was always a long-term losing proposition. And we are very very far away from AI being able to ask the right questions to help business stakeholders and customers clearly express what they need.

Re: Tips for programmers to stay ahead of generative AI

#4
post #2

> Software engineers should be critical of the outputs of large language models, as they tend to hallucinate and produce inaccurate or incorrect code. This seems to be the case more than not for certain tasks, anything assembler or C I have ever asked it has turned out to be at least somewhat wrong. Mixing styles and syntax all over the place. I am not afraid that some generative AI will take my job anytime soon.

These things are a matter of writing a correct prompt. Like "use this and that naming convention for variables and keep this and that style".

You can also ask it to write tests for the code so you can verify it is working or add your own additional tests.

Even if the produced code is wrong, it usually takes a few steps to correct it and still saves time.

It is an amazing tool and time saver if you know what you are doing, but helps with research as well. For instance if you want to code something in the domain you know little about, it can give you ideas where to look and then improve your prompts based on that.

In the context of taking anyone's job is like saying that a spreadsheet is going to replace accountants.

It's just a tool.

Re: Tips for programmers to stay ahead of generative AI

#6
post #3

How to survive in an AI world? Shift your mindset from “I write code” to “I deliver value”. Now instead of AI replacing you, it’s helping you get more done (in theory). Everyone wins. Staking your career on being a pair of hired hands that executes somebody else’s exacting specifications was always a long-term losing proposition. And we are very very far away from AI being able to ask the right questions to help busi…

I also find it bizarre that so many people feel precious about the code. They have too much ego attached to what they type in and the AI kind of make them feel insecure.

I couldn't care less if I write the code, the AI or someone I told to write it.

What matters is the value it provides.

Re: Tips for programmers to stay ahead of generative AI

#7
post #2

> Software engineers should be critical of the outputs of large language models, as they tend to hallucinate and produce inaccurate or incorrect code. This seems to be the case more than not for certain tasks, anything assembler or C I have ever asked it has turned out to be at least somewhat wrong. Mixing styles and syntax all over the place. I am not afraid that some generative AI will take my job anytime soon.

These things are a matter of writing a correct prompt. Like "use this and that naming convention for variables and keep this and that style". You can also ask it to write tests for the code so you can verify it is working or add your own additional tests. Even if the produced code is wrong, it usually takes a few steps to correct it and still saves time. It is an amazing tool and time saver if you know what you are d…

My first step when using an LLM is asking it to produce a test suite for a function, with a load of example inputs and outputs. 9 times out of 10, I've been presented with something incorrect which I need to correct first.

I'm reasonably good at being specific and clear in my directions, but I quickly arrived at the conclusion that LLMs are simply not good at producing accurate code in a way that saves me time.

Re: Tips for programmers to stay ahead of generative AI

#9
post #2

> Software engineers should be critical of the outputs of large language models, as they tend to hallucinate and produce inaccurate or incorrect code. This seems to be the case more than not for certain tasks, anything assembler or C I have ever asked it has turned out to be at least somewhat wrong. Mixing styles and syntax all over the place. I am not afraid that some generative AI will take my job anytime soon.

These things are a matter of writing a correct prompt. Like "use this and that naming convention for variables and keep this and that style". You can also ask it to write tests for the code so you can verify it is working or add your own additional tests. Even if the produced code is wrong, it usually takes a few steps to correct it and still saves time. It is an amazing tool and time saver if you know what you are d…

> These things are a matter of writing a correct prompt.

No, they aren't.

ChatGPT doesn't know things. It's just a very fancy predictive text engine. For any given prompt, it will provide a response that is engineered to sound authoritative, regardless of whether any information is correct.

It will summon case law out of the aether when prompted by a lawyer; it will conjure paper titles and author names from thin air when prompted by a researcher; it will certainly generate semantically meaningless code very often. It's absolutely ludicrous to assert that you just need a "better prompt" to counteract these kinds of responses because this is not a bug — it's literally just how it works.

Re: Tips for programmers to stay ahead of generative AI

#10

Earlier quoted context omitted.

These things are a matter of writing a correct prompt. Like "use this and that naming convention for variables and keep this and that style". You can also ask it to write tests for the code so you can verify it is working or add your own additional tests. Even if the produced code is wrong, it usually takes a few steps to correct it and still saves time. It is an amazing tool and time saver if you know what you are d…

> These things are a matter of writing a correct prompt. No, they aren't. ChatGPT doesn't know things. It's just a very fancy predictive text engine. For any given prompt, it will provide a response that is engineered to sound authoritative, regardless of whether any information is correct. It will summon case law out of the aether when prompted by a lawyer; it will conjure paper titles and author names from thin air…

Read the next sentence after your quote. The point is that you should include code and examples in your prompt (Copilot is so good since it includes the surrounding code and open files in the prompt to understand your specific context), not that you should craft an exceptional "act as rockstar engineer" prompt.
Post reply on HN