Skip to main content

Bourne to grep

And now for something completely different: a stupid script trick ...

once upon a time, i worked with two software developers who had just started their careers. after giving them a script, one of them complained that it didn't support the --help option.

the script was about ten lines including its shebang, without conditional expressions or complexity of any kind. i defended its informality by noting that scripts are text files, so developers can easily discover how to use them. my response had no effect, but i still think scripts written for members of the same development team may be less formal/helpful than usual.

since then, i did change my mind about one thing: for a long time, i used Python whenever statements were conditionally executed. i use the Bourne shell more often now.

Comments

Popular posts from this blog

Not so fast

Don't know how to begin or what to say, but feel like saying something about a few Python development issues. as hosts evolved from actual/virtual machines to containers, server deployment adapted accordingly. hosts were de facto containers because they had service interfaces, but deployment via systemd/upstart was unusual. i know supervisord was also used. virtual environments became popular, because of host-server and server-server dependency conflicts. i avoided this style of virtualization by segregating servers and/or letting some servers govern the dependencies of others. needless to say, containers and machines are quite different. when a container is server-specific, a virtual environment has no value. thus, i install Python p...

Improper english

Before retirement ended my last spell of unemployment, i wondered if the timing of that dismissal was ideal. one month earlier or later might have been better? improving a server log was my last assignment. like many other companies, their senior management believed in their culture, technology, and tools. like other well-funded companies, they used Splunk and wanted to use JSON format. nobody reviewed the pull request that would have established a baseline for my work. their Splunk dashboard code was not versioned. Overcommunicating JSON can be ideal, and creating a data structure to discover if a log entry describes an error is easy and reasonably fast, but computers find strings very quickly. a faster algorithm uses less electricity; computer activity is human activity. ...

Jam tomorrow

Instability and uncertainty are on the upswing (quoting Chinese Premier Li Qiang via The Taipei Times ). other publications quoted him differently, so i infer that there is no official translation of Li's words. China's complaints about disruptions to normalcy seem ironic when juxtaposed with its Belt and Road Initiative. on the other hand, people love to complain and there is more conflict than usual these days. with the possible exception of catharsis, most complaints have no effect. grief is real, but it shouldn't be extended. at some point, we should look forward to tomorrow's jam. it won't be good, but it will be better than the jam we cannot have today. Instant sauce i have a vivid memory of licking the last traces of raspberry coulis off...