5 ms·
> PowerShell actually rules for readability and maintainability when you have people who know what they're doing. Isn't that true for all programming languages
by foofie 3y ago
> PowerShell actually rules for readability and maintainability when you have people who know what they're doing.
Isn't that true for all programming languages ever devised by mankind?
> HNers by and large don't understand the economics of PowerShell. There is a very low supply of competent PoSh devs on the market, and even fewer interested in credibly signaling their proficiency, but a very high demand for them, because a lot of places still run everything on Windows, and guess what's installed on virtually all of them?
I don't see what point you're trying to make.
The fact that Microsoft decided to push PowerShell on virtually all versions of windows it ships only reflects a Product decision by Microsoft to push a Microsoft-only tool. It also shows Microsoft's decision to not offer the same level of support for any other alternative.
Where's the economics in that?
I also don't understand your broader comment on economics. Are you depicting it as a good or bad thing?
- hiAndrewQuinn 3y agoOne would hope, but alas! Perl was notorious for being write-only back in the day. PoSh is closer to read-only for most devs. If someone makes sure to write things out the long way (or uses a linter to do this) it's very easy to grok. Actually learning to write it is the tricky bit.
- foofie 3y ago> One would hope, but alas! Perl was notorious for being write-only back in the day. I don't agree that's a valid rebuttal, as the operative word is the weasel copout "know what they are doing". > PoSh is closer to read-only for most devs. A read-only language is a language with a serious expressiveness problem. In contrast with, say, Python, which you need to go way out of your way to write code that's hard to understand.
- hiAndrewQuinn 3y ago>the weasel copout "know what they are doing" Let's try a precise quality comparison, more for fun than anything. We have established someone knowing what they're doing makes any comparisons meaningless. I imagine you would agree with me that someone who "only kind of knows what they are doing" is even less helpful (what do they know? what do they not know?). So our last option is someone who does not know what they're doing, at all - they've never programmed before in their lives. How many minutes of study would it take for them to decipher what a PowerShell program taken at random from the world of all programs written and used by human beings is actually doing? How about a Python script? How about a Perl program? Most complete programs are short. Most complete programs do not use complicated data structures or algorithms. And most complete programs do something relatively simple, but useful to the writer. So one would expect T(PoSh) < T(Python) < T(Perl). I sympathize if that makes you groan. Now, how many minutes of study would it take for them to write and use a PowerShell program, versus a Python program, versus a Perl program? Our hypothetical knows-nothing person is statistically probably running Windows, to start. That cuts down on the time needed to fiddle with installation - PowerShell is right there, whereas someone totally new to this could easily lose a week just trying to get either of the other two installed and running for the first time. That's probably going to swamp the calculation. After they've got it installed, they will likely spend a lot of time Googling or GPT-ing around for code that already does what they want. This is likely to be straightforward no matter which of the 3 we're working with. But they will almost certainly need to tweak it somewhat to get it to perform exactly what they want to do. This is going to be tough in any of the above languages. The readability of PowerShell would probably let this person figure out how to tinker with it relatively quickly. After they've written a few useful programs already, sure, they might want to switch to something else - but probably not; most people have better things to do with their time than rewrite something that already works. More importantly that moves them from "doesn't know anything" to "kind of knows what they're doing", which is not a category of people we can reason about in general - although, if we were to reason about this person in particular, it seems reasonable to suspect that whatever tool they started with would be the tool they would stick with, especially now that they've paid the one time cost of actually getting it installed and working on their computer.
- vladms 3y ago> most people have better things to do with their time than rewrite something that already works These people just went from "never programmed before" to "knowing how to program" - I doubt people that made an investment like this would "stop to the first tool" because "it works". Sure, they might not rewrite something that works, but they would wonder "is there a better tool to do the job?" You can of course target "what is the minimum I can do on this and then be able to focus on my job" and never worry about other issues (could I have done more? could I have done better? is it extendable? is it maintainable? etc.) but that is more about how you view "your job". If you are a doctor and your job is "heal patients" then learning another programming language is not your job. If you are someone maintaining some tool written in a specific language, then learning another programming language is not your job. If you are a software engineer that can solve multiple problems, wondering if you should know another programming language is part of your job.
- ClikeX 3y agoThe only exceptions are the ones that are specifically designed to be horrible. Like Brainfuck.
- hiAndrewQuinn 3y agoRe/ the economics: It's okay, many people don't get a formal course in this stuff. First look at the graph with two lines on https://en.wikipedia.org/wiki/Supply_and_demand https://en.wikipedia.org/wiki/Supply_and_demand. Notice that the y-axis is P for Price. Now imagine first off what happens to Price when you shift the downward sloping curve forward. That is what economists call the demand curve. Does Price go up or down? Finally, imagine what happens to Price when you shift the upward sloping curve backward. That is what economists call the supply curve. Does Price go up or down?
- jdietrich 3y ago>Isn't that true for all programming languages ever devised by mankind? The guy literally just mentioned MUMPS. https://thedailywtf.com/articles/A_Case_of_the_MUMPS https://thedailywtf.com/articles/A_Case_of_the_MUMPS
- adolph 3y agoThat article is true but hardly fair. MUMPS has the "blessing" of early success dating back to the bygone era of punchcards. We all point and laugh at the single letter keywords now because a candle [0] now has more RAM than a database server did at the time. Would Crockford have been around to write "MUMPS, The Good Parts" in the middle 1970's we might all be using a general purpose programing language with built-in persistence to a no-SQL document store. 0. https://news.ycombinator.com/item?id=39169048 https://news.ycombinator.com/item?id=39169048