Better HN
topnewbestaskshowjobs
Log inSign up

physicles

1,822 karma · joined Feb 3, 2019 (7y ago) · 645 submissions

Submissions

comment 1y ago · link · parent

Here in China, I’ve seen this sign dozens of times: “向前一小步,文明一大步”

One small step forward, one giant leap for civilization.

comment 1y ago · link · parent

Just started this at my company. I’m excited for the boost to dev morale.

comment 1y ago · link · parent

Always telling you how much money he makes? He sounds like a bundle of fun.

comment 1y ago · link · parent

In my climbing group, we consider a weight difference of more than about 25kg to be too dangerous when leading. It’s definitely a safety issue for both climber and belayer.

At two meters tall and 93kg, by necessity I own an Ohm (by Edelrid), which buys an extra 20kg or so of margin.

comment 1y ago · link · parent

Indeed. When I mentor new lead climbers/belayers, I point out that lead belaying should feel about as stressful as lead climbing. If it doesn’t, you’re not paying attention.

comment 1y ago · link · parent

Gave you an upvote not because I necessarily agree, but to counter the downvotes.

I agree that it’s clear we need more nuclear, but could you explain why solar and wind are dangerous compared to nuclear? Did you mean that all the attention on solar and wind, which can’t be scaled fast enough and must be paired with grid storage, has screwed us when it comes to addressing climate change?

Also, calling solar and wind inefficient isn’t precise enough. By what metric are you judging them to be inefficient?

comment 1y ago · link · parent

I have a command line tool that just takes a line of input, then writes the time stamped entry to a text file, one per quarter. A cron job pops up a terminal once an hour during business hours. I use that log to prepare for performance reviews to recall what I’d worked on, and I often go back to remember details about a problem I solved months or years ago. It’s fantastic, been using it for seven years.

In 2023, I wrote another script that appends a line to a csv file every 5 minutes. The line includes the focused window class, command line, title, name of the git branch that’s currently checked out, system idle time, and WiFi access point name. So I know pretty much how long I was working on everything vs other stuff like slack.

I’m finally starting to write tools to visualize and analyze this data. Is it going to change how I work? Not really, but for some reason I like seeing at a glance how I spent my time.

comment 1y ago · link · parent

And going in a circle is fine. If you do arrive back where you started, you’re a different person because of the experiences you had along the way.

comment 1y ago · link · parent

Reflect for iOS (black and blue circle icon). I found today on a search through Reddit r/QuantifiedSelf. The UI isn’t that polished, but it’s super customizable and has JSON export. Also has built-in analytics, like experiments.

Previously I was using Daylio, but that only allows you to make one entry per day.

comment 1y ago · link · parent

I think this is spot on. I’ll add that having journals from different stages in life will be invaluable later on when you want to know how you’ve changed (and, depressingly, how you haven’t changed). For me, stretches of months without journals or photos are simply lost to time.

comment 1y ago · link · parent

Does this work for Claude? I have a Google voice number, and Claude rejects it.

comment 1y ago · link · parent

Looks like they learned this from the US government, which signed a series of treaties with the various Indian groups in the 1800s and then ignored the treaties.

comment 1y ago · link · parent

It’s completely different.

Could a rogue engineer inject whatever code they want into an app update? Possibly yes, but 1) that code will get shipped to every phone at the same time, 2) that code has to do its thing without anyone noticing, which is tricky at scale (this is how malware gets discovered), and 3) there’s an audit trail so that engineer will be exposed to legal risk.

The difference here is that with Eight Sleep, an engineer can remotely access the customer device in real time and poke around the network the bed is connected to, and there may be no audit logs. They can exfiltrate sensitive data with much less effort and less legal risk than with an app update.

comment 1y ago · link · parent

Interesting strategy with appending the commit hash to the dataset name. If one of those commits is known to be good and you want to “ship” it, do you then rename it?

What are you doing with that JSON? What’s the reason why you can’t get a representative sample of rows onto your dev machine and hack on that?

comment 1y ago · link · parent

A couple years ago, we were using a take home coding assignment as a hiring signal. It was a small API based off something I'd built for an internal tool. It was self-contained and relatively easy to explain. The .md file was about two pages.

I recently fed it into ChatGPT and asked it to do the assignment. It did it perfectly -- I read the code in detail and couldn't find any issues.

So custom questions are off the table now, too. We'll be using a code review instead for the next round.

comment 1y ago · link · parent

I noticed this parallel too. At least the US has the option for some sort of change in two and then four years.

comment 1y ago · link · parent

I never understood the rationale behind TimescaleDB — if you’re building a time series database using row-oriented storage, you’ve already got one hand tied behind your back.

