Developer Productiveness Instruments: Construct and Neglect

Developer Productiveness Instruments: Construct and Neglect

Final 12 months, at Cisco Reside 2025 in Las Vegas, I used to be reviewing every little thing for my session “DEVNET-3707 – Community Telemetry and AI for Community Incident Response“. I at all times take a look at my demos earlier than my session, so I will be calm figuring out it’ll work. Nevertheless, this time throughout testing, I seen the metrics in my Grafana dashboard weren’t displaying up. I panicked and began troubleshooting. After some time I discovered an error within the Python script that was amassing telemetry knowledge utilizing NETCONF, however didn’t know why. Supposedly my script ought to at all times work whatever the atmosphere but it surely was not working. As an excellent engineer, I deleted all of the containers I used, Grafana, Telegraf, InfluxDB and created them once more, again and again till it labored.

The demo labored and my session went nicely, however this was not one thing I wished to repeat. I at all times attempt to make my tasks observe my mantra of “construct and overlook” however I did discover that the script utilized by Telegraf was not following my mantra. I used Poetry at the moment and debugging it may take me some time.

After I say “construct and overlook”, I imply principally to create and configure your tasks in a means you could construct them as soon as and overlook about them as a result of they work each single time. That is how I prefer to construct and that is what I wished to share in my month of developer productiveness sequence on our YouTube channel. It covers the developer productiveness instruments builders and engineers have to cease combating their atmosphere and begin coding.

Within the first video I present easy methods to set your atmosphere like a professional. As soon as your atmosphere is ready, video 2 makes certain your IDE catches errors earlier than they trigger issues. Even with all of that, issues nonetheless go mistaken, so video 3 offers you the instruments to seek out out why. And when it really works, video 4 makes certain it really works all over the place, not simply in your machine.

Video 1 – Your Dev Atmosphere

In my first video, “Set Up Your Dev Atmosphere Like a Professional,” I share some helpful VS Code extensions and settings, together with how Distant Explorer with distant.SSH.defaultExtensions may also help you get your atmosphere on a VM immediately and if you happen to configure your SSH consumer to ahead your SSH keys, it seems like magic; having an entire atmosphere together with your favourite extensions in a model new VM able to push to GitHub instantly. And if you happen to use containers as an alternative, Dev Containers are the best way to go. Right here you’ll be able to outline your atmosphere (together with your extensions) in a devcontainer.json file and have it prepared in seconds. Better of all, this configuration is model managed and everybody who clones your repo can have the identical atmosphere. You will discover the video right here, together with easy methods to configure your OpenSSH consumer: Watch the video

Video 2 – Make Your IDE Work for You

Upon getting your atmosphere prepared, it’s nice to verify your IDE is doing the be just right for you with easy however very highly effective instruments. In my expertise, while you don’t use these instruments, it is vitally laborious to observe the code and perceive what’s going on. In my second video I configure formatters like Prettier and Black, linters like Pylint, Ruff and sort checkers like Pylance and ty. Each time you save your Python code, Black codecs it properly, Ruff and Pylint test for errors, Pylance and ty test for kind errors. And with editor.codeActionsOnSave set to supply.fixAll: "specific" and editor.formatOnSave set to true, Ruff may even repair among the errors for you, each time you save your code. The second video is right here: Watch the video

Video 3 – Debug Like You Imply It

After the atmosphere and your IDE are performed, a reasonably frequent activity is to debug your code. Errors are so frequent, particularly when coping with distant knowledge buildings like YANG fashions, the place you don’t have a transparent REST API schema and also you solely have the YANG schema, which isn’t that straightforward to observe. Right here a debugger is good provided that relying on how your gadget is configured, the information you expect is perhaps lacking. The launch.json file helps you configure your debugger so, with a easy F5, you can begin debugging your code rapidly. Breakpoints, watch expressions, the debug console (REPL), conditional breakpoints and logpoints are a few of your greatest buddies when issues go south and also you don’t know why. In my third video I clarify the launch.json file and undergo these debugger instruments: Watch the video

Video 4 – Ship It Wherever

Lastly, it’s time to ship your code, and one thing that contradicts my mantra “construct and overlook” is the “it solely works on my pc” concept. The “overlook” half applies anyplace, your laptop computer, your coworker’s laptop computer, a server, a pipeline, and many others. If you’re growing with Python, I’ve discovered that uv is nice for reproducible builds. Use it accurately and you’ll at all times have the identical dependencies and similar atmosphere, so your code will at all times work. Neglect about points with dependencies which might be damaged and usually are not in your management, the dependency hell. However uv alone is just not sufficient, to get probably the most out of uv you may want to make use of particular flags and instructions which with time you’ll overlook (no less than I do), that’s why uv + make is a superb mixture. I solely have to recollect easy instructions like make construct and make run and the Makefile will maintain the remaining. And if you happen to put that on a container, you will be certain it’ll run anyplace. I cowl this very helpful sample in my fourth video: Watch the video

Bear in mind the mantra “construct and overlook” and apply it to your tasks; it’ll make your life simpler. I’ve been following this mantra for all my newer tasks they usually simply work, and I can loosen up.

Sources

Listed here are among the assets I discussed within the movies:

Add any questions or feedback you’ve gotten concerning the movies or the weblog. I will likely be glad to reply them.

0
YOUR CART
  • No products in the cart.