3 ms·
Mostly for boilerplate things like assigning a bunch of thing to a dictionary, it usually knows what I am thinking.
by teruakohatu 2y ago
Mostly for boilerplate things like assigning a bunch of thing to a dictionary, it usually knows what I am thinking.
- NewJazz 2y agoHave 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).
- teruakohatu 2y agoYes 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.
- klibertp 2y agoTry 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.