Practicing with running WordPress in Docker today

So one of the things I want to do during my between-jobs downtime is practice my coding. And in particular, since I thought it’d be nice to a) start small and b) play with something I’m actually interested in coding (as opposed to, say, just focusing on random interview-type questions which will eventually bore me to tears), I decided I’d try to play with making a small WordPress plugin.

I’ve already done one that I’m running locally on Annathepiper.org: namely, to show y’all my archive of roleplay logs. Eventually I want to do a newer version of that, something that might let me actually practice setting up a simple web service.

For now though I’m going to do something less complicated. There’s a very old plugin called “lj-tag-parser”. This thing has a very simple job: allowing the LJ-style syntax for usernames and communities in your WordPress posts and comments. I’m using it right here on annathepiper.org, which is why you can actually see LJ-style usernames and tags if I write something like, say, userinfoannathepiper.

However, this thing hasn’t been updated in ages. And I thought it’d be nice to expand it to allow Dreamwidth-style syntax in addition to LJ-style, and possibly also allow generation of such tags via shortcodes.

But before I do all of that, I wanted to make sure I could set up a clean WordPress dev install.

In the past, when I’ve played around with dev-type WordPress stuff, I just did this on a separate blog on my annathepiper.org network. But coming at this with my SDET hat on, I thought it’d be cleaner and more appropriate to developing my coding experience if I set it up the way I’d do it in a work environment.

Which means a brand new, clean WordPress dev install. And in particular, using official WordPress and MySQL images from Docker.

For those of you who aren’t in the tech industry, suffice to say that Docker is a tool that lets you do exactly this kind of thing. You can set up a thing you want to play with in its own little container on your system, without having to worry about it interfering with anything else you might be doing. Docker lets you go about this in a few different ways. You can go get official images for things (like, say, the latest WordPress install) and do a single run using that image.

Or, if you want to do something a bit more complicated (like, say, running the official WordPress image AND a MySQL image that you’ll need to actually power the WordPress install), you can chain them together using a thing called Docker Compose.

Docker Compose works by you setting up all the config data you need in a file called docker-compose.yml. I’m still fairly new to the syntax this thing requires, but fortunately, I learned a bit about it while I was still at my previous day job at Big Fish. So I was able to utilize that knowledge to build a file that’d let me set up that clean WordPress dev install I want.

I did have to jump through a few hoops to get all the info I needed, though. Here are some pages that proved useful:

So now, as of this writing, I have a nice little set of Docker containers running on my dev box on Linux. And the nice thing about doing this via Docker, especially, is that I could take this exact same docker-compose.yml, reboot my box into Windows, and use it there too. All I need to be running locally is Docker and Docker Compose. The rest of it comes in with the images I specify!

And for the interested, I have checked in my final docker-compose.yml up on my personal Github account, and you can see it right here.

Upgraded annathepiper.org to WordPress 5.0

This is a test, this is a test, this is a test. This is me playing with the new “Gutenberg” editor that comes with WordPress 5.0, and yep, this is sure different.

Gutenberg is oriented around the concept of “blocks”. It keeps offering me things to do to various types of them, including paragraphs and shortcodes. I’m not sure yet if I like this experience yet. But at least there’s a plugin I can install to restore the classic editor if I decide to get rid of this.

For now, anyway, I’ve got this version of WordPress installed on my personal network of sites (which includes both annathepiper.org and angelahighland.com). Assuming nothing obviously explodes, I’ll be rolling it around to the other sites hosted on murkworks.net this weekend.

Rearranging things around here again

I have a tendency to let projects get away from me if I’m not careful, and lately this has tackled me again as I’ve found myself trying to spin off two separate WordPress sites on my network–one for doing indie SDET work, and another for photos. The first was motivated by me getting laid off recently from my long-running day job. The second was brought on by Flickr announcing that they were going to start limiting free users to 1,000 photos and/or videos on their site, which made me think that I might want to move a lot of my Flickr content here.

Both of these projects were nice in theory. But in actual practice, I discovered that having too many WordPress sites to keep track of is annoying for me.

I also discovered that while I liked the idea of a standalone photos.annathepiper.org, this meant that I couldn’t easily get at the photo galleries I wanted to put on it. Say, from pages on the main annathepiper.org site, or old posts. So I’m opting to do the photos thing here instead. And while I think I like the theory of having a standalone dev site on my WordPress network as well, again, I think it’s a bit too much fracturing of how much I need to keep track of with WordPress.

So I’ll be pulling the few posts I put on both of those sites into the main blog on annathepiper.org, as well as the photo gallery plugin I’ve been playing with.

Y’all may also notice that I’ve changed the theme here to WordPress’s Twenty Seventeen theme, since I got tired of looking at Twenty Fifteen, which I wasn’t ever really happy with anyway. And I’ve put up one of my favorite pics as the header. This is my stuffed mammoth Jean-Claude, next to Andre Brunet’s guitar, as taken at Camp Violon Trad in 2017. <3

