When a Referral Program Slows Down
A customer watched their referral numbers climb steadily for months—until it suddenly slowed down.
By the time we spoke, the frustration was clear. The team had invested real effort into building momentum, so the hiccup felt personal. Their first order of business was to regain control by making a few adjustments to the program.
As we walked through what had changed, the issue came into sharp focus. The program itself hadn’t failed, no. But the attitude around it had shifted.
The Importance of Writing Things Twice
In many domains, critical information is deliberately written down twice in two different places. While this might appear redundant, the practice is a safeguard against errors, loss, and failure. The underlying principle is simple: no single point of failure should be able to compromise the system.
20250911 Daily Scrum
Lost my laptop, possibly due to a virus, and now I have to rebuild it. Yeah, losing a laptop is hard. On the one hand, I have to be ready for such unfortunate events. And I actually am ready - I have a recent backup. I have non-recent backups, as well. Most important things are also duplicated in the cloud. Some heavy files like videos aren't backed up, but I'm actually not losing much there. And I managed to back up text files and important small files of the most recent days, via a tether. So I'm good, overall.
[FIXED]: drush The specified database connection is not defined: default
Fixing this took me years... I can't believe how long it took. The answers on stack overflow did not help.
The error was due to a mismatching php configuration for running in the shell ( /etc/php/8.1/cli/php.ini ) and in apache (/etc/php/8.1/apache2/php.ini ).
Specifically, I had to enable short tags for the shell:
20250424 Scrum: Switch from consumption to production
...then, the current idea, from completely lacking motivation to work, is as follows. Instead of reading news, etc, and being generally unuseful, I will spend time *writing* news, or scrum updates, or 2d sketches, or whatever else that can be generated, rather than consumed.
HTML class naming conventions, and id naming conventions
In HTML, classes should be lower-case with dashes:
<div class="class-name-1 another-class-name"> </div>
There are exceptions:
<div class="BookChapter" ></div>
However, ids should be camelCase or PascalCase (capitalized first letter):
<div id="thisDiv"></div><div id="anotherArray"></div>
What's a better name: tag1 or tag_1 ? Should it be tag-1 or tag_1 ?
Or the same question can be asked as: what's a better name: tag1 or tag-1? Depending on if underscores are disallowed, or dashes are disallowed.
While we are on the topic of dashes vs underscores, check out when to capitalize HTML classes, and when to keep ids in Pascal Case.
How to reset admin password in Fat Free CRM
It appears that you can just re-run the setup in order to do that:
bundle exec rails ffcrm:setup
.
A simple script to login to a docker container
I have two versions: one for linux, and one for mac. If anyone knows how to combine them into one, please post in comments below!
Testing and browser automation, with Selenium and Rspec: Initial Setup
You can download the Selenium remote grid jar here:
Drupal 9.5: How to render a block from a controller
Based on this excellent stackoverflow answer.
$bid = ??? // Get the block id through config, SQL or some other means
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->
getViewBuilder('block_content')->view($block);
return $render;.
How to program Drupal Cron
From drupalsun.
Implementing Cron tasks in Drupal
Cron tasks are defined by implementing the hook_cron hook in your module, just like in previous Drupal versions.
/**
* Implements hook_cron().
**/
function example_cron() {
// Do something here.
}And that's pretty much it. Rebuild cache and next time cron runs your hook will be called and executed.
Canon Digital Photo Professional - free download
One of the pieces of software that I enjoy using very much is the Canon Digital Photo Professional. I originally got it a loooong time ago, back when I was taking photography classes. It came with one of the Canon cameras that I've bought over the years. At the time I used it to browse and sort my pictures, sure - and only years later I realized just how valuable and useful this piece of software is.
A recommendation to rename "criticality" -> "priority"
Just throwing two cents here - if the pandemic taught us 10 things, one of those ten gotta be that small details in communication matter very much. With that, I recommend renaming the word "criticality" -> "priority". The reasoning is as follows. And be careful with the red color in the smart sheet too, please, for the same reason.
An example of a bug report and the technical conversation around it to resolve it
I recently had to justify the amount of effort that software development takes. Someone unfamiliar with the process thought that software development is easy, or that it doesnt take much time. They thought, for example, that an advanced reporting app can get pdf export capability if they just said to the development team, "implement pdf export." Literally, they thought that writing a single line of text like that in a specification document would result in the organization gaining that functionality.
Testing async code with Jest
After a little bit of struggle, I have managed to implement a jest that correctly tests an async fetch call. That is, suppose clicking a button initiates a POST request, and upon success some action takes place or some message gets displayed. I needed a test to assert that the action indeed took place.
My component looks as follows:
A review of some on-prem software services
I recently came by this picture at r/selfhosted and thought it useful for reviewing which services I use, and more importantly, which services I am missing.
The original post said that he hosted all of these on a single raspberry pi. Regardless of whether that is the case for you, or for me, I think reviewing which services are running, would be useful.
Drupal: how to redirect to a specific page after login
In this article, we'll look at two ways to redirect the user who is logging in, to a specific page in Drupal (version 9.5). First, Thesavvyfew alludes to a code solution that could be utilized:
How to mock fetch and a state change in jest, react
tl;dr: I decided not to do it.
Since Enzyme is obsolete as of React 18, you would use <render /> and not <mount />. Therefore, you don't have a wrapper to manipulate and observe the state of the component being tested.
Furthermore, I'm really only testing the component because it's a best practice, and because of the expectation of future complexity. The state change itself is trivial:
[FIXED] Cannot find module babel-preset-react-app/ node_modules/@babel/runtime/ helpers/interopRequireDefault.js
The solution for me was to clear Jest cache:
./node_modules/jest/bin/jest.js --clearCache
[SOLVED]: RTNETLINK answers: File exists
Running the following fixed it for me (replace wlan0 with your network interface):
sudo ip addr flush dev wlan0
And with that, I was off to the races.

