Friday, June 19, 2015

Finally starting to understand MVC

This node.js MEAN stack tutorial just might have been the best web development tutorial I've gone through:

I've gone through the django polls one as well as part of an RoR tutorial, but either those weren't as clear or (more likely) I was too dumb and needed it see it explained several times in different ways, this MEAN stack tutorial made a lot of sense.

On the server side:

  • Model (*.model.js) = the database
  • Controller (*controller.js) = has all the CRUD calls (create, retrieve, update, delete...)
  • View? (*routes.js) = handles the REST calls from the client (web browser) and calls the appropriate functions in controller.js

Admittedly, I have no idea where the V(view) is supposed to be. I guess that's the routes.js? And I also don't know why the whole thing works javascript wise (e.g. the functions are written very smartly, in a way I'm not used to writing them). Guess I still have no idea what's going on :(

And the difference between REST and CRUD is explained very well here:

Tuesday, June 9, 2015

You never know

Wasn't sure if I locked the car door today when I got to my desk. So I got up and walked back to the parking lot. As I was approaching it,

Monday, June 8, 2015

When to Give Up

Caught up with a friend of mine who was in a similar life-situation, but a little more motivated.
The life situation of "how the fuck do you live life".

He provided me the following thought experiment about when to give up on something you believe is right:

If you were teaching your child how to walk, and at first he doesn't get it, do you give up?

Startups aren't exactly the same, but it was a good analogy.

Thursday, June 4, 2015

First time to Europe - Cheap but cool, poor but sexy

I went to Europe for the first time a few weeks ago.

  • Total trip duration was 15 days, with 13 full days in Europe.
  • 6 countries (6 cities: London, Paris, Prague, Berlin, Coppenhagen, Stockholm)
  • Total expenditure was around $2800 (including everything - e.g. airfare, food, hostel, trains, cash withdrawals, bars, strip clubs, concerts, getting scammed/conned by street artist for 75 euros, etc.)
  • During this time (May 2015), the Euro was about 1.12 to 1 USD (close to record low)
  • May's the best time because it's not too hot, not too cold, not too touristy, and still has super long days (sunrise at 5am and sunset at 920pm)
  • Purchases prior to flying out to Europe:
    • Flights to Europe and back - bought about 1 month before trip
    • Eurostar train ticket fm London to Paris - bought about 1 week before train ride
    • Flight from Paris to Prague - bought about 2 wks before the flight
    • First night's hostel stay - bought 2 days before trip
  • Trip planning: I used Trip Advisor heavily. It's nice because each city from Trip Advisor has its own offline map and reviews. So no need for internet. For the week before my trip, every day's poop-break was spent on that app starring places I wanted to see. (Basically I'd try to hit up the top 5 rated attractions in each city). Also, I tried to take as many over night trains as possible. I traveled with a good friend that had similar traveling qualities: laid back, frugal but down to spend money and have fun, willing to split up to see our own stuff

The itinerary looked like this (with description of that day's main activity or expenditure):
  • May 7th, day 1, Thursday - Leave Los Angeles at 7pm
  • May 8th, day 2, Friday - Land at London Gatwick at 1pm
    • Pie and mash meal
    • National Gallery (free!)
  • May 9th, day 3, Saturday - London, then 2.5 hr Eurostar ride to Paris (get to Paris around 930pm)
    • Walking tour of all the touristy stuff
    • British museum (free!) - saw the mummies and left
    • Got to Paris, checked into Hostel, then immediately went to Moulin Rouge area for strip clubs for some reason. (About $120 gone in the span of 10minutes. Paris strippers are ruthless). First time I went to a strip club :( 
  • May 10th, day 4, Sunday - Paris
    • Versailles tickets (about $15)
    • Walk up the Eiffel tower so we didn't have to wait in line
  • May 11th, day 5, Monday - Paris
    • Llouve tickets (about $15)
    • Bike around the huge ass traffic circle around Arc De Triomphe 3 times
    • Underground jazz club in a cave (this was amazing, made me want to practice guitar more)
  • May 12th, day 6, Tuesday - Paris, then flight to Prague
    • Sacre de Coeur (my favorite momnument in Paris. Free to enter)
      • Got text-book conned by street artist for 75 euros via shell game, right outside the amazing church because I'm a dumbass (Literally text-book with Foundation work, approach, build up, etc)
    • Picnic at Eiffel tower
    • Got to Prague at night. National hockey going on. We went to a bar that turned out to be a free strip-club.
  • May 13th, day 8, Wednesday - Prague
    • Great walking tour
    • Then strip club.
  • May 14th, day 9, Thursday - Prague
    • Lunch at a Michilin Restaurant
    • Rent bikes to bike up a hill to see the Europe's largest bronze equestrian statue
    • Parnas ensemble concert (5 strings) at the Rudolfinum (Great concert, but kind of a way to get money out of tourists.) 
    • Regular clubbing till 5am, no sleep, no hostel (wasted too much money on strippers)
  • May 15th, day 10, Friday - Leave Prague for Berlin
    • Train to Dresden at sunrise, rent a car, then drive past Berlin to Sauchsenhasen concentration camp
    • Drive back to Berlin and get ramen and curry wurst (in the rented car, of course)
  • May 16th, day 10, Saturday - Berlin
    • Holocaust museum
  • May 17th, day 11, Sunday - Berlin, then night train to Malmo Sweden (train went to the north edge of Germany, then was put on ship, and went to Sweden)
    • Walking tour
  • May 18th, day 12, Monday - Wake up in Malmo, Sweden, take train to Copenhagen, do Copenhagen for 8hrs, then go back to Malmo and take overnight train to Stockholm
  • May 19th, day 13, Tuesday - Stockholm (arrived at 7am)
    • Walking tour of Sodermalm neighborhood
    • Nobel Laureate's museum cuz it was free after a certain hour (and totally worthless to go to)
    • Jazz club (this one sucked ass)
  • May 20th, day 14, Wednesday - Stockholm
    • Vasameet ship museum
    • Took a ferry to the archipelagos (checked out Grinda island)
    • Clubbing till 5am (shouldn't have gotten a hostel)
  • May 21st, day 15, Thursday - Fly home at 10am

Details Below:
  • May 7th, day 1, Thursday - Leave Los Angeles at 7pm after full day of work
    • Fly Norwegian air to get in/out of Europe. They're the cheapest airline i found. Cheapest flights that I could find that fit my dates was: 
      • LAX to London Gatwick direct for $180 (including all taxes/fees). 
      • Stockholm Arlanda back to LAX for $323.77. I specifically wanted to leave on a Thursday.
      • I didn't care about what cities I went into or left from, because it was my first time in Europe (I'll take it!)
      • Those prices did not include meals nor check-in baggage (but why tf would you have check-in baggage for a 2 week vacation...)
    • This day was kinda ridic cuz I woke up at 2am on Thursday morning to do laundry (cuz I had none to pack). Then packed and went to work for 11hrs because I was super behind on work. But I like it that way because being on a plane being fully rested and NOT sleep deprived is stupid. I couldn't sleep on the plane much though cuz of the movies.

  • May 8th, day 2, Friday - Land at London Gatwick around 1pm
    • I went to my Hostel (London Generator). I'm super tired, hungry, and out of willpower (This made me sad because I had about 7hrs of daylight left, but not enough energy, so maybe I should've slept more. After I check in, I get food because I hadn't eaten in 36hrs due to being so cheap. (But I actually like fasting and not being mastered by my hunger, and I don't get to do it enough.) So my first meal is classic english food - pie and mash (I thought the pie was like a Marie Callendar's chicken pot pie, except it had meat inside, and mash was just mash potatoes).
    • The food gave me enough willpower to go to the National Gallery. I was lucky because it was Friday and the place closed at 9pm instead of 6pm. It's also at Trafalgar square, which is kind of like London's downtown. 
      • Distances from London to other cities are often calculated from Trafalgar square. (I know, who tf's Trafalgar right?)
    • Being a "gallery", everything at the National Gallery was paintings. But a lot of them. 
      • I walk around for 2 hrs and realize that I don't have a good appreciation of art. I don't understand why some paintings I thought looked like crap were famous, and others I liked were not.
        • On a side note, a lot of people were taking pics of like every other painting with their phones/cameras, which I thought was weird because if you wanted to see the painting in detail, you'd go home and google it. But then I started doing it too.
        • In order to increase my appreciation of art, I join a free guided tour. The first stop of the tour was on some painting of Jesus. There's a bench near-by and I sit down and proceed to knock out. When I wake up, the group had moved on, and therefore I move on and discover the following:
    • The National Gallery had 2 Leonardo Da Vinci pieces. One of which was in its own small room (I.e. this room had nothing except for this cartoon drawing: The Virgin and Child with St Anne and St John the Baptist)
      • Inside the room there was a man sitting there looking at this drawing. I asked the man if he was a worker there. He said no, but that he just likes to come on Friday nights he doesn't have work, and enter this room, and stare at this painting and meditate about it for a few hours (holy shit!). We have a very nice conversation and he teaches me a lot about Leonardo. 
      • The other Leonardo piece was this one (Virgin on the Rocks, of which there's another one by Leonardo in the Llouve in Paris, which I went to go see a few days later)
    • After the National Gallery, I walk to the edge of the river, check it out, and go back to the Hostel and knock out.