I’ve taken down the previous menu I had up, as I think about what new things I want to add to it instead. A lot of my older content on this site is stuff I don’t really want to get rid of. But I also don’t want a gigantic menu either!

Anyway. Hopefully this may lead me to actually play with this site more. Let’s see if it does!

(EDITING TO ADD: Hi Dreamwidth people! If you’re seeing this post there, this is of course me talking about rearranging things on my annathepiper.org site, not on Dreamwidth. But the extra bonus of me doing more with annathepiper.org is that you get to see it, too!)

Hiya!

If you’ve been reading me a while, you probably also know that I’m mostly a writer and a geek and an amateur musician. You may also know that periodically I like to take pictures on my iPhone.

Up till now I’ve generally posted my pics both on Facebook and on Flickr. I’ve been using the latter site in particular because while I’m active on Facebook, I also want to have a way for people who aren’t on Facebook to actually see what pictures I take.

This has been lovely up till now. The problem, though, is that as of January 2019 Flickr is moving to a model of allowing free accounts only 1,000 pictures and/or videos. My problem: I have over 1,400 photos there.

Now I have two considerations before me:

  1. I don’t quite care enough about Flickr to want to pony up for a Pro account there.
  2. I do actually have my very own web server.

So this is me playing around with using annathepiper.org as a place to archive older photos. Right now I’m using a WordPress plugin called FooGallery, which offers some really nice UI for album-creating and gallery-creating purposes.

I don’t expect this to be high-traffic. If I turn out to be wrong, I’ll have to tweak the gallery functionality accordingly, and/or post significantly smaller pics than what I can pull off my phone. (Because y’all don’t really need to be downloading full 8 megapixel pics off my phone, do you? Though if you like one of my photos and you DO want the full version, hey, that’s what Dropbox is for.)

Anyhow, let’s see how this works.

Rough test plan for my first indie SDET project

In order to keep my SDET skills active, and to have something I can point hiring managers at, I’m going to do some test projects that will use this very site as the test bed. Here’s a rough plan for how this is going to work.

Requirements

  • Using Python, write a small Selenium suite that will test dev.annathepiper.org from the front end.
  • Using Java, write a separate suite that will use standard WordPress API endpoints to verify the site.
  • Also using Java, since I did this recently in a research task at my last job, show how I’d do Selenium-based testing against the site. Use Selenide as the framework for doing this.
  • Version 1 of this project should be a BVT-level thing that will be testing basic front-end things like “are there pages?” and “are there posts?”
  • Version 1 from the API level should be essentially testing the same BVT level things, only querying via REST as opposed to hitting pages on the site.
  • Stretch goal for the front end: a test that verifies you can leave a comment on a previously existing post.

Test Environments

  • Ubuntu, since that was the environment I most often worked with in my last position.
  • Windows 10, with the Ubuntu subsystem installed.

Both of these are installed on Savah, my dev box, which dual boots between those two operating systems.

Additional tools I plan to use:

  • For the Java code, I’ll be using IntelliJ as that’s what I’m most recently familiar with.
  • Within IntelliJ, I’ll be setting it up to run the tests as a TestNG suite, but also through Maven.
  • For the Python, I will also be doublechecking if IntelliJ will let me deal with Python. If it doesn’t, I will be doing one of two things: investigating PyCharm to see if I like it, and failing that, installing Eclipse. (Eclipse was the last thing I worked with in depth for Python code.)
  • For manual verification of any WordPress endpoints I want to play with, I’ll be installing Postman.
  • I will be installing a local instance of Jenkins to demonstrate my familiarity with running automation jobs via that.
  • For Selenium server purposes, I’ll be installing Docker and the official Docker Selenium images. I’ll be experimenting with whether I will do a standalone Chrome or Firefox image, or setting up a grid via Docker-Compose. (Prior experience with researching this suggests it’ll be the latter.)

What I’ll Do With the Code

I’ll be creating the Python and Java projects as two separate repos up on my GitHub account (taking steps to make sure that any information I don’t want to reveal about account credentials doesn’t get included).

I will include documentation. And, time permitting, perhaps a Powerpoint slideshow to talk about it.

More on this as it develops!

My history with test plans

My last position was pretty standard in terms of how testing a project went. Something like this, in a rather loose implementation of Agile methodology:

  1. Project management, Dev, and QA got together to go over a project concept and discuss what it was asking for. Usually, but not always, this would involve reviewing a BRD (“business requirements document”) or a spec. These could involve wireframes from Design, actual mock screenshots, written expectations for how a thing should work, or all or none of the above.
  2. Sometimes in the same meeting, or sometimes in a different meeting, we’d discuss the logistics of how to implement the desired functionality.
  3. Dev and QA would then task out the expected work. I am familiar with using points to scope out the size of a task, but at this particular position, we mostly just scoped tasks as “this will take me X number of hours to do”.
  4. Once we had the tasks, we’d agree who was expected to perform what, and see how long it would take us to accomplish them so we could commit to a release date. Sometimes this would take us just a single two-week sprint, maybe two depending on how long Dev would need before handing off to QA.

