TL;DR Segment → M Bytes! ​ Hey Reader, I hope you're having a great start to the new year! Don't worry, this isn't an unsolicited message — you are receiving this because you are a subscriber of M.academy's Segment newsletter. After some deep reflection and introspection this last year, I decided to focus on just one thing this year: teaching. Teaching has always been a focus of mine, but it came second to running the business. Answering emails, taking requests, providing support... all great things, but my main thing wasn't my "main" thing. So in 2025, I aim to make teaching my main thing. Rather than sending you newsletters with small tips, modules, and funny memes, I decided to double, even triple down on this teaching thing. I love learning, and I'd love nothing more than to teach you everything I know. This means Segment is now... M Bytes! This will be a streamlined newsletter: → Sent every Thursday → Contain three fresh "atomic" video lessons from that week (yes, free video lessons!) → Include one Magento lesson, one "edge" lesson (think PHP, Docker, etc.), and one "flex" lesson about anything Atomic lessons are focused, bite-sized videos that teach one specific concept in the simplest way possible. You'll also notice that emails will also be far simpler and streamlined. The thinking around this is that I don't want to worry about fancy graphics, styling, or things that don't directly improve your learning experience. Without further ado, here are your first three lessons.
P.S. I'd love to hear your feedback! Feel free to reply directly to this email and let me know what you think, or take the one-click poll at the bottom of this email. ​ List Magento cache keys in Redis CLIMagento organizes its cache keys in Redis in a very specific way. The first step is to connect to Redis using the redis-cli command. If you're using Docker, you'll need to connect to the container first with "docker-compose exec redis redis-cli". Once you're in, you can view all Redis entries with a simple "KEYS *" command. Specific entries with "KEYS zc:*". The "zc:" prefix stands for "Zend Cache", which is Magento's underlying cache framework. Magento's cache entries then follow a consistent pattern. You'll see two main types: "k:" for actual cached content, and "ti:" for tag indexes that group related items. Each entry also includes a unique cache ID prefix for your Magento instance, followed by the specific cache identifier. These patterns make it easier to understand what's happening in your cache. For instance, an entry like "zc:k:69d_SYSTEM_WEBSITES_BASE" tells you it's a Magento cache entry containing website configuration data.
​ Configure Xdebug modesConfiguring Xdebug doesn't have to be complicated — it all starts with your php.ini file. You can quickly locate this file by running "php -i | grep php.ini" from a bash prompt. The key config setting for Xdebug is xdebug.mode. This single prop controls which debug features are available to you. Want to do the typical step-by-step debugging? Set this to "debug". Need to analyze performance? Use "profile". You can even combine multiple modes together by separating them with commas, like "xdebug.mode=debug,trace,profile". There are quite a few other modes too. There's also a quick way to verify if your settings are active. From terminal, run "php -i | grep xdebug.mode". You'll notice that the results include two values: one is a local, active value, and the other is the master value. Sometimes these may differ, especially if there's an override somewhere in your system. But you always need to answer to restart your web server after making changes to make them active.
​ Write better LLM prompts for AI code generationThe key to getting great code from AI isn't luck — it's all about how you structure your prompts. Most developers start with something overly simple like "Write me a Laravel controller for user registration". This usually results in basic, incomplete code that needs significant rework. Instead, start by setting the AI's persona. Provide it some info such as providing clean, simple solutions, which will prevent it from writing overly complex. Specify your tech versions upfront. The difference between PHP 7 and PHP 8.3 is massive, and you want to ensure you're getting modern features like constructor property promotion. Be crystal clear about your coding standards. List out exactly what you want: modern PHP features, framework conventions, JavaScript preferences, and validation requirements. I've also found that using chain-of-thought prompting with "thinking" tags is incredibly powerful. It's like having the AI whiteboard the solution before writing any code, leading to more thoughtful implementations. Think of it like briefing a senior developer who's never seen your project. The more context you provide upfront, the better the results will be.
​ ​ The best Magento developers never code alone. In Campus, our private community, you'll find peers solving similar challenges and sharing real solutions. It's included with every University membership.
​ ​
​ |
Join 9,000+ developers and get three free video lessons every week.