This one is geared towards my programmer brothers (and sisters!)
If you’re buying a suit, you can have one custom-made or you can buy “off the rack”. The Venn diagram intersection of software developers and people that have suits custom-made for them is pretty small (at least where I live), so most of us have embraced “off the rack” vs. custom when it comes to suits.
We need to learn to take the same approach to code.
Stereotypically (and I’m preaching to myself here as well as you) – we’d rather write our own functionality than use someone else’s. There are certainly exceptions to this. We all use 3rd party libraries like jQuery and iText, but I would argue this is for things that are either:
- so comprehensive that it’s not feasible to do it ourselves (jQuery), or
- something that we don’t know how to do and don’t want to take the time to learn (creating a PDF file from scratch)
If the task at hand is something we can do, our inclination is to do it ourselves instead of using someone else’s code. I’m currently working on a project that needs something to happen once a day (processing monthly subscription renewals), so I need something to virtually “press a button” to kick off a process once a day.
I’ve had a similar need many times in the past. I’ve written numerous Windows service programs whose only job was to wake up every minute, check a schedule and – if it’s the appropriate time – call a function.
The first time I did it, I didn’t really have any alternative and I was curious about how to write a Windows service. Today, those are no longer valid reasons.
A quick Google search this morning revealed that Microsoft Azure has something called Azure Functions that can be invoked on a schedule. (I’m sure there are other suitable offerings as well, like AWS Lambda functions.) There will be a little bit of a learning curve to use it the first time, but from a maintenance point of view – I need to let someone else worry about whether or not the machine that “presses this button once a day” is up and running.
I read something recently that I thought was insightful. It was that – “code is easier to write than to read”. (I wish I could remember where I read that so I could give proper credit.) I think that’s part of why we prefer home-grown (custom) code to someone else’s (off the rack).
There’s a certain “macho” (sorry sisters) programming mindset that says “I can do this better than anyone else”. Part of that came from disconnection. We didn’t know anyone that could do it better we could. In today’s connected world, that’s not really true anymore.
A pencil is a pretty simple object, but if you think of the manufacturing of a pencil – no one person would (I’m not even sure they could) perform all the steps needed to manufacture a pencil.* Older programmers (like me) grew up being a “jack of all trades”, but that isn’t an asset any more.
Let’s stop re-inventing the wheel, use that “off the rack” component and spend our time making something great.
- I think I stole this from Seth Godin, but I’m not sure and I can’t find the post now.