DEV Community

Cover image for Matt's Tidbits #46 - Scratch files
Matthew Groves
Matthew Groves

Posted on • Originally published at Medium

Matt's Tidbits #46 - Scratch files

Last week I wrote about creating a private token class. This time I wanted to share a neat feature I recently learned about to help facilitate experimental development!

Every week I receive a copy of the Android Weekly email, which contains many articles about the latest trends in Android development. If you don’t subscribe to it already, you can sign up here:

In a recent issue, I read a very interesting article describing Android Studio’s support for Scratch files. This really useful feature allows you to add experimental code that doesn’t pollute your Git repo, yet still has access to all of the libraries/code in your project! I’ve found this really helpful in being able to experiment with new code that I just want to try out or know I’m going to throw away — with the convenience of not having to create a new sample project or risk accidentally checking it in.

Jetbrains has more information on this feature here:

Perhaps most impressively, Scratch files have an interactive mode where you’re able to preview code output on the fly in the editor — in addition to being able to run and debug the code too.

The original article that inspired this tidbit is:

I encourage you to try this feature out, and let me know in the comments what other interesting use cases you come up with for this! And, please follow me on Medium if you’re interested in being notified of future tidbits.

Interested in joining the awesome team here at Intrepid? We’re hiring!

This tidbit was discovered on December 6, 2019.

Top comments (0)