The Tabnine Podcast: Will AI eventually write the code for us?

Posted on April 19th, 2021

https://soundcloud.com/tabnine/part-2

Kyle ponders how AI tools might in the future better understand our programs, and adjust and augment them as we write code. Eran shares some predictions about how that might play out. The discussion broadens to whether AI-refined code may move programs (and programming!) in a productive or destructive direction, and whether (and how!?) tools can keep assisting developers instead of replacing them.

Kite vs. Tabnine

Posted on April 7th, 2021

 

https://www.youtube.com/watch?v=10cO9UNsA3Y&ab_channel=CodewithAniaKub%C3%B3w

YouTuber and JavaScript Specialist Ania Kubów took the time and effort to help her dev community decide: which AI code completion tool they should use to get their code done better, and faster. In order to get a fair result, Ania threw a thrilling showdown:

Kite vs. Tabnine – The Ultimate Battle

In the video, Ania displays a split-screen featuring 2 recorded sessions from her code editor. The exact same code is being written in VSCode on both sides of the screen, with only one difference – Tabnine is installed and activated on the left-hand side, and Kite is active on the right-hand side. Can you guess who took the trophy? Press play and find out.

Read more from the blog: Github Copilot vs. Tabnine

First impressions: Tabnine really gets me

Posted on October 1st, 2020

I recently installed the Tabnine plugin for Sublime (Windows), and spent the last several weeks using it while coding on some of my side projects, just long enough to get a solid first impression of this tool: Tabnine is amazing.
Going in, I was a tad skeptical that a tool was going to be able to figure out what I was trying to do in my code fast enough to suggest anything more substantial than just completing the current identifier.
But I have been really pleasantly surprised, and delighted, by just how quickly this tool is learning my code—and how quickly I’m learning to use it!—to accelerate my coding. I wanted to share some examples I recently captured, to give you an idea of the kinds of things you may see if you use it.
Of course, this tool is powered by complex natural-language ML models and rulesets, and it learns from each project it’s used on, so… YMMV. But, I think if you give Tabnine (or Codota, depending on which editor you use) a try, I think you may be amazed at what pops into the autocomplete drop-down! Check it out.

Learning a Pattern

The first example I want to show you came from a segment of logic I was writing which just happened to have a pretty clear structural pattern to it, though I didn’t plan it that way particularly. And I didn’t realize it at the time, but it seems like that was a really attractive opportunity for the Tabnine plugin to kick in with its powerful semantic analysis.
As you’ll see, it progressively figured out more of the structure as I went along, and made even more impressive suggestions at each juncture!
I had a bit of code logic that processing a couple of URLs that had been split into multiple parts (“protocol”, “origin”, and “path”), and I needed to compare these parts (including handling * wildcards) to see if the URLs match.
The result should be a boolean (true / false) if a match exists respectively for each part of the URLs.
tabnine suggestion #1
As you can see in this screenshot, the plugin figured out that I wanted to use another variable called pageProtocol for the comparison. You don’t see this in the screenshot, but that variable is declared a dozen or so lines above, in the same function, nearby where patternProtocol is declared. So, Tabnine figured out that these two identifiers might have a relationship.
I hadn’t even typed p yet, so it just made that guess not based on token completion but on semantics.
Continuing on, the next boolean I wanted to declared, I typed pat, as you can see, and Tabnine (somehow, not quite sure!) figured out that I wanted to type pathMatches! OK, now I’m impressed.
tabnine suggestion #2
So I started to fill out this boolean’s matching logic, and…
tabnine suggestion #3
Boom, it knew that I needed to do the wildcard check again. Notice how it knew that semantic, but it also knew that I needed patternPath as the identifier! How!? My best guess is, it understood the relationship in the first declaration between protocolMatches and patternProtocol, and thus extrapolated that same relationship between pathMatches and patternPath. And as a bonus, it even added the ||on the end.
I won’t lie, that was a little freaky at how good that suggestion was!
Continuing on, it seems to be understanding the structure of these comparisons, and how the different variables fit in, kinda like the semantic analysis results in a “template” that identifiers drop into:
tabnine suggestion #4
Wow. This is really starting to be quite helpful.
Let’s keep going. Now I realized that I accidentally skipped over the “origin” matching boolean, so I went back to insert that in the middle:
tabnine suggestion #5
Here it still understands enough to suggest the rest of that line of code as soon as I get to the “O”. Nice.
Then…
tabnine suggestion #6
I typed just one letter, p, and it knew the whole rest of the line! And it got both identifiers correct! This is really, really impressive. I’m hooked.
So here’s the completed snippet:
tabnine suggestion #7
After I see the code snippet complete, then I realized something I hadn’t seen before… the plugin even understood that in each pair of comparisons, I was intentionally using == for one check and === for the other. That’s on purpose, because of the nature of the values that I know can be in each of those variables. I don’t think Tabnine used any type awareness for those suggestions, but it’s still cool that it respected how I was doing my comparisons.

