Somehow complexity attracts devs like light attracts moths. They can’t resist, we can’t resist.
Wrong. We can resist but it is damn hard. Sometimes the complex solution is even easier to implement than the simple one. Sometimes it is attracting because everyone else is using the same technology to solve something. It is even harder to resist if you are a young dev. Why?
Because you lack experience. Experience of how worse complexity can get and being in the shoes of the poor dev handling such systems. Finding and fixing bugs in it.
The youngest student in my training last week did exactly that. He and his coworker (another attendee) will be redeveloping an application soon; single server, some REST API and such stuff, nothing fancy. But they need auth and guess what, his first pick is OAuth2, of course.
No evaluation, no nothing. It’s like “oh you got a REST API and maybe two clients -> go use OAuth2”.
He’s not alone. I see that countless times. Nowadays they directly decide for using OAuth2 regardless if it is a good fit for that particular context or not. No, it is not. OAuth2 has a few concrete use cases. If those are not yours, look at other, maybe easier, solutions and do an evaluation.
OAuth2 is just an example here, there are others things.
Try not to think complex, try thinking in simple solutions. Think about the poor devs maintaining it. Also, remember YAGNI and KISS :-)
It is harder but many more people will thank you. Including your future-self.
Want content like this in your inbox each workday? No BS, spam or tricks... just useful content: