It’s never easy to leave everything behind — your life, your friends or your family — and move to a new country to start a new life… But it’s precisely what I did last December (2016). After living in Portugal for almost 20 years, 3 of those in Porto, I quit my job at 7Graus and despite loving that city, I took my then-girlfriend-now-wife and moved to Switzerland. It was not an easy decision, but although I miss my family, my friends and my country, I believe it was the right choice.
Moving to a new country is never easy. It might be an exciting new adventure but it’s always full of obstacles! For me, moving was a tiny bit easier because I grew up in Switzerland and my parents still lived there. For the first couple of months, while being unemployed, I had a place to stay with a hot bed and food at my mother’s place in Romont. I got to live in a beautiful tiny city with 5000+ inhabitants, located in the French part of Switzerland.
A couple of months went by and fortunately, I found a new job at Apptitude in Lausanne where I started working in February 2017. With the new job came the necessity of leaving my mother's home at 7am every morning to commute 1h30 from Romont to Lausanne. At the end of the day, I would arrive home a bit after 7pm. As most commuters know, eventually the fatigue creeps in and for me, this meant it was time to find a place of my own in order to live closer to work.
Lausanne is the third biggest city of Switzerland and is situated on the shores of the Lake Léman. It’s lovely and if you are considering to visit Switzerland, you should definitely visit Lausanne!
To my surprise (and shock!), Lausanne is one of those places where finding an apartment is pretty much impossible. Like Paris or London, there’s a lot of people looking for good and affordable places and not so many “cheap” places to rent.
Essentially, the process of finding an apartment goes like this:
The problem with the situation is that it follows a simple rule: first come, first served. As such, the process above should be done as fast as possible: you need to check/validate the ad as soon as it’s available, and then call and schedule a visit. You hope you’re the first person to visit so that your dossier is the first to be considered. You will also have to pray that the order of the dossiers will be respected and that your dossier isn’t missing anything crucial or it will most probably be discarded. Bonus tip: be nice to the person showing you the appartement or you may end up at the bottom of the pile.
Quick note regarding the ads: There is so much competition that an ad can receive tens or hundreds of responses on the hour following its creation. For this reason, some ads are posted and removed before the hour is up, because by then, the poster will have enough interested (and desperate!) people. As you can imagine, to catch those ads you really need to make the search your “full-time job” and that wasn’t an option, at least not manually. So, what happened? I automatized our house search! 🤖
Let’s get serious, I code for a living, I eat lines of code for breakfast (or not!) and automation makes my world go round ❤️. I don’t have the time, the patience nor the will to spend my days looking for an apartment and spending hours organizing ads to find that golden egg. The reality was that I still needed that apartment as fast as possible, so…
Instead of passing my days looking for ads, I built a crawler for each website/facebook group I found with relevant ads. In total, I built 4 crawlers (for 3 websites and 1 facebook group). Side note: One of the sites crawled, was an aggregator kind of site, so I actually got info from more that 4 sites.
All the collected ads, were already pre-filtered using the search engines of each website and were then filtered again by my scripts (when possible, because extracting data from text automatically is not always trivial). Every ad that got to this point, was added to a google spreadsheet to be validated by a human (aka my sidekick). To make things fast, I also got a push notification for each new entry added to the spreadsheet. I used push bullet for this. At this point, if I was interested in the apartment I would call to schedule a visit. In the end, I had a list with 1000+ ads and for each of those, I knew:
I love building this kind of stuff! It allows me to work on something I like (automation) to avoid doing stuff I don’t like (boring repetitive tasks). When I first started writing this story, it was not a “happy ending” kind of story: my little “coded companion” was running at full speed (ay ay captain!), while I was making calls and doing regular visits… but I still had nothing. Fortunately, my luck eventually turned up, and I found a lovely apartment to call my home. We moved, my babushka and I are now living in Lausanne.
Local knowledge says it usually takes 3 months to find and rent an apartment in this city… With the help of my “coded companion”, I did it in 1️⃣.
After having built all this, I actually got the first apartment I visited… Sweet irony...
This article is also available in french “Automatisation — La recherche d’appartements pour les paresseux”.