Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 10-29-2004, 12:20 AM   #1 (permalink)
Junkie
 
Proud Programmers....

I have a programming horror story i'd love to share

In grad school I am taking an OS course where we are writing our own OS (called yalnix for those of you that have done it before). Basically we are implementing a simplified OS on an emulated machine.

So i'm working in my group and I was going through and adding more features last night. I need to add some more process queues for devices that we are adding support for. In doing so the program stops working so I look into the code to see what was going on. Basically one of my partners decided every time we make a scheaduling decision he would read every queue there is and if they are all empty he would then call the sys_call exit which is a function that kills a process for various reasons (why he would be calling that beats me). So in the syscall exit it then checks to see if a process invoked it or a the other function if it is the other function it halts the machine.

Anyway this solution while ultimatly correct was unessarly complicated and inneffiecent. So I added a counter every time we kill a process and if the number of processes we kill is ever equal to the ammount we have created I halt the OS (as per the assignment instructions). I then proceed to remove his code.

Later he finds out I did this and throws a huge fit because his code was correct. Even though adding more devices required a lot more work because of it and it was effecient. I tried to explain to him his solution wasn't ellegent. It used functions to perform jobs that weren't within the context of that function, required many lines of code, and scaled poorly. I basically replaced it with 3 lines of code that was a simple killed++ and an if.

Here is my question for you, if you were working on a project and someone else found much better solution than you used to implement some function would you be pissed if they replaced it?

This isn't the only time something like this has happend either. Early on before our kernel ran he wrote a vital function that was holding up the whole kernel. It didn't work and he was debugging it, at the same time I was debugging it trying to figure it out also. Then I noticed in the FAQ it talked about this problem, i did what the FAQ said and it then worked. He through a huge fit because I debugged his code.

Should programmers working in teams really be so proud of there work that they let it inhibit the entire development process? Or was I out of line in both of these cases? What do you guys think?

I'd think a buisness wouldn't care who fixed it as long as it got fixed, you have a team for a reason and you need to work with the team. It isn't a compitition it is a team if the project fails everyone fails, if the project succeeds everyone succeeds.
Rekna is offline  
Old 10-29-2004, 01:26 AM   #2 (permalink)
Upright
 
There's no 'I' in team as the saying goes, you were absolutley right to implement the most efficient method of development but if you worked for me I would have liked you to take 5 and sit down with the original developer. If you really had the best solution, I'm sure the guy (or gal) would have said, yeah you're right, good call.

