I occasionally need to create a script at work (or home) and I usually use Bash. I’ve become fairly proficient. I’ve been studying for Red Hat certification.
In college, I was trained in Java so I can read and write Java. When it comes to a quick script though, I need something like Bash, Python, or Ruby. I live in Bash and I’ve dabbled in Python and Ruby. I’d read a textbook on one of them as I practiced on my computer. I never had the need to use it so it fell by the wayside. Now I actually have an opportunity and a need (more like a demand from my employer) to learn python and improve my shell scripting. I also need to learn Ansible (looks awefully easy) if the boss takes me up on implementing IaC.
I didn’t have much of a need for Terraform so my muscle memory for that faded as well. When I landed my new job, I wanted to get an automated, accurate dump of the entire infrastructure into text files that I can “slice and dice” with my favorite Linux command grep. So I “re-learned” terraform over a weekend. I’ve pretty much got that down now but I do need more practice in Python and Bash.
But this time, when I need a script, I need it within a day or so. At my usual pace, that’s fine if it’s short and easy. But I’ve had the need recently for more complicated scrtipts so I don’t have the luxury of taking my time or learning it as I do it. But I have a new weapon: Chat-GPT. As long as I accurately describe the details of what I need the script to do, Chat-GPT can whip it up in seconds. This is utterly amazing. It’s even using commands I’ve only seen once or twice in my 13-year love affair with Linux. I re-work parts of the script, changing variables or tweaking functions. I give it back to Chat-GPT for its feedback. Did I say this was amazing? From what I understand, it will do this for any user, but I found myself needing its advanced “thinking” to the point where I opted to pay $20/mo. for Chat-GPT+. I now have this interface I can go to at any time and it will work with me until I have what I want. It’s worth every dime.
Chat-GPT also makes me look a little smarter. At the top of every script, I put notes showing a copyright statement for my company, the author’s email address (yours truly), and version number, as is customary. I don’t list Chat-GPT as the author, I list myself. This has the added benefit of making me a more valuable employee, more valuable than I really am? I don’t know but it sure makes me look good when I can post a script in a Teams chat and the company’s chief architect complements me. That makes it all worthwhite, that and the paycheck of course.
So while I’m not getting the benefit of solving problems on my own with my own code, I’m learning from what Chat-GPT gives me. I don’t just copy/paste everything and forget about it. I analyze the code and change it where it needs to be changed. After all, I’m the one responsible for it. If I run it on a production machine and it raises hell, it’s not Chat-GPT who will get the blame. I provide detailed requirements, review the code, change it if needed, and get feedback to ensure effectiveness and safety. So yes, one could say I am still the author, but perhaps with a co-writer who just doesn’t get any credit because Chat-GPT is not able to take responsibility for it’s output. While I have found this to be rare, AI tools CAN (and do) make mistakes so I have to use them with caution.
At the end of the day, Chat-GPT/Open-AI is making me more productive, more valuable at work, and smarter. I learn something new from it just about every day. It’s my problem-solver, my professor, and my researcher all in one. For $20/mo., it’s a no-brainer.
