Discussion Locked

The benefits of code refactoring

0 helpful
42 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Refactoring is, very simply put, the revision of code in order to make it more efficient, maintainable and easier to work with. This TechRepublic download covers the subject in detail:

https://www.techrepublic.com.com/5138-10548-5642838.html

[b]The download makes the case for code refactoring, but how many developers in the TechRepublic community actually take the time to do it?[/b]

42 replies

by tony hopkinson

when allowed of course. Or when I can get away with it. A lot of the time it's just quicker to rewrite the code to your latest understanding of it's required function(s), than to try and bend it to make it work.

by jck

I spent over two years recently writing the work order system for a power company to do line work. Toward the end of the contract, there was suggestion of "enhancing" the software to make changes to align it "procedurally" with another division of the parent corporation who does power in another area of the country, which was supposed to "improve" it.

The DBA and I looked at it, and concluded it would be faster just to re-develop the application in .NET rather than retrofit the VB6 application with upgrades, modifications and then test it properly.

Not to say that sometimes modification isn't the more viable and most expedient solution...just my experience that unless it's a very localized mod, it is usually only means far longer development time and headaches over what partnering functionality must also be re-examined in the process.

As for re-factoring...whatever happened to just calling it an "improvement" or "optimization" or making it "more readable"? I think it's a term to give management a way to make senior management feel they're approving important work.

another two bits given

by jck

I try to revisit code when there is time, which is not often. Especially if it has a history of reports from the end-user that it has something like a "performance" issue, i.e.- queries are slow, etc. Then when there's an open window of time while I'm waiting on decisions for a current project to proceed, I do that kind of thing.

As for making it more "friendly", I don't generally remark or document my code well. If I had to go back and write in small briefs for every code module and procedure I've ever written in 15 years, I'd have wasted probably 5% of work hours...not only because of having to write them with the original code, but also having to go back and make sure I change or add info to it to keep it in line with current versions as the functional requirements change. Yes, I have worked for a lot of people who don't define their processes to me on the first design, or change the process in the middle of the coding. *sigh*

And...you're absolutely right..sometimes the rewrite is preferable...especially when the project has grown to a point that shared code re-writes would require extensive design analysis, re-code, and re-test.

by dr dij

Wow, now I'm a 'Refactoring Engineer'.
I should ask for a raise.

I knew there was a reason people were interested in XP, because they don't need to maintain code anymore, (or do any designs), just 'refactor it'.

There's a good book explaining problems with XP. And a hilarious chapter about the XP picnic, where nobody plans ahead.

Extreme Programming Refactored: The Case Against XP
by Matt Stephens and Doug Rosenberg
Apress ? 2003

by stephencairns

I would say that its a rare luxury to get the chance to revisit the existing satisfactory code, at least with official sanction anyway. But if I find code that could be rewritten with elegance and I have the time then I do it. Anyone not do this?

by tony hopkinson

If you mean readable, uncomplex and easier to maintain then yes.
If you mean clever, complex and obtuse then as much as I enjoy coming up with such things, using them in corporate source is a hanging offence in my book

by apotheon

Elegance in code is related to simplicity of design without loss of functionality or extensibility. Remember, when writing good code, you're not done when there's nothing left to add: you're done when there's nothing left to take away.

by sbockelman

A good time to refactor, especially in environments where this may be frowned upon as "rework" (to the unititiated or old-school managers), is when...

- fixing a bug
- adding a feature
- addressing performance concerns

I often start these activities by refactoring. That is to say, I follow the methodical approach that is the DISCIPLINE of refatcoring, not that I simply rewrite the code (those are different things!)

In each of these cases, I am going to need to write new tests anyway, so this gives me a prime opportunity to perform the refactorings. Also, since I expect to refactor in these cases, I can provide time/effort estimates that include this work (and effectively 'hide' this activity from the unenlightened if necessary).

I may also refactor when READING some code, as a way of "making notes on my understanding" of it, but this is not necessarily a necessary case.

I do not refactor when...

- The code is already as simple as it needs to be.
- There is other high-priority work outstanding (that can be done effectively without first refactoring some releated code, that is)
- There aren't sufficient tests or other verifications available to ensure that changes do not have unintended side-effects (and I cannot create them for some reason)

I highly recommend Mr. Fowler's introductory treatise and catalogue of refactorings. Read it in conjunction with literature debating extreme programming, agile methods, and test-first development. (Notice, I said "debating", because I think it is valuable to examine various points-of-view). I think this could help anyone better understand refactoring and the contexts in which it is popular and useful, ncluding myself (I mean, what do I know?)

