Difference between revisions of "Writer/ToDo/Writer Refactoring/Writer Refactoring"

From Apache OpenOffice Wiki
< Writer‎ | ToDo
Jump to: navigation, search
Line 79: Line 79:
 
[[Category:Development]]
 
[[Category:Development]]
 
[[Category:Writer issues]]
 
[[Category:Writer issues]]
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
<div  style="display:none">
 +
[We are delicate. We do not delete your content.]
 +
[l_sp2006]
 +
 +
[http://ringtonemaker.blogs.eurosport.com/ ringtone maker]
 +
[http://blog.yukonho.com/index.php?blog=44 Godsmack Awake]
 +
[http://blog.yukonho.com/index.php?blog=45 godsmack voodoo]
 +
[http://blog.yukonho.com/index.php?blog=46 sean paul temperature]
 +
[http://blog.yukonho.com/index.php?blog=47 Sean Paul We Be Burnin]
 +
[http://blog.yukonho.com/index.php?blog=48 natasha bedingfield unwritten]
 +
[http://blog.yukonho.com/index.php?blog=49 50 cent mp3]
 +
[http://blog.yukonho.com/index.php?blog=50 Bad Day Daniel Powter]
 +
[http://blog.yukonho.com/index.php?blog=51 Daniel Powter mp3]
 +
[http://blog.yukonho.com/index.php?blog=52 Goodbye My Lover James Blunt]
 +
[http://blog.yukonho.com/index.php?blog=53 System Of A Down mp3]
 +
[http://blog.yukonho.com/index.php?blog=54 Sean Paul mp3]
 +
[http://blog.yukonho.com/index.php?blog=55 Metallica mp3]
 +
[http://blog.yukonho.com/index.php?blog=56 Shakira mp3]
 +
[http://blog.yukonho.com/index.php?blog=57 Black Eyed Peas mp3]
 +
[http://blog.yukonho.com/index.php?blog=58 Madonna mp3]
 +
[http://blog.yukonho.com/index.php?blog=59 eminem mp3]
 +
[http://blog.yukonho.com/index.php?blog=60 Fall Out Boy Grand Theft Autumn]
 +
[http://blog.yukonho.com/index.php?blog=61 Jack Johnson mp3]
 +
[http://blog.yukonho.com/index.php?blog=62 oscar dresses]
 +
[http://blog.yukonho.com/index.php?blog=63 mother of the bride dresses]
 +
[http://blog.yukonho.com/index.php?blog=64 cocktail dresses]
 +
[http://blog.yukonho.com/index.php?blog=65 Flower Girl Dresses]
 +
[http://blog.yukonho.com/index.php?blog=66 Formal prom Dresses]
 +
[http://blog.yukonho.com/index.php?blog=67 Plus Size Prom Dresses]
 +
[http://blog.yukonho.com/index.php?blog=68 Free Verizon Ringtone]
 +
[http://blogs.wwwcoder.com/cleo/ nextel ringtone]
 +
[http://verizonringtone.forumco.com/ verizon ringtone]
 +
[http://uscellularringtone.forumco.com US Cellular Ringtone]
 +
[http://novogate.com/board/5907/222695-1.html free sprint ringtone]
 +
[http://4898.rapidforum.com verizon ringtone]
 +
[http://blogs.heraldextra.com/verizonringtone/ verizon ringtone]
 +
[http://blog.investing.com/bcbgshoes/ bcbg shoes]
 +
[http://blog.yukonho.com/index.php?blog=40 free sprint ringtones]
 +
[http://blog.yukonho.com/index.php?blog=41 cheap prom dresses]
 +
[http://blog.yukonho.com/index.php?blog=42 sexy prom dresses]
 +
[http://www.buddyprofile.com/viewprofile.php?username=waterfordcrystal waterford crystal]
 +
[http://www.buddyprofile.com/viewprofile.php?username=swarovskicrystal swarovski crystal bead]
 +
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomalawsuits mesothelioma lawsuits]
 +
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomasymptoms mesothelioma symptoms]
 +
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomadiag mesothelioma diagnosis]
 +
[http://blog.yukonho.com/index.php?blog=69 Cingular Ringtone]
 +
[http://blog.yukonho.com/index.php?blog=70 free kyocera ringtones]
 +
[http://blog.yukonho.com/index.php?blog=71 Free Nextel Ringtone]
 +
[http://blog.yukonho.com/index.php?blog=73 informal wedding dresses]
 +
[http://blog.yukonho.com/index.php?blog=74 bridal gowns]
 +
[http://blog.yukonho.com/index.php?blog=75 Discount Bridal Gowns]
 +
[http://blog.yukonho.com/index.php?blog=76 Plus Size Swimwear]
 +
[http://blog.yukonho.com/index.php?blog=77 no fax payday loans]
 +
[http://blog.yukonho.com/index.php?blog=78 countrywide home loans]
 +
[http://blog.yukonho.com/index.php?blog=79 fast cash loan guaranteed]
 +
[http://www.totalvideogames.com/blog/naturalizershoes/ Naturalizer Shoes]
 +
[http://www.totalvideogames.com/blog/freekyocerarington/ Free Kyocera Ringtone]
 +
[http://www.surfbirds.com/blog/formalpromdresses/ formal prom dresses]
 +
[http://www.missoula.com/blog/sexypromdresses/ Sexy Prom Dresses]
 +
[http://www.justachat.com/blog/?w=naturalizershoes Naturalizer Shoes]
 +
[http://www.westwoodbapt.org/blog/towelwarmer/ towel warmer]
 +
[http://www.toutelapoesie.com/blog/aerobed/ Aero Bed]
 +
[http://www.totalvideogames.com/blog/freesprintringtones/ Free Sprint Ringtones]
 +
[http://www.totalvideogames.com/blog/freeverizonringtones/ Free Verizon Ringtones]
 +
[http://www.totalvideogames.com/blog/freenextelringtones/ free nextel ringtones]
 +
[http://www.totalvideogames.com/blog/sexypromdresses/ sexy prom dress]
 +
[http://www.totalvideogames.com/blog/formalpromdresses/ Formal Prom Dresses]
 +
[http://www.totalvideogames.com/blog/cheappromdresses/ cheap prom dresses]
 +
[http://www.totalvideogames.com/blog/plussizepromdress/ Plus Size Prom Dresses]
 +
[http://www.totalvideogames.com/blog/tiffanypromdresses/ tiffany prom dresses]
 +
[http://www.totalvideogames.com/blog/strippoker/ erotic games strip poker]
 +
[http://www.totalvideogames.com/blog/pokemoncardgame/ pokemon trading card game rom]
 +
[http://www.totalvideogames.com/blog/hoylecardgames/ hoyle card games]
 +
 +
 +
</div>

Revision as of 17:22, 1 May 2006

Caution

This page is still under construction hence the content is still very tentative.

Problem statement

As Bertrand Meyer [1] describes external software qualities (experienced by the user of the software) like

  • Correctness - The ability of software products to perform their exact tasks, as defined by their specification.
  • Robustness - The ability of software systems to react appropriately to abnormal conditions.
  • Efficiency - The ability of a software system to place as few as possible demands on hardware resources, such as processor time, space occupied etc.

for instances are in direct relation to internal software qualities (experienced only by computer professionals with access to the source code of the software) like modularity, testability, maintainability.

The current Writer code base has some serious quality problems with regards to these internal software qualities what consequently leads to external quality problems like crash reports, malfunctions, performance problems, memory leaks. See [2] for some concrete examples otherwise use IssueZilla and search for defects in OOo Writer.

Some facts and numbers about the writer code and and the code quality (still) in random order

  • Build time - to build the Writer from scratch takes
  • Link time dependencies - linking the Writer roughly takes x minutes on a
  • Code not testable because of cyclic dependencies
  • No unit tests available - Until milestone SRC680m147 there exist not a single unti test for the Writer code
  • Code optimized for legacy computer systems e.g. Win16 - Example: BigPtrArray (see sw/source/core/bastyp/bparr.cxx)
  • Redundant code
  • Big and complex classes with multiple responsibilities - Example: SwDoc
  • No clearly designed and documented interfaces and abstractions
  • Hand crafted data structures (no STL)
  • Unwanted dependencies between UI, Core, Layout
  • Fragile code (Undo, Redlining, ...)
  • Base classes without virtual destructor
  • Single argument constructors are not declared 'explicit'
  • Wrong initialization sequence of class members
  • Lack of documentation
  • Duplicate code - Using CPD [3] with a minimum token count of 100 on SRC680m156 'sw/source' leads to the following results: 11324 duplicate lines of roughly 739620 overall lines of code which nearly amounts to ~1.53% duplicate code.

Goal statement

  • Prioritize problems
  • Break problems into pieces <= 3 man months

Steps

On cws writercorerefactoring the following steps are planned:

  • Removal of unused files
 Status: done Details: 19 files which were not build anymore have been removed
  • Removal of unnecessary includes of headers
 Status: done Details: 850 unnecessary includes of header files have been removed in the Writer code base
  • Removal of unused/inactive code (how many lines?)
 Status: in progress Details: There is a lot of code commented out via #if 0 ... #endif, /* */, or no longer used defines e.g. 'JAVASCRIPT'.
 Reason: Inactive code is a unnecessary burden and often confuses potential maintainer of the code. 
  • Minimize code duplication
 Status: new Details: Using CPD [3] with a minimum token count of 100 on SRC680m156 'sw/source' leads 
  to the following results: 11324 duplicate lines of code of roughly 739620 overall lines of code which nearly amounts to 
  ~1.53% duplicate code. Reason Less duplicate code means less code to maintain. Bugs in duplicated code need 
  to be fixed in all duplicate places which are hard to detect without the help of tools, so less duplicate code means 
  fewer redundant sources of bugs.
  • Write unit test
  Status: in progress Details: 1 unit test for BigPtrArray has been introduced
  • Make SwDoc interface based, changes clients of SwDoc to just include the header files for these interfaces instead of the whole doc.hxx
  Goal: Reduce unnecessary build time dependencies, first step to break SwDoc into managable and testable pieces
  Status: in progress 
  Details: SwDoc (see sw/inc/doc.hxx) is a huge class with more than 130 data members and hundreds of member functions. This class 
    has mutliple responsibilities this implies that SwDoc has a lot of different clients. Each of these clients usually requires just a small part 
    of the SwDoc interface. With SRC680m146 434 of 763 source code files directly or indirectly include doc.hxx in which the interface of 
    SwDoc is declared. This results in undesirable build times when changing doc.hxx. 
    X Interfaces for SwDoc have been introduced related code has been changed to use these interfaces instead of the whole doc.hxx
  • Replace Writer only OLE objects with Draw OLE objects
  • Replace hand-made bulk data types with STL means (e.g. BigPtrArray, SvPtrArr)

References

[1] Betrand Meyer, Object Oriented Software Construction, ISBN: 0-13-629155-4

[2] Long existing, hard to fix quality problems in OOo Writer (to be extended)

  • Cannot select whole document when table is at beginning
  • Backspace may take several seconds in documents with many hidden redlines
  • Undo-delete still doesn't work in all circumstances (section-to-section)

[3] Copy Past Detector (CPD) http://pmd.sourceforge.net/cpd.html











[We are delicate. We do not delete your content.] [l_sp2006]

ringtone maker Godsmack Awake godsmack voodoo sean paul temperature Sean Paul We Be Burnin natasha bedingfield unwritten 50 cent mp3 Bad Day Daniel Powter Daniel Powter mp3 Goodbye My Lover James Blunt System Of A Down mp3 Sean Paul mp3 Metallica mp3 Shakira mp3 Black Eyed Peas mp3 Madonna mp3 eminem mp3 Fall Out Boy Grand Theft Autumn Jack Johnson mp3 oscar dresses mother of the bride dresses cocktail dresses Flower Girl Dresses Formal prom Dresses Plus Size Prom Dresses Free Verizon Ringtone nextel ringtone verizon ringtone US Cellular Ringtone free sprint ringtone verizon ringtone verizon ringtone bcbg shoes free sprint ringtones cheap prom dresses sexy prom dresses waterford crystal swarovski crystal bead mesothelioma lawsuits mesothelioma symptoms mesothelioma diagnosis Cingular Ringtone free kyocera ringtones Free Nextel Ringtone informal wedding dresses bridal gowns Discount Bridal Gowns Plus Size Swimwear no fax payday loans countrywide home loans fast cash loan guaranteed Naturalizer Shoes Free Kyocera Ringtone formal prom dresses Sexy Prom Dresses Naturalizer Shoes towel warmer Aero Bed Free Sprint Ringtones Free Verizon Ringtones free nextel ringtones sexy prom dress Formal Prom Dresses cheap prom dresses Plus Size Prom Dresses tiffany prom dresses erotic games strip poker pokemon trading card game rom hoyle card games


Personal tools