Skip to main content

...Or I Will Replace You With A Very Small Shell Script

Once again I remain convinced that there is no problem that is insurmountable when a possible first-draft solution includes a hacked-together bash script.

I spent the better part of an hour trying to bang my head against Windows, gave up, and grabbed my Mac laptop, opened a terminal, and accomplished the end-goal in 10 minutes, which included writing my own hacky first-draft do_the_thing.bash file. More and more, my solutions (including production-ready solutions in some cases) start life as do_the_thing.bash, and eventually evolve into a proper script with error conditions, failure modes, self-checks to prevent multiple runs, etc. But mostly, they start as do_the_thing.bash, which I blame a developer friend for doing in front of me and thereby teaching me terrible habits.

My own personal goal, after I get back from my convention trip, is to throw away do_the_thing.bash and rewrite the entire process, soup to nuts, in python (including checking for ruby and installing it if needed, among other steps)(and yes, I know, but ruby is also a thing I should be learning, and I feel like this is a good test case for that). I'll be leaning heavily on my more advanced dev resources (aka, my friends Rachel and Matt), but this is the first project I feel really excited about trying on my own.

When I was just making the transition from Tech Support person to DBA, I was often convinced that it was faster and easier for me to just execute a given command directly, rather than building a tool that executed a command. But as I've grown and matured, I've been put in positions where the execution of a particular command isn't the issue; it's the repeated execution of some set of commands that must be automated, and so I've built up a repository of script fragments stolen researched and designed as a library. It happened in bash and SQL; it's starting to happen in python, and I imagine as I get more dev experience it'll happen more and more in other languages. Often the hardest part of learning is making the transition from reinventing the wheel to recognizing that it's not always necessary to reinvent the wheel. Wheel-inventing is an important step; that's the point where I'm learning the "why" of things, not just the "how".



For now, though, I'm all about do_the_thing.bash. Or do_the_thing.py, or do_the_thing.js, or whatever. First build a skateboard. Then build a bicycle. Then build a motorcycle. (As a life-long motorcycle rider, we can just stop there.)

Comments

Popular posts from this blog

Organizing And You: Lessons from Labor History

    I made a joke on Twitter a while ago: Do I need to post the Thomas M Comeau Organizing Principles again? https://t.co/QQIrJ9Sd3i — Jerome Comeau says Defund The Police (@Heronymus) July 15, 2021 and it recently came back up because a member of my family got their first union job and was like "every job should be offering these sorts of benefits" and so I went ahead and wrote down what I remember of what my dad told me. My father had many jobs, but his profession was basically a labor union organizer, and he talked a lot about the bedrock foundation items needed to be serious about organizing collective action. Here's what I remember.    The Thomas M. Comeau Principles of Organizing -- a fundamental list for finding and building worker solidarity from 50 years of Union Involvement. This list is not ranked; all of the principles stated herein are coequal in their importance. Numbering is a rhetorical choice, not a valuation. 1) Be good at your job. Even in an at-will

Money and Happiness as a fungible resource

Money really does buy happiness. Anyone who tells you differently has a vested interest in keeping you poor, unhappy, or both. I know this because I grew up on the ragged edge of poor, and then backed my way into a career in IT, which is where the modern world keeps all the money that isn't in Finance. So I am one of the extreme minority of Generation X that actually had an adulthood that was markedly more financially stable than my parents. And let me tell you: money really does buy happiness. To be clear: at 45 years old, I'm now in a relationship and a period of my life where our household is effectively double-income, no kids. I live in the city, but I own a house, and can only afford to do that because of our combined income. We also have two cars -- one new, one used (though neither of them is getting driven very much these days) -- and we have a small discretionary budget every month for things like videogames, books, and the like. What my brother used to call DAM -- Dic

Activision, Blizzard, Game development, IT, and my personal role in all of that.

 I'm pretty sure if you spend any sort of time at all on Twitter and/or spend any sort of time playing videogames, you are by now at least aware of the lawsuit brought forth by the State of California's Department of Fair Employment and Housing versus Activision Blizzard, Inc., et al. From this point on, I'll add a Content Warning for folks who are sensitive about sexual assault, suicide, and discrimination based on sex, gender, and skin color, as well as crude humor around and about sexual assault , and what the State of California refers to as "a pervasive 'frat boy' culture" around Act/Bliz, especially in the World of Warcraft-associated departments.   Just reading the complaint is hard rowing, even with the clinical legalese in place. The complaint itself is relatively short; 29 pages laying out ten Causes of Action (basically, "these are the legs on which our lawsuit stands"). I'm not sure I have the vocabulary to properly express how a