HNHacker News
TopNewBestAskShowJobs

emptysea

534 karma · joined June 23, 2018

submissionscomments
emptysea··on That people produce HTML with string templates is telling us something
Yeah I think having some a few more methods on some types would be nicer than having global functions like `map`

for example, imagine if your example could be written as:

range(10).map(lambda x: x*2).list()

but as a list comprehension it's slightly shorter, but autocomplete isn't as good:

[x*2 for x in range(10)]

Also some historical context, Python's list comprehension are based on Haskell's

emptysea··on Maybe you should store passwords in plaintext
The quote at the end of the article really sums up my feelings:

> “I think the real answer, the real answer […] this is going to sound weird or bad – is to cajole or trick your employees into thinking that what they’re doing is important.”

Basically I like to fix things at work because I get some sense of satisfaction by doing things the "right way".

Of course this feeling can be worn down, other coworkers not caring, management not caring, etc.

And then you end up in a "work to the contract" mentality, which is what the "store your passwords in plaintext" people seem to be doing

emptysea··on Sensenmann: Code Deletion at Scale
Another option is tail based sampling which allows you to make the choice at the end of the request whether to keep the trace.

With that you could configure the APM to keep the first $N traces for all endpoints and then start sampling after that

emptysea··on MRSK: Deploy web apps anywhere
I don't think podman systemd integration handles blue/green style handoff, but pod man's integration is pretty nice.

Really painful to manually call a docker container from systemd normally, lots of edge cases to manage

emptysea··on JSON vs. XML with Douglas Crockford
aren't there some ambiguities that would require extra data to decipher?

like if I have a message inside of a message vs just a bytes field that happens to have a valid protobuf?

emptysea··on Astral
Speed is a problem for linters. If I spend 200ms of CI time instead of say 5minutes that’s a real difference in toil and CI spend

Ruff has an LSP too so it integrates well with editors unlike flake8 and similar which only work on save — and are really slow

emptysea··on The military loved Discord for Gen Z recruiting. Then the leaks began
Presumably you could alert on someone printing 300 secret documents

Seems like even allowing for printing is a bad idea

I wonder how big tech compare in their security posture for insider leaks

Edit: the other thing is he took home the docs and photographed them on his kitchen table. So not only was he able to print them undetected but he was able to leave the base with them

emptysea··on Please fix your spinner
GitHub's Pull Request status checks suffer from this

Somewhat amusing, a little detail missing

emptysea··on Feature flags and authorization abstract the same concept
We use feature flags for entitlements and experiments at $work, it's all accessed through a consistent `hasFlag` API.

Granted, our use is pretty straightforward, you either have access to product $Foo or you don't.

I think with usage based billing, like first 100 messages free, or tier one gets 5MB uploads, tier 2 gets 50MB uploads it becomes harder to have a universal API, you end up having to do some manual checks.

Still haven't really thought this all out but it's an interesting problem.

Edit: also roles can provide entitlements / enable feature flags. So Admin could get every feature, while intern might get only get the analytics_read feature.

emptysea··on Problems with AWS Amplify and its use of DynamoDB
Sounds similar to Meteor, works fine for a prototype but collapses under complexity and perf issues once you want more features

Mongo has a lot of performance gotchas with things like pipelines / aggregations that don’t scale the same way they do in Postgres & similar

Took a while but we eventually migrated to a plain rest api with a react front end. Still used mongo

emptysea··on Be careful what you test or deploy to Vercel
Usually these billing systems are somewhat async so they’re would probably still be overages

Better than nothing though

emptysea··on AlloyDB Omni – run AlloyDB anywhere
I wonder how they make transactional workloads 2x faster vs normal Postgres

The analytics workloads improvements seem pretty straightforward (or at least there is prior art like timescale)

