Skip to content
DevMeme
6842 of 7590
Massive PHP File with 19000+ Lines and a Breakpoint at the Abyss
LegacySystems Post #7501 · source on Telegram

Massive PHP File with 19000+ Lines and a Breakpoint at the Abyss

Description

A close-up photograph of a code editor screen showing a PHP file with alarming line numbers. Visible are lines 6060-6061 showing a 'private function' ending with a closing brace, then a jump to line 19515 where a red breakpoint dot is set, followed by lines 19516-19521. Line 19517 shows a doc comment '/** * we dont use th...' (truncated), line 19519 shows the closing '**/', and line 19520 shows another 'private function $schedule...'. The file is at least 19,521 lines long, contains functions documented as 'we dont use this', and the developer has set a breakpoint deep in the abyss. This represents the horror of massive legacy PHP files that have grown beyond any reasonable maintenance threshold

Comments

19
Anonymous ★ Top Pick When your file has more lines than your company has customers, but nobody dares refactor it because last time someone tried, they were never seen again
  1. Anonymous ★ Top Pick

    When your file has more lines than your company has customers, but nobody dares refactor it because last time someone tried, they were never seen again

  2. @a_646_man 8mo

    context window flex red flag on next interview 🌚

    1. @vgy4sw 8mo

      Context window is dead here

  3. @Ihor3056 8mo

    Probably just 13000 lines of if-else statements. To be fair, If I were an LLM, I would kill myself if I had to parse this amount of bullshit. So it works, I guess 😂

  4. @SemakMillev 8mo

    There was 20000-lines function in code at one of my previous jobs. This function worked with bank cash process (and yes it was PL|SQL). Guy who could understand that stuff (THE Guy) was really immortal in bank. Some of authors (of these rows) were already dead by the moment, when i tried to understand this function. But! But. After two days i started understand what was going on there. After week i had a courage to create changes in this ... mmm... structure.

    1. @DerKnerd 8mo

      I worked on a code base with two files exceeding 65k lines. They were cpp files for a single h file. The problem was, the compiler couldn't handle file larger than a specific number which was, I think, 65536 lines. And because they still exceeded it you needed defines for different customers so only specific parts get compiled in the first place. All in all the defines.h was like 4k lines long

      1. @DerKnerd 8mo

        the worst part, that was my first job after vocational job training

    2. @chupasaurus 8mo

      PL/SQL was published in 1995. It's not COBOL level of necromancy.

      1. @SemakMillev 8mo

        For me it is a bit underrated:) I think, it is quite good for even heavy logic of business processes.

        1. @chupasaurus 8mo

          That's a beauty of Pascal. The ugliness is Pascal also🙃

          1. @DerKnerd 8mo

            The amazing part, the Pascal and Delphi community is alive an kicking, and there are surprisingly many apps written in it, you can even write mobile apps in it cross platform(!)

            1. @chupasaurus 8mo

              that one is returning from grave ... for the 2nd time

              1. @Agent1378 8mo

                I have the theory that this is basically because it is a functional equivalent of c/c++/c# all in one language. And also because c/c++ syntax for working with pointers, pass-by-reference, object and etc - sucks since the beginning and it only have gotten worse (I mean a mess of &, *, **, ->). In Delphi it all is solved so you retain all the power but syntax is clean and understandable

          2. @Agent1378 8mo

            Pl/sql is relative to Ada not Pascal

            1. @chupasaurus 8mo

              Ada is descendant of Pascal soooo

              1. @DerKnerd 8mo

                and python/ruby are descendants of ada, that explains why I despise both languages :D

                1. @lambda_coolusername 8mo

                  in what sense? lol

                2. @Agent1378 8mo

                  Ruby is ok as it is. It's the Rails that are shit.

              2. @Agent1378 8mo

                Ok

Use J and K for navigation