Table of Contents
回复内容:
Home Backend Development Python Tutorial 为什么现在新出的互联网站点大多采用 Python 或者 Ruby ?

为什么现在新出的互联网站点大多采用 Python 或者 Ruby ?

Jun 06, 2016 pm 04:22 PM

是考虑到成本问题?开发速度问题?还是以后的可扩展性问题?

回复内容:

我不知道多大比例的新网站是用python或者ruby,不过我们扇贝网是基于Python开发的。

主要原因还是开发速度。以我的经验,完成类似的任务,Python的代码量是Java的一半,更少的代码量就意味更快的开发速度和更少出错的几率。

另外我很喜欢Python的语法,基本上就是伪码形式的(譬如算法导论上的伪码几乎可以机械式的翻译成Python),以至于我有时候写程序的时候准备先随便写几行整理下思路,但是写着写着发现居然写完了。

另外从招聘角度而言,一般会Python语言的编程基础都还不错,减少了筛选。

最后一条,当然可能是所有动态语言都有的,就是改bug快,不管什么设备,只要有个ssh客户端就可以。有一次在外面吃饭,突然看到微博上用户报了一个错误,就立刻用手机(现在改iPad了)登录跑服务器看log,发现程序错误后,直接做一个hotfix分支(我们用git管理代码),然后用vi 改代码,改好后没问题合并回主分支,然后立刻重新部署。 偷偷说,我在尝试在公司的某个内部服务上使用Go开发。 学习门槛低,库全,适合快速原型迭代。然后,就上了贼船,下不来了。 主要是开发快。
如果是用Rails,那么至少要比用PHP快5倍以上。 因为在 Hacker 看来 Python/Ruby 比 Java/C# 要酷,Hacker 和创业公司的气质是十分一致的。 写过四个月Ruby后,最近在写Java,心里那个不爽。感觉Ruby很优雅,Java有点罗嗦 我感觉主要是几个方面:
1.成本角度,主要是部署成本,MS那套就不说了,Java那套在很多虚拟机上跑起来也是很吃力的,看看国内的各种云,特别欢迎python和php,很多都是对Java单独收费的,毕竟跑JVM还是重了一点,而python之类解释性的就不需要JVM这种很重的虚拟机,相比于PHP,python能干的事情太多了,php基本就是做网页开发,其他比较吃力,而python基于他极其丰富的库,不管网站开发还是数据分析还是桌面应用都能搞定,而且有各种库搞这些效率极其高,另外就是python的代码风格个人认为也比较简练,同一个功能,代码函数比其他语言要少很多。ruby基本没摸过,不做评论。
2.人的角度,会自己写网站的码农都还比较geek范,python几乎是geek码农的标配了,就犹如mac是标配一样...但是必须清楚的认识到,python成为标配不是因为大家用我也用,就像mac一样,python确实有它的独到之处,基于它极其简练的语言还有丰富的库,基本上干嘛python都比较得心应手,在服务器上写写脚本处理数据,写个脚本跑跑cron任务之类的,找来找去还真是python最得心应手,所以python确实是geek们居家旅行必备良药。
3.效率角度,python和ruby配合框架应该基本完爆其他语言了吧,虽然语言还不算非常大众,但是其实上手成本真心不高,老带新很容易就上手了,毕竟是脚本型的,入门很快的,上手之后效率确实快的,而且大多数创业公司无非就是做网站而已,没有复杂技术,用到的都是最基本的东西,网站难的地方是能不断支撑上涨的流量。何况这两个语言现在普及的速度也确实很快,以后找这方面熟练工应该越来越好找的。 其实真正的原因是:

穷。

有钱的全部上 Windows + VS2013 + C# + SQL Server 2013,论开发效率、调试、测试、调优、部署都非常非常方便。可惜这套方案,从头到尾都需要烧钱。 Python之外其他的语言都好啰嗦,我们使用Python就是因为喜欢,好用。 用java需要建立一个10人的开发团队,2个月上线。换Python只需要4个人,3周。怎么选不言而喻
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to Use Python to Find the Zipf Distribution of a Text File How to Use Python to Find the Zipf Distribution of a Text File Mar 05, 2025 am 09:58 AM

