CS/SE education topic: WHY do so many books/instructors have students program a student DB/gradebook/etc. as an early exercise, esp in OOP?
-
Show this thread
-
Basically domain-specific code is never the right solution for that type of problem; a standard DB backend or general data model is.
2 replies 0 retweets 0 likesShow this thread -
Replying to @RichFelker
Pedagogically, I'm not sure that's relevant? Teaching use of standard tools is important, but it's a good motivating example for concepts.
2 replies 0 retweets 0 likes -
Replying to @aprotim
My assertion (maybe not 100% right but close I think) is that these are wrong motivating examples for the concepts.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @aprotim
For example a C++ class "Student" is almost surely wrong, even if you decided to keep the interface and swap in a db-backed implementation.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @aprotim
It's wrong because the object lifetime is wrong unless you plan to copy the whole db into your process and keep it there.
2 replies 0 retweets 0 likes
Instead you probably want some sort of object to represent a query result or changes to go into a transaction. Not to represent the record.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.