PHP is a loosely typed interpreted language. That means we cannot compile our scripts and find possible execution errors without doing explicit inspections of our code. It also means we need to rely on conditional type checking or using phpDoc comments to tell other devs or IDE what kind of value to expect. Really there is no way to assess the quality of the code or discover possible bugs without thorough test coverage and regular review.
Recently, while working on a little project, I decided to clean up some of the commits on the master branch before pushing it to Packagist. To be lazy, I decided to use PhpStorm's interactive rebase tool instead of the good ole command line.
BUT I COULD NOT! And I started to go mad.
People often tell each other to have a good day. But, it has become one of those customary things to say without much meaning behind it. Which is a shame, because we really should remind ourselves to have a good day. A few weeks ago my son Aiden left me a note, which I found after dropping him off at school.
Fall has felt like a whirlwind. I caught myself chasing after the eternal pile of work that needed to be done and not recognizing the victories of the day. Instead of letting myself have a good day, I was forcing myself to a negative for the next day. I wasn't having bad days, but I found myself less than chipper. I found myself working at home more than riding my bike to the coworking space downtown, I had stopped running and reading. I didn't fill those gaps with work, I just took moments to sit.
It is funny how a little note can cause you to stop, think, and act. Despite the wintry midwestern weather setting in (~30°F / ~2°C) I have been able to pick up running again and get my reading back on track. Sometimes you just need a reminder to focus on the victories of the day and remember you did all you can do.
DDEV is a local development stack built on top of Docker. It gives you all of your environment needs without messy configured on your host machine, without needing to know Docker or configure your own containers. Which is great, and makes life easier. Instead of just using DDEV to develop your site or application locally, why not also run your tests within it?
Working in object-oriented programming is great. You can define interfaces which specify a contract that implementers need to fulfill. You can then extend these to define your end requirement and provide the implementation. This also means you can guarantee an object that implements that interface will have a guaranteed set of known methods. In Drupal, all entities implement EntityInterface, this is how we know that an entity can return its identifier, label, language, and other common methods.
I am looking to try something new on my site, adding a way to just provide quick updates. Possibly experimenting with it being my way to publish to social networks.