It’s very important to remember that PHP caches results of file-system functions. Details are here.
I’m trying to just literally never argue with people
I’m reading this great interview with Marc Andreessen in which he says:
I’ve really been trying hard to spend less time actually arguing with anybody. Because people really don’t want to change their mind. And so I’m trying to just literally never argue with people.
…I thought that was worth making a note of. I think I’m going to take that on board.
How much does it cost to run a blog?
Today I read How Much Does It Cost To Run This Blog?. The bottom line was:
| Item | Monthly Cost |
| Domain registration | £0.49 ($0.62) |
| VPS hosting | £12.00 ($15.23) |
| DNS hosting | £1.54 ($1.95) |
| WP Rocket plugin | £0.79 ($1.00) |
| ShortPixel credits | £0.65 ($0.83) |
| Updraftplus SFTP plugin | £0.79 ($1.00) |
| Yoast SEO plugin | £8.90 ($11.30) |
| Total: | £25.16 ($31.93) |
Feynman technique
Today (while reading this) I stumbled upon the Feynman technique.
Basically with the Feynman technique you just write down everything that you know about a concept/subject until you can see where your knowledge is shaky. It’s a problem solving tool.
Most bugs are in your error handling code
While reading What tools made you better programmer I came across a link to Error Handling in a Correctness-Critical Rust Project which included these two tidbits:
almost all (92%) of the catastrophic system failures are the result of incorrect handling of non-fatal errors explicitly signaled in software.
in 58% of the catastrophic failures, the underlying faults could easily have been detected through simple testing of error handling code.
Konsole column width
So after having read this I was trying to configure Konsole by editing my config files under
~/.local/share/konsole
and I couldn’t get my column width config to apply.
The problem was that I was configuring column width with the TerminalCols setting, but the correct setting is actually TerminalColumns, which was difficult to figure out! Not sure how I managed to get that wrong in the first place, but it’s fixed now.
My new Konsole dimension settings are:
TerminalColumns=100 TerminalRows=42
salt stack file_tree.py
So in my version of salt, v2017.7.4 (Nitrogen), I was getting this error when I tried to use the file_tree ext_pillar:
Failed to load ext_pillar file_tree: must be str, not bytes
So I monkey patched my version of /usr/lib/python3/dist-packages/salt/pillar/file_tree.py, changing the file from binary to text:
contents = ''
try:
# 2020-05-15 jj5 - changed 'rb' to 'r', will only work with text files...
with salt.utils.fopen(file_path, 'r') as fhr:
buf = fhr.read(__opts__['file_buffer_size'])
while buf:
contents += buf
buf = fhr.read(__opts__['file_buffer_size'])
if contents.endswith('\n') \
and _check_newline(prefix,
file_name,
keep_newline):
contents = contents[:-1]
10 Popular PHP frameworks in 2020
I enjoyed reviewing 10 Popular PHP frameworks in 2020.
HTML forms
Found a cool series of articles: How to Build HTML Forms Right. Only the first two of five articles have been published so far, but I’m looking forward to the next three. The articles are about how to do forms right in HTML 5.
The articles are rich with links, click through for heaps of info. Some things that I found:
GRASP
Today I stumbled upon GRASP. I give it a 5 out of 10.