
AI-Powered JavaScript Completions - csmajorfive
https://www.kite.com/blog/product/kite-launches-ai-powered-javascript-completions
======
hasperdi
FYI: Kite as a company had a backlash from the community after they acquired
popular Python packages and injected their spyware and ads. So far they've
learnt from that lesson, but who knows if they'll stay that way.

~~~
adamsmith
We hear you. We agree this was a mistake, and over the ~three years since then
we've listened to the community, for example by releasing local processing for
Kite.

~~~
nikisweeting
Why is "send usage metrics" still on by default in the Kite.app preferences?

I was prepared to give Kite another shot but seeing that checkbox just made me
lose confidence. Caddy almost got destroyed by this! Please please please
reconsider and make telemetry opt-in, you don't have enough goodwill given
Kite's history with exfiltration, and the product has access to too much vital
information to be playing around with users trust like this.

------
adamsmith
Adam from Kite here. The team and I are thrilled to launch our new deep
learning engine for JavaScript completions.

After years of work building our Python product — now to over 250,000 monthly
active users — we decided we were ready to expand a new language. JavaScript
was a clear choice given how well it pairs with Python, and it was the our
most-requested language.

We took what we learned from building our Python product, adjusted it to
JavaScript’s nuances, and trained the model on 22 million open-source
JavaScript files. We then spent months dogfooding, user testing, and applying
advanced model filtering techniques to ensure the UX was ready for everyone to
enjoy.

We think the end-result will help you have more fun writing JavaScript, while
also helping you ship software faster. We can’t wait to get feedback from you
to help us improve our JavaScript completions from here! We'll be online to
answer your questions here today as well.

Since a lot of folks ask, Kite continues to work 100% locally and Kite for
JavaScript is free. We plan to release support for more languages later this
year, and are taking requests at kite.com/letmeknow. Thanks!

~~~
lukevp
Adam,

Intelligent autocomplete is great. Big fan of it. However, Microsoft has
already built this out in VS and VS Code as IntelliCode, and it supports
Python, Typescript, JS, and Java.

VS Code is the most used JS editor by far and has first party support for this
that comes out of the box. What is the reason for Kite for the VS Code users
out there?

~~~
stevenmays
It says it right in the blog post. VSCode only does fuzzy matching for
javascript. This is an "intelligent" autocomplete, so the suggestions should
be better.

