zoukankan      html  css  js  c++  java
  • 五年专业编程后的心得

     lessons after five years of professional programming

    Origional article link:http://siavoshb.tumblr.com/post/47005180661/14-lessons-after-five-years-of-professional-programming

    In no particular order:

    1. When performance is an issue, if you can calculate or process it at the application layer, then take it out of the database layer. order by/group by are classic examples. It’s almost always easier to scale out your application layer than your database layer. As true for MySQL on your server as it is on the sqlite in your handheld. EDIT Some great comments on HN for this one so I felt like I better clarify: we only do this for certain queries not to improve necessarily the client response time, but to relieve load if the query is battering the DB and making it a significant bottleneck for ALL clients.

    2. Concurrency, avoid it if you can. If not, then remember that with great power comes great responsibility  Avoid working directly with threads if you can. Work at a higher level of abstraction if possible. In iOS, for example: GCD, dispatch and operation queues are your friends. The human mind was not designed to reason about infinite temporal state—I get nauseous thinking about how I learned all this first hand.

    3. Minimize state as much as possible, and keep it as localized as possible. The functionalists were/are onto something.

    4. Short composable methods are your friend.

    5. Comments are dangerous since they can get out of date and mislead, but so is not having them. Don’t comment the trivial, but strategically write paragraphs if needed in specific sections. Your memory will fail you, as soon as tomorrow morning, even after coffee.

    6. If you feel one use-case scenario will “probably be ok”, that’s the one that’s going to lead to catastrophic failure a month in production. Trust your paranoid gut, test and verify.

    7. When in doubt, over communicate all concerns with your team.

    8. Do the right thing—you usually know what that thing is.

    9. Your users aren’t stupid, they just don’t have the patience for your cut corners.

    10. If an engineer is not tasked with the long term maintenance of the systems they build, view them with suspicion. 80% of the blood, sweat, and tears of software occurs after its been released—that’s when you become a world weary, but wiser “professional.”

    11. Checklists are your friends.

    12. Take initiative to purposeful enjoy your work, sometimes this will take effort.

    13. Silent failures, I still have nightmares. Monitor, log, alert. But be wary of false positives and the inevitable desensitization it leads to. Keep your system senses clear and alert.

    14. At the end of the day, we’re paid to manage complexity. Work accordingly.

    *Side note: talks by Rich Hickey and Clean Code by Robert Martin have been very positive recent influences on my work.

    你们的评论、反馈,及对你们有所用,是我整理材料和博文写作的最大的鼓励和唯一动力。欢迎讨论和关注!
    没有整理与归纳的知识,一文不值!高度概括与梳理的知识,才是自己真正的知识与技能。 永远不要让自己的自由、好奇、充满创造力的想法被现实的框架所束缚,让创造力自由成长吧! 多花时间,关心他(她)人,正如别人所关心你的。理想的腾飞与实现,没有别人的支持与帮助,是万万不能的。
  • 相关阅读:
    js 删除数组的某一项或者几项的方法
    JavaScript 面向对象的程序设计(一)之理解对象属性
    iview 之 穿梭框 transfer
    iview2.0 bug之+8 区的 DatePicker
    js Object.keys 用法
    js map 、filter 、forEach 、every、some 的用法
    iview tree 之如何获取已勾选的节点
    js 中常见的深拷贝的方法
    ES6新特性
    Amazon2014在线笔试 第三题
  • 原文地址:https://www.cnblogs.com/arxive/p/3202491.html
Copyright © 2011-2022 走看看