The heart of tech

This article was published on November 17, 2015


    The Luft plugin for Xcode tells you when your code is getting out of control

    The Luft plugin for Xcode tells you when your code is getting out of control
    Nate Swanner
    Story by

    Nate Swanner

    Former Reporter, TNW

    TNW's former West Coast writer in the PNW (Portland, Oregon). Nate loves amplifying developers, and codes in Swift when he's not writing. If TNW's former West Coast writer in the PNW (Portland, Oregon). Nate loves amplifying developers, and codes in Swift when he's not writing. If you need to get in touch, Twitter is your best bet.

    Developers that deal with Xcode know how frustrating a long, winding View Controller can be. To help you recognize when you should move some code into other files, Luft subtly alerts you that your View Controller is getting out of hand.

    It’s not a buggy pop-up alert or series of annoying dings, either. Luft simply changes the color of your gutter depending on how many lines of code you’ve written.

    screenshot

    For view Controllers with less than 150 lines of code, the gutter stays green. If you’re between 150 and 300 lines, expect it to turn yellow. Over 300 lines and your gutter turns red.

    You don’t have to make any changes, either. Luft simply lets you know when things are unruly. If you’d rather live in spaghetti code, be my guest — but don’t complain when it comes time to update your app.

    Luft can be downloaded via GitHub.

    ➤ Luft [GitHub]