Thoughts on Manhattan Love Story getting axed

   MLS4
A fragile fate

I checked weekly for new episodes of Manhattan Love Story (MLS) on Hulu for a month and didn’t see anything. Suddenly this weekend, 7 new episodes appeared out of thin air. So naturally I binged on them.

This morning, I realized that the MLS was cancelled in late October and episode 5 never even made it to the air (!) Apparently the last episode on air hit an all-series low of 2.6 million viewers, and that was the last drop. It’s very unfortunate because the third episode, which introduced Dana’s gay British boss, was truly hilarious.

Even though MLS received poor critical ratings, the fact that the network decided to drop it completely from air based on Nielsen ratings strikes me as strange. Personally I don’t watch any show when it airs (and I watch a fair amount). Do other forms of viewership (online/streaming) hold no weight? What’s worse is that ABC attempted to replace MLS with a back-to-back episode of Selfie, which is even more boring and less funny in my opinion.

On the plot and characters
I was rather excited when I saw MLS trailer in the summer. How could I not? I’m a sucker for rom coms, especially those that involving the superficial, flaky, fascinatingly cut-throat NYC dating scene.

MLS2Here’s how the show is realistic:
– The awkward run-in between Dana and Peter when he’s on a date with a regular hottie.
– Dana feigns dating ‘other’ people and not showing too much enthusiasm at Peter’s invitations to hang out.
– Dana and Peter both being invited to a party to which he had previously invited another date as a plus one.
– Amy’s huge SoHo loft in simply  is explained by the fact that she’s born rich and doesn’t have to work.

Why it fell short of living up to its promise:
– The two main characters are too stereotypical and have no depth. Dana, a small-town girl who gets a ‘dream job’ at a publishing company, is very flighty, unrealistically clumsy and doesn’t have much going in her work place besides being shunned by bitter old-timers, making copies and fraternizing with her dashingly handsome boss slash gay BFF. In the trailer scene, she is simply heard lusting after designer purses even though her character is not portrayed as being that into or involved with fashion.

MLS3- Peter is none other than ‘that guy’ – the bro, the douche bag and womanizer. The longest relationship he’s ever had is 10 months long despite being well into his twenties. He is that guy who is only nice looking (compared to other TV’s leading males!) but is ‘that hot’ in the dating pool just because he has somewhat of a sense of style and social skills around women.
– Such cliched, overwrought dating ploys and mishaps, e.g.:
+ Struggling to find date to an event to impress the other person you’re seeing
+ Not being able to consumate their relationship due to food poisoning
+ Freaking out about him proposing although you’ve obviously only dated for 3 months (monogamously 2 at most)
…………….

Entertaining points
– Some of the supporting cast are way more interesting than what goes on in Dana’s and Peter’s heads. Amy is pretty funny – she’s the essential smart, put-together, overly controlling know-it-all in every show. On Peter’s side, his step sister Chloe is the most down-to-earth, logical voice of the whole family. They provide some rationality and relief to the ridiculous, non-sense mess made by our leads.

- Of course, the wardrobe of the show is amazing. I plan to dedicate a separate post to it.

MLS1

The Absolute Beginner’s Guide to Capybara/RSpec

Sometimes the biggest challenge of using a new tool is not the syntax (there are always many examples for that) but getting set up. This is especially true and sometimes challenging for Rails, which is a convention-over-configuration kind of framework.

The situation

I need to write functional (aka integration or end-to-end) tests for a one-page app that relies entirely on AJAX to interact with a REST API.

Picking the tool

