JOIN
Get Time
forums   
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
Grunt Checks and Unit Tests | Reply
If an app has grunt checks and / or unit tests, should subsequent contests revolving around that app explicitly mention that these checks and tests should run successfully or is it to be understood that they should.

As in should the specification for the contests explicitly call this requirement out or should it be understood / assumed by the participants?

I see that I as a co-pilot have called this out explicitly in some contests and in others I have expected the participants to assume this.

Creating this thread to get some clarity on this and to follow a convention or create one regarding this for all of us to adhere to.
RE: Forum "General Development Discussion" has been updated bycallmekatootie (response to post by callmekatootie) | Reply
I create apps, so I'm not really clear on grunt check process.

Re: Grunt Checks and Unit Tests (response to post by callmekatootie) | Reply
You mean JSHint checks, right ? Or "grunt lint" for this matter as most of the applications name this task "lint".

You already know my opinion on this matter as we are currently discussing it in the challenge forum but I also want to add it here.

If the project already uses JSHint checks to validate js/html files and the deployment/verification guide specifies the commands to run these checks then I think the competitor should assume they need to pass the checks when adding new code or modifying existing code.

As for the unit tests, I think they are in an other category, they test functionality, not code style. As these require writing extra code, I think the contest requirements should specify if new tests are required or not. But the old tests should not fail, this should be assumed if not specified.
Re: Grunt Checks and Unit Tests (response to post by MonicaMuranyi) | Reply
Grunt checks - they can be lint checks or running unit tests.
Re: Grunt Checks and Unit Tests (response to post by MonicaMuranyi) | Reply
I think this is obvious and I agree with Monica.

I would not hire a developer who did not follow Uncle Bob's rule without having to be told: "Always leave the campground cleaner than you found it".
Re: Grunt Checks and Unit Tests (response to post by wcheung) | Reply
>>> I would not hire a developer who did not follow Uncle Bob's rule without having to be told: "Always leave the campground cleaner than you found it".

As a developer working in a job, It doesn't matter much if I deliver my 5 days worth of effort 2 hours late.
Each second matters in tight contests like NASA search portal bug fix contests. In that case, it's obvious for me to skip lint checks since it is not mentioned in specs.

>>> If the project already uses JSHint checks to validate js/html files and the deployment/verification guide specifies the commands to run these checks then I think the competitor should assume they need to pass the checks when adding new code or modifying existing code.

IMO, competitor should never assume things.

>>> I would not hire a developer who did not follow Uncle Bob's rule without having to be told: "Always leave the campground cleaner than you found it".

Most of the assembly and code projects will have UI created from UI Prototype track. Below is the 1st 2 sections of UI Prototype scorecard. I have never seen these validations are done in Assembly and Code tracks. If existing code follows these guidelines, then isn't it obvious for future code to follow these guidelines?
Answer is, it is not obvious and unless these things are mentioned in specs reviewer should not validate these things. If reviewer is accepting HTML and CSS validation problems, why does validations for Javascript alone is considered?



close Question 1.1.1 Does the HTML5 pass W3C validation? (Validate @ http://validator.w3.org/ then choose Document Type: HTML5 (experimental) )
3 - Yes - Submission passes with no errors.
2 - No - Failed with 1-3 unique errors, which are easily fixed.
1 - No - Failed with 1-3 unique errors, which may take some effort to fix.
0 - No - Failed with more than 3 unique errors.
15.0
close Question 1.1.2 Does the CSS3 pass W3C validation? (http://jigsaw.w3.org/CSS3-validator/ then choose Profile: CSS Level 3 )
3 - Yes - Submission passes with no errors.
2 - No - Failed with 1-3 unique errors or warnings, which are easily fixed.
1 - No - Failed with 1-3 unique errors or warnings, which may take some effort to fix.
0 - No - Failed with more than 3 unique errors, which may take some effort to fix.

Re: Grunt Checks and Unit Tests (response to post by MonicaMuranyi) | Reply
>>> As for the unit tests, I think they are in an other category, they test functionality, not code style. As these require writing extra code, I think the contest requirements should specify if new tests are required or not. But the old tests should not fail, this should be assumed if not specified.

Again as a competitor, I won't assume anything. Assuming will introduce subjectivity in the review. Its the responsibility of spec writer to define these things clearly. It hardly takes a minute to write these things in spec.
Re: Grunt Checks and Unit Tests (response to post by ananthhh) | Reply
I agree assumptions should be kept to a minimum by providing detailed challenge requirements and there is room to improve here in the current review process. But scorecard questions can also help clarify some of these assumptions. For example, for the code style check:

Assembly:

Question 2.2.3 There is no unnecessary or careless object instantiation or variable assignment.

Question 2.2.8 There is no duplication of code observed in the implementation, including code written for automated tests. Code is appropriately refactored to eliminate redundancy.

Code:

Question 1.1.3 Extent to which the code organized effectively, abstracted correctly for readability and reuse and makes use of object-oriented best practices when possible?

Question 1.1.4 Extent to which the code is clear, well written and documented.

I think code style checks can catch some of these issues.

I didn't find a scorecard question for breaking existing tests but this could mean the submitter introduced some bugs with his/her submission.
Re: Grunt Checks and Unit Tests (response to post by MonicaMuranyi) | Reply
This thread started out of discussion from the contest
NASA Search Portal Bug Fixes Contest - Part 2

So i will give example from the same code base

I just ran HTML validator on search.html file and it captured 4 errors. http://goo.gl/6Dhe33

If we are supposed to use tools to find problems in codebase, then why didn't reviewer used tools to find errors in HTML and CSS?

JSHint shows missing semicolons as problem which hardly comes under any of the category mentioned in scorecard. I don't think code will become unclear when semicolon is missing.
Re: Grunt Checks and Unit Tests (response to post by ananthhh) | Reply
Missing semicolons maybe are not a relevant example indeed, because there's been a lot of debate over semicolons in JS community but undefined variables or unused variables are valid issues. I remember for this specific contest there was a grunt task (grunt lint) which was already mentioned in DG so the reviewers used it to check for issues. I think the idea is to decide over a specific set of style check tools for a project, so all members know which tools to run before submitting.
RSS