Hacker News new | ask | show | jobs
by tcopeland 4287 days ago

    When you introduce a new API endpoint or format 
    for data at rest, think hard
Yup. I've added columns where I've used a datetime where a date would have sufficed and then regretted it later once tons of data was already in the table. Or added a varchar(255) and only later realized that that wasn't big enough. Sometimes the wrongness of a type only becomes clear down the road.

    If you're designing an experimental server-side 
    feature, see if you can store the data off to the 
    side (e.g., in a different location, rather than 
    together with currently critical data) so you can 
    just delete it if the experiment fails rather than 
    being saddled with this data forever without a 
    huge migration project.
Yup, sometimes an extra join or lazy-load is well worth the isolation.
1 comments

Why is it hard to drop an extra column from a database, or to change its type? ALTER TABLE...
It a) takes time, and b) means current code can not possibly work. Worse, it c) means canceling a rollout is now a complicated process, due to b.