2
initSpasm
79d

My tech lead rookie mistake of the week. Makes ids in the MySql DB big integers.

Now react, python and pinecone are all converting them to scientific values resulting into invalid or missing values and lookups.

Fml I need to change companies.

Comments
  • 4
    just use a programming language with non-garbage numeric types.
  • 3
    Mysql bigint is still an integer type. So if your code converts it into scientific notation, it seems to be a formatting problem.

    Mysql bigint is not the problem here.

    Why are they even formatted? You are supposed to use them directly if they are meant to be keys for lookup.
  • 3
    Maybe use a real programming language?
  • 2
    Python doesn't have a scientific value type. Did you mean float? This sounds like a problem with your specific use case, maybe you're using an ORM with the field type set incorrectly.
  • 2
    @lungdart sounds like some retarded scripting language is taking an integer, then casually treats it as floating point, because it’s too complicated to have different types for numbers, then casts it into a string, because string is the universal type for everything, in the process formatting it to scientific notation because the value is quite big.
    Then some 10x fullstack dev takes that value and puts it directly into a lookup function. Now looking with a picachu face asking himself why it doesn’t work anymore.
  • 1
    @Lensflare that sounds probable
  • 1
    I thought we abandoned integer IDs in 2010 and converted to GUIDs. 🤷‍♂️
  • 1
    @devdiddydog Apparently not. Not to mention the Tech Lead doesn't take responsibility for shit.
  • 1
    @Lensflare You hit the nail on the head with this one. 👏
  • 0
    @lungdart You're correct python doesn't carry scientific types but it does scientific notations and no ORM was used.
  • 0
    @initSpasm @molaram Haha which ones are you recommending??? 🤣
  • 1
    @devdiddydog guids are not index friendly.
  • 0
    @spongessuck depends on the guid version 😂
Add Comment