It’s good to be lazy web developer
Chances are if you’re wearing a suit and tie and are over 40-ish you’re thinking of stopping right here. That voice in your head is saying, “Being lazy is bad, unproductive, and what those college interns do”. To be fair, you might be right about those college interns, but let’s give the idea a chance.
I’m not sure exactly how I would define being lazy,, so I’ll share a situation where being lazy is good.
I had a bit of problem recently while developing some front end code for my website. I needed to open and close some div elements with jQuery on hover. Some web developers might just see the problem, and realize there are only 4 or 5 div elements that need opening, writing open / and close instances for each div won’t be so hard, and easy to change if needed. This developer clearly identified the problem and developed a one-time solution that did the job.
How would a lazy developer do it?
I consider myself lazy, and so this is how I solved my little problem. I tried to come come up with a small but efficient bit of jQuery that would open and close those same divs, but in a way that was flexible. My solution was to give each link that should open or close a specific div element an attribute that corresponded with the div to be opened or closed. In this way I developed a single solution that solved many problems, problems I hadn’t even encountered yet.
So how was I lazy?
I didn’t just brute force the problem, I thought it through and figured I’d like to solve this problem once and for all, never to touch it again, I call that being lazy.
I guess the take away here is, as a developer of anything, think about your problem in the current need it has, as well as future needs. When a similar but different need arises you can sit back, be lazy, and know you’ve already done the hard work.
Tweet This!
