1. How to add fields to an existing Rails model

    In Coverlist, I have a model (scaffold?) called Users, which has a small number of components: name, email, password, all created when a user makes an account.

    But, in order to expand the feature set of the site, I’d like for users to be able to add a short bio, a website, their Twitter handle and their full name (since name actually refers to username, and their vanity url, ie: coverlist.com/users/Dani). 

    The way we do this is with a migration:

    rails g migration AddDetailsToUsers fullname:string twitter_handle:string bio:text website:string

    A “string” refers to shorter text such as a username or email, while “text” is for longer text, like a summary, or in this case, a bio.

    I ran that, and then I added  <%= f.input :bio %> to the “edit user” view to test it out — and got an error. Do I need to run rake db:migrate?


    Then I added a bio, and got another error: Can’t mass-assign attributes.

    I needed to go to my user model and add bio to the attr_accessible line where the other attributes are listed. The same will go for all the attributes i just added.

    One last thing — a bio is no good unless other people can see it!

    I went to the user show view and added the @user.bio in a <p> tag right under the user name. I will have to jump into the CSS later to make it look nice, but just wanted to prove I could put it there. 

    So, that was fun!

    Tags: rails / programming / learn programming / ruby / model /


  2. Out taking pictures like I’m a tourist! Miss this place #nofilter

    Tags: nofilter /


  3. it is the notion that some people feel emotions in a more physical way than others
    — meg fee - glad to know I’m not the only one who cries on the subway!

  4. How To Pull Book Covers From the Open Library API Into Your Rails App

    My goal was to display covers via Open Library rather than forcing users to upload a cover from their desktop. The API makes it easy to pull covers by ISBN, but I don’t store that and don’t want to force users to look it up, so we decided to let users put in a title, which would then be run in a search on Open Library. 

    Ideally, Open Library would return 8-10 book covers and the user would select the correct one, but this would require a bit of Javascript for the interaction. Instead, to get the API up and running, we just had Coverlist use the first cover in the search results (if there are no results, it will pull nothing and the cover will be blank). 

    Yes, this is a temporary solution.

    We also used HTTParty to parse the API.

    - Add HTTParty to Gemfile

    - Add a few lines of code to Create action in controller — make a variable for search results, then parse, then assign new variable  for cover_url that refers to the Open Library book ID url where the cover is stored (they prefer you link back to them rather than downloading and saving their covers). 

    - Run a migration - had to add cover_url to books (ended up doing it manually)

    - Change views to show cover_url instead of cover

    Here is the full experience in Google+ Hangout

    After we finished this lesson, the solution worked locally but not on heroku. 

    I forgot to do heroku run rake db:migrate and heroku restart. Then it worked.

    Then I needed to do an If/Else statement so users could override the Open Library cover with their own cover, in case the app pulled the wrong one. If there is a manually uploaded cover, that is shown — if not, the cover_url cover is shown. 

    Right now it only interacts with the API on create, not update (although this could be easy to change) so if you put in Harry Potter for title, it might be a toss-up which book of the series you get. Thus, a few improvements should be made to this API integration, but the exciting part is that Coverlist is using its first API. And it happened in one hour. Much easier than I expected. Bigger things to come!

    Tags: coverlist / rails / ruby / api / learn programming / airpair /


  5. Because regardless of whom else is interested, I want to be with me, and I always will.

    Getting Rejected Will Turn You Into a Better Dater, by Christina Bryza.

    Literally the only important thing to learn about being single, or possible about being a human being at all.

    (via luckypaperstars)

    We launched Christina’s picture book for grown-ups, Are You My Boyfriend?, last night and it was amazing. We have a handful of signed copies in the store, come by and nab one!

    (via housingworksbookstore)

    such a lovely quote!

    (Source: meredithhaggerty, via housingworksbookstore)

    Tags: dating / books /


  6. How Building an MVP Is About Discovery

    I was building the MVP of Coverlist and I was nearly done. Users could add books they had read along with a 2-3 line microreview, which would serve as a recommendation for other users who are just browsing — and every book had a Coverlist score so I could surface the best books for the weekly top 20.

    It was time to do things that don’t scale - i.e., start reading out individually to people in book clubs or people blogging about books. But I was scared — what if, they went to add a book, realized you had to find the cover image on your own to upload the file, and decided it was too much of a hassle?


    The app was mimimal, but was it viable? Or would they walk away and never return?

    I started with my sister — “sign up for this site I built, add a book and tell me what you think.”

    She added Emma and as hoped, she picked a unique book cover via Google Images that perhaps would not be available in an API. I want users to be able to pick book covers and not be stuck with whatever the publisher wants to promote, since Coverlist is a visual place.

    The downside was that she picked a cover image that was smaller than the rest, and could throw off the design.

    My mom was next. She added a book cover that was even smaller so I had to replace it. Turns out she had found it on Amazon, and then offered to take it down so I wouldn’t have a “pirated image” on the site. 

    As it turns out, users did not have a problem with uploading images — but opted for images that might disrupt the site design, and possibly felt they were breaking a copyright by pulling images from other sites (which is up for debate). 

    I don’t want users to feel uncomfortable about adding a book and I definitely don’t want to worry about the design supporting all sorts of small and large cover images. 

    What most surprised me, though, was this book, added by someone I don’t know. Instead of adding a cover image, the user simply took a snapshot of the physical book — which is actually a great experience when you’re using Coverlist in a mobile browser.


    It had never occurred to me that someone who is still reading from physical books could quickly upload their book library by simply taking photos from a smartphone. But, in order to allow Coverlist to be a collection of all your books — whether you read a borrowed copy, got it from the library, own it or read the ebook — I still would need to offer a cover database.

    So I decided I would need to add an API so users could search for a book title and choose an image instead of uploading a file. 

    I might be returning to the same decision I pondered in the first place, but I came to it from watching user interactions rather than just making assumptions — and now I can make a better case for investing time into making the new feature happen. 

    Tags: open library / api / rails / mvp /


  7. How Coverlist Fits the Hook Model

    I’ve been reading up on the Hook Model which could be seen as an alternative to Lean Startup methodology, although not mutually exclusive. I first encountered the concept when I read Ryan Hoover’s answer on Quora to “How has Turntable.fm grown so rapidly with no marketing?

    The Hook Model can be summed up with the acronym ATARI, or:

    A hook is TriggerActionRewardInvestment.

    There’s a happy medium between a product that produces overly obsessive users (as Turntable did, which likely accounts for its failure) and a product you use once, enjoy, then never return (as most of the apps that I consider writing about at Mashable are, unfortunately). 

    My vision for Coverlist is to create an experience online that is simple, welcoming and warm, much like a neighborhood wine shop or local bookstore. But does the app have a hook, or social engagement loop?

    Coverlist’s Trigger is external — it’s when a user finishes a book. Was it any good? How did you feel when you finished the book?

    The Action is when the user adds the book to Coverlist with a micro-review explaining why others should read it. “Great read for the beach,” perhaps, or “might enjoy after a breakup.”

    The Reward is when a user’s book review is voted up to the front page or included in the weekly newsletter. When two users add the same book to their profile, it’s not really the same book, because each user includes her own review. So users aren’t just voting on the book itself, or the cover art — it’s those things *and* the review from that specific user. Books, plus identity.

    Finally, the Investment is when a user finds another book to read on Coverlist, perhaps through the recommendation of another user. This sets up the user to perhaps return to the Trigger again, and makes Coverlist better with every book reviewed. 

    Does Coverlist sound like something you would use? Take our survey to help improve the site. 

    Tags: lean startup / hook model / user acquisition / reading /


  8. How to replace the default Rails 404 page

    If you Google “The page you were looking for doesn’t exist Rails Heroku” you’ll find the StackOverflow questions from beginning developers who expect this message has something to do with the problem they’re facing. What they don’t know is that this is just the default 404 page in Rails, which they wouldn’t have encountered until deploying to Heroku (when your app runs locally, it gives you an actual error message).


    I was convinced that the text and design on this page was due to Heroku and searched all over the site trying to find out how to change it to something more user-friendly. Eventually, I realized that both the HTML and CSS was literally a file in my app’s ‘public’ folder.

    If you want your error pages to look at home on your website, all you have to do is change the code in these three files — 404.html, 422.html and 500.html.

    I opted for a pun relevant to my users, who are book readers. “We seem to have lost our page. Can we start from the beginning?” along with an image of book shelves I found on Imgur.


    What’s on your 404 page?

    Tags: 404 / heroku / rails / programming / learn programming / app /


  9. The Making of Coverlist: Part 3

    I’ve been thinking about these posts (read the first two here) and how to make them more useful for others and less of myself rambling. So, I’m going to include more links and lists. 

    That said, I’m at my parents’ house in southern California enjoying an endless supply of perfectly brewed coffee and helping them clean out the fudge supply. Love the holidays!

    Goals For Last Week:

    I wanted to stop coding and start working on user acquisition. But, my imagination got away with me and I solved a few more problems instead. 

    I wanted to track down names and contact info of people in the publishing industry to do Q&As for the coverlist blog and pull together resources for my planned Pinterest programming — both of which I still need to do. 

    What I Accomplished:

    I asked my first-ever question on Stack Overflow — two people answered and a combination of their responses worked!

    Afterward, I came to another epiphany — I didn’t need to create a new controller for each of the voting actions — I could have the top action add 3 points, the second add one point and the third add zero. That way I don’t have to worry about negatives. 

    Now, if I were to A/B test a book cover, I’d be able to keep score. Score :)

    Goals For This Week:

    - Test Assumptions: I’ve had a few new ideas. What if the site behaved like Medium rather than Pinterest — users collaborate to create Collections rather than making their own shelf? I might run a survey with a Facebook ad (targeting book clubs) to gauge interest.

    - Experiment: If I were to A/B test book covers perhaps I can clone Coverlist to a separate Heroku app at party.coverlist.com, where I would stage books (25?) according to a theme. 

    - Fix Olark

    - Put books in order of score, not id

    One Thing I Learned:

    I had the opportunity to show Coverlist to a few relatives over the holiday. I’m lucky in that several people in my family are longtime employees of their local library, and also in book clubs — so I was able to get another perspective. 

    People complain that they prefer physical books because of book ownership — if they bought the book they want to be able to resell, lend or see on a shelf. I think identity and ownership are two separate things. If you check out a book from the library, you don’t get to keep it on a shelf — but you’ve still read it and identify with it. 

    Coverlist can own identity. 

    Maybe I don’t care if I direct people to Amazon or iBooks to buy a book and whether they keep the book forever or it’s lost with a device. If they’ve read it, it is part of them and is on their Coverlist. 

    Perhaps someday Coverlist will create an interactive map of the world with all the libraries plotted out with tips on selection and best times to go and more. Maybe we’ll make an app for finding local bookshops. 

    If someone finds a book to read on Coverlist, perhaps we don’t need affiliate income every single time they decide to buy — there could be a business in not caring how people acquire and read books, just celebrating them.

    Tags: eboos / publishing / digital / app /


  10. Letter To My 15-Year-Old Self

    My submission for this month’s Carnival of Journalism

    Dear Self of 15 Years Age,

    I want to start by saying we are not the same person, you and I. You dream about me all the time. You imagine I’ve “made it” somehow, whether it means being rich enough to finally shop at Anthropologie (or better, have married the rich husband), or, empathetic enough to finally move to Africa and spend the rest of your (our) days working at an orphanage. We’d be happy either way. 

    Anyway, people will keep telling you to slow down, to enjoy where you’re at now. Don’t slow down. We’re having so much fun. 

    When you get to 20 you’ll be shocked at how much you’ve accomplished — you’ll mention that you were once shy and someone will actually not have noticed. When you’re 25 you’ll have a master’s degree and your dream job which are both goals you’ve had but you won’t have expected them to come so soon and within a year of each other. 

    But of course, you can’t revel in those moments for too long because even jobs can be fleeting. 

    There will be times when you regret just about everything — leaving San Diego, coming back to San Diego, coming to NYC, not moving there sooner, and not being more _____. “Why can’t you be more _____,” you’ll say to yourself, “it’s what those other people are doing and they’re perfectly happy. When you start to feel that way, all it means is that you should spend the evening with a glass of wine and a novel rather than Facebook (by the way, you like wine). 

    Sometimes when life seems monotonous or you wonder if you’ll just always live with roommates and never have enough space — you’ll tell yourself, “Someday you’ll look back on this as the happiest time in your life.” You’ll make this true, just by acknowledging it, and it’s especially true of that year you lived by the beach, worked at a coffee shop and taught yoga.

    I’m excited for you (me). Because the next five years are absolutely going to be the best. There’s so much that you want to do, now, at age 15, that hasn’t been done yet. But with every new challenge, new city, new job, you’ll shed a layer like a butterfly and become a better version of yourself — and that’s why you wouldn’t recognize me on the street. I’m sorry to say I’m not like you at all. But it’s OK to outgrow your surroundings. As Steven Pressfield says, new friends will present themselves.

    One last spoiler: You haven’t written a book yet.

    - Danielle of 28 Years Age

    Tags: journalism / blog / memoir /