Home  >  Article  >  Backend Development  >  Programming Languages: Tools for Transforming Entrepreneurial Thinking

Programming Languages: Tools for Transforming Entrepreneurial Thinking

伊谢尔伦
伊谢尔伦Original
2016-11-26 13:48:02865browse

This week's article in "MIT Technology Review" states that programming languages ​​shape the way users think. This could also reflect the strategies of startups in the tech industry and why they are capable of transforming themselves.

The following is the full text of the article:

As the development language for Twitter, Hulu and many contemporary Internet services, Ruby has attracted much attention. When Japanese computer scientist Yukihiro Matsumoto decided to design this language, he drew on concepts from Samuel R. Delany's 1966 science fiction novel "Babel-17." The core of this novel is an artificial language called "Babel-17", which can significantly improve the thinking level of its users. "Babel-17 is an accurate analytical language that allows you to master any technology." The protagonist of the novel once said. With Ruby, Matsumoto hopes to achieve a similar goal: to revolutionize and optimize the way programmers think.

 This goal sounds very ambitious, but Yukihiro Matsumoto’s views have become mainstream. Software developers often believe that programming languages ​​can change the way they think, thereby changing the way they solve problems and even change their understanding of which problems should be solved. This is how they estimate the size of a company, product, and competitor: "What languages ​​do you use?"

A look at programming languages ​​will help outsiders understand why these software companies are so powerful and have such high value and how their products and services fit into our lives. The decisions these companies make internally about what language to use, whether it's Ruby, PHP or C, will impact us all. If you want to know why Facebook looks and works the way it does today, and what's in store for it in the future, you need to understand PHP, the programming language used by Mark Zuckerberg.

 Among programmers, PHP is perhaps the most disrespected programming language. Due to its many flaws, the well-known technology blog Eevee believes that PHP is "a fragment of bad design" and developers who are willing to use PHP are amateurs. Jeff Atwood, co-founder of the programming question and answer website Stack Overflow, said: "Smart engineering talents are going to Facebook one after another, which is very strange. They develop PHP code in the Windows XP environment. They are hackers, but here 'Hacker' is a pejorative." Atwood calls PHP a "clumsy behemoth," an "epidemic," and a "haunted house" that attracts occult enthusiasts.

  Successful programming languages ​​have a holistic philosophy, or a set of logically consistent guiding principles that organize vocabulary and syntax (i.e., instructions provided to programmers). But that's not the case with PHP. The language's designer, Rasmus Lerdorf, once admitted that he just mixed a lot of things together. "I don't know how to stop this," he said in an interview in 2003. "I have no idea how to write a programming language. I just keep adding new logical steps along the way."

Programmer One of my favorite examples is the PHP function "mysql_escape_string". This function removes malicious input requests from the information before sending it to the database. (Examples of malicious input include a form on a website requesting a user's email address, and a hacker inserting a piece of code to steal a website user's password.) After a vulnerability in this function was discovered, a new version was created called "mysql_real_escape_string" , but the old version has not been replaced. So the current situation is like having two buttons with similar functions side by side in the cockpit of an airplane: one button is used to lower the landing gear, while the other button is used to lower the landing gear safely. Not only does this go against common sense, it can even cause disaster.

Although many people dislike PHP, PHP is still the basis for a large number of websites. A study shows that as many as 39% of all domains on the current Internet are based on PHP technology. Facebook, Wikipedia, and the leading publishing platform WordPress are all developed using PHP. This is because, despite its many flaws, PHP is almost perfect for beginners. The name of PHP was originally the English abbreviation of "Personal Home Page". Through this language, programmers can easily add dynamic content such as dates and user names to static HTML pages. The rise of PHP has facilitated a leap from website development to web application development, and developers don't even have to be professionals.

Ori Livneh, the chief software engineer in charge of the Wikipedia project at the Wikimedia Foundation, said that the ease of use of PHP is the key to the success of Wikipedia. However, he pointed out: "I have always hated PHP." Due to its reliance on PHP, Wikipedia developed design flaws as its user base expanded. (It is for this reason that Wikipedia did not support mobile devices until 2008. It was not until 2013 that the website provided a user-friendly editing interface.) However, based on PHP, some people who are not familiar with software programming People can also develop new features. For example, using the PHP language, Wikipedia displays hieroglyphics on the "Egyptology" entry and can implement music playback on the page.

 Google cannot use the PHP language because the current Google needs to complete a job very well, that is, search quickly and accurately. Therefore, the Google search engine uses more powerful languages ​​such as Java and C++. Compared to Google, Facebook is a hodgepodge of small-scale experiments, a hodgepodge of buttons, feeds, and gizmos. In this case, PHP can implement the functionality faster.

You can even imagine how Zuckerberg chose Facebook’s development method at the decisive moment in his dormitory at Harvard University. He needed to get the website online at minimal cost. The Internet is developing rapidly and user preferences are ever-changing. The only way to seize opportunities is to be a first mover in the market. It doesn’t matter whether it’s a hodgepodge or a fine piece of pasta. He first needs to complete the website and make it usable by users. What he was thinking about was not whether the code was beautiful, but how to get friends to log on to a website called TheFacebook to evaluate girls they were familiar with.

Today, Facebook’s market capitalization exceeds $200 billion, and the company’s office walls have slogans like: “Getting things done is more important than perfection” and “Move fast to break the ice.” These bold slogans are designed to ensure employees fit in with the company's "hacker" culture. And this accurately reflects the value of PHP. Act quickly and break deadlocks. This is the essence of PHP and represents the way PHP programmers think about problems. You could even say that PHP itself creates and sustains Facebook's culture.

 Secret Weapon: A More Powerful Language

 If you want to find another concept that is completely opposite to PHP and see what the other extreme is like, then the headquarters of financial trading company Jane Street Capital in Lower Manhattan, New York is worth a look . The 400-employee company currently handles about 2% of daily U.S. securities trading volume.

When I met Yaron Minsky, head of technology at Jane Street Capital, he was sitting at his desk next to an Enigma cipher machine, one of the few still in existence. One of the pieces of equipment from the World War II era. I thought this was the coolest secret weapon in his room, but then I realized I had made a mistake. Minsky talked about a programming language called OCaml. A PhD in computer science, Minsky convinced his boss 10 years ago to rewrite the company's entire trading system using OCaml.

 Before this, almost no one had used OCaml in practical applications. The designer of this language is a French research institution, and its original purpose was to optimize computer systems that can automatically prove mathematical theorems. Minsky encountered the language during his graduate studies. He believes the language could replace the Excel spreadsheets used in Jane Street Capital's trading system.

 The biggest feature of OCaml is the "input checking system". This is similar to the syntax checking function of Microsoft Word, which can mark the code with a green wavy line under the code that the system thinks is wrong, and then prohibit such code from running. The programs developed using this system are extremely reliable, which is important when the software being developed handles $30 billion in transactions every day.

Minsky said that by catching vulnerabilities, OCaml's input checking system allows Jane Street Capital's programmers to focus on higher-level problems. And if the company can further internalize OCaml's checking capabilities, it will create a habit that makes it impossible for programmers to think about the wrong idea.

 Furthermore, in order for input checking tools to function, programmers need to add complex comments to the code. This is like saying that Word's grammar checker requires you to annotate all sentences. Writing code with limited input can be cumbersome and even frustrating. What's worse is that compared to other programming languages, OCaml involves very abstract mathematics, which makes it difficult for most programmers.

Still, the precision of the language is attractive to some and gives Jane Street Capital an unusual recruiting advantage. While some software developers ignore PHP's shortcomings and join Facebook and Wikipedia, Minsky said the OCaml language and his book "OCaml in the Real World" help attract good programming talent. The attraction lies not just in the language, but also in the people who speak it. At Jane Street Capital, employees play chess during their breaks. This culture of intellectual competition seems closely related to the use of the OCaml language.

Google seems to be trying to achieve the same goal with its self-designed high-performance language Go. In order to make network services more elegant and efficient, it would be beneficial to develop more advanced software for the servers behind large-scale network services. In addition, it is also an attraction for programmers who like new things and challenge difficulties.

 The right time: after growing and growing

 At the end of 2010, Facebook encountered a crisis. PHP is not a language that emphasizes code performance, but Facebook had a need for it at that time. Facebook is growing very fast, so if it doesn't make some significant changes, the company is going to fail.

  Completely changing the programming language is not an option. Facebook has written millions of lines of code using PHP, thousands of engineering experts have been engaged in this development, and the resulting products have accumulated hundreds of millions of users. Therefore, several senior Facebook engineers formed a small team. They were trying to invent a way for Facebook to provide services without having to give up their "native language."

Part of the overall solution is to develop a compiler that translates Facebook's PHP code into C++ code that runs faster. The other part is a feat in computer language engineering: continuing to bring a PHP-style culture to Facebook programmers while allowing them to write more reliable code.

This "rescue team" designed a variant of the PHP language, namely Hack. Hack is a PHP language with an optional input checking system. You can either quickly write a PHP program with confusing code as usual, or you can follow the system requirements and let the system check the correctness of the code by adding comments. It's no coincidence that this input checking tool is developed entirely using OCaml. Facebook wants programmers to write code quickly using a familiar language, but it doesn't want them to get things wrong. (Last year, Zuckerberg unveiled Facebook’s new engineering slogan: “Move fast while ensuring infrastructure stability.”)

At the same time, Twitter is undergoing a similar transformation. Twitter's development was originally based on Ruby on Rails. This is a popular network programming framework developed in Ruby language and borrows many ideas from PHP. However, Twitter subsequently saw a surge in user numbers. If a user has hundreds of thousands of followers, then when he posts a message, the timelines of hundreds of thousands of users need to be refreshed accordingly. In the past, popular Twitter messages would often overwhelm the system, forcing Twitter engineers to suspend services and fix the problem. Twitter is also "notorious" for the frequent outages that follow.

 Twitter subsequently solved this problem by rewriting a large portion of the service's code in Scala. Unsurprisingly, similar to OCaml, Scala is also a language designed by academic institutions, with a powerful input checking system that emphasizes code accuracy and performance, and therefore sacrifices the programmer's personal programming freedom and entertainment.

After finding the revenue model, the startup company will mature. Similarly, they can harness the power of programming languages ​​to manipulate corporate culture. Programming language designer Guido van Rossum joined Dropbox after working at Google for seven years. He said that when a software company reaches a certain size, the only way to avoid chaos is to use a programming language that requires more from programmers. "It might slow you down because you have to say the same thing three times," he said.

Therefore, many startups want to wait as long as possible before making changes. They may lose some of the talented people who started out, and it is not conducive to small teams quickly developing new features. However, such a language would help programmers across the company understand each other's code, leading to a more stable product. This kind of stability is essential if you want your product to become part of people's daily lives.

 The ability to adopt different strategies depending on different situations promotes the development of software startups to a certain extent. The development of software depends on the popularity of computers, and these companies have unique ways of reinventing themselves. As they change and develop, what they can do is not just adjust their organizational structure, but also make some deeper changes, that is, change their own culture and way of thinking.


Statement:
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