50

Best: I'm still employed.
Worst: I'm still working on a PHP codebase, which only got bigger (34M lines) and more entangled this year.

Comments
  • 3
    @nik123 probably a ton of duplication and slightly different implementations of the same.. :D
  • 4
    @nik123 A game server in PHP? 😲
  • 7
    @lotd @nik123 Backend of a platform which involves smart labor scheduling, education, invoicing, contracts, taxes, social security payments, etc. Our system tracks everything from skills to travel distances to wage supply/demand to weather expectations, and moves large population groups in the cities through educational courses into the right jobs.
  • 3
    @bittersweet Sooo... An ERP System, right?
  • 5
    @theCalcaholic Yeah... although that's a dirty word here, as it's operating on a somewhat larger scale. It's kind of an ERP application for whole cities/countries, as it's informed about laws, taxes, subsidies, university classes, chamber of commerce registrations, etc — and gives answers to questions like how to prioritize the education of welders over teachers, where to open a barbershop based on distribution of existing shops, etc.

    The PHP code is mostly a bridging backend between many systems, the Python/TF codebase is even larger, and now running on Google's TPUs.
  • 2
    @bittersweet That sounds massive.
  • 2
    Sounds like this system will be running for decades ^^
    In fact, one of my personal"lessons learned" in university is that there are software systems like this one, which have been running for decades and can't simply be switched off ;)

    Just out curiosity, do you have some kind of (code) quality control mechanism in place?
  • 5
    @losdanielos Luckily it's fairly modern, using code reviews (Fuck me that's my job), automated deploy pipelines, over 10k unit tests, running on PHP7.2 with a large database cluster, redis nested caching of views, a good javascript toolchain building vue stuff through babel, etc.

    Still, it's too big for a language like PHP.
  • 2
    @bittersweet that sounds fairly reasonable, considering the sheer size ;)
    Personally, I try to follow the "boyscout rule" (leave the camp cleaner than you found it) to improve over time (easier said than done obviously ;)
  • 2
    @losdanielos Yeah the problem is that when you have highly interdependent systems, it's not so much about refactoring single methods or even classes, but about the complexities of real life.

    Often I find that a PR looks reasonable, and the functionality is reasonable... it doesn't work properly in practice.

    Shit like changing tax laws which require complete reorganization of code are the worst, because I'm not a tax expert -- so how do I check code properly? I have to sit with lawyers for hours, after which it turns out they don't really understand it either.

    But also unexpected shit like "is an abandoned orphan with birthdate 1999-00-00 on passport an adult?"

    I can't help that reality is complex, but I can try to keep code clean...ish. So I stack layers validators, try to isolate mess from "pure" code, organize it neatly...

    PHP is really just not a nice language for large amounts of transformations from "Messy Reality" to "Pure Data" and back, not at this scale.
  • 0
    If you didn't already say what your company does in the comments, I would wonder if we work together...
  • 0
    @bittersweet good points, some of them sound very familiar. thanks for the additional info!
Add Comment