James Watson
Posts: 2024
Nickname: watson
Registered: Sep, 2005
|
|
Re: More Trouble with Programming
|
Posted: Dec 12, 2006 11:29 AM
|
|
> I work at one of those "not a software companies" with > 100s of programmers. We write software to support our > instrumentation, but, in general, we make money selling > the intruments, not the softare. One problem that arises > is that nobody is paid (i.e., reviewed) on how reusable > they make the code. You are reviewed on whether the SW > shipped on time with the instrument. Not on whether > somebody can easily use it in the next project.
The way I see it, I make the code reusable so that I can continually improve my efficiency. Solving the same problem again and again means you and only increase your speed so much. This is is the kind of manual thing I am talking about.
The biggest problem with writing reusable code is that it's hard to do and most developers don't realize that. Most of the 'reusable' code I see is either not really reusable or reuse means you have to make unacceptable concessions in the new solution. You can't just use Objects and think you'll get reusable code.
> Much to my shock, he just started typing. There were a > few minor missteps as he guessed the classes ("what is it, > Event ListenerList???") and hit control-space, etc. to > fill in the procedure names. Within a couple of minutes > we had the code. I was impressed. > > But his code is, of course, slightly different than every > other event firing procedure in the SW.
If it's being done again and again, you should really be creating some reusable code to do it. If it's not that common, it shouldn't really be a problem.
> Myself, being used to older, clunkier IDEs, I would have > looked for some other code that fired events, then copied > and pasted it. And then, most importantly would > have considered, "can we refactor this to one common > codebase". (With generics you can actually do much of > this)
Well, I would chalk that up to inexperience, not the IDE. IDE's actually make it a lot easier to search the code. For example, Eclipse can search the entire code base for the use of a method, not just text that matches the method name. You should have stopped him and had him look for code that used the classes involved. This is the kind of mentoring that we need more of in this industry.
|
|