This tutorial demonstrates how to use Python to process the statistical concept of Zipf's law and demonstrates the efficiency of Python's reading and sorting large text files when processing the law. You may be wondering what the term Zipf distribution means. To understand this term, we first need to define Zipf's law. Don't worry, I'll try to simplify the instructions. Zipf's Law Zipf's law simply means: in a large natural language corpus, the most frequently occurring words appear about twice as frequently as the second frequent words, three times as the third frequent words, four times as the fourth frequent words, and so on. Let's look at an example. If you look at the Brown corpus in American English, you will notice that the most frequent word is "th

How Do I Use Beautiful Soup to Parse HTML? How Do I Use Beautiful Soup to Parse HTML? Mar 10, 2025 pm 06:54 PM

This article explains how to use Beautiful Soup, a Python library, to parse HTML. It details common methods like find(), find_all(), select(), and get_text() for data extraction, handling of diverse HTML structures and errors, and alternatives (Sel

How to Perform Deep Learning with TensorFlow or PyTorch? How to Perform Deep Learning with TensorFlow or PyTorch? Mar 10, 2025 pm 06:52 PM

This article compares TensorFlow and PyTorch for deep learning. It details the steps involved: data preparation, model building, training, evaluation, and deployment. Key differences between the frameworks, particularly regarding computational grap

Mathematical Modules in Python: Statistics Mathematical Modules in Python: Statistics Mar 09, 2025 am 11:40 AM

Python's statistics module provides powerful data statistical analysis capabilities to help us quickly understand the overall characteristics of data, such as biostatistics and business analysis. Instead of looking at data points one by one, just look at statistics such as mean or variance to discover trends and features in the original data that may be ignored, and compare large datasets more easily and effectively. This tutorial will explain how to calculate the mean and measure the degree of dispersion of the dataset. Unless otherwise stated, all functions in this module support the calculation of the mean() function instead of simply summing the average. Floating point numbers can also be used. import random import statistics from fracti

Serialization and Deserialization of Python Objects: Part 1 Serialization and Deserialization of Python Objects: Part 1 Mar 08, 2025 am 09:39 AM

Serialization and deserialization of Python objects are key aspects of any non-trivial program. If you save something to a Python file, you do object serialization and deserialization if you read the configuration file, or if you respond to an HTTP request. In a sense, serialization and deserialization are the most boring things in the world. Who cares about all these formats and protocols? You want to persist or stream some Python objects and retrieve them in full at a later time. This is a great way to see the world on a conceptual level. However, on a practical level, the serialization scheme, format or protocol you choose may determine the speed, security, freedom of maintenance status, and other aspects of the program

What are some popular Python libraries and their uses? What are some popular Python libraries and their uses? Mar 21, 2025 pm 06:46 PM

The article discusses popular Python libraries like NumPy, Pandas, Matplotlib, Scikit-learn, TensorFlow, Django, Flask, and Requests, detailing their uses in scientific computing, data analysis, visualization, machine learning, web development, and H

Scraping Webpages in Python With Beautiful Soup: Search and DOM Modification Scraping Webpages in Python With Beautiful Soup: Search and DOM Modification Mar 08, 2025 am 10:36 AM

This tutorial builds upon the previous introduction to Beautiful Soup, focusing on DOM manipulation beyond simple tree navigation. We'll explore efficient search methods and techniques for modifying HTML structure. One common DOM search method is ex

How to Create Command-Line Interfaces (CLIs) with Python? How to Create Command-Line Interfaces (CLIs) with Python? Mar 10, 2025 pm 06:48 PM

This article guides Python developers on building command-line interfaces (CLIs). It details using libraries like typer, click, and argparse, emphasizing input/output handling, and promoting user-friendly design patterns for improved CLI usability.

See all articles