~~~
will_raw
No, IntelliCode is also powered with AI and does not do fuzzy matching. Fuzzy
matching happens if you disable intellisense.
[https://visualstudio.microsoft.com/services/intellicode/](https://visualstudio.microsoft.com/services/intellicode/)

------
aerovistae
Semi-related thought~ I find myself often dreaming about the AI-assisted
development processes of the future. I'll frequently be writing code and start
thinking "this task I'm doing is pretty formulaic and constrained-- it should
be automatable someday, even if we haven't figured out how yet."

Examples:

1\. I memoized the arguments for a util function. Repeat this on the very
similar functions defined alongside it.

2\. I need to put a wrapper component around six similar components. Just do
it for me after seeing me do it once.

3\. I imported a new logging mechanism and called a specific method from it in
one of my class's methods. Repeat for four similar classes.

Basically I want a "repeat after me" functionality that can intelligently
infer which part of thing I just did is generic and can thus be replaced with
the next item in the series. In a dream future it would also infer _what the
next items in the series are._

I haven't a clue how such a thing could be created though, or I would already
be on it myself. It would have to understand the code not just syntactically
but conceptually.

God it would make development less tedious though. The difference between
today and that future is the same as the difference between today and the days
of punchcards.

~~~
zomglings
When is it better to solve those problems through the organization of your
code rather than an autocomplete feature?

The things you mentioned all seem to yield to the decorator pattern.

Creating the right abstraction (instead of using autocomplete) would benefit
future collaborators who may not have access to the same autocomplete
functionality.

~~~
akiselev
The GP wanted to repeat some code modification 2-6 times. At that scale,
adding abstractions often just adds unnecessary indirection and makes the code
harder to read.

~~~
zomglings
Depends on how often they intend to make changes to that code. But in general
I think you are right.

------
r29vzg2
I’m glad this works locally. I remember Kite for Python, one of the reasons we
couldn’t use it was because it sent the code to a remote server. Glad to see
this.

------
rickstergg
It's difficult to build a solution that works for all the use cases but I hope
the team persists and so far, looking good! I love the examples of comparisons
in the links posted, everyone should go check them out to see the difference
if they're wondering if they should pick this up over the other
implementations!

------
douglaswlance
Why is Kite trying to access all of the folders on my machine?

~~~
dhung
When Kite starts, it indexes the .py files on your system so that it can have
a ready-made code index to serve responses from. This is why on macOS, Kite
will ask for access to certain folders on first startup.

There are some folders that Kite ignores, namely folders that usually contain
private data. More info here: [https://help.kite.com/article/97-adding-
libraries-from-pytho...](https://help.kite.com/article/97-adding-libraries-
from-pythonpath-to-the-kite-index)

------
thway554897256
Reminder that Kite hijacked data in the past [0]. Why should it be trusted
now?

[0]
[https://news.ycombinator.com/item?id=14902630](https://news.ycombinator.com/item?id=14902630)

------
vj44
Congrats Kite, Adam & the entire team for launching JS & Pro. Been a fan for a
while. Fingers crossed!

------
enitihas
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?

~~~
tobr
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.

~~~
enitihas
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?

~~~
tobr
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.

------
mosselman
I haven't tried this, but I'd think that having auto completion in this way,
is highly distracting. I usually start out with the basic idea of what I want
to write and while writing I go back, alter, jump around, etc. If some AI
starts suggestion whole chunks of code for me, I'd just waste time reading
what the completions are and not thinking about the actual problem I am
writing.

Sure if you are just re-implementing the same thing over and over, then this
might come in handy, but so would using OOP.

Again, haven't tried, just some thoughts.

------
chris_engel
So, when this runs completely local, WHY do I have to pay monthly? Why can't
it be bought?

And it costs more than my whole IDE (IntelliJ complete license for
_everything_) as well...

~~~
daveed
I'm guessing if they gave you an all-in price you wouldn't want to pay what
they ask anyway.

~~~
chris_engel
I am paying ~200 dollars per year for my IDE. What price would be justified
for a auto-complete plugin for bespoken IDE?

------
darkbatman
This looks more like a problem that could have easily been solved with
traditional algorithms, ranking keywords, etc.

~~~
nikisweeting
I guarantee your opinion of AI-based autocomplete will change if you try it
for a week. It's completely different than anything heuristics-based. In fact,
it often suggests complete English phrases when I'm writing prose that are
contextually relevant and grammatically valid (which makes sense, it uses
GPT-2 under the hood I think). It's crazy how good it's gotten over the last
few years.

I recommend TabNine but maybe kite is just as good these days, idk.

~~~
zomglings
Your comment convinced me. I just downloaded the TabNine extension for VS Code
and started using it for the work I'm doing (Python).

I tried it for about 10 minutes, but had to disable the extension. Two
reasons:

1\. My editor no longer brought up the useful function signature hints for
library methods I wanted to call, which is really annoying.

2\. There was a noticeable increase in lag from when I hit a key on my
keyboard to when the corresponding character appears on screen. It was hard to
get used to.

Have you noticed these issues? Would appreciate any tips you have for how to
get over this - maybe just stick with it a while?

Thanks.

~~~
nikisweeting
1\. the priority order of popup hints is customizable in VSCode I believe.
Unfortunately, I use sublime so I'm not sure of the exact fix in VS, maybe
someone else can chime in with their experience here.

2\. I haven't encountered this in SublimeText other than when I first open a
large new project for about ~30sec, maybe it's trying to index a large project
folder? I know you can set up restrictions on the folders it tries to index to
make sure it's not going wild on your whole home folder by accident.

Check out
[https://www.tabnine.com/faq/#magic_strings](https://www.tabnine.com/faq/#magic_strings)
and maybe try playing around with some of those config options?

~~~
zomglings
Thanks. Will give it another go.

------
forkLding
Think Kite is down, trying to download but getting service unavailable when I
open up this page:
[https://alpha.kite.com/release/dls/mac/current](https://alpha.kite.com/release/dls/mac/current)

~~~
adamsmith
Thanks, we believe we fixed this. Could you try again?

Thanks for your patience!

~~~
forkLding
Fixed now, much thanks

------
weareconvo
I can't put my finger on it, but this seems less like a helpful incremental
improvement and more like sowing the seeds of our own destruction. Like it's
obviously bad to only write code that you've seen other people write in
circumstances you can recognize as similar, and it's bad to only write code
nobody has ever written in history, and this just barely crosses the line.

------
aaronpaz
very stoked on this! Thanks! Been using the python version for months and
absolutely love it!

------
brauzi
Wow! Excited to hear more about Kite in the news

------
kvothe_
Code extraction alert! Would not trust this company. Google them

------
viva95
Incredible stuff!

------
tobr
Any reason to use this over TabNine[1]? I’ve been using that for months, and
only have good things to say about it. It’s like it’s reading your mind.
Strong recommendation.

1: [https://www.tabnine.com](https://www.tabnine.com)

~~~
will_raw
Off-topic maybe, but do you feel the any kind of lag with TabNine. I've
dropped using it after a month as its slowed down my editor.

~~~
droid_w
Dror from TabNine here. We've introduced some big improvements in TabNine's
resource consumption in the last few weeks, and there's more to come. In
addition, TabNine's Professional version (free trial available) lets you use
our GPU cloud servers which means dramatically reduced load on your machine.

~~~
terafo
Are there any plans to allow using local GPU?

------
nikisweeting
Having tried Kite a few years ago, and then TabNine, I ended up sticking with
TabNine.

The thing that convinced me in the end was that Kite had a super heavy editor
integration UX that needing a constantly-running Electron "copilot" app, even
uploading some of my code without clearly asking for consent first. This has
maybe changed now, but at the time that was my impression.

Meanwhile, TabNine has almost _no_ UI, it's just the tab button and nothing
else, and somehow the autocomplete "just worked" amazingly well with any
language I wrote, including English prose. The ratio of "fuss" to "gain" was
just so different between the two. One I barely remembered I had even
installed anything, my editor just suddenly became a pair programmer
overnight, and the other felt like I was running a whole electron app just to
get occasional library headers autocompleted and docstrings on hover (in only
a few supported languages).

I wish the Kite team all the best though, and I hope to see their solution
grow and improve. There is definitely room for more players in this space, and
I know they've learned many lessons from their past issues with code uploading
UX, so I hope people give them a break over that past PR gaffe.

~~~
adamsmith
Thanks for the thoughtful message!

We hope you'll give Kite another shot. We're always improving it and have
covered a lot of ground in the last few years.

In particular, a common complaint about TabNine on Twitter is that it's
heavyweight. Based on our comparisons of today's Kite versus today's TabNine,
we believe Kite uses less CPU/battery, and far less memory. (My teammate dhung
posted a longer comment about TabNine.)

~~~
nikisweeting
To clarify, my complaints about Kite being heavyweight are 90% about the UX
flow being heavy, not the CPU/RAM usage.

Kite seems to require a background daemon, Electron copilot app, and editor
plugin, with a multi-step setup to customize what things are shown on hover vs
ctrl+space vs tab. By comparison, Tab Nine was a single command to install in
SublimeText, and I have never had to interact with it since other than
pressing "tab". It seems to be completely language-agnostic with no additional
setup as well.

FWIW, here are a few pain points from trying Kite today:

\- Kite is a 1GB download vs TabNine's 64mb

\- Kite Engine is using 300MB of RAM on my machine right now, and I don't have
a single editor open, and there's no way to stop the daemon in the UI

\- "sending usage metrics" is on by default in the preferences :/ this is
really scary to someone who remembers Kite's issues with code exfiltration and
telemetry in the past, haven't ya'll learned that lesson? I had hoped all of
that stuff was disabled these days but I guess not.

\- there is no uninstall option provided, and you cannot delete the .app on
macOS because "the application is in use", yet there is no UI to stop or
diasble the daemon anywhere, do I really have to manually `pkill kite; rm -RF
/Applications/Kite.app` to remove it?

\- Your "Start free trial" link on the homepage appears to redirect to forms
filled with real user email addresses? Who do those addresses belong to, are
you leaking your users emails? [screenshot link redacted]

~~~
nikisweeting
Response from Kite about the emails leaked:

> Thank you very much for calling this out. A test version of that webpage was
> temporarily deployed by mistake. The issue was fixed immediately and we’re
> in the process of notifying the specific users who were affected.

Welp, those were real user emails being leaked.

------
sync
I've been using [https://www.tabnine.com/](https://www.tabnine.com/) for
similar AI/deep learning autocompletion, highly recommended.

~~~
slig
I bought TabNine back in 2018 used for a while and stopped, now I see it's a
subscription service. Anyone still using the old version? Is it still working?

~~~
droid_w
(Dror from TabNine here) If you're lucky enough to have bought the perpetual
license for TabNine back in 2018, you don't have to purchase a subscription as
all perpetual licenses are honored! Just reach for support@tabnine.com if you
need help.

~~~
slig
Wow, fantastic! Thank you very much!

------
hartator
Really love TabNine [1]. Same thing, AI as an editor addon for super smart
completions. Would be interested in knowing how Kite compare!

[1] [https://www.tabnine.com/](https://www.tabnine.com/)

------
brenden2
So this is just code completion? What exactly makes it qualify as "artificial
intelligence"? Did they throw some PyTorch or TensorFlow into the mix?

~~~
arkitaip
> We’ve trained a new deep learning model on 22 million open-source JavaScript
> files to ensure Kite works with your favorite libraries and frameworks like
> React, Vue, Angular, and Node.js.