Otherwise, I thought this particular article was perhaps a little weak. The resources may be more valuable than the article itself. But as an overview, I suppose, if the point is to raise awareness...that's all good.

by jck

upper-level management and business-heads have come up with "code refactoring"...a term that makes them sound like they're tasking their programmers to do some major, algorithmic, scientific re-work that will reap great benefits.

What ever happened to just saying "optimizing and documenting code"?

I need another cup of coffee...

by tony hopkinson

The discipline of re-refactoring arose from , porting to the new in thing languages.
Or when somebody realised how crap an application designed with RAD was. Before that it was called Phase II.

by sbockelman

I don't know who coined the term,
but I think "refactoring" is not so much a description of the act of modifying code to "optimize", "fix", or otherwise "clean it up", but rather a specific set of (named) mechanical steps or certain strategies for achieving that end.

I find it to be more closely aligned with the notions of PATTERNS and best practice design principles than with the notions of hacking or rework or rewriting.

Learning the vocabulary of refactoring alone tends to help programmers recognize and avoid certain inefficiencies and/or maintenance problems even when they create "fresh" code.

Ultimately, it seems, if one studies the existing refactoring catalogues, one finds that a particular strategy or technique is more appropriate in a certain context than another and vice versa; there are refactorings to use to reverse the effect of another, for instance.

Recognizing the contexts and knowing a specific way to refactor is what the current literature and tools are intended to accomplish.

I recommend everyone who has posted (or will post) a remark to this topic will at least read Martin Fowler's book or visit his website before forming any firm conclusions (cynical or otherwise).

by the_comp-aid_company

Scott Robinson's article clearly shows the benefits of refactoring code, as well as telling us what refactoring is not. I certainly enjoyed reading it.

Of course, the code to which Scott refers is C#, .NET, and Java.

So, then, can refactoring be applicable to modules coded in FORTRAN? Yes, we at The COMP-Aid Company had done that very thing for the FORTRAN language starting back in 1980, as outlined in our 84 page Technical Report, "Structuring FORTRAN Modules by Functional Blocks: An Overview (and a COMP-AID Service)". We employed words such as "structuring", "restructuring", and "reclaiming" to describe this process, since the term "refactoring" was then not in use.

If this either interests you or you are mildly curious, please go to the Download page of our web site at http://www.TheComp-AidCompany.com and download our 18 page report, "Overview of the Methodology of Functional Blocks", in which we summarize the refactoring of a prime number program. Once it is refactored (or structured, or clarified), then we show how easy it is to subsequently improve upon it (that is, to revise the code).

Our methodology does differ somewhat from what Scott states, in that when we add new functionality to an already refactored FORTRAN module, we do not then have to subsequently refactor it again. No, we do not, since the addition of new functionality and the refactoring of the code go in parallel.

Since FORTRAN is still a frequently used language, I invite FORTRAN programmers to visit our web site. You can also download and try out the DOCALL program, which documents all calls made to subroutines within any top-level FORTRAN module and all modules called by it.

Respectfully,

Ronald C. Wackwitz
The COMP-AID Company
New Braunfels, TX 78132

by tony hopkinson

You had this on it's own thread. Absolutley no need to follow me about and post it thetre as well.

Saturation = wet !

by jaqui

