Weekly development updates. Feed.

 3 Feb 2020

Like most programmers, I don’t like dealing with timezones, and this week didn’t make me like them any more.

GoatCounter can now display the charts in any timezones; adding the code for that wasn’t too hard; getting the UI to select the timezone was. I don’t think that selecting a zone name like Europe/London or Asia/Makassar is great UX, so instead it’s sorted by country name first, and timezone second.

Still some work to be done: some better filtering and formatting of the <select> with some JS might be nice, and it could support aliases better (e.g. Ethiopia shows as Africa/Nairobi (EAT), but it would be more appropriate to show – or at least add – the Africa/Addis_Ababa zone as well). Unfortunately getting all this information from the IANA tzdb is a bit tricky.

This is also the first deploy that really went wrong >_< The initial version didn’t work when there was no TZ set yet. I fixed that quickly, and then it turned out that browsers don’t always send the canonical timezone but also send various various aliases/deprecated versions, so it was erroring out on that :-/ I just rolled everything back and fixed it this morning instead of yesterday evening.

Other than that, a few small fixes, the rests run against both SQLite and PostgreSQL now, you can now run a TLS server with -tls [..], and there are a number of improvements to the “admin” page (which only affects me).

27 Jan 2020

Quietly churning along with a bunch of new features: the site code is a lot simpler, you can ignore your own views, link to the page in the overview, configure data retention and the thousands separator. Also fixed various smaller issues, and Lukas Murdock contributed a logo, so it looks all professional and stuff :-)

The most exciting update is that GoatCounter will be funded by the NGI Zero PET fund. This has been in the works for a while, but things are close to being finalized. This will give me €25,000 so I won’t have to worry too much about the financials for a while, and can just focus on building a great service (rather than spending time marketing it).

I’ll write a more detailed overview about the financials later, although it’s mostly fairly uninteresting: I currently get about €70/month in total from subscription and Patreon, hosting costs are about €30/month, and I spent about 6 months working on this full-time, so I invested about €30k of my own money.

20 Jan 2020

Been a busy week; the announcements on Lobsters and HN were received quite well, with loads of feedback and reports. I was a bit worried about this after my first announcement on HN was mostly ignored back in August 😅 The HN gamble is such a fun game.

The biggest visible change this week is that you can now filter pages. It only affects the page list (and not the browser/size/location stats) at the bottom, as they’re stored in a way that makes it impossible to adjust right now. I’m not sure if that’s a huge problem.

Most of the other changes have been fairly small bug fixes or improvements, most of them prompted by feedback (chat, email. GitHub, HN thread). Nothing especially spectacular.

The site code could be a lot better; there is no reason to build the <script> tag dynamically; can just use <script src=".."> with some tricks. The patch should be ready, just want to test it a bit more (unfortunately I haven’t been able to find a JavaScript testing solution that I like, so no automated tests 😞).

13 Jan 2020

Haven’t done too much in the last week as I was on a short holiday to Gili Air, which is a very nice island will probably be back (it’s fairly close to where I live). I wanted to release 1.0 on Jan 5th, but felt rather sick that day, and didn’t want to release/announce it just the day before going away either.

Last week was pretty active though, with many updates to GoatCounter: the -debug flag makes printing debug logs easier, the rate limiter is a lot better, and many minor bugfixes. Probably the biggest user-visible change is that I replaced input type="data" with a JS datepicker on all non-mobile platforms. The HTML 5 input doesn’t work on Safari, looks real ugly in Firefox, and styling the input in a cross-platform manner is really tricky for some reason. Replacing it with JS is just easier for now.

The hosting is now more resilient since requests to /count will be “buffered” and retried with httpbuf if the main goatcounter process is unavailable. I originally created this for the ~5 minutes of downtime required for a PostgreSQL upgrade, but it’s also useful to protect against general downtime. Also see the Varnish VCL.

I also created border, a small commandline tool to add a border around PNG images, fixed a file descriptor leak in reload (funny how long these bugs can go unnoticed), and fixed a few small syntax highlighting issues in gopher.vim.