7 ms·
Can any users give their opinion on how it's helping their productivity? What problems are they finding, if any?
by ipnon 5y ago
Can any users give their opinion on how it's helping their productivity? What problems are they finding, if any?
- the42thdoctor 5y agoI was working on some internationalization stuff, translating some phrases from english to portuguese and Copilot just did it for me, does not seem like much but for me that is amazing. I was able to write {"Settings":...} and Copilot completed with {"Settings": "Configurações"} that tool is simply amazing.
- ed_elliott_asc 5y agoIt is massively improving my productivity, things I couldn’t be bothered to write it does for me. The thing I find really good is it can predict what I will do next. Say if I have a list of columns in some text somewhere in the project when I write one “df = df.withColumn(“OneItemInList”)” Copilot will then add the same for all the other items - is really nice
- capableweb 5y agoTried 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 ago
- 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.
- etaioinshrdlu 5y agoI only played around with it on OpenAI but it's the same model as far as I know. It's pretty good at regurgitating algorithms it's seen before. It's not good at all at coming up with new algorithms. It's very good at translating between programming languages, including pseudocode. It can write a lot more valid code much quicker than any human, and in a whole slew of languages. I haven't had the urge to use it much after playing around with it constantly for a few days, but it was pretty mind-blowing.
- yepthatsreality 5y agoYour response makes me wonder if poisoning the well is possible by submitting code to Github with multiple languages and coding styles. A single file with a function signature written in Javascript and the body written in Python + Ruby. Enough code would surely break the AI model behind it. Unless Copilot has some sort of ingestion validation which wouldn’t surprise.
- Grimm1 5y agoIn any training with code I've done, we've written a parser that validates against tree sitter grammars to make sure it's at least syntactically valid against some known subset of languages we're training on.
- yepthatsreality 5y agoI’m which case shifting strategies toward code that looks correct but isn’t using shared syntax between languages as well as language specific gotchas.
- Grimm1 5y agoYeah but if malicious intent is a concern you can just spin up a sandboxed instance to run the code to check first. Really the thing is there's not way to ascribe correctness to a piece of code right, like humans fail at this even. The only "correct" code is like rote algorithmic code that has a well defined method of operation. And there's likely a lot more correct examples of that, like way more than you'd ever be able to poison. You may be able to be misleading though by using names that say one thing but do another, but again you'd be fighting against the tide of correctly named things.
- dreyfan 5y agoIt’s a dream come true for the script kiddies.
- dgunay 5y agoIt can generate the body of test cases well, especially in BDD frameworks where you write the high-level scenario first to prime it with context. Less tedium encourages me to write more tests. More verbose languages like C++ become less obnoxious to write in. I know RSI has been mentioned and any tool which cuts down on excessive typing will help with that. It sometimes reveals bits of the standard library I wasn't aware of in unfamiliar languages. I can write my intent as a comment and then it may pull out a one-liner to replace what I would have normally done using a for loop. The main downside I've observed is that if I'm not trying to reign it in, it can result in a lot of WET code since it can pattern match other areas of the surrounding code but can't actually rewrite anything that has already been written. It is important to go back and refactor the stuff it produces to avoid this.
- abidlabs 5y agoWhat I like most about Copilot is seeing different programming styles suggested to me For example, I didn't know about self.fail() in unittests and had never used it, but Copilot suggested it and it produced the most readable version of the unit test
- speedgoose 5y agoIt does the boring code for me. If I want to throw an exception if an object is null or undefined, Co-pilot will do the if and the exception throw using the right error class, and a more meaningful error message that what I usually came up with. If want to map some random technical data table to something useful in my programming language, I can copy paste the data from the documentation in pdf or html into a comment block, give an example, and co-pilot will write everything in the format I want. If I want to slightly refactor some code, I can do it once or twice and co-pilot can help me a lot to refactor the remaining. If I want to have a quick http server in nodejs, I don't have to Google anything. It's a lot of tiny things like this.
- TaupeRanger 5y agoThis is the kind of thing I would need to see in real time, because I simply can't believe that it does any of these things in a way that is reliable and doesn't involve having to search through and make sure it hasn't made any mistakes, taking just as much time as if you did it by hand.
- gfosco 5y agoLikewise skeptical, but I have been super impressed with it. I just got in to the technical preview, and worked through a specific task I needed to do (involving mongoose, a mongo aggregate query, a few loops, some date functions) and started by adding a comment above each line. It helped a lot actually, felt like a collab. I'll reproduce a generic example I sent a friend. Prompt: const redis = require('redis'); // Create a redis client Copilot suggested: const client = redis.createClient(); I accepted it and moved 2 lines down, prompt: // Get the current count from redis Copilot suggested a start to the operation: client.get('count', (err, count) => { I accepted it, and Copilot continued: if (err) { console.log(err); return; } // If there is no count, set it to 0 if (!count) { count = 0; } // Increment the count count++; // Set the new count in redis client.set('count', count); // Log the new count console.log(count); }
- 5y ago
- ridiculous_fish 5y agoThere's a risk of it turning into a worse StackOverflow, by suggesting plausible-looking but subtly incorrect code. Here's two examples I found: https://twitter.com/ridiculous_fish/status/1452751236059451395 https://twitter.com/ridiculous_fish/status/14527512360594513...
- JoshCole 5y agoI've actually found it helpful as an API autocomplete, but... also not helpful at the same time. So for example I was working with processing an image to extract features and a few variants of docstrings for the method got me a pretty close to working function which converted the image to gray scale, detected edges, and computed the result I wanted. The helpful thing here was that there were certain APIs that were useful as a part of doing this that it knew but which I would have to do look up. I had to go through and modify the proposed solution: it got the conditional in the right place, but I wanted a broader classification so switched from a (255, 255, 255) check to a nearBlack(pixel) function which it then autocompleted successfully. I also had to modify the cropping. When doing a similar task in the past I spent a lot more time on it, because I went down a route in which I was doing color classification based on the k nearest neighbors. Later I found that the AI I was working on was learning to exploit the opacity of the section of the screen I was extracting a feature from in order to maximize its reward, because it kept finding edge cases in the color classifier. I ended up switching to a different color space to make color difference distance functions more meaningful, but it wasn't good enough to beat the RL agent that was trying to exploit mistakes in the classifier. Anyway, what I'm getting at here is that it is pretty easy to spend a lot of time doing similar things to what I'm doing and not get a great solution at the end. In this case though it only took a few minutes to get a working solution. CoPilot didn't code the solution for me, but it helped me get the coding done faster because it knew the APIs and the basic structure of what I needed to do. To be clear, its solutions were all broken in a ton of ways, but it didn't matter it still saved me time. To give another example let's say you have a keyboard key event press and you weren't sure about how to translate that into the key that was pressed. key.char? key.key? str(key)? key.symbol? A former method of figuring out what the right key might be is looking up the code, but with CoPilot you type '# Get the key associated with the key press' then hit tab and it gives you code that is broken but looks perfect and you gain a false sense of confidence that you actually know the API. You later realize after being amazed that it knew the API so well that you didn't have to look it up that actually the key press event handles symbols differently and so it errors on anything that is used as a modifier key. My general impression is something like: Wow, this is amazing. It understood exactly what I wanted and it knew the APIs and coded up the solution... Wait, no. Hold on a second. This and that are wrong.
- nemo1618 5y agoI wrote a test recently for a simple "echo"-style server: clients writes a name to a socket, server replies with "Hello, " + name. Nothing crazy. In the test body, I wrote "foo" to the socket. Copilot immediately filled in the rest of the test: read from the socket, check that the result is "Hello, foo", and fail the test with a descriptive error otherwise. wtf? How did it figure out that the correct result was "Hello, foo"? I changed "Hello" to "Flarbnax", and sure enough, Copilot suggested "Flarbnax, foo". I added a "!" to the end, and it suggested that too. After pushing a bit further, the suggestions started to lose accuracy: it would check for "???" instead of "??" for example, or it would check for a newline where there was none. But overall I came away very impressed.
- kall 5y agoIf I have an if else case, a switch statement or something similar, it can often predict the next branch exactly how I would write it. That‘s probably 80% of the suggestions I accept, the rest is single line autocompletes. I have never accepted a whole function implementation, and they are actually rather annoying because they make the document jump. It‘s useful enough for me, as a magic autocomplete.
- rawtxapp 5y agoIt's truly amazing, almost felt magical the first few autocomplete results I got. There's the benefits that a lot of people mentioned, but to me the biggest benefit is I can avoid procrastination. Usually when I'm blocked on something I'll run a search in the browser, but very quickly I end up going off the trail and just browsing the web and losing a lot of time. Now when I'm blocked I simply type the comment of what I'm trying to do and the autocomplete suggestion is pretty damn good and unblocks me very quickly. More surprising of all, it somehow understands my code style by looking at the context.
- baby 5y agoAs other pointed out, it makes boring or repetitive tasks a breeze. Also, it’s like a more clever auto complete most of the time, even when it’s wrong in calling a function you can use it as foundation code to go faster. And you don’t need to think too much about it, it really keeps you in the flow.
- trothamel 5y agoI find it works well when my intent is clear. For example, I might want to log a value I just computed for debugging purposes. I type LOG, wait a second, and it completes a zephyr logging macro, complete with a sensible message and the value I just computed. It sort of feels like pair programming with an undergraduate, except copilot never learns. That isn't to say it's bad, more that it is just a tool you can hand simple stuff off to, except the handoff is zero-effort. EDIT: I will say that there are times when it makes up fantasy constants or variable names, that seem plausible but don't exist. An eventual version of Copilot that includes more normal autocompletion information, so it only suggests symbols that exist, will be a stronger tool.
- karmasimida 5y agoUseful to say, write a python script, doing some mandane things, like generate all the argparse lines for you, read the files, etc. In a way, it does the dirty pipes surprisingly well. But when it comes to implement the core of the algorithm, it is not there yet, but the potential is huge.