Archive

Archive for June, 2015

开源开发工具大会2015话题和赞助征集

June 27th, 2015 No comments

原文链接 http://www.hellogcc.org/?p=34145

*************************************************************************
话题和赞助征集

开源开发工具大会2015
中国 北京
2015年9月xx日(暂定)
HelloGCC工作组 (www.hellogcc.org)
************************************************************************

开源开发工具大会(原HelloGCC技术讨论会)是开源软件开发者的大会,您可以在这里分享自己在开源软件方面的开发工作,研究成果,经验学习。我们的话题主要面向开源开发工具。

话题内容可以为:
* GNU工具链(gcc,gdb,binutils等)
* LLVM等其它开源编译器
* 其它开源开发、调试、模拟工具

话题形式可以为:
* 对自己工作的介绍
* 对已有工作的介绍
* 教程,经验等
* 其它形式,比如闪电演讲

如果您有相关话题,欢迎和我们联系:
* 发送邮件到 hellogcc@freelists.org (需要先订阅:http://www.freelists.org/list/hellogcc)
* 登陆freenode IRC #hellogcc房间

重要日期:
* 话题征集截止日期:2015年8月1日

往届会议:
* OSDT 2014: http://www.hellogcc.org/?p=33910
* HelloGCC 2013: http://www.hellogcc.org/?p=33518
* HelloGCC 2012: http://linux.chinaunix.net/hellogcc2012
* HelloGCC 2011: http://linux.chinaunix.net/hellogcc2011
* HelloGCC 2010: http://linux.chinaunix.net/hellogcc2010
* HelloGCC 2009: http://www.aka-kernel.org/news/hellogcc/index.html

如果贵公司有意提供赞助,欢迎和我们联系 hellogcc.workgroup@gmail.com。

Code Review Checklist

June 27th, 2015 No comments

http://blog.fogcreek.com/increase-defect-detection-with-our-code-review-checklist-example/

Nice Checklist.

我之前并未整理出这样的清单。可以实践一下。 🙂

Code Review Checklist

General

* Does the code work? Does it perform its intended function, the logic is correct etc.
* Is all the code easily understood?
* Does it conform to your agreed coding conventions? These will usually cover location of braces, variable and function names, line length, indentations, formatting, and comments.
* Is there any redundant or duplicate code?
* Is the code as modular as possible?
* Can any global variables be replaced?
* Is there any commented out code?
* Do loops have a set length and correct termination conditions?
* Can any of the code be replaced with library functions?
* Can any logging or debugging code be removed?

Security

* Are all data inputs checked (for the correct type, length, format, and range) and encoded?
* Where third-party utilities are used, are returning errors being caught?
* Are output values checked and encoded?
* Are invalid parameter values handled?

Documentation

* Do comments exist and describe the intent of the code?
* Are all functions commented?
* Is any unusual behavior or edge-case handling described?
* Is the use and function of third-party libraries documented?
* Are data structures and units of measurement explained?
* Is there any incomplete code? If so, should it be removed or flagged with a suitable marker like ‘TODO’?

Testing

* Is the code testable? i.e. don’t add too many or hide dependencies, unable to initialize objects, test frameworks can use methods etc.
* Do tests exist and are they comprehensive? i.e. has at least your agreed on code coverage.
* Do unit tests actually test that the code is performing the intended functionality?
* Are arrays checked for ‘out-of-bound’ errors?
* Could any test code be replaced with the use of an existing API?

You’ll also want to add to this checklist any language-specific issues that can cause problems.

The checklist is deliberately not exhaustive of all issues that can arise. You don’t want a checklist, which is so long no-one ever uses it. It’s better to just cover the common issues.

 

 

没完没了:GCC Version numbers question

June 24th, 2015 No comments

GCC 社区也要打算开始飙版本号,这是去年就开始讨论的事情了。但是直到今天,还有人在吐槽这个事情,汗。

https://gcc.gnu.org/ml/gcc/2014-07/msg00196.html

https://gcc.gnu.org/ml/gcc/2015-06/msg00204.html

“No space left on device“ 的解决过程

June 20th, 2015 No comments

管理的一个集群上的 HW RAID FS 出现了这个问题:

  1. df 检查,磁盘空间只用了一半;
  2. df -i 检查,inode 空间只用了 1%,还很充足;
  3. 猜测可能是IO缓冲或文件读写异常,用 lsof 检查,没有问题;
  4. 停掉 NFS 服务,umount,再 mount 回来,问题依旧;
  5. 使用 smartctl 命令检查 RAID 状态,没有发现问题;
  6. 注意到文件系统是 XFS,使用 xfs_repair 自动修复,重新挂载,问题依旧;
  7. 最后的猜测是因为 XFS 的前 1TB 满了,添加了 inode64 的选项,重新挂载,问题搞定。
  8. 最后,别忘记重新开始NFS服务。

折腾了一晚上,最后的解决方法很简洁。

如果一开始没有想当然的认为是EXT4分区的话可能就简单很多啦。还是因为对XFS不熟悉导致搜索了很久才找到问题所在。

 

修改 XMind 默认的中文字体

June 20th, 2015 No comments

XMind 在 Windows 7 下的默认中文字体不太好看,在其配置选项中没有提供该选项。一位使用者提供了一种直接修改配置文件的方式,可以参考:

https://lifeboysays.wordpress.com/2010/10/17/xmind-default-font/

在 Windows 7 下,可以将默认字体改成“SimSong”或者“Microsoft YaHei”; Linux 下可以改成 “WenQuanYi Zen Hei”。