SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Coding Challenge #5

    Write a function which:

    Checks a list of agent names to find the ones which are currently available.

    Does not remain connected to the agents.

    Returns a list of a record which includes:
    - agent name
    - running or not
    - list of applications running on the desktop (empty if not running)

    Comments as needed for clarity and maintainability.

    8,000 points to the winner !!!!


    ------------------
    John W Green
    jwgreen@automationexpertise.com http://www.automationexpertise.com

    [This message has been edited by John Green (edited 07-01-2002).]

  2. #2
    KS
    KS is offline
    Senior Member
    Join Date
    May 2001
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    GetListOfAvailableAgentNames ()

    note: it'll only work on ST 6.0

    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    Good answer. 100 points for knowing the new features.



  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    8000 points still available.

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    I'm not returning a RECORD as specified. Chose, rather, to return a list of machine names.

    Nonetheless, something like this could work:

    ------------------

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    DJ Gray,

    1) It doesn't compile.

    2) To win the points, you need to return a record which includes the apps running on the machine.

    3) You don't really need the spawn/rendezvous/access in this situation. It would work, but it's more complicated than really needed.


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  7. #7
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    I'll take a stab...

    ------------------
    Tom
    Tom

  8. #8
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    That's fine John. I was just having fun with it. I have added this to my shared(team) include and it is compiling and working for our needs.

    Thanks for the occasional challenge postings. They are fun.

    ------------------

  9. #9
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    Tom wins the 8000 points.

    One bit feedback is on variable naming.

    In the main you named your AGENTINFO variable ai, but in the function it was ThisAgentsInfo. I try to stick to variable naming like SilkTest does so an AGENTINFO might be aiThisAgent.

    Also, in your code, you're looking for AGENT, and I think agent or Agent would also work. You could convert to upper case before comparing.

    Challenge #6 is next!

    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

  10. #10
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #5

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John Green:
    Tom wins the 8000 points.

    One bit feedback is on variable naming.

    In the main you named your AGENTINFO variable ai, but in the function it was ThisAgentsInfo. I try to stick to variable naming like SilkTest does so an AGENTINFO might be aiThisAgent.

    Also, in your code, you're looking for AGENT, and I think agent or Agent would also work. You could convert to upper case before comparing.

    Challenge #6 is next!

    <HR></BLOCKQUOTE>

    Thanks for the feedback. What's the score?

    ------------------
    Tom
    Tom

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:44 AM.

Copyright BetaSoft Inc.