HNHacker News
TopNewBestAskShowJobs

john-shaffer

595 karma · joined October 22, 2019

https://github.com/john-shaffer

hn.scorn217@passmail.net

submissionscomments
john-shaffer··on Corona Game: A simulation of how Covid-19 spreads
[spoiler alert]

I found that fully closing schools works better than closing high-risk, and you can leave business fully open for significant periods. My best is 2,582 deaths at a cost of 385B. https://koronahra.cz/results/60e6550661cdc10019e509ce

Masks and max 10 stay on the whole time. I close unis at +100 infections, close all schools at +200, close high-risk at +400, and essentials only at +800. Ease up on the restrictions when infections go down. I ignored those breakpoints and left things as open as possible during the warm weather period, since you can safely do that as long as you kept the initial outbreak under control.

Edit: 2,112 deaths at 380B, just targeting +75/+150/+300/+600: https://koronahra.cz/results/60e65b5dfecc84001a33a3a3

Edit 2: 1,691 at 405B using the 2112 strat with slight adjustments based on intuition: https://koronahra.cz/results/60e65cc061cdc10019e509e6

john-shaffer··on Django for Startup Founders: A better software architecture for SaaS startups
If you're that pessimistic about your front-end code becoming obsolete, I'd strongly suggest looking into ClojureScript with https://github.com/reagent-project/reagent and (if you need SPA levels of coordinated state) https://github.com/day8/re-frame

The up-front costs are certainly higher in terms of the learning curve for the average dev, but it sure beats rewriting the whole thing every few years. reagent dates back to 2013 and has been mostly unscathed by the JS ecosystem churn. I'm under the impression that some (JS-based) React devs catch on to reagent pretty quickly, so the up-front costs might not even be that high.

Fantastic article, by the way!

