SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    0 Post(s)
    0 Thread(s)

    Doing the right thing

    Recently while working on a project for my current employer, a co-worker and I were writing acceptance tests, and a piece of our acceptance testing framework basically lets you click on submit inputs by name, so I can do something like:

    |user clicks on|search|button|

    at which point we took a look at the said button as it was an image, and I wanted to see the name. Sadly, there was none... not even a name attribute was included.

    When I brought this up, at how it is just outright wrong to use an input element and leave the name out, one pointed out "It works, so what's the big deal?"

    What's a good response for that?

    James Carr, Software Engineer

    assertEquals(newXPJob, you.ask(officeOfTheLaw));

  2. #2
    Brevity is greatly overrated brandaggio's Avatar
    Join Date
    Dec 2005
    0 Post(s)
    0 Thread(s)
    Arriving on the standard for your teams' code (if it needs to validate etc.) should be a team decision so that a members' work has a shot at meeting each other's expectations.

    I would think that conforming to a strict and valid standard would be something to strive for but your team may not agree. Personally, I would rather run the risk of being verbose while surely accessible than lean and potentially incomplete. Arguments and energies against bloat are better targeted at things like images than a tiny bit of code - that being said, less is always more provided it is enough to meet your requirements.


Posting Permissions

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