As a developer I strive to deliver high quality code, that is understandable for other developers and is as future proof as it can be. For me this is an ongoing learning process in the way code is written and tools that can be used to assist me. Many different sources can be found with opinionated instructions how to write "perfect" code.
By now, every Drupal developer should know that it's a bad idea to overwrite core and contributed code. Especially when using Composer correctly and therefore only store the
composer.lock file to the version control system. It should be imminent that changing files containing core code is a no-brainer (don't hack core!).
Drupal's core options module provides fields to create a select list (existing of integers, floats or strings).
Like contributed modules, dependencies of a custom module can also be installed by providing a
composer.json file in the directory of the custom module. This provides a neat solution to ensure that external libraries/modules are available in the correct place, without overloading the root (projects)
When writing custom forms, you are often asked to add an extra paragraph of text between input fields. A solution that is used a lot is:
When you're, like me, using Windows as your development environment, letting your Drupal environment send mails can be a big challenge. This in contrast to a Linux/Mac OS X based system, where it is much easier to send mails. I think too easy...
Often when already existing pages/forms have to be changed, you simply use one of the alter hooks to add the needed extra functionality. However, sometimes you want, or are forged, to overwrite an already existing page completely.