Writing your own code vs. Plugins
Recently I have been discussing with some fellow coders the benefits of plugins, and when you should write your own code. I basically wanted to throw out a couple of ideas and hope for some discussion on the topic. Let me know what you guys think and I’ll do a follow up soon.
Some Background
I, like many of you out there, started programming back in the day by messing around with computers, writing little calculator programs, making websites, etc. But I really didn’t get into it much more until I started college, where I immediately started programming with C++.
Most of my classes started out with projects where we had to write everything (no STL!), and all of my code was from scratch. Once I started doing more of the “development” in “web design and development”, I still practiced the idea that the only code I know is good is the code I write.
But now I can see…
Then one day, the skies parted, trumpets sounded, and my designer Steve said “Hey, have you heard of Ruby on Rails?”
I immediately started developing with nearly pure Rails, using the built-in-just-about-everything and loving the fact that anything I couldn’t code (or didn’t want to) was usually readily available in plugins ( I love file_column!).
I will say this, RoR is good code. And it’s constantly being improved. For the most part, the plugins are also good code. And many times, a plugin works perfectly into your project to save you time and add functionality.
Good Programming
Ask any real programmer, and the efficiency of code is not only about how it performs, but how long it takes you to create. So obviously there is a trade-off between using plugins and writing your own code.
That being said, if you are a web designer who is using rails to help you out, or just trying something new, use the plugins: they are great and it will save you days of coding and headaches.
If you consider yourself a developer (or hope to), you should still use plugins. If you code everything, you’re going to waste time. However, don’t completely rely on them. If you want to be a programmer, you need to know how things work, because some day there won’t be a plugin for you, and you’re going to need to know what to do.
Also, plugins are meant to be helpful for a range of situations. Therefore, there is going to be some overhead. If you are concerned with performance, and a plugin isn’t “perfect” for what you’re trying to do; you might need to code from scratch (or at least be prepared to customize the plugin code).
Here’s the thing…
All things considered, I will say that my natural tendency is to code most everything myself. I like to know where everything is, and exactly what the code is doing. I also appreciate when the code is only doing exactly what I want it to do. If it’s impractical to write something, by all means I will ( and do ) use plugins.
If you want some good coding experience, and have the time, try writing something yourself that you wouldn’t normally do. Even if you don’t end up using it, you’ll learn a bit more about RoR (or any other language) and you may just have some good code you can use again.
Agree? Disagree? Don’t care?
I’m just one guy. Let me know what you guys think.


