💾 Archived View for johnhame.link › posts › 2012-11-12-the-green-developer.gmi captured on 2024-05-10 at 10:42:42. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
A good developer is energy conscious. A good developer understands the impact he has on the environment around him. A good developer is able to take all these things and use them to make a positive impact in his universe. A good developer is a green developer.
A green developer understands how to build in blocks: he must master the art of software engineering versus software developing. What sets the software engineer apart from the developer is not speed, agility or knowledge, it is the ability to recognise and compartmentalise everything he does into reusable chunks. Why? Simply because reusable code means better code and also half the code.
The reaction of some developers when I say that good developers don't copy and paste
It really isn't that painful. But guess what is? Rehashing your code because business requirements change.
The trick is using design patterns[1]. These structures allow us to engineer abstract concepts which can then be used in tandem to produce the desired effect, while still remaining flexible enough for us to use these things elsewhere.
A good example of a design pattern which allows for code reuse, cleanliness, and speeds up development (within the context of web development) is an MVC framework[2].
The MVC ("Model, View, Controller") pattern allows for great amount of flexibility while speeding up development by allowing us to control a flow while separating different parts of the execution (defining what it is we want to do, obtaining data from sources, and displaying it within the context of a file-type).
But using a framework and then slapping the same old sloppy code within it doesn't give you much of an advantage. The next step is using these patterns within libraries to allow you to separate out parts of your system into their own chunks that can be imported into other projects.
What bugfixes should not look like
Band-aid bugfixes don't solve problems. We've all been there: deadlines looming, clients breathing down proverbial necks, but we must all remember that a crappy bug fix is the same as pushing 3 new bugs to the bottom of your bug-list. Fix the problem well and you'll only need to fix it once.
A green developer:
Clichéd metaphor aside, any developer who follows these simple rules will be well on his way to saving himself a heck-of-a-lot of time and effort which will allow him to concentrate more on the interesting bits of the job: solving all the hard problems.