TheJach.com

Jach's personal blog

(Largely containing a mind-dump to myselves: past, present, and future)
Current favorite quote: "Supposedly smart people are weirdly ignorant of Bayes' Rule." William B Vogt, 2010

Some thoughts on test automation

I found an old piece of paper from ~2014 that had some bullet points on testing philosophy I had back then, mostly to help myself articulate things in interviews. Reading through the list I still believe a lot of them, but others not so much or I have more qualifications. Let's look at them, elaborate, and add some thoughts not present then.

* Code should be designed for testing -- create hooks/test points (if hardware) if necessary. Want to facilitate "white-box" testing.

Mostly makes sense to me. This has larger implications though depending on language and test type and how exactly you're designing for tests. The very worst design idea is to have code like "isRunningTests()", and to make worst worse have code inside such blocks doing things like "getTestContext().getProperty("blah")" to use for the code instead of whatever the real thing was.

See Full Post and Comments

IT'S OVER 9000!!!!!

What?! 9000?!

(I only get to do this once.)

See Full Post and Comments

Blog rewrite notes - postponement?

As mentioned in the first post, this blog was running on some pretty ancient infrastructure... well over the past couple of nights I finally decided to do something about it.

The first thing to go was the old Ubuntu 14. Instead of creating a new image on say Ubuntu 20, though, I went with my favorite OS (and the one I use for my PC): Gentoo. Some time ago I remember trying to build my own Gentoo on EC2 with some tooling, but it didn't work. In the end this time I went with an unofficial image.

As usual be careful of your trust tolerances -- I don't know anything about this group other than they've been around offering this thing for years. I spun up a new instance and poked around, it really is quite minimal (excellent!) and nothing crazy jumped out.

See Full Post and Comments

Blog rewrite notes - serving the front-end

Last time I wrapped up the actions that the server needs to support. This time I want to write a bit about how I ultimately want to render the front-end...

Starting with how it currently renders, it's done in a rather classic server-side rendering way. I have several "template" files that organize the site content, and each request is handled by applying some template to the dynamic content and sending down the HTML with no further interactions needed.

I'd like to keep everything as noscript friendly as it is. I really dislike the direction modern sites have gone of needing JS for everything, even if there are advantages depending on the tradeoffs you want to make. (Headless CMS is increasingly popular for instance.)

See Full Post and Comments

Signs of Fear Driven Development

Note this is sort of a draft/WIP post... I intend to update this sporadically as I notice or re-notice new signs and perhaps rewrite in a more organized manner one day. If you're skimming, the signs are in bold text.

I've written a bit about FDD before but it's probably worth calling out separately and compiling a list of signs you, your team, or your company may be suffering from it. And possibly some suggestions for ways out.

Today's trigger for the post was actually another software evolutionary branch that got cut off with the demise of the Lisp machines. Take a look at this tweet and its replies:

See Full Post and Comments

Blog rewrite notes - supported actions

Last time I wrote about a minor itch to rewrite this blog from PHP to Lisp. I started off discussing the database schema, this time I'll briefly mention a few of the operations the code has around the data.

(Like many websites, ultimately this is just a nicer looking interface to a database.)

Websites can also be modeled as functions mapping routes to responses. This is how my code is structured. Every request (unless whitelisted otherwise) goes through index.php. It uses the first segment of the route, such as /view, to determine a more specific "service" to handle the rest of the route if it can. The services I have are:

See Full Post and Comments

Time for a blog rewrite?

I wrote this blog from scratch over a decade ago. It's still serviceable, and pretty easy to go in and edit stuff or add new things. I still like the little micro-framework I use. The language is PHP.

But a decade has come and gone, and the PHP I liked then is not the PHP in fashion now... My server is running PHP 5.5, but the code is effectively capped at 5.3, and even then uses very little features beyond the basics that PHP 5 added. That is, while other PHP projects I've worked on used things like namespaces (!) and big frameworks (!) like Yii or Symfony, this old blog is just fine with a handful of PHP 5 classes.

So what's got me thinking about a rewrite? I've heard the upgrade from PHP 5 to PHP 7 is relatively painless (my concern without looking at it is that I have to go through the code again to spruce up potential unicode issues, which I last did in 2011...). However even if that's so, and I test it out locally and do the migration work (I don't even have PHP on my gentoo system right now, partly because v5 isn't in mainline portage anymore) then I still have another obstacle: Ubuntu.

See Full Post and Comments