What if…

OK, so… in that previous example, the structure was a little too convenient, and that ended up helping Tabnine make some pretty great suggestions. Right?
What if another chunk of code has a little less obvious structure to pick up on? Will I still get useful suggestions?
tabnine suggestion #8
Check out how Tabnine here figured out that I might want to assign the value from the property that I did a check for in the surrounding if statement. That’s indeed what I was going for, and Tabnine nailed it!

For real?

This example really amazed me… I sat there for a good several seconds doing a double and triple take, saying, like “Really, did it actually make that whole suggestion!?”
tabnine suggestion #9
It clearly matched to the for-loop from the earlier function, but look at how it correctly figured out that the method to call was getVideoTracks() instead of just copying getAudioTracks(). I guess it got the hint from the names of the functions I chose (which was accidental, I promise).
But it’s really pleasing to see the tool figuring these nuances out!

A window into its thinking?

Here’s another example where a previous statement gave just enough of a hint to Tabnine:
tabnine suggestion #10
Again, it figured out the relationship between the variable windowWidth and the property name outerWidth. We’ve already seen that.
But it also figured out that I was wanted to deal with height instead of width. How did it do that? I think it picked up on that detail from the previous two lines, which involved width / videoWidth and height / videoHeight, respectively. So it extrapolated that since I did “width”, then “height” before, that I probably wanted to do that again on these two lines.
Again, my only reaction is… just… wow. Cool.

Learning

So, obviously, this tool is learning, not just from all the public code the models were trained against, not just from the rules the Codota folks baked in, but also it’s learning from my project, my code. As I used Tabnine, it’s learning how to help me more effectively.
That’s just super satisfying to realize.
But there’s another effect here. As I get more used to using Tabnine, I am learning. I’m learning to use the tool more effectively. I’m actually sensing when and how I might be able to code in such a way as to give it enough hints that it’ll spit out a useful suggestion to save me some typing.
That’s not perfect or completely deterministic, of course—this is AI!—but, I’m finding that maybe 1 out of 3 times I try to get it to give me a specific suggestion, sure enough, it spits out something either spot on or pretty close.
So it’s like the Tabnine tool and I are mutually learning each other. This just feels really good. We’re both working together to make me more effective and efficient at coding.

Summary

I know this article focuses mostly on all the happy path examples I pulled out. You may still be skeptical, like I was. You may be wondering about the limitations and the times it gets it flat out wrong.
Yes, there are definitely limitations to this. Yes, it definitely spits out wrong suggestions a fair bit.
But, in my estimation so far, I’d say about 50-75% of the time that I see the autocomplete list popup a set of semantic suggestions from Tabnine, at least one of the suggestions is at least part of what I was likely going to type. And maybe 10-20% of the time, those suggestions are something I should type, but my brain hadn’t quite come up with yet!
Over time, I expect this tool will only get better at helping me out. And I’m really excited to be working with the folks at Codota to provide them feedback on how to improve the tool even further. There’s already a long list of fun and cool things we’re exploring, so stay tuned to this space!
If you try out the Tabnine (or Codota) plugin for your editor, and you give it a week or two to get used to (and for it to learn your coding), I think you’ll be really pleasantly surprised at how helpful you may find it. If so, I hope you’ll reach out to me via social media (@getify on Twitter, etc) and let me know what’s great and what you hope it can eventually do!

