×

Loading...

Topic

This topic has been archived. It cannot be replied.
  • 工作学习 / 学科技术 / A Brief Summary of Advantages and Drawbacks of Python

    Python is the most popular programming language nowadays. Based on my own experience, here is a list of advantages and limitations/drawbacks of Python:

    Advantages:

    1. Easy to learn: Simplicity makes the learning curve of Python is low. Basically one can pick it up from a few days to a few weeks.

    2. Versatile: Python code can be found almost everywhere, such as web applications, desktop applications, data science, big data, spark, cloud, etc.

    3. Flexible: Flexible syntax makes its code easy to write.

    4. Python is a hybrid of several programming language types. It supports Object-oriented programming, Procedural programming, and Functional programming.

    5. Generator is a very useful feature.

    6. Python has a comprehensive ecosystem, supporting community, extensive libraries, and 3rd party modules.

    Limitations or Drawbacks:

    1. Some syntax brings inconvenience when writing code or even makes its code error-prone. Example A: Python code uses indentation to define scope, instead of brackets. Example B: If you want to call a function, the definition of the function must be defined before the caller, otherwise the function cannot be found.

    2. Python is interpreted instead of compiled. You may modify code on-the-fly, but the result may be not what you expected, as the old code is cached.

    3. Python is not strongly typed language. Type is determined at run-time only. Thus it is not type-safe before running.

    4. As an interpreted programming language, Python’s performance is not as good as compiled ones, such as C-family languages (C, C++, Java, C#, etc.). Usually it is slower.

    5. By design, there is no explicit pass-by-reference parameter. Although there are some mechanisms to mimic pass-by-reference implicitly, for example, use dictionary as a parameter. Such implicit pass-by-reference behavior may confuse people. People need to be very clear what data type is pass-by-value, and what data type is pass-by-reference.

    6. If you want to write multi-threading code, probably Python is not a good choice for it.

    • COVID-19 对职场的影响 ~~~2020 年是史无前例的奇葩年,一场瘟疫涉及芸芸众生,影响了全世界人的生活。那对于职场,能有什么影响呢? +1
      2020 年是史无前例的奇葩年,一场瘟疫涉及芸芸众生,影响了全世界人的生活。那对于职场,能有什么影响呢?我先抛砖引玉,说些自己的浅见,欢迎大家补充。1. Work remotely 是双刃剑,对于公司或者员工都是。Pros: 公司节省办公空间。员工不需要每天 花时间在路上。Cons: 公司担心效率低下。员工呢? 担心大量工作会外包 outsourcing. 反正都是远程嘛。2. 对于语言的要求会更高。 因为不能亲自会面, 都是远程, English, communication , presentation skills 这些软技能要求会更高。而对于求职者,也是一样。现在很多面试都是通过视频 进行, 语言,交流能力, public speaking 等等软技能的要求无疑是水涨船高。以前不仅仅是拼技术,拼硬件,拼软件,拼颜值,现在还要拼上镜。 能不能上镜,也有很大影响。3. 公司设置 A/B 角色疫情的影响,很多公司将对重要的岗位,设置 A 角与 B 角,做好 backup, 以防万一。如果主角不幸感染,可以启动 B 角,保证工作的连续。大家以为怎么样?请补充。
    • 大数据分析之三大利器 ~~~“ The more I use Python, the more I love SAS.   从 SAS 到 Python, 感觉像再婚一样:过得越久,越思念前妻! ”
      大数据行业蓬勃发展,现在有很多专业的数据分析工具。 使用最多的三大软件是: SAS, R,Python.根据2018年的一个用户调查, 1000 多家用户调查结果是:SAS 34%, R 33%, Python 32%. 基本上是三分天下的局面。但是在银行、电信、政府部门,SAS 的使用程度更高, 因为 SAS是历史最久的软件,这些行业已经长期使用 SAS,具有很大的依赖性。从价格角度来说,SAS 是商业软件,价格很高, 一个 License 每年要超过$5000 美金。R/Python 则是开源软件。不过,可靠性和处理大数据的能力,SAS是一骑绝尘,遥遥领先。SAS 像是正规军,而 R/Pyton则是许多开源包拼拼凑凑的乌合之众。Stephanie Glen 对这三大工具做了非常全面的比较和总结,请看下表。接下来简单说说三个软件的特点。接下来简单说说三个软件的特点。