← Back to team overview

sapidlib-dev team mailing list archive

Re: Fwd: Added new functions to TERMINAL_D

 

Ever heard of SRP? 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.


On Thu, Jul 3, 2008 at 2:14 PM, Raymond Lukes <ray.lukes@xxxxxxxxx> wrote:

> I don't think having the functions is a bad thing.  If the Terminal daemon
> uses those function to get the relevant info it provides a common place for
> the query that is within the Terminal Daemon.
>
> On Thu, Jul 3, 2008 at 12:30 AM, Cody A.W. Somerville <
> cody-somerville@xxxxxxxxxx> wrote:
>
>> revno: 72
>>> committer: Richard Harrison <harrison.rt@xxxxxxxxx>
>>> branch nick: dev
>>> timestamp: Wed 2008-07-02 09:04:23 +0100
>>> message:
>>>  Added new functions to TERMINAL_D
>>>   * Return user's terminal type if set.
>>>     query_user_term(object user);
>>>   * Return user's terminal width if set.
>>>     query_user_width(object user);
>>>   * Return user's indent level if set in environment.
>>>     query_user_indent(object user);
>>>
>>>  Cleaned up all the whitespace and indent level in 'ls'
>>>  Fixed width arrangement of output bug in 'ls'
>>> modified:
>>>  lib/adm/daemons/terminal_d.c
>>>  lib/cmds/file/ls.c
>>>
>>
>> Are those functions really best kept in TERMINAL_D? It seems to me that
>> maybe they'd be better off (nah, belong) in the user object, no? The
>> functions just call the user object anyhow. :S
>>
>> --
>> 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
>> _______________________________________________
>> 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

Follow ups

References