The Joy of Reinventing the Wheel

2019-10-11
Yes, good code has already been written, so why try and do it yourself?

I'm not really sure why I feel compelled to do this. Is it the challenge of creating an algorithm? Like taking apart a clock to see what makes it tick? I do know that I have learned a lot from this back-engineering effort, especially when the existing code is way over my head. And it's especially gratifying when a DIY project actually works.

Two website applications have completely baffled me - text editors and drag-and-drop utilities. Both require skills and knowledge that are light years ahead of what I possess. However. I did find easier ways to do both.

Instead of a real Javascript drag and drop utility,(way, way, wayyyy difficult!), I came up with a click and drop algorithm that accomplished the task of rearranging items in a sequence, but still forced me to stretch my limited knowledge of Javascript to the breaking point. The best part about it is that I actually understand how it works.

When I discovered markdown syntax, I found a way to avoid using a real text editor by building a DIY markdown parsing algorithm in PHP. It's primitive, but seems to do the trick and taught me a lot about the way text is handled in a browser.

There are many website features that can get the DIY treatment: slideshows, toggles and dropdown menus are a good way to study the interaction between PHP and Javascript. Image galleries are an opportunity to learn about creating responsive columns. Online forms are a way to learn about the way PHP mail works and how to avoid getting dumped into the spam folder!

The internet is always churning up new applications to stretch our programming skills. Like many people, I can never feel that I know very much in the face of the overwhelming information out there, but the good news is that I will never be bored!

Leave a comment