drunk-babies-2\

(disclaimer:  those are *not* my kids.  trust me)

This CLI/GUI argument is as old as those stupid “which is the best programming language?” and “which is the best operating system?” debates.  The answer to both of those questions is the same,  right after the person asks, you should respond “that’s stupid, and so are you“.  Then turn back around and wait for the impact of whatever it is they grab to beat you with.

Like most anecdotal arguments, they’re often based on drinking too much, with not enough real work to do.  You know the story: Someone says something bold and acts as if they have empirical “facts” to back it up. Then someone else slowly chips away at their swiss cheese defense until the originator throws a smoke grenade, like “Hey. Not to change the subject, but …” and changes the subject.  This sneaky tactic buys them time to figure out a new angle and plug some holes in the cheese shield.

Well, I finally had enough.  It wasn’t as serious as arguing over the ACA (aka “Obamacare”), which everyone blabbered on with spit and drool, yet nobody actually read the damn thing.  I read it.  All ****ing 1900+ pages.  I figured if I wasn’t up for combat duty and getting shot at, it would be a close second place to battle injury.  Oh my God.  My eyes!  My poor eyes!  Even with patches and ice packs, I could see early on that no one, and I mean NO ONE was discussing the real meat of that verbose monster.  It was like watching ten minutes of a movie and trying to write a serious critique about it.

Where was I?  Oh yeah…

This particular, related question comes from multiple sources and situations.  One is a classroom setting.  One is a study group discussion.  Another is a social gathering (okay, nerd gathering).  And there’s always the endless sea of forums, blogs and web site discussion threads.  The general consensus can be derived from the following common questions:

  1. “Why use PowerShell or Scripts at all?”
  2. “Why use the GUI console if there’s a command-line (CLI)?”
  3. “What do GUI and CLI mean?”
  4. “Why use all my fingers when I can use a mouse instead?”

For what it’s worth, question 4 relates to one guy who argued that CLI fans can’t pick their nose while working.  Good point.

Great questions.  I’m a nerd, so I’m okay with them all.  So, I went to work on this several months ago actually.  I’ve only had time recently to pull up the data, do a spit-shine on it with Excel, pat the monitor a few times and mumble things like “nice data.  good data…” while my cat gets jealous and pissed off.  And then sit back in my creaky chair and rub my chin a few times.

The times shown were compiled from projects and tasks involving various languages, environments, scopes and systems/platforms (JavaScript, VBscript, PowerShell, and Batch).  The tasks range from automating the enabling and configuration of various Windows Server and desktop features, to installing and uninstalling applications, reconfiguring services, pulling WMI information, updating BIOS settings, updating disk configurations, and so on.

The real, honest, accurate, pragmatic (love that word) answer is “It depends”

Some CLI/Script folks I know nearly gasp at hearing that.  As if I just tried to bash their religious beliefs.  The GUI folks I know shrug and give a blank stare.  It kind of illustrates the different mindsets I think.  But it’s true.

The same logical basis holds true for the “manual installation vs. repackage and deploy” rationale.  Which takes longer?  Which costs more?  What are the trade-offs?

Basically, if you are working with repetition, then CLI and scripting are beneficial.  If you’re doing something one time only, or one time per year, chances are slim that there’s a measurable benefit to investing in coding, testing, packaging and scheduling the same task.

Check this out…

gui_cli_skatterbrainz

If you want the actual spreadsheet, you can download it here.

Differences

It’s obviously crude, but this helps illustrate what I’m talking about.  It’s actually based on a compilation of roughly 30 scripts using the stuff mentioned above, and related to a particular vendor’s GUI console.  It is (or was) used to perform a task that gets done about 20 times per year.  This ignores the “task compression” and “cohesion” aspects (the relative proximity of repeat events), and treats them independently.  Still, the formula stuff is pretty simple and easy to grasp.  When based on time alone, the repetitions would have to reach 70 before the metrics lean towards CLI and scripting.

One important difference between this and the discussions about packaging and deployment versus manual installation, is that in this debate, both options are typically handled by the same people.  That means the same labor rate.  So crunching a cost differential is much simpler.

Another way to think about this is if you happen to own a car, ask yourself why you don’t own EVERY single tool that relates to working on that vehicle.  Some things will coerce you into buying a tool to use over and over.  And some things will cause you to immediately outsource (take it to the shop).

If you are really serious about working on cars, you might go further and install a hydraulic lift, a high capacity air compressor and big-ass roll-around tool boxes.  That would make you analogous to the CLI/scripter person.  The other person, who prefers to not get greasy or have to crawl around to do something once a year, that’s the GUI person.

There’s a point here somewhere, but my coffee is wearing thin.

Summarization

So, basically, it works out like this:

  • If you need to enable .NET Framework 3.5 features on 5,000 Windows 8.1 devices, you probably don’t want to use the Control Panel (GUI) option, or even launching OptionalFeatures.exe.  You’re probably not going to relish using DISM or PowerShell either.  Not unless you intend to wrap either CLI option into something that can be pushed out silently like a, well, you know.
  • If you’re going to go into Active Directory Users and Computers and change ONE user account description, and not have to do it again for weeks or months, and you feel it’s best to stop and write a script, test it, and file it away for future use, well, you’ve got a good gig going on. Obviously, all your fires are put out and you’re just bored enough to want to cut the lawn with a laser cutter.  Why not?

I hope this was informative, helpful and took your mind off of a crappy situation somehow.

Cheers!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s