#dev 2023-11-16

2023-11-16 UTC
[nsmsn], gRegor and IWDiscord joined the channel
#
[jacky]
what is PHP
#
Loqi
PHP is a programming language and web server runtime environment used for many IndieWeb projects https://indieweb.org/PHP
#
[jacky]
hmm how do I learn it "the hard way"?
#
[jacky]
like I remember enough to be okay in a wordpress codebase (plugin or theme)
#
[schmarty]
jacky: we tend to share this around at work (as a thing to study and say "hmm that would be nice if we didn't have a 15 year old legacy codebase) https://phptherightway.com/
#
aaronpk
It's a sign I'm getting old that 15 years seems like a perfectly reasonable amount of time for code to not be considered legacy
strugee joined the channel
#
[tantek]
I have a lot of 13-14 year old code that is still running quite well
#
aaronpk
exactly
#
aaronpk
this weekend's project of updating Overland was a good demonstration of this... some of that code was written in 2010 and has been untouched since then
gRegor and [cleverdevil] joined the channel
#
[cleverdevil]
I love it when old code ages like a fine wine. Years ago, when I was in college, I worked with a healthcare company to reverse engineer a legacy fax document capture device that had been acting up and the company that made it had gone under. They asked me to write a Java server that would emulate the device that they could run on an SCO Unix server. So I did it, got a nice little paycheck for a college student.
#
[cleverdevil]
A DECADE AND A HALF later, I get a call.
#
[cleverdevil]
“Hey, do you have the source code for that thing you built? The server it was running on rebooted for the first time in 15 years and didn’t come back up again.”
#
[cleverdevil]
So the code I had written had been running 24/7/365 for 15 years.
#
[cleverdevil]
Perhaps my greatest accomplishment LOL
#
[cleverdevil]
I didn’t have the source, but they recovered the jar file from the hard drive and I decompiled it for them and sent it back.
gxt, superkuh, rubenwardy, [chrisaldrich]1, [bjoern]1, [Murray]1, IWSlackGateway, [tantek], [KevinMarks], [jeremycherfas], [marksuth]1, [schmarty]1, [jacky]1, [snarfed], [benatwork], gRegor, [aciccarello], oxtyped and Virtual joined the channel
#
[KevinMarks]
The stuff I work on for the BBC replaced a codebase from ~ 2008 that was still running on a combination of an ancient windows machine and a Linux server running chron jobs to receive emails and talk to it. When I was at Apple in ~2000 I fixed one bug by reverting a 12 year old check-in.
mooff, gRegorLove_, Loqi, CRISPR and [m] joined the channel
#
[m]
I experience that Bridgy loose the connection with Mastodon which leads to error on publishing. Is it a requirement to open up Bridgy from time to time and refresh the login?
geoffo, rocto and rocto_ joined the channel
#
[snarfed]
[m] hmm, generally no. I can look. what's your bridgy user page? or mastodon handle?
#
[m]
My Mastodon handle is @marcuslindblom@mastodon.social
#
[snarfed]
[m] thanks. looks like you may have been hit by https://github.com/snarfed/bridgy/issues/1531 , which I still don't have a complete solution for 😕
Zegnat joined the channel
#
[snarfed]
still looking...
geoffo joined the channel
#
[snarfed]
[m] if you disable and then re-enable publish (the right side) on https://brid.gy/mastodon/@marcuslindblom@mastodon.social , that should fix it
#
[snarfed]
sorry for the trouble! I'll take another look at that bug today
#
[jacky]
[cleverdevil] that's so cool
#
[jacky]
Tbh the fact that they found you again too - I wonder how long that took lol
#
[schmarty]1
love the legacy discussion! some great stuff in here! i also love code that ages well! in the case i was discussing, we have a "live" codebase that we are constantly adding to with a tiny team, but it originated well before there was a "right way" with PHP (before a "right way" for a lot of things for that matter). much of that old code works fine or well-enough day-to-day - but woe unto the adventurer that must alter them.
tbbrown, geoffo, aleasty and [Joe_Crawford] joined the channel
#
[m]
↩️ Ok, done 👍
tbbrown, [tw2113] and gRegorLove_ joined the channel
#
[m]
↩️ [snarfed] still gets this one:HTTP Error 400: {"error":"invalid_grant","error_description":"The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."}
#
[m]
↩️ But… it seems like it got posted to mastodon 🤔
#
[snarfed]
↩️ huh, surprising that both happened
#
[snarfed]
↩️ that error is https://github.com/snarfed/bridgy/issues/1602, due to Mastodon's questionable new garbage collecting of OAuth clients. their OAuth design decisions have been problematic lately 😕
geoffo joined the channel
#
[tantek]
ooof I'm hesitating to dive into https://phptherightway.com/ because I have *opinions* obviously and expect them to be very different (given what I've been doing with CASSIS etc.)
#
[tantek]
like I would write a *completely* different section / set of advice for https://phptherightway.com/#date_and_time
#
barnaby
ha ha yeah I imagine you’d hate much of the advice there
#
barnaby
but from what I remember, it’s much more in line with what the modern PHP community is doing, and therefore is useful for anyone who wants to interact with that ecosystem
#
barnaby
your version would be PHP the tantek way ;)
#
[tantek]
PHP: the right way to write PHP re-usable as JS, and avoid rewriting code in JS
#
[aciccarello]
Does anyone use the <q> tag for inline quotes? I just used it in a post but now I'm thinking it might screw up the text representation of the post.
#
[tantek]
I've used it in the past. It works reasonably well
#
GWG
[tantek]: That could be a book...PHP The Tantek Way
#
[tantek]
I'd rather not include any personal quirks and prefer to focus on the most effective ways to use PHP for PHP/JS interop, maintainability. and reduction/elimination of client/server code duplication.
sknebel and geoffo joined the channel
#
GWG
Either way, I'd read a [tantek] PHP book
e-snail joined the channel
#
t​haidaree
webmentions enabled for https://www.offsetlab.net/ I hope... need to get the display of mentions in place
#
gRegor
t​haidaree++ nice!
#
t​haidaree
I'll need to do a full redesign eventually. My wife does front-end for me. I do the back-end 😄