Shell scripts aren’t known for being the cleanest, most elegant part of your technology. But I argue that, as a vital piece of your stack, they should be afforded the same thought and care as other parts of your codebase.
Sure, shell scripts like bash have some inherent limitations, but they shouldn’t prevent you from following standard software engineering principles.
For example, bash functions can’t return values, but functionality should still be broken into small reusable chunks each having a single responsibility. Just call the function in a subshell and have it echo the result. Or use a standardized return value. Plus, you can easily take advantage of the return codes of invoked programs.
Consider this simple script for generating a random alphanumeric identifier that’s unique across a group of files within a folder Continued…
Smart Scales and Body Fat Measurements
Earlier today, I read a post by Daniel at Needless Pounds where he references a Full Body Sensor Monitor Scale. I commented about their lack of accuracy, but wanted to follow-up on my comment with data justifying my claim. This argument is based on data I’ve personally collected over the last few years. Continued…
Posted in Commentary.
rev="post-1535" 3 comments
By codyaray – April 7, 2013