Imagine if you'd changed the code and what you'd done had upset something else in the code (as I said I can't comment on this specific case) which in turn introduced a problem further down the road. You said yourself the code worked but was in-efficient, are you the team leader? Is it your call to run the risk of throwing the project deadline? Perhaps you could have left the code in but made a note to bring up at the next project meeting.

It's quite difficult to get out of the lone ranger frame of mind.

You could always submit his code to www.thedailywtf.co.uk and let him regret it himself
andrewtayloruk is offline  
Old 10-29-2004, 03:47 AM   #3 (permalink)
Upright
 
Location: Tatoine
After reading your story, I began to wonder about the other side of this. Did the code you wrote work in all cases? I certainly have seen (and, maybe been guilty of) cases where an algorythm is implemented thinking it's more efficient, better, whatever, and works for new cases, but doesn't pan out for the original usage.

If, however, it's the case that the guy just got his panties in a knot, fug-im. Though it would be nice, as the previous poster mentioned, to sit down and talk with him about it, in the real world that doesn't happen. Case in point: Right now I'm working on a tight deadline for improving performance for a customer. I'm rewriting tonnes of methods, simplifying algorithms, if I had to sit down with the original developer every time I did that I'd never meet my deadline.

Now, back to my original comment: We don't hear the other guy's side of the story. Is he the 'team lead', or is there code-ownership? For example: if you're the 'process queue' guy, and he owns the 'scheduling' stuff, then I could see his case.
blandarfleck is offline  
Old 10-29-2004, 04:46 AM   #4 (permalink)
Upright
 
Quote:
Originally Posted by blandarfleck
in the real world that doesn't happen. Case in point: Right now I'm working on a tight deadline for improving performance for a customer. I'm rewriting tonnes of methods, simplifying algorithms, if I had to sit down with the original developer every time I did that I'd never meet my deadline.
Clearly in this case, you've been charged as a sole developer to re-work a lot of code, this is different in working in a team enivronment in grad school to produce a joint effort. However, in a real case scenario, if MS is knocking something out, one programmer doesn't go off and start changing code unless they've been specifically asked to, I think it's all about what's right at the time being.

Andrew
andrewtayloruk is offline  
Old 10-29-2004, 05:53 AM   #5 (permalink)
Junkie
 
Location: Florida
This is why I don't get along well working with other programmers. If someone else comes up with a better way of doing something than I did, more power to them. But if my way is better I stick to my guns. The best way I've found to work with someone else is to take control of one aspect of the project, let the other person/s deal with other parts, and stay out of each other's way unless their part causes a problem or vice versa.

I found that in a college environment, documenting your work and working harmoniously in a team is considered far more important than producing good code. So keep that in mind in your case, if you want to do well in class then you're probably best to keep your mouth shut and be seen as a "team player" no matter how much the code sucks. It's stupid, I don't agree with it, but that's the way it is in my experience.
irseg is offline  
Old 10-29-2004, 06:40 AM   #6 (permalink)
Crazy
 
Location: here and there
Quote:
Originally Posted by irseg
I found that in a college environment, documenting your work and working harmoniously in a team is considered far more important than producing good code.
wish i went to your school. all you get at mine for working harmoniously and producing bad code is bad grades all around.

Rekna, some people are just sensitive and while likely you were right to change the code perhaps you could have been diplomatic about it? Let him know you think there is a better way to accomplish something or you found a bug, and let him implement the solution. This way he has ownership of the solution as well and hopefully will believe in it as well.

Part of group programming assignments is learning to work as a group. I am fortunate right now to work with a team of programmers who all get along well, all communicate well. We get called into each other's office to look over code, take breaks to discuss things, and recognize each others' and our own strengths and weaknesses. In fact, if we get our way we will be taking over an unused conference room as a group office.

we each have our assignments and projects, but we understand the goal and recognize we are on the same team. the sales people who make promises for us to keep and frequently change requirements are the other team.
__________________
# chmod 111 /bin/Laden

Last edited by theFez; 10-29-2004 at 06:40 AM.. Reason: i suck at ubb
theFez is offline  
Old 11-02-2004, 05:11 AM   #7 (permalink)
Crazy
 
AxelF's Avatar
 
Location: Europe
Though I also agree with some other statements here, that apply for certain situations, I can also see why the guy in this case feels that he is shown no respect.

Ideally, and in THIS situation, I think one should just make the suggestions to the other team member to try and make him see it from your point of view. Then let him do the changes himslef, or do it together. That way you will both have learned alot more. He has learned better programming from you and you both have learned to be respectful team players. In the "real" world this is actually the way it is done, until you have been assigned to work with others code.
__________________
Coffee
AxelF is offline  
Old 11-03-2004, 05:08 PM   #8 (permalink)
Upright
 
In my experience, coders do tend to take pride in their work and often times consider something they've created their 'baby'. If you're working as a team, then the correct thing to do is not change someone elses code, but discuss the options and make a decision together. I would also get upset if someone changed my code without discussing it with me. In fact this has happened plenty of times, and will most likely always happen at some point. The problem is that usually the person making the change doesn't see all of the reasons why one solution was chosen over another. Yes, that person may not have considered your solution, but you learn more by working through the problem than having it handed to you. I've had solutions presented to me that were more glamorous than ones I had come up with, and I'm more than happy to change the code, or even hand the reigns over if it would benefit the project. I've also been on the other end. It makes life a lot easier, let me tell you. Of course, there are always those that believe themselves to be king of the world, no matter what you say. In that case, there's nothing to do but try your best. One day you'll be that guys boss.
tropi is offline  
Old 11-03-2004, 08:11 PM   #9 (permalink)
Banned from being Banned
 
Location: Donkey
I've worked on team projects before when a few classes I've written turned out to be designed in a not-so-efficient manner.

It's a career full of learning from your mistakes, so I have no problems if someone points out bad code. I'd rather swallow my pride and learn something new to become much more efficient in the future than try to keep some type of ego, deny a problem exists, only to pass up the opportunity to learn what I did wrong and why it was wrong to begin with.

It also depends on how you present it. Personally, I'd just go over the code with him step by step and point out why your method was more efficient.

The guy needs to chill out a bit

You can also generally avoid code-revision problems by commenting out why a certain method was done over another. Like the post above me said, sometimes there's more to the picture than meets the eye, but in this case it sounds like you know exactly where the trouble spot is.
__________________
I love lamp.
Stompy is offline  
 

Tags
programmers, proud


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 11:38 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360