Editing
Maintain legacy code
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== cases of legacy code == legacy: require_once, include_once * alternative: [http://justericgg.logdown.com/posts/196891-php-series-autoload PHP系列 - Autoload 自動載入 « 不像樣工程師 Eric G. Huang's 學習日記] legacy: mysql_query, mysql_fetch_array * alternative: [http://php.net/manual/en/pdo.prepare.php PHP: PDO::prepare - Manual] legacy: [http://php.net/manual/en/control-structures.foreach.php foreach] * alternative: [http://php.net/manual/en/language.generators.overview.php generators] legacy: nested if-else * alternative: interface <pre> (left blank intentionally) legacy: * alternative: </pre> == 避免的 coding 習慣 == [[Coding habits to avoid |避免的 coding 習慣]] == further reading == * 王建興 (2009). [http://www.ithome.com.tw/node/57107 如何面對與避免Legacy Code | iThome] 「Michael Feathers曾經對Legacy Code下了另一個定義,他認為Legacy和Non-Legacy Code區分的關鍵,在於測試。」 * Fukuball Lin (2015). [https://speakerdeck.com/fukuball/indievox-ta-ru-yan-chang-hui-shou-piao-zhi-hou-de-kuai-su-shui-bian-how-we-build-a-scalable-php-website-for-ticketing iNDIEVOX 踏入演唱會售票之後的快速蛻變:How we build a scalable PHP website for ticketing // Speaker Deck] * zonble (2016). [http://www.slideshare.net/zonble/code-60464624 怎樣寫出比較沒有問題的 Code] 「不要寫 if。如果非要寫 if,不要亂寫 if。」 [[Category:Programming]] [[Category:PHP]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information