21-Day Coding Challenge: Thanksgiving Edition

I had a great Thanksgiving long-weekend, thanks for asking! It was full of food and friends and a little bit of daily coding here and there. Except for oneeee tiny thing…

I missed a day of the 21-Day Coding Challenge 😦

I am just as disappointed as you probably are. I know. It’s bad!!! See what happened was on Saturday, I hosted a Friendsgiving dinner and in all the cleaning, cooking, and hosting hubbub, I got lost in the gravy sauce and simply … forgot to do the challenge …… which sets me back a day. The 21-Day Coding Challenge waits for NO ONE, not even beloved Lighthouse staff. I am now 1 day behind.

tenor (5).gif

But let’s backtrack a bit first and reflect on Day 5: Friday.

Day 5

Friday was okay. I looked at the challenge earlier in the day and got super intimidated by it from the get-go, so put it off until the very end of the day right before bedtime. I was stuck on it for a looong time but after a few Google searches and a nudge in the right direction from my developer friend, I finally flashed back to COMP 202 at McGill and how we touched on Unicode/ASCII and then I solved it! I LOVE when the thousands of dollars I have in student loans actually pays off in a real life situation!

tenor (6).gif

The only thing that I find myself repeatedly doing though, is putting in extra code that absolutely does not need to be there. For example, the solution that I submitted for Day 5 was this:

function convertColumn(coordinate){
coordinate.split(“”);
var n = coordinate[0].charCodeAt(0) – 65;
return n;
}

See, I KNOW that the split was totally unnecessary. But I didn’t realize until it was too late and now I cannot remove it. But I’m glad I can reflect back on it and realize the mistake. It’s all part of the journey!

Day 6

The Day It All Went Wrong. It completely slipped my mind in the midst of all the Thanksgiving commotion, which obviously indicates that I have not succeeded in making coding a daily habit yet. Once I did tackle it though on the day after, I had one of those moments where I thought I had the correct code and so I kept submitting it but it would not run. And I could not for the life of me figure out what went wrong! I was so convinced that it was right. After a frustrating 100 attempts, I finally figured out that I had forgotten to suBTRACT 1. And then it worked. And then I was happy again.

Day 7

I was so confident going into the seventh challenge on Monday (instead of Sunday, because, you know, did I mention I missed a day? 😦 ). I submitted my answer within 2 minutes and cheered out loud at the sight of that sweet sweet red text saying “Congratulations”. However, after triumphantly showing my developer friend my answer, that victory high quickly wore off when he informed me that a lot of the code I had was – like Day 5 – again, completely unnecessary and apparently there is a way more efficient way to solve it.

My code:

function isRock(coordinate){
if(lightCell(coordinate) === ‘^’){
return true;
}else{
return false;
}
}

Maybe I just like writing out If statements because they’re FUN okay? Any chance that I get to flex my coding knowledge with loops and if statements, I will jump at. Oh well, at least I solved it! ¯\_(ツ)_/¯

Day 8

Very pleased that Challenge #8 was extremely similar to Challenge #7, so I was able to practice code efficiency this time and repent from yesterday. This is the refined code I submitted:

function isCurrent(coordinate){
return lightCell(coordinate) === ‘~’;
}

*Mic drop*

tenor (7).gif

That wraps up my coding long-weekend! I can’t believe the challenge has already been going on for a week now! Overall I know that I am still traveling on the long road to efficiency but I’m determined to get there, and I am also determined to never miss another day!

 

Bye for now!

-Rachel

Standard

All good on Day 4!!

giphy (2)

We’re now at Challenge #4 of the 21-Day Coding Challenge and it’s been the usual vibe — pretty easy to solve! I’m happy to know that my coding skills are at least at level 4. For someone who is completely new to coding and who has NO CLUE where they stand on in terms of coding skill-level, it’s a relief to know that maybe I don’t suck at coding and maybe I have it in my blood!

Though I still found myself trying to jump into a completely convoluted way to approach the problem when all along the answer could have been written in just 2 lines of code … I was super ready to break out the nested four loops and to store the answer into all these random variables, but I’m glad I caught myself early, took a step back and saved myself the trouble. Maybe that’s the lesson to take away from today’s challenge — sometimes, the answer isn’t as complicated as you think! And chances are there is definitely a way to make your code more efficient.

Challenge #4 is a great chance to familiarize yourself with JavaScript Operators (hint hint), and that’s all there is to it! Nothing too snazzy.

Like Sarah, I will definitely be doing a long-weekend round up on Tuesday after I code my way into Thanksgiving!

Have yourselves a great Thanksgiving + an even greater 3 days of coding!
-Rachel

 

Standard

Day four, what a breeze🍃

Today had significantly less of this

giphy3

and much more of this

giphy4

