( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.11664099216require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.11764128208include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.11764128208get_header( $name = ???, $args = ??? ).../single.php:10
60.11764128424locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.11764128520load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.11764129064require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.11784136472wp_head( ).../header.php:18
100.11784136472do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.11784136688WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.11784136688WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.11804140104wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.11804140104do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.11804140320WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.11804140320WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.11814142208twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.11834143728wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.11834143728WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.11834143728WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.11834143728_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.11834149680wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.11834269216trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.11664099216require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.11764128208include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.11764128208get_header( $name = ???, $args = ??? ).../single.php:10
60.11764128424locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.11764128520load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.11764129064require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.11784136472wp_head( ).../header.php:18
100.11784136472do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.11784136688WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.11784136688WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.11804140104wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.11804140104do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.11804140320WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.11804140320WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.11814142208twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.14764270320wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.14764270320WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.14764270320WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.14764270320_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.14764270640wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.14774270864trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

每天写出好代码的5个建议

成为一个优秀的程序员和成为其他优秀的专业人员一样,需要尽可能多的做一些有质量的工作。有句很流行的话可以总结:做,正确做事,立马就做。(Do it. Do it right. Do it right now)

0. 将一天要做的事情列成清单

完成复杂活动(activity)的最好方法是将其拆分成简单的各项活动。每天早上,将你一天要完成的活动进行拆分,然后制定一个相应的日程安排表,这样能够帮助你:

  • 更好的理解这个活动。
  • 每天都有一个集中的目标。
  • 提高你的估计能力,几天之后,你会发现你能预测一天的工作量。

1. 一次只做一件事

集中于一项任务比同时做多项任务更多产,不同的研究已经证明这个观点,并且发布在不同的媒体上(例如CNN)。

集中精力工作25分钟,休息5到10分钟。你可以用诸如“番茄工作法”这种流行的技术来帮助你管理时间。还有工具能帮助你测量你花在各项不同任务上的时间,我最喜欢的是CoolTimer,这里也有10个不错的时间追踪应用程序

2. 正确做事

以下两个是考察事情是否正确完成的关键:

  • 要为解决方法感到到自豪,因为这不仅仅只是个普通的解决方法,这是个好的方法。遵循“软件质量金字塔”的原则
  • 解决方法至少要经过一次检查。在你的同事中,请一位你尊敬的优秀开发人员检查你的方法,并接受他的真诚建议。

3. 不要半途而废

众所周知,若仍有一个玻璃杯需要清洗,则不能说已经洗完了。粉刷墙壁或驱车前往某处这些事情上我们也认可同样的道理,但在软件开发上我们却不这么认为了。即便我们没有完成所有的单元测试,或者我们没有核实实现方式是否符合用户的需要,我们也说完成了任务。这是典型来自Hope Driven Development的行为,是非常有害的。

需求没有更改时,只有当你百分之百确认再也没有必要改善那个解决方法时,才能算完成任务。

4. 与其道歉,不如补救,而放弃最不可取。

如果你要花额外的时间来完成一些代码的测试,或者重构不可读的类,那么就去做,因为这是为将来投资时间。但是如果你在某件事上面卡住了或者将项目拖延的太久,那么寻找一个更容易的方案。它可能不如你目前正在实现的方案优雅,但至少你有方案。确保记录下来以应对这个项目将来的风险,并且有些东西需要重新审查。

——————————————————————-
你可能对以下文章也感兴趣

各种语言的运行时刻性能消耗
我从PHP退役了
25款适用于开发人员的Firefox 4插件
Javascript:C语言和Self语言一夜情的产物
5本免费的Java电子书

——————————————————————-
译文出处:伯乐在线 – 职场博客 – 程序员
译文链接:http://www.jobbole.com/entry.php/971

原文:Alberto Gutierrez 翻译:敏捷翻译 – 唐瑭

如需转载,但请注明原文/译文出处、译文超链接和译者等信息,否则视为侵权,谢谢合作!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.