38 lines
1.4 KiB
Markdown
38 lines
1.4 KiB
Markdown
---
|
|
title: Let someone else do the work
|
|
date: 2024-03-26
|
|
permalink: daily/2024/03/26/let-someone-else-do-the-work
|
|
tags:
|
|
- software-development
|
|
- drupal
|
|
- php
|
|
- open-source
|
|
cta: ~
|
|
snippet: |
|
|
Why would I write something myself if there's already code available that solves my problem?
|
|
---
|
|
|
|
Yesterday, I was investigating a CSS issue.
|
|
|
|
It's a known issue due to some legacy code in the website's CSS that I'd fixed before but now needed to extend.
|
|
|
|
Instead of blindly following the same path and extending my previous fix, I decided to rethink the problem and my approach.
|
|
|
|
I re-read my documentation and re-reviewed potential solutions I'd evaluated previously.
|
|
|
|
I decided to take a different approach to solving the problem and found an open-source plugin that someone else had written that gave me the functionality I needed instead of writing it from scratch.
|
|
|
|
I read the code and did a short spike to see if it worked with the existing configuration.
|
|
|
|
After some experimentation, I got it to work and added it to the project.
|
|
|
|
## Here's the Thing
|
|
|
|
The plugin I used was only 34 lines of code, but these are lines I didn't need to write or will need to maintain.
|
|
|
|
If it works, why would I write it myself?
|
|
|
|
I'd rather use what someone else has written and contribute if I find a bug or need a new feature.
|
|
|
|
That's the benefit of open-source software, and why I use Drupal, PHP, Sculpin, Tailwind CSS, Nix, and others.
|