16

If this isn't the worst thing.

I was asked to develop a WordPress plugin as an intern developer and I've been on it since last week. I got stuck when i finally had the loops running but couldn't find a way to format the output without overwriting the existing values on each iteration.

For the last one week I've been showing the progress on my code to the CTO and this is how it has been.

Me: Hello. Everything is coming along fine, I have most of the functions running properly, do you mind looking into the algorithm?

CTO: Oh not at all, let's see what you got. Omg great code for an intern. I think you should add a new variable there and maybe clean up that function over there because it's deprecated now and yeah HaHa, Great work.

Me: Thanks xD I'll have it finished latest next week.

CTO: Oh great. I can't wait to see what you'd have by next week so we can install it on our WordPress.

*Next finally week comes and I'm done with the code.

Me: Hello, I'm done with the entire code! Want to take a look? The plugin works just exactly as described.

*CTO takes a look

CTO: Omg?

Me: Omg?

CTO: This is completely bad programming practice, so you are running 4 nested loops that all send queries to our data base and make changes to data. This would have a very drastic effect on the server considering the traffic we get.

Me: But you saw this exact code last week and said it was okay, I only changed some CSS since the last time.

CTO: Omg, we can't accept this, you have to develop it again from the scratch without using those loops and queries.

Me: What? Okay, fine. Any hints?

CTO: Yes.

Me: What?

CTO: Just start. That's the greatest hint I could ever give. And also, always have a plan before you begin.

Me: Yeah, thanks for those. It's the first time I'm hearing them and they would totally be applicable to building this thing.

Comments
  • 3
    Well, if you have four nested loops....that's bad.

    But it's his fault for not noticing before what were you doing
  • 0
    @otarant Thanks and welcome to dev rant
Add Comment