import java.*
import groovy.*
import css
import javascript.jQuery

if(!candidate.ambitious) throw new InterviewFailedException()

def requirements = new TestRunner(Requirements).run()
if(!requirements.passed) throw new InterviewFailedException()

println "Suitable candidate identified.  (Bonus points:
${calculateBonusPoints})"
println "Please apply for job immediately."

class Requirements {
        @Test
        void "candidate should have programming experience"() {
                assert programming in candidate.experience
        }

        @Test
        void "candidate should like writing good code"() {
                assert [OOP, TDD, "clean code"].every { it in 
candidate.interests }
        }
        
        @Test
        void "candidate should be interested in JVM languages"() {
                assert [groovy, scala, jruby].inject(0) { language, 
totalInterest ->
                        totalInterest + candidate.interests.language
                }
        }
}

class FrontlineSMS {
        def about = '''
FrontlineSMS is a desktop program that allows you to use your modem to
send, receive and manage SMS
over a mobile network. We are a global team of 15 with offices in the
US, UK, and Kenya. Our software
is free and open source and used by non-profits and others worldwide
to communicate with people via
SMS. We are looking to expand our developer team for new projects
working on mobile payments, cloud
based versions of the software and a variety of other applications
from education to media to open
government.
'''
        def methodology = agile * xp * scrum
        def sourceControl = git
        def frameworks = grails, jQuery

        def devTeam = ['Alex', 'David', 'Geoffrey', 'Roy']
        def location = 'Nairobi'

        def contact = [
                email: 'dev-jobs at frontlinesms.com',
                web: 'http://www.frontlinesms.com'
        ]
}

def calculateBonusPoints() {
        def bonusPoints

        // front-end experience desirable
        [css, javascript, jQuery].each {
                if(candidate.experience.contains(it)) ++bonusPoints
        }

        // interest in ICT4D desirable
        if('ICT4D' in candidate.interests)
                ++bonusPoints
}

Reply via email to