Always be committing

it's all about being a self sufficient learner
it's all about knowing how to work as a team
your coding skills mean jack if you can't be a team player

it's all about how much work you want to put into it.
contribute to the project. always learn new stuff. always be committing

MKS, you are one hell of a life experience

Jian Yang!


I was Jian Yang tonight. I had all these great ideas, but I couldn't pitch 'em. What use is that?


W7 Solo Week: Interlude

I don't know which came first -- the loneliness or the depression. Living on my own, away from my parents in Los Angeles has been great: drive 5 minutes down Western Avenue and I have access to all the good restaurants and soju bars of K-town. However the loneliness of being away from my close friends and family has been making me unbearably lonely, and what with all the stress from Makersquare and group projects, I've been struggling internally, with no one to vent or lean onto.

Per usual I turned to videogames to ease my mentality. I ended up binge gaming the recent weeks away, playing for hours and hours whenever I had the chance, only to regret it in the end.

I couldn't help but think about her during these timesShe, who said she'd be there for me for the rest of my life. She, who would be there to console me whenever I had a rough day. On one night I dreamed of her and how we got back together in some miraculous way. Happiness flooding through me as I found solace from loneliness, only to wake up with an empty feeling in my stomach and a bad taste in my mouth.

I need someone next to me. Sigh.....

What I did on solo week:
Our group decided to


W6D1 ~ 2: MVP projects

MVP = Minimum Viable Product


For our first project assignment we were to make a working full-stack (front-end and back-end) MVP using any technologies. The point of the project was to see how efficiently we can utilize whatever we've learned over the past five weeks and come up with a compelling product. The only catch was... we had only 2 days! 1.5days, in fact, since it took half a day for them to kick-start and inform us about the project.

We were told that developers are infamously bad at estimating how long a project would take. Instead of over-promising to our future employees and regretting it later, we should under-promise and leave enough of a time buffer for any kinds of obstacles on the way to completion -- because nothing else matters other than having a completed product by the deadline, according to a former project manager, Bobby.

Makersquare's idea of coming up with a viable project idea:
1. Come up with an idea that you think you can finish by the deadline
Cut that idea in half
Cut THAT in half
You have your viable project idea


We all scurried to think of an idea and start working on our assignments ASAP. I've always wanted to make an app that allows the users to make a personal recipe book online, a personal menu of sorts, to keep record of what they are able to make and show their dinner guests. I chose to use HTML, CSS and the Angular framework for the front-end, Node and Express for the back-end.

I went to work alone in one of the "secret" MKS rooms on the second floor. It was a nice change, not having to pair-program. I reveled in not being around any distractions of being around others, and I was able to get a lot done in that short amount of time.

One of the problems I had was figuring out how to pass factories into controllers.
HEREEE


I was not able to implement a user sign-in page nor deploy my app to the heroku server, but I got all of the MVP functionalities running by the end. My home page was the actual menu itself, with a listing of all the entries that the user has added. The "Add entries" button in the navbar directed the users to a form with the fields of: entry name, picture (I was almost done implementing the picture upload functionality, but time ran out), meal type (drop down list of "appetizers", "breakfast/brunch", "desserts", "entree", "lunch", and "snacks"), country of origin, description, ingredients, and directions. Users were able to add more ingredients and directions as they wanted. Clicking on a individual entry in the menu directed users to another page with all the details of the menu entry, including directions, ingredients, and picture. In the last hour I hurriedly included a CDN (content-delivery-network) of bootstrap (a framework that makes styling easy) and a picture of a chef hat in my main HTML page in a last-ditch effort to make my barebone app look somewhat decent.

W5D5: ....

What we did today:
1. Toy Problem

Longest Run

Write a function that, given a string, finds the longest run of identical characters and returns an array containing the start and end indices of that run.
If there are two runs of equal length, return the first one. Return [0,0] for no runs.

Examples

InputOutput
string:
"abbbcc"
[ 1, 3 ]

2. Lecture: Intro. to Deployment
Deployment = My app running on a remote computer. Essentially, letting our app be available for others to use on their browser.

3. Pair Programming on Deployment

