Fluent interfaces and method chaining: A potential hidden landmine

Of late, I have been doing some maintenance work on a legacy website which uses Laravel and PHP 7 (work on the upgrade is in progress). In testing, we found a situation where we were trying to call a method on a NULL value. The line of code read as follows:

      $fleet = Chapter::find($this->getAssignedShip())->getAssignedFleet(true);

The code would then go on to properly use the $fleet value, checking for whether or not it was NULL before using it.

Why I hate Windows

While I use Windows on a limited basis, I generally have a hate-hate relationship with it. My transition from an old Dell laptop running Windows 10 (which was out of warranty and having the fans fail) to a new one running Windows 11 hit several of my buttons in this relationship, which I will touch upon here today, in roughly the order I encountered them. And all this is beyond the whole $$ for functionality mindset.

Incomplete/Incorrect demos

I recently have been trying to work up a side project using Laravel to download and display the information from my YouTube video playlists, using an API which requires OAuth2 authentication. The last time I played with something like this was years ago, and they only required an application key, not the full blown login.

Heimdallr... crossing the rainbow bridge.

In my last post, I talked about running into limitations with Django and Python, where I had queries I was wanting to do, but the integration between the RawQuerySets and DRF were blocking me from being able to easily build those queries and route the results to the DataTable.. Well,  I spent a day or two this past weekend recreating the entirety of what I had written in Django and Python  using Laravel and PHP, and I have some observations.

Heimdallr, do we have a bridge to cross?

When I first wrote about Heimdallr, I saw it as a project which was going to be written in Python using Django. I have been using both PHP and Python since their initial releases, but something made that pairing stand out.  First, outside of it using colons with indention to indicate code blocks, I have liked the ecosystem with stronger typing like C/C++, whereas PHP was weaker in its typing.

Jenkins, Django and CI/CD (GitHub webhooks triggering Jenkins)

This is a bit of a continuation of this article, where I talk about Jenkins, Drupal and CI/CD.  In this case, I am not talking about Drupal, but about a Python/Django project I have been working on to track job applications rather than using a Google spreadsheet, which was getting a bit unweildy with hundreds of rows. This project is up on GitHub, here, and I will be referring to this project through part of this article.

Datatables: PHP vs. Python with DRF or django-ajax-datatables

I have been using jQuery DataTables for some years now, and have yet to find anything better. With its ability to produce tables with AJAX, built in sorting, filtering and more, I have used it to display datasets of over a million records. The problem comes when writing the backend code to create the DataTable and handle the AJAX requests. Recently, I started writing a Django application to track my job applications, since the spreadsheet was getting unwieldy with hundreds of rows. But unlike using PHP and Zend Framework, I have a ways to go.

Unit testing and competing ideologies

When it comes to computer programmers and even computer aficionados, there are a number of things which are subject to debate, and at times, these can almost approach a religious holy war given the right individuals. Examples of some of these include "PC" vs. "Mac", "Windows" vs. "*NIX", "vi" vs. "emacs" and more. So it is of no surprise that even within testing, and specifically unit testing, there are some areas were competing  ideas can cause similar reactions.

Centralized Logging and Log Analysis, part 1

Centralized logging and observability is not a new concept. Decades ago, at CompuServe, we had over 1000 machines running BSD/OS, and the idea of visiting each one to check machine health was laughable at best. Indeed, even just pulling the logs back for analysis was just as bad. So on each machine, syslog had lines like the following in the syslog.conf file: