You Should Create A Developer Swipe File

Karl Clement
Apr 11, 2022
5 min read

“Good artists copy, great artists steal.” This applies well beyond the world of art. Great marketers, for example, steal all the time. They copy images, styles, phrases, colours, and designs. They do it so often, they’ve formalised the process of “swiping” marketing examples for reference later. They call this collection of inspiration a swipe file.

As a creative, starting from scratch is difficult. It is valuable to have inspiration and references when creating something new. It helps you capture and recreate some of the “magic” others before you created. It helps anchor creations in prior success and stand on the shoulders of giants.

The benefits of a swipe file aren’t exclusive to marketers. Developers get similar benefits from references and inspiration because they also have to do creative work. Designing, structuring, and writing code are more creative than people realise. To help with this, you as a developer should create and utilise a swipe file.

Why Developers Should Have A Swipe File

At its best, a developer’s swipe file is similar to supercharged documentation. It is a reminder to yourself of what you’ve found valuable in the past. It provides examples of what “great” looks like for code you’ve read and written. It helps you make key decisions about the future code you'll write.

A swipe file, ideally, becomes part of your brain. Instead of repeatedly thinking about code patterns, structures, style, and naming conventions, you can add them to a swipe file. When creating something new, you can reference the swipe file, and free your brain to think about other things. Your time and attention are valuable, and swipe files help you channel it into more valuable places.

Swipe files also help maintain quality over time. Lessons learned from writing code, reading code, and learning a language are solidified by adding them to your swipe file. This builds a base of reference for future code to build on. This knowledge compounds as you use it more and add more to it. You start each new project with a fuller understanding of best practices, which helps you write quality code.

When working on code, the swipe file becomes another place to search like Google, Stack Overflow, or documentation. What it has above all these sources is that it is curated by you. At one point, you found the information there valuable enough to keep, and that can be a better sign than Google ranking or Stack Overflow votes. Because you’re familiar with it, you can process the information it contains faster and get back to valuable work.

Your swipe file can also be valuable for your team. It provides them with examples of code you find valuable. They may not know what good code looks like, or disagree about what it looks like but, either way, it provides practical examples to show them how you are thinking. Sharing knowledge like this can build context within the team. It helps everyone have shared opinions and move faster.

Creating A Developer Swipe File

Your developer swipe file can look like many different things. It can be a collection of files with code you use for references, such as high-quality classes, methods, or style. It can be guides, Stack Overflow answers, and documentation sections you reference often. It can be handy tricks of languages, ideas you repeatedly reference, or concepts you’d ideally like to use. For example, remembering ascending vs descending for Javascript’s sort() function.

The most important points for swipe files are that they must contain information that is useful later, and you must reference that information later. If either of these is false, your swipe file is useless. When creating a swipe file, ask yourself “what would be useful for future me to know?” A swipe file is only as good as its future usefulness.

As an example of what you can do, start a file, add an example of a well-written class and method. Add an example of a well-structured file. Read the docs for your preferred language and add a list of methods you forget. Next time you are doing work related to any of these areas, reference the swipe file and improve it over time. Don’t worry if it’s messy or barebones to start, you can always change it. For example, you might want to remove information that becomes irrelevant or too familiar to maintain quality.

You should tailor all this information for your use. It shouldn’t be what other people find useful, but what you find useful. Ideally, you’d reword and rework concepts and code to fit your understanding. You’d use keywords that help your future self search and reference the document. You’d build it as you build knowledge of a project or language.

Swipe files compound when used correctly. They create a tailored guide to information you find useful, but this takes time. Don’t be discouraged. To get the most out of a swipe file, you have to add information to it and reference it often. The more information you add there and the more you use it, the better it becomes.

Swipe Files and Context Building

Swipe files are a tool for creating and remembering context, and not just a tool for marketers. As a developer, they help you remember what is relevant and what great looks like. This provides inspiration and reference for writing better code.

Swipe files should be valuable to your future self. If they aren’t, you are doing something wrong. You want to help your future self build the context of what they are working on. This requires adding information and referencing it often. A swipe file compounds and becomes a part of your brain that improves your ability to write valuable code.

If you want another tool to build context and write valuable code, you should check out Codex.

Remote work is the new normal. Start using Codex today.

Install Codex today to start making your engineering team more productive.

Install VS Code Extension

or download from the Visual Studio Marketplace