10

I regularly diss on PHP in office but the truth is just that the developers before me wrote bad code. It was bad code in PHP alright but they had a whole framework to use and at least organize their code better but they didn't use it.

I have seen their JavaScript code too and it was all in one file.

P.S. I have no idea under which condition they had to write the code. The app was initially outsourced.

Comments
  • 0
    I have no experience with PHP, but I've read that the PHP-community doesn't tend to use much best practices in code readibility. Is there any truth in that?
  • 2
    @FunkDelegate that's a massive over-generalisation and sadly the PHP community is quite used to it. I don't think think it's fair to say the whole community doesn't use best practices, I've met and worked with loads of competent programmers who use PHP. The community is very friendly and since PHP has a low barrier to entry, you get people with skills that span the whole gamut. The language has been criticised more often than not, but it still remains among my preferred prototyping languages.
  • 0
    @ymas the framework they used has controllers. Writing the code in components and importing is a piece of cake too. You can more or less write the case and JS for a Component in the same file and do a lot of tricks using server side capabilities. All of these using the PHP framework they used but they made a mess of the codebase.
  • 0
    @ymas: I agree it's generalisation. I'm sorry about that. Thanks for the clarification!
  • 1
    @whiteSparrow I have worked with PHP codebases that were pretty interesting to say the least. That's not necessarily PHP's fault. I'm not saying PHP is perfect, however, I'm also asserting that PHP doesn't make you write bad code (some may disagree with me on this), just like a hammer doesn't bend nails, it all depends on the skill of the coder. I totally know how you feel. Good luck with your project.

    @FunkDelegate nothing to be sorry about mate. I recommend you try out the programming languages first so you can come to your own conclusions. If I listened to all the criticisms of programming languages, I wouldn't have learned any of the languages I know today.
Add Comment