When I was at university, I majored in computer science. At the time the focus was on C++, but I also learned a fair bit of Java, Assembly, Javascript, and even some Cobol—though the latter was ancient by the time I was in school, it was still considered a great teaching tool (though at the time I suspected that had more to do with the fact that most of the professors were probably trained on that language, so it was easier for them to teach). I was pretty good at all of them, especially C++.
But then sometime after I decided I didn't like my coding jobs, I moved to teaching, moved to Japan, and before I knew it those coding days were a figment of my memory and little remained of the skill. Oh the general knowledge is still there, but it's buried under tons of rust at this point and would require a large degree of effort to get it into working order again.
This isn't to say I disregard all coding. Complex coding projects are part of my past, but I still do use simple scripting to do various things on my computer. Whether that be a regular expression or a few lines of Perl to pull a wanted string out of something, some Javascript to pull in some token prices from Hive Engine, or some AppleScript to automate some actions in my spreadsheet. Scripts make everything faster and easier. We aren't talking world changing savings, but turning what might take five or ten minutes when done manually into a 10 second job; not a huge savings, but when it is something that you might do a few times per day, those small time savings add up.
In my CS days we had some complex equation for seeing if the time savings would be worth the time spent writing the script. I forget it. But I do try to look at every situation and I probably won't attempt to write a script unless it's something I do daily and could make up the time spent writing the script within a week or two.
For example, if I have a job that takes ten minutes to do manually and I do it daily, and if I think I can knock out a script to do it in about two hours, well I start saving time after just the 12th time of using the script. That one would probably be a yes.
I mention all this today because yesterday I failed. I had what I thought would be a fairly simple job to code, but I just couldn't figure out how to do it. I ended up staying up way too late, and wasted several hours
Oh well.
Let that me a lesson. Writing automation scripts can be very useful and therefore can be addictive. But it can also be dangerous! Hopefully in the future as AI becomes better and better, it can help even those of us who don't know how to code well do things. Can you imagine, for example, going to ChatGPT and saying "I want you to write a script that copies the price of HIVE and BRO daily, stores them in a database on my computer, then shows me price alerts for BRO priced both in dollars and in BRO when it moves 5% or more in either direction." Then without a word it instantly hands you a script that works flawlessly. We're probably a long way from that, but wouldn't it be cool?
Anyway, be careful or wasting more time than you save when you write your scripts!
[Photo from ChatGPT. AI might be a long way from writing perfect scripts, but it does a decent job with drawing.]
❦
David LaSpina is an American photographer and translator lost in Japan, trying to capture the beauty of this country one photo at a time and searching for the perfect haiku. He blogs here and at laspina.org. Write him on Twitter or Mastodon. |