by James Priest
Round 1 | Round 2 | Round 3 | Round 4 | Round5 | this log |
This is part of Alexander Kallaway’s 100DaysOfCode challenge. More details about the challenge can be found here: 100daysofcode.com.
Commitment: I will code daily for the next 100 days.
Start Date | End Date |
---|---|
June 28, 2019 | - - - |
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
In this lesson I built the cart page which allows the quantity to be updated and also allows removing of items from the cart.
This was done with
The cartItem component looks like this.
import React from 'react';
import { connect } from 'react-redux';
import {
addItem,
removeItem,
clearItemFromCart
} from '../../redux/cart/cart.actions';
import './checkout-item.styles.scss';
const CheckoutItem = ({ cartItem, clearItem, addItem, removeItem }) => {
const { name, imageUrl, price, quantity } = cartItem;
return (
<div className="checkout-item">
<div className="image-container">
<img src={imageUrl} alt="item" />
</div>
<span className="name">{name}</span>
<span className="quantity">
<div className="arrow" onClick={() => removeItem(cartItem)}>
❮
</div>
<span className="value">{quantity}</span>
<div className="arrow" onClick={() => addItem(cartItem)}>
❯
</div>
</span>
<span className="price">{price}</span>
<span className="remove-button" onClick={() => clearItem(cartItem)}>
✕
</span>
</div>
);
};
const mapDispatchToProps = dispatch => ({
clearItem: item => dispatch(clearItemFromCart(item)),
addItem: item => dispatch(addItem(item)),
removeItem: item => dispatch(removeItem(item))
});
export default connect(
null,
mapDispatchToProps
)(CheckoutItem);
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
This lesson dealt with creating the CartItem component to display products added to the cart.
It uses the connect() method of ‘react-redux’ to access the store.
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
In this lesson we learned how to add items to our Redux shopping cart.
This is displayed in our Redux logger.
Multiple items are handled with a cart utility function.
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
This lesson dealt with setting up the display of products and creating buttons on items to add them to the shopping cart.
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
This set of lessons was all about setting up Redux boilerplate into an existing app.
Middleware was set up for Redux logging.
The nice thing that this lesson focused on was proper organization of items for large-scale applications.
It included:
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
Today I implemented two forms of Firebase Authentication:
I also started working with Firestore which is a NoSQL database that allows saving of:
Once a user is authenticated React updates our Firestore database with that user record.
Here’s a sample of the authentication and database code.
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
Today I started learning about Google’s Firebase platform. It provides:
It basically provides backend infrastructure for your Web, Android, and iOS apps. It’s free to start and has good documentation to get up to speed with.
The next phase of my React course had me setup and integrate Firebase Authentication.
Integrated OAuth2 Authentication
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
Next I’m starting the large project for this React course. It has us build a complete e-commerce site with the following:
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
I completed the first mini app for the React Basics section.
This simple app does two separate async API calls and displays a list of names and images received from the response JSON files.
This was then deployed to GitHub Pages using the gh-pages CLI.
The app also uses
Links:
Project: Complete React Developer in 2019 (w/ Redux, Hooks, GraphQL) - Neagoie & Zhang
Progress:
I started a new React/Redux course that covers the following topics.
Redux | Hooks | GraphQL | Jest/Enzyme |
Redux-Saga | ContextAPI | Stripe | Firebase |
I’m hoping this will help solidify some React/Redux concepts like:
This first section of this course deals with React Basics. It teaches the fundamentals of React while building a simple Rolodex App to demonstrate these concepts.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I set out learn to about an open source tool called Storybook.
Storybook is a Front End Workshop Environment that describes itself as a UI component explorer for frontend developers.
It’s basically a set of packages that can be added to a React, Vue, or Angular application that allows you to develop components in isolation. Each component can then be viewed, catalogued, and tested outside of the constructs of the application these components are built for.
I went through their Storybook for React Tutorial and built out the following.
This tool is implemented right within your React app’s code by creating a storybook.js file for each component. What Storybook provides is.
Take-away: This is a great tool to document custom-built components that will be used as part of a larger-scale application.
It creates a UI framework for you to showcase and test each component which is suitable for stakeholders, designers, product managers, etc.
It also allows you to build out edge cases for each state of a given component.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
This next set of lessons focused on using Binary Search Trees.
Each node has a value, data, or key and have Left and Right node who’s values are less than and greater than the main value, respectively.
The Node implementation uses recursion for both the insert and contains methods.
class Node {
constructor(data) {
this.data = data;
this.left = null;
this.right = null;
}
insert(data) {
if (data < this.data && this.left) {
this.left.insert(data);
} else if (data < this.data) {
this.left = new Node(data);
} else if (data > this.data && this.right) {
this.right.insert(data);
} else if (data > this.data) {
this.right = new Node(data);
}
}
contains(data) {
if (data === this.data) {
return this;
}
if (data < this.data && this.left) {
return this.left.contains(data);
} else if (data > this.data && this.right) {
return this.right.contains(data);
} else {
return null;
}
}
}
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
Today I learned how to implement the code for both a tree node and a tree class.
The node needs to have an add and remove method while the Tree class contains the root property and the traversal methods.
class Node {
constructor(data) {
this.data = data;
this.children = [];
}
add(data) {
const node = new Node(data);
this.children.push(node);
}
remove(data) {
this.children = this.children.filter(node => node.data !== data);
}
}
class Tree {
constructor() {
this.root = null;
}
traverseBF(fn) {
const flat = [this.root];
while (flat.length) {
const node = flat.shift();
// method #1
// for (const child of node.children) {
// flat.push(child);
// }
// method #2
// node.children.forEach(child => flat.push(child));
// method #3
flat.push(...node.children);
fn(node);
}
}
traverseDF(fn) {
const flat = [this.root];
while (flat.length) {
const node = flat.shift();
flat.unshift(...node.children);
fn(node);
}
}
}
The tree can then be created and traversed with the following code.
const letters = [];
const t = new Tree();
t.root = new Node('a');
t.root.add('b');
t.root.add('c');
t.root.children[0].add('d');
t.traverseBF(node => {
letters.push(node.data);
});
console.log(letters); // ['a', 'b', 'c', 'd']
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
I learned about the tree data structure and all the terminology around its various elements.
Iterating through a tree is called traversal. There are different orders of traversal including:
The data in a node can consist of anything (e.g. number, string, array, object, etc.). There are many use-cases where tree data structures are best suited to accomplish a task including many hierarchical relationships.
Links:
Project: Getting Hired
Progress:
I’ve been deep in the world of tech interviews for the last 4 weeks. For anyone not familiar with these, here’s a rough chronological order.
If you pass each of these then an offer will be made. That process goes like this:
If you pass all this then you are officially hired!
Each one of these steps acts as a gatekeeper so if you don’t pass one you don’t get to progress to the next.
The whole process can take weeks for a single position. Managing this for multiple job openings can be overwhelming and is a full-time job by itself.
Here’s how things went for me over the last 4 weeks.
I’m fortunate because I have a long work history and lots of experience in web development.
For new developers the breakdown may go like this:
The key is not to get discouraged. The reward is well worth the effort once you do find that place which is willing to bring you on board.
Also, it doesn’t need to be your #1 choice of company to work for when you’re just getting started in your career. Sometimes we need to work a less than ideal job for 6 months or a year in order to get that experience. Once you gain that experience then companies will often bid against each other to win you over.
For me it was crazy because I had reached the “offer stage” until the last few days of the last week. Then they all came in within 3 days of each other. Each company was also willing to raise their offer in response to the previous one. Another universal truth is that once one company is interested in you, then they are all interested in you.
The salaries spanned a broad range with the most moderate (lowest) salaries being offered by the places that seemed to provide the best work environment. The crumby places will often lure you in with high salary offers only to end up working you to death.
Here’s how I separated the 4 places that offered me a job.
Software companies (This is where you want to work)
Ad Agencies / Production Companies (Don’t work here)
I almost made the horrible mistake of accepting a position for lots of money only to read the most horrible company reviews.
I quickly broke our agreement and walked away before I got sucked in. The biggest red flag was that the recruiting company lied to me about the negotiated terms of the contract. I was specific and clear that I would only sign if we had consensus and agreement on two points:
The recruiters negotiated with the hiring company and then informed me it was agreed upon. They said we had a deal on both points. The hiring company then refused to put any of this in writing but proceeded to give me verbal assurances once it was time to sign. Furthermore, they claimed the recruiters made these commitments without their consent.
I ended up accepting an offer at a software company for 35k less per year but this is a place where the employees have nothing but good things to say about the company.
Having worked at an agency in the past, I feel like I dodged a bullet and am finally going to get to work at a place that values its employees above all else.
The final thought I can leave anyone with is to make sure to do your homework. Read company reviews on Glassdoor and look at LinkedIn profiles of people that work there to see how long they’ve chosen to stay with that company. That is perhaps one of the most telling indicators of employee contentment.
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
I completed a dozen methods which are part of the LinkedList class that allows manipulation of the list.
Once complete, we looked at how to condense the methods through code reuse.
Lastly, the course required us to implement iterator methods.
for...of
required the use of generators.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
This lesson got into the world of linked lists. It’s a beautiful data structure that allows you to chain data elements together.
Nodes are instances of the Nodes class and are objects consisting of two properties
Next we can create a LinkedList Class to manage our list.
The LinkedList class has a single property and multiple methods for manipulating the lists.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
This lesson covered creating a class that acts as a wrapper to array which only allows the following methods.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
The lesson started covering data structures and how to create these through code and in memory to handle various schemas.
Although JavaScript has optimized methods on the array object to handle data structures, we may be asked to code these in an interview.
This can be accomplished by creating a class and wrapping the necessary array methods.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
The lessons now cover subjects like:
Reducing runtime complexity can be accomplished through memoization. This is done by having a wrapper function return cached results of a function call without having to invoke that function again.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
Now we’re getting into some more complex algorithms including
// --- Directions
// Write a function that accepts an integer N
// and returns a NxN spiral matrix.
// --- Examples
// matrix(2)
// [[1, 2],
// [4, 3]]
// matrix(3)
// [[1, 2, 3],
// [8, 9, 4],
// [7, 6, 5]]
// matrix(4)
// [[1, 2, 3, 4],
// [12, 13, 14, 5],
// [11, 16, 15, 6],
// [10, 9, 8, 7]]
function matrix(n) {
// build nested arrays first
const results = [];
for (let i = 0; i < n; i++) {
results.push([]);
}
let counter = 1;
let startRow = 0,
endRow = n - 1,
startCol = 0,
endCol = n - 1;
while (startCol <= endCol && startRow <= endRow) {
// Top row
for (let i = 0; i <= endCol; i++) {
results[startCol][i] = counter++;
}
startRow++;
// Right column
for (let i = startRow; i <= endRow; i++) {
results[i][endCol] = counter++;
}
endCol--;
// Bottom row
for (let i = endCol; i >= startCol; i--) {
results[endRow][i] = counter++;
}
endRow--;
// Left side
for (let i = endRow; i >= startRow; i--) {
results[i][startCol] = counter++;
}
startCol++;
}
return results;
}
The formula for building recursion consists of a few key steps.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
I reviewed yesterday’s algorithms and worked on a few new ones.
Any of these require that we create an object whose keys are the characters and the value is the number of occurrences.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
I continued on my Udemy course:
I learned the following algorithms & techniques.
Links:
Project: Practice Whiteboarding Algorithms + Data Structures
Progress:
Today I started a Udemy course called:
This is an awesome course that specifically prepares you to be whiteboarded. Beyond that it also gives you tons of practice solving everyday algorithmic challenges.
Now that I’ve done a few interviews and technical assessments, I have a sense of what’s really needed to nail the code challenges so that you are more likely to get that job offer.
This course does just that by focusing on the techniques necessary to problem solve on the spot. It also give you the tools to look at each problem as a set of steps that can be decomposed into manageable chunks.
Links:
Project: Networking
Progress:
Today I went to my weekly Learn Teach Code Meetup (https://learnteachcode.org/).
This has been a great way to get out and network with other developers who want to exchange ideas, code together, get help, or discuss job hunting.
Most folks in the group are training to level up or are in the process of trying to find a job.
It’s tough because every job wants 2-3 years of [fill in the blank] experience. This makes it super tough to break into for anyone who’s just mastering a new technology or skill.
On a related note, I met up with VJ Hawkins, one of my #100DaysOfCode Twitter fam. In fact, this was the first time I’ve had a chance to meet one of my fellow #100DaysOfCode crew IRL.
Had a great time discussing the struggle of securing a tech job in this highly competitive space.
Links:
Project: Technical Interview @ Honey
Progress:
Today I had an amazing experience. I interviewed for 5 straight hours at a company called Honey. I was given a tour, learned about the company, and was whiteboarded thoroughly.
The technical skills assessments covered four distinct areas.
Each one took about an hour and was guided along by either one or two engineers.
A problem was presented in each area and the task was to do the following:
The one thing that became abundantly clear was that everyone at this company was really smart. The level of expertise and knowledge was exceptional which helped fuel my excitement at the prospect of working with these folks.
Beyond that, the company culture is one of diversity, inclusion, and a passion to provide savings to customers on a massive scale.
Now I wait to hear back and see if I made the cut and if there was a good fit.
Oh, and I got this cool swag bag!
Links:
Project: R & D
Progress:
I spent some time digging into the world of Static Site Generators (SSGs).
SSGs are solutions built on top of the JAMstack . JAMStack is a new way of architecting sites that relies on JavaScript, APIs, & prerendered Markup served without webservers.
Instead these are served from CDNs, Git repositories, or Static Site Generator Hosting like Netlify.
When we talk about “The Stack,” we no longer talk about operating systems, specific web servers, backend programming languages, or databases.
The JAMstack is not about specific technologies. It’s a new way of building websites and apps that delivers better performance, higher security, lower cost of scaling, and a better developer experience.
Examples of SSGs are:
They can easily be deployed to Netlify from a GitHub repo. In fact, it’s even easier than that. Netlify built a 1-click deploy that creates a repo and deploys a static starter site in one shot.
Check out the links below for more information.
Links:
Project: Technical Interview
Progress:
I took a few days to recreate the take-home test I was given and build it using React and Redux.
This was a good exercise in using a centralized state management solution a provided practice with the following:
Also added spinners to indicate Async calls.
Links:
Project: Technical Interview
Progress:
I took a timed technical test as part of the interview process for a job today. It covered:
I’m pretty good at all these things but did horribly on this test. The frustrating part was that I over-thought each and every problem.
Watching the time tick down as I struggled to debug and work the problems in my editor didn’t help either.
Once the test was done, I reviewed the problems. In most cases the solutions turned out to be so simple and straight-forward. These were things like missing parenthesis or out of order function calls.
The moral of the story is to breathe and look for the obvious issues first. I was thinking I had to refactor and utilize obscure language constructs, but this often wasn’t the case.
Here are a couple samples…
Project: Technical Interview
Progress:
I was given a take-home test by a company I’ve been interviewing with. This was in lieu of a whiteboard session or live coding technical interview . The role is for Sr. Front-End Engineer.
The assignment was to take a comp and build a fully functional and responsive e-commerce page.
It needed to use a build system and was reviewed for:
The other elements it needed to have were:
The instructions for the assignment are here: vickys-flowers/docs/INSTRUCTIONS.md.
Links:
Project: JAMstack Research
Progress:
JAMstack is the newest stack in the evolution of development for the web. It represents a leap forward in in the following areas.
I to does this by decoupling the CMS content (data) from the website (presentation & structure).
This allows the website to be statically generated. It pulls in data through API calls. The static site can then be served by CDNs (Content Delivery Network) without the need for a server.
Links: