HNHacker News
TopNewBestAskShowJobs

peter_l_downs

3,239 karma · joined October 20, 2010

https://peterdowns.com

Always happy to meet a stranger, please reach out any time: hn @ peterdowns.com

[ my public key: https://keybase.io/peterldowns; my proof: https://keybase.io/peterldowns/sigs/9N-85LOZH1eJMXHLR70WroivxJB1is_s3ye5IT5xzxs ]

submissionscomments
peter_l_downs··on Pgtemp: The easiest way to write tests with Postgres in Rust, without Docker
Yeah, the parent project mentions that you can use pg_dump and pg_restore, but the examples don't seem to show that (or I'm misreading them.) My project uses template databases to do exactly what you said. Definitely fast and definitely nice.
peter_l_downs··on Pgtemp: The easiest way to write tests with Postgres in Rust, without Docker
Interesting idea to implement a proxy that does something on each new connection. I’ll have to think about that but very cool concept that lets this work for tests written in any language.

Will each testcase need to run migrations after connecting for the first time? Also, I’m used to using clients which lazily pool connections, do they still work with this model?

Op, I’d be curious what you think of my project pgtestdb, which takes a different approach: use a single server, but create new databases each time. Maybe there is some middle ground where a proxy creates a new cloned db after each connection? https://github.com/peterldowns/pgtestdb

peter_l_downs··on I Fucking Hate Jira (2022)
Agreed. Other than Linear, are there any task trackers that people enjoy using?
peter_l_downs··on Bob Moore, who founded Bob's Red Mill, has died
An ESOP is also a great way for a founder to exit the company in a tax-advantaged way. The stock that the employees receive also usually takes the place of alternative 401(k) investments they could be making. ESOPs are a very interesting tool but there are some real nightmare scenarios (owner liquidates via ESOP; company then fails; employees end up without jobs and without retirement savings.)

Another issue with ESOPs is that they are extremely expensive to administrate.

EDIT: this is a succinct and reasonable summary of some of the risks of an ESOP (primarily from an employee's perspective) https://pensionrights.org/resource/problems-with-esops/

peter_l_downs··on A 2024 plea for lean software
Vinge definitely got it right. I love the title of "Programmer Archaeologist", it's an extremely good description of what we actually do every day.

For more discussion, see http://lambda-the-ultimate.org/node/4424

peter_l_downs··on Go 1.22
This is a great explanation. Sqlboiler allows you to send an update that will infer which values have changed and should be written — I bet that’s related to this. TIL!
peter_l_downs··on Go 1.22
The test doesn't take much time :)
peter_l_downs··on Go 1.22
We usually wait to experiment with new features until we find a good problem that would fit, but we upgrade compiler version pretty much right after they release. For instance we waited on actually using generics for about 6 months until we were able to experiment a bit and make sure they were really useful, the devx was good, and build/test speeds weren't significantly impacted.
peter_l_downs··on Go 1.22
The addition of `sql.Null[T]` is great. I'll probably start using that in new projects. In current stuff, I'm relying on sqlboiler's null [0] whose API is very similar — it works the same way as `sql.Null` will, but has an additional `IsSet() bool` method that tells you whether or not the value was ever explicitly set, to help you distinguish "intentionally null" from "null due to uninitialization". (Sounds nice, but I've never once used it.)
peter_l_downs··on Ask HN: Who is hiring? (February 2024)
Congratulations on your first post on a 7 year old account. Great username, too.
peter_l_downs··on Ask HN: Who is hiring? (February 2024)
Shoutout for being the one company hiring in Philadelphia. Wish we had more of a tech scene. Role looks cool but not a good fit for me — good luck!
peter_l_downs··on Mad Scientists' Club: The Books
++++++++ all of these. Wonderful books. "The Great Brain" has to be my favorite, but they're all good.
peter_l_downs··on Mad Scientists' Club: The Books
I swear to you that just the other day I was trying to find these books, but I couldn't remember the names of the characters or anything other than there was a group of young boys in a club doing some shenanigans on a lake. I was, of course, looking for "The Strange Sea Monster of Strawberry Lake (1960)". Thank you, thank you, thank you for posting this here!

EDIT: I also remembered the Old Cannon one. Awesome stuff. I'm going to re-read them!

peter_l_downs··on Show HN: Marimo – an open-source reactive notebook for Python
Marimo are wonderful little pets, I used to have some and really liked it. I should get some more. Never failed to start a conversation when guests came over.

https://soltech.com/blogs/blog/how-to-care-for-your-marimo-m...

peter_l_downs··on Discord is laying off 17 percent of employees
How would this work? Would companies be unable to fire people except for rule violations?
peter_l_downs··on Astronomers believe they have witnessed the birth of a black hole
You're welcome, it's one of my favorite books — I hope you enjoy it if you read it!
peter_l_downs··on You can't follow me
I empathize with the author and found the post to be a interesting and concrete example of what it's _actually like_ to try to publish a blog to Mastodon, which is something that I have thought about and read about in abstract. So, thank you for writing this up.

