Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

When working on a script what do you guys do with unused code?

$
0
0

Generally I will comment the chunk of code out that I replace with something else until it looks or works right, that way I can go back and either change it back, reference it or add it somewhere else if needed. On my last little project the commented out code snippets started to cause my code to look really bad when left in line with the rest of the code, so I moved it all to the bottom of the script.

I don't really know if that is a best practice or very effective way of doing things. Any one have any tips of best practices for this?


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>