Now that I am back on track with the correct correct code, it’s all making a lot more sense. Repeating arrays and functions has really been helping solidify my understanding and my syntax has improved pretty drastically! Missed semicolons and square brackets were pretty standard for me before, but today I noticed I popped them in without a second thought!

On top of my general understanding of JavaScript improving, the hints have also gotten longer and more in-depth which was an amazing help. The resource for day four is 👌 to say the least. It walked me through how to calculate in JavaScript, but also how to best implement what the challenge was asking for without hard coding. It’s really neat to learn just how many ways one challenge or task can be completed with programming. I’ve also noticed this in the 21-Day Coding Challenge forum! Community contributors all have slightly different recommendations based on how they best solved the challenge.

Looking forward to this weekend, I am really hoping I can stay on top of a challenge a day given the holiday. I will probably do a weekend roundup on Tuesday going over all the challenges from today to Monday.

Until then!

Sarah

Standard

Day 3 of learning how to code … You Won’t Believe What Happens Next!!

This girl committed to learning how to code for 21 DAYS! What happens next will SHOCK YOU!

Okay despite the ~crazy~ headline, it’s been pretty chill 3 challenges in! I completed the challenge 2 days ago and I think I’m getting pretty used to this coding thing! Except one thing I have noticed is that maybe I don’t take the most efficient route to get the answer I need … I think a big part of programming is reaching the solution in the cleanest way possible … something which I still haven’t mastered. But we all have to start somewhere so hey, whateva!

Challenge #3 is super easy. I’d even venture to say that it was easier than #1 and #2! As long as you know how to write a variable, you’re golden 🙂

Me walking away from the challenge after submitting it on the first try and getting it right:

tenor (2).gif

Leggo Day 4!

– Rachel

Standard

Day three was a whole lot of OOPS

Soooo remember when I mentioned I might have messed up on day one and two? Yeah, that definitely happened. Here’s some raw footage from me trying to complete day three:

giphy2

Here’s what went down.

I thought I was being super sneaky by referencing the grid code and calling on the length and height (which I still don’t know how that worked but it DID!).  I essentially copy/pasted the grid code into markdown and did it that way. Which is very wrong because I should have been writing functions for length to move forward.

I do think it’s really interesting that all the challenges build on each other! It really contributes to my understanding of how everything works together or against each other in my case 😉. Part of me wonders if anyone else ran into or will run into the same issue I have, though and get stuck later on.

Now that I’m back on the right track, I am super excited to tackle whatever comes next (and probably pester James, our web dev, for help even more – THANKS JAMES!!).

Did something similar happen to you? How did you get to a correct solution after?

Cheers,

Sarah

Standard

DAY TWO IS THAT ALL YOU’VE GOT?!

Okay, so I don’t want to brag but I solved today’s challenge in 34 seconds. Me @ me:

giphy1

It was almost too easy. I actually consulted with a couple co-workers and they said they did the challenge completely differently. So now not only am I wholeheartedly overconfident, but my answers are different too 🤔 I’m sure everything will be fine!

I see Rachel noticed the same thing, though, that today’s challenge was easier. I’m pretty sure she is a dev now, but that’s just me. 😋

I ended up using the same method as yesterday, which was to return the number I needed. After the challenge was complete, I actually went and did a little more reading on returns so I can have a better understanding of what my code is doing. I already feel like my JavaScript theory is shaping up!

Really looking forward to tomorrow’s challenge. Who knows, maybe I can use a return again. 🤓

Sarah

 

Standard

Day 2 ✓ Easy peasy lemon squeezy!

Today’s post won’t have too many groundbreaking thoughts. The second challenge was pretty similar to the first one so again, it took me no more than 2 minutes to solve. Arrays? More like arr-yays!

giphy (2).gif

Am I a dev now?!

Lol okay maybe I’m not, but I sure am having the time of my life having reason and motivation to code each day, even if it is only writing a line or two. Because you know that old saying;  the brain is like a muscle — the more you use it, the stronger it gets!! I’m excited to build my brain up to be the John Cena of brains by the end of this whole challenge.

Challenge #2 is definitely only the tip of the iceberg and I feel like I will have much more to say once I Titanic into it a few more challenges in.

On to Challenge #3 now, bye!

-Rachel

Standard

THAT was day one?!

Phewf. Did anyone else struggle as much as I did? After preparing with the JavaScript Essentials workshops, I thought I was a real programming hot shot, but this challenge has swiftly reminded me of my beginner status. Pretty sure my face was like this for about 20 minutes straight as I murmured “aw shoot” at least 15 times:

giphy

I have been conditioned by other beginner coding tutorials to expect the solution to be spelled out in the explanation, but that is not the case with this one and I like it so much. Instead of being fed the answer for general awareness, we are being forced to apply our knowledge and push ourselves to sift through the information we may (or may not) have available.