At the beginning I considered Cucumber. But I started seeing a lot of documentation for using Capybara in conjunction with RSpec, which I’m somewhat familiar with. It’s said to have an [intuitive API](http://rubydoc.info/github/jnicklas/capybara) and uses an easy to understand DSL (domain-specific language). So I decided on using Capybara/RSpec.

Running into problems

It was rather challenging to figure out how to configure the two gems and where to put the tests inside the ‘/spec’ folder. After about 2 hours and running ‘rspec’ unsuccessfully 30 times, I narrowed down the *key* steps in setting up Capybara test framework in a Rails app:

1. Gemfile

group :development, :test do
  gem 'rspec-rails'
  gem 'capybara'
end

2. spec/spec_helper.rb

require 'rspec/rails'
require 'rspec/autorun'
require 'capybara/rails'
require 'capybara/rspec'
require 'capybara/dsl'

The first two lines are automatically generated when you do ‘rails g rspec:install’. However, you need to require the capybara pieces manually.

3. Config the gems in spec/spec_helper.rb

Apparently selenium is the default driver for Capybara but I set it explicitly to be safe (actually I was trying everything I could get my hands on).
Capybara.default_driver = :selenium

You also need to include Capybara::DSL module so you can use phrases like ‘visit ‘/’ ‘, ‘fill_in’, ‘click_button’ in the tests.
RSpec.configure do |config|
  config.include Capybara::DSL
end

4. Where to put spec files

For RSpec, tests go under ‘spec/lib’. However, with Capybara, I have seen tests being put both under ‘spec/features’ and ‘spec/integration’. I went with the latter: ‘spec/integration/name_spec.rb’

5. Require spec_helper

At the top of each of your test file, put ‘require ‘spec_helper’ ‘

6. Test syntax

According to documentation I have come across, you can write tests either with RSpec or Capybara conventions:

describe 'log in process' do
  it 'lets user log in' do
   # Test goes in here
  end
end

I went with the Capybara way:
feature 'log in process', :js => true do
  scenario 'lets user log in' do
    # Test goes in here
  end
end

`:js => true` is supposed to help you switch to the Capybara.javascript_driver (instead of the selenium default). However, my app ended needing to use selenium web driver.

7. Capybara DSL syntax

feature 'log in process', :js => true do
  scenario 'lets user log in' do
    visit '/sessions/new'
    fill_in 'Email', :with => 'user@example.com'
    fill_in 'Password', :with => 'password'
    click_button 'Sign in'
    expect(page).to have_content 'Success'
  end
end

8. Capybara selectors

For ‘click_link’ you can select the element by id or text. But for ‘click_button’ or ‘fill_in’, you have to select by the button value or input placeholder value.
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click_on('Link Text') # clicks on either links or buttons
click_on('Button Value')

You can also find element by its id or html tag:
find_field('First Name').value
find_link('Hello').visible?
find_button('Send').click
find("#overlay").find("h1").click

9. Web driver!

Last but not least, after I set up everything else correctly and was able to run rspec without getting `undefined method` error for Capybara, my terminal told me I was missing this gem:
gem 'selenium-webdriver'

Success

As promised, when you successfully execute Capybara, the test will open up a browser and fill out username and password in the field you told it to and decide whether it fails or succeeds.

This blog post barely touches the surface of testing with Capybara. But getting to this point was a great accomplishment for me, and writing the rest promises to be easier with the help of documentation.

My day hacking Google QPX Express airfare API

qpx express When my classmate and I previously attempted to use the Google Feed API for our group project, I have realized that Google documentation is not great for “beginners,” in our case inexperienced developers. It seems to be simple in theory, make a HTTP post request to this url ('https://www.googleapis.com/qpxExpress/v1/trips/search') with json in the request body. But the learning curve is high and here are the struggles I’ve gone through:

1. API key setup: I think this is worth mentioning because the page to do this isn’t straight forward. Googling “Google developers console” will take you to the page where you can enable the API you’re trying to use and obtain a key for it.

3. Ruby wrapper: My mentor suggested that I could use Google’s Ruby wrapper for the API so I can make the request server-side. I was able to find documentation on how to create the API client (which is common to all of Google’s APIs). BUT there is one line of documentation specific to QPX, and I couldn’t figure out how to specify the request body so I gave up.

3. 403 “Access not configured”: I put my API key in the header as instructed but was getting this error. It was a combination of 2 things. I solved my problem but didn’t know which fix did it.
+ Initially I had specified under allowed IP the IP address of my apartment’s internet access but I was working from another one. This post suggests that you have to register your v6 and not v4 IP. I don’t even know what that is so I just leave it blank as one post recommends to allow requests from any IP.

+ Still getting the error. I had to restart my rails server and it changed to a 400 status code.

3. 400 “Bad request”: I was fumbling for a while because I didn’t know how to investigate what went wrong. Luckily going under the Network tab (Chrome developer console)
Parse Error. This API does not support parsing form-encoded input

With the help of this stackoverflow thread, I set contentType: 'application/json' in my ajax request.

4. 200 with empty response body: for a while I got a 200 status with nothing in the response body. Even more unhelpful than the two previous errors. I don’t know why this went through, but I started hitting the API and encountered 400 again.

5. 400 “Parse error”: This error is similar to the third one but I figured the cause was different because of the different message. It was a bit vague and difficult to search for but I finally found this thread that nails the problem in the head. My json was not really json but a javascript object, very close but not really. I had to simply use JSON.stringify(object) to turn it into valid json. The reason I was so slow to figure out this issue (nearly 1 hour) is because a) I’ve mainly used the opposite method, JSON.parse to read response body and rarely done a post request with such a big request body; b) I’ve mostly made ajax requests to my own Rails server, which accepts an object with no problem.

