Tyops and PowerShell

When writing a recent blog post, I noticed that some text I had copied from a website to quote certain specifics, had misspelled words and missing dashes in words. How did I notice this? It wasn’t because I was looking for it, but it was because my blog post editor showed these mistakes with red squiggly lines underneath of the mistakes.

Why does this matter? For my blog posts AND for my PowerShell code, I try to make sure all of the words I use are consistent, spelled correctly and are not missing dashes (i.e. third party vs third-party). I do it to be professional and it can reflect badly on me if I am not careful. Also, misspelled PowerShell cmdlets will fail to work, causing you headaches in troubleshooting.
So for this PowerShell tip, it’s a simple concept – use an editor with at least spell check. If it can do grammatical checks, that is a bonus. Additionally, any PowerShell checks it can do are an absolute must. At the very least use Word or some other document writing software to check it out.

Editors and Experience

Personally I rely on my blog editor software to notice these things and then correct them as I see them:

Website Editor (spelling aware):


Notepad – which is not aware:

PowerShell ISE (Win 10) – not aware either:

Microsoft Visual Code

Without PowerShell extension enabled:

With PowerShell extension enabled

With either option, no automatic spell check is enabled. The color coding does help. In order to get a proper spellchecker, we need to install an extension – Ctrl-Shift-X while in Visual Code:

Solution?

So if you editor won’t handle it, how do you handle it? For any of these code editors look for a spell check extension that meets your needs.
Conclusion

Check your work. Look for spelling and grammar mistakes, misspelled PowerShell cmdlets and in general, try to follow best practices. As a failsafe, copy your code/articles into Word and let it spell check and grammar check your work. You may find a few mistakes before they go public.

Related Post

ConsistencyConsistency

Depending on your background or tendencies, coding may not come natural as it does for other people. I have found over time that one aspect in coding will make your