隨筆-12  評論-0  文章-1  trackbacks-0
            2012年4月18日
          the super keyword in java generic programming is used to declare a template of a specific type. e.g.
          List<? super MyClass> list = new LinkedList<AnyTypeDerivedByMyClass>();
          posted @ 2012-12-31 15:35 Sam Zheng 閱讀(244) | 評論 (0)編輯 收藏
          int (*test(char *(*)(void)) (int); declares a function named "test" which accepts a pointer to a function accepting no parameter and returning a char pointer, the function "test" returns a pointer to a function which accepts a integer parameter and returns a integer.
          Note: a declaration declares either a variable(pointer) or function(pointer), if its name is followed by left parentheses, it is a function, otherwise it is a variable(pointer).
          posted @ 2012-09-20 14:38 Sam Zheng 閱讀(128) | 評論 (0)編輯 收藏
          if you don't feel comfortable with your code, it's time to refactor/re-think about it.
          posted @ 2012-08-31 11:36 Sam Zheng 閱讀(160) | 評論 (0)編輯 收藏
          don't get trapped when reading source code of a complex module, first figure out what the module does/its main functionality and its interfaces, once you get into details, you cannot see the module as a whole and forget its main functionality, if you recognize you are trapped in details, try to come out and focus on interfaces, top->down->top->down
          posted @ 2012-08-15 16:07 Sam Zheng 閱讀(155) | 評論 (0)編輯 收藏
          The crucial part in design/programming, is to break down complex things, anything should be easy when broken down to manageable pieces, and, only when broken down, can it be easy. when doing so, the most important thing is to think about the granularity and the relationship between every pieces/modules, again, reasonability.
          posted @ 2012-04-18 12:10 Sam Zheng 閱讀(144) | 評論 (0)編輯 收藏
          主站蜘蛛池模板: 新邵县| 汝阳县| 西昌市| 芒康县| 大渡口区| 墨玉县| 西林县| 红桥区| 游戏| 陆川县| 富川| 吕梁市| 凤台县| 平舆县| 通海县| 安塞县| 房山区| 商城县| 金阳县| 连州市| 蓬安县| 万盛区| 宣城市| 芜湖市| 彩票| 德钦县| 南平市| 丹东市| 古浪县| 始兴县| 奈曼旗| 江津市| 威海市| 承德县| 叶城县| 当涂县| 安阳市| 报价| 乌拉特中旗| 汪清县| 宜黄县|