The “victory” wasn’t that great but it was really, really worthwhile to get back the response object in the console since I’ve spent all day hacking this API with basically no help. I guess I helped myself to Google and Stackoverflow.

qpx-response

From Fashion to Tech

The past three months has changed my life drastically. I decided to abandon my uninspiring marketing job to come to the Web Development Immersive boot camp at General Assembly. I knew the course was going to be challenging but I had no idea how and how much it would change me until it happened.

I will not lose my interest in fashion and design but I’ve developed a new obsession in the name of coding. Every day, every hour, learning, coding, terminal commanding, deploying, trouble shooting, debugging…. Lots and lots of debugging.

I wouldn’t say the course has made me “smarter”, though it did equip me with a lot of knowledge. The most important aspect of this experience is that it helped me fulfill my Potential, something I have always had. Since this is still a fashion blog, I’m posting link to my first-ever web application that I built with Ruby on Rails:

 Note to self: Heroku restart will reveal a lot of errors otherwise hidden.

H&M bustier, H&M peplum top, H&M knit sweater

Black is the New Black: H&M Haul

H&M bustier, H&M peplum top, H&M knit sweater

H&M peplum top $34.95 – H&M low-cut bustier $24.95 – H&M knit sweater $24.95

“You know you’re a New Yorker when you need a flashlight to see what’s in your closet” – Dress Monsta.

I admit that since two years ago, I could never get enough black clothes. Everything, from dresses, skirts, blouses to pants, tights and booties, just look better in black to me. Anyway I ventured to H&M the other day to spend my $50 Christmas gift card.

I hadn’t been to H&M for two months (Foursquare told me), which is like 6 months in fashion year. Either this store near Bryant Park has really good stuff or H&M has improved the quality of their clothing. And there wasn’t a huge tourist crowd like usual. Jackpot!!

I found three pieces that must be leftover from previous weeks’ stock. In my size! So style. Much fortune. Wow.

I’ve been on a search for sexy crop tops I can wear in the club. Honestly I have a clubbing uniform, an outfit that consists of skinny pants/tights and a crop top, usually all black in different material. The reason I stick with this is because I feel comfortable and can show off my asset (thin waist). Bodycon dresses, while look good on me, are often too short and rise up when I try to dance or even walk.

1. The peplum crepe top in size 2 is a but snug but it will do. In the back it has three hooks and the peplum part is open. It is quite girly and flirty. I will need high-waist pants to go with it, although you can also style it with high-waist pencil skirt.

2. The bustier I got is actually all black, not pinstriped, and had double straps. Size 4 is pretty snug on me, which MUST be vanity sizing because I am barely a size 4 in tops. To clarify, this top is extremely LOW-CUT. It is even more revealing on me that on the model, and I have AA cups. Hmm, anyone larger than a B cup shouldn’t attempt to wear this in public.

3. This sweater is a coarser, loose knit that has almost of a sheer effect when layered over something else. I got a similar oversize sweater of the same material in burgundy (unfortunately it became fitted after being thrown into the dryer load) and loved it. So naturally I have to get it in black. Size Small was a bit too long in the black, since this has a high-low hem, so I went for XS instead. This sweater can be paired with leggings and easily layered over tank tops or blouses.

