Week 3 overview

Still livin'. Still chuggin'. I can feel that the sprints are getting more difficult, but I'm hanging on. My body is starting to get used to the 6 hours of sleep everyday, although I really should try to go to bed earlier... damn you youtube and the internet!

So you might have noticed the emotional swings reading through the past week's entries, and a big part of the reason why has to do with my introvertedness. My capacity to socialize is being worked to the limit at this program, and this has made me stressed, anxious, tired and depressed at times. My emotions get the best of me when I'm faced with an assignment that, when sat down with for the first time, I have next to no idea how to do. Frustration builds up, and by 8 o' clock all I wish is to be in my bed alone, watching smash vods on youtube.

It wasn't until the middle of week 3 when Alex Jeng, one of our instructors, inspired me to tell someone about these struggles that I'm having. In every one of his lectures, Alex gives us these "productivity tips" that have been really useful. Everytime he gives us wisdom, I imagine him as Rafiki, giving advice to all his Makersquare cubs. One of the productivity tips this week was "don't suffer alone," basically advising us to tell someone, anyone, if we were having some problems that we're bottling up.

This surprisingly relevant advice had me thinking. When I was having an anxiety attack after day 1 of the stressful Chatterbox sprint, I decided to tell Jeff, one of our fellows, a bit about the unease I have been having and told him I wanted to talk about it the next day... only to blow if off because I felt perfectly fine when I woke up and worked on the sprint with a fresh mind.

So when the jitters started up again on the very night of Alex's productivity tip, I decided it was actually time to speak up to someone about the subject, at least to let the higher ups know what is going on behind my mind.

Again, the next day, I felt perfectly fine. It's like I'm on a menstruation cycle that comes and goes every other day. Even though I didn't feel the need to talk to someone anymore, I thought of Alex's tip and forced myself to sit down with one of the fellows, Casandra, to talk about my problems. It went great! It was very relieving to let all my bottled troubles out, and it was comforting to hear that someone could relate what I'm going through. Casandra told me she is free anytime to to talk about any issues like these and told me she'll be my MKS therapist.
Be careful what you say Casandra, you don't know what you're signing up for



There's one big thing that happened during this week that I left out. One of the things we have to do for Makersquare is to present something tech related for 5 minutes. Both cohorts gather after dinner each day to watch one person present. Instead of picking a later date to present and dreading the day to come, I thought it'd be nice to present early and get it over with.

Throughout my history I have had a fair number of presentations/speeches I had to give, usually for a class assignment. Being a self-conscious person, I've always dreaded speaking in front of people. Practicing the speech beforehand doesn't help much -- when I'm on the spotlight my mind goes blank and forget everything that I was going to say. I have never gotten above a B- on my presentations.


Well.. this one was different. I decided to pick something I'm passionate about for my subject -- Super Smash Bros. Melee. It was titled "The flaws in the design of Super Smash Melee, and how they make Melee so great." I filled my powerpoint with gifs and images.

... Huge success! Talking about something I was passionate about really helped me deliver the lines. Never in my life have I been applauded that loudly for... anything. I killed it real good. I destroyed it. xD1x's screams of "DESTRUCTION!!!!!" rang in my head and I couldn't stop grinning. I felt elation and a body high that I've never felt before, and that high continued throughout the night to keep me awake for a long time
I made it bois


#SaturdayReport:

I woke up at 7:30 and was freaking out because I was going to be late. I parked my car at 8:20 and hurried to the ROC only to remember on the way that class starts at 9:00 instead of 8:00. Where is my mind?



Took some cohortmates down to Koreatown to let them experience the K-town life. We had a great time drinking soju bombs (soju + beer... so good), playing drinking games, and getting silly. The manager kept giving us free stuff because Korean bars love foreigners coming to their bars, as they are rare in the scene. 

Saturday's Toy Problem: 

Warning: super duper hard and frustrating.......

Island Count

Given a string representation of a 2d map, return the number of islands in the map. Land spaces are denoted by a zero, while water is denoted by a dot. Two land spaces are considered connected if they are adjacent (but not diagonal).
(!!!) NOTICE: Newline characters in the inputs have been replaced with <br /> tags to make the value easier to read. In other words, when you see a break, it's actually a
\n
character. Check your console when submitting to see the input for yourself.

