OpenLampTech No. 146
9 rules to optimize PHP | Merge CSV's with one command | Don't use SELECT * | Pipe syntax in GoogleSQL? | Launching my Shopify side hustle
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:
OpenLampTech has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable.
All commentary is mine unless otherwise quoted.
7 Reasons Why Using SELECT * FROM TABLE in SQL Query Is a Bad Idea
I'm guilty of SELECT * myself. For the longest time, I never could get behind what the big deal was.
Yes, for ad-hoc queries you are trying to nail down, SELECT * isn't really a problem. But in production application code is something different.
Read this article to learn why you shouldn't use SELECT *. Reasons 4 and 5 are worth knowing about.
[DZone]
In this article, Ash Allen shares tips for working with Laravel models.
I found many of these topics interesting:
Lazy loading and N+1 query issues: Helps mitigate too many unnecessary calls to the database.
Accessing missing attributes: Non-existent database fields or those named differently than what you think, can cause bugs and variables to be null.
Silently discarding attributes: Attempting to update fields in a database table that do not exist will result in errors. Also, some fields’ values are maintained by other means and shouldn't be updated manually.
[Laravel News]
🚀 Build Your Dream Shopify Store Without Time Constraints – For FREE! 🚀
Are you ready to launch your Shopify store but need more time to gather products, perfect your design, and get everything just right?
Is the Shopify trial period just not long enough for you? 💻
With a Shopify Partner's account, I can help!
Build your store with ZERO time limits – at no cost to you! 🎉
I'm now offering onboarding through my Shopify Partner account for DIYers, self-starters, and those who want to set up their store without time constraints or trial periods.
📩 Hit Reply to learn more and get started. FREE until you launch!
9 Rules to Optimize PHP for High Traffic Websites
Several pieces make up a website's overall performance.
Optimized database, solid hosting resources, etc.
Well-written code is another and in this case, PHP.
PHP is evolving with each release and continues to thrive as a choice for modern web development.
Follow the suggestions in this article so your PHP code is the best it can be.
[Medium]
Demystifying Liquid Markup: Output vs. Tag | A New Series Begins!
Shopify Liquid templating language provides the means to inject dynamic data in theme files (typically the HTML code in liquid files).
As I'm becoming more interested in (and involved with) Shopify, I'm purposely learning more about Liquid.
Learn about the difference between output markup and tag markup in this article.
Reply to this email to ask me about it.
[Medium]
SQL Has Problems. We Can Fix Them: Pipe Syntax In SQL
While this is outside the (typical) MySQL content I normally share in OpenLampTech, I am working with Google BigQuery more in my day job. Since GoogleSQL is (I think) the foundation for BigQuery, I thought to at least include this in the newsletter this week.
Yes, SQL is an older language that is very rigid and often difficult to work with.
I'm interested in your thoughts about extending SQL to make it more modern.
[Google Research]
Sharing sawdust…
This simple one-liner is so powerful.
Merge multiple CSV files into one CSV from a Windows cmd prompt (best for CSV files with no headers):
C:\directory\where\csv\files\are> copy *.csv NewFileName.csv(Note: While doable with Bash in Linux and macOS, it's not quite a one-liner).
Also, I’ve noticed in Windows that the very last line of the merged CSV file has a weird ASCII character. I advise deleting it because it seems to wreck my other processes when present (AutoCAD Civil 3D hates it lol).
WooCommerce news and updates
WooCommerce 9.2.3: Dot Release (Aug 26th, 2024)
WooCommerce 9.3: Pre-release updates (Aug 27th, 2024)
[#Affiliates and Classifieds] - Your support keeps the OpenLampTech newsletter free for readers
Ultimate Laravel Boilerplate to help other indie hackers deliver their SaaS in hours. Get started with LaraFast today! (affiliate)
Popups, newsletters, and abandoned carts. Use Omnisend with integrated email and SMS campaigns. (affiliate)
Check out the Ecommerce Coffee Break newsletter (and podcast) for the latest in Shopify news. (subscriber incentive)
The latest ShutterCraft 101 newsletter has been published and is available if you are interested in my photography journey.
Thank you for reading. I hope you have a great rest of your week.
Take care.
Josh Otwell
Some links may be affiliate links from which I earn a small commission at no additional cost to you.


