Introduction to TeaCode

In short: we'll show you some methods of effective code writing and prove why TeaCode is the app you need, obviously.

IDEs and code editors provide lots of different methods that help to write code effectively. Auto‐completion is a must-be for an IDE. You don't need to remember all the classes and methods. IDE remembers them for you. However there are also tools that help to type whole code structures.

Solutions available before TeaCode

Let's take a quick look at solutions that have been available before TeaCode.

Code Generating

Some IDEs (like the great PHPStorm) provide code generating. Especially useful when it comes to generate getters and setters. Just a few click and it's done. With documentation included. It's really great, but it's usually limited to features that are already implemented.

Macros

It's another good approach. Record a sequence of steps that can be reproduced later on other code fragments. It's not too handy method, but it works.

Snippets

Many developers like to keep useful fragments of code, so they can be used any time. Just copy the code (or drag and drop), adjust it a little bit and it's done.

Templates

Some IDEs and editors support simple shortcuts that might be triggered by key or chosen from code completion list. It is easy to remember and creating new templates is simple. However you need to read and analyse the template and do some adjustments like deleting unnecessary fragments and complete the code.

The following example shows what happen when you type func and you choose func — Swift Function Statement from the code completion list. Code Template

TeaCode

As it might be expected, the last thing is our app. TeaCode works with most code editors for macOS. For the native editors (Xcode, TextMate, Coda, etc) it does not require any plugins to be installed. It just works (thanks to Accessibility mechanisms.)

TeaCode is another method to write code quickly. It uses Expanders: simple input patterns that are converted to appropriate output templates. It might sound complex, so let's take a look at an example. When you type: gl variableName and press ++e, TeaCode will replace that code with:

guard let variableName = variableName else {
    return
}

Quick. No need for any adjustment. No need to search for the snippet. You're still focused and your code is simply there.

But it's not all. TeaCode allows to create new Expanders (and editing built-in ones) using simple language. It supports variables, subexpressions, filters and basic optional expressions.
Also making new expressions is easy. The following screenshot presents the previous example:

Screenshot