Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kotlin Project Theme(s) for Open Academy - 2013/14

The Kotlin Programming Language

Kotlin is a modern statically typed programming language targeting the Java and JavaScript platforms. It is conceived as a "modern language for industry", keeping a balance between flexibility and readability, expressiveness and safety.

Project Overview

A modern programming language is much more than a grammar. Principal susystems of Kotlin include

  • Compiler front-end
  • Lexer/Parser translates text into a syntax tree, reports syntax errors
  • Type Checker resolves names, infers and checks types, annotates the syntax tree, reports typing errors
  • Java front-end loads Java classes from .java and .class files, so that the Type Checker can see them
  • Back-ends (code generators)
  • JVM back-end generates JVM .class files from a syntax tree annotated by the Type Checker
  • JavaScript back-end generates JavaScript source code from a syntax tree annotated by the Type Checker
  • JVM runtime supports reflection and other similar capabilities on the Java platform
  • JS runtime supports run-time behavior on the JavaScript platform
  • Standard library
  • Functions and classes for common programming tasks: from io and collections to XML and HTML manipulation
  • IDE
  • IntelliJ IDEA plugin facilitates editing and inspection of Kotlin source code in IntelliJ IDEA and Android Studio
  • Eclipse plugin provides similar services in Eclipse
  • Interoperability services
  • Java-to-Kotlin converter turns Java source code into Kotlin source code
  • KAnnotator inspects .class files and infers more precise types than Java allows to specity
  • Build tools
  • Ant, Maven and Gradle integration

Objectives

The first objective is to become familiar with the language. The best way to do it is to work on the subsystems already written in Kotlin, such as the IntelliJ IDEA plugin. By working on minor issues in these subsystems the student gets to know the language, the tooling and the overall workflow.

Once the stage of first acquaintance is passed, the objective will be set according to the student's interests. Examples of possible topics:

  • Support new capabilities in the IntelliJ IDEA plugin
  • intention actions - ways of helping the user perform otherwise tedious task such as simplifying boolean expressions, reordering code etc
  • quick fixes - quick ways to automatically correct errors in code
  • code inspections - automatic detection of problematic code and "code smells" + quick fixes for these problems
  • live templates - easy ways to create common code structures with just few keystrokes (e.g. iterate over collection is just iter + Tab)
  • Improving Java-to-Kotlin converter
  • the main objective is emitting more idiomatic Kotlin code rather than just mirror Java constructs

Many other areas are available for exploration.

Work on the topics from the list above promote students' skills in one or more of the following areas:

  • compiler construction
  • static code analysis and transformation
  • user interface design and implementation
  • multithreaded programming
  • high-performance systems

Last year's experiences

Last year's students worked very efficiently on the IntelliJ IDEA plugin, made dozens of contributions, including rather elaborate ones. Results on Java-to-Kotlin were very modest in comparison, but some useful contributions were made as well.

Best students built a rather deep understanding of Kotlin's internals and, along with their assigned tasks, contributed fixes and enhancements to core subsystems, such as Lexer/Parser and Type checker.

Requirements

The top requirement is that the student should be willing to understand problems deeply and get things done.

The project is written in Java 1.6 and Kotlin. The tooling we use includes

  • IntelliJ IDEA (open source Community edition)
  • Git
  • Ant, Maven
  • TeamCity Integration Server

More information on getting started is available here. A web-based demo of Kotlin is available here.

Evaluation

Students will be getting continuos feedback in the form of code review and discussions with the mentor(s). The primary evaluation criteria:

  • Acquired knowledge of Kotlin as a programming language;
  • Acquired knowledge of the subsystem(s) the student worked on;
  • Ability to follow the workflow, use the tooling and communicate with the rest of the team.

Contacts

  • Andrey Breslav andrey.breslav (at) jetbrains (dot) com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment