Just Add Comments, Please.

Quick Notes on organizing your scripts for future use.

Unrelated Generic Code Snippet / Photo by Shahadat Rahman on Unsplash

To get this blog started, I really just wanted to start writing... about ANYTHING. So I figured starting with something that comes up at work quite often is as good a place as any.

Many times people find themselves in a position where they are going back over work that was created by someone who no longer is there. In this case, I’m talking about myself and almost any SCCM package I have come across.

I was given an update to a package and found that most of the old files had no organization. What irks me about this is how simple it is to be descriptive.

For example, using a .bat that I have launch some daily apps:

It isn’t IMPOSSIBLE to read, but it’s certainly not clear. Imagine expanding on this with more programs (which I have) or simply writing anything longer.

I have come across old files that point to license servers, create paths, delete directories, call other programs (at this point using a batch files might have been a bad idea versus PowerShell, VBScript, etc.) but when coming from someone else’s work, it’s hard to find the time to completely rewrite something.

A better solution is SO simple, just use comments and spaces. Better yet, add separate documentation that breaks things down when needed. Wild, right?

It is so easy to do. Think of your coworkers (the ones you like, that is) the next time you write anything that may get reused.

I know this isn’t revolutionary and I could (maybe I will) write an entire blog on proper documentation, ways to improve upon it, and better yet organize it… but putting my 2 cents on the internet makes me feel just a little bit better.

Besides, maybe the old SysAdmin who left me a 4 page batch file (yes 4 pages, it was a word document for some reason) with no comments might learn a thing or two from this post…

Mason C.B.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mason C.B.

IT Professional / Creative Hobbyist. Just trying to be all that I can.