W5D4: Feet

You made a new friend named Michael. Michael has a bad habit of grabbing is crotch every ~15 minutes. You don't judge, so you try to ignore whenever Michael reaches down for the goodies. But  it gets embarrassing when Michael does his weird behavior in public. You're not sure if he realizes what he's doing because you've never brought up the topic before. What would you do?

Well, there's this guy in my cohort and he has a problem: his feet smell dank -- and I don't mean dank like they smells good, but dank as in they smell really, really bad. To make his matters worse, he wears the same sandals every single day so that the stank can resonate to full effect, and get worse by the day.

He was my second pair programming partner and I noticed it immediately. As I saw him raise his foot to rest on his lap this was my reaction:


We're almost halfway through the program and I still see him wearing those god-awful sandals. Every time I walked by him or pair-programmed near his vicinity that familiar odor of feet wafted into my nose. I wondered if he knew his feet smelled and why nobody has told him yet, considering how strong the smell was-- I'm sure many cohortmates have noticed.

I felt bad for the guy. The guy always ate meals and hung out alone. We would talk about video games from time to time. He's a pretty nice guy -- just very awkward. I thought it was time someone stepped up to do the dirty work.

After contemplating for hours planning out what to say, I asked him if he wanted to have a talk privately, to which he agreed. We stepped out to the patio, I took a big breath and turned to him.

"Hey [name], what I'm about to tell you is very personal, and for your personal and professional development I would suggest you take care of your personal hygiene more"
With a blank face he gaped and it took him a while to respond

Him: "Oh..... uhh,.. hm, what -- which part specifically?"
I was so relieved that he said this as I grabbed the opportunity to get to the point:
"It's your feet, dude, they smell really bad. Maybe you could wear some shoes?"



An awkward silence fell before us but he was quick to recover. He told me he didn't know about the smell and would take care of it. I told him how I started to feel bad that noone told him yet, and he expressed his thanks to me for being so honest.

It felt good, knowing that I helped someone out. While the embarrassment was short-lived, the benefit of this exchange will (hopefully) help him in the long-run. I like to believe that what needs to happen, has to happen... eventually-- and since nobody was addressing the problem, I sacrificed myself for the good of everyone's olfactory senses.


What we did today:

1. Toy Problem


Async Map

asyncMap has two parameters, an array of asynchronous functions (tasks) and a callback.
Each of the tasks takes a separate callback and invokes that callback when complete.
The callback passed to asyncMap is then performed on the results of the callbacks of the tasks.
The order of these results should be the same as the order of the tasks.
It is important to note that this is not the order in which the tasks return,
but the order in which they are passed to asyncMap.
Once all the callbacks of the tasks are returned, asyncMap should invoke the callback
on the results array.
Example:
asyncMap([
  function(cb){
    setTimeout(function(){
      cb('one');
    }, 200);
  },
  function(cb){
    setTimeout(function(){
      cb('two');
    }, 100);
  }
 ],
  function(results){
    // the results array will equal ['one','two'] even though
    // the second function had a shorter timeout.
    console.log(results); // ['one', 'two']
 });

2. Townhall

3. Pair Programming on Angular
This is one of the few sprints in which my pair and I were not on the same page, but in this one in particular, we were on two completely different books. I didn't understand any of the ideas he was suggesting, nor did I agree with any of the changes he was making to the code. It's times like these when I really want to flip the desk and just do the sprint myself.


Here are some important concepts of Angular that I took away:
--Controllers = Where we store logic for the views
var app = angular.module('myApp', []);app.controller('myCtrl', function($scope) {    $scope.firstName = "John";    $scope.lastName = "Doe";});
--Factories = Provides properties/methods for the controller to use

var app = angular.module('myApp', []);
 
app.factory('testFactory', function(){
    return {
        sayHello: function(text){
            return "Factory says \"Hello " + text + "\"";
        },
        sayGoodbye: function(text){
            return "Factory says \"Goodbye " + text + "\"";
        }
    }            
});
--Scope = A special javscript object that joins the model with the views. Denoted by the $scope variable

