Diary of a Network Geek

The trials and tribulations of a Certified Novell Engineer who's been stranded in Houston, Texas.

7/24/2020

Programming Widgets

Filed under: Better Living Through Technology,Fun,Fun and Games,GUI Center,On Creativity,The Day Job — Posted by the Network Geek during the Hour of the Hare which is terribly early in the morning or 6:30 am for you boring, normal people.
The moon is Waxing Crescent

I’m anything but a professional programmer, but occasionally, I make stuff.

Sometimes, in my day job, I have to solve a particular problem and the only way I can manage that is via some small bit of programming. Usually, it’s just a little script of some kind; PowerShell or Perl, mostly. I taught myself Perl seventeen or eighteen years ago, in an attempt to stay busy at a job that severely underutilized my talents. Demonstrated, I think, by teaching myself Perl in my downtime. A lot of techs I knew would have just scrolled a news site or played solitaire or some other useless thing. I tried to expand my portfolio of skills. I learned a long time ago, though, that I need a project to guide my learning. It almost doesn’t matter what the project is, as long as it gives me problems to solve and obstacles to overcome. Solving those problems, with the new thing I want to learn, is what teaches me. Granted, I don’t always learn the best way to accomplish my task, or at least not the most commonly accepted way, but I still learn the skills involved in a way that embeds them pretty deeply.

Since I’m mostly self-taught in IT, which is my chosen professional field, I’ve had to find ways to keep learning on my own interesting. Having personal projects is one of them. So, projects are how I teach myself new things. As I work toward a larger goal, whatever that may be, I find problems and solutions to those problems and my knowledge extends into new areas. I did that with Perl a number of years ago. First I tried to teach myself Perl for extending MoveableType, the blogging software that I used to use before their licensing debacle. But, that was a bit too arcane and involved a place for me to start. So, several years later, I found some simpler scripts that did some language processing and were useful for another low-key hobby of mine; conlanging. (That’s constructed language making, for the less geeky.) And, so, I had a project to work with that was within my skill level. In the end, I made those scripts something that could run on a webpage and it drove massive traffic to my site. It was sweet! But, it crashed the server because it was so popular and it drove TOO much traffic to that site. Ultimately, I had to take them down. By then, though, not only had I learned Perl pretty well, but I had moved my blog to WordPress and started looking at this fancy new language for the web called “PHP”. That mostly ran in a way that didn’t put a strain on the servers, so it was better for high-traffic sites. The only problem was, I couldn’t move the functions from the Perl scripts to PHP easily. So, I started looking around for projects to teach myself PHP.

The project I found to let me dig into PHP was a random generator. No, not some random piece of electronic equipment, but a little web toy that randomly generated things. It’s pretty simple, really. You have something, like a title or a sentence that has variables, like nouns and adjectives, like Mad Libs. Those variables become, well, variables in the program. So, I just need to list a bunch of whatever that variable is into the program which randomly chooses those and fills them into the sentence or title and then gives me the result. Sounds simple, right? Okay, it kind of is, which is why I started with that. But, then I went about making it complicated. I added more variables and started reading them in from external sources and getting fancy with the output formatting. But, what it did was let me learn, bit by bit, PHP. You can see a bunch of those at my World Building page at Fantasist.net. When I got good enough at it, I dug back into WordPress and started looking at ways to use my new PHP skills to modify WordPress. What I came up with was the Dale Reckoning Calendar Plugin. For its time, it was pretty good. Now, I look at it and, well, I’m not quite embarrassed by it, but I’m not as proud of it as I was. It does work, but it requires the user to modify their theme and, essentially, become a bit of a coder themselves. That never sat well with me. And, I wanted to have something that would randomly, or semi-randomly, conjure up weather conditions for a particular day. Why? Because, if you’re gaming in a big campaign, things like weather start to matter a little. And, it was fun. It let me use old skills and old code and extend them to something new and stretch my learning even more. So, that’s why I kept coming back and eventually came up with the Forgotten Realms Weather Widget. It works better as a widget in the sidebar than as a daily update on posts. Though, I may still revisit the idea and see if I can’t improve my old plugin to not require the end-user to modify their theme to make it work. Again, for no real reason other than it’s fun to me and it would make my brain work more on something technical, which I’m already good at, but not for my day job. Mostly, though, because it would be fun to me. Oddly, it wouldn’t be fun if I had to do it for a paycheck. By the way, in moving some of the code from the old plugin to the new widget, I did find some ways to tighten the code a bit. I’d still be a little embarrassed to have a professional coder look too closely at it, but at least I’m improving.