This was quite a successful, stress-free shopping trip. Until next time, stay warm and wear black.

Image

Swoon-worthy: Taylor Swift’s Gucci Gown at the 2014 Grammys

Swoon-worthy: Taylor Swift's Gucci Gown at the 2014 Grammys

Agreeably Katy Perry’s musical note tulle gown and Beyonce’s sheer/nude/white organza dress gained a lot of attention. But my absolute favorite was Taylor Swift’s gold sequin Gucci number. It’s a column number with short allusion sleeves. She looks incredibly statuesque and elegant in it with smokey eyes and a wavy ponytail.

Nasty-Gal

Why Nasty Gals Do It Better: An E-commerce Success Story

Sophia Amoruso of Nasty GalNasty Gal had a humble beginning. Sophia Amoruso founded it at the age of 22, after dropping out of a community college where she was studying photography. Nasty Gal carries clothing of an edgy, vintage aesthetic in the $50-100 price range. Arguably it competes with Urban Outfitters but sets itself apart with a sexier, more glamorous appeal. The most notable thing about the business’ growth spurt is that it didn’t employ flash sale, subscription service or celebrity endorsement like many other fashion startups.

Part of Nasty Gal’s success must have been Amoruso’s impeccable taste and talent for curation and styling. She started out re-selling vintage finds on eBay and promoting the store on MySpace. She was able to make the clothes look cute and desirable on “approachable-looking” models, whom she hired out of necessity. Anecdotally, Amoruso turned an $8 Chanel leather jacket from Salvation Army and sold it for over $1000.

Nasty Gal's sexy, retro aesthetic
When demand outgrew supply, she purchased her own domain nastygalvintage.com and began approaching labels with vintage-inspired clothing. Amoruso was also intelligent to have a sustainable business model, growing it without incurring debt. “I put every drop of profit from this business back into it. That’s why it’s successful,” she said.

Nasty Gal didn’t need investors’ help to expand until 2012. Amoruso took $50 million funding from Danny Rimer of Index Ventures, an early investor of other e-commerce successes like Asos, Etsy and Net-A-Porter. That year, Nasty Gal made $100 million in sales. By 2013, it was valued at $240 million.

Nasty Gal’s focus on highly curated clothes and avoidance of discount actually helped to keep its margin high. The company sells 93% of its stock at full price in an industry where a third of merchandise is marked down. The company keeps its stock low, which reduced the need for slashing off prices and expensive warehouse square foot. In early stages of the business, there was no advertising. Nasty Gal relied on social media word-of-mouth and listening to customers’ feedback on these channels. “I’ve probably spent more time than any other brand reading every last comment. To listen to people the way you’re able to online is very powerful. I think other companies are just starting to figure that out,” Amoruso said.

Nasty Gal original labelThe social media approach works especially for Nasty Gal because of its youthful, social savvy target market – women 18-24. To date, the brand has amassed over one million followers on both Facebook and Instagram. With the slogan “Nasty Gals do it better,” the company also solicits user-generated content and features it on its blog and Pinterest.

More than that, Amoruso knew how to capitalize on the Pareto principle (or the 80-20 rule) through online traffic tracking. In this case, the top 20 percent customers generate more than half of Nasty Gal’s sales. The top 10% visit the site more than 100 times a month. Identifying this core client is extremely helpful in forming its marketing tactics and expanding the business, one of which was to develop its original label in 2012.

Like Sarah Lacey of Pando Daily pointed out, Nasty Gal is relatable to so many girls because its aesthetic is badass, effortlessly cool and not trying to be perfect. “This is what so many women who try to build apsirational brands — the would-be Martha Stewarts for the Internet generation — just miss. They try to be about perfection. Perfect job in a perfect city with the perfect hair and a perfect man. And that’s why they don’t catch on. No girl can relate to perfect,” Lacey wrote.

Like many Internet entrepreneurs, Amoruso attributed her education and success to the vast universe of free information online: “Google is responsible for this business… When I wanted to know what kind of warehouse shelving to buy, I looked online. I could watch Stanford Business School videos on YouTube. I don’t go to conferences. I didn’t talk to anyone. I didn’t have to. I grew up on the Internet.”