‹ BackHN Continuity

Thread

My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

341 points · 107 comments · jakeasmith

  1. swiftcoder · · focus · HN ↗
    > Under a comment that reads // Workaround for trailing slashes, my code tacks an “a” onto the path so there’s always a last segment to cut off, then cuts it off with a find-and-replace. When the path ends in a slash, that last segment is just the “a”, and the find-and-replace takes every other “a” in the path with it.

    This is top-tier. left-pad levels of "we should just implement trivial functions in our own codebases"

    (I do not mean that as a knock on the author - it solved his use case just fine. Everyone who took a dependency on it afterward though...)

    1. kstrauser · · focus · HN ↗
      Heh, right?

      Author: Ugh, this is ugly, but it fixes the specific problem I’m having so I can go on and work on other things.

      Author, later: What do you mean, you’re all using this?

      1. jakeasmith · · focus · HN ↗
        hahaha yes, this exactly
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.