What does your testing strategy look like with bigquery? We use snowflake, but the only way to iterate and develop is using snowflake itself, which is so painful as to impact the set of features that we have the stomach to build.

comment 1y ago · link · parent

We’ve been using InfluxDB 1.x since 2017 and I’m itching to get off of it. Currently we’re at about a trillion rows, and we have to ship our data to Snowflake to do large-scale aggregations (like hourly averages). I put a bunch of effort into building this on top of InfluxDB and it’s not up to the task.

Any sense if ClickHouse can scale to several TB of data, and serve giant queries on the last hour’s data across all sensors without getting OOMKilled? We’re also looking at some hacked together DuckDB abomination, or pg_duck.

comment 1y ago · link · parent

Reminds me of those “skateboarding is not a crime” stickers

comment 1y ago · link · parent

It can also hurt in some situations. I have absolute pitch, and used to sing in a choir. Sometimes the director would decide to use a different key than the one written on the sheet music, which meant that I’d have to transpose in my head in real time.

comment 1y ago · link · parent

This is currently happening to me: I’m starting to be off by a half step when I guess what key something is in. I’m 40 now, and I started noticing it a few years ago. Maybe it started early because I don’t play much music so I wasn’t using it much.

This video by Adam Neely was helpful: https://youtu.be/QRaACa1Mrd4

comment 1y ago · link · parent

As I understood it, the “algebra” is the domain-specific language/abstraction that you build — and if you’re lucky, discover — that encodes something fundamental about the domain you’re working in. Once you’ve found that, further coding is easier than you’d expect.

I’ve had the pleasure of finding a few of these over my career.

comment 1y ago · link · parent

Over the years, I’ve wasted 1-2 days of my life debugging bugs caused by unintentional variable shadowing in Go (yes, I’ve kept track). Often, the bug is caused by an accidental use of := instead of =. I don’t understand why code that relies on shadowing isn’t harder to follow. Wish I could disable it entirely.

comment 1y ago · link · parent

I avoided subscribing for years out of principle, just backed up my photos locally (which they make as painful as possible — afaik it’s not possible to just plug your phone into a Linux machine and grab all the new photos).

I finally caved a few months ago when I got tired of fighting with the awful backup storage UI that makes it difficult to determine why the backup is failing even though it’s smaller than 5GB.

Apple has every incentive to make that UI as bad as possible while still being functional.

comment 1y ago · link · parent

This is true. And the comments are full of people confused about how the article is using the term REST.

comment 1y ago · link · parent

I don't see why it couples clients to the implementation.

Effectively, there's no difference between writing the code first and updating the OpenAPI spec, and updating the spec first and then doing some sort of code gen to update the implementation. The end state of the world is the same.

In either case, modifications to the spec will be scrutinized to make sure there are no breaking changes.

comment 1y ago · link · parent

Maybe I've been educated in a strange part of the internet, but I assume that this ship already sailed ~10 years ago: when most people (90%+) hear REST, they imagine something vaguely like JSON-RPC.

(and this is how ChatGPT, a sort of average of all opinions on the Internet, understands it)

So if you say REST and mean something other than that, then you're committing to being misunderstood by most people.

comment 1y ago · link · parent

> There is no difference between OpenAPI and REST, it's a strange distinction.

That threw me off too. What the article calls REST, I understand to be closer to HATEOAS.

> I've open sourced a Go library for generating your clients and servers from OpenAPI specs

As a maintainer of a couple pretty substantial APIs with internal and external clients, I'm really struggling to understand the workflow that starts with generating code from OpenAPI specs. Once you've filled in all those generated stubs, how can you then iterate on the API spec? The tooling will just give you more stubs that you have to manually merge in, and it'll get harder and harder to find the relevant updates as the API grows.

This is why I created an abomination that uses go/ast and friends to generate the OpenAPI spec from the code. It's not perfect, but it's a 95% solution that works with both Echo and Gin. So when we need to stand up a new endpoint and allow the front end to start coding against it ASAP, the workflow looks like this:

1. In a feature branch, define the request and response structs, and write an empty handler that parses parameters and returns an empty response.

2. Generate the docs and send them to the front end dev.

Now, most devs never have to think about how to express their API in OpenAPI. And the docs will always be perfectly in sync with the code.

comment 1y ago · link · parent

Fascinating! Definitely get the old school TV vibe when I'm watching it. I'm curious whether I'd find it more or less addictive/mindless than actual YouTube.

comment 1y ago · link · parent

help.autocorrect_enabled_or_accept_after_dsec? A name scary enough to convince anyone who uses it to read the docs.
1
678
22