Hello Friends 👋🏻
Welcome to the fourth edition of the Segfault newsletter.
An entire week has passed by since the last time I wrote to you guys and since then, I did almost nothing productive in terms of tangible work. Now, this is no surprise to me — for the last several years, I have experienced mental blocks like this 2-3 times a year when I am unable to get anything done for days, sometimes weeks. I wonder if this is burnout.
This kind of mental block is very disturbing for someone who really loves what they do and considers work as their fuel for life. Whenever I am hit with such a lag, I try to assess what may have caused it. Sometimes I have a few clues, sometimes I have nothing. The current one is one of those where I have no clue.
Fortunately, I brought this up in a discussion with an industry colleague yesterday and he suggested one actionable tip that worked for him in similar situations: StrongLifts 5×5. It’s a simple, no-brainer workout program that requires going to the gym 3 times a week and only doing a handful of exercises. I am going to start that ASAP.
👓 Recommended Readings
I read a few great articles over the week, so here are my top 3 picks for you.
Top 30 YouTube Channels for Laravel and PHP Developers – In this blog post, the author Ashley Allen compiled a list of the top 30 YouTube channels that he thinks every Laravel and PHP developer should consider subscribing to. I was already following some of the channels but discovered a few great ones through this compilation.
Keep Cognitive Complexity Low with PHPStan – What is cognitive complexity? It's the amount of information we have to hold in our heads simultaneously to understand the code. In this short little post, author Tomas Votruba shows how to use PHPStan to help identify and reduce this complexity.
Laravel AaaS - Actions as a Service – In this long-form article, author Wendell Adriel explains why he thinks Invokable Controllers are a bad pattern and how one can use Action classes to achieve the same results. Personally, I think both strategies have their merits and one should pick the one they are most comfortable in.
If you have come across a great write-up and want me to share it with others, feel free to reply to this and/or write in a comment.
📦 Great PHP Packages
A couple of notable packages I’ve come across that I’ve bookmarked myself and would recommend to others.
Enum — It’s a zero-dependencies PHP library to supercharge enum functionalities. It has a handful number of helper functions to reduce repetitive work with enums. I like the approach and will be using it in my next projects.
Laravel Query Builder — This package allows filtering, sorting, and including eloquent relations based on an API request. The
QueryBuilder
used in this package extends Laravel's default Eloquent builder so all the existing functionalities are available. A very handy one if you’re working with APIs.Hackers Mind Map — A very interesting tool for developers who love to work on their terminals. It’s a simple, fast, keyboard-centric terminal-based tool for working with mind maps. The UX is extremely well done and the keyboard shortcuts are very easy to pick.
🐦 Tweetworthy
One tweet on productivity that I am going to implement this month:
It doesn’t have any mumbo jumbo and is very simple to understand. I can immediately see why this is going to work and thus I am really pumped to implement it right away.
📖 Book Alert
If you’re using Inertia.js in your applications, then I have good news for you. Boris Lepikhin has just recently launched a brand new book called “Advanced Inertia” to supercharge your Laravel applications that use it. You can learn advanced concepts and make apps with Laravel and Inertia.js a breeze to build and maintain.
That’s all for this week. Feel free to hit that reply button if you have a question or if you would like to open a discussion.
Follow me on Twitter to get the other stuff I am sharing that won’t be included in this newsletter 😉
Thank you for subscribing.
– Mohammad Emran
PS. If you enjoyed my writing above or found the resources I shared helpful, it would be of great help if you let your friends know about this newsletter by sharing it 🤜 🤛
Great edition Mohammad, I am sure many people are experiencing funks like this. Thank you for sharing and I hope you snap out of it and inspiration finds you again.