Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Mostly for boilerplate things like assigning a bunch of thing to a dictionary, it usually knows what I am thinking.


Have you ever stopped to consider why you are writing code like that, and if it is necessary in the first place?

I think if you are spamming a lot of code that looks like:

    thing = params.get('thing')
    thong = params.get('thong')
    ...
    thunk = params.get('thonk')
then you probably aren't delivering a lot of value with your code.

In fact that overly verbose code could be a liability because it has to be reviewed (possibly multiple times as people look over the code to see how values are getting assigned).


Yes I have considered that, and I consider it every time I write code.

When you start using LLMs you realise how really is boilerplate. Error checking, unit tests, if statements, loops, so much code is boilerplate not just badly written code.


Try not to write code like this in statically, nominally typed languages (Java, Kotlin, C++, etc.). Without a good compile-time metaprogramming, you're bound to need code like this sooner rather than later [EDIT: you still should try to minimize it; it shouldn't be the first solution you reach for, but it really is unavoidable in many cases]. It's a PITA, but that's just it is in those languages - and Copilot works pretty well as an ad hoc code-gen tool.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: