sapidlib-dev team mailing list archive
-
sapidlib-dev team
-
Mailing list archive
-
Message #00012
Re: Fwd: Added new functions to TERMINAL_D
On Mon, Jul 7, 2008 at 1:00 AM, Richard Thomas Harrison <
harrison.rt@xxxxxxxxx> wrote:
> 2008/7/3 Cody A.W. Somerville <cody-somerville@xxxxxxxxxx>:
> > Ever heard of SRP?
> No. Having never studied OOP&D, I wouldn't have a clue. SRP to me
> means Suggested Retail Price, in fact to 99% of the people in the UK
> it means that.
Apologies. My original replies were a bit testy and rather condescending.
SRP stands for Single Responsible Principle. The gist is that each object
should have a single responsibility (and more specifically, a single reason
to change). It is all about striving for high
cohesion<http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29>.
>
>
> It took me 20 minutes for me to track it down on Google. It seems that
> everyone just uses the acronym and expects everyone else to understand
> what it stands for.
>
> > This is a clear violation and compromises the cohesion of
> > the mudlib. If you want to get the user's type type, you don't call
> > TERMINAL_D, passing it the object so that the TERMINAL_D can make a call
> on
> > it and return a value... you call the function directly in the user
> object.
> ...of which NPC's also use. I've witnessed what happens when an NPC
> outputs a long line to the screen, it formats it for a default width
> of 80 for *everyone*.
>
> The reason I placed it into terminal_d was because it was far easier
> to implement it that way.
Although 80 width for everyone is not the desired behavior, I'm still not
sure why those set of functions make anything easier.
> Secondly this is the whole point of a revision system. Code evolves
> over time. If we were to agonise over where each piece of code should
> go, nothing would be done. It would get bogged down in pointless
> committee meetings.
Agreed but the mailing list is a great place to discuss code changes at
leisure.
>
>
> When I've finished converting all the format_mixed() code back to
> (s)printf() I'll have a look at it.
Thanks.
>
>
> --
> Richard Harrison
> East Bierley Cricket Club *Committee* member
>
> _______________________________________________
> Mailing list: https://launchpad.net/~sapidlib-dev<https://launchpad.net/%7Esapidlib-dev>
> Post to : sapidlib-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~sapidlib-dev<https://launchpad.net/%7Esapidlib-dev>
> More help : https://help.launchpad.net/ListHelp
>
--
Cody A.W. Somerville
Software Engineer
Red Cow Marketing & Technologies, Inc.
Office: 506-458-1290
Toll Free: 1-877-733-2699
Fax: 506-453-9112
Cell: 506-449-5899
Email: cody@xxxxxxxxx
http://www.redcow.ca
References