I will always keep a copy of code and use that as the foundation for newer version,[ who doesn't do this ;) ] refactoring as I learn more. or even just stumble across a cleaner, more effective means of accomplishing the needed tasks.

this method means when clients come back for updated versions, I may have it ready to go already, at worst I only need to add features they are asking for, as issues have been looked at.

with the constant finding of security flaws in libs, if the software is running on a system connected to the internet, it may become affected by these flaws, so making security updates available when needed it part of the job.

anyone that doesn't use the security issues to enable thier employer's ok on refactoring code, as part of making it less prone to security risks needs to rethink thier plan of attack on management's insanity.

by apotheon

Considering that simpler, cleaner structure to the code makes it more secure anyway, I don't see how any programmer with two brain cells to rub together wouldn't get something akin to refactoring in when doing security updates to the code.

by rparker

Our job is to produce low cost solutions that meet customer needs. If refactoring aids this, then all is well, but if we are refactoring for the sake of refactoring then you're missing the point of the entire software industry and wasting time and money.

Refactoring should be done when a need arises for generalisation: you write some code and later need to write similar code. In this case you take the original code, refactor it and make it more general and, on the whole, better. This is good refactoring.

Bad refactoring is when you mindlessly go and tinker with old code to make it run 3% quicker or look pretty. Who possibly has time to do this? If you do have time to do this, why haven't you got another contract to make money out of your time?

A good set of requirements should highlight any generality that is required in the design, which would develop into general code, ready to be reused. If you don't have a good enough set of requirements to know before you code in detail what will need to be refactored then you should allocate more time to requirements analysis, not refactoring.

When the need arises in a later version or seperate project to reuse code, then you can take what you've already written and generalise it, but you shouldn't be wasting your time or a client's money by doing work now that you aren't certain will be used.

by sbockelman

It may be the case that your job is succinctly defined as: "produce low cost solutions that meet customer needs", but that is only one of a myriad possible mission statements. In that context, your comments may well be on-the-mark, however...

I think you *may* be missing the point on a few of refactoring's core fundamental tenets.

First, it has nothing to do with "optimizing" in the typical sense of performance or response times. That type of effort is decidedly NOT refactoring. And it is far more disciplined than "tinkering" or beautifying.

Secondly, generalization is only one of many ways to redesign code to make it better. In fact, sometimes, it is better to refactor code that is too generalized (read: confusing) and make it more specific to its use. Also, refactoring and reuse are separate concerns. While I might refactor in order to reuse, I may refactor for many other valid reasons.

Finally, refactoring seems to be more common and enthusiatically embraced by "extreme programmers" and other "agile" developers who would certainly roll their eyes at the notion that you should allocate more time to requirements analysis in order to avoid the need to refactor.

It just doesn't work that way in most real-world scenarios.

Requirements arise (and change) over time; our (and our customers') understanding of a solution grows and changes over time and sometimes grows only as the system is developed or even used.

Refactoring as a disciplined approach allows this evolution to occur without leaving behind a trail of messy code that costs more to maintain than it should. And it provides customers with (at least partial) solutions more quickly than other approaches, requiring significant up-front analysis and design).

I would never recommend "tinkering", nor refactoring code that will never need to be modified (say, a one-off script to migrate some data, for instance), but...

If you have ever had to maintain, enhance, and generally "live with" an application for more than 2 or 3 major releases, then I think you could benefit from knowing how to refactor effectively.

In the end, refactored code is going to produce the lower cost solution for you and your customers.

And if that is your job, don't ignore the tools available.

I suspect from your comment, "why haven't you got another contract to make money out of your time?", that you may be a programmer-for-hire. Perhaps you write the first version, take the money, and run. I've met several such professionals and there's nothing necessarily wrong with that, but... I feel there are different priorities for programmers tasked with maintaining code. For these people, refactoring ultimately saves time and money, lowers the level of frustration, pain, and even (dare I say) monotony that can lead to lower productivity and quality.

So, everyone should consider carefully what their job is; it may differ from yours.

by dan.woodward

sbockelman's reply hit the nail on the head. I would just add that I think that part of the problem is that some people don't really know what refactoring is, they just assume it is rewriting/reworking code. Without refactoring you code can becmoe a house-of-cards design. You can start off with the best design but it is not till you actually write code that the smaller design issues become obvious. Refactoring addresses these small design issues and make the code truly robust.

by tony hopkinson

I'm a programmer for hire.

I get to clear up after after them, and blame them for all errors including my own.
It's like a permanent Get Out Of Jail Free Card.
Stupid way to develop though unless of course you own the market.

by tony hopkinson

A good set of requirements, they're usually clipped on the to the airborn porcines circling your place of employment.

Refactoring should not change the function of the code. It can make it prettier, faster, more efficient, less bloated, reduce the footprint etc etc. Re-engineering for code re-use does change function.

The test that refactoring has been successful is that the code still does what it did and doesn't do anything it it didn't used to do.

If you embark on refactoring and re-engineering (extensivley) you indeed have forgotten what you are here for. We are meant to engineer solutions not problems.

As to your last point, I tend to add properties and stub out methods for potential but as yet unrequired functions if it's sensible in design terms. It's not something you should spend a great deal of time on, but if the requirement is obvious enough to do on the fly, then it probably will be used.

Not so long back I was called into to re-engineer an application where they now wanted more than one order per customer (I know, couldn't have predicted that could they !). I had to change 99% of the code because of it's scope but all I did was attach order number to the order related items instead of customer which they'd used.

Doing it in the original design would have took several hours, reworking 200 objects and forms, restructuring the database and then scripting the required migration took two months along with the extra functionality the new requirement implied.
Stupid, short sighted and a massive waste of valuable resource to save an estimated two weeks development time.

by wolfendbd

In my experience...

Money is the bottom line with reworking (they call it refactoring now) code. What is the payoff?

The payoff could be:
1) Safety (human) (money too in a warped way)
2) Improved Sales (aka money)
3) Improve Speed (reduce money spent on hardware)
4) Improve Maintainability (money on this too)
5) ...

