<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">博客园 - lzprgmr</title>
  <id>uuid:ee69d003-04b0-406c-ad9f-74ae93981223;id=508827</id>
  <updated>2014-07-27T03:08:20Z</updated>
  <author>
    <name>lzprgmr</name>
    <uri>https://www.cnblogs.com/baiyanhuang/</uri>
  </author>
  <generator>feed.cnblogs.com</generator>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3855849.html</id>
    <title type="text">用python代码做configure文件 - lzprgmr</title>
    <summary type="text">在lua中，我一直用lua作为config文件，或者承载数据的文件 - 好处是lua本身就很好阅读，然后无需额外写解析的代码，还支持在configure文件中读环境变量，条件判断等，方便又强大！（在lua中通过loadfile, setfenv实现）python当然也可以：cat config.py...</summary>
    <published>2014-07-20T00:52:00Z</published>
    <updated>2014-07-20T00:52:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3855849.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3855849.html" />
    <content type="html">【摘要】在lua中，我一直用lua作为config文件，或者承载数据的文件 - 好处是lua本身就很好阅读，然后无需额外写解析的代码，还支持在configure文件中读环境变量，条件判断等，方便又强大！（在lua中通过loadfile, setfenv实现）python当然也可以：cat config.py... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3855849.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3855841.html</id>
    <title type="text">python中from module import * 的一个陷阱 - lzprgmr</title>
    <summary type="text">from module import *把module中的成员全部导到了当前的global namespace，访问起来就比较方便了。当然，python style一般不建议这么做，因为可能引起name conflict。但还有另外一个问题 - 你以为你修改了某个变量，其实，被from module...</summary>
    <published>2014-07-20T00:24:00Z</published>
    <updated>2014-07-20T00:24:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3855841.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3855841.html" />
    <content type="html">【摘要】from module import *把module中的成员全部导到了当前的global namespace，访问起来就比较方便了。当然，python style一般不建议这么做，因为可能引起name conflict。但还有另外一个问题 - 你以为你修改了某个变量，其实，被from module... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3855841.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3837194.html</id>
    <title type="text">Java中primitive type的线程安全性 - lzprgmr</title>
    <summary type="text">Java中primite type，如char，integer，bool之类的，它们的读写操作都是atomic的，但是有几个例外：long和double类型不是atomic的，因为long和double都是8字节的，而在32位的CPU上，其机器字长为32位，操作8个字节需要多个指令操作。++i或者i...</summary>
    <published>2014-07-11T02:33:00Z</published>
    <updated>2014-07-11T02:33:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3837194.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3837194.html" />
    <content type="html">【摘要】Java中primite type，如char，integer，bool之类的，它们的读写操作都是atomic的，但是有几个例外：long和double类型不是atomic的，因为long和double都是8字节的，而在32位的CPU上，其机器字长为32位，操作8个字节需要多个指令操作。++i或者i... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3837194.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3832906.html</id>
    <title type="text">实时监控log文件 - lzprgmr</title>
    <summary type="text">一个进程在运行，并在不断的写log，你需要实时监控log文件的更新（一般是debug时用），怎么办，不断的打开，关闭文件吗？ 不用，至少有两个方法，来自两个很常用的命令：tail -f log.txt, 另外一个进程在写log，而你用tail，就可以实时的打印出新的内容less log.txt, 然...</summary>
    <published>2014-07-09T01:16:00Z</published>
    <updated>2014-07-09T01:16:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3832906.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3832906.html" />
    <content type="html">【摘要】一个进程在运行，并在不断的写log，你需要实时监控log文件的更新（一般是debug时用），怎么办，不断的打开，关闭文件吗？ 不用，至少有两个方法，来自两个很常用的命令：tail -f log.txt, 另外一个进程在写log，而你用tail，就可以实时的打印出新的内容less log.txt, 然... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3832906.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3825381.html</id>
    <title type="text">用简单的方法解决问题 - lzprgmr</title>
    <summary type="text">昨天同事在review代码的时候，给我show了另一个同事写的神一样的python代码，基本上是list comprehension加巨复杂的filter，外加正则表达式，以及一个generator函数，并且在那个generator函数上还加了一个decorator，同事其实也写了几年python了...</summary>
    <published>2014-07-04T23:48:00Z</published>
    <updated>2014-07-04T23:48:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3825381.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3825381.html" />
    <content type="html">【摘要】昨天同事在review代码的时候，给我show了另一个同事写的神一样的python代码，基本上是list comprehension加巨复杂的filter，外加正则表达式，以及一个generator函数，并且在那个generator函数上还加了一个decorator，同事其实也写了几年python了... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3825381.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3813468.html</id>
    <title type="text">工作笔记还是蛮有用 - lzprgmr</title>
    <summary type="text">2014-03-29 18:37:58现在养成了一个蛮好的工作习惯 - 早上一到公司，第一件事是打开onenote，新建一个名为YYYY-MM-DD的页面，用作当天的工作笔记。以前很蛋疼，不跨平台的代码不爱，不能同步的系统不用，公司管的比较严，内部笔记用的ontenote，外网是不能同步访问的。要在...</summary>
    <published>2014-06-28T08:10:00Z</published>
    <updated>2014-06-28T08:10:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3813468.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3813468.html" />
    <content type="html">【摘要】2014-03-29 18:37:58现在养成了一个蛮好的工作习惯 - 早上一到公司，第一件事是打开onenote，新建一个名为YYYY-MM-DD的页面，用作当天的工作笔记。以前很蛋疼，不跨平台的代码不爱，不能同步的系统不用，公司管的比较严，内部笔记用的ontenote，外网是不能同步访问的。要在... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3813468.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3813469.html</id>
    <title type="text">记一次调试 - lzprgmr</title>
    <summary type="text">这是我最近几个月来遇到的最棘手的一个问题：* 昨天花了4个小时找出第一层次的原因这个纠结啊，本来和老婆说好准时下班回家吃饭的，结果被这个问题拖了老久。这是一个gradle的plugin，用来resolve公司内部的dependency的，弄完了跑测试项目的，抛一个NPE，而且NPE还不在自己的代码里...</summary>
    <published>2014-06-28T08:10:00Z</published>
    <updated>2014-06-28T08:10:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3813469.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3813469.html" />
    <content type="html">【摘要】这是我最近几个月来遇到的最棘手的一个问题：* 昨天花了4个小时找出第一层次的原因这个纠结啊，本来和老婆说好准时下班回家吃饭的，结果被这个问题拖了老久。这是一个gradle的plugin，用来resolve公司内部的dependency的，弄完了跑测试项目的，抛一个NPE，而且NPE还不在自己的代码里... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3813469.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3813464.html</id>
    <title type="text">35岁往上做什么 - lzprgmr</title>
    <summary type="text">2014-03-29 18:07:20今天虚岁三十三，有点大了。前几天和一个朋友聊天，说到感觉现在自己的脑子转的比上大学的时候慢多了，朋友大惊：你现在才觉得? 我几年就这么觉得了，好吧，其实我也是。。。曾经也和一些同事也交流过这个话题：有人说：那是因为现在成熟了，考虑问题比较更加全面，仔细，不像以前...</summary>
    <published>2014-06-28T08:07:00Z</published>
    <updated>2014-06-28T08:07:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3813464.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3813464.html" />
    <content type="html">【摘要】2014-03-29 18:07:20今天虚岁三十三，有点大了。前几天和一个朋友聊天，说到感觉现在自己的脑子转的比上大学的时候慢多了，朋友大惊：你现在才觉得? 我几年就这么觉得了，好吧，其实我也是。。。曾经也和一些同事也交流过这个话题：有人说：那是因为现在成熟了，考虑问题比较更加全面，仔细，不像以前... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3813464.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3505012.html</id>
    <title type="text">2013年个人总结 - lzprgmr</title>
    <summary type="text">好久没写个人总结了，印象中上次写的应该是09或者10年了。写2013年的总结，积极性也不是很高，感觉这一年没啥特别有意义的事值得说的，不过个人总结嘛，又不是个人表彰大会，非要写些很牛逼的事情，主要是记录一下这一年，看看做了什么，哪里做的好要表扬一下，哪里做的不好要改进一下。先说说我想怎么写年终总结吧，大概的步骤就是：看看年初的年度计划看看自己的微博，微信，豆瓣，doit，有道笔记，博客等等，记忆不总是那么靠谱，记录才是总结的内容，参考fenng的格式（http://dbanotes.net/mylife/2013_personal_review.html）：人生各个方向的回顾：事业，财富，健康</summary>
    <published>2014-01-05T02:36:00Z</published>
    <updated>2014-01-05T02:36:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3505012.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3505012.html" />
    <content type="html">【摘要】好久没写个人总结了，印象中上次写的应该是09或者10年了。写2013年的总结，积极性也不是很高，感觉这一年没啥特别有意义的事值得说的，不过个人总结嘛，又不是个人表彰大会，非要写些很牛逼的事情，主要是记录一下这一年，看看做了什么，哪里做的好要表扬一下，哪里做的不好要改进一下。先说说我想怎么写年终总结吧，大概的步骤就是：看看年初的年度计划看看自己的微博，微信，豆瓣，doit，有道笔记，博客等等，记忆不总是那么靠谱，记录才是总结的内容，参考fenng的格式（http://dbanotes.net/mylife/2013_personal_review.html）：人生各个方向的回顾：事业，财富，健康 &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3505012.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3307951.html</id>
    <title type="text">一个C++宏定义与枚举定义重复的编译错误 - lzprgmr</title>
    <summary type="text">C++的开发效率低是众所周知的，原因比如有：语言复杂度高编译效率低工具链不够完整高效（尤其是linux下）另外一个恐怕是不少编译错误让人摸不着头脑，今天碰到一个，举个例子： 1 #include 2 3 enum LogLevel { 4 ERROR, 5 WARN, 6 INFO, 7 DEBUG, 8 TRACE 9 }; 10 11 12 int main() 13 { 14 printf(&amp;quot;%d\n&amp;quot;, ERROR); 15 } 16 编译错误为：$ g++ -DDEBUG test.cpp test.cpp:7...</summary>
    <published>2013-09-07T15:53:00Z</published>
    <updated>2013-09-07T15:53:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3307951.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3307951.html" />
    <content type="html">【摘要】C++的开发效率低是众所周知的，原因比如有：语言复杂度高编译效率低工具链不够完整高效（尤其是linux下）另外一个恐怕是不少编译错误让人摸不着头脑，今天碰到一个，举个例子： 1 #include 2 3 enum LogLevel { 4 ERROR, 5 WARN, 6 INFO, 7 DEBUG, 8 TRACE 9 }; 10 11 12 int main() 13 { 14 printf(&amp;quot;%d\n&amp;quot;, ERROR); 15 } 16 编译错误为：$ g++ -DDEBUG test.cpp test.cpp:7... &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3307951.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3307926.html</id>
    <title type="text">动态库的麻烦之处 - lzprgmr</title>
    <summary type="text">动态库的麻烦之处在于 - 如果你的程序使用了成百上千个动态库，你的程序在运行时如何找到这些动态库？一般有三个方法：一、设置LD_LIBRARY_PATHexport LD_LIBRARY_PATH=&amp;quot;/path/to/lib&amp;quot;直接手工设是不可能完成的任务，因为你也知道有很多path （多不是问题，问题时你得知道这些path），所以一般需要在由编译系统来自动产生这些path，并放到一个runscript中：#set pathexport LD_LIBRARY_PATH=/path/to/lib1export LD_LIBRARY_PATH=/path/to/lib2:$LD_</summary>
    <published>2013-09-07T15:36:00Z</published>
    <updated>2013-09-07T15:36:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3307926.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3307926.html" />
    <content type="html">【摘要】动态库的麻烦之处在于 - 如果你的程序使用了成百上千个动态库，你的程序在运行时如何找到这些动态库？一般有三个方法：一、设置LD_LIBRARY_PATHexport LD_LIBRARY_PATH=&amp;quot;/path/to/lib&amp;quot;直接手工设是不可能完成的任务，因为你也知道有很多path （多不是问题，问题时你得知道这些path），所以一般需要在由编译系统来自动产生这些path，并放到一个runscript中：#set pathexport LD_LIBRARY_PATH=/path/to/lib1export LD_LIBRARY_PATH=/path/to/lib2:$LD_ &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3307926.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3304759.html</id>
    <title type="text">谈谈软件项目的dependency - lzprgmr</title>
    <summary type="text">说到软件项目的依赖管理，可以从三个方面来考虑：一、由build system控制的dependency现在的build system，都支持一定程度上的dependency management， 比如make支持target之间的dependency，ant也支持其每个target之间的dependency（区别是make的每个非PHONY的target是个文件，make会检查输入与输出之间的timestamp来达到incremental build的效果，而ant则是对上一次build没有任何记忆，除了javac task支持incremental compile）上面的dependenc</summary>
    <published>2013-09-06T01:13:00Z</published>
    <updated>2013-09-06T01:13:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3304759.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3304759.html" />
    <content type="html">【摘要】说到软件项目的依赖管理，可以从三个方面来考虑：一、由build system控制的dependency现在的build system，都支持一定程度上的dependency management， 比如make支持target之间的dependency，ant也支持其每个target之间的dependency（区别是make的每个非PHONY的target是个文件，make会检查输入与输出之间的timestamp来达到incremental build的效果，而ant则是对上一次build没有任何记忆，除了javac task支持incremental compile）上面的dependenc &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3304759.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3279498.html</id>
    <title type="text">创建pathing jar - lzprgmr</title>
    <summary type="text">pathing jar是一个特殊的jar:该jar文件只包含manifest.mf文件该manifest文件只包含Class-Path，列出了所有需要真正加到classpath中的jar，或者directory需要pathing jar的原因是windows下command line额长度限制(8k)，无论你怎么声明你的classpath：set CLASS_PATH=allpathsset CLASS_PATH=path1; set CLASS_PATH=%CLASS_PATH%;path2java -cp allpaths结果都会是：The input line is too long.T</summary>
    <published>2013-08-24T08:51:00Z</published>
    <updated>2013-08-24T08:51:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3279498.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3279498.html" />
    <content type="html">【摘要】pathing jar是一个特殊的jar:该jar文件只包含manifest.mf文件该manifest文件只包含Class-Path，列出了所有需要真正加到classpath中的jar，或者directory需要pathing jar的原因是windows下command line额长度限制(8k)，无论你怎么声明你的classpath：set CLASS_PATH=allpathsset CLASS_PATH=path1; set CLASS_PATH=%CLASS_PATH%;path2java -cp allpaths结果都会是：The input line is too long.T &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3279498.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3279421.html</id>
    <title type="text">谈谈patch strategy - lzprgmr</title>
    <summary type="text">所谓的patch strategy，就是软件发布后出现bug时打补丁的方式 - 主要是关于源代码branch如何组织的方式针对项目的开发阶段、开发状态、维护方式不同，可以有不同的patching strategy一、trunk - release新版本从release branch发布适合只需维护最新版本的情况 - 一般工具类型的项目适合有较多的开发者在trunk上check-in代码的情况，因为trunk可能不太稳定，而且包含一些不想release的代码需要release时，从trunk分支选择需要的feature，integrate到release分支并发布同时，开发者继续在trunk上开</summary>
    <published>2013-08-24T08:20:00Z</published>
    <updated>2013-08-24T08:20:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3279421.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3279421.html" />
    <content type="html">【摘要】所谓的patch strategy，就是软件发布后出现bug时打补丁的方式 - 主要是关于源代码branch如何组织的方式针对项目的开发阶段、开发状态、维护方式不同，可以有不同的patching strategy一、trunk - release新版本从release branch发布适合只需维护最新版本的情况 - 一般工具类型的项目适合有较多的开发者在trunk上check-in代码的情况，因为trunk可能不太稳定，而且包含一些不想release的代码需要release时，从trunk分支选择需要的feature，integrate到release分支并发布同时，开发者继续在trunk上开 &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3279421.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3199448.html</id>
    <title type="text">分析cocos2d-x中的CrystalCraze示例游戏 - lzprgmr</title>
    <summary type="text">cocos2d-x自带了不少示例，以及几个比较简单的游戏，不过这些游戏都是用javascript binding(SpiderMonkey)做的，所以我猜测javascript binding可能是cocos2d-x开发游戏的主流模式，优点是：游戏逻辑用javascript，开发效率高，无需编译直接跑因为使用了javascript binding，实际跑的还是C++代码，性能不容小觑javascript binding使用的api与cocos2d-html5一致，以后向cocos2d-html5移植转换成纯网页游戏的成本接近于0CrystalCraze用的系统自然也是js binding。一、</summary>
    <published>2013-07-18T13:56:00Z</published>
    <updated>2013-07-18T13:56:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3199448.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3199448.html" />
    <content type="html">【摘要】cocos2d-x自带了不少示例，以及几个比较简单的游戏，不过这些游戏都是用javascript binding(SpiderMonkey)做的，所以我猜测javascript binding可能是cocos2d-x开发游戏的主流模式，优点是：游戏逻辑用javascript，开发效率高，无需编译直接跑因为使用了javascript binding，实际跑的还是C++代码，性能不容小觑javascript binding使用的api与cocos2d-html5一致，以后向cocos2d-html5移植转换成纯网页游戏的成本接近于0CrystalCraze用的系统自然也是js binding。一、 &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3199448.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3199288.html</id>
    <title type="text">记一个全局变量"冒充"局部变量引起的bug - lzprgmr</title>
    <summary type="text">看代码相当简单直观，觉得怎么都不会出错，可运行结果明明就是错了 - 对着vim摸着脑袋就是想不出哪里有问题，可去掉新加的代码，就又可以了。没办法，只好祭出杀手锏：一行一行注释掉来观察。。。反映问题的代码段相当简单：if condition then local v = create_object(mpr) if condition2 then v.R = &amp;quot;fixedR&amp;quot; end return v.MP .. v.Rend被影响的是和v同类的一些object，可是这个代码里怎么看都没问题，v是被我改了，可那是local的啊，管我怎么改对全局都不会有影响。当注释掉这一行试了一</summary>
    <published>2013-07-18T13:04:00Z</published>
    <updated>2013-07-18T13:04:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3199288.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3199288.html" />
    <content type="html">【摘要】看代码相当简单直观，觉得怎么都不会出错，可运行结果明明就是错了 - 对着vim摸着脑袋就是想不出哪里有问题，可去掉新加的代码，就又可以了。没办法，只好祭出杀手锏：一行一行注释掉来观察。。。反映问题的代码段相当简单：if condition then local v = create_object(mpr) if condition2 then v.R = &amp;quot;fixedR&amp;quot; end return v.MP .. v.Rend被影响的是和v同类的一些object，可是这个代码里怎么看都没问题，v是被我改了，可那是local的啊，管我怎么改对全局都不会有影响。当注释掉这一行试了一 &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3199288.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3185532.html</id>
    <title type="text">学习python - lzprgmr</title>
    <summary type="text">接触的语言越多，对语言的偏执就越少，越来越明白语言只是一种解决问题的工具 - 核心永远是问题与解决问题的思路。我的体验，从简练程度上来讲，shell脚本优于perl/python/lua，perl/python优于java/C++，所以能用前者解决的问题，就别用后者。项目中用到python，前段时间就“系统”的学了下python - 主要也就是把官方的tutorial过了一遍，从学习python的资料来看，我的评价是：Python Tutorial(http://docs.python.org/2/tutorial/)， 简洁而重点突出，绝对是上品，把这个快速的过一篇，例子全部敲一遍，想说没入</summary>
    <published>2013-07-12T01:14:00Z</published>
    <updated>2013-07-12T01:14:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3185532.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3185532.html" />
    <content type="html">【摘要】接触的语言越多，对语言的偏执就越少，越来越明白语言只是一种解决问题的工具 - 核心永远是问题与解决问题的思路。我的体验，从简练程度上来讲，shell脚本优于perl/python/lua，perl/python优于java/C++，所以能用前者解决的问题，就别用后者。项目中用到python，前段时间就“系统”的学了下python - 主要也就是把官方的tutorial过了一遍，从学习python的资料来看，我的评价是：Python Tutorial(http://docs.python.org/2/tutorial/)， 简洁而重点突出，绝对是上品，把这个快速的过一篇，例子全部敲一遍，想说没入 &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3185532.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3174776.html</id>
    <title type="text">如何在batch脚本中嵌入python代码 - lzprgmr</title>
    <summary type="text">老板叫我帮他测一个命令在windows下消耗的时间，因为没有装windows那个啥工具包，没有timeit那个命令，于是想自己写一个，原理很简单：REM timeit.batecho %TIME%call %*echo %TIME%然后两个时间减一下就可以了，但是总是自己去减始终不方便，最好能直接算好打印出来。因为涉及到时间格式的解析，时间的运算，在batch下比较困难，自然就想到了python或者perl脚本，这里首先想到的是python的-c参数：REM timeit.batset t1 = %TIME%call %*set t2 = %TIME%python -c &amp;quot;some </summary>
    <published>2013-07-05T23:50:00Z</published>
    <updated>2013-07-05T23:50:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3174776.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3174776.html" />
    <content type="html">【摘要】老板叫我帮他测一个命令在windows下消耗的时间，因为没有装windows那个啥工具包，没有timeit那个命令，于是想自己写一个，原理很简单：REM timeit.batecho %TIME%call %*echo %TIME%然后两个时间减一下就可以了，但是总是自己去减始终不方便，最好能直接算好打印出来。因为涉及到时间格式的解析，时间的运算，在batch下比较困难，自然就想到了python或者perl脚本，这里首先想到的是python的-c参数：REM timeit.batset t1 = %TIME%call %*set t2 = %TIME%python -c &amp;quot;some  &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3174776.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3155576.html</id>
    <title type="text">实现Linux与Windows下一致的命令行 - lzprgmr</title>
    <summary type="text">这其实是个非常简单的东西。我们会写一些命令行的工具，一般跨平台的话，会用python或者perl写，比如叫foo.py，然后在Windows和Linux下调用这个脚本：Linux: foo.py - 只要在第一行加上：#!/usr/bin/pythonWindows: python foo.py直接foo.py是不一定能工作的，除非你在你的系统中设置了的映射，但这个就有问题了，首先，这对本机有依赖关系了；其次，你到底用哪个版本的python？每个系统设置可能不一样 - 作为这个工具的作者肯定希望我们来控制这些因素。于是，Windows与Linux的命令行就不一致了。。。解决方案是为window</summary>
    <published>2013-06-25T12:58:00Z</published>
    <updated>2013-06-25T12:58:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3155576.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3155576.html" />
    <content type="html">【摘要】这其实是个非常简单的东西。我们会写一些命令行的工具，一般跨平台的话，会用python或者perl写，比如叫foo.py，然后在Windows和Linux下调用这个脚本：Linux: foo.py - 只要在第一行加上：#!/usr/bin/pythonWindows: python foo.py直接foo.py是不一定能工作的，除非你在你的系统中设置了的映射，但这个就有问题了，首先，这对本机有依赖关系了；其次，你到底用哪个版本的python？每个系统设置可能不一样 - 作为这个工具的作者肯定希望我们来控制这些因素。于是，Windows与Linux的命令行就不一致了。。。解决方案是为window &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3155576.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>https://www.cnblogs.com/baiyanhuang/p/3151610.html</id>
    <title type="text">关于code reiview - lzprgmr</title>
    <summary type="text">先谈谈三个code review的关键因素：一、创建review要简单code reivew是一个程序员日常工作中经常做的一件事，理论上来讲，任何一个将要submit到SCM的change，都必须经过peer review。如果创建一个review要傻了吧唧的打包代码，发送邮件，或者shelve一个changelist，再发信告知changelist number，或者进入某个比较先进的code review系统（比如crucible）手工创建一个review，这些步骤都太过繁琐，任何一个懒惰的程序员都不会有耐心来做这种事，更别说日复一日的做这种愚蠢的事了。我们需要的是一键式创建review </summary>
    <published>2013-06-23T13:46:00Z</published>
    <updated>2013-06-23T13:46:00Z</updated>
    <author>
      <name>lzprgmr</name>
      <uri>https://www.cnblogs.com/baiyanhuang/</uri>
    </author>
    <link rel="alternate" href="https://www.cnblogs.com/baiyanhuang/p/3151610.html" />
    <link rel="alternate" type="text/html" href="https://www.cnblogs.com/baiyanhuang/p/3151610.html" />
    <content type="html">【摘要】先谈谈三个code review的关键因素：一、创建review要简单code reivew是一个程序员日常工作中经常做的一件事，理论上来讲，任何一个将要submit到SCM的change，都必须经过peer review。如果创建一个review要傻了吧唧的打包代码，发送邮件，或者shelve一个changelist，再发信告知changelist number，或者进入某个比较先进的code review系统（比如crucible）手工创建一个review，这些步骤都太过繁琐，任何一个懒惰的程序员都不会有耐心来做这种事，更别说日复一日的做这种愚蠢的事了。我们需要的是一键式创建review  &lt;a href="https://www.cnblogs.com/baiyanhuang/p/3151610.html" target="_blank"&gt;阅读全文&lt;/a&gt;</content>
  </entry>
</feed>