Skip to main content
GameDev.net gamedev.net
🔒 Locked

Isn't programming fun?

Started by programmermattc Aug 2, 2006 at 3:32 PM 8 replies 1.4k views
Original Post
programmermattc
programmermattc
Here's a little story for you regarding a small project my boss is having me do. I am using ColdFusion (a language type mixing HTML and variables and such, like PHP in Macromedia). So I need to create a main record in a table, then create multiple records in another table under that record that would each, in turn be the total items on a customer order. That main record would be a total type record of all the smaller records under it which would each be a total of items in a customer order. Obviously my first thought would be a main loop creating the header item with a sub-loop going through each order and totaling and making a smaller record, coming out of that loop to update the header record, and then loop to the next set of header record and sub-records. Instead, to make the code 'easier to read and maintain' my boss, who isn't very much of a programmer (more of the business guy) told me to do this instead: Run a loop and create an array containing each of the ID's I'll be using for the header record which makes some sense. Then I create another loop and check the array item I'm in against the order vendor ID and using a series of nested IF's within the loop, add and update the sub record; if the record I'm checking is a different item in the array I index my array to the next value. Confusing? It gets worse. After this next loop (assumingly, he hadn't figured out this portion yet) I'm going to need to run through each array item and update that header record with a number that's currently stored in a single variable (but obviously will need to be stored in an array in this model). Must...not..scream...
=============================RhinoXNA - Easily start building 2D games in XNA!Projects
Palidine
Palidine
That sounds like an awful job. A lot of people have stories about bosses who tell them what and how to program. Personally, I'd quit that job in a millisecond. The correct process is:

1. get task
2. complete task
3. have task reviewed

the only interface with the boss happens at steps 1 and 3. 2 is all yours. Perhaps you're making the mistake of asking questions of your boss during step #2? You should also be able to argue with him about the correct way to do things. If you say he's wrong, there's a better way and he gets angry, that'd also be, in my book, a reason for quitting. It's certainly reasonable to have code critique in step #3, but no one should be given a task with an already decided upon algorithm; that's just boring.

*shrug

-me
Oluseyi
Oluseyi
Show him an analysis of the code, then ask if he'll let you do your job.
iMalc
iMalc
If your boss is "not much of a programmer", and is unlikely to review your code then the answer is simple - IGNORE HIM!

Do it right, make it work logically, get a well functioning program. Make it as simple as possible, but not simpler.

If your boss ever says "Hey, you were supposed to do it this way...". Then you just tell him, that you tried that but it didn't work. But most likely once you have a properly functioning program he isn't going to give a hoot what the code looks like. They never do!
Limitz
Limitz
You're a programmer, not a typist :) I agree with iMalc, just do it your way. If you got the time i would implement both algorithms and show him that he is wrong. And tell him that if he wants slow cappy code that he should do the programming himself instead of employing a programmer ;)

I walked away from a high profile project once too, because the boss didn't trust me. I don't want something on my resume if i can't stand for the quality of the code.

Good luck man...
iMalc
iMalc
Basically you need to look at it the "real world" way:
If you didn't use your bosses idea but it works well - your boss takes all the credit.
If you use your bosses idea and it doesn't work well - you take the all blame.

Just beware that you never want to be in the situation where you go against your bosses idea AND find it fall apart because of that. That's when you're totally buggered.

[Edited by - iMalc on August 3, 2006 4:54:37 AM]
programmermattc
programmermattc
Just to bring some closure, I started with his idea, realized how actually stupid it was, and coded up mine (with a bit ot pseudocode listed around instead of my insert queries). I had him come over and showed him and he was like, 'Wow that really works nice! We got a lot done on this!'

Yes...yes we did...
=============================RhinoXNA - Easily start building 2D games in XNA!Projects
Xai
Xai
lmao ... my first job was doing gambling games while still in college. After a year when I got on full-time I was put in charge of a project and given 2 part-time coop students under me. I still rember to this day the time me and 1 of my coworkers hashed out a set of ways to acomplish a task my manager had mentioned to us - which didn't seem like it could work the way described. 4 days later we had an awesome bit of working code using the 3rd method we had attempted (the first 2 couldn't work). My manager comes over - asks us to explain the workings to him, we did ... then he called over the boss and showed the boss how great this idea he had given us worked (after we had just explained to him why that idea didn't work and how we got this version to work). We got NO CREDIT, not even a "good job" from the boss ... while my manager was seen as this ultra-intelligent idea guy.
ronkfist
ronkfist
Just do exactly like he says, then show him how you think it should be done and say something like "dam you suck sir". He will get the message and know its in the companies interest to keep you around.

EDIT: oh oops you did something similar :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.