DEV Community

Cover image for AI is powerful. Snippets are instant.
piko::tutorial
piko::tutorial

Posted on • Originally published at pikotutorial.com

AI is powerful. Snippets are instant.

It’s been a couple of years since the AI hype really took off and if you’re a professional software engineer like me, you’ve probably already found places where it genuinely improves your workflow. At the same time, you’ve also likely realized that despite all the noise online about AI replacing engineers, that’s not really what’s happening. If you're deep in the IT business, you most likely already know there are still many other reasons why you can lose your job long before AI becomes a replacement for the actual work that you do.

But there’s one more thing I keep noticing more and more and every time I see it, I end up asking myself the same question:

Have we forgotten how to use non-AI tools?

A while ago, I was on a call sharing my VS Code screen when one of my snippet shortcuts expanded into a full block of code instantly. Someone immediately asked:

“Wow, that’s great - what AI is that? Can you share the skill or the prompt?”

That reaction stuck with me because VS Code snippets have been part of my workflow for years, to the point where I don’t even think about them anymore. For me, they’re just “how you code.” But that reaction made me realize how many people now assume that anything efficient must be AI. And it’s not just about VS Code snippets - I increasingly see people reaching for AI for things like:

  • searching for text in a codebase - when a simple grep or IDE search would be faster
  • renaming functions - which most IDEs already handle in one click (or via basic find & replace if needed)
  • looking up command documentation - when man pages or official docs are instantly available

And to be clear - AI is useful, I use Copilot on a daily basis in VS Code, but not every automation or productivity problem needs AI-based solution. What's even more interesting is that when you think about that, you realize that a lot of engineering work sits somewhere between:

  • manual typing of single word or pasting already copied content
  • asking AI to generate big chunks of implementation across multiple files

Between these two sit small implementation changes and minor bug fixes for which you already know exactly which 5-10 lines need to be written. You just don’t want to type - them or the prompt to get them. That’s where snippets fit for me.

Because this workflow gap feels real, I published a repository with nearly 100 VS Code snippets for C++, Python, CMake and Bazel that I use regularly myself. They’re logically organized and named to make them easy to learn to help you speed up your own workflow as well: piko::snippets.

Bellow you can find 8 examples of these snippets (2 out of each category).

C++

Creating enums and their stream operators at once

Snippet is called cenco3 (abbreviation for C++ ENum Class Operator and 3 values) and lets you define the enum class and its dedicated output stream operator to use it with std::cout or loggers operating on standard streams.

C++ piko::snippet cenco3

Including file relative to the project root

Snippet is called inrel (abbreviation for INclude RELative path) and lets you include something from the current directory by providing a path relative to the project root.

C++ piko::snippet inrel

Python

Iterating over dictionary items

Snippet is called pford (abbreviation for Python FOR item in Dictionary) and lets you insert for loop loop over dictionary items skeleton.

Python piko::snippet pford

Creating constructor which checks types

Snippet is called dconc3 (abbreviation for: Define CONstructor with 3 argument and Check type) and lets you insert a class constructor which first checks whether the provided objects match the type from the type annotiations and then creates private members with the same name as the constructor's arguments.

Python piko::snippet dconc3

CMake

Add target include directories

Snippet is called cmtid (abbreviation for: CMake Target Include Directories) and lets you insert include directories and choose scope keywords from the predefined list.

CMake piko::snippet cmtid

Install directory with pattern matching

Snippet is called cmindp (abbreviation for: CMake INstall Directory with Pattern) and lets you define installation step by providing only the important parts of the entire statement.

CMake piko::snippet cmindp

Bazel

Creating C/C++ binary target

Snippet is called bcbin(abbreviation for: Bazel Cc_BINary) and lets you insert a cc_binary skeleton.

Bazel piko::snippet bcbin

Creating test suite

Snippet is called bts (abbreviation for: Bazel Test Suite) and lets you insert Bazel's test_suite.

Bazel piko::snippet bts

Summary

I really encourage you to explore the rest of the free snippets because having a solid and reliable toolkit is what actually gets you closer to being a 10x engineer. You can download them from piko::snippets GitHub repo.

Top comments (0)