Design django models such that your future self will thank you šŸ‘‹

Oct 23 1:30 PM CDT :calendar:
Audience level: Intermediate

About This Talk

While designing Django models, our primary objective is to develop a structure thatā€™ll enable us to build the said product feature, but while doing so ~we~ I used to neglect things like a) Ease of debugging/Auditing, b) Query patterns, c) and Scalability, and later when push came to shove these things used to become a blocker. While we canā€™t possibly think and preempt everything from day 1(and if you try to - itā€™ll take long to roll that feature out), we can do something better šŸ¤”.

In this talk, weā€™re going to be focusing on how you can avoid those mistakes early in your design phase šŸ˜Œ - these are all the learnings I have had after making mistakes. We are going to cover the following -

  • Auditing your models
  • Boolean field for flags vs. timestamped field
  • Soft delete vs. hard delete
  • Many boolean flags in a model?
  • How do you decide when to de-normalize?
  • And much more ā€¦

As with every piece of advice in life, the answer of whether you should apply these or not is - ā€ it depends.ā€ In this task, weā€™ll also discuss when you can use this advice and when you can choose to skip it.

Presenters

    Photo of Tarun Garg

    Tarun Garg

    Iā€™m currently working as Engineering Manager at SquadStack, Iā€™ve been here since 5 years and have seen the team and processes grow from 3 member engineering team to a now ~50 people engineering team. Being the early member of the engineering team, I got to experience a fair share of challenges and make a lot of mistakes along the way and thatā€™s why I wanted to share those learnings so that other people donā€™t make those same mistakes and the community keeps on growing :D.

    More about me? Iā€™ve recently made a step into management and till now(6 months in) iā€™m liking it; make no mistake it is stressful but rewarding also(in itā€™s own way). I love solving people, process & product challenges. When not working I can found reading books, or playing some strategic games like Catan or Chess.

    You can read more about me here