Better HN
topnewbestaskshowjobs
Log inSign up

bretthopper

3,474 karma · joined May 27, 2010 (16y ago) · 333 submissions

http://twitter.com/swalkinshaw
Submissions

comment 2w ago · link · parent

The term/concept is borrowed from https://cleaningtheglass.com/stats/guide/garbage_time

So that button will select the whole game _excluding_ garbage time. I really need an About page on the site to explain lots of concepts and features; coming soon! (and a changelog)

comment 2w ago · link · parent

Currently I'm using NBA.com. See https://github.com/swar/nba_api for more details on that (I used it to create my own Rust client).

So far I'm trying to exclusively rely on cdn.nba.com endpoints. There are repos with historical PBP data too if you want to avoid hitting their API. Eg: https://github.com/ramirobentes/nba_pbp_data

If this project becomes more successful then I would look into paying for a real data provider like https://sportradar.com/

comment 2w ago · link · parent

I worked at a sports company forever ago, and ever since then, I've wanted to build my own NBA scores + stats site. After a few false starts over the years, I have a new concept called Center Court that I'm so excited about.

It's primary purpose is for live boxscores because all of the major sports sites have terrible UI/UX experiences. I always defaulted to ESPN.com but it's so slow and awful. Center Court is basically a bridge between espn.com (or nba.com) and more advanced stat focused sites that don't offer a good live experience.

The technical implementation behind it is quite novel in this space too. Instead of storing computed statistics in a database, I store raw play by play payloads immutability and everything else is derived from those and can be trivially rebuilt so the event log is a derived cache of the payloads. Every stat on every page is a pure fold over the event log at request time; no derived number is stored.

This enables some powerful features like being able to re-derive a game's entire state at any point of the game (or even a time range). Example game to try out: https://centercourtlive.com/game/0022600197

The site is meant to be extremely fast. It's all server-side rendered with progressive JS enhancements. URLs are immutable and cached behind a CDN.

https://centercourtlive.com/

comment 2mo ago · link · parent

This comment is 10x more useful than your website. I'd suggest moving most of this copy onto the site just in a better format.

5.

Accept: Text/Markdown(acceptmarkdown.com ↗)

4 points · by bretthopper · 7mo ago · discuss

6.

Quien – A better WHOIS lookup tool(github.com ↗)

100 points · by bretthopper · 7mo ago · 45 comments

comment 11mo ago · link · parent

https://brandur.org/

8.

There's a Reason Bar Ice Looks Better Than Yours (and You Can Fix It)(seriouseats.com ↗)

28 points · by bretthopper · 1y ago · 4 comments

9.

Don't Tolerate Unsolicited Spam(benword.com ↗)

2 points · by bretthopper · 1y ago · discuss

comment 2y ago · link · parent

Google made $280B in revenue in 2022 which means this article is claiming that at least 1/3 of it (since they said over $92B) is coming from Android only.

Does that align?

11.

Kenton's House(kentonshouse.com ↗)

2 points · by bretthopper · 3y ago · 2 comments

12.

Adventures in Garbage Collection: Improving GC Performance in Our Monolith(shopify.engineering ↗)

12 points · by bretthopper · 3y ago · discuss

comment 3y ago · link · parent

You are missing a few things about the Ruby based CLI:

1. dependencies for Gems are specified in the gemspec file and not the Gemfile. See https://github.com/Shopify/shopify-cli/blob/main/shopify-cli... for example. There's a few non-development dependencies.

2. since it's difficult to package up a Ruby gem for distribution, maybe dependencies were vendored directly in the codebase: https://github.com/Shopify/shopify-cli/tree/main/vendor

This isn't meant to be a comparison of the number of dependencies or anything. Just pointing out a few nuances to how the Ruby dependencies were handled.

comment 3y ago · link · parent

This is an editorialized title. Bloomberg's is "Shopify Tells Employees to Just Say No to Meetings"

comment 3y ago · link · parent

I'd guess very hard. But just refactoring the WordPress codebase isn't enough, you'd ideally want every plugin to adopt the new API as well... Although you could always keep this implementation as the fallback behaviour.

comment 3y ago · link · parent

I'm highly in favour of this, but wanted to point out an important implementation detail in case people don't want to look through the code.

Since WordPress doesn't have a database abstraction, SQLite integration is done by transforming the SQL query strings meant for MySQL. This not only means doing regexp matches with string replacement, but trying to emulate MySQL functions with either SQLite equivalents, or in the worst case, in PHP application code.

17.

The Mysterious Case of the Fucking Good Pizza (2021)(vice.com ↗)

3 points · by bretthopper · 4y ago · discuss

comment 4y ago · link · parent

There's an existing WP "drop-in" plugin that can be used with Composer: https://github.com/aaemnnosttv/wp-sqlite-db

Using that + a WP composer package (like https://packagist.org/packages/roots/wordpress) is much easier to maintain that a full "fork" of WP.

comment 4y ago · link · parent

There's about 4-5 very predictable comments already that boil down to: "you’ll end up building a framework"

The author of this article directly addresses that common trope, so these comments are lazy. In fact, this article has a very nuanced but important rebuttal to that argument:

> no, you’re going to write an app instead of a framework.

comment 4y ago · link · parent

The Information: A History, A Theory, A Flood by James Gleick

This is specific to "Information, communication, and information theory." but it's still quite broad and a great read.

21.

Neural network from scratch(sirupsen.com ↗)

208 points · by bretthopper · 4y ago · 38 comments

comment 5y ago · link · parent

Of course not, their status page says All Systems Operational! (yes it's down)

https://status.digitalocean.com/

comment 5y ago · link · parent

The one caveat this article doesn't mention is worse handling but they replied in the comments about it. And handling matters way more at higher speeds, plus they commented the extra weight matters more for steep climbs too.

comment 5y ago · link · parent

We quickly ran into the same issue at Shopify. We've since moved from a flat list into sections by "domains"; within each section is the breakdown by type. You can see it here: https://shopify.dev/docs/admin-api/graphql/reference

Of course this grouping has to be done a little manually. And it's not perfect, but definitely better than the flat alternative. For reference, we have thousands of types.

comment 5y ago · link · parent

I clicked on an example site (https://singlel.ink/u/gloomytoons) and opened up my network inspector:

15 requests 18.65 MB / 3.55 MB transferred Finish: 2.22 s DOMContentLoaded: 529 ms load: 2.23 s

All of that just to render a simple"micro site" that displays a little text and 6 links.

comment 5y ago · link · parent

You make a good point and I do agree. Also at any bigger company, no one person's experience is completely representative. It depends on the person, manager, team, org, etc. There's no way any one person could know everything about a company.

But my comment wasn't really about cultural or org issues (which can be much more subjective); it was more about specific facts that are binary. I'll read people say something like "x company is rewriting everything in Go because Rails is slow" when it's not true at all.

comment 5y ago · link · parent

Over the past year I've slowly started to realize this as well. What changed? Working for a company that is publicly known enough for people on HN (and Reddit) to comment about it. It has been hilarious and scary to read comments from people who don't work at the company say completely inaccurate things like they are facts.

In this case, it's easy for me to recognize they are wrong. But what about other topics (or companies) I don't know much about? I have no easy way of recognizing inaccuracies so I default to mostly accepting them. Sadly, you need to be skeptical of almost everything you read even when the person sounds like they know the subject matter.

comment 6y ago · link · parent

No, it's still Ruby but built directly on top of Rack.

comment 6y ago · link · parent

Doesn't it come from Bitkeeper?

See https://github.com/bitkeeper-scm/bitkeeper/blob/master/doc/H... for master/slave terminology.

12345
12