DEV Community

The Windows CLI sucks, and that's good.

Tamir Bahar on April 30, 2017

TL;DR Windows' shell sucks so people write tools. Tools are fun to use. Linux's shell is amazing so people write terrible bash scripts ...
Collapse
 
jpenuchot profile image
Jules Pénuchot

Use whatever tools you deem fit. But use them wisely.

Can't agree more.

Collapse
 
ericschillerdev profile image
Unfrozen Caveman Dev

Bless you. Your last few sentences really sum up everything in computing.

Also, as a long time windows user by more or less accident, I'm just happy to see someone writing about it in a way that involves getting things done and shows usage without being fully in the MS stack. I've been doing it that way for years, but I always feel I'm in the minority.

This is what I needed today.

Collapse
 
tamas profile image
Tamás Szelei

I disagree with the basic statement of the article, i.e. people are forced to implement tools on Windows therefore it's good that the windows shell sucks. No, it's not good, and no, they are not forced to do that. And they don't. I can't tell you how many hours I wasted on debugging organically grown Windows batch scripts. They have terrible syntax and non-intuitive rules that make your head spin. Bad bash scripts are at least understandable and much better to work with.

The biggest sin of make is that it is easy to misuse and that newer techniques of the language have not been popularized enough. A modern and well-written Makefile is nice to work with, but they are few and far between. There are tasks (not only building software) that are very easy to express in make, where a dependency graph with processing is needed. For example, in rpclib I use make to build the documentation: one target calls doxygen, another calls and xslt script that amalgamates the XML output from doxygen, yet another takes that xml and processes it, etc. Changes will only re-run stuff that has to run again. I would have a hard time of implementing that in Python.

But: I do agree that shell scripts (be it windows batch or bash) are not a good fit for many workloads, apart from really small ones. Python is a good choice for replacing them, but this is not because the windows shell sucks.

Collapse
 
ikirker profile image
Ian Kirker

No one has ever written a quick hack in Python or C! Or VBScript running with WSH!

There are so many things I disagree with in this article, but also, I think it needs to try and make a single argument, or at least maintain a theme, rather than a collection of unrelated thoughts with a sort-of-unrelated title.

Collapse
 
nonimad profile image
NoNiMad • Edited

It is so much easier for me to write one quick hack in Python than in bash. It has everything to manipulate files and other basic actions and is easily readable.
The bash syntax is, while powerful, really not human-friendly. It looks almost nothing like a traditional programming language.

Collapse
 
dbrower profile image
(((David Brower)))

Dumb question, I'm sure, but with whizzy IDEs (VS, Eclipse, ...), how does one do an automated integration build (daily on schedule, or on-checkin)?

Not a fan of make, but I do like command-line build tools.

Collapse
 
joelbennett profile image
Joel Bennett

For Visual Studio, I suspect you'd use MSBuild. From what I understand, it's a command line utility for making builds.

Collapse
 
zakius profile image
zakius

Be sensible. Use Python. Use C.
to be honest, why would I use C as my goto language? It's pretty absorbing with all the memory management. But still I'd go with that if my only other choice would be Python...

Collapse
 
aadslingerland profile image
Aad Slingerland

Can't agree more. And for windows users/developers etc... take some time to learn POSH (a.k.a. PowerShell). It will take some time to learn but is's awfully good IMHO.

Collapse
 
bogdangaliceanu profile image
Bogdan Galiceanu

Agreed. A very modern and practical shell

Collapse
 
rivet92 profile image
Jaime

I've not seen a weirdest argument to defend a crapy tool xDD. But at least i agree with the conclusion.

Collapse
 
eazel7 profile image
Diego

Those tools will forever be foreigners in the server space. I even prefer Mac people. At least they are posix.