--Directives =  extended HTML attributes with the prefix -ng. Has many roles, such as:
  • define a bunch of HTML (i.e., a template) to replace the directive
  • bind events to this element (or its children)
  • add/remove a class
  • change the text() value
  • watch for changes to attributes defined in the same element (actually it is the attributes' values that are watched -- these are scope properties, hence the directive watches the "model" for changes)
  • etc.



W5D3: setInterval(console.log('copy on top of a'), 3600000);

How I feel everyday on the I-10

Go fetch a stencil to shape my twenty-four
everyday the sun rises from the east and sets on the west, 
just as how I wake up for the daily races
and fall asleep only to start all over again

Everyday passes how we expect it to pass
The lack of miracles is making me numb
The reason why the first week went so slowly
is probably because our expectations didn't align with reality


But I'm glad I found something I love
something I would sit everyday in traffic for
With coding, everyday is different
The excitement of solving different algorithms or learning new things
is what keeps me going through this mess

What we did today:

1. Toy Problem

Balanced Parenthesis

Given a string, return true if it contains balanced parenthesis ().

Examples

InputOutput
string:
"(x + y) - (4)"
true
string:
"(((10 ) ()) ((?)(:)))"
true
string:
"(50)("
false
string:
""
true

2. Lecture: Intro. to Angular
AngularJS is a structural framework, created by Google, for dynamic web apps. It brings Javascript and CSS to HTML to extend HTML's syntax and provide a slew of useful applications. I already like it better than Backbone.

How Angular is different from Backbone:
-- Less code required
-- No dependencies to get started
-- Very opinionated, meaning there are many different ways to do things
-- MV-Whatever, rather than MVC
-- Automatically synchronizes data between models and views
-- Whereas Backbone and React uses
--

3. Pair Programming on Angular
Deja vu? I was right in the prediction that I can't get too complacent after completing hell week -- because hell continues. For hours me and my pair sat there looking pretty dumb


For this sprint we were to do the same thing as the last, except with Angular and without all the authentication functionalities. We had a lot of trouble trying to visualize how the links are being stored, and how we were to grab those links from storage to show on the views. We ended up writing less than 30 lines of code until we got frustrated and called for help.

4. Townhall

W5D2: Salvation, then to the orthodontist

I am so glad hell week is over, but I can't get too complacent. Hopefully the rest of the week runs as smoothly as this sprint did.

My orthodontist appointment today was at 6:15pm (couldn't have picked a better time, you idiot). Google Maps predicted that my trip would take 2 to 3 hours if I left at 4pm, so I gave myself another hour and left at 3pm. The trip still took 2 hours. After much poking, twisting, pulling and laser beaming, I came out of the orthodontist with a fresh one of these



Brushing my teeth today -- just felt like I was grinding my toothbrush across, what feels like, two bricks that are my teeth. What the hell did I sign up for? 3. Whole. Years. With metal latched on to my teeth.

MY TEETH FEEL LIKE LEAD AND I CAN'T EAT YUMMY STUFF


What we did today:
1. Toy Problem

Range Class

  • Build a class to represent a range of numbers that has:
    1. a beginning index
    2. an end index (optional). If there is no end index, the range should include only the passed-in start value.
    3. a ‘step’ (optional)
  • The step is the interval at which elements are included. For instance, a step of 1 includes every element in the range, while a step of 2 includes every other element.
  • You should allow a negative value for ‘step’ to count backwards. If no step is provided and the start is more than the end, assume we’re counting backwards.
  • The range should have a constructor that accepts these arguments in this order:
    1. begining index
    2. end index
    3. step interval
  • It should also support the following utility functions:
    1. size(): return the number of items represented by the range
    2. each(callback(index)): iterate over the range, passing each value to a callback function
    3. includes(index): return whether or not the range includes the passed value
  • You should also be aware of the following caveats:
    1. Should return null if we are given no ‘start’ value.
    2. Range should use constant space, even during the each() method, * i.e. you shouldnot use an array as backing storage.
USAGE EXAMPLES:
 var myRange = new Range(0,10); // a new range representing the numbers between 0 and 10 (inclusively)

 var evenNumbers = new Range(2,8,2); // A range with the even numbers 2, 4, 6, and 8.

 evenNumbers.each(function(val){ console.log(val+'!'); }); //Prints '2! 4! 6! 8!'

 evenNumbers.size() //4

 evenNumbers.includes(2) //True

 evenNumbers.include(3) //False
2. Continue pair programming on Shortly Express
I feel pretty bad for leaving early on my sprint partner. On the up-side, no more orthodontics appointments for the rest of the bootcamp!

3. Townhall (I left for the orthodontist before this)

4. Tapout

W5D1: I know Javascript



I've entered the matrix. The more I learn, the more I see things in code. I can see why Richie (friend who directed me towards this path) told me programmers feel like god. It's just a whole new world, mapped out in binary.




As I queued up for a League of Legends game, I started asking myself, "Damn, how many get and post requests are we going through to connect to this game? Just how big does the Riot (the company that made LoL) servers have to be that it hosts millions of players,  all without any significant lag?"

The more I learn at Makersquare, the more I can visualize the big picture of how technology runs this world, but at the same time, more and more questions start popping up in my head about the inner workings of tech.


I must know more! I must learn more.



What we did today:
1. Self Assessment
I don't feel too good about this one, but seeing as how hectic last week was, I feel justified

2. Lecture on Intro. to Express.js

3. Pair programming on Express
Know about bitly? It's a website that allows you to type in a URL and shortens that URL for you. We were given a partially finished, full-stack repository to work with. Using Node.js' framework called Express, our goal was to implement an authentication system and other features that will enable users to have their own private set of shortened URLs.



This sprint is very important to web development. Most sites these days require you to sign up to make an account. Naturally, authentication becomes important in protecting our users and their information.

Important takeaways for this sprint:
 -- Bcrypt is a key derivation function that takes a password, does a whole bunch of stuff to it to make it into a long hash string, which is stored inside our databases. This is important because, in the case that a hacker gets a hold of our databases, the passwords will be safe because it's indistinguishable from the actual password.
When a user logs back in, the inputted password goes through the same key derivation function, is compared to the hash in our database, and logs the user in if the two match.

 -- Sessions are used to keep users logged-in for a period of time, and not require our users to tediously log-in over and over again. This is why even though you close your Facebook tab, you are still logged in when you open FB back up again.

4. Town hall

2.8.16

Week 4 overview

This week? Yea, this week sucked. With each of the sprints this week, Makersquare threw us into a pit of fire, with no directions on how to get out. Each day I left the bookcamp feeling more clueless than the previous day. I'm going to need to go back and review backbone, node, and server side during the solo week. I hereby dub week 4 as the "hell week," and I look forward to seeing the upcoming juniors struggle on their's.


On a positive note, time seemed to have fast forwarded itself. The week went by in an instant, and my body has fully adapted to the MKS life schedule and 6 hours of sleep a day.

This week also marks the time when I picked back up an old hobby: Starcraft. If you haven't already noticed, I'm a huge gamer, and Starcraft: Brood War was the first game that I played competitively. For those who don't know, Starcraft is a real-time-strategy game that involves futuristic war between three of the most dominant races, Protoss (peace-seeking aliens), Zerg (the nasty monsters), and the Terran (the technological humans).


A Korean that plays Starcraft?? Nope, never heard of it.



I started playing again because I realized how good of a job Blizzard is doing to improve Starcraft 2's gameplay in the newest expansion, Legacy of the Void. The game has gotten a lot faster, more skill based, and more potential for hype. The expansion's predecessors, Wings of Liberty and the Heart of the Swarm, had a game design that encouraged players to turtle up in their bases, reach the max number of units, and in the end just hope your big army ball wins over the opponent's. This provided for a metagame that was stale and boring, and I quit Starcraft for good before the second expansion came out.


Legacy of the Void. It's amazing! Constant action, a lot of possibilities for micro, and the massive UI updates are what brought me back to my old habits. Feels like college all over again

#Saturday Report:

After a stressful week such as this one, I had to be inebriated. A few cohortmates took me to an American bar/club, where I awkwardly walked around without initiating talks with the females... I've been out of the game for a long time.

The music was loud, people were doing slutty things, and it just wasn't my scene. I thought... "I could be playing Starcraft right now." I took a Lyft back home and did just that.

Please help. I definitely need some advice on the science of interacting with women.

Saturday's Toy Problem:

Binary Search Array

Given a sorted array of integers, find the index of a target value using a binary search algorithm
Do NOT use Array.prototype.indexOf in your solution. What would be the fun in that?

Parameters:

array (required) - an array.

target (required) - an integer value..

W4D5: GET OUT OF MY HEAD CHARLES


A lot of my cohortmates have also noticed -- the 2 day, down, then up sprint trend.

Surely Makersquare didn't expect us to finish these ridiculous sprints without any guidance, with only the less-than-helpful videos to direct us? Surely all this is all part of their plan?

The mindgames are #real
What are you doing MKS? Why you do this?
ARE THEY DOING THIS JUST TO TORTURE US


No, Hyungki, no.

There MUST be a reason for this.

They are doing this to prepare you for the real world. We're going through a ton of these stressful  situations in the form of sprints. If we are faced with similar situations on the job, in which no one knows what the hell to do, we can take the reign because we've got this. MKS prepared us for this.

Or... it could just be MKS trolling us, and I'm just convincing myself otherwise.


What we did today:
1. Toy Problem

Tree Breadth-First Select

Implement a breadth-first method on a tree class.
BFSelect accepts a filter function, calls that function on each of the nodes in Breadth-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.BFSelect(function (value, depth) {
  return value % 2;
}) //=> [1, 3, 5, 7]

root1.BFSelect(function (value, depth) {
  return depth === 1;
}) //=> [2, 3]
CODE TEMPLATE:
var Tree = function(value){
this.value = value;
this.children = [];
};

Tree.prototype.BFSelect = function(filter) {
var firstTime = true;
var results = [];
//Your code here

var recurse = function(node_list, depth){
if(firstTime){
firstTime = false;
if(filter(node_list.value, depth)){
results.push(node_list.value);
}
if(node_list.children){
recurse(node_list.children, depth+1);
}
}


else{
var store = [];
for(var i=0; i<node_list.length; i++){
if(filter(node_list[i].value, depth)){
results.push(node_list[i].value);
}
if(node_list[i].children){
store = store.concat(node_list[i].children);
}




}
if(store.length >0){
recurse(store, depth+1)
}
}


}


recurse(this, 0);
return results;
};

/**
* You shouldn't need to change anything below here, but feel free to look.
*/



/**
* add an immediate child
* (wrap values in Tree nodes if they're not already)
*/
Tree.prototype.addChild = function(child){
if (!child || !(child instanceof Tree)){
child = new Tree(child);
}

if(!this.isDescendant(child)){
this.children.push(child);
}else {
throw new Error('That child is already a child of this tree');
}
// return the new child node for convenience
return child;
};

/**
* check to see if the provided tree is already a child of this
* tree __or any of its sub trees__
*/
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;
}
};

