Health

Developer Productiveness Instruments: Construct and Neglect

Developer Productiveness Instruments: Construct and Neglect


Final 12 months, at Cisco Dwell 2025 in Las Vegas, I used to be reviewing every thing for my session “DEVNET-3707 – Community Telemetry and AI for Community Incident Response“. I all the time check my demos earlier than my session, so I could be calm realizing it is going to work. Nevertheless, this time throughout testing, I observed the metrics in my Grafana dashboard weren’t exhibiting 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 all the time work whatever the setting nevertheless it was not working. As a superb engineer, I deleted all of the containers I used, Grafana, Telegraf, InfluxDB and created them once more, time and again till it labored.

The demo labored and my session went nicely, however this was not one thing I needed to repeat. I all the time attempt to make my tasks comply with my mantra of “construct and neglect” 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.

Once I say “construct and neglect”, I imply principally to create and configure your tasks in a method that you may construct them as soon as and neglect about them as a result of they work each single time. That is how I wish to construct and that is what I needed to share in my month of developer productiveness collection on our YouTube channel. It covers the developer productiveness instruments builders and engineers must cease combating their setting and begin coding.

Within the first video I present find out how to set your setting like a professional. As soon as your setting is ready, video 2 makes positive your IDE catches errors earlier than they trigger issues. Even with all of that, issues nonetheless go fallacious, so video 3 provides you the instruments to search out out why. And when it really works, video 4 makes positive it really works in all places, not simply in your machine.

Video 1 – Your Dev Setting

In my first video, “Set Up Your Dev Setting Like a Professional,” I share some helpful VS Code extensions and settings, together with how Distant Explorer with distant.SSH.defaultExtensions will help you get your setting on a VM instantly and should you configure your SSH shopper to ahead your SSH keys, it appears like magic; having an entire setting together with your favourite extensions in a model new VM able to push to GitHub immediately. And should you use containers as an alternative, Dev Containers are the best way to go. Right here you may outline your setting (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 setting. You could find the video right here, together with find out how to configure your OpenSSH shopper: Watch the video

Video 2 – Make Your IDE Work for You

After you have your setting prepared, it’s nice to verify your IDE is doing the give you the results you want with easy however very highly effective instruments. In my expertise, once you don’t use these instruments, it is vitally arduous to comply with 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: "express" 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 setting and your IDE are completed, a reasonably widespread process is to debug your code. Errors are so widespread, 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 comply with. Right here a debugger is good on condition 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 shortly. Breakpoints, watch expressions, the debug console (REPL), conditional breakpoints and logpoints are a few of your greatest pals 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 neglect” is the “it solely works on my laptop” concept. The “neglect” half applies wherever, 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 appropriately and you’ll all the time have the identical dependencies and identical setting, so your code will all the time work. Neglect about points with dependencies which are damaged and are usually not in your management, the dependency hell. However uv alone just isn’t 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 neglect (a minimum of 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 care for the remaining. And should you put that on a container, you could be positive it is going to run wherever. I cowl this very helpful sample in my fourth video: Watch the video

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

Assets

Listed below are among the sources I discussed within the movies:

Add any questions or feedback you may have in regards to the movies or the weblog. I can be comfortable to reply them.



Supply hyperlink

Leave a Reply

Your email address will not be published. Required fields are marked *