... Or how I learned to stop worrying and love the magic

Graham Cox - May 26 '18 - - Dev Community

There was a time in my career when I'd want to do everything myself. I'd rationalise it away as learning how to do things, but I'd be much happier if I was doing things myself rather than depending on others to have already done it.

This ranged from small things - 3d maths libraries, for example - up to huge things - I once wrote a fully compliant websockets server using only Java NIO!

Over time I got less attached to this and more embraced existing libraries. After all, they were written by very clever people, and already did everything that I needed. For example, using the websockets support in Spring instead. This, obviously enough, made me significantly more productive - reinventing everything is a slow process, and a relatively pointless.

However, I still shied away from "magic" if I didn't write it myself.

Side note: what is magic? It's anything where the exact outcome works but you can't immediately see why or how it works.

This meant I was happy to use Spring, but stayed away from Spring Boot - preferring to wire everything up by hand so I could see it all.

And, over time, even this has changed. I recently wrote a mock server for work, using Spring Boot, Spring Starter, Spring Shell. Heck, I even used component scanning. (That still does make me feel dirty, but for what I feel are very good reasons - it's very difficult to scale up to medium or large systems and still know how it works...)

And you know what? The magic isn't scary. It works. It does exactly what it's meant to, and it lets you do everything else.

That mock server, from start to end, too about 3 hours. Old me would have spent a week on it! How's that for productive...

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player