For me, this can be particularly frustrating but intensely rewarding. I am 100% the type of person who is used to learning new skills or facts quickly and retaining them well. Oftentimes (and I know this is a terrible trait) if something is challenging upfront, I will try to work around it or give up. I don’t like this thing about me and I actually think this 21-Day Coding Challenge will help me get over it! I hope, at least 🤓

Since this is my first post, I was hoping to introduce something I want to do every day. I want to feature a key takeaway, either something I learned about JavaScript or about my own learning style. I am hoping it can be my closing line each day so here it goes:

Today I learned that even though it may not be easy, learning is the ultimate reward. Struggle through the hard stuff so you can get to the good stuff (like the amazing feeling of completing day one of the 21-Day Coding Challenge!).

Bye!

Sarah

 

Standard

The 21-Day Coding Challenge has officially begun! (Day 1 Recap)

tenor (10).gif

Yesterday on Oct 1, 2018, I braced myself for the 1st coding challenge out of 21. As I opened my browser, I had no idea what to expect. All I knew was that each challenge was supposed to take around 20-30 minutes, so in preparation for that, I had blocked out a big chunk of time in my calendar to tackle it. I was worried that for a beginner like me with limited coding experience, I’d have no idea how to approach it.

When I looked at the Challenge #1, read the instructions and scanned the given code, I was like “um what the heck!! I will never figure this out!!” but then suddenly, it was like all the coding-related knowledge that rested in the deep crevices of my mind suddenly came forward in my brain. I saw functions and arrays and loops swirl around me and felt like I was having a moment that resembled the one the math lady meme had.

630.png

And then, I felt a brief moment of clarity. It took me only two minutes to solve… I was shocked at how much code I actually had in me! Who would have thought! I will admit that I did do some Googling as a refresher for some concepts but really what developer doesn’t Google? Google is and should be everyone’s best friend so #noshame in that. I was just happy to realize that maybe I retained more than I thought I did in the short amount of time that I’ve been learning how to code. It felt SO good to be able to rack my brain for the JavaScript tools that I knew I had at my disposal, and use them to solve the problem.

All in all, I found Day 1 of the 21DCC to be a great JS essentials recap for beginners. If you’re super new to coding, I’d recommend reading up on Arrays to tackle the first challenge (yay, free hints!). Also know that Google is here for you and so is the 21DCC forum!

So, Day 1: so far so good! However, I know that the worst has yet to come and it’ll only get harder from here. But for now, I’m going to enjoy the sweet sweet feeling of running the right code (even if it was a really basic one).

I’m ready to take on Day 2 today! Be back to tell ya all about it tomorrow B-)

Thanks for reading! If you haven’t joined the 21DCC yet, it’s not too late!! Head on over to https://coding-challenge.lighthouselabs.ca and join me! 

-Rachel

Standard

21 Days of Coding > 500 Days of Summer

tenor (2).gif

The 21 Day Coding Challenge is coming up and I’m doing everything I can to PREPARE my mind, body and soul! I’ve been flexing my fingers on the reg (thanks WebMD!), curating a couple of Spotify focus playlists, staying hydrated, and making the most out of my NYTimes crossword subscription to keep my brain in tip top shape. I’m a mix of nervous and excited. Nervous for the unknown, but excited that there’s 21 days of surprises heading my way! I’ll be honest though, I’ve never committed to a n y t h i n g for 21 days but I’m determined as ever to make it to the end. If I can’t be the type of person who wakes up at 6 AM to go for a morning jog (no matter how hard I may try), I figure this is the next best thing! The things that will keep me going during this challenge are 1) the fruitful pursuit of (free) learning (having just graduated in June, I am now faced with crippling student debt so anything I can learn for free, I will gladly take.) 2) the chance to become the Female Zuck the world didn’t know they needed and 3) the motivation and support from my 21DCC team and Sarah, we’re all in this together! Three cheers for accountability!! (Contrary to popular belief, Sarah and I actually won’t be on each other’s team as Lighthouse Vancouver and Lighthouse Toronto are about to go head-to-head for this!!)

In all seriousness though, I’m super excited to get into it! I’m currently taking Lighthouse’s part-time Intro to Front End with JavaScript course but I know I’ve barely scratched the surface with JS. I want to gain a deeper understanding of how it can be applied to the mystery that is the World Wide Web and how I can use it as a self-proclaimed Marketer. Coding is an extremely valuable skill to have ~in this economy~ and I can’t wait to build this skill into a habit where I’ll soon be (hopefully) spewing out beautiful lines of code without a second thought. 🙂 

Between October 1st and 21st, Sarah and I will be updating this blog every day with our thoughts on the challenge, resources we used to overcome hurdles, and more. You will also be able to find us on Instagram @lighthouselabs throughout the day and on the forums!

Standard