One thing to consider would be to try to use Caddy [0], or a tool like localias [1], as a local https proxy. You would be able to run both the mastodon server and your blog software on the same computer, addressable via local-only urls like "https://blog.test" and "https://mastodon.test" and have everything work. These tools manage the certificates for you transparently and you don't need to worry about anything being exposed publicly.

I'd be curious to know why the author didn't try this, they seem to be quite knowledgeable of other web technologies so I have to assume there's a problem that I'm not seeing here.

[0] https://caddyserver.com/

[1] https://github.com/peterldowns/localias

peter_l_downs··on Astronomers believe they have witnessed the birth of a black hole
Reminds me of the beginning to A Deepness In The Sky, where the astronomers detect weird oscillations in a foreign body and decide to send a mission to investigate…
peter_l_downs··on Ask HN: Who is hiring? (January 2024)
Please feel free to DM me if you'd like to pay for hiring consultation. I believe that you could make significant improvements to this post.
peter_l_downs··on Heat pumps, more than you wanted to know (2023)
I had heat pumps added to my home this past summer, primarily to provide air conditioning. This article is a good overview of what I learned in the process. I'll add a few lessons:

- Get a few quotes and iterate on the plan. Save the contractor you'd most prefer to work with for last, because you'll have a much better idea of what you want by then, and your knowledge will save you money.

- There's a fun puzzle to retrofitting older homes (no existing ducts): where you place the lines, where you place the units, and where you place the heads are all variables to play around with. This is part of the reason for getting different quotes. Only the last two contractors I spoke with were able to come up with ways to keep all the external lines on the side of my house and away from the street. Only the very last contractor offered a ducted system for bedrooms, so I have head units downstairs but the upstairs is vented.

- No one will run a real Man J calculation, they all use proxy calculations. This should be fine but you almost certainly want to slightly undersize your system. If your system is always turning on and then turning off (because it is oversized and heating / cooling the room very quickly) you'll end up with humidity and mildew problems, you want it to be running "low and slow" while it's on.

- They work amazing for air conditioning. For heat, your existing boiler + radiators is often nicer and more cozy. It's also often cheaper — heat pumps are electrically efficient, but natural gas costs vary significantly by location and for me (~Philadelphia) heating with my boiler is a lot cheaper than doing it with the heat pumps.

- I live in an older home, so before I installed heat pumps I had to replace my ancient windows for modern ones that didn't constantly leak energy. I'm happy with the results but it adds a lot to the startup cost.

peter_l_downs··on Three-Step Lifted Interfaces
This is a wonderful elaboration of something that senior engineers do effortlessly and that junior engineers often struggle with. The writing is clear and the diagrams help make it even more so. I foresee that I will be sharing this in PR reviews in the future!
peter_l_downs··on Nobody knows what's happening online anymore
BLP Kosher dings in the whip, no cap
peter_l_downs··on Perl Poetry Generators in 256 Characters
Great to see this here. Nick is a fascinating artist and a wonderful teacher. I highly encourage you to play around with constrained net/programmatic art, it can be a lot of fun and the results can be surprisingly cool. Here’s a piece I made as an exercise for his class! https://freezine.xyz/montfort/program1.0/
peter_l_downs··on The Long Shadow of Checks
I looked it up and could not find the answer.
peter_l_downs··on The Long Shadow of Checks
The distinction is a fact, but I haven't been able to find the _reason_ for the distinction, which I'm hoping is quite charming!
peter_l_downs··on The Long Shadow of Checks
> One control which we made for checks to reduce systemic risk continues to have consequences more than a century later. Most disagreements between you and a grocery store are beneath the notice of the law. If you and your grocery store have a disagreement about a check specifically, you can go to jail. The crime is sometimes called “uttering”, for charming historical reasons.

patio11: you write a lot, and have taught me a lot, and I appreciate it. But I want to make a small complaint. You frequently say things like "for charming historical reasons" and then _cite no sources_. Link something! Cite something! As a reader, I regularly feel like you are teasing me or showing off to me when you include all these small asides without any further reference or any concrete details.

peter_l_downs··on Zero downtime Postgres upgrades
What do you mean? I don’t understand, how is using a database an architectural mistake?
peter_l_downs··on Go Testing by Example [video]
I’m happy to hear you’re gonna give it a try! No special tips beyond looking at the existing docs and migrators to see what they do. If you’re stuck please file an issue, I can help debug. I’d really like to know what works and what doesn’t. (It would also be nice to just hear that it all works!)
peter_l_downs··on Go Testing by Example [video]
You’re not alone — I am sure other people have done this before me but I haven’t ever seen it published, and I rediscovered this technique independently. The logic behind this library has been ported to both scala and typescript without issue, I hope you and others can benefit from the idea even if you don’t use my implementation.
peter_l_downs··on Go Testing by Example [video]
pgtestdb should work for your use case, and because each test gets its own database, you shouldn't run into any conflicts that are caused by different tests each trying to write data with the same ID. If it doesn't, please let me know and/or file a bug in Github.

One other nice thing about pgtestdb is that you can run all your tests in parallel, and if a test fails the related db will be left up for you to connect to via psql (helps a lot with debugging.) Compared to your transaction setup, the only data in the db will be from the test that failed.

← PreviousPage 4 of 24Next →