Skip navigation
There are 3 types of engineers that would encounter this question.
0:00 / 4:29

There are 3 types of engineers that would encounter this question.

chinedu🦀

@chinedu_1011K followers

Visit on X
325 likesDownloadOriginal post

16,411 views

There are 3 types of engineers that would encounter this question. This first type gives the default answer. The second gives a textbook correct answer. The third asks a question back.

35 Comments

Comments from the original post on X (Twitter)

  • Austin's profile picture

    @IamAroke

    very excellent explanation. Thank you Boss

    3 likes

  • chinedu🦀's profile picture

    @chinedu_10

    Thanks bro, always appreciate your tweets 🙏🏾

  • Abdullahi Hussein's profile picture

    @zillionsthe1st

    This short video from @alexxubyte from @bytebytego literally details this and explains the hybrid approach too.

    2 likes

  • Ugochukwu🦅's profile picture

    @UgochiAsogwa

    This answer is coming from experience. You have definitely seen it all 😃.

    2 likes

  • chinedu🦀's profile picture

    @chinedu_10

    No oo…I have not seen anything 😹

  • Ugochukwu🦅's profile picture

    @UgochiAsogwa

    😆😆😆 It actually takes someone that have seen it and also done it to provide such a detailed answer.

  • TaofeeqIsma'il.'s profile picture

    @TaofeeqOtu

    Well explained, weldone chief . But in my opinion, I think the solution to this problem will eventually inform the Pagination UI, not the other way round. Else there might be no or ineffective solution. Or what do you think??

    2 likes

  • chinedu🦀's profile picture

    @chinedu_10

    Appreciate the feedback, chief. You’re right that for large datasets the backend approach often ends up shaping what’s actually usable in the UI. cursor/keyset pagination basically forces infinite-scroll or ‘load more’ patterns and makes classic page-number navigation painful or impossible without heavy workarounds or adding caching and or setting a cap limit. But in an interview setting I still lean toward starting from the product/UI requirements (does the user need random page jumps, infinite scroll, stable ordering under inserts, etc.?) because that quickly tells you which technique is even viable. Once you know the constraints, you pick (or design) the backend solution that can actually deliver them at scale without becoming ineffective. So it’s iterative rather than one strictly driving the other so if you think about it the UI needs inform the choice of technique, and the chosen technique then constrains/refines the final UI. Both directions matter. Hope this helps.

    14 likes

  • Bin Emmanuel's profile picture

    @BinEmmanuel1

    You forget to add say, with offset you fit miss or show the same row twice if somebody delete or add new row while you dey travel through the pages.

    1 like

  • chinedu🦀's profile picture

    @chinedu_10

    Lmaooo…that’s an edge case sha.

  • Beni💗's profile picture

    @0x_beni_

    I never skip your video

    1 like

  • chinedu🦀's profile picture

    @chinedu_10

    Thanks beni🙏🏾🤍

  • Christian Onoh's profile picture

    @onohchristian

    Understanding the how tools work on the basic level will always be key. Good explanation.

    1 like

  • Emmanuel👾's profile picture

    @emmaeasy_

    It's obvious that this answer comes from experience, it's very important to dig deep, it just gives more clarity

    1 like

  • Solomon's profile picture

    @0xsolenoid

    nice watch. thanks man

    1 like

  • chinedu🦀's profile picture

    @chinedu_10

    👏🏾

    1 like

  • Maestro~Engineer's profile picture

    @Maestro7789

    Thank you.

    1 like

  • chinedu🦀's profile picture

    @chinedu_10

    You welcome.

  • Ezenwa's profile picture

    @turntupjason

    i’m engineer 2, fair enough 🤣

    1 like

  • Lawal Rasheed's profile picture

    @lawalrasheed_

    there are clever ways to optimize the offset/limit approach if you absolutely have to, depending on the dbms you are working with

    1 like