AI insulted my ancient PHP code 😁
▲ 37 r/PHP

AI insulted my ancient PHP code 😁

A couple of years ago I posted about an old website that I coded in the early-mid 2000s and wanted to start up again via some ancient unmaintained Docker containers. The main conclusion of that thread was that it might be possible to resurrect it with some work, but that it would be better to just (hu)man up and update the code so it would run in modern PHP versions.

Well, a couple of days of vacation and a whole bunch of free Github Copilot tokens later, it's up and running on the home network under PHP 8.2 and MySQL 8.0. According to Copilot, this was the furthest it could go with minor changes.

When I asked Copilot about how my code looked, it gave me the following opinion

>The main gap is not PHP 8.2 compatibility anymore; it is that the app is still built like a 2000s-era script. [...] In short: the app needs a structural refactor, not just syntax updates.

Darn AI, no one asked for your honest opinion! /s

u/peperazzi74 — 3 days ago

MFA password option down?

Trying to log into both my Synology boxes and it's asking for a code through MFA. This would normally be sent to my email (correct in dialog box), but it's not arriving at my email.

Worked last week. Is there anything going on at Synology.com?

reddit.com
u/peperazzi74 — 5 days ago

water retention in badger brush

I’ve used the same badger brush since 2011 and various animal brushes before that. I mostly had to gently squeeze the water out of the brush before lathering in a bowl. Without squeezing the lather would be too runny.

Recently purchased a synthetic knot to try. I was amazed how much extra water was needed to build a good lather, even without squeezing the brush.

Guess badgers are just really good at soaking up water.

reddit.com
u/peperazzi74 — 9 days ago

South Carolina Discrete Math (high school)

My son is going to take Discrete Math Honors next year in 12th grade (South Carolina). The description in the course guide was pretty non-descriptive (pun intended).

Does anyone have experience with this course or equivalent in other states? What are the topics covered and how hard is it compared to Algebra 2 or Calculus (Honor or AP)?

reddit.com
u/peperazzi74 — 13 days ago

How to name a medicine

Today I learned that one of the leading medicines to revert the effects of anesthesia has the generic name Sugammadex.

Intellectually I can explain this: SUgar GAMMA-cycloDEXtrin. The 14-year old in me can only think of how much fun the perverted pharmacologists must have had naming this…

Do you know of any other medication that can be pronounced with some “side effect”?

reddit.com
u/peperazzi74 — 22 days ago

Router family?

Is Synology sunsetting their router product line? The flagship RT6600ax is from 2022 and their cheapest mesh extension option MR2200ac has run out of stock everywhere. No mention of Wifi 7 anywhere.

This doesn’t give me a good feeling in case I want to upgrade or extend my network. There are some Wifi holes in my home that I’d like to fill, but Synology doesn’t have an affordable option for this (MR2200) anymore.

Any recommendations?

reddit.com
u/peperazzi74 — 1 month ago

Add bluetooth to EF499?

Bought an EF499 DAC/amp for my Ananda’s and loving it. Is there a way to rig a Bluetooth receiver to the EF499? I’d like to use it to listen to my TV with Roku.

Currently, I’m using a cheap BT dac with 3.5mm plug.

reddit.com
u/peperazzi74 — 2 months ago

[Q] Age of US president distribution: spurious or pattern?

I was looking at the age of US presidents going into office for a variety of reasons, but one thing caught my eye:

>The age going into office can be described as a log-normal distribution.

Is this just coincidence or is there a reasonable explanation for this?

Data:

> presidents$age_in_office
 [1] 57.32786 62.17112 58.16838 58.16838 59.16769 58.16838 62.16838 55.16769
 [9] 68.16701 51.25257 50.16838 65.16906 50.51608 49.17180 66.16838 52.16975
[17] 57.28679 47.17043 55.17043 50.17112 52.71458 48.16975 56.16975 56.16975
[25] 54.17112 43.69884 52.16701 57.16906 56.16701 51.58111 55.16769 51.16769
[33] 61.27584 63.04997 44.05202 55.89049 56.05202 61.60164 53.05407 70.05339
[41] 65.05407 47.05270 55.05270 48.05202 71.05270 79.05270 79.05270

# test for log-normal distribution
> shapiro.test(log(presidents$age_in_office))

        Shapiro-Wilk normality test

data:  log(presidents$age_in_office)
W = 0.97245, p-value = 0.3274
# fail to reject log-normality

# alternatively, test for normal distribution
> shapiro.test((presidents$age_in_office))

        Shapiro-Wilk normality test

data:  (presidents$age_in_office)
W = 0.94171, p-value = 0.0207
# reject normality
reddit.com
u/peperazzi74 — 2 months ago
▲ 15 r/Spartanburg+1 crossposts

US 250?

Despite that the 250th anniversary of the Declaration of Independence is coming up in about two months, I haven't heard much about festivities.

Anyone know what's going on in Spartanburg/South Carolina in general?

reddit.com
u/peperazzi74 — 2 months ago

In my assumption, high dynamic range in post-rock is one of the defining characteristics: parts of a song/composition can be very low volume and then build to an apotheosis at high volume, sometimes more than once per song. When listening under ideal circumstances (good headphones or hifi setup in quiet living room), this is not an issue at all and adds to my enjoyment of the music and genre. This chances in a car. Older cars (like mine) suffer from road noise, which can be louder than the lowest parts of song and interfere with subtle parts of songs at any volume.

What are the best ways to enjoy the genre on the road? Any songs/albums that stray from the wide range in dynamics? Car mods?

reddit.com
u/peperazzi74 — 2 months ago

Ever wondered how utility costs have changed over time with Spartanburg Water? Well, here it is.

In 2010: $5.23 per month fixed , $0.42 per 100 gallon water and $0.55 per 100 gallon sewer

In 2026: $19.79 per month fixed, $0.92 per 100 gallon water and $0.77 per 100 gallon sewer

Obviously all of this without improving the quality or service.

For comparison: my annual water bill of $390 (658 total use) in 2010 would have been $580 if corrected for inflation. In reality it was $695 (617 total use) - well over $115 more compared to inflation.

https://preview.redd.it/fpotgqxnukxg1.png?width=2400&format=png&auto=webp&s=e957f2b0048901c18c1b5793866cee160c7799c9

reddit.com
u/peperazzi74 — 2 months ago