Examples

InputOutput
mapStr:
.0...
.00..
....0
2
mapStr:
..000.
..000.
..000.
.0....
..000.
3
mapStr:
..000.
..0...
..0.0.
..0...
..000.
2
mapStr:
0...0
..0..
0...0
5

W3D5: Calm after the Storm

We were allowed to pick what we wanted to do with the next 2-day block. The choices were: React.js sprint, ECMA Script 6 sprint, Coffeescript sprint, or review anything that we learned up to this point. Having listened to the seniors' advice and feeling lazy, I chose to review the first day and start on the ES6 sprint tomorrow.

Preeeeetty chill day. I've found out that there are office booths on the first floor that we were allowed to use. Naturally, I took one and locked myself away the whole day coding away on those super-comfortable bean bags. I fancied comparing myself to Harry Potter and the Room of Requirements. 


As expected, having no guidelines on what task to finish really diminished my productivity levels. Youtube, articles, and social media were often checked. Internet, you evil temptress, you.


What we did today:
1. Toy Problem:

Deep Equality

Write a function that, given two objects, returns whether or not the two are deeply equivalent–meaning the structure of the two objects is the same, and so is the structure of each of their corresponding descendants.
it('should return false for two objects with different number of keys', function(){
    var a = { foo: 'bar', biz: 'baz' };
    var b = { foo:'bar' };
    deepEquals(a, b).should.be.false;
  });
  it('should return true for similar nested object properties', function(){
    var a = { foo: 1, b: { c: 3 } };
    var b = { foo: 1, b: { c: 3 } };
    deepEquals(a,b).should.be.true;
  });
  it('should return false for dissimilar nested object properties', function(){
    var a = { foo: 1, b: { c: 3 } };
    var b = { foo: 1, b: { c:'potato' } };
    deepEquals(a,b).should.be.false;
  });
  it('should return true for similar excessively nested object properties', function(){
    var a = { foo: 1, b: { c: { d: { e: 'potato' } } } };
    var b = { foo: 1, b: { c: { d: { e: 'potato' } } } };
    deepEquals(a,b).should.be.true;
  });

2. React.js lecture
I attended even though I wasn't going to do the React sprint.
3. Review
rewatch certain lectures, refactor previous sprints, go through optional readings, redo questions I got wrong on the self assessments, edit blog, organize e-mails

W3D4: High fives all around x 999

Yesterday was spent getting zip done. None of our spec tests passed, and we deemed it unnecessary to push anything into our repos. Utter trash. Me and Jeff got lost in the sea of files upon files upon files upon files upon files. They were all supposed to talk to each other in some way or the other, but we were to do this without any hints. As my memory is terribad, I quickly realized that this is not the sprint for me. There were so many files to keep track of. Me and Jeff -- we drowned together.



Fast forward a stressful night and heavy traffic. The solutions video was released early in the morning. We watched the video lecture but it made sense only as we watched it.. and this became very clear when we sat down in front of our monitors.

FRUSTRATION UPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATIONUPON FRUSTRATION

We were doing a LOT better than yesterday, but things still looked bleak. We were saved, however, as the Korean Jesus Daniel himself showed us around the ropes of backbone. Using the Socratic method was a very good choice here. He nailed the information into our brains as he helped us finish our sprint.

What a G

To reinforce our learning on backbone, me and four cohortmates formed a quintruple group and started the sprint over. Daniel and Daniel were the main driver/navigator while me, Jeff and Mark piped in whenever we could.

20 minutes baby. We finished in 20 minutes.

I haven't high fived that many times in a day before. That was a lot of high-fives

But 80% of the credit goes to the two Daniels. I tried to follow along and catch any crucial mistakes they might be making. I caught a few! and I'm glad that helped

Hell with those bugs


What we did today:
1. TRICKY Toy Problem:
Largest Product of Three
Write a function that accepts an array of integers and returns the largest product possible from three of those numbers.
This one is tricky
Me and a lot of the cohortmates made the mistake of discounting the possibility that a number in the array could be negative.

