Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Monk ethics: Beauty vs. Power

by footpad (Abbot)
on Dec 19, 2000 at 00:23 UTC ( [id://47254]=note: print w/replies, xml ) Need Help??


in reply to Monk ethics: Beauty vs. Power

Except for education (whether formal or personal improvement), programming generally occurs in a business context. It's an action designed to solve a business need and, at some level, help the organization generate more profit.

With this in mind, I generally consider code to be beautiful, powerful, and ethical if the:

  • Project's sponsor is happy with the results (e.g. the client is willing to pay the bills).

  • The end-users are happy with the results.

  • Source code can be easily maintained by someone having a more limited understanding of the business or the implementing language. (This means a) comments, b) organization, and c) consistent formatting.)

  • Results work as intended, meaning no outstanding bugs or related problems.

  • Results reasonably meet the requirements (specification and schedule).

  • Final implementation (or elements thereof) lends itself to re-use in other, similar projects.

  • Source follows community accepted "best practices" (aka "elegance") to achieve its goals.

This means that most of the time, I'm trying to produce working code, not elegant code.

You'll note that I rate maintainability higher than elegance. As someone who's inherited many projects over the course of my programming career, I have seen good code that was poorly documented and bad code written very clearly. In nearly every case, I have preferred the latter because "elegant" code can require more knowledge regarding the language, system, and environment than the client has been willing to pay for me to learn.

As Dominus said, it really depends. Look at your overall schedule and see what needs to be accomplished in that time frame. Figure out the tasks, determine your knowledge of how to achieve those tasks, and then budget your time appropriately....even if it means you may make an mistake in your initial design.

YMMV...

--f

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://47254]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-19 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found