Hacker News new | ask | show | jobs
by enitihas 2233 days ago
How is this better than any IDE anyways? The examples look trivial and don’t seem even better than ultisnips for vim, forget IntelliJ. Are there better examples anywhere?
1 comments

I can only speak about TabNine which appears to be very similar. It doesn’t just complete on APIs, it actually understands the code you’re writing. It will suggest variable names based on patterns, it will suggest what you initialize your variables to based on what they’re called. It will suggest comments based on the context. Sometimes you can just write the name of a function, and then tab through the suggestions line by line and it will write the whole procedure for you. It’s witchcraft.
1. IntelliJ also suggest variable names based on patterns.

2. Is there any good example of it suggesting good comments? AFAIK, comments are hard even for humans to write, so if they are able to generate good comments, it should be a major advance in NLP.

3. I don't believe this. Unless these are very trivial functions which are copy pasted across the internet, this is very hard. Is there any showcase or example where I can see this for myself?

I don’t know IntelliJ specifically. Maybe they do something similar that works as well.

It obviously doesn’t write a complete perfect comment for you, but I mentioned it because it’s not really specific to code, it’s just a really good and smart autocomplete that works on anything, even prose, and that can take unexpected patterns into account.

I probably wouldn’t believe it either, unless I had experienced it. Yes, it’s happened for simpler procedures, and you might need to tab through to pick the right completion - but still. It is unbelievably good at figuring out what type of code goes with which identifiers.

It's hard to believe until you try it, but it can absolutely autofill almost complete functions based on context and patterns learned from you've been typing in the project so far.

Think about how good GPT-2 is at writing essays given only a one-line prompt, now imagine that kind of predictive power applied to your code and you'll get something close to TabNine.