OpenLampTech No. 189
Websites to learn more SQL | PHP strict types | Claude-generated commits | SQL FILTER | Using VARCHAR(max)?
Thank you for reading the OpenLampTech newsletter!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
Happy 4th of July (Independence Day)! I hope you have a safe and enjoyable holiday with your friends and family.
OpenLampTech has sponsorship opportunities for your brand, product, service, or job listing in the weekly newsletter.
As an independent publication, collaboration is very affordable.
[Shout-out]
Please follow my friend Rick Rouse’s fantastic newsletter, Rick's Tech Tips Newsletter. Rick publishes some of the best, up-to-date tech tips and information.
All commentary on the below curated content is mine unless otherwise directly quoted.
PHP Strict Types vs Weak Types: When and How to Use declare(strict_types=1)
Quote from the source article:
“By enabling strict types, you can catch type-related bugs early and make your code more self-documenting.”
You can use strict types in a PHP file by placing this code on the very first line in the script: declare(strict_types=1);.
Unless strict types are declared in a script, PHP uses automatic type coercion.
Over two and a half years since this article was published, these websites are still some of my favorites.
If you want to learn more SQL or think with a SQL mindset, visit any one (or all) of these sites.
Knowing SQL and knowing SQL deeply are two distinct things, and these sites provide content on the latter, in my opinion.
[OpenLampTech]
I Read All Of Cloudflare's Claude-Generated Commits
First of all, my git skills are somewhat (quite) lacking. Secondly, what a great idea to include the actual prompt with the code in the commit.
As someone who has really turned the corner with AI in the last several months, I still have doubts and plenty of frustration with it.
However, I've also made it a point to write better prompts and include important information like additional files (sample CSV data, SQL schema, etc.) if needed.
“Sometimes, the original prompt is more valuable (and easier) to review than the resulting code—especially when an engineer declares an incorrect assumption that the model blindly follows.”
Postgres SQL FILTER: A Smarter CASE and CTE Alternative
To my knowledge, at the time of publication, MySQL does not support FILTER. Since I primarily work with MySQL/MariaDB databases, this is one feature where PostgreSQL has a leg up on those RDBMS.
This article provides examples of how to use FILTER compared to CASE or Common Table Expressions, which you would need to use in those databases that don't support the FILTER clause.
Why Not Just Use VARCHAR(MAX)?
I spend a great deal of time (probably too much, honestly) considering data and its types when defining an SQL schema.
And for good reason, too, because you need to get this part right.
Nothing stinks worse than realizing you need to edit the data type for a field in the schema, especially if there is now data in the database.
[SQL Undercover]
WooCommerce and WordPress news and updates
What we’re doing to get the Woo Block Theme ready for you (July 1st, 2025)
Highlights from our updated Woo Developer Documentation (July 2nd, 2025)
The Developer Blog needs you! (July 2nd, 2025)
Cart and Checkout Block Container Query Support in WooCommerce 10.0 (July 3rd, 2025)
A Year of Accessibility Improvements in WooCommerce Core (July 3rd, 2025)
Thank you for reading OpenLampTech. I hope you have a great rest of your week.
Take care.
Josh Otwell


