Baywatcher - A Go Experiment

Baywatcher

My notes after completing ‘Baywatcher’, an Ebay search assistant. It is not really a technical document, more like a business perspective of a programmer.

Short Facts

  • Aim of the app: Find Ebay items that match a query and are below a certain price short before the end of an auction and notify the user of it*.
  • Why: Evaluate Go in a real world application.
  • Where: http://baywatcher.krisdigital.com

* On ebay you can follow a search, but you get items long before end of auction, which turned out to be not very useful for me.

Functionality

  • Create an account and and a wishlist of items
  • A search consists of keywords, a max price, an ebay category and the ebay store (country)
  • Searches are done repeatedly for the user and if a search criteria is met 4 hours before end of auction, the user is notified by email

Tech Stack

  • Go, intentionally without any external dependencies
  • React for the frontend
  • Milligram CSS Framework for better optics ;)

Go experience

I liked the minimal approach, the explicitness, the completeness of the toolset, from code formatting (using old school Textmate), great standard library (http, encryption, sql, xml, json etc.), to testing, there is everything included. At the end you get a compiled binary with top performance. It was also easy to pick up and get productive.

Statically typed, it prevents many errors upfront, but it does not get too much in the way either. Code amount vs progress efficiency is also good, as I would say.

I understand that the explicitness can also be seen negative, you have to write if err == nil very often, it is a matter of taste. I will check Elixir next and decide which I like better. For me it is a big plus to have code, that is easy to read.

Compared to RubyOnRails (which I use and will use quite often), where there are already 10 gems for every problem you can think of (which is good), in Go it is great to build stuff your own with the tools of Go. It helps you solve problems and does not get in the way doing so. That said, you probably will not find yourself programming a CMS like website or CRUD app with it, there are better tools for that out there.

Right tool for this job

YES

Things Go is good for

  • Building services, especially if they work with http
  • everything performance and concurrency critical
  • Apis (imo as long not too much database complexity is involved)

Result

The app not only works, but it also turned out to be quite useful for me $$$ ;)


Comments