4 ms·
Tried it out for a while, and it's clear that it's trying to get people to be faster at writing boilerplate, not get people to write better code. I'm a bit sca
by capableweb 5y ago
Tried it out for a while, and it's clear that it's trying to get people to be faster at writing boilerplate, not get people to write better code.
I'm a bit scared for what this means as I don't think being able to faster write boilerplate is something worthwhile. The example ed_elliott_asc made is one of those examples where instead of fixing things so you don't have to repeat yourself, copilot makes it easy to just live with the boilerplate instead.
- aranchelk 5y agoBoilerplate is exclusively what I use AI-powered code completion for (currently Tabnine). In a perfect world we’d all have excellent comprehensive metaprogramming facilities in our programming languages and no incidence of RSI (e.g. carpal tunnel syndrome). Code completion is a good tool to deal with these realities.
- airstrike 5y ago> I don't think being able to faster write boilerplate is something worthwhile But do you believe people being slower at writing boilerplate is undesirable?
- kyleee 5y agoIt may be desirable for boilerplate to be maximally painful if it forces our collective hands to cut down on boilerplate and innovate it away
- kevingadd 5y agoWho is realistically going to innovate the boilerplate out of Java if they're stuck using it at work?
- gridspy 5y agoThat, or any job where you're not permitted to make the sweeping changes required to resolve boilerplate. Many of my jobs had such restrictions.
- stelcodes 5y agoI mean, Clojure kinda does that
- amusedcyclist 5y agoLombok and most intellij features make java boilerplate pretty obselete.
- closeparen 5y agoThat’s a good plan if your language isn’t Go. For us I think tools to wrangle boilerplate are a lot more feasible than actually eliminating it.
- zomglings 5y agoif commentErr != nil { hn.Upvote("https://news.ycombinator.com/item?id=29017491") }
- verve_rat 5y agoIn my experience whenever someone tries to "innovate" away boilerplate they end up creating shitty abstractions that are inflexible, poorly documented, and unmaintained. Boilerplate generally exists for a reason, and it's not because the creator likes typing.
- chrsig 5y agoPossibly yes, if you're only contrasting it with being able to be faster. I mean, it's sort of a false dichotomy -- it's omitting a "default speed" for writing boilerplate that is neither enhanced nor impeded. the potential issue with an enhanced speed for writing boilerplate is that it means that there'll just be more and more boilerplate to maintain over time, and it's not clear what that cost over time will be. How much more effort will be expended to replace things in multiple places? It exacerbates existing issues of "these two things look almost the same, but someone manually modified one copy...should that change be propagated?" Meaning, it's essentially an ad-hoc code generator. Code generation can be a very useful technique (see protobufs), but without the ability to re-generate from a source? Perhaps a possible enhancement might be for copilot to keep track of all blurbs it generated and propose refactoring/modifying all copies?
- airstrike 5y ago> I mean, it's sort of a false dichotomy -- it's omitting a "default speed" for writing boilerplate that is neither enhanced nor impeded. I'm not sure. I think that understanding is omitting a "default amount" of boilerplate that will have to be written regardless of one's individual preference that is really a function of the language / framework of choice, the existing codebase and the problem at hand. Removing that boilerplate would be ideal but is not always possible given limited resources, time constraints and the usual inability to make sweeping changes to the codebase So we settle for the second best solution which is to automate away that tedious process (or short of that provide developers with tools to get it out of the way faster) so we can all focus on "real work"
- chrsig 5y agoI agree that there's some default amount of boilerplate that needs to be written -- but one isn't impeded by that -- it's just built into the task. An impedance would be something to adjust the status quo in a negative direction e.g., a hardware failure
- pc86 5y agoWriting a slightly abstracted library to handle populating a list isn't necessarily "fixing" something. It might be, for sure, but is going to be very use case dependent, and there are a lot of instances where it's better to have 5, 10, or yes even 15-20+ nearly-identical lines and be done in a minute or two (or 5 seconds with Copilot IME) than spend half a day tweaking test coverage on your one-off library.
- capableweb 5y ago> Writing a slightly abstracted library to handle populating a list > than spend half a day tweaking test coverage on your one-off library If you need to write a library and spend half a day to populate a list, you have bigger problems than boilerplate. Nothing wrong with having duplicate lines. The problem becomes when writing those lines become automated so you start spewing those all over the place.
- csee 5y agoIt's going to be great for exploratory data science. You don't really need stellar, maintainable or extensible code for that, the early stage is largely about iteration speed.
- manquer 5y agoIteration speed also depends on code being well written and performance code, you need to get results faster to iterate faster. Also if your don't fully understand your code( when generated or copied from SO) as not uncommon with junior developers and data science practitioners, then they struggle to make even small change for the next iteration, because they don't fully understand what their code is doing and how. When your code is composable or modifiable easily then iterations become faster because you understand what you have written. One of the reasons why analysts prefer Excel if data size is within limits.