• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Architect's code in my company

 
Ranch Hand
Posts: 463
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,

I was assigned to a module (ofcourse for maintenance and enhancements). Previously one architect (his designation) coded that module. I am supposed to enhance the code and extend the functionality. Today, I've taken decision to kill that guy if I found him again (he left company a month back.)

I cannot paste my code here, however, this is how he coded a method. Just to give a sample, he is adding some index value to an primitive integer (int x = someValue + 3). He never commented saying why he is adding that 3, moreover, why adding 3 why not 1 or some other number.

I am very much irritated the way he coded with rusty code comments. He comments some block of code, I don't know whether I can remove that part or to keep it. In my company, no one intersted in Refactoring. I am the guy who extensively worked in Agile practises before, like Test Driven Development, Refactoring etc. I have commited enough sin to join this company in Singapore.

If architect codes like this, forget about developers. This company doesn't follow any standards.

God, I have no other go. I have to clean up this dirt.


[ December 04, 2007: Message edited by: Sai Surya ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a good practice to keep your posts 'reasonable' on the internet.

I welcome your right to rant, but I suggest you edit your title to include a more moderate statement, and continue to do so in future.

Dave
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope it is just metaphorical when you say you want to "kill" the guy. It sounds a bit borderline psychotic to me. :roll:
 
Ranch Hand
Posts: 1327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
these kinds of situations happens a lot everywhere, I have encountered the similar situation as well and I felt like who ever wrote the code should get shot.
 
Author
Posts: 3473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a common problem that is why you have to have a proper code review/pair review practice in place.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought such satuiations only happen in China not in India, as I think India is more stronger, maturer than China in IT field.
As Billy Tsai said they are happening everywhere in the world.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would you expect any one place to be different? I have worked on any number of projects here in Oz with the same problem. I consider it 'sub-optimal', but it's the fact of development that no one else will write code quite the way you like it.

I take a deep breath and refactor.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just read the code and figure it out. I only include javadoc for a method and dont comment for every 10 lines. Very rarely do I include comments within the method unless i call a cryptic function or write logic that might be a bit complex.

Stuff happens anyway and I dont know how bad your architect's code is. Have a nice weekend
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sai,

If you were a good developer, you should use debugger to step through the
code to figure out the logic yourself. Posting something like this would not help you at all.

You could ask the many comments for each line of the code,
but remember sometimes the comments point to a wrong direction.

Do you know how many comments in the code of open source projects
(say Struts)?
[ December 08, 2007: Message edited by: John King ]
 
Billy Tsai
Ranch Hand
Posts: 1327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that does not help even if you are a good developer when there is no requirement and design specification(class, sequence diagrams etc).

anyway I have faced similar situation in more than one occassion in one country and when I moved to another country that same situation happened again. So whoever did that or whoever that is technically arrogant should get shot
 
John King
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UML diagrams can be helpful in the design phase at high level.
They are most likely out of sync with the real code if you do not use
reverse engineering.

Billy, I hope you do not shot anyone in your workplaces.
 
Ranch Hand
Posts: 538
Hibernate Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sai,

I cannot paste my code here, however, this is how he coded a method. Just to give a sample, he is adding some index value to an primitive integer (int x = someValue + 3). He never commented saying why he is adding that 3, moreover, why adding 3 why not 1 or some other number.

OK, he should have done it, his fault, but now it has become YOUR job to understand why and add the lacking comment (this is why agile programming recommends dual programming, what looks obvious to one but not the other must be commented). Fixing your colleagues' mistakes is a team work, so it becomes your business now.

In my company, no one intersted in Refactoring. I am the guy who extensively worked in Agile practises before, like Test Driven Development, Refactoring etc. I have commited enough sin to join this company in Singapore. If architect codes like this, forget about developers. This company doesn't follow any standards.

Then explain to your colleagues the benefits of agile practises, and when they understand it helps them to code much better they will all adopt it as well. The company certainly won't oppose to the adoption of standards by its programmers which will much enhance QA.

Best regards.
 
arulk pillai
Author
Posts: 3473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bad code can be tolerated but bad design (structural) makes your application hard to extend and fixing something will break something else.

Writing code is an art and it varies from person to person as suggested by David. Some are better at coding and others are better at looking at the big picture. A very few can do both reasonably well.

Also, amount of refactoring one can do depends on the availability of time, team culture and process, recognition of such effort etc.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic