This on r/programming today: How to Deal with Difficult People on Software Projects.
Monthly Archives: March 2021
PHP finally blocks not run on exit
I confirmed with the following code that if you call ‘exit’ withing a ‘try’ block the ‘finally’ block does *not* execute. That’s probably what you would expect. But now we know.
register_shutdown_function( 'handle_shutdown' ); try { exit; } catch ( Exception $ex ) { echo "caught...\n"; } finally { echo "finally...\n"; } function handle_shutdown() { echo "shutdown...\n"; }
KDEInit could not launch ‘/usr/bin/kcachegrind’
When I open *.xt files from Dolphin on my KDE Plasma desktop Dolphin would lock up while kcachegrind ran and then when I exited kcachegrind Dolphin would complain:
KDEInit could not launch '/usr/bin/kcachegrind'
So what I’ve done is to create a custom kcachegrind.sh script to run xcachegrind properly and then re-associated *.xt files (application/x-kcachegrind) with the new script in Dolphin.
Bug fixed!
How To Use SSHFS to Mount Remote File Systems Over SSH
Some good doco from Digital Ocean over here: How To Use SSHFS to Mount Remote File Systems Over SSH.
Enabling XDebug for PHP under Apache2
Putting these settings in /etc/php/7.2/apache/php.ini did the job:
[XDebug] xdebug.profiler_enable = 1 xdebug.profiler_output_dir = /tmp/xdebug xdebug.profiler_output_name = cachegrind.out.%p.%u.%H.%R.xt
The cachegrind files are now written to /tmp/xdebug.
Software disenchantment
Well someone is/was upset: Software disenchantment. I really liked the image of the design process: simple -> complex then complex -> simple. Maybe that’s the answer to Nikita’s woes: we’re just not finished yet.
When Should I Interrupt Someone?
A fun article on Hacker News today with the maxim: if you’re stuck for over an hour, seek help.
CSS property usage
This popped up on lobsters today: Chrome Platform Status: CSS usage. It’s a report on the prevalence of CSS properties as found in the wild. It’s interesting. I was surprised by some things. e.g. ‘display’ and ‘position’ are more prevalent than ‘padding’ and ‘margin’.
security.txt
This security.txt looks like a good idea.
How are zlib, gzip and zip related?
Via r/programming today: How are zlib, gzip and zip related? What do they have in common and how are they different?