Hacker Newsnew | past | comments | ask | show | jobs | submit | dvnguyen's commentslogin

I am interested in affordable housing. Is inefficient tech the biggest contributor to housing cost?


Its definitely local regulations.

In SF for example, even after a housing project is approved, it can be challenged at any point for any reason by the community or politicians. Even projects that meet all regulations can be rejected for any reason, usually that vibes are bad. I think over half of SF is some kind of historical district. Way too much is zoned for SFHs in the city limits. etc.

It's little wonder why housing projects are so expensive in cities that have such strong NIMBYs. Like is it so unreasonable to ask for a bunch of 4 story single stair apartment buildings to be allowed to even be legal?


Of course not! Take the top N problems ordered by “impacted due to inefficient tech” and the top N ordered by social benefit. N has to be pretty large before anything interesting starts showing up on both lists.

The problem is that making tech more efficient is rarely anything more than a simple capital problem. So the real question is - where is there social benefit but no money?


Gotcha. That means if I run Next for just frontend + server side rendering stuff then I can always self host it?


Sort of, so long as you don’t care about more complex hosting strategies eg hosting some/all of your server side code on edge servers when users visit your web app - as opposed to always sending them to a server in a set location in the world as a “normal” server architecture would typically do. Alongside not caring about prerendering and caching some pages and not others, that kind of thing


How do you fine profits?


Extra percentage points on their tax rate? The question is if they could use more aggressive tax avoidance schemes to counteract this?


How about HA and horizontal scaling? I’ve heard that MySQL excels in that area.


I mostly have used AWS Aurora there, which is significantly better than vanilla MySQL or Postgres and both are similar enough.

In Aurora, Postgres has Aurora Limitless (in preview) which looks pretty fantastic.

As far as running yourself, Postgres actually has some advantages.

Supporting both streaming replication and logical replication is nice. Streaming replication makes large DDL have much less impact on replica lag than logical replication. As an example, if building a large index takes 10 minutes then you will see a 10 minute lag with logical replication since it has to run the same index build job on the replica once finished on the primary. Whereas streaming replication will replicate as the index is built.

Postgres 16 added bidirectional logical replication, which allows very simple multi-writer configurations. Expect more improvements here in the future.

The gap really has closed pretty dramatically between MySQL and Postgres in the past 5 years or so.


I don't see myself switching to an Android phone but iPhone updates do break things. Since upgrading to latest iOS, both my phone (personal and work) keyboards are unusable if I enable both English and Vietnamese keyboards. Looks like there's a bug in their keyboard prediction engine. It's been 4 months and I don't see they fix it yet.


Nobody's perfect, but I can't remember Apple ever shipping updates that brick their phones in two consecutive quarters.

At least Apple releases the images you need to restore your phone to a bootable state if something goes wrong during an update.

See: https://news.ycombinator.com/item?id=39145490


How is this bug manifesting? Do you mean literally unusable or something less serious but irritating? I ask because I have English and Spanish keyboards on my phone and don’t think I’ve noticed anything.


Thanks! What’s the best way to apply?


Please apply using the linked job posting above. Thanks!


What would be a good way to get the very first client if I’m a nobody outside of my tiny friend and colleagues circles?


First, you are somebody. You have more skills in your area of expertise than anyone else you will meet.

My first clients came from volunteering at the local football club. As others have said, connections matter.

Do what doesn't scale. But don't do it for free.


Just curious to learn: when do you need sortable primary keys?


It makes pagination much more efficient and possible to completely use an index (re: data is pre-sorted) if you have some sort of increasing id, vs sorting in-memory on request. Even having some sort of indexed "createdAt" field, and sorting on that, isn't super reliable for pagination when the dataset is changing. You usually want a stable sort to make pagination nice, so you add an ID to it, but then this gets very inefficient w.r.t index use if the PK is a UUID since it is not monotonic/sortable.


UUIDs are sortable, and you can do efficient pagination on them. (The results wouldn't be in any meaningful order, but that's orthogonal.)


Yeah sorry I had a brain fart and was thinking of stable pagination w/ compound sort+filter. It doesn't matter if id is UUID, sigh.

Where date > y or (date eq y and id > x) order by date, id

This can't be completely fulfilled by an index. It'll have to sort/merge somevresults in memory, very CPU expensive.

More examples here https://www.mixmax.com/engineering/api-paging-built-the-righ...


In sqlserver (and others?) you can have one clustered index. Typically this is the primary key (doesn’t have to be though).

The clustered index is actually the physical order of the data stored on disk, so any new guid causes tremendous amounts of churn.

Not sure how modern this concern is, but I would guess a LOT of SASS companies have to consider this.

Quick edit: sequential GUIDs are obviously a thing and I believe alleviate a lot of these concerns. I do not believe that was an option in sql server 2008 r2 (a version that lived a LONG time).


A clustered index is certainly not actually the physical order of the data stored on the disk, at best it tends to approximate it by placing data associated with similar keys in similar blocks. You would have to actually physically reorganize your entire clustered table or index to get it in physical order, and often you lose performance by doing so.

The performance impact of randomly distributed keys on any ordered index on that key is certainly real though, so I agree with you there.


Almost every database algorithm is based on ordering and binary search.


… and for which UUIDs are sortable.

OP called them "not sortable", which is a poor phrasing, as they're sortable. What he's likely getting at is that they're not ordered by generation time, which matters to some folks.


When you need to get a sorted list or perhaps a range?

When do you need primary keys?


that doesn't really make sense though. how would you know the range to sort by? presumably you'd use the criterion directly to sort.

a better reason and justification to not use UUIDs is that they take up needless space if you're space constrained. they also have worse performance


Maybe you are doing some sort of cursor for pagination or whatever. You can use one ID and fetch the next 50 records. Then use the last ID in those 50 to fetch the next 50, etc.


but you can still do pagination with uuids, your rows can be sorted on any arbitrary criteria like created date or updated date.


But that would be slow, even with an index, as compared to using a clustered primary key. Especially when your data doesn't fit in ram.


Sure, already mentioned UUID’s being slow. There are trade offs


Dates might not be unique but I can see other possibilities that would be fine.


Who doesn’t in this economy?


Elon doesn't


This is true.

To be honest, it's really money of Tesla shareholders that is at stake. Sure, Elon will take a hit, because the math is intractable. So this thing will go south, but it's Tesla shareholders that will eat most of the losses, not Elon.


Do you run Docker inside Podman, Podman inside Docker, or Podman inside Podman?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: