|
| ▲ | winrid 18 minutes ago | parent | next [-] |
| I have a couple 50k+ loc java projects written entirely by LLMs at this point that have never thrown an NPE. |
| |
|
| ▲ | marginalia_nu 37 minutes ago | parent | prev | next [-] |
| Have you tried not returning null or constructing incomplete objects? |
| |
| ▲ | gentlewater 24 minutes ago | parent | next [-] | | Can I trust code I’ve written myself with no guarantees from the language? Maybe. Can I trust code written by dozens of other developers (and/or agents) working on the same project over multiple years? Definitely not. | | |
| ▲ | marginalia_nu 21 minutes ago | parent [-] | | Why don't you have any coding standards? If you're working with agents in particular, catching and enforcing this stuff should be easier than ever. | | |
| ▲ | saghm 9 minutes ago | parent [-] | | Most engineers do not have the ability to impose rules by fiat on all of their coworkers. It seems like you're misunderstanding the nature of working on a codebase as an IC when other developers contribute to it. If all of my coworkers don't want a lint rule I propose, I don't get to add it. If all of my other coworkers want to write code in a certain way and approve each other's MRs with code written in that way, I don't get to veto it. |
|
| |
| ▲ | saghm 17 minutes ago | parent | prev [-] | | Do you never use external libraries? | | |
|
|
| ▲ | LelouBil 36 minutes ago | parent | prev | next [-] |
| You can either use Kotlin then, or simply use java and nullability annotations, they have good support in both IDEs and analysis tools |
| |
|
| ▲ | well_ackshually 20 minutes ago | parent | prev [-] |
| Any serious project will be using NullAway and annotating everything (or, indeed, using Kotlin). Otherwise, yeah, you're still in for a world of pain. |