Really?
Don't write your own OS does not mean do not contribute to something like the linux kernel.
To the people reading this, please don't just disagree with an "obvious counterexample". Explain why!
Then the app pings you to remind you that your premium subscription will be expiring soon after which your heart rate will be limited to 100 bpm or less.
Also you want the pacemaker to be as air-gapped and simple as possible, because it needs 100% uptime.
(maybe I missed the implied /s)
Having said that, I don't think date libraries are hard, I think they're messy. Mostly because humans keep introducing convenience fudges - adding a second here, taking eleven days off there, that kind of thing.
See the number of unit tests in the Linux kernel, for example.
You could run a fuzzer against two libraries at the same time to find discrepancies....... hmm. That might actually be a good exercise.
You can have reasonable confidence that here there be dragons, but not so much that your assumptions about something will hold.
Messy is just a particular kind of tedious which is the most common form of hard.
It's not like typical things that need doing tend to include solving lots of unsolved problems.
I'd say write it, probably don't use it, and don't share it unless it's substantially better than the alternative.
This way, you'll learn about it, but you'll more likely stay with something standard that everyone else is using, and you don't share yet another library that wastes others' time and your own (having to read about it, evaluate it, use it, and the migrate off of it when it's abandoned).
The messaging here is that you should be careful about using what you build on your own because it:
- hasn't been battle tested
- likely has bugs
- isn't mature
The only way that it will be all of those things is if someone invests time and energy in them.
From an ecosystem perspective this is absolutely the right thing. You want duplicate projects. You want choice. You want critical knowledge to be spread around.
I see it as “Dont write your own X, unless you want to maintain X. Here be dragons, this problem is deeper than it appears, the first 80% will be easy, the next 15% will annoy you, and the last 5% will consume your life for weeks, months, or even years. Or you could use a library”
The point is, before you release your new thing, make sure it addresses all of the pain points the previous solutions have already slogged through,
or that if it doesn't, people are still aware of when they can arise, and why your thing has chosen not to mitigate them yet,
or ever, if it's an opinionated piece of tech.
The things that people write that everyone uses have had HUGE exposure.
They've been exposed to all the edge cases, they've been tested millions, if not billions of times. All the bugs ironed out.
The people who've worked on them are now the greatest domain experts on that little corner of comp-sci.
Yours won't unless it hits prime time.
So yours will be weak, brittle and dangerous.
If you change the story such that the product is actually needed and universally immature, of course building it is a valid argument.
Regarding b: Right, and the point of this article is that for those types of things, go for the already-mature thing. You’re arguing a point nobody is making.
That's why it's also important to point out that no significant piece of code is mature and stable from the start, but was brought into this state iteratively using tools and processes that are available to everybody else, too. The biggest difference between existing mature code and new code under any good development process is age.
It is very possible to have a clean implementation with good design choices overtake an established in time, enabling more extensibility, modularity and maintainability.
An example: People still way over-use regexes for all kinds of stuff. Even in code editors people for syntax recognition, where people really should know better.
Most of the time you build something else.
Like if you build a todo app and have to deal with scheduling you don’t spend time making date library because it’s not your goal. But people would do that.
Heck most developers instead of starting blog on a blog platform start writing code for their own blogging engine.
2) Many people (especially the elderly) take enough medications on different schedules that managing them all would be a significant cognitive load for anyone
It’s just an illustrative example, though. My point is getting dates right (including parsing their string representations) often matters quite a bit. If you disagree, let’s argue about that rather than quibble about the minutiae of the example