/**
* remove an immediate child
*/
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');
}
};


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.BFSelect(function (value, depth) {
return value % 2;

})
2. Reflective feedback session
I don't complain easily -- so it bothers me that with every feedback session, the volume of complaints are increasing. Most of these are legitimate complaints, but some of them are straight up baby howlings. I cringe a little inside as they go on about how their life sucks because of x and y.

One of the things I will back them up on though, are the complaints about the video lectures. The video lectures, for lack of a better word, are ass. Most of them are recordings of lectures from Hack Reactor, and they are long and stale. A good portion of each video is spent answering questions from the students, which, a lot of the times, is boring and useless information. But dang, my cohortmates were HOUNDING on the video lectures like savages... they really don't like the video lectures!

MKS, pls.

3. Lecture on Databases

3. Pair Programming on SQL + Dabases
Sprint Description: Store data persistently using the languages provided by database packages, including both traditional relational model and more recent non-relational technologies. You'll also learn to build your own ORM, a technique for shortening the gap between in-memory programs and the Database interface.

W4D4: Off-day


(literally) SIIIIIIIICK food poisoning/stomach flu. Woke up this morning to explosive diarrhea and a bit of yakking. Richard had left after waiting for me for a bit, and I promised to make his lunch for tomorrow for the inconvenience

