2009关于编程的收藏

2009-03-13 10:28 / no comment / 12 views /

编程的首要原则是什么
学习一项知识,必须问自己三个重要问题:1. 它的本质是什么。2. 它的第一原则是什么。3. 它的知识结构是怎样的。

  • KISS – Keep It Simple Stupid
  • DRY – Don’t Repeat Yourself
  • 写代码时时刻设想你就是将来要来维护这坨代码的人。
  • 写API时时刻设想你就是要去使用这坨API的人。
  • 先弄清你的问题是什么!
  • 永远不要假定你已经了解一切了!
  • 不作没有证据的推论。
  • 如果方案在你脑子里面或者纸上不能工作,写成代码还是不能工作。
  • 越懒越好。
  • 过早优化是一切罪恶的根源。
  • 不要重新发明轮子。
  • 测试通过前说什么“它可以工作”都是纯扯淡。
  • 了解你的工具。
  • 一切以用户需求为导向。
  • 利用分治、抽象,解开子问题之间的耦合。
  • 咖啡进,代码出。(Coffee in, Code out)
  • WIN32汇编中如何实现隐藏任务栏
    Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE.
    在CreateWindowEx创建窗口的时候在第一个参数(dwExStyle)中指定WS_EX_TOOLWINDOW。

    C程序VC++里编译
    C和VC++的一点点小区别

    断点心得
    关于设置断点的一点心得。

    如何获取进程id

    converting memory to string
    数据传送?通信?

    谈谈intel x86提供的Branch Trace Store的功能
    来自看雪论坛逆向分析基础。Branch Trace Store(BTS)是目前广泛被intel CPU所提供的一种硬件辅助调试功能。

    javascript变量作用域的几个例子

  • javascript无块级作用域,变量在块语句内部可见。和php类似。
  • 对象初始化可以对自身的属性执行修改,可以修改全局变量的值。
  • 函数内,只要变量名前面出现var则该变量为局部变量。
  • 作者写得不是很清楚,三个例子还是值得收藏。

    javascript 变量作用域
    太多字了!但是是google搜索前几名中排版比较好的一个。对照上一个看,可以有更准确的理解。

    Get a Trackback link

    No Comments Yet

    You can be the first to comment!

    Leave a comment

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>