Craig Rodrigues!


Learning to Code: Week 28

November 17, 2016

  • Finished Fundamentals to Functional JS Course
    • Callbacks Exercises
    • Underscore.js
    • _.each()
    • Looping with
    • .map() vs _.each()
    • Underscore exercises and solutions

November 18, 2016

  • Looked at some CoderByte stuff.
  • CodeWars problems
    • If I can’t solve in 15 minutes, I look up answer and learn the top one in and out.
    • Jaden Casing Strings
      • Very close to getting this one except I forgot the .slice method to return part of a string.
      • Another one I forgot to log that required turning strings into numbers, summing them, then turning that number back into a string. Problem being that JS converts to scientific notation if you use the parseInt method. I didn’t feel like trying to work around that arbitrary constraint to pass test with stupidly large numbers. There weren’t any public solutions. 😑
      • Jennifer talks about her Hack Reactor Interview Process.
      • Functional programming in Javascript: map, filter and reduce
      • Hack Reactor ChatBuilder
      • How I ended up at Hack Reactor
      • Technical Challenges From Front-End Interviews
      • Decided today to actually create a program that helps me at work! I think it’s poorly organized, but I got it to work in 15 minutes or so! I finally got annoyed enough doing calculations in Excel then doing the fractional calculations by hand.
        • I am not sure how to make this into cleaner code that just takes in the cm input and spits out the nice fraction. Do I just make it into an object? Do I make a larger function that calls all my smaller ones?
        • I want to be able to pass in as many arguments as I want in the future (typically 3).
        • How do I handle edge cases of 12.7 cm (5 inches). Comes out to 4.999999 inches. Program output 4 and 1/1 inches.

// The company I work for creates custom acrylic cases based on customer's inputted dimensions. // For fabrication our dimensions go down to the nearest 1/16th inch. // International customers may use cm (or mm) and this is a program that will attempt to convert cm to inches down to the nearest 16th of an inch and display the result as a reduced fraction. // 1 cm is equivalent to 0.39370 inches. // EXAMPLE: 16.4 cm = 6 7/16 inches // EXAMPLE: 10.5 cm = 4 2/16 or 4 1/8 inches const CM_TO_INCHES = 0.39370; // convert centimeter to inches (5 decimal places) var centimetersToInches = function(centimeters) { var inches = centimeters * CM_TO_INCHES; return inches.toFixed(5); }; // split converted inches into everything before the decimal and everything after the decimal var before = function(n) { return Math.floor(n); }; var after = function(n) { var fraction = n.toString().split('.')[1]; return parseInt(fraction, 10); }; // convert the "after" to the nearest 1/16th inch var nearest16th = function(n) { var denominator = 16; var numerator = Math.round(16 * (n * 0.00001)); // reduce the fraction while (numerator % 2 === 0) { numerator /= 2; denominator /= 2; } return numerator + "/" + denominator; } console.log(before(centimetersToInches(10.5)) + " " + nearest16th(after(centimetersToInches(10.5))) + " inches");

November 19, 2016

  • I did some Hack Reactor scholarship essay outlining and hitting my major points.
    • Show my passion for learning/coding
    • Communicate well
    • Show I’m dedicated and curious
    • Be an advocate for community growth and change
    • I have to admit the pressure has increased dramatically now a scholarship is on the table. I have to be the one to get it. I have to outwork everyone!
    • Also continued work on my website.
    • Getting all my weekly reports on their and formatted nicely will take a bit longer than I expected.
    • I need a new headshot.
    • Advice from Shawn:
      • “Closures are all the rage in the JS world lately, so they are worth learning. The trivial examples don't give you a good reason to use them, but when you get to the more complex things it will make more sense. MDN had some decent info on them.
      • On the job ready thing, don't feel like you have to wait until you are fully confident, or you may never do it. I've bit off jobs on things that I had never done before and forced myself to learn and deliver.
      • Week 26. Good advice on the debugger. Learn your debugging and profiling tools and lean on them heavily. They can tell you exactly what is going on at every step without guessing. Great devs get the most out of that sort of tool.
      • On the "what to say in an interview when you're stuck".  Never bullshit an answer. If you don't know, say you don't know. If you think you might know, but misunderstand the question, ask clarifying questions. If there was something that you knew, but misunderstand at the time, you can email the person back later. I did that on an interview once, and the follow up interaction started a great conversation.
      • Per your HR person, Atlanta should be easy to find a dev job. It's always a good market.
      • On the employment support from any of those schools, I'd be skeptical. And you probably won't really need it. For me, it wouldn't be a decider between any of them.

November 20, 2016

  • Worked on adding more of my weekly coding reports to my blog. Formatting is a bitch and a half.
  • Came up with a very rough list of talking points for my HOW TO SUMO DEADLIFT video.
  • Heidi watched a video and ran through all the different shots they used that we can also use. (Front, back, side, putting on belt, approaching bar, etc).
  • Rereading chapter 5 of EJS and will attempt the examples again from scratch.
    • Annotated version is a big help here. Anyone who understands the examples the first time is a goddamn genius.
    • I really don’t get how people advocate for this book so highly…
    • I don’t understand the last example about binding a function at all. Driving me up a wall.
    • Redid Chapter 5 problems.
    • I finally figured out why I can’t use forEach in the last problem “Every and Then Some” because I don’t want to run over every element if I don’t have to. forEach will check every element, while I only need to check up until the predicate fails. I believe this is something that can’t be done with forEach.
    • I checked the MDN and bam it’s right fucking there.

November 21, 2016

  • CS50 Video: Javascript
  • Eloquent JS: Chapter 6
    • Methods
    • Prototypes
      • Many objects don’t directly have Object.prototype as their prototype, but instead have another object, which provides its own default properties.
      • Functions derive from Function.prototype, and arrays derive from Array.prototype.
      • Okay so I’ve finally decided to comment the shit out of every example in EJS since some examples are so fucking obtuse it hurts my brain. This is what the annotated version does, but I need to do it for myself.
  • In JavaScript, calling a function with the new keyword in front of it causes it to be treated as a constructor.
  • Picked up camcorder to test microphone with it later. Hopefully it all works the first time (yeah right, lol).
  • I spent 3 months applying to jobs after a coding bootcamp. Here’s what I learned.
  • First Codementor Session!
    • Questions on .bind/.apply
    • Going away in ES6 with fat arrows =>
    • Ran through reactivex problems down to #12.

November 22, 2016

November 23, 2016

  • Live Mock Technical Interview - ReactJS and JavaScript
  • Worked on getting more weekly reports into my blog. Very meta.
  • Looking back through my logs is a real refresher, and it gives me some perspective on how far I’ve come.
    • I finally see what Javascript Koans are good for.
    • A) People that are experienced in coding but switching languages
    • B) People that want practice in a certain language
    • It is still NOT good for absolute beginners.
    • Watch and Code office hours.
    • Regex Crossword

The Hack Reactor Technical Interview

Reaching Out To People