r/badcode • u/hexagon16rpmm • Sep 10 '21
kotlin sure because AUTOINCREMENT doesn't exist!, this was me when I thought I liked android :)
4
Upvotes
r/badcode • u/hexagon16rpmm • Sep 10 '21
3
u/ImportUsernameAsU Sep 10 '21
Had to do something similar in my last job, the proprietary language we used didn't have an auto increment feature, so to save space and be efficient, we created a whole new table for 1 entry. We would pull from it, use that ID, then increment it and update it. Think that sounds like a haven for concurrency issues? Yep
2
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Sep 10 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!