Kyle Simpson (@getify) is partnering with Tabnine to expand our developer empowerment program

Posted on August 4th, 2020

I’m super excited to announce that Kyle Simpson, AKA @getify across social media and dev platforms, is today joining forces with Tabnine to expand our Developer Empowerment Program – allowing software developers to leverage AI to code faster and better.

Who is Kyle?

If you do know JavaScript, then you probably already know 🙂

Kyle is one of the most outspoken voices in pushing developers to understand their tools and their craft more deeply. He’s written 10 books with over 200,000 copies sold worldwide, and his online courses have been watched for nearly 700,000 hours. He’s spoken at over 150 events in 24 countries across 6 continents, and he’s taught more than 5,000 developers face-to-face. His passion for broadening and deepening developers’ skills is unmatched.


Sharing a mutual vision – to empower developers

As we began engaging and partnering with leading figures in the dev community, we approached Kyle to ask for some advice, and also to see if he may be interested in collaborating.

We instantly realized that we share a very similar grand vision. Both Tabnine and Kyle are big believers in the open-source web, in building better tools for software developers and in empowering them with the best technology the world has to offer. 

Kyle has helped hundreds of thousands of developers learn JavaScript through his books, courses, code, and talks. He’s also worked with dozens of companies to help their R&D teams work better together and is an influencing figure on many topics around evolving technology.

Sharing a mutual vision and an overall philosophy on how AI will empower software developers, both sides felt like we have a very strong basis for an official relationship. The future of the web as we know it is changing rapidly, and we can’t be happier with having Kyle on board, to help us scale up our engagement with the community, sharing our knowledge and insights, and getting feedback from developers who use our products. 


As Kyle himself wrote here on his blog post: I admit I became quite intrigued as I discovered their core philosophies are so well aligned with my own: to leverage knowledge and technology to empower people (developers) to achieve more.

What to expect?

As we launch our Developer Empowerment Program, stay tuned for Kyle:

  • Sharing his combined knowledge on building software, solving problems and using AI in the mix
  • Hosting conversations with interesting people from the global dev community
  • Writing opinionated blog posts
  • Speaking in virtual events and conferences
  • Helping developers and R&D teams unlock the power of AI in coding tools
  • Engaging you, the community, to hear your feedback and help us improve your coding experience with Tabnine

For the JavaScript community in particular, this is a double treat. Not only will @getify continue to preach and teach JavaScript in all its glory, but now he will also spice it up with AI and Machine Learning and see where it all fits in and how it helps you know JS even better.

We can’t wait to see Kyle bring  Tabnine and the global community of software developers together, ensuring your feedback helps us empower you and stretch AI beyond its limits.

Welcome Kyle!

Dror Weiss, 

Tabnine CEO.

Tabnine is now part of Codota

Posted on March 23rd, 2020

Dear Tabnine and Codota users. 

I’m excited to announce that Codota has acquired Tabnine late in 2019. In this post, I’d like to share more about Tabnine and Codota’s future.

Both Codota’s and Tabnine’s mission is to make developers more productive by automating mundane and repetitive parts of programming. With this shared mission in mind, both Codota and Tabnine set out to introduce AI to software development, using slightly different technical approaches. Each of the approaches has its own advantages and has gained popularity in different communities, which made the decision to join forces straightforward.

I would like to take a step forward and share our plans for Tabnine within Codota.

Tabnine Maintenance: Following the deal, Tabnine’s creator, Jacob Jackson, is now a part of the Codota team as an advisor. After going through intensive in-person training with Jacob, Codota’s engineers are maintaining Tabnine and working with the community to make sure Tabnine keeps improving. Those who follow Tabnine closely might have noticed them getting up to speed in handling issues in the last few weeks. I am confident that with the additional muscle and resources we devote to Tabnine, the project will keep thriving.

Tabnine community: We will continue to work with the Tabnine community to hear feedback, prioritize issues and help the creation of additional plugins for Tabnine. The central GitHub repo will continue to serve as the go-to place for users.

