Tag: advent2023

Advent 2023: Makefile

I like to automate common workflows when I can, particularly for web projects. As an example, I may have different Docker Compose setups for development versus production, and having to remember to add the -f {compose file name} argument can be tedious and error prone.

Being a long-time Linux user, I've used make a lot, and am fairly comfortable with Makefile, so I often turn to it for these tasks.

Continue reading...

Advent 2023: Doctrine DBAL

I've mostly taken database abstraction for granted since I started at Zend. We had a decent abstraction layer in ZF1, and improved it for ZF2. There were a lot quirks to it — you really had to dive in and look at the various SQL abstraction classes to understand how to do more complex stuff — but it worked, and was always right there and available in the projects I worked on.

In the last couple of years, though, we came to the realization in the Laminas Project that we didn't really have anybody with the expertise or time to maintain it. We've marked it security-only twice now, and while we've managed to keep it updated to each new PHP version, it's becoming harder and harder, and whenever there's a CI issue, it's anybody's guess as to whether or not we'll be able to get it resolved.

My alternatives have been straight PDO, or Doctrine DBAL, with the latter being my preference.

Continue reading...

Advent 2023: Forms

The first thing I was tasked with after I moved full time to the Zend Framework team (17 years ago! Yikes!) was to create a forms library. Like all the work I did for ZF in the early days, I first created a working group, gathered requirements, and prioritized features. There were a lot of requests:

  • Ability to normalize values
  • Ability to validate values
  • Ability to get validation error messages
  • Ability to render HTML forms, and have customizable markup
  • Ability to do nested values
  • Ability to handle optional values
  • Ability to report missing values

and quite a lot more. But those are some of the things that stuck out that I can remember off the top of my head.

Zend_Form was considered a big enough new feature that we actually bumped the version from 1.0 to 1.5 to call it out.

And, honestly, in hindsight, it was a mistake.

Continue reading...

Advent 2023: $PATH on Wayland

This year, I finally switched over to using Wayland on my desktop. I figured that with Ubuntu planning to use it by default in 24.04 and Fedora already defaulting to it, it was likely stable enough to use.

I've had a few issues in the past when I've tried it, primarily around screen sharing, but thankfully most if not all issues I've hit in the past are solved. I did run into one issue, though: when setting startup programs or using Alt-F2 to run a program, it wasn't finding stuff on my path.

Continue reading...

Advent 2023: FocusMe

Like a lot of folks, I struggle with executive dysfunction, and it gets exacerbated when I'm hungry or tired. When I was younger, back in the bad-old-days of dial-up and slow internet, my goto activity at those times was to read; I'd read easily a book a week (except when I was reading Dumas; those took forever). Now with a phone in my pocket and the internet always there, I find myself going through social media or browsing news, and I find I'm the poorer for it.

However, when executive dysfunction kicks in, it's hard to choose to do something else. Recently, I took a page from my son, and started looking into ways I could game myself into better choices.

Continue reading...

Advent 2023: MOTD on Ubuntu

I never intended for this Advent 2023 series to be a "Matthew's Bash Tips" series, but evidently, that's where things are going.

Today, I detail how to get the "message of the day" on Ubuntu

Continue reading...

Advent 2023: Shellcheck

As you may have noted from previous posts in this Advent 2023 series, I find myself using Bash more and more often. This has certainly been a surprise for a career PHP developer, but it is what it is.

With PHP, there are a wealth of QA tools, from unit testing, to enforcing coding standards, to static analysis. What about with Bash? Well, the tools exist, and there's one I literally cannot write Bash without: Shellcheck.

Continue reading...

Advent 2023: A deploy script

For the fourth day of 2023 advent blogging, I'm sharing a tool I've used to simplify deployment.

Continue reading...

Advent 2023: Bashly

For the third day of my 2023 advent blogging, I'm covering a tool I've really leaned hard on the last few years: Bashly.

Continue reading...

Advent 2023: NTP on AWS

Continuing my 2023 advent blogging, today is a tip on getting NTP to work on Amazon AWS EC2 instances.

Continue reading...