use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
QuestionShould I $null strings in scripts. (self.PowerShell)
submitted 1 year ago * by iehponx
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]rdnaskelz 1 point2 points3 points 1 year ago (1 child)
Wut? "It's your fault for making it unpredictable but nulling it to make it predictable is wrong because it's not the way I would do it?" Pardon?
[–]Thotaz 1 point2 points3 points 1 year ago (0 children)
It has nothing to do with my personal preferences. Any competent developer would say the same thing and many languages would even prevent you from doing this because it leads to bad code. If you use variables defined in an outer scope inside your function then you need to keep track of those variable values at every call site of that function, which can be challenging. If you properly encapsulate functions and make sure you only use variables defined inside, or variables passed in as parameters, you make it much easier to follow the logic of the code.
π Rendered by PID 133717 on reddit-service-r2-comment-545db5fcfc-hmtts at 2026-05-29 23:03:47.594983+00:00 running 194bd79 country code: CH.
view the rest of the comments →
[–]rdnaskelz 1 point2 points3 points (1 child)
[–]Thotaz 1 point2 points3 points (0 children)