*Client phones me at 11pm*
Client: It's not working!!
Me:What's the error you're getting?
Client: "Database connection error"
*Phones system/dB admin*
DB Admin: Yeah we had to change the SQL logins, I've sent you the new ones
*Phones junior dev in charge of dB programming*
Junior Dev: Yeah you'll just have to go and change the credentials. They're in all the places where we're using the dB, just before the statement, in the connection strings...

We make over 470 calls to the DB 😑

  • 39
    Why would the credentials be in each of the connection strings, rather than established once or atleast read in, that sounds like a horror system 😶
  • 7
    What type of fuck is this? Oh boy good luck
  • 7
    Every changes should be considered and get across within the team devs dbadmin.. plus your credentials should be assigned to a variable through out your code... so that no matter what you do... it would affect the whole system including your teams and clients side.. it is not a good practice to do changes without consulting your client.. changes should be done in your development excluding the production code..
  • 20
    ... and god created variables.
  • 8
    Lol. That probably means it's also in the repository. Is it open source by any chance? 😈
  • 9
    Junior devs are junior for a reason, the lack of experience.

    From your rant it sounds that he was the only one doing the database. Who did the peer reviews? Junior dev probably only did one or two calls before when he was still in school.

    Your rant is just blaming one junior dev, but the whole thing comes across wrong to me.
  • 5
    In fact environment specific stuff like database connections and credentials for other 3rd party services should be injected into the app at runtime. The ambassador pattern helps with this. You should look up DevOps
  • 3
    This is entirely on the technical lead and/or project management. You really should check your workflow and maybe introduce some QA (code reviews, tests, test instances). How does code with hardcoded prod creds run on staging? ;)
  • 3
    WTF!?!?!?! KILL HIM
  • 9
    @Codex404 Even as a junior it should be obvious that it's a bad idea. Juniors still have some basic idea of programming and thus should quickly realise that hard coding the value is completely stupid. Especially since OOP is the "status quo" paradigm being taught, which focuses on reuse.
  • 4
    @TheCapeGreek that is true, but blaming it on someone who is programming in the real world for about 3 months is a bit harsh.

    (assuming the rest of the world also becomes a medior after that time period)
  • 1
    @Codex404 3 months? Yeah that's different. Barely even a Junior then.
  • 2
    @TheCapeGreek then you are three months a junior and after that you have done probably three or two projects for two companies.
  • 4
    Oh boy! Code reviews. Fire whoever reviewed that code.
  • 2
    so many wrong in this rant =.=
  • 1
    @jAsE the problem I think isn't to replace them, but rather that theres an unknown amount of files all establishing a connection via hardcoded string.
  • 2
Add Comment