A different kind of computational survival

Last year I wrote a post about being a computational survivalist, someone able to get their work done with just basic command line tools when necessary.

This post will be a different take on the same theme.

I just got a laptop from an extremely security-conscious client.

I assume it runs Windows 10 and that I will not be able to install any software without an act of Congress.

I don’t know yet because I haven’t booted it up.

And in fact I cannot boot it up yet because I don’t have the badge yet to unlock it.

If being able to work with just default command line tools is like wilderness survival, being able to work with only consumer software is like urban survival, like trying to live in an abandoned shopping mall.

There must be some scientific software on the laptop.

I imagine I may have to re-implement from scratch some tools that aren’t installed.

I’ve been in that situation before.

One time I was an expert witness on a legal case and had to review the other side’s software.

I could only work on their laptop, from their attorney’s office, with no network connection and no phone.

I could request some software to be installed before I arrived, so I asked them to put Python on the laptop.

I could bring books into the room with the laptop, so I brought the Python Cookbook with me.

If you don’t have grep, sed, or awk, but you do have Perl, you and roll your own version of the utilities in a few lines of code.

For example, see Perl as a better grep.

I always use LaTeX for writing math, but the equation editor in Microsoft Word supports a large amount of LaTeX syntax.

Or at least it did when I last tried it a decade ago.

The Windows command line has more Unix-like utilities than you might imagine.

Several times I’ve typed a Unix command at the Windows cmd.

exe prompt, thought “Oh wait.

I’m on Windows, so that won’t work,” and the command works.

The biggest difference between the Windows and Linux command lines is not the utilities per se.

You can install many of the utilities, say through GOW.

The biggest difference in command lines is that on Windows, each utility parses its own arguments, whereas on Linux the shell parses the arguments first and passes the result to the utilities.

So, for example, passing multiple files to a utility may or may not work on Windows, depending on the capability of the utility.

On Linux, this just works because it is the shell itself rather than the utilities launched from the shell that orchestrates the workflow.

I expect this new project will be very interesting, and worth putting up with the minor annoyances of not having my preferred tools at my fingertips.

And maybe it won’t be as hard as I imagine to request new software.

If not, it can be fun to explore workarounds.

It’s sort of a guilty pleasure to find a way to get by without the right tool for the job.

It would be a waste of time under normal circumstances, and not something the client should be billed for, but you can hack with a clear conscience when you’re forced into doing so.


Leave a Reply