Hot Koehls
  • Email
  • Feedburner
  • Linkedin
  • Twitter
  • Home
  • About
  • Archives
  • Contact
  • Software
    • S3imple Backup
    • Twitter Feed Archiver
    • FileTime
    • Flickr API Demo
Search
Home» For techies » No “private” setting in open source

No “private” setting in open source

Posted by Frank - February 3, 2009 - For techies
0

I love the PHPMailer system. Straightforward, effective, very well documented and supported. It’s everything that a piece of software should be, and best of all it’s free. The parent company, codeworx Technologies, supports and maintains a piece of software used by millions of sites for free, and gets a ridiculous amount of exposure in return. Win-win.

I came across the only beef I have with their code just the other day, and it illustrates a larger issue with open source projects as a whole. Fwd:Vault uses PHPMailer to send all its outgoing messages. I want to keep a log of all outgoing messages, so I extended PHPMailer to store a copy of the message in my database. When I ran the code, I found that the “To:” address was not getting stored along with the rest of the data. I had probed the core PHPMailer class and found the variable containing this information, but had failed to check its scope, which was set to private. I changed this to public and I was good to go.

But should I really have been forced to make this extra step? I had taken the time to go through their code to find what I need and use it to meet my needs. What interest is it of the developer that I use his/her code in a way that they do not “condone?” Even if I break functionality, it’s my problem to solve it.

If you write something with the intention of releasing it to the world, you must assume that no part of it will be hands off. Developers declare classes and variables as private, protected, and final when they don’t want other people playing in their sandbox. Practically speaking, you make it more difficult for others to utilize the code you’ve has written, which seems to conflict with the intention of releasing it in the first place. The practice also runs counter to the very nature of open source, which is that all information is free and clear.

Unless the structure of your code demands specific scope settings — those situations are extremely rare — show some faith in your fellow devs and save them the extra step of unlocking your code. There’s enough work to do without making it difficult for ourselves.

open source, usability

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories

  • For entrepreneurs
  • For everyone
  • For techies

Latest Tweets

  • The word traps planners plan themselves into | Life. Then strategy http://t.co/iANAdASb
    May 8, 2012 - 2:43 pm
  • Random network security tip for those about to appear on TV - Boing Boing http://t.co/tC1lXFQ4
    May 8, 2012 - 1:42 pm
  • A Picture http://t.co/H846Uy69
    April 27, 2012 - 12:25 pm
  • The Broken "Buy-One, Give-One" Model: 3 Ways to Save Toms Shoes | Co.Exist: World changing ideas and innovation http://t.co/RI0sVMW6
    April 10, 2012 - 12:23 pm

Recent Comments

  • whiz on What 255 characters looks like
  • Andrew on Find the second (or third, or fourth) occurence in a string
  • IanArcher on Get number of message parts in an email using PHP
  • Usama on Remove parent directories from tar archives
  • Frank on It’s dangerous to go alone

Recent Posts

  • It’s dangerous to go alone
  • Create Self-Signed Wildcard SSL Certificate
  • What comes after the yottabyte?
  • Write code like they do in Hollywood
  • Brian Rolle machine gun celebration
(c) 2012 Frank Koehl. All Rights Reserved.
  • Contact Us
  • Sitemap