←back to thread

214 points Brajeshwar | 1 comments | | HN request time: 0s | source
Show context
marcyb5st ◴[] No.45087065[source]
In terms of LOCs maybe, in terms of importance I think is much less. At least that's how I use LLMs.

While I understand that <Enter model here> might produce the meaty bits as well, I believe that having a truck factor of basically 0 (since no-one REALLY understands the code) is a recipe for a disaster and I dare say long term maintainability of a code base.

I feel that you need to have someone in any team that needs to have that level of understanding to fix non trivial issues.

However, by all means, I use the LLM to create all the scaffolding, test fixtures, ... because that is mental energy that I can use elsewhere.

replies(2): >>45087181 #>>45090543 #
epicureanideal ◴[] No.45087181[source]
Agreed. If I use an LLM to generate fairly exhaustive unit tests of a trivial function just because I can, that doesn’t mean those lines are as useful as core complex business logic that it would almost certainly make subtle mistakes in.
replies(1): >>45087230 #
andsoitis ◴[] No.45087230[source]
> If I … generate fairly exhaustive unit tests of a trivial function

… then you are not a senior software engineer

replies(1): >>45087252 #
triyambakam ◴[] No.45087252[source]
Neither are you if that's your understanding of a senior engineer
replies(2): >>45087398 #>>45087504 #
mgh95 ◴[] No.45087398[source]
I think the parent commentors point was that it is nearly trivial to generate variations on unit tests in most (if not all) unit test frameworks. For example:

Java: https://docs.parasoft.com/display/JTEST20232/Creating+a+Para...

C# (nunit, but xunit has this too): https://docs.nunit.org/articles/nunit/technical-notes/usage/...

Python: https://docs.pytest.org/en/stable/example/parametrize.html

cpp: https://google.github.io/googletest/advanced.html

A belief that the ability of LLMs to generate parameterizations is intrinsically helpful to a degree which cannot be trivially achieved in most mainstream programming languages/test frameworks may be an indicator that an individual has not achieved a substantial depth of experience.

replies(3): >>45087613 #>>45087958 #>>45091265 #
1. imtringued ◴[] No.45091265[source]
99% of the work in testing is coming up with test scenarios and test cases. 95% of the code is just dealing with setting up input and output data, 4% is calling the code you want to test and the final assert is often just a single line of code.

I'm not sure what depth of experience has to do with any of this, since it is busy work that costs a lot of time. A form with 120 fields is a form with 120 fields. There is no way around coming up with the several dozens of test cases that you're going to test without filling out almost all of the fields, even the ones that are not relevant to the test itself, otherwise you're not really testing your application.