SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A Forum with a Built-In Unit Tester

    An old thread was just bumped up and I was struck by this post by lastcraft. My mind wandered a little and I got to thinking about the idea of group code development using a forum and I had this crazy idea.

    What if there was a unit tester (e.g. SimpleTest) integrated into the forum so that you could write test scripts that could "include" code from another post and run tests on it. It would essentially be a way to run code posted with inputs that you define.

    Of course the whole slew of security issues it would bring up would probably make it impossible. You might have to create a custom version of PHP without any libraries that even remotely effect a system resources. And then it would need to be run in a service and memory limited sandbox. The upshot would be that unit tests would have to mock almost everything, which might not be a bad thing.

    Marcus' idea of a '"codefest" or "designfest" thread' intrigues me. If only there was some structure, tools, or as least some rules to support doing such a thing.
    Christopher

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    naperville
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As you said, unrealistic. Thats not even a forum feature really - "why" would you want to unit test your code on a forum when you can do it twenty times quicker by refreshing your browser?

  3. #3
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "why" would you want to unit test your code on a forum when you can do it twenty times quicker by refreshing your browser?
    Not sure your point because I wasn't thinking of it as a solo development tool. I was thinking of it as a fourm based group XP/TDD tool. My idea was the other way around. People would bat a design around. Then test(s) would be posted to document the design. Finally various implementations would be written against the tests to compare different ideas. Interestingly the whole process would be documented via the forum posts.

    Obviously the execution speed of the tests would not be the proirity. Instead I saw the goal as enabling a group TDD process.
    Christopher

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is a good idea... but the security threat.

    This would be better for a web design team than a public forum, where all you need to join is a valid email account.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh yeah, I fully understand the security problems and that it is a crazy idea.

    It just seemed to me to be an intriguing idea to do forum based TDD by allowing you to essentially "run" posted code in a sandbox for all to see with unit test code. I think it would take lastcraft's "codefest" idea to another level.
    Christopher

  6. #6
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you mean by TDD anyway?
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  7. #7
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  8. #8
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    naperville
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It has possibilities on a trusted-invite system, but never public. Something basecamp-esqu with a unit tester is what I think you're trying to describe

  9. #9
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi.

    Why not use a Sourceforge or Tigris project alongside? That way the code could progress in the project space with the design commentry and code snippets on the forum.

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  10. #10
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not use a Sourceforge or Tigris project alongside? That way the code could progress in the project space with the design commentry and code snippets on the forum.
    That is certainly a way to do it and I think it works both for specific ideas that come up on the list and for your "codefest" idea. I was dreaming of extending the wild and wooly forum format, but you have brought it back down to something brilliantly workable.

    Is there interest in setting up a Sourceforge or Tigris project where ideas and codefests from this forum could live? We would have to agree on the rules, directory layout, membership, etc. But that could probably be easily done. I have a basic belief that, though opinionated, the members of this form are a pretty respectful and cooperative lot.
    Christopher


Bookmarks

Posting Permissions

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