john-shaffer··on WordPress 18
The appearance is intentional. The author (https://github.com/leonstafford) is very into minimalism and accessibility.
john-shaffer··on WordPress 18
https://pantheon.io/ has WordPress plans with dev/staging/prod sites integrated with git. If you want git, I would highly recommend trying their system out rather than trying to figure out how to make WP cooperate on your own. WP installs normally don't use a VCS at all.

Don't try to use WP for anything involving a lot of programming. It will just hold you back. Use it for projects simple enough that you don't mind writing a few MySQL DDL statements with DIY migrations.

john-shaffer··on WordPress 18
Consider a static WordPress site via the WP2Static plugin: https://wp2static.com Going static solves most of the performance and security problems with WordPress. There's a prebuilt Docker setup at https://lokl.dev/ and an AWS template at https://staticweb.io/open-source/wordpress/ There are also commercial hosts (with their own plugins) at https://www.strattic.com/ and https://www.hardypress.com/

I've worked a bit with Contentful, and it seemed like a pretty good CMS, but pricey. The client was moving off of it because they wanted the more familiar WordPress UI.

john-shaffer··on Why we decided for and against Ubuntu Core
I'm really enjoying Pop! OS. It's Ubuntu (and I installed the default ubuntu-desktop over Pop's), but it has its own "store" with .debs and flatpaks, no snaps. It's still possible to accidentally install a snap, but it's also easy to revert that. It's also very nice how effortlessly the graphics drivers and full-disk encryption work.

I haven't tried Debian on desktop, but it is great for servers.

john-shaffer··on Our app was banned because the button says “Report User” and not just “Report”
> Even 1 hour every few would stop food from rotting

I just put my food outside, in the car. I never lost power, but I didn't want to waste any electricity on cooling food when it was needed so badly.

john-shaffer··on Google Cloud products in 4 words or less
That is encouraging, but it will take years to regain trust. Perhaps GCP will eventually exceed expectations and turn out to be a great platform.
john-shaffer··on Clojure from a Schemer's Perspective
It's also pretty common to leave a REPL running for days or months in development.
john-shaffer··on Google Cloud products in 4 words or less
Since you work at Google, you should be well aware of the deprecations. You don't need evidence of their existence, you just don't see it as a problem. Which you are free to do, since it's not a problem for you, it's just a problem for GCP clients, many of whose complaints you seem to be dismissing as not being "data".

GCP doesn't seem to provide a full list of deprecations, but the list for just one service[1] is pretty terrifying when you consider that your app might depend on two or three dozen services, and a deprecation in just one of them forces you to rewrite perfectly good code. A cursory search reveals a number of reports of being repeatedly bitten by deprecations[2][3][4], so no one should be mislead by the dismissals here. [2] has a good cautionary tale of a forced "upgrade" leading to potentially much greater cost.

[1] https://cloud.google.com/appengine/docs/deprecations [2] https://nilsnh.no/2019/11/09/managing-the-google-cloud-platf... [3] https://www.slideshare.net/async_io/lessons-learned-from-bui... [4] https://www.lastweekinaws.com/podcast/aws-morning-brief/whit...

john-shaffer··on Google Cloud products in 4 words or less
The best one is the Googler article linked in a sibling: https://medium.com/@steve.yegge/dear-google-cloud-your-depre...

That alone is more than enough to substantiate what I'm saying, but if you need more examples than just search or read HN a bit, due diligence, etc. I was personally lucky in that I got burned in the planning stages and didn't have to get burned in production, but I still wasted all that planning time and ended up having to use AWS instead.

john-shaffer··on Brave buys a search engine, promises no tracking, no profiling
DDG is registered as a Brave creator, so they can get some revenue from Brave users without ads.
john-shaffer··on Google Cloud products in 4 words or less
Oh, I misunderstood what you meant by mothballed. Still, that is honestly a good example of why AWS is so much more reliable than GCP. AWS will keep the service running as-is even if they don't make any changes to it. GCP would just deprecate it instead and kill it off completely. Maybe that hasn't affected you yet, but the available evidence says that it has burnt plenty of people.

We can't even be sure whether GCP itself will be around in 3 years:

> In early 2018, top executives at Alphabet debated whether the company should leave the public cloud business, but eventually set a goal of becoming a top-two player by 2023, according to a report from The Information on Tuesday. If the company fails to achieve this goal, some staffers reportedly believe that Alphabet could withdraw from the market completely. [1]

That's disputed and is not hard data, but there's not any positive reason to believe that GCP will exist after 2023 either.

[1] https://www.cnbc.com/2019/12/17/google-reportedly-wants-to-b...

john-shaffer··on Google Cloud products in 4 words or less
> I've had many AWS features mothballed.

What, exactly? AWS is legendary for maintaining compatibility. Steve Yegge's article gives a good break down on how infamous GCP's deprecation practices are.

I was lucky in that GCP killed off the feature I wanted before I ever used it, so I didn't have to get burned in production. AWS has never burned me. (GCP used to have a service to do transformations on images in object storage, which I learned about in an App Engine book. It took me a few hours of searching to even find the deprecation notice. Now I just use https://github.com/awslabs/serverless-image-handler because I don't trust GCP).

john-shaffer··on jQuery 3.6.0
> What is the current use-case for jQuery?

WordPress ships with it, so using jQuery often doesn't require any extra footprint. I still prefer vanilla calls for admin-only code, but jQuery has better compatibility for user-facing pages.

john-shaffer··on The future of web software is HTML over WebSockets
> In essence, I am building a DIY database such that people connect directly to the database and get that sweet giant JSON object along with a stream of updates.

biff implements this as a framework, backed by the Crux bi-temporal DB. It natively uses EDN rather than JSON, but emitting JSON should be trivial if that's needed.

https://findka.com/biff/#introduction

https://opencrux.com/main/index.html

john-shaffer··on The modern packager’s security nightmare
Can you give an example of a real ecosystem that can't handle such a conflict? In my actual experience, the package manager will either automatically use the latest version, or in one case has more complex rules but still picks a version on its own (but I stay away from that one due to the surprise factor). Your argument has force against bad package managers and against using very strict dependency requirements, but not against pinning dependencies sensibly in a good ecosystem.

The only conflict I've seen that can't be automatically resolved is when I had some internal dependencies with a common dependency, and one depended on the git repo of the common dep (the "version" being the sha hash of a commit), and another depended on a pinned version of the common dep. Obviously there's no good way to auto-resolve that conflict, so you should generally stick with versions for library deps and not git shas.

john-shaffer··on Reminder: Terraria Dev’s Google Story Is Not Unusual at All
If you're going to use WordPress, consider https://wp2static.com so your site can handle real traffic. There's no reason for a blog or business site to go down when it makes the news.
john-shaffer··on Software engineering topics I changed my mind on
> It's kind of like a drug. I don't play any more video games - coding is my video game.

I feel the same way. I just make sure I take one full day off a week and play games or read. I can still get burned out, but it's generally short-lived.

john-shaffer··on Weak Men Are Superweapons (2014)
This is very perceptive. Attempts at honest discussion often seem to be derailed in exactly this way. Discussion of the actual issue is avoided by loud assertions that take a lot of time to refute. Which "side" derails it does seem to depend on who the "weak man" would hurt.

Is there any way to avoid this?

john-shaffer··on IPFS Support in Brave
That was a bug that was fixed pretty quickly. Details: https://news.ycombinator.com/item?id=25841456
john-shaffer··on GitHub Stale Bots – A False Economy
There are decoupled tools like https://statically.io/ to do this. One can have the straightforward builds of GP and still have good static site generation.
john-shaffer··on State of JavaScript 2020
The situation with Clojure/ClojureScript is a lot more stable. Most libraries are pretty rigorous about backwards-compatibility. When someone comes up with a better approach, they release it as a new library under a different name instead of making breaking changes to the old one. You will probably still need to pull in some npm packages, but you can cherry pick those and keep it to a manageable number.
john-shaffer··on Is the Schrödinger Equation True?
You did fine. There's just a lot of down-voting for poor reasons. I've had comments down-voted about three seconds after posting them.
john-shaffer··on Getting Started with Brave
You have to explicitly find and enable the ad notifications. It can actually be a bit of a PITA to enable. It's not even supported on my phone. The purpose is if you want to support websites, but don't want to spend money. The ad revenue goes in a wallet, and you decide who to disburse it to (they do have to be registered as a Creator -- Brave's system is subject to KYC laws). The revenue is small and not worth the notifications, so transferring funds to your wallet is generally a much better option.

That thread looks like someone had a device with ads explicitly enabled. Perhaps someone else set it up, or he just forgot about it. That happens all the time with software.

The case is that most of the bad press is inaccurate and overblown, and Brave has changed course when needed. Their track record is imperfect, but far better than the mainstream alternatives.

I don't have sources other than that I've been using Brave as my primary browser on all devices.

john-shaffer··on Getting Started with Brave
> how they collect money without actually promising to give it to people that they claim to act opn behalf of

This has not been the case for a long time.

Any effective solution in this space is going to be controversial. Brave is far from perfect, but it is much better than allowing Apple or Google to control your browser and doesn't require any tech expertise to use. Those companies generally don't apologize or revert their scummy practices.

john-shaffer··on 5M+ Wordpress sites use “Classic Editor” plugin
> I can't imagine anyone meeting WordPress for the first time today would say "It's great but I HATE that editor! Don't they have something a bit more... classic?"

They don't know enough to say this. They just complain about how difficult and confusing WordPress is.

john-shaffer··on 5M+ Wordpress sites use “Classic Editor” plugin
The Classic Editor.
john-shaffer··on Why Clojure? (2018)
As soon as a language borrows s-expressions, it's a Lisp. This makes it impossible in practice for a non-Lisp to just "borrow" s-expressions. Definitely not an accident.

On the other hand, you do have languages like XML which is basically a much more cumbersome syntax for s-expressions.

john-shaffer··on GameLisp: Scripting language for Rust game development
Oh, thanks for the explanation. That makes things very clear.

I'm not sure when I'll get time to play with GameLisp, but it looks absolutely brilliant. I'll keep an eye on it; maybe some interesting open-source project will turn up that I can hack on.

← PreviousPage 2 of 7Next →