Jennifer Bland header image
≡ Menu

The Difference Between a Tree and a Graph Data Structure

In JavaScript programming, data can be stored in data structures like graphs and trees. Technically trees are graphs.

Graphs Data Structures

Graphs evolved from the field of mathematics. They are primarily used to describe a model that shows the route from one location to another location.

A graph consists of a set of nodes and a set of edges. An edge is a pair of nodes that are connected. A path is the term used to describe traveling between nodes that share an edge. The image below shows a graph with 3 nods and 3 edges.

graph data structure with 3 nodes and 3 edges

 

[continue reading…]

Hack Reactor Week 2 Review

Just completed my second week at Hack Reactor. The first hour of Monday was spent on completing a self assessment used to measure how well we learned the material covered in the first week. We were given 5 exercises that we had to complete in a 30 minutes.

The 5 exercises covered the major topics that were covered in our first week at Hack Reactor. Here are the exercises we had to complete:

  • Write a reduce function
  • Write two new methods that would extend the Array prototype
  • Describe differences between a stack and an array
  • Write a stack function
  • Write a function to handle collision in a hash table

[continue reading…]

Hack Reactor Week 1 Review

Just completed my first week of training at Hack Reactor. Hack Reactor is an intensive 13 week long JavaScript programming boot camp. Classes run Monday thru Saturday from 8:30 AM PST to 8:00 PM.

My first week I spent a grand total of 75 hours in classes. I also did an additional 9 hours of studying and programming outside of classes. All total in the first week I spent 84 hours in training.

Before you start your first day of classes you have already completed an immense amount of pre-course material. If you want to know what is covered then you can check out my post about my pre-course work at Hack Reactor.

[continue reading…]

Hack Reactor Precourse Work

Hack Reactor is a 13 week long intensive immersive coding boot camp. It was recently voted one of the top coding schools in the world.

Hack Reactor is incredibly successful in its development of very competent and qualified full-stack programmers after only 13 weeks of training. Their success is reflected in the stats that 99% of their graduates are able to obtain full-time employment after graduation. The average salary of graduates is $105k!

Applying to Hack Reactor and getting accepted is a very challenging endeavor. They only accept 3% of the applicants into the program. Once you are accepted you are assigned to a cohort class that will be starting anywhere from 3-9 weeks in the future.

The reason for the delay in starting is that you must complete successfully all of their pre-course work. Even if you are accepted into Hack Reactor, you will not be allowed to start with your cohort until all your pre-course work is completed.

[continue reading…]

JavaScript Instantiation Patterns – Part 2 of 2

This is part 2 of my posts about JavaScript instantiation patterns. You can read part 1 which covers Functional and Functional Shared here.

We previously covered both the Functional and Functional Shared Instantiation methods. I showed how Functional Shared made some improvements over Functional. The next two methods I will cover are Prototypal and Pseudo-classical instantiation. They both provide improved performance over the first two methods.

If you are not familiar with prototypes, let me give you a quick summary. Every new object has a prototype chain. Prototype chains make it possible for many child objects to all reflect the properties of one parent object.

Prototypal

The Prototypal instantiation pattern takes advantage of prototype chains for its improvement gains over Functional and Functional Shared. Prototypal will use a prototype chain to provide access to shared methods.

The Prototypal instantiation pattern uses Object.create to generate an object with a delegation relationship. Any failed property lookups on instances will fall through to the prototype.

This reduces redundancy because new instances will have access to properties stored in the prototype.

[continue reading…]