Cohortmates' typical reactions:
Stage 1 - omg so EZ
Stage 2 - why error?
Stage 3 - -despair-

Some mathematical thinking is involved. Sorting is also a big thing here

2. Pair programming on backbone BLOODY HELL

3. Townhall

1.28.16

W3D3: backbone broken: x_x


Kind of worried for today's sprint
Our shepherd, Avi, told us yesterday going through the backbone sprint was equivalent to banging your head between a door and a wall
Now I can see why

In this sprint we were to use backbone to create a music player application that plays the selected music through soundcloud and dd or delete songs from the queue. We were to use the Model/View/Controller software architecture to build this app.
  • Model: Manages the program state
  • View: Presents the data in the model to the users
  • Controller: Receives input from the user


Some important concepts:
  • Stands for "Hypertext Transfer Protocol." HTTP is the protocol used to transfer data over the web.
  • Information is received from the user through a series of http requests -- the two most used requests are called GET (requests data from a source) and POST (submits data to be processed to a source) requests
  • You know those pages that come up saying: 404 Not Found? These are http request codes that identify whether or not the http request has been successfully sent. Here are some examples of status codes:
    • 200 - The request is successfully sent
    • 300 - The response resources has multiple choices
    • 400 - Bad request (malformed syntax)
    • 404 - Not found (didn't find any matching URLs)
SERVERS

Honestly, I'm just so tired right now I'll just summarize the day in emojis

backbone lecture: O_O
lunch: ^_^
pair programming: O_O?
dinner: e_e
presentation: (will be in the overview -- I need a reminder though)
pair programming: T_T

What we did today:
1. Toy problem:

BubbleSort V.2

Implement a function that takes an array and sorts it using bubblesort
NOTE: DO NOT use JavaScript’s built-in sorting function (Array.prototype.sort).

Examples



InputOutput
input:
[ 20, -10, -10, 2, 4, 299 ]
[ -10, -10, 2, 4, 20, 299 ]

2. Lecture on backbone.js

3. Townhall

4. Pair programming on backbone sprint

1.27.16

W3D2: Sleep is goot



Gnarly stomachache this morning. Could not bring myself to wake up and get ready, so I texted Richard not to pick me up.

  Mak-gul-li (Alcoholic rice beverage) and Bossam (Boiled pork belly) = The best of combinations

One of my best friends, Minjae, took me to go have bossam + mak-gul-li last night. I'm not sure if it's because of the food, but I know that all the stress has been contributing to the knot in my stomache. I told MKS I'd be late and took this chance to get some more sleep in.

I felt really bad for my sprint partner for missing out on a few hours of pairing. But no worries! I finally got to the ROC, only to find him with a graph already finished.


It's surprising how amazing sleep is. Really clears up your mind so that next day I can look at my code again to find obvious mistakes that were not so obvious the previous night

In the D3 sprint we were two take 2 sets of data, with D3 make a graphic/visual out of the two, and present them to both junior and senior cohorts. They were very flexible on what was allowed and what was not.

We had some free time after the presentations, I put smash on my laptop and people started gathering like moths around a fire (shoutouts to Elly)
                                                             
Excuse me for the less-than-fruitful post last night. I've been having mood swings.


What we did today:
1. Toy Problem

Tree Depth-First Select


Implement a depth-first method on a tree class.
DFSelect accepts a filter function, calls that function on each of the nodes in Depth First order, and returns a flat array of node values of the tree for which the filter returns true.
Example:
var root1 = new Tree(1);
var branch2 = root1.addChild(2);
var branch3 = root1.addChild(3);
var leaf4 = branch2.addChild(4);
var leaf5 = branch2.addChild(5);
var leaf6 = branch3.addChild(6);
var leaf7 = branch3.addChild(7);

root1.DFSelect(function (value, depth) {
  return value % 2 === 1;
}) //=> [1, 5, 3, 7]

root1.DFSelect(function (value, depth) {
  return depth === 1;
}) //=> [2, 3]
 CODE TEMPLATE:
var Tree = function(value){
  this.value = value;
  this.children = [];
};
Tree.prototype.DFSelect = function(filter) {  
  //YOUR CODE HERE
  var results = [];
  return results;
};
Tree.prototype.addChild = function(child){
  if (!child || !(child instanceof Tree)){
    child = new Tree(child);
  }
  if(!this.isDescendant(child)){
    this.children.push(child);
    // this.children[this.children.length - 1].depth += 1;
  }else {
    throw new Error("That child is already a child of this tree");
  }
  // return the new child node for convenience
  return child;
};
Tree.prototype.isDescendant = function(child){
  if(this.children.indexOf(child) !== -1){
    // `child` is an immediate child of this tree
    return true;
  }else{
    for(var i = 0; i < this.children.length; i++){
      if(this.children[i].isDescendant(child)){
        // `child` is descendant of this tree
        return true;
      }
    }
    return false;
  }
};
Tree.prototype.removeChild = function(child){
  var index = this.children.indexOf(child);
  if(index !== -1){
    // remove the child
    this.children.splice(index,1);
  }else{
    throw new Error("That node is not an immediate child of this tree");
  }
};

2. Continue pair programming on D3

3. D3 presentations
Part of the sprint was also to present our graphs to the cohorts (29 and 32). We hard coded Smash Melee stats into an array of objects and made a transitioning graph out of it. This took most of our time-- Daniel told me he made his graph in 10 minutes (questionable????). His data set was on the number of the unemployed throughout the years, which was downloaded as a json file.

1.26.16

W3D1: It's getting to me


var dying = function (){
   console.log("I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying I'm dying");
}
for(var i=0; i<9999999; i++){
   dying();
}

What we did today:
1. Self Assessment 
Particularly hard one. A lot of people didn't have enough time to finish. I completely forgot to put the "this.call" line when trying to instantiate a pseudoclassical subclass from a functional class. 

var Parent = function(){
//blahblahblah
};
var Child = function(param){
//I forgot this line!
//Parent.call(this, param);
};
Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child;

2. Lecture on D3
From the official D3.js site -- D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS.
D3 is basically a js library which you can use to make pretty, interactive graphs and visuals.

3. Pair programming on D3

1.26.16

Week 2 overview


What a week.

I'm starting to get used to the life that is Makersquare. Everything's becoming more streamlined -- my body is starting to adapt to the rigorous MKS schedule. My mind has fully switched gears to thinking in code. Talking in code is an everyday occurance now and jokes related to coding come out of my mouth without me even realizing it. It's slowly sinking in that coding is a part of my life now.                                                                                                                                      
Another thing slowly sinking into me is this feeling of undeservingness, the feeling that my cohortmates are smarter, cooler, and better than me. Looking around I see so much talent, so many likable personalities and I start doubting myself -- will I be able to make it? There must be so many other people in the world that could take my place -- do I deserve to be here? Four of my cohortmates that are around my age are married -- and I'm just sitting here on a Sunday playing vidyagaemz. As imposter syndrome slowly starts to grip me, and I need to constantly check and remind myself that I am here because I'm passionate about this. It's not about if I deserve it or not, it's about working hard to earn it.


My Sundays are now spent snuggled up in bed the whole day, trying to recover from the bar the previous night and the week leading up to that Sunday. I gently caress my introvertedness, telling it it's okay -- I totally understand why being away from people gives me the security and energy to keep at it the next day. I tell it -- don't strain yourself -- I need you to keep up for the next 11 weeks.

#SaturdayReport:

//I've decided not to make a separate post for Saturdays but rather put a few lines in my Friday post if anything interesting happens on Saturday.

I woke up at 7:30 and was freaking out because I was going to be late. I parked my car at 8:20 and hurried to the ROC only to remember on the way that class starts at 9:00 instead of 8:00. Where is my mind?

Saturday's Toy Problem:


Common Characters


Write a function that accepts two strings as arguments, and returns only the characters that are common to both strings.
Your function should return the common characters in the same order that they appear in the first argument. Do not return duplicate characters and ignore whitespace in your returned string.
Example: commonCharacters('acexivou', 'aegihobu')
Returns: 'aeiou'

W2D5: Where is my mind?



Conversation in the car this morning:
R: you should try getting off [the 10-W] on Lincoln, it's closer to the ROC.
Me: oh shoot! Is that your parking search algorithm?
R: -lol- yea, your time complexity is going to be a lot better. Lincoln also has free parking and you can snake around down so you don't overlap streets.
Me: -lol- do you have a for loop for that?
R: nah, I used recursion
Me: what's the base case?
R: if found parking, call function park and walk to ROC.
Just hit me how the Silicon Valley series becomes more and more relevant as I dive deeper into the tech world

I bought dinner for Justin today for helping me out when my car was towed. He's a cool guy!

What we did today:
1. Toy Problem: get these scrubby problems outta here!

nthFibonacci

Suppose a newly-born pair of iguanas, one male, one female, are put in a large aquarium.
Iguanas are able to mate at the age of one month so that at the end of its second month a female can produce another pair of iguanas.
Suppose that our iguanas never die and that the female always produces one new pair (one male, one female) every month from the second month on.
How many pairs of iguanas will there be after n months?
For example, the iguana pair size for months zero through five are:
0 1 1 2 3 5
If n were 4, your function should return 3; for 5, it should return 5.

2. Reflect & Feedback session

3. Lecture on chatterbox client

4. Townhall

4. Video lecture on Browser security model

5. Pair programming on chatterbox client
I really liked this sprint because it applies to "real life". By making a chatbox client, we got to learn how information is passed from client to server and back. We discussed URLs, APIs, ajax, http, REST, Postman, and how they contribute to getting websites onto our computer screens. We also got a taste on how to protect our computers with escaping from malicious injections of code.


Gives me good insight on what goes on under the hood on this thing called the internet1.22.16

W2D4: Tender Greens

I've been leaving at 8:00pm sharp (which is the official end time) pretty much everyday due to exhaustion, but I've started to think about how this would look to our fellows/instructors. Me and Richard discussed and decided we should stay longer some days, and attend any events that happen after-hours.

I know this isn't Yelp but I'm going to talk about Tender Greens. I've avoided eating from any restaurants with the word "green" in it -- although green is my fav color -- since superstitious me would relate that to "vegan", "vegetarian", or "blasphemy". Per usual, superstitious me was wrong. 


There are many options you can choose from for your plate, sandwich, or salad. I ended up getting steak with sides of mashed taters and salad. DANG that was good. The mashed potatoes were soft as clouds, almost felt like whipped cream. The steak was juicy, marinated to perfection, and not chewy at all. It's hard to put healthy and delicious together, but TenderGreens -- you did it. I approve.
The only downside is it's expensive, but I guess it's expected in Santa Monica

What we did today:
1. Toy Problem: EZ PZ

Is Subset Of

Make an array method that can return whether or not a context array is a subset of an input array. To simplify the problem, you can assume that both arrays will contain only strings.

Here are some tests it should pass:
  it('should return true if all of the elements in the first array are in the second', function(){
    var result = ['cat', 'dog', 'cow'].isSubsetOf(['dog', 'cow', 'fox', 'cat']);
    result.should.equal(true);
  });

  it('should return false if not all of the elements in the first array are in the second', function(){
    var result = ['cat', 'dog', 'cow'].isSubsetOf(['dog', 'cow', 'fox']);
    result.should.equal(false);

2. Continue pair programming on N-queens:
We finished up our sprint in a jiffy, but in the process encountered a problem in the code that had us thinking. This is our code:

function recurse(boardCopy, index){
counter = n - index;
if(counter === 0){
solutionCount++;
return;
}
for(var i=0; i<n; i++){
boardCopy.setPiece(index, i, 1);
if(boardCopy.hasColConflictAt(i) === false){
recurse(boardCopy, ???????);
}
boardCopy.setPiece(index, i, 0);
}

We wanted to increment index and then pass it into where the ?????? was. We passed in i++, only to find that the specs don't pass. We were sure that the rest of the code was correct, so we put a debugger everywhere and monitored the index variable..... the index did not increment with each recursive call!

We found out that i++ evaluates the expression first THEN increments the i. So, the recurse function would run before index would increment. Here is a StackOverflow explanation:
a=1;
b=1;
c=++a;//the value of a is incremented first and then assigned to c
d=b++;//the value of b is assigned to d first then incremented
On a side note, I gave up on trying to get my own version of code to work. My code was hard to keep track of because too many arguments were passed into my recursing function -- probably because I didn't use any of the helper functions provided :/

3. Townhall

1.21.16

W2D3: Homies


I started carpooling with a cohort member named Richard. He's over 30, but he looks like he's around my age. #lifeofanasian

He's a chill guy, we save a lot of gas, and we get to have some company on the drive to and back. Pretty sick.

So the past few days I've been complaining a lot about my introversion. Well, I've started dealing with my "condition" a little better. I've signed a treaty with my mind. Once I've accepted that I need to be away from people once in a while, I stopped worrying about what other people may think and continue doing my thang.


What we did today:
1. Toy problem -- A lot easier than yesterday's. I finished the problem before the hour ended.

Non-repeated Character

Given an arbitrary input string, return the first non-repeating character. For strings with all repeats, return 'sorry'

InputOutput
string:
"ABCDBIRDUP"
"A"
string:
"XXXXXXX"
"sorry"
string:
"ALAMABA"
"L"
string:
"BABA"
"sorry"

2. Lecture on N-Queens
N-Queens is a puzzle that involves an nxn chessboard and n number of queens. In any given nxn board, only n number of queens can be placed on the board so that none of the queens can eat each other. For example,

<- This is one possible configuration of a 4x4 N-Queens board. In this sprint, one of the things we have to do is to find the number of configurations on any given nxn board.

It seems like a boatload of recursion.





3. Pair programming on N-Queens sprint
I was paired with Daniel Kim -- a real Korean homie. Right off the bat I knew we were going to get along well. We were the first ones to finish implementing helper functions for the sprint.

At first impression Daniel seemed like a Korean gangster, with his baggy clothes and intimidating demeanor. When we got to the difficult part of the sprint (coming up with a recursion algorithm to solve the # of configurations of N-queens), we split up to have some time to think alone. I drew my algorithm on the whiteboard and went through all the call stacks to make sure my code was right.

I proudly went to share my code with Daniel, only to find him with most of the spec tests passed and already debugging through his code. What a BEAST. Not only that his code was concise and efficient, and I felt like I wasted all that time.


I was a little bit salty that my code didn't get any attention, but I agreed to go ahead and use his as it was admittedly much, much better.

4. Tap-out session
Kind of life group therapy sessions. We are assigned teams of 4-5 people that get together once in a while to hold hands and sing kumbaya. Honestly, I don't think it's a great use of time.

5. Town Hall

6. Video Lecture: HTML + CSS

1.20.16

W2D2: Toy Problem

We had our first toy problem today


For the rest of the 3months the first hour would be spent on solving toy problems. Here is ours today:

Rock Paper Permutation

Given a number of rounds n, return all the possible rock-paper-scissors play possibilities for that number of rounds.

I spent a good amount of thinking, trying to figure what the base case and edge case would be. Visualizing on the whiteboard organized my thoughts but I did not know how to approach this with code.

In the end I could not do it. The hour ended, but this problem plagued my mind. I was thinking it through during lunch and finally came up with an algorithm that works. Here it is in shitty pseudocode.
rps_array = [rock, paper, scissors];
result_array = []
recursion function(array){
    base-case: if array.length = rounds_num, push this array into result_array
    if not, iterate over rps_array to add each one to the array that was passed in, creating 3     new stacks.
    pass in each new array back into the recursion function
}
Each recursion stack would return an array of length 3, which in turn gets passed into another recursion stack. Basically a tree of threes. I was super happy about this achievement but turns out a good number of people finished the assignment during the first hour. Jeez, there are some smart people here.


What we did today:
1. Toy Problem

2. Continue pair programming on the subclass dance party sprint
We ended up creating a page that randomly produces a cat_dancer and a banana_dancer. Ours looked mediocre compared to others', me and my partner justified that this is due to our lack of experience with html and css. Whatever makes us feel better, right?

3. Town Hall

1.19.16