Farewell, old friend!

I’ve been working on doing a “virtual” clean-up recently: taking down old projects, cleaning up some servers I manage, updating my about info, etc. One old project, in particular, is making me feel a bit nostalgic – I’m saying goodbye to bootstrapicons.com. It was a search engine for bootstrap and font awesome icons, which allowed users to tag icons so they were easier to find. Launched way back in June 2013 it was the first personal project I made that ever got any kind of traction. I still remember the first day it hit over 1000 monthly users – I had made it big time!

Okay, so maybe it didn’t exactly make me famous. Still, it got posted in a few bootstrap resource groups, had quite a few user-submitted tags for icons, and was really fun to work on. Alas, all good things must come to an end. Once Fontawesome introduced a similar search to their main icon list my traffic plummetted, and it had just kind of sat there since then. So sadly, for the common good of not having really old and likely at this point not incredibly secure projects sitting around the web, it is gone.

(PS: For anyone keeping score the cutting-edge technology powering this bad boy I believe was PHP 5.3, with a sweet jQuery powered autocomplete filter.)

GVNext

I finished up another fun project at work a few weeks ago – a ground-up rebuild of the GVSU news site – https://www.gvsu.edu/gvnext. The previous site wasn’t built to showcase photography very well and the new version highlights that to allow for more or a storytelling feel than just an information dump. Here are a few of the details on some of the fun parts as well as some of the challenges.

Another React Editor

Like the GVMagazine site, I created a while ago this site utilized React for the “article builder” – where content is actually added to stories by the authors. While getting React to play well without infrastructure can be a hassle, in cases like this it is really worth the effort. The editor ended up sharing so much with the GVMagazine that I am thinking of abstracting away some of the differences and writing a react library to use in both of them. With the Fall semester starting soon I probably won’t have time to work on it anytime soon, but I think it would be an interesting problem to solve and also cut down on ongoing maintenance of the two systems – maybe I could even open-source it.

Migration

One of the requirements for this project was that all of the old content be imported into the new system. While migrations are rarely fun, this was going to be taking content that was written in all the way back to 1999! The content had been imported into several versions of the site since then so mapping all of the images, tags and article content to the new system took some time.

Overall it was a fun project, it was on a but of a tight timeline and it integrates with so many projects at GVSU it was a bit overwhelming at first, but it’s also one of the most visited sites on gvsu.edu, and it’s always fun working on things that really get used a lot.

Server Testing via Visual Regression Testing

One of my least favorite tasks at work is testing new production servers. The team that provisions them doesn’t use any automated tools and manually sets up each one by hand. Unfortunately, this usually leads to missed settings and configurations, so we have to manually test several of our important systems on each server before signing off on them.

While I was working on it this time, I started thinking about ways that I could automate the process on our end. It basically is just browsing to a specific list of web pages we maintain on multiple servers and verifying everything looks the same on our current in-use production servers. Thinking about it, it sounded awfully similar to visual regression testing.

So I wrote up a quick node.js program that takes an array of servers to compare, an array of pages you want to compare, and the server you want to compare against. First, it generated screenshots for each page on the “baseline” server. Then, it generates a screenshot of each page on every other server and compares them to the baseline using the Pixelmatch library. If it finds more than 10 pixels of difference in the screenshot, it will report out to the console and generate a “Diff” screenshot that highlights the differences.

Here is what it looks like when searching for “tea” on both google.com and google.de.

www.google.com

www.google.de

For GVSU, I can now use this to verify all the servers in a few seconds instead of a few minutes. I can check our homepage, pages from the cms we manage, and some custom pages I created just for this. For example, there often are issues with a charting library we use, so I created a page that is just a static chart that I can now hit with the automated tool to verify they are working.

I threw the script up on Github in case it might be useful for anyone else: https://github.com/brentswisher/visual-server-tester. If you find it useful, I’d love to hear about it!

Conference: php[world] 2019

I spent last week outside Washington D.C. at php[world] 2019. It was the first PHP specific conference I have been to and it was great. I attended the whole day workshop on testing in PHP and learned a ton. If you get a chance to attend one of Steve Grunwell’s presentations it’s definitely worth your time. He mentioned he will be presenting a similar talk at WordCamp US later this week. If you are attending, be sure to check it out: https://2019.us.wordcamp.org/session/confidently-testing-wordpress/.

The next two days were the standard hour-long presentations on various topics. Some of my favorites:

(Note: I will add links to the videos when they become publicly available.)

It is also the 25th anniversary of PHP as a language and there was a lot of talk about why and how PHP got where it is. There was a shared proudness that PHP came about not as a well-planned exercise in computer science. Instead, it was as a community of people just trying to get things done. That is why you will find things like mismatched naming conventions and duplicated functionality. While PHP gets complaints about those things today, it also is the defining reason it is so popular. It was a really interesting perspective on the evolution of a programming language over time.

I do have to say that the area where I stayed was a bit disappointing. Just a lot of chain restaurants and not much to do nearby. Having said that, I stopped by the Steven F. Udvar-Hazy Center by the airport before I flew out and it was amazing! I had never heard of it before, but it is a hangar by the Dulles airport that is part of the National Air and Space Museum. I left myself an hour and wish I had more time there. It was huge, there were over 200 planes including an SR-71 Blackbird and a Concorde. Oh yeah, and you could walk right up to the Discovery shuttle! (See header image) It was free and definitely worth your time if you are nearby.

Overall, it was a really good conference. I also learned that there is a similar conference in February called SunshinePHP held in Florida. As one of the Michiganders looking outside my window today and seeing the first snowfall, I kind of wish I had chosen that one instead…

Where’s Louie – a fun little js game.

It’s Homecoming at GVSU this weekend and the theme is “Where’s Louie” (Louie is our mascot). A while back a few of us talked about creating a game to promote it, and it’s out!

This was fun to write because it basically all takes place in a single canvas element. It’s written in vanilla javascript, with a polyfill or two for older browsers. The purpose of the game is to find the “Louie” image among the randomly generated characters on different maps before the time runs out.

I’ve helped with some similar projects, but this was the first one where I have done the vast majority of the programming. It was a fun challenge! The biggest issues were rendering tens of thousands of randomly generated sprites quickly, and also adding “lava” to the maps via SVG paths so that characters wouldn’t appear in odd places. (Get it? Don’t touch the lava!)

You can go to https://www.gvsu.edu/webteam/whereslouie to play it. I’d love if you let me know in the comments what you think of it or if you have any technical questions.

(Hint: if you liked this game, go to www.gvsu.edu and enter the Konami code on your keyboard. Trust me you will like “Legend of Louie”)