days
-4
0
hours
-1
-8
minutes
-3
0
seconds
-5
-3
search
JAX Developers Puzzle deadline approaching: Play for a chance to win a complimentary JAX London 2018 ticket!
Coding cheat sheets in real time

Codota: Using AI to make our code better

Jane Elizabeth
Codota
© Shutterstock / JoeBakal

Coding in Java? Codota makes it even easier with an AI pair programmer designed to help you write code without having to check other references online. Does this mean one day robots will take over our developer jobs? Maybe, but not quite yet.

Coding is difficult, but checking references like Stack Overflow or GitHub certainly help. (FYI, we even have an entire JAXmagazine dedicated to coding cheat sheets!) Now, Java developers have an even cooler option: AI-assisted code with Codota. Personally, I’ve always wanted to have an AI help out when coding.

Codota is an artificial pair programmer that learns from existing code to help you build software faster and smarter. It runs alongside whatever IDE you’re using and uses its learned code models to suggest relevant code.

How does Codota work?

According to the Codota site, it builds predictive models of code that suggest code completions and related content based on the current context present in your IDE. The program combines techniques from program analysis, natural language processing, and machine learning to learn from code. It then presents the results of different models for helpful code for any given task.

Basically, if you’ve downloaded Codota, it has a linked window to your IDE of choice. So, whenever you select a variable, type or method, the linked Codota window gives you code examples related to what you’ve already written. Call it really good guesser for code snippets.

SEE MORE: Top 5 machine learning libraries for Java

There’s even a search function to get even more appropriate code snippets. It’s super simple to add these code examples into your IDE with a basic wholesale copy-paste.

How is this AI, exactly? Well, according to Marcel Bruch, Codota ranks the code examples. Hopefully, that means that the most relevant ones are closest to the top. Codota is currently limited to Java, as it needs to understand the language it’s analyzing.

Limitations

There are some limitations, of course. Codota doesn’t know the essence of code just yet; you’ll often be given a piece of real-world code as an example. Obviously, that means it isn’t always guaranteed to be pretty or clean. But since Codota draws its knowledge base from places like GitHub, Bitbucket, and Stack Overflow,  it’s getting better every day.

They have a pretty interesting promo video that shows in depth how it works.

Codota runs on Linux, Windows, and macOS.  The program works with Eclipse (Mars and later), IntelliJ (14 and later), and Android Studio. Unfortunately, it doesn’t support NetBeans yet, but they’re currently taking suggestions on which IDE they should support next.

 

If you’re interested, head on over to Codota and check it out for free! Are you interested in having an AI coding partner? Tell us what you think!

Author
Jane Elizabeth
Jane Elizabeth is an assistant editor for JAXenter.com.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of