This is the first of the mini articles I've decided to write about my experience with the #12in23 "challenge", coming a little overdue as it I've written it initially in January of this year. Plenty has changed since then and being in "Mechanical March" now I've got some catching up to do on publishing those on the blog. So enjoy my little report/journey/whatever this will end up being!
Following my woes of recently re-installing postgres as a result of a knee-jerk burning down my whole home-brew install. I’ve decided to pick BASH as my first language for the 12in23 Exercism challenge.
First impression was that this Exercism track is missing a lot of the information that more developed tracks provide, requiring you to take ownership of finding out where how and what needs to be done for things to work (aka. Exercise google and stack-overflow fu). The list of resources provided initially is exhaustive but it’s missing something super low effort that provides the absolute basics.
Few interesting bits of information that stuck with me over the 5 BASH exercises:
Bash uses $((<insert math here>)) for mathematical operations
This was a head scratcher!
To find length of string use
and yet another one...
To iterate length of string times using a for loop you can use a C style for loop:
loop goes brrrrrrrrr
Bash supports += syntax for both adjusting a numbers and adding to a string
bash_plusequal.png13.2 KB
I found bash to be difficult but fun. It’s the first language I’ve tried that cares about spaces as much as it does, and it doesn’t have nearly as many “don’t cut yourself” features as ruby. There are a few behaviours that are difficult, and edge cases that had me scratching my head.
It was an awesome first choice, I’ll likely come back to it as understanding more of what is happening under the hood of my terminal and scripts that I’m running has been interesting to me.
Thanks again #exercism for the #12in23, can’t wait to find some time for my next choice! See you in the next one!
This website uses cookies to only make you click ok here once. It doesn't collect personal data (and neither do I)