Thanks for your interest in working with us! To apply:
- Clone this Gist (please don't fork unless you're the CTO)
- Answer the following questions in the spaces provided
- Send an email to tom@crometrics.com, bruab@crometrics.com, brian@crometrics.com and chris@crometrics.com that includes:
- Your edited copy of
_crometrics-engineer-application.md
as an attachment - Your desired hourly rate and general availability
- If possible, a link to your LinkedIn/Twitter/whatever profile so we get a little more context about you
- Your edited copy of
- Once we receive your email and all looks well, we’ll hire you and assign you a trial task to see how it goes.
Consider the following HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Custom click handler -->
<script>
window.myHandler = function() {
console.log('Click!');
};
</script>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script>
/* YOUR CODE HERE */
</script>
</head>
<body>
<script src="https://slow.com/takes-2-seconds-to-load.js"></script>
<div id="myDiv">OMG Click me!</div>
<script>
$('#myDiv').click(myHandler);
</script>
</body>
</html>
Question 1:
What would you write in the YOUR CODE HERE
section to add a click handler to the #myDiv
element? (Don't edit any other part of the document.)
The handler should use console.log()
to tell us something interesting about your development background, for example:
console.log('I know FORTRAN lol long story');
.
Your response:
/* Question 1 Response Here */
Question 2:
Rewrite your solution to Question 1. Make sure your console.log()
executes every time a visitor clicks #myDiv
, but do not add another handler. Your code must run in the YOUR CODE HERE
block.
Your response:
/* Question 2 Response Here */
Question 3:
Write code in YOUR CODE HERE
that replaces 'OMG Click me!' with another string of your choosing. Use requestAnimationFrame
.
Your response:
/* Question 3 Response Here */
Question 4:
Our client, bacondelivery.com, is launching a test on all product pages -- for example:
- www.bacondelivery.com/weekly-bacon-delivery/
- www.bacondelivery.com/daily-bacon-delivery/
- www.bacondelivery.com/bacon-of-the-month-club/
Write a regular expression that will match the above URLs and any similar pages, but which excludes the following:
- www.bacondelivery.com/ (the home page)
- www.bacondelivery.com/about/
- www.bacondelivery.com/contact-us/
Be sure that home page traffic containing query parameters is also excluded.
Your response:
/* Question 4 Regex Here */
Question 5:
Share a link to an original CodePen/JSFiddle that implements this:
Don't worry about pixel perfection; just eyeball it.
Your response:
/* Question 5 Link Here */
Question 6:
How could you improve the following code?
$(document).ready(function() {
$('.foo #bar').css('color', 'red');
$('.foo #bar').css('border', '1px solid blue');
$('.foo #bar').text('new text!');
$('.foo #bar').click(function() {
$(this).attr('title', 'new title');
$(this).width('100px');
});
$('.foo #bar').click();
});
Your response:
/* Question 6 Code/Comments Here */