Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PHP Kitchen Nightmares

PHP Kitchen Nightmares

Remember the Kitchen Nightmares TV show? Chef Ramsay visiting restaurants that are struggling, and telling them how to improve, but in the process you see all the bad things happening? Let's head into our development kitchen and look at things that can go wrong, and figure out how to improve.

Stefan Koopmanschap

August 03, 2023
Tweet

More Decks by Stefan Koopmanschap

Other Decks in Technology

Transcript

  1. PHP Kitchen Nightmares
    “CHEF” STEFAN KOOPMANSCHAP

    View full-size slide

  2. Me
    PHP since late 90’s
    Ingewikkeld since 2011
    Worked with (and without) many frameworks and tools
    Really started liking cooking
    Looked inside a lot of kitchens

    View full-size slide

  3. Keep the kitchen clean

    View full-size slide

  4. Is your kitchen clean?
    How much technical debt do you have?
    How often do you update your dependencies?
    Are you using unsupported versions of PHP, libraries and frameworks?

    View full-size slide

  5. Let’s clean the kitchen: Technical debt
    The scout rule: Leave things cleaner than you found them
    For bigger things: Create separate refactoring tasks for your team
    Get yourself some help: Use tools such as Rector (https://getrector.org)

    View full-size slide

  6. Let’s clean the kitchen: Dependencies
    Evaluate your dependencies on a regular basis and update
    (Smaller updates are easier than large updates)
    Use the security checker to scan for security issues: https://github.com/fabpot/local-php-
    security-checker

    View full-size slide

  7. Let’s clean the kitchen: Versions
    Keep track of the versions and upgrade to supported versions
    Make sure you’re always on a supported version to prevent surprises
    Plan for these situations
    Again: Rector may help (https://getrector.org)

    View full-size slide

  8. Use the right tools

    View full-size slide

  9. The right tools
    Don’t pin yourself down on a single tool
    Always research other tools that might be better or more suited to your project
    Not sure? Try!

    View full-size slide

  10. Listen to the customer
    OR YOUR OWN TEAM

    View full-size slide

  11. The customer is always right
    This is not what you want to hear
    It is what you need to hear
    Work on your communication skills
    Listen. Really, listen.

    View full-size slide

  12. Your colleague is always right
    This is not really true
    They’re just like your customer
    Don’t assume, ask
    Communication, communication, communication

    View full-size slide

  13. Know the law

    View full-size slide

  14. The law is always right
    You have a responsibility
    On different levels
    Speak up

    View full-size slide

  15. Use your good taste
    DON’T JUST FOLLOW THE RECIPE

    View full-size slide

  16. On using recipes
    There is nothing wrong with recipes
    Evaluate your recipes
    Make sure you have the right recipe
    Be creative

    View full-size slide

  17. Keep it simple

    View full-size slide

  18. Simple?
    What was the last time you created a simple PHP script?
    When you create a new project, how do you start?
    When you deploy your application, where do you deploy it to?

    View full-size slide

  19. Simple!
    We have the tendency to overcomplicate stuff
    There’s a time and place for experiment and research. Maybe not now
    Start simple, expand on that

    View full-size slide

  20. Keep your knowledge
    up to date

    View full-size slide

  21. Don’t get stuck
    Keep on learning
    Things change
    Make a plan

    View full-size slide

  22. Evaluate
    Where am I now?
    Where do I want to be?
    How do I get there?

    View full-size slide

  23. Concluding
    Keep your kitchen clean
    Use the right tools
    Listen to the customer and your team
    Know the law
    Use your good taste
    Keep it simple
    Stay up-to-date

    View full-size slide

  24. Credits
    All video material: Channel 5 / ITV
    Knife photo: Savernake Knifes (Unsplash)
    Gordon Ramsay: by-nc BreakingTravelNews (Flickr)

    View full-size slide