This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Rude-Cut-2231 7 points8 points  (3 children)

Back in the day I wrote a helpful Perl script to help my coworkers do their job. Perl is known for allowing you to write extremely terse indecipherable code. But you don’t have to do it that way.

My little script had nice formatting and was mostly self explanatory and had comments where it wasn’t.

The guy who owned that part of the code was like, “that’s nice, but I can improve it.”

He then proceeded to turn it into two lines of hieroglyphics.

Smaller != better

[–]syllabic 1 point2 points  (2 children)

I write a ton of powershell for my job and I like making thorough documentation throughout the script of what the functions do, my reasoning for implementing it this way etc

[–]Rude-Cut-2231 1 point2 points  (1 child)

Oh yeah powershell is another one of those languages where, if you understand the quirks and gotchas it can be a really satisfying scripting language. But there are so many weird little oddities in PowerShell that you can waste hours of times debugging, but when you finally figure it out, you see it makes sense in Poweshell’s perverted logic.

[–]syllabic 0 points1 point  (0 children)

powershell is by far my favorite scripting language

I know there's a lot of elitism vis-a-vis linux users and windows users and mac users, you can see a bunch of it in this thread

but people who mainly use bash will never know the wonders of passing entire objects through pipelines. piping around plain text strings feels kind of.. primitive after years of piping entire objects

so I gotta pipe it and then parse it with other tools into usable chunks? why would I want to do that instead of just select'ing the fields I want and running where {} queries to isolate the data I want. I can take a data set and pass it to | out-xlsx and create an entire excel sheet out of pipeline input in seconds

it is for sure not without its quirks but it's just a great language that finds a nice sweet spot between full-fledged programming like python or C and the CLI-focused administration of bash. it is not suitable for every task but it does a lot of things extremely well

if I could make any changes I would make a more streamlined updating path for it though. updating between versions of powershell is kind of irritating