20 year eng here, I find myself nodding along to most of this. The hardest thing for fresh programmers to understand is code in the real world - temporary hacks, TODOs and commented blocks of code wind up everywhere due to changing priorities or new information (at least in startup land), and that can be ok. All bills come due, but remember that debt is always a great fuel for velocity.
Two notes - always comment your assumptions and half-baked logic. You WILL forget why you did things a weird way, you WON'T always come back on Monday to clean up your code. Help others and ypur future self - comments are cheap to write.
Second, using a JSON blob for a changing database structure is a fine approach (from Python/Postgres perspective, YMMV). Especially with LLMs now, accessing or filtering by an arbitrary key value in the JSON is fairly trivial and not as slow as you imagine (to a point, obviously). This can greatly increase speed of testing and allow DB changes withput migrations. Maintain the current data structure in Typescript and when the ground is solid, one migration is all you need.
lubujackson•4h ago
Two notes - always comment your assumptions and half-baked logic. You WILL forget why you did things a weird way, you WON'T always come back on Monday to clean up your code. Help others and ypur future self - comments are cheap to write.
Second, using a JSON blob for a changing database structure is a fine approach (from Python/Postgres perspective, YMMV). Especially with LLMs now, accessing or filtering by an arbitrary key value in the JSON is fairly trivial and not as slow as you imagine (to a point, obviously). This can greatly increase speed of testing and allow DB changes withput migrations. Maintain the current data structure in Typescript and when the ground is solid, one migration is all you need.