sleepingmonk

aspiring code poet

I've been coding since I taught myself BASIC on a TS1000 at 8 years old. I still don't know what I'm doing. I just keep trying to make my job easier and my code cleaner. Here's a list of things that inform my thinking when I build web projects. I hope this helps collaboration and invites discussion on teams. How do you like to do things? Why?

More detailed posts to come on the following:

  • Atomic Design - Free to read online.
    • For "composable components" / modularity of the UI
    • In Drupal: components with "variants", supported by nestable entities
  • Every Layout - Core theory available online with examples.
    • For "composable layout" primatives
    • "Intrinsic Layout" - Content flows the way it's meant to flow in a browser.
    • Layout adapts to content and available space, not rigid breakpoints, while still producing predictable and desirable results.
  • UI Development Tools
    • For developing pattern libraries that can be integtated with applications. A front end developer could work exclusively in Pattern Lab, for example, and a Drupal dev can just "wire up" components to templates in the Drupal theme.
    • Pattern Lab - experienced
    • Storybook - dabbled
  • CSS - as in not SCSS

    When I can get away with it, I'll use pure CSS and not tool up for SCSS on a Drupal project. If we build atomic components, keep it simple with layout primatives and well engineered components, organize our code effectively and use Drupal CSS aggregation, there are few, if any, advantages to using SCSS that I can see. It seems to add unnecessary complications to overly complicated themes.

  • PHP Code Sniffer with Git pre-commit hooks
    • All code gets sniffed on commit attempts
    • It teaches and enforces standards
    • It's one of the first lines of automated testing
  • Cypress Testing

    This is amazing for JS development, but also quite versitile for end to end and visual regression testing of any web application. It's handy for testing in local development as well as in automated workflows.

  • Lando

    As Docker came up I built portable dev environments with docker and docker compose, writing my own basic wrapper to manage tooling. Projects like Lando, DDEV, Docsal, Outrigger, etc. started popping up. I (and my team at the time) settled on Lando for it's popularity and contributions as well as it's features. I still find it the simplest to use for straight Dupal as well as decoupled projects. It still seems to be the most popular choice by some estimates.

    I have a standard set of tooling I like to include in my lando based projects.

  • Code Review

    I'm strongly in favour of a solid code review practice. Not only does it help ensure higher code quality in your application, it also helps elevate your developers' skills by constant feedback and exposure to other developers' insights and approach to things.

    Those two things alone are worth any perceived "extra" time use for reviews. The value is even deeper and more nuanced than that.

  • Disciplined Workflow

    If you have a well thought out and developed workflow you produce consistency, stability and velocity at the same time.

    This can start with some standard principles but it can take a little time and persistence to fine tune it to your team or project. Sticking to it, holding each other accountable, and not cutting corners will pay off in the end.