Zachary Lopez

Hack Reactor - Week 2 Day 5

Getting home at 9pm is now early. Hmmmm…

Highlights of the day:

  • D3
  • SVG
  • Escaping Git jail

D3

D3: The Mighty Ducks is one of the finest cinematic experiences…j/k, but I do like this series. Let’s do the “Flying V” or maybe a “knuckle puck.”

D3 stands for Data-Driven Document. Basically, with a standard webpage, you can update different elements youself manually. You can step this up a level by using Javascript and jQuery to pull down elements and update the document dynamically. With D3, you can bind data to the elements in an webpage and this will allow the page to updated as the data is updated.

Here are a couple of examples:

  • Bart Salaries - changing the selections, changes the data, which then changes the representation.
  • Collision Detection - this one is just fun. The data is the size and color and the circles respond to your mouse movement. So very cool.

I’m not great at design, but I’ll post what my pair and I come up with in the next few days.

SVG

SVG (scalable vector graphics) is a standard that allows for easy two dimensional graphics with interaction and animation. I didn’t even know we would touch on this, but it has been very interesting to play with. I don’t know much yet, but as I learn more I will post it.

Escaping Git jail

All I can say is Git Status before doing anything. For those who don’t know, Git is a version control system. In english, this is a process/program for tracking changes on your code, which comes in super handy when working with others. This is how most people work, so it is super important to know how to use it and to be more than proficient.

I thought all was going well, and then…let me set the stage. I had a repo forked from Hack Reactor. The repository gets updated every day. My work flow should be as follows:

  • Pull down the latest changes from HR to my local machine
  • Merge them into my local repository
  • Make my changes locally
  • Commit those changes (basically save them with a date and tag them)
  • Push it to my remote backup
  • From my remote backup, request to merge with HR for review

Now this isn’t too hard, but for reasons unbeknownst to me, my repo had changes, the HR remote had changes, then I made more changes (wrote some code), and all hell broke loose. Ultimately, I had to delete my remote and local copies and restart with a fresh copy.

Looking back, this is averted with this simple command:

Git status

I should start the workflow with this. This command would have alerted me to the fact that things were out of sync, before I went ahead and made it worse by adding even more changes.

I escaped jail and got a serious reminder of what to do. Sometimes you gotta totally f things up to learn.

comments powered by Disqus