Making Visual Basic Cool Again
2018-06-13It seems like all of the cool apps today are written in either Node or Python. While I could spend some time learning to write in these, and learning how to debug these, I learned Visual Basic almost two decades ago, and have gravitated back to it repeatedly over the years.
Sometimes people seem to suggest Visual Basic is "dead" or "abandoned", but it's still well-supported on one of the most capable modern IDEs today: Visual Studio 2017. And unlike the VB6 days of yore, Visual Studio 2017 Community provides a free environment that is more than adequate for developing, packaging, and releasing software. The march forward of the .NET Framework and now .NET Core is adding new uses and capabilities to Visual Basic on a regular basis, and Microsoft's new Docs site continues to impress.
I wanted to write a blog post to share some of my recent Visual Basic projects, and what made them interesting to me. While HAController has been a multi-year project, I often use Visual Basic the way others often use a quick Python script: Assembling quick one-day projects that meet simple needs.
First up is my main project, HAController. It's a home automation controller with a personal assistant spin on it. I haven't added a voice recognition capability to it yet, but it's designed with one in mind. Currently I primarily use it to control my Insteon-based home automation devices and log GPS in my car, but it's fairly versatile, and I often consider first whether a given piece of code I want to run would be easiest or most convenient as part of this project.
My newest one was a bit of an experiment, as I'd never written a Windows Service before or made an HTTP Basic Authentication-based web request. SSCaaS, or Sandstorm Cron as a (Windows) Service, is a quick little tool to ping a Sandstorm grain's API on a mostly-regular interval. It adds a little randomness to the request timing, and makes a few requests in short succession, mostly to keep the Sandstorm grain it's checking open enough long enough to perform the operations I expect of it.
I was pretty uncomfortable when I first heard of the Pwned Passwords API, and the idea that hashed passwords were being sent to HaveIBeenPwned. When I learned that the V2 version of the API used k-anonymity, I was much comforted, but wanted to be sure if I checked the API I could be sure the application I used was honest: So I wrote my own. PwnPsswords is a quick console app using .NET Core which checks the API. This is the first one I've assembled that should be cross-platform capable, so this was a pretty neat project too, albeit a short one.
And the final one I am pretty proud of was a way to "fight back" against the retirement of one of my favorite GitHub Insights graphs. GitHub Punch Card Viewer is a quick desktop app which accesses the still-available API for the Punch Card and lets you see what times of day and days of the week your project's commits were made. Rather than trying to emulate GitHub's original varyingly-sized circles, I went for a shading approach here that was quick and effective.