6
eo2875
4y

I wonder what is going on in the minds of inexperienced developers. It must be very interesting.

I just read this bit of code
The task was to implement a certain schema into a database. They were given an ORM library, and several tutorials explaining what an ORM was and how it did it.

The result were these 3 models:
- A defaultUser with all of the defaults values for the User model. It wasn't even supposed to be instantiated, just accessed by `defaultUser.fields.username.default`
- another default table for another model.
- The "main" model, containing all other models in the form of JSON fields that would contain an array with other JSON objects that would represent the instances themselves.

I will say though, they made a home-brew ORM with (most of) all the logic a normal ORM has by parsing through the "main model", except, of course, common sense

Comments
  • 5
    Bonus points for effort ;)

    But disqualified on result.
  • 3
    This is my interpretation on what's probably going on in the head of an inexperienced dev:

    "orm?... ORM?!... Do they think I can't write my own database queries?!!

    I'll show them... I'll show them all!!! Whahahhahaaa"

    Either that or "ohgodohgodohgod"
Add Comment