Sam Gentle.com

Prototype Wrapup #23

Last week I made 3 prototypes, and this week I also made 3.

Monday

I had an amusing thought while I was looking at one of my Github projects: web startups often have big obnoxious name-drop banners that list all the companies using their software. Why can't I do the same for my projects? So I thought it'd be funny to make a tool to automatically generate such a banner by pulling down the list of people who starred your post and cross-referencing it with the logos of the places they work. So this was the first part, grabbing the list of starring companies. I used plain ES6 now that NodeJS has nearly full support, and it was much nicer than having to use the whole Babel transpiler toolchain.

Tuesday

I took a quick break to work on a Go tool to deal with the issues I had with GOPATH last week. I realised that if the compiler "needs" your project to be in GOPATH to satisfy whatever rubber stamp idiocy it has internally, I could just make a a tool to generate a fake GOPATH and symlink the project in there (I called it golinkyourself). Predictably, that didn't work because of issues with symlinks and paths and the Go tool, but I eventually made a variant (called goly) that symlinked the vendor directory instead, which seems to work well enough. I of course wrote these tools in Go, which continues to be very enjoyable to write despite its incomprehensible tooling decisions.

Wednesday

Back to my Github starring adventure. I wanted to get the logo images of the most popular organisations on Github, on the assumption that they would correlate well to companies trendy enough to feature in a name-drop banner. Github's API doesn't really support this, but there is another site called Github ranking that collects this information from Github. So I re-collected it from them; it's the circle of life! I wrote this in Go using a jQuery-like HTML parser called GoQuery, which was quite nice to use.