Privacy: We will continue to respect the privacy of Codota and Tabnine users. Both Codota and Tabnine products use the minimal required information for contextualizing queries (over an encrypted connection). This contextual information is ephemeral and is not stored anywhere after the query has been fulfilled. We will continue to clearly communicate what private info is being sent, and how it is used. Tabnine will continue to have an offline mode that does not require an Internet connection and does not send any data to the cloud service.

Product Integration: We see great opportunity in combining the semantic models of Codota with the textual models of Tabnine. Each of them beautifully complements the others, and a thoughtful combination of the two is far superior to any of the models individually. We have recently shipped a beta of the Codota plugin for WebStorm/IntelliJ IDEA that provides code completion based on a combination of the two models. You are most welcome to try it and tell us what you think. Further in the future, we plan to combine the brands so we offer a single product.

Free and paid plans: Both Codota and Tabnine will continue to have free-forever plans that allow developers to enjoy a great code prediction experience. As both Tabnine and Codota originally intended, we will offer paid plans that enable code prediction for larger projects and other advanced features. We are excited to release them soon and believe they provide excellent value to individuals and teams who create software professionally. We will soon start offering student discounts as well.

From day one, Codota set itself to change how we all write code. Leveraging years of research and specialized AI models, we are shaping the future of software development – making developers faster and better.  By joining forces with Tabnine, we are now proud to be the market leader in this space.

In sum, we see a bright future for the integration of Tabnine and Codota and see a very promising future for AI-assisted software development. Our success depends on your trust and enthusiasm. We will do everything in our power to be a worthy part of your coding workflow.

Dror Weiss, CEO

Codota

Get Tabnine now


Semantic

Posted on November 20th, 2018

Tabnine was created as a language-agnostic autocompleter. The core idea behind Tabnine is that by indexing your code and detecting statistical patterns within it, Tabnine can make better suggestions than a completer which understands your programming language. This brings additional gains in responsiveness, reliability, and ease of configuration because Tabnine doesn’t need to compile your code.

Nonetheless, there are some situations where you would rather use a semantic completer than Tabnine. For example, if you don’t know what methods are contained in the class Math, you could type Math. and see what suggestions are provided by the semantic completer. Also, semantic completers can provide documentation and type signatures together with their suggestions.

That’s why Tabnine now supports semantic completion. Tabnine continues to be language-agnostic: semantic completion is provided by external software which Tabnine communicates with using the Language Server Protocol. Tabnine comes with default install scripts for several common language servers, and this is fully configurable, so you can use a different language server or add semantic completion for a new language if you wish. You can read more about how to configure it here.

Here’s an example:

Here, Tabnine uses the language server to provide type signatures and documentation for the suggestions. Also note that Tabnine is using its index to sort the language server’s suggestions in order of frequency, placing new and with_capacity at the top.

The skeptical reader asks: why use Tabnine together with a language server when I could simply use the language server instead? Here are three ways in which Tabnine improves the user experience over the language server alone:

  1. Many language servers are slow. If the language server is slow, Tabnine will provide its own results while querying the language server in the background. Tabnine typically returns its results in 20 milliseconds or so, while Jedi, a completion engine for Python, usually takes around 500 milliseconds. Rather than waiting for Jedi, Tabnine will provide its results immediately and cache Jedi’s suggestions to be returned instantly once you type more characters.
  2. Language servers don’t always have the right completion. When you use an autocompleter, you give it half-written code that may contain syntax errors, type errors, or references to functions that you haven’t written yet. These cases are challenging for language servers because they need to make long chains of inferences to determine what completions to suggest, so breaking any link in this chain can disrupt the entire process. Tabnine is robust to half-written code because it does not parse the code, so there are no long-distance effects.
  3. Multi-token completion. Tabnine can improve the language server’s suggestions by suggesting multiple tokens at once. For example:
    (image)
    In this example, Tabnine uses Jedi to infer that z is a string and has an encode method. Then Tabnine uses its own multi-token completion engine to suggest encode(‘utf8’) rather than simply encode.

Semantic completion is part of Tabnine 1.0.7. You can read the full changelog here.