POKESEAR.CH


Pokesearch (stylised as pokesear.ch) was a web based Pokemon scanner for the 2016 hit, Pokemon Go. I developed a rough first prototype solely for myself and a small group of friends. We all lived in the same area at the time and so I set up a static map and had had our entire town scanned 24/7. I setup alerts to my phone that notified me of rare Pokemon spawns and allowed us to race out at night to track them down. I remember running down our street in my pjs at 1am to catch the Snorlax that had spawned at the end of the road.

The first version of pokesear.ch was hosted directly from an old laptop I had sat collecting dust in my bedroom. The website had no domain and it was hardcoded to focus on my local area and to keep the area scanned for Pokemon. I didn't know tons about web development at the time and knew even less about servers and using Linux. A friend of a friend heard about the 24/7 scans of my town and asked whether I'd be able to setup a private map for him and his friends living in a different town. I said I'd do one better and add the ability to request scans on my original website.

With needing to share the website with other people I decided it was time to choose a domain name. PokeVision was already a well established name in the Pokemon Go scanning site business and I wanted something similar but with a fancy domain hack. My partner deserves the credit for coming up with a Pokemon searching site that'd have the name pokesear.ch using the .ch Swiss TLD. I've had quite a few confused Swiss people asking if I also was Swiss which always confused me a little; did this mean they thought that the domain was "pokemon sear"? that sounds a little morbid for a kids game. Anyway, on a long train ride to the Lake District I whipped up a very basic frontend and crufted together a hacky solution that would allow my town to be constantly scanned and for my friends town to be scanned whenever they requested it.

This second version spread quickly in my friends town as it was shared multiple times in their local Facebook group. It wasn't long until other people began contacting asking for their town to be scanned constantly too. I spun up a few more perma-scans for places that had large followings but these requests were too hard to filter though and required planning and decisions to be made by me which was a lot of effort. The ability to scan in a custom location of your choosing was added shortly after these frustrations and this greatly reduced the amount of work I was needing to do to keep expanding. People loved this feature obviously as this allowed them to scan anywhere in the world, the issue was that I planned and coded it poorly and I ran into a few issues.

The ability to scan where you want was coded in PHP which was really the only "server" language I knew how to use. When looking back on past experiences I'm sure everyone has the same experience of "wow I was bad at doing X back then, I had no idea what I was doing" and this is definitely something I feel now with pokesear.ch. I would gather the users scan location using a Google powered address lookup that converted "123 Example Street" to lat/long like "51.50152, -0.14138" which I would then pass to my scanning software with a PHP shell_exec and write the PID and time started of this scan to a text file. I remember I didn't know how to program a feature that killed the scan after X amount of time and so what I instead did was every time someone requested a scan it would check this text file and if a scan had gone on longer than 60 seconds it would kill the process pid to stop the scanner. Yeah, it was a bit hacky but as long as someone was hitting that scan button every now and again it'd filter the list somewhat decently. It did mean that if no one scanned for 10 minutes then every scan would go on for that whole idle period.

I made a dumb mistake in using this address to lat/long converter from Google. I was pretty new to the idea of using an API and the idea that APIs having limits in place so they can charge you for additional usage over the free tier. Someone wrote a script one day that polled this address converter as fast and as much as possible and it ran like this for 2 days before I checked my Google location analytics console and saw that I had racked up £5000 in location conversion fees. I was a poor uni student at the time and seeing a five-thousand pound bill made me shit the bed. One of those rare moments in life where you really do feel your heart drop and blood run cold. So thanks for that, whoever did that. It was a good lesson in being a better developer so, cheers and fuck you. I immediately got on live chat with Google support and they agreed that the traffic that I had experienced was abnormal and very nicely wavered the fees I had gotten. I disabled that feature and changed to a free service that was crap in comparison but gave me less heart attacks so was better overall.