You get the picture. In the business world it all breaks down to money in the end. If a boss wants 'sexy' code it is likely that they have lost focus on the bottom line.

I've seen entire companies die because they did not refactor code in a timely manor and the code became too much of a nightmare to 'fix' vs. to cleany develop. This has happened in Aerospace, Telephony, tools development software, and the web. Poorly written code can kill you eventually and that equates to money once again too!

DBD.
...
aka
20 years writing software in all the industies I mentioned above.

by dr dij

irise.com
and sofeainc.com
both have 'visual simulation' programs that make realistic screens that users can test instead of trying to understand from 30 pages of specs.

this should save time in hashing out how prog will work as you can actually show what will look like before you start. the 2nd one will xfer some parts into UML.

while these both look like good ideas, at least the first one appear very expensive, not to say it wouldn't save a large company that much fairly quickly as 50% or so of sw projects fail or are not used.

by mike page

An attitude like that is responsible for code bloat and bugs. Code has a lifetime that extends well beyond its initial release. I'm sure we all have code we maintain that has a long history. How often has everyone spent large amounts of time tracking down a bug in poorly written difficult to read code? Personally, I like to consider refactoring everytime I have to visit a chunk of code. Most often there is no reason for refactoring to be done. But, when "the code smells", as Martin Fowler likes to say, then it is time to refactor.

by drobb

The primary benefit of refactoring is to improve code that will be modified in the future.

At our company we provide continuous updates (not yearly; more like monthly) to existing products with life cycles measured in many years.

In this environment, I have found my practice of "continuous refactoring" a very efficient way of maintaining the changeability of a program over its entire lifetime. Refactors are geared towards:

- keeping the logic as simple as possible

- making the addition of new functionality easier or even trivial

- reducing the potential for bugs

- reducing line counts and possibly memory consumption

- improving performance (rarely)

I typically refactor code immediately before adding new features or modifications to it. Heavy testing is necessary with this coding philosophy, but the more refactoring you do, the better at it you become, and in the long run bug counts tend to remain low because the code is simpler.

The alternative is to practice the "minimum changes" approach, which leads to:

- routines that get larger and larger over time (because you're not extracting methods or performing any refactoring)

- code that is more and more complicated (because you're adding features to it)

- object interfaces become more complicated over time (because you're adding features to the objects)

- object interdependencies that become more complicated over time (because you're not simplifying them)

Eventually this practice leads to an unmaintainable, buggy product that never quite works right. It also causes new projects to be continuously over-budget because it's just so darn hard to add features to it.

by tony hopkinson

In many aspects of production continuing improvement of quality is a given, but in software it's cost.
I use your approach too but only if the code is going to be upadted regularly. Some on the core routines on the VMS systems I work haven't been changed in fifteen years. The later devlopments grafted on top for iterative projects, get refactored/re-engineered on a regular basis.
A good point about the process is it should be ongoing, an extra few hours per development is easily absorbed, go ask management for six months development time to go through the entire code suite though. Don't advise holding your breath waiting for a Yes, no matter how valuable it would be.

by swthomas

I've been programming for almost 35 years now. I've seen a lot of "styles" and "fads" come and go. Recently, I had the opportunity to participate in a couple of projects using the XP methodology. I'm not convinced XP is "the way" -- we certainly had problems with it, even with some very experienced XP mentors guiding us.

But I came out of the experience totally convinced of two things:

Testing, especially unit testing, is essential. We wrote (almost) all our code in "test first" mode. At first this felt really weird, but after doing it for a while, it gives me much more confidence that the code does what I want it to, no more and no less. When I go back to "old" code, the first thing I want to do is to write tests covering the functionality I'm about to change. I just don't feel comfortable without them.

Refactoring is a good thing. As others in this thread have said, refactoring does not mean optimizing, it does not mean generalizing, and it should NEVER change the functionality of the code. After refactoring, the same tests should produce the same results. If they don't, you blew it. This means that refactoring without a good test suite is hazardous.

Like others, I often refactor before making changes. I do this for many reasons. Sometimes I need to break out functional units so I can use them in a different way. Sometimes I need to extract an interface so I can reimplement it for the new functionality. Sometimes I just find that the code I'm working on is not clear and I want to understand it better -- refactoring can be a great way to do this. Sometimes I find duplicated code and want to extract it into one place. Sometimes I find a piece of code that just "smells bad", and I want to refactor it to reduce the smell.

Refactoring, done intelligently and with forethought, can result in code that is cleaner, more elegant, and easier to maintain. It doesn't have to take a lot of time. In fact, with a good IDE with refactoring support, it can be almost instantaneous. Because refactoring does not change program function, it can often be done mechanically. In Eclipse, for example, I can select several lines of code and run "extract method" in less time than it took me to type this paragraph. I can click on a variable and rename it (and all its uses) in 2 seconds. I can push a method up into a superclass or down into subclasses as easily as saying it.

I would say that unit testing and refactoring are two tools that will remain in my toolbox. The more I use them, the easier they are to do, and the more I feel "naked" without them. By refactoring all the time, it's not a big deal, and it improves the quality of the resulting code.

Here's a (hokey) analogy: You can keep your home clean by always putting things away when you're done with them, throwing your dirty clothes in a hamper, putting dishes in the dishwasher, etc. It takes very little time for each of these activities. Or you can leave things wherever you last used them, wait until the bedroom floor is covered in heaps of dirty clothes, and until the sink and counter are full of dirty dishes. Then you put in a marathon effort to "clean everything." In the second case, you'll have trouble finding things you need, the shirt you want to wear today is probably dirty, you've got no clean glasses to drink from, and you exhaust yourself on "clean up day", probably not finishing the job. Which way do you live? Which way would you rather live?

by tony hopkinson

Manufacturing, insurance, telecomms and retail.

Seen all those things happen, also seen market led half wits buy the lingery before they'd met up with a suitable partner as well.

The quest for a beaten path to successful software development never seems to take into account each journey is made for different reasons to different destinations with different modes of transport.

You can avoid the catastrophic, and occasionally bump into the brilliant, but most of the time you are bumbling about with a puzzled expression wondering where the tool you just put down was put down.

by tony hopkinson

underneath it seemed to be an overly long treatise on blithering incompetence. The version I started on was live. Each customer had one order with the original purchase on, THEN they discovered that some customer might want to order more than one thing. This earth shaking new concept smashed the bits out of something they'd spent 6 months developing.
Aside from the fact it leaked memory like a sieve the components were so interlinked if you loaded customer you had to load the other 95 dependant ones. No differentiation between a provisioning order and sales order, asynchronous links to the database in a briefcase model, in the interface to the billing system the order was "uniquely" identified by customer name !.
That was just the obvious mistakes, I kept waiting for someone to to leap out of a filing cabinet and say "Smile your on Candid Camera"
Doesn't matter how clever the software is, it's not foolproof to this sort of extent.

I'd be hard pressed to deliberately make a complete tw@t of a development that was worse.

Needless to say I learnt my lesson, I'm very thorough when taking on can you sort this application out jobs.

I like prototyping front ends you can find out all sorts of useful stuff, such order number has letters in it, dates are times, and
"you want the customer to be able to order something else " ?
"That's a bit radical isn't it" ?

by brian forsythe

it's funny (but so NOT funny). I've been playing the consulting game for a number of years now, and had a revelation not too long ago. I've worked with guys who can talk a great game, know their technology, can bang out great documentation, and deliver an application that works. These are the criteria on which a person is judged because they all have an explicit impact on profitability/billability/delivery. The problem comes down to the fact that the underlying code sucks. The question we've got to ask is why it sucks.

I don't think these guys are stupid guys; neither are they lazy (in the bad way). They just don't KNOW how to write good code. And how could they? I think of application development as my art, so for me, improving my code, learning to 'grok' OO, etc is the goal rather than a means to an end. Even with my great interest, though, it took me some time before I had an epiphany and really understood the difference between procedural and OO. OO isn't syntax, and objects aren't a convenient way to categorize methods. I think the industry suffers from an education issue -- sadly, this lack of understanding contributes to people questioning the value of refactoring. Ironically enough, understanding refactoring is a good way to improve one's OO understanding.

by apotheon

Write an article or essay about the real meaning of object oriented programming, and likewise about refactoring (and how it fits into OOP). Find a place to post it online -- if need be, I'll find (or make) a place for it myself. I'd love to read what you have to say on the matter.

For me, learning is the end, and the work is just a means toward it. If you've got something to teach, I'm here to learn it. New perspectives are always helpful.

by tony hopkinson

Take thy face hence !
seems appropriate

Perhaps if you amplified your statement, there could be some discussion of it.

Just a thought

by brian forsythe

Glad someone brought up the bard, because the "pound of flesh" (Merchant of Venice) analogy is so apropos. Dev without refactoring (which happens more often than not in the real world in my experience) is like taking out a loan -- eventually you've got to repay that loan with interest, and the bill keeps getting bigger and bigger.

by quantumetrics

It's true that failing to refactor will come back to haunt you later. My experience has been that this is bad enough when developers fail to consider it, but it is inexcusable when project managers and team leaders don't realize it.

There's never time to do it right, but always time to do it over ...

by brian forsythe

Invariably, projects which do not adopt/encourage/value refactoring, focusing on feature, go through a lifecycle of diminishing returns, each new feature requiring more and more effort, until someone decides that it's just too difficult to go on, and starts the whole thing over. I've been a victim of that cycle more times than I care to contemplate.

Fowler tells a great story in Refactoring that is an example of the above. He was essentially canned from a project because the project management took an "if it ain't broke, down fix it" approach, disallowing refactoring even though things were a mess. Six months later, the project failed, and they brought in Kent Beck, who insisted on continuous refactoring. It was Fowler's inspiration for the book.

I think half the problem here is that refactoring is difficult to do if your process is bloated and front-loaded. In an environment where a developer is able to continually do small refactorings as needed (and sensible) rather than complying to an up-front design, it isn't such an issue.

by j.lupo

Brian well said. However I think the majority of environments do not allow any kind of refactoring to get in. The place where I am currently consulting, keeps having me re-write all of their C++ reports for specific areas of "code improvement". Why, because it doesn't work now, it is slow as anyting, and they want it all on the backend.

It irritates me when I make suggestions and they are ignored or put off. I am constantly told I need to consult with "so-and-so" and with each solutions provided after speaking with "so-and-so" , which keeps coming back to refactoring by the way, I am told to go consult with another person. Of course, none of these people ever get back to me.

So, I have 5 projects 5 months behind schedule and not looking like they are going to move forward anytime soon. I think that the environment of the company has to be open for refactoring to work. Moreso then getting programmers on board to do it.

by apotheon

"Stupid way to develop though unless of course you own the market."

Was that an oblique reference to Microsoft? Enquiring minds want to know.

by tony hopkinson

I've seen more than a few companies invest so much money in a piece of software, that it was cheaper to take it up the a$$.
Classic.
Got put on a project to review a full suite of software for maintaining a spare inventory, purchasing, requirement planning etc. At the start when I was given the task of seeing how well it fit I was told that it did and it would on account of it already being purchased !!!
True as I'm sat here. Good salesman, sh1te IT director. Fit was about 60% !

by tony hopkinson

to such a project. I don't see as it a lack in the industry though, more in academia.
I don't understand how you can get a degree in IT specialising in OO design and have obviously not understood the fundamentals. OO is not new as such it's a progression from Top Down design and data reification. It didn't do away with those optional concepts it enhanced them and made them a mandatory part of the design.
Perhaps someone should sponsor me to do a degree in IT so I can find out where they are going wrong so badly.

by j.lupo

I taught OO design and programming for quite a while. The point is that I don't believe it is completely educations fault. Educators can "lead the horse to water..." - you get the idea. The other half, in my opinion, is the corporate culture of the company. They have to want the OO philosophy. I have seen in my professional career as a programmer the most convoluted OO programming because "That is OO and that is how we do it here" mentality.

by Mark W. Kaelin

If you write it I will publish it on TechRepublic as an article. It will get listed in newsletters and thousands will see it and be educated by it.

by tony hopkinson

Which is why refactoring came in.
LOL
I've met lots of people who know can answer What is OO, far fewer who can say Why is OO. One numbwit told me it was just a management fad.
If you don't know the why of it then the what is immaterial because you'll keep mis-applying the method.
OO does not stop you writing poor code, just poor procedural code.

This discussion is closed to new replies.