On the plus side I got to take the day off! I spent the day catching up on my blog, reviewing what we've learned, and playing a bit lot of Starcraft.
Not good... I think I'm starting to get hooked -- ahhh, just like the good old days



What we were SUPPOSED to do today:
1. Toy Problem

Compose, Pipe


Implement the functions compose and pipe`.

Compose

Compose should return a function that is the composition of a list of functions of arbitrary length. Each function is called on the return value of the function that follows.
You can think of compose as moving right to left through its arguments.

Example

var greet = function(name){ return 'hi: ' + name;}
var exclaim = function(statement) { return statement.toUpperCase() + '!';}

var welcome = compose(greet, exclaim);
welcome('phillip'); //=> 'hi: PHILLIP!'

Pipe:

Pipe composes a series of functions and returns the resulting function. Each function is called on the return value of the preceding function.
You can think of pipe as moving left to right through its arguments.

Example

var add2 = function(number){ return number + 2; }
var multiplyBy3 = function(number){ return number * 3; }

pipe(add2, multiplyBy3)(5) //=> 21
pipe(add2, multiplyBy3, multiplyBy3)(5) //=> 63
HINT: You should use the functions reduce() and reduceRight() in your solutions.

2. Continue pair programming on Web Historian

3. Townhall

W4D3: Code-gay


Looking back at all the long lines of ugly code I wrote, I'm starting to see what "beautiful" code looks like. I can't help but to admire code written by the more experienced members of our cohort. It blows my mind how many different ways code can be written, and how elegant it can look.

One thing I've realized is that, no matter what the syntax and style of the code, conciseness and organization are two of the biggest factors that make good code, good. No one wants to sit there for hours reading line after line of code! We have to use things like modularity -- A module encapsulates related code into a single unit of code-- and recursion to keep our code short and easy to understand

.... just realized lower time-complexity is a factor too! The amount of memory the computer has to expend to run your code is very important.

Making good code is hard, and I am code-gay for all your good lookin' codes
I'm going to learn to clean the ugly off my code so I can make aspiring programmers like me code-gay for my beautiful code


What we did today:
1. Toy Problem

Function Bind


Implement the function ‘bind’, which accepts a function and a context as arguments. The context argument should override an existing context that the function is defined in. Your bind function should return the passed in function.
For example, if we have the following object:
var alice = {
  name: 'alice',
  shout: function () {
    alert('here comes' + ' ' + this.name);
  }
};

alice.shout() //=> 'here comes alice'
If you use your bind function with the context { name: 'bob' }, as is shown here:
boundShout = bind(alice.shout, { name: 'bob' })
Then calling boundShout() will alert 'here comes bob'
The following example should also work in the following way once your function is implemented:
var func = function(a, b){ return a + b };
var boundFunc = bind(func, null, 'diet');

boundFunc('coke'); //=> 'dietcoke'
Once you have finished that, implement the function ‘bind’ as a method of the Function.prototype object. This will be similar to your first solution, but should be able to be used in the following way:
var alice = {
  name: 'alice',
  shout: function () {
    alert(this.name);
  }
};

var boundShout = alice.shout.bind(alice);
boundShout(); // alerts 'alice'

boundShout = alice.shout.bind({ name: 'bob' });
boundShout(); // alerts 'bob'
DO NOT use the native bind() function in your solutions. You may use the functions call() and apply().

2. Lecture: Server side concepts

3. Video lecture: Data storage techniques

4. Pair programming on Web Historian sprint
In this sprint we were to create multiple Node services, relying on command-line server processes like Cron (a time-based background job scheduler used to schedule operating system jobs to run at fixed times) to build a duplicate of the archive.org internet archiving. Shown below is an example of what we have to make.
  • A user types in a URL
  • We check our storage if the archive for that URL exists
    • If it does, we return that archive (a snapshot of the page when it was taken)
    • If the page is not done loading, direct them to the "loading" page
    • If it doesn't, we download a snapshot of that URL page and store it in our archives
  • Write a script that will update the snapshots in our archives every minute (using CRON)




5. Townhall

02.03.16

W4D2: Harder, Faster, Stronger


Intensity: FULLY BLOWN. They're starting to dial up the difficulties of the toy problems, sprints, and self-assessments. Honestly, I've been clueless for the past few sprints. Starting from the backbone sprint I've been having a lot of trouble trying to figure out what's going on -- a good portion of the first day of each sprint was spent staring at the screen, with minimal movement in my fingers, trying to grasp the big picture of what is going on inside the files. Needless to say, it was frustrating.


As previously mentioned, I've been noticing the trend of the sprints (day 1 = despair, day 2 = relief), I I mentally prepared for this and did a better job managing my emotions during day one.

On a good note, I finally got the island count toy problem to pass! I started over on my code 3 times and took a total of 3 days to figure out this problem, I first tried to solve the problem using two for-loops, but in the end implemented the recursion algorithm that a lot of my cohortmates used. From this, I learned not to be too stubborn, especially when solving algorithm, else I'd be wasting a lot of time like I did with this particular toy problem. Learning new things everyday!



For this sprint, we were to go back to our chatterbox client and replace the remote server (which is set up through parse API) to our custom back-end server. Instead of trying to explain in my words what node.js is all about, I think it'd be better if I listed some of the important takeaways for this sprint.. because I'm still not understand a lot of server-side.


  1. Node is a library that allows you to run Javascript-written apps outside of the browser, typically in the command line
  2. Data is just a bunch of text that is transferred from/to server and client through the form of packages
  3. Since node runs locally on your computer, this means we have to install our dependencies (like underscore, jquery) directly onto our master folder through npm, a JS package manager run through the command line.
  4. Modularity and readability is maintained through exports and requires - explain more about this tomorrow!


What we did today:
1. Toy problem

Power Set

Return an array that contains the power set of a given string. The power set is a set of all the possible subsets, including the empty set.
Make sure your code does the following:
  1. All characters in a subset should be sorted alphabetically, and the array of subsets should be sorted alphabetically.
  2. Sets of the same characters are considered duplicates regardless of order and count only once, e.g. ‘ab’ and ‘ba’ are the same.
  3. Duplicate characters in strings should be ignored; for example, ‘obama’ should be evaluated as if it only contained one ‘a’. See the result below.

Examples

InputOutput
string:
"a"
[ "", "a" ]
string:
"ab"
[ "", "a", "ab", "b" ]
string:
"horse"
[ "", "e", "eh", "eho", "ehor", "ehors", "ehos", "ehr", "ehrs", "ehs", "eo", "eor", "eors", "eos", "er", "ers", "es", "h", "ho", "hor", "hors", "hos", "hr", "hrs", "hs", "o", "or", "ors", "os", "r", "rs", "s" ]
2. Continue pair programming on the node.js sprint

3. Townhall

02,02.16

W4D1: Mondays



On a Monday
They had to give us this dang sprint
It is better than the backbone sprint, they said. It will be fun!, they said




Mental note on the things I did not understand today:
1. How information is passed in a GET or POST request
2. How API works
3. How servers work
4. REST

Another night on which I leave feeling very defeated. I miss the days when I would leave the ROC accomplished and feeling good about myself. Dear lawd have mercy. I will tell you about node.js tomorrow. For now, I sleep.


What we did today:
1. Self Assessment

2. Lecture: Intro to Node.js

3. Video lecture on event loops and Async code

4. Pair programming on Node.js

Sprint Description: Build a custom back-end in Node to replace the Parse API in your chat client application. You will learn about CommonJS, routing, and how to debug server-side code.

I paired with the one of two girls in our cohort! YAY, except I chose one of the hardest sprints to do with her. I'm so sorry Monica

5. Town hall
I'm thinking of making an index for all the insider terms I've been using. I make sure to define the terms in my previous entries, so go read ALL my schtuff heh heh

02.01.16

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