Making Easy Roommate Easy Andrew Grimm @andrewjgrimm
Easy Roommate <ul><li><Insert sexist jokes here `coz most of the audience is male>
Web site where people can find accommodation, or vice versa </li></ul>
The Good <ul><li>Profiles have structured data
Means you can determine whether a flat is unsuitable without contacting them </li></ul>
The Bad <ul><li>You can't search only for places compatible with you
You can't hide or delete profiles you're not interested in
Profiles you've already read get bumped to the top when they get edited </li></ul>
The Ugly <ul><li>Web scraping to the rescue!
Download and parse the profiles
Upcoming SlideShare
Loading in …5
×

Making easy roommate easy

1,705 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,705
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Making easy roommate easy

  1. 1. Making Easy Roommate Easy Andrew Grimm @andrewjgrimm
  2. 2. Easy Roommate <ul><li><Insert sexist jokes here `coz most of the audience is male>
  3. 3. Web site where people can find accommodation, or vice versa </li></ul>
  4. 4. The Good <ul><li>Profiles have structured data
  5. 5. Means you can determine whether a flat is unsuitable without contacting them </li></ul>
  6. 6. The Bad <ul><li>You can't search only for places compatible with you
  7. 7. You can't hide or delete profiles you're not interested in
  8. 8. Profiles you've already read get bumped to the top when they get edited </li></ul>
  9. 9. The Ugly <ul><li>Web scraping to the rescue!
  10. 10. Download and parse the profiles
  11. 11. Check whether they're already mentioned in your notes (plain text file)
  12. 12. Describe whether new ones are compatible or incompatible </li></ul>
  13. 13. Web scraping tools <ul><li>Mechanize for getting past authentication
  14. 14. Nokogiri to parse the HTML </li><ul><li>Not regular expressions – sorry Cthulhu! </li></ul></ul>
  15. 15. Ternary logic <ul><li>Some fields have “Not Disclosed” in them
  16. 16. Rather than saying the profile meets your criteria or doesn't meet them, you can say it isn't known
  17. 17. Ternary_logic gem used </li></ul>
  18. 18. Coding considerations <ul><li>Should code for parsing an object be separate from business logic for the object itself?
  19. 19. Some pages have different structures
  20. 20. One person may have an ad for each room in a unit – how do you tell they're distinct? (Use their unique IDs) </li></ul>
  21. 21. Coding considerations II <ul><li>Decided not to use a database </li><ul><li>Too lazy to install on all my computers </li></ul><li>Currently only looking at some properties in a profile </li><ul><li>YAGNI </li></ul></ul>
  22. 22. To do <ul><li>Automate commute time calculation rather than manually visit 131500.com.au
  23. 23. Find a flat! </li><ul><li>@andrewjgrimm </li></ul></ul>

×