▲ | mtlynch 9 days ago | ||||||||||||||||||||||||||||||||||||||||
I think this is a fun thing for TigerBeetle to do, but I'm pretty skeptical that this was a good engineering decision. And it's fine to make non-optimal engineering decisions for fun, but the top reason in the article should be, "Because we thought it would be fun to code a docs site from scratch." This post reminds me a lot of an article I read on HN about a year ago and can't find now, but the author was explaining how so many organizations end up investing humongous amounts of effort rolling their own databases from scratch because none of the off-the-shelf solutions meet all their requirements. But in most of these cases, it's because some of the "requirements" were actually "nice-to-haves" and they could have gotten by fine with an off-the-shelf database, but they talked themselves into building one from scratch. A lot of the justifications here feel pretty weak: - Didn't want to use a complicated React app? Use Hugo or Pelican or Eleventy. - Wanted nice reading experience? Replace the default CSS in any SSG. - Want a nice search experience? Theirs looks good, but is probably also achievable in off-the-shelf SSGs and is probably not worth rolling their own docs site from scratch. >We employed a Content Security Policy to prevent Cross Site Scripting (XSS) as defense-in-depth, in case a seemingly friendly PR contains some innocent looking MathML. This MathML could contain obfuscated code that would run in the user’s browser. CSP prevents any unwanted inline scripts from running and keeps our users safer. This was the silliest reason of all. Who's XSS'ing a docs site through obfuscated markup contributions? That sounds pretty difficult to achieve in the first place, and then what's the reward for achieving XSS on TigerBeetle's docs site? There's no valuable data there. At worst, you'd mine tiny amounts of crypto in a serviceworker. But also, you can mitigate this risk in lots of ways that don't involve rolling your own docs site. Edit: They don't seem to actually be using CSP at all: https://gist.github.com/mtlynch/92c991cfe48652feee491d4f4652... Edit2: Nevermind, they actually do but in HTML. Hat tip to pfg_. | |||||||||||||||||||||||||||||||||||||||||
▲ | jorangreef 9 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||
Joran from TigerBeetle here! We didn't design our docs because it was "a fun thing" (as suggested) but rather because we simply care deeply about the experience of developers reading our docs. For example, concerning performance and offline use, which were further reasons we gave in the post. We have a high bar for taking on dependencies. We don't take on dependencies automatically without justification. It's just not a philosophy that we share, to assume or to insist that everything needs to be a dependency. (The discussion on CSP in our post was also not given as motivation, but as an example of the thought process that went into this. Again, as per the post, it's a matter of defense-in-depth. We have plans for how our docs will be used in future, that you may not be aware of, and security is important.) Finally, we're happy with the result, the project was small and didn't take long. We're used to "painting" things like this fairly quickly. It's just easier for us than trying to "sculpt" off the shelf dependencies. That's not to suggest that everyone needs to paint like we do at TigerBeetle, but it's equally true that not everyone needs to sculpt either. [1] [1] To understand our engineering methodology, and why we prefer to paint than sculpt, see TigerStyle: https://www.youtube.com/watch?v=w3WYdYyjek4 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
▲ | dustbunny 9 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
To evaluate this as your are describing, you must reveal your estimate of the workload of what Tiger Beetle has done to roll their own docs. If it took them 5 minutes, for instance, the calculus is far different than if it took 5 years. Plus you must compare that time estimate to their other priorities to estimate the opportunity cost, something that you simply can not do accurately from the outside looking in. And we must estimate the potential future value of what Tiger Beetle has done here. I value "no dependencies" pretty deeply and I can see how Tiger Beetle values it supremely. I don't see how you can hand waive it away so easily. To assert that you don't believe Tiger Beetle at their word here is deeply disrespectful imo. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
▲ | ksec 8 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
>To be honest, the hard part of static site generation is parsing the Markdown, since Markdown is a complex language. Everything around it is simple scripting, which we can easily do ourselves. I would think 95%+ of the work would be in pandoc if everything was from scratch. And they would have used Zine if it had supported the feature they want. For larger project, mostly DB selection I completely agree with what you said. But for SSR, especially when there are other similar OSS like Zine available, I think they are fine. Although I do wish if Zine had all the improvement Tigerbeetle wanted so at least the Zig community could all use one rather than roll their own. | |||||||||||||||||||||||||||||||||||||||||
▲ | data_ders 9 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
> how so many organizations end up investing humongous amounts of effort rolling their own databases from scratch because none of the off-the-shelf solutions meet all their requirements. But in most of these cases, it's because some of the "requirements" were actually "nice-to-haves" and they could have gotten by fine with an off-the-shelf database, but they talked themselves into building one from scratch. I love the term "arbitrary uniqueness" for this too. Like how different are your needs, really? | |||||||||||||||||||||||||||||||||||||||||
▲ | code_biologist 8 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
I think this is a fun thing for TigerBeetle to do, but I'm pretty skeptical that this was a good engineering decision. Ha, yeah, as an 8 year software engineering manager I'll agree that "fun" is not a good initial look for a new project, sadly — the best engineering decisions are boring far more often then not. After years of insisting on picking boring options, I realized working like that was a buzz kill long term for my reports, I tried to relax and figure out how to have fun projects too. Give people with ideas space to run. My deal now is, the tighter the blast radius of the project you can give me, the more I'm ok with you going nuts. Documentation is a great place for fun, low-blast-radius projects, so I totally get TB on this one! Some other rules I give up front for project proposals. Hopefully the theme of blast radius control is charmingly obvious: - No new languages. (I have had professional arguments over this) - No fun projects that require ongoing labor/upkeep. - No fun projects in stateful storage infrastructure. (I have had distressingly passionate professional arguments over this) - No fun projects that involve new SaaS / hosting providers that can't be trivially cut loose or cost > $50-100/mo. - Fun projects in generally persistent infrastructure need solid justification. - Fun design system / UI infrastructure projects must be able to be gracefully incrementally adopted, or scoped tightly. | |||||||||||||||||||||||||||||||||||||||||
▲ | pfg_ 9 days ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
Content security policies can also set in a meta tag in html | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
▲ | jessekv 9 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||
It's mostly just pandoc though? And they chose it to avoid any non-standard markdown. | |||||||||||||||||||||||||||||||||||||||||
|