⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tossit.html

📁 极限编程 Extream Programing
💻 HTML
字号:
<head><title>Toss It</title></head><body><h1><img src="logo.gif"> Toss It</h1>If something isn't being used or isn't useful, get it away from you.  You don't need the distraction.  This applies to code as well as other things.  
<p>If you've been good about following <a href="DoTheSimplestThingThatCouldPossiblyWork.html">DoTheSimplestThingThatCouldPossiblyWork</a>, you
shouldn't have much dead code in your system, but if you do find dead code it is
better to <a href="TossIt.html">TossIt</a> than save it for a rainy day.  First of all, having it there
complicates understanding of a system.  Secondly, it leads to misunderstandings 
of the system's capabilities.  
<p><a href="TossIt.html">TossIt</a> is especially important for projects that are trying to go extreme.  
<p><a href="TossIt.html">TossIt</a> is how you maintain <a href="ExtremeNormalForm.html">ExtremeNormalForm</a> when you <a href="RefactorMercilessly.html">RefactorMercilessly</a>.
<p>You shouldn't have things around you because &quot;you might, sort of, kind of, may need them later (and besides, it's already there).&quot;  No.  
<p><a href="YouArentGonnaNeedIt.html">YouArentGonnaNeedIt</a>.  <a href="TossIt.html">TossIt</a>.
<hr>
But won't my company lose its investment?
<p><em>No.  That is what version control tools are for.</em>
<p>And what company ever actually profited from old software they had lying around, anyway?
<p><em>Never had to patch an old release? It's not all <a href="http://c2.com/cgi/wiki?IllusionOfControl">IllusionOfControl</a>. Plus a good SCM tool will let you integrate by merging rather than locking - very needful in larger developments.</em>
<hr>
If it's not being used, delete it.
<strong>Otherwise, you'll have to maintain it.</strong>
<p>Yes, I've often found, in projects with dead code lying around, that we frequently find ourselves spending time maintaining and attempting to test code that is not used at all.
It happens when you change function &quot;X&quot;, and then go fix everything that calls X.
You get confused with some of the code calling X, because you can't see how it could have worked before your change.
Discovery:  <em>It didn't work!</em>  And no one noticed, because the code wasn't been used anyway.
So DELETE IT!
If you need it later, get it from the source control system.
-- <a href="http://c2.com/cgi/wiki?JeffGrigg">JeffGrigg</a>
<hr>
I once deleted (more precisely, donated) several hundred books, because I &quot;wasn't using them.&quot;  I have never regretted anything more.  At least for <a href="http://c2.com/cgi/wiki?BookAddicts">BookAddicts</a>, books can serve a purpose when they aren't being read.  They can be a roadmap of your intellectual development.  They can have sentimental value, such as books that you had when you were a kid, or books that greatly influenced you.  You can find yourself browsing them and reviving old mental threads now that you have new material to go with them.  Books tell houseguests what you like, what kind of person you are.  You can lend or give them to friends.  And they are a wonderful, understated form of decoration.  &quot;A room without books is like a body without a soul.&quot;
<p>So here's a principle: if it's difficult to replace, don't toss it just yet, <a href="http://c2.com/cgi/wiki?TentativeTossIt">TentativeTossIt</a>.
<p>There's also another principle here, something about MuseumsArchivesLibraries<a href="http://c2.com/cgi/wiki?edit=MuseumsArchivesLibraries">?</a>, something that balances (grossly overgeneralized) <a href="YouArentGonnaNeedIt.html">YouArentGonnaNeedIt</a>.  Some things are valuable to keep permanently even though they're obsolete.  The trick is to hold on to the baby pictures and first working prototypes without becoming a packrat.
<p>--<a href="http://c2.com/cgi/wiki?BenKovitz">BenKovitz</a><hr><a href="http://c2.com/cgi/wiki?edit=TossIt">EditText</a> of this page (last edited October 25, 2000)<br><a href="http://c2.com/cgi/wiki?FindPage&value=TossIt">FindPage</a> by browsing or searching<p><font color=gray size=-1>This page mirrored in <a href="index.html">ExtremeProgrammingRoadmap</a> as of March 31, 2001</font></body>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -