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 #7

    Fill in the missing parts of the function in the code below. Do not change anything but the function. Email your scripts to jwgreen@automationexpertise.com

    Results will be posted on Tuesday, August 6th in the evening.

    At least 3000 points for all correct answers. Bonus points for uppercase comments with blank lines before them with no typos. Some points are awarded for all efforts.

    Remember to use the Copy button to copy the code below to SilkTest.

    Have fun!


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

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

  2. #2
    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 #7

    Five entries so far, You have until late Tuesday afternoon to submit your answers.



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

  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 #7

    Today is the last day for Challenge #7. Entires are accepted until 7 pm Pacific Standard Time - USA. Results will be posted later in the evening.

    Challenge #8 is currently being finalized and will be posted tonight also.

    Enjoy.


  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 #7

    Here are the results. Congratulations to everyone.

    There was a small trick. The boolean value wasn't being printed, so you had to test it yourself to make sure the data was being loaded properly.

    The point awards are included in the code below. The easiest way to look at it is to click Copy and then select and paste it into a new script.

    Note how much more readable comments are when they are in upper case and have a blank line before them.



  5. #5
    Member
    Join Date
    Mar 2002
    Location
    Quebec, Quebec, Canada
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #7

    There were no mention to handle the boolean value while the text to display was : Print ("{cd.sCity} has the value {cd.rValue}")

    In the solution the text was changed for Print ("{cd.sCity} has the value {cd.rValue} and is currently {cd.bActive}")

    You mentionned not to change anything except the function !

    ------------------
    Remy

  6. #6
    Junior Member
    Join Date
    Jul 2002
    Location
    Austin, TX, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #7

    Ah... GetField()... Good to know

    ------------------
    Don

  7. #7
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #7

    Sorry John,

    We appreciate your course in SilkTest programming techniques, but when it comes to style questions, you should tread lightly.
    Pushing a programming style on other programmers is like pushing religion or politics on strangers

    In particular, I will NEVER write comments in all caps !
    I love comments and whitespace, but in my unix/Java world ALL CAPS is just rude

    When it comes to coding style, I would never use those 2 and 3 letter variable names that you seem to like :-)
    And that inline "Conditional operator" (?) in entries 4 and 5 -- I gag when I see those.

    In the past, I used "Hungarian notation", like so many SilkTest programmers do -- but it has been
    "officially banned" in our company's coding standards documents !
    I have learned to appreciate that fact too -- with truly Object-Oriented testware --
    you want to be able to change an object's type without having to change the
    variable name everywhere.

    I bet you started your career coding FORTRAN.
    Am I right ?
    It takes one to know one -- I did too

    -Rob


    ------------------
    Rob Kapteyn

    [This message has been edited by RobKapteyn (edited 08-07-2002).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  8. #8
    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 #7

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by RobKapteyn:
    Sorry John,

    In particular, I will NEVER write comments in all caps !
    I love comments and whitespace, but in my unix/Java world ALL CAPS is just rude

    When it comes to coding style, I would never use those 2 and 3 letter variable names that you seem to like :-)
    And that inline "Conditional operator" (?) that you seem to like in entries 4 and 5 -- I gag when I see those.

    In the past, I used "Hungarian notation", like so many SilkTest programmers do -- but it has been
    "officially banned" in our company's coding standards documents !

    I bet you started your career coding FORTRAN.

    <HR></BLOCKQUOTE>

    Rob,

    Great points.

    It's not as important to follow my coding standards as to develop one of your own and follow it. Some companies let everyone do their own thing, which doesn't make for reusable code. It sounds like you don't have that problem.

    Readable comments are the important point, uppercase is just my personal preference for readability.

    The inline operator lets you do with 1 line what would normally take 4.

    I didn't start out with Fortran

    Thanks for sharing your thoughts.

    John


  9. #9
    Member
    Join Date
    Mar 2002
    Location
    Quebec, Quebec, Canada
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #7

    How can we know how much points do we have in our account ?
    What can we do with these points ?

    ------------------
    Remy
    Remy

  10. #10
    Member
    Join Date
    Mar 2002
    Location
    Quebec, Quebec, Canada
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding Challenge #7

    Where is Challenge #8 ?
    Congratulations for your challenges, I like it very much.

    ------------------
    Remy
    Remy

 

 

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 02:21 PM.

Copyright BetaSoft Inc.