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

So that happened.

I couldn't resist, and didn't really want to. So I bought an iPad. First Gen, but they're on significant sale right now, so I can use this one until July or august, when I'll buy an iPad2 and give this one to someone else. I named it "conspicuous consumption" because it seemed like truth in advertising. FYI, this blog post is coming from inside the tablet!

#RPGaDay 2017 -- Day 12

Which RPG has the most inspiring interior art? This is another one of those 'define your term' questions, because inspiring to whom? Inspiring to what? Are we talking about me wanting to build a cool-looking character? Then I'm not sure anyone can beat Paizo's Pathfinder work, or the 4E core rulebook art. Inspiring to really get into the tone of the game itself? Then the particular aesthetic of the powered-by-the-Apocalypse games (notably No Rest For The Wicked , Dungeon World , and the core Apocalypse World book) are on-point for that, as is the incredible Flat Pack and Maschine Zeit . Inspiring to me as a player about the experience of playing RPGs? Then Fate 's core rulebook, with the gamers of colour and the disabled gamers is really inspiring to my heart about the hobby, as well as Breakfast Cult . What about you? What are you inspired by?

#RPGaDay 2018 Day 19: What music enhances your game?

Again, this really depends on the game and whether or not I'm playing or running or what have you. The RIFTS game I just storyran leaned heavily on Tell That Devil by Jill Andrews and Neko Case's Hold On, Hold On  for mood and setting. Sometimes, I think about themes for my characters. I had a dwarven knight that used to ride around humming Shostakovich's 5th . And there's a good chance that my newest character will hum chiptunes to themselves, since they're a robot.