photo credit: Freepik.com

Dealing with Nerves and Assessments at Launch School

Joseph Castrigno
Launch School
Published in
6 min readApr 26, 2020

--

If you’re coming up on your first assessment at Launch School, you’re probably nervous. Launch School has taken every opportunity to communicate to you that the program is hard. The assessments test for mastery, not just awareness, and any grade below a B means you need to spend more time on some concepts before moving on.

After passing a handful of assessments, I think the hardest part is getting over nerves. It’s hard enough to program in front of someone watching - even harder when they’ve repeatedly told you that it’ll be difficult.

To deal with some of this anxiety, I have a few recommendations for people who were in my position when I was preparing for my first assessment.

Remember that difficult doesn’t mean impossible. Also remember that Launch School has your best interests in mind. The only reason they would ask you to review material before moving on is because they don’t want you to struggle later on or have to revisit a concept because you didn’t understand it thoroughly enough in an earlier course. Imagine it for a second. It’s not much fun to be flying through new material but suddenly have to stop and go back because you didn’t remember how something worked.

If receiving a “Not Yet” is the “worst” possible scenario, then you have nothing to lose and only knowledge to gain. The staff will make sure you get helpful advice and have direction forward on your path to mastery.

Think also of the possibility that you’ll pass. You don’t want to spend more time than you need to on a course do you? Taking an assessment is simply asking Launch School if your brain is ready for the next topic.

When I started Launch School the only language track offered was Ruby. I started RB101, spent a month to get through the material and another month on studying for the assessment. I passed the written exam right before switching to the JavaScript track which was just released.

I finished JS101 course content in half the time it took me to finish RB101 course content because I had a basic understanding of the concepts already. After working through some nerves, I got an A on the interview. My interviewer said they were pleased to see my problem-solving process and thought I had proven competency enough to move on.

I didn’t spend much time learning that problem-solving process in JS101, I only practiced that which I had already learned in RB101.

This speaks to the importance of implementing a structured approach to solving problems. It doesn’t matter what language you are programming in. Knowing how to deconstruct the problem is the common factor.

A lot of the problems seem pretty easy like you wouldn’t need to apply PEDAC and sometimes that’s true. But many of them are too hard to keep straight in your head, especially while someone is watching.

Any problem that involves a solution of a loop within a loop is one that I found to be challenging but once you break down the problem it’s much more manageable.

Here’s an example:

Given a string, write a function that returns an array containing all palindromes in that string of two or more characters in length.

For those that don’t know, a palindrome is a word that reads forward the same as it reads backwards. For example pop, racecar, etc. This includes made-up words like typyt or morcpcrom.

From a high level this is one way I might write out what the problem looks like:

//first turn the string into an array//iterate over each element in the array////for each element iterate over all remaining elements in the array from the position of the currently selected element to the position of the last element in the array////if there is a palindrome, add it to an empty array 'results'//return results

Now I have a general idea of what I need to do, I can break down each step:

//first turn the string into an array
let arr = str.split('');
//iterate over each element in the array
for (let idx = 0; idx < arr.length; idx += 1) {
Let currentLetter = arr[idx]
}

Now here comes the hard part. How do you go over an array checking for palindromes? How do you get substrings in the middle? How do you make sure you get all of them?

My answer is this: within this outer loop, I need an inner loop to iterate from my current element (selected in outer loop) through the remaining elements (selected in inner loop) with the ultimate goal to use slice() to create substrings of two characters or more. It will require the index of the outer loop as a first argument, and the index of the inner loop as the second. The index of the second loop has to be at least one more than the index from the outer loop in order for slice() to return a string with a length greater than zero.

Some code makes it a bit more clear. That might look like this:

for (let idx = 0; idx < arr.length; idx += 1) {
let currentLetter = arr[idx]
for (let subIdx = (idx + 1); subIdx < arr.length; subIdx += 1) {
// check here for palindrome
}
}

reverse() can check for palindromes:

//if there is a palindrome, add it to 'results'
if (arr.join('') === arr.reverse().join(''); {
results.push(currentSubStr);
}

However I don’t want to count any strings that are only one character long. Let’s check for that:

//if there is a palindrome, add it to 'results'
if (arr.join('') === arr.reverse().join('') && currentSubStr.length > 1); {
results.push(currentSubStr);
}

So with all that, my notes look like this:

//first turn the string into an array:
let arr = str.split('');
//iterate over each element in the array:
for (let idx = 0; idx < arr.length; idx += 1) {}
////for each element iterate over all remaining elements in the array, from the position of the currently selected element to the position of the last element in the array:
for (let idx = 0; idx < arr.length; idx += 1) {
for (let subIdx = (idx + 1); subIdx < arr.length; subIdx += 1) {
// check here for palindrome
}
}
//if there is a palindrome, add it to 'results':
if (arr.join('') === arr.reverse().join('') && currentSubStr.length > 1); {
results.push(currentSubStr);
}
//return results

We have the big pieces we need to start putting together the final function:

function findPalindromes(str) {
let results = [];
arr = str.split('');
for (let idx = 0; idx < arr.length; idx += 1) {
let currentLetter = arr[idx];
for (let subIdx = (idx + 1); subIdx < arr.length; subIdx += 1) {
let currentSubStr = arr.slice(idx, subIdx).join('');
let reversed = arr.slice(idx, subIdx).reverse().join('');
if (currentSubStr === reversed && currentSubStr.length > 1) {
results.push(currentSubStr);
}
}
}
return results;
}
let example = "adaswzboiobncpddplopodl";findPalindromes(example);

Of course I can refactor this because it uses a lot of for loops, but during the assessment interview it’s most important to write code that solves the problem and if you have time you can go over it again.

I used to be guilty of method hunting and I struggled to solve the JS101 exercises. After going through the course material for the second time I realized I had skimmed over the sections about simple for loops. Again, here’s an illustration of the point that the concepts are most important — fancy methods are helpful but only if you understand the underlying logic of how they work.

--

--