Now, as a member of the QA team, it’d be on me to work with the expected plan for how to test things. Usually this plan would be whatever set of tasks we’d committed to for any given sprint, and we’d take care to write out within each task what the expected work would be. These tasks would often be based on the BRD of whatever we were testing.

But for larger projects, particularly ones where we’d need to pull in external help, we’d often write out actual test cases to use for reference. The tool we most often used for this was TestRail.

Why do I mention all of this?

Partly to go into a bit of detail about my most recent experience with testing, so that I can be able to coherently describe it for later interviews. But also because I want to lay the groundwork for how I plan to do a couple of test projects against this very site.

More on that in forthcoming posts.

Let’s get this party started

Last month I was laid off from my last job, where I was an SDET. As of this writing I’ve been spending the last couple of weeks looking for a new position–and as anybody who’s worked in the tech industry goes, interview loops can be pretty involved and detailed.

My problem: I haven’t been in an actual interview loop for nearly ten years. So I’m out of practice answering the sorts of questions such loops will often give you, like, say, “write me a method that’ll return the smallest integer in an array” or “given a list of input integers, how do you see whether a target integer is in that list?”

In my experience these kinds of questions are not usually the sorts of things you’d have used in an actual job situation. But when I’m out of practice with them, it means I look bad during an interview.

So this site is to help me practice my coding skills to keep them in the forefront of my mind, and to have something I can point at for the sake of hiring managers.

I’ve used this dev site before when doing dev work on my main sites, annathepiper.org and angelahighland.com. So I’ve now reset its database, and will be writing a couple of small automation suites to serve as examples of the sorts of things I did on my last position.

More on this to come!

Some housekeeping updates

Point of interest in case anybody wanders by here, since I don’t update this site very often (most of my activity is over on angelahighland.com):

I’ve done a bit of under-the-hood site maintenance, due to a couple of plugins I have been using on this site being deprecated and/or outright vanishing off of the WordPress.org plugins repository.

This has impacted three things here on the site:

One, my Contact page no longer has a form on it. But I do mention my email on that page, so if you really want to get in touch with me, you can do that.

Two, I have swapped over to using a different Flickr plugin to show stuff from Flickr. This impacts a small number of old posts here, but also my Great Big Sea Pictures. Visually, things should only look slightly different, but work the same general way: click on a thumbnail, it’ll take you over to the actual picture on Flickr.

And three, I’ve done some rejiggering of the custom code on my Roleplay Logs archive. Way back in ye olden times before this site was hosted on WordPress, I whipped up custom PHP to organize those logs and show you all the various sets of them. When I pulled the site into a WordPress install, this necessitated me taking that PHP code and making a custom plugin out of it.

The problem with this: WordPress doesn’t natively let you run PHP on posts or pages, so I’d been using another plugin to allow for the execution of that PHP on the pages in question.

However, since that plugin vanished off of WordPress.org, I felt it was appropriate to rejigger the code so that the actual site pages would no longer need PHP in them directly.

This has meant I got to teach myself how to do shortcodes today! Which basically means I still have the pages calling the logs PHP, but there’s an intervening layer now between “page” and “PHP code”. I.e., a shortcode, a short string that basically tells WordPress “okay now go find the code in the plugin that handles this shortcode, and do the right thing as a result”.

So that’s fun. :)

Anybody notice anything looking wacky, do please let me know!

Decloaking to note a few new log tweaks!

I don’t often post to this site (which would be annathepiper.org for those of you reading this on LJ and Dreamwidth) anymore, but wanted to stick a post up to make a note that I had to do some overhauling of how my RP logs archive works. That, for those of you who haven’t visited this site in a while, is this page over here. Updates to WordPress as well as the operating system on our server required me to make sure that the PHP I’ve been using to organize my logs database was working correctly.

Which I’ve done. But since I’ve also been in a mind to revisit the logs archive in general, thanks to getting caught up on the current EQ storyline and chatting with Dara and our friend James (a.k.a. Flashfire from our days on Two Moons), I found a few logs that had broken links. Those have now been fixed. I also added one new log from 2004, Meeting Akira, in which I was playing Ynderra of Lostholt meeting Akira of the Cat Elves.

The other logs I tweaked, as well as that log, can be seen as recent updates on my New Logs page.

I’ve still got a pretty sizable backlog of RP logs I never posted from assorted MUSHes. I may amuse myself with posting more.

Site update announcement

This is my official post to note that as of the beginning of the new year, I’ll be doing the majority of my posting on my other blog, which is about to shift primary domains from angelakorrati.com to angelahighland.com. This is to consolidate my posting activity, and to make it easier for people who are reading my books to keep up with what I post about.

Annathepiper.org will stay online, but future posts here will probably be much more infrequent. If I post here, it’ll be likely to be about maintenance of content here such as occasional updates to my old MUSH log archive, or other seriously niche things on my part.

For the majority of my book and music and fangirly content, though, please go visit angelahighland.com!