And, I’ll keep working on it, though I’ll need to set some better boundaries so that I don’t get so obsessed that I miss much more sleep working on it. In any case, you can see the results for yourself at Forgotten Realms Weather Widget.
It’s free and only for WordPress and there may be bugs that I haven’t seen yet, so let me know if you use and find any. I can’t promise when I’ll fix them, but I promise that I’ll work on them.

This post originally appeared on Use Your Words!  And, that’s where you should leave any comments or bugs you might find.

9/1/2017

Flood Sensors

Filed under: About The Author,Better Living Through Technology,Calamity, Cataclysm, and Catastrophe,Marginalia and Notes from the Editor,News and Current Events,Red Herrings — Posted by the Network Geek during the Hour of the Hare which is terribly early in the morning or 6:00 am for you boring, normal people.
The moon is Waxing Gibbous

This is mostly of local interest and probably would have been more help last week.

But, I’m hoping it will serve as a convenient place to find this information next year when the hurricane season starts again. And, yes, this is mostly relevant to the greater Houston area, where, dear readers, you will recall has been home since I moved here from the Chicago area in 1998. Since then, I’ve experienced a severe tropical storm, and the direct or indirect effects of three hurricanes (Katrina, Rita and Ike), before our latest Hurricane Harvey. Tropical Storm Allison was about the worst flooding event I had ever seen. My ex-wife and I were in an apartment with her daughter and woke up to find our part of town cut off from the rest of Houston by flooding. But, that flood didn’t stick around incredibly long and we were able to get out and drive the next day. That drive around my current neighborhood let us see which of the houses we had been looking at flooded. Obviously, we chose the one that didn’t and that’s where I live today with my current blushing bride. I’m pleased to say that we didn’t flood this time, either.
The thing people don’t realize about living down here is that it’s not usually the hurricane itself that causes the most damage. Rather, it’s the flooding caused by the rain that comes before, during and after. Hurricane Harvey dumped more than two feet of water on the greater Houston area. Some places got more than that. What was worse, though, is all the water running down from beyond the Houston area raising the levels of all the water ways that everyone here calls “bayous”. In theory, they should move all the water away from where we live and send it down to the Gulf. In reality, Houston is so over-built that they can’t always manage to do that.
My wife and I got lucky this time. The only water we got in our house was down our chimney and what came in on our dog. Our cars were both safe and dry. I know at least one person who’s parents have probably lost their house and two people who lost cars while trying to evacuate. This is the worst flooding that anyone can remember in Texas, and let me tell you, that’s saying something.
So, my link today is to the Harris County Flood Control District, who is the governmental group in charge of mitigating flooding events in Harris County, where Houston resides. Frankly, it’s not a job I envy, especially this week. But, for those who are concerned, they have a LOT of information about flooding in the area. Most importantly to me this past week or so, they are responsible for creating and maintaining the Harris County Flood Warning System, which has links to water-level sensors in bayous. If you go to their Interactive Mapping Tools, you can put in your address and find the closest sensors to you and what bayou is most likely to effect flooding in your area. I spent a good amount of time this weekend watching several of those sensors very, very closely. It was, to say the least, nerve-wracking, but, if things had gotten bad enough, I would have known right when I should either head to our second story or try to get out of the area if it was still possible.

Over the coming months, after hurricane season officially ends in November and before it starts again next year, I plan to add some resources here for emergency preparedness, starting with putting together a “go bag” in case of evacuation. Because, frankly, it’s never too early to start planning for next year.

And, next week, hopefully, I’ll have something a lot more fun to share with you than the grim reality of climate change, unchecked over-building, and preparing for the inevitable flooding disasters to come.

This post originally appeared on Use Your Words.


Powered by WordPress
Any links to sites selling any reviewed item, including but not limited to Amazon, may be affiliate links which will pay me some tiny bit of money if used to purchase the item, but this site does no paid reviews and all opinions are my own.