Cincom VisualWorks Smalltalk: doing something useful part 3
The Omega Man
That little AWS Browser built in VisualWorks, I just couldn't let it go. I do need something more convenient to tell me things like where the target groups are in my load balancer, what the entries are in the dynamodb tables etc. without having to wade through the AWS website. It's painful (especially digging through the EC2 stuff to find the load balancer target groups). Maybe I dismissed this too early. Trialling the VisualWorks image on my debian box I realised I was constructing the command line arguments wrong, so I fixed that and got this far:
So, it enumerates all the elastic load balancers in that account, enumerates the target groups and then enumerates the target health of the targets within the target group. All by encapsulating the correct commands. Not only does it save me from remembering the commands, it's more convenient than the AWS website. I mean, who in developer land could possibly remember this:
aws elbv2 describe-target-health --target-group-arn "arn:aws:elasticloadbalancing:ap-my-region:555555555555:targetgroup/SmartShepherdDocker-tg/3b3b3b3b3b3b3b"
There is something of logic to the aws cli, but the details of each individual command are frustratingly specific. No matter, it's all encapsulated in the Smalltalk classes.
SHUT UP! Why the hell can't you leave me alone?
What I was really missing was the mode of working, it's just so very different to the write / compile / test cycle you get with something like Java or .NET. I feel like I had forgotten how to Smalltalk but sleeping on it seemed to awaken some old pathways in my creaky brain that gave me a few hints as to what I was doing wrong. So I stopped fighting it. The trick is to think iteratively, don't design too much ahead of time, when patterns emerge, do some refactoring. Tinker, test, throw some things into the Workspace and test the tiny snippets of code. The object structure starts to emerge, so make a super-class and define a pile of "^self subclassResponsibility" methods that give your classes a signature, but also prompt you to make the methods in your subclasses. It rhymes with java or C# programming but the activity of doing it is very different - you're not a slave to the editor and typing a pile of stuff, testing it and then fixing it. You're iterating at a much smaller level.
Is this how it starts? A trip to the laughing academy? No, you silly bastard, it starts with you asking yourself silly questions
In the background I've been trying to find an alternative but suddenly remembering how insanely productive VisualWorks was (when you're in the groove) and that unprecedented cross-platform ability just about floors me. As a tool for building personalised, graphical desktop apps quickly, VisualWorks still has no competition.