If you can't read please download the document
Upload
andrew-grimm
View
1.705
Download
3
Embed Size (px)
Citation preview
Default
Making Easy Roommate Easy
Andrew Grimm
@andrewjgrimm
Easy Roommate
Web site where people can find accommodation, or vice versa
The Good
Profiles have structured data
Means you can determine whether a flat is unsuitable without contacting them
The Bad
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
The Ugly
Web scraping to the rescue!
Download and parse the profiles
Check whether they're already mentioned in your notes (plain text file)
Describe whether new ones are compatible or incompatible
Web scraping tools
Mechanize for getting past authentication
Nokogiri to parse the HTMLNot regular expressions sorry Cthulhu!
Ternary logic
Some fields have Not Disclosed in them
Rather than saying the profile meets your criteria or doesn't meet them, you can say it isn't known
Ternary_logic gem used
Coding considerations
Should code for parsing an object be separate from business logic for the object itself?
Some pages have different structures
One person may have an ad for each room in a unit how do you tell they're distinct? (Use their unique IDs)
Coding considerations II
Decided not to use a databaseToo lazy to install on all my computers
Currently only looking at some properties in a profileYAGNI
To do
Automate commute time calculation rather than manually visit 131500.com.au
Find a flat!@andrewjgrimm
Click to edit the title