emptysea··on Juice
These are great! how tricky is it to add these effects? I’m mostly stuck in the html/css/js world and implementing anything like you have here would be a pain
emptysea··on ThumbHash: A better compact image placeholder hash
just tested this and the jpeg ends up being 690 Bytes while the gif ends up being 2 KB
emptysea··on ThumbHash: A better compact image placeholder hash
Probably because the algorithm is really slow and you’re already producing a really small image so scaling your original image down before isn’t too much work

Blurhash is really slow on larger images but quick with small <500x500 images

emptysea··on ThumbHash: A better compact image placeholder hash
What I’ve seen instagram and slack do is create a really small jpg and inline that in the API response. They then render it in the page and blur it while the full size image loads.

Placeholder image ends up being about 1KB vs the handful of bytes here but it looks pretty nice

Everything is a trade off of course, if you’re looking to keep data size to a minimum then blurhash or thumbhash are the way to go

emptysea··on We Ditched REST and Went with GraphQL: Here’s Why
Only catch really is you need to have a typescript backend

I'm looking forward to more tRPC style things that can integrate across language boundaries. I'm okay with some simple codegen to support it

emptysea··on Launch HN: Outerbase (YC W23) – A new UI and editor for your database
I’m a big fan of Tableplus but always interested in new developments in this space.

Mongo Atlas has a really great database editor / UI built into their web UI but ofc it’s Mongo only.

Curious if you have plans to support connecting to a database over SSH? I have a database running on a VM and I can connect to via an SSH tunnel. Avoids having to expose the database to the internet.

emptysea··on No Lodash
Yeah exactly what happened to us, it’s solvable but annoying

Also we did have a mix of things like import _ from ‘lodash’ and import foo from ‘lodash/foo’, etc

emptysea··on No Lodash
Yeah I switched a project over to lodash-es which fixed the tree shaking problem but it was painful to migrate everything
emptysea··on Even the Pylint codebase uses Ruff
yeah that pyproject.toml issue is really annoying with flake8, made me glad to switch to ruff even though it doesn't have all the same lints available
emptysea··on MailCrab
One of the things I like about Django is the builtin support for a console backend for emails

In dev it means you can have sent emails get logged to the terminal which makes debugging easier.

But it only really works well with text emails, this seems like a more robust solution

emptysea··on AirPods causing tinnitus?
Yeah I feel like the total silence causes me to focus on the ringing, which raises the intensity -- I think it's a mental thing.

Whenever I use noise cancelling headphones (or really any headphones), I always have something playing even at a really low volume to drown out the tinnitus.

emptysea··on Team-based map making with Felt
Looks interesting, like Figma but for maps

Off topic, but I like how the site uses a green background, stands out in the sea of gray and black that most sites use

emptysea··on What I Learned at Stripe
Friction logs are all well and good but only if you have the time to action on them

At a past company we had a new lead designer come in and write a huge friction log but nothing happened because we’re already busy with tons of other higher priority stuff

emptysea··on What I Learned at Stripe
Yeah it ends up being a point of contact more than anything

It’s still the PMs, Eng managers, and higher ups making most of the decisions*

*At least at my current company

emptysea··on Service mesh use cases (2020)
Place I worked had support staff copy-pasting mongo queries from google docs -- worked in the early days but eventually you have to start building an admin interface for more complicated processes

When it was just mongo installs are easy since they only needed a mongo desktop client

emptysea··on NoSQL: The Baby and the Bathwater
Problem with mongo is if you start using more SQL like things like pipelines and aggregations your perf goes out the window

you really have to think about how you structure your data in mongo for it to work with lots of queries since joins are untenable (even if aggregations support them)

emptysea··on Ruby on Jets: Like Rails but serverless
Yeah Instagram has some blog posts outlining how they run their python web servers with the GC disabled

Easy enough to restart the processes every once in a while

emptysea··on Software testing, and why I'm unhappy about it
It's some home grown UI glued on top of Jenkins

This is pretty much the one feature that's nice, otherwise it's like a worse version of circle/github actions

← PreviousPage 2 of 8Next →