Programming languages: tools to transform entrepreneurial thinking

Programming languages: tools to transform entrepreneurial thinking

[[131849]]

On April 3, MIT Technology Review published an article this week saying that programming languages ​​shape the way users think. This can also reflect the strategies of startups in the technology industry and why they are able to achieve self-transformation.

The following is the full text of the article:

Ruby is the language behind Twitter, Hulu, and many other contemporary Internet services. When Japanese computer scientist Yukihiro Matsumoto decided to design the language, he drew on concepts from Samuel R. Delany's 1966 science fiction novel Babel-17. The novel centers on an artificial language called Babel-17 that significantly improves the user's thinking. "Babel-17 is an accurate analytical language that will allow you to master any technology," the novel's protagonist once said. With Ruby, Yukihiro Matsumoto hopes to achieve a similar goal: to change and optimize the way programmers think.

It sounds ambitious, but Matsumoto's view is mainstream. Software developers generally believe that programming languages ​​can change the way they think, change the way they solve problems, and even change their understanding of what problems they should solve. It's also how they estimate the size of a company, a product, and a competitor: "What language do you use?"

Examining programming languages ​​will help outsiders understand why these software companies are so powerful and valuable, and how their products and services fit into our lives. The internal decisions of these companies, namely what language to use, whether it is Ruby, PHP or C, will affect all of us. If you want to understand why Facebook looks and acts the way it does, and what the future holds, you need to understand PHP, the programming language used by Mark Zuckerberg.

Among programmers, PHP is perhaps the least respected programming language. Due to its many flaws, the well-known technology blog Eevee believes that PHP is "a piece of bad design" and that developers who are willing to use PHP are amateurs. Jeff Atwood, co-founder of the programming question-and-answer website Stack Overflow, said: "It's very strange that smart engineering talents are going to Facebook. They develop PHP code in the Windows XP environment. They are hackers, but the word 'hacker' here is a derogatory term." Atwood called PHP a "clumsy behemoth", "epidemic", and a "haunted house" that attracts mystery lovers.

Successful programming languages ​​have an overarching philosophy, or a set of logically self-consistent guidelines that organize their vocabulary and syntax (the instructions given to programmers). But PHP is not like that. The language's designer, Rasmus Lerdorf, once admitted that he just mixed a lot of things together. "I don't know how to stop it," he said in a 2003 interview. "I have no idea how to write a programming language. I just keep adding new logical steps along the way."

One of programmers' favorite examples is the PHP function "mysql_escape_string." This function strips malicious input from requests before sending information to a database. (Examples of malicious input include forms on a website requesting a user's email address and hackers inserting code to steal a website user's password.) After a vulnerability in the function was discovered, a new version called "mysql_real_escape_string" was created, but the old version was not replaced. So the current situation is like having two buttons in the cockpit of an airplane that do the same thing: one button is for lowering the landing gear, and the other is for safely lowering the landing gear. Not only does this go against common sense, it can be disastrous.

Although many people dislike PHP, it is still the basis of a large part of the website. According to a study, 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 PHP was originally an abbreviation for "personal homepage". Through this language, programmers can easily add dynamic content such as dates and user names to static HTML pages. The rise of PHP has promoted the leap from website development to web application development, and developers don't even have to be professionals.

Ori Livneh, chief software engineer for the Wikipedia project at the Wikimedia Foundation, said that PHP's ease of use is the key to Wikipedia's success. However, he pointed out: "I have always hated PHP." Due to its reliance on PHP, Wikipedia had design flaws after its user base expanded. (It was 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 can also develop new features. For example, using the PHP language, Wikipedia displays hieroglyphs on the "Egyptology" entry and can play music on the page.

Google cannot use PHP because the current Google needs to do one thing very well, which is to search quickly and accurately. Therefore, Google's search engine uses more powerful languages, such as Java and C++. Compared with Google, Facebook is a gathering place for small-scale experiments, a hodgepodge of buttons, news feeds and small inventions. In this case, PHP can implement functions faster.

You can even imagine how Zuckerberg in his Harvard dorm room chose how to develop Facebook at a decisive moment. He needed to get the website online at the lowest cost. The Internet was developing very fast, and user preferences were fickle. The only way to seize the opportunity was to be the first mover in the market. It didn't matter whether it was a hodgepodge or a fine pasta. He first needed to complete the website and let users use it. He didn't consider whether the code was beautiful, but how to get his friends to log on to the website called TheFacebook and comment on the girls they knew.

Today, Facebook is worth over $200 billion, and on the walls of its offices are slogans like "Getting things done is more important than perfection" and "Move fast and break things." These bold slogans are meant to ensure that employees fit in with the company's "hacker" culture. And that's exactly what PHP is about. Move fast and break things, that's the essence of PHP, the way PHP programmers think about problems. You could even say that PHP itself created and sustains Facebook's culture.

The secret weapon: a more powerful language

If you want to find the opposite of PHP, the other extreme, it's worth a look at the headquarters of financial trading firm Jane Street Capital in Lower Manhattan, New York. The 400-employee company currently handles about 2% of daily U.S. securities trading volume.

When I met Jane Street Capital's head of technology, Yaron Minsky, he was sitting at his desk next to an Enigma machine, one of the few World War II-era gadgets still in existence. I thought it was the coolest secret weapon in his room, but then I realized I was wrong. Minsky talked about a programming language called OCaml. A computer science PhD, Minsky had 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 real applications. The language was designed by a French research institute and was originally intended to optimize computer systems that could automatically prove mathematical theorems. Minsky came across the language during his graduate studies. He thought it 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 grammar checking function of Microsoft Word, which can mark the code that the system thinks is wrong with a green wavy line and then prohibit such code from running. Programs developed using this system have extremely strong reliability, which is very important when the software developed needs to process 30 billion US dollars in transactions every day.

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

Furthermore, in order for input checking tools to work, programmers need to add complex comments to their code. This is like, for example, the grammar checker in Word requires you to annotate all sentences. Writing code with limited input is somewhat cumbersome and even frustrating. To make matters worse, OCaml involves very abstract mathematics compared to other programming languages, which makes it difficult for most programmers.

Still, the language's precision is attractive to some, and gives Jane Street Capital an unusual recruiting advantage. While some software developers ignore PHP's flaws to join Facebook and Wikipedia, Minsky says OCaml and his book, OCaml for the Real World, help attract the best programming talent. The appeal isn't just in the language, it's also in the people who use it. At Jane Street Capital, employees play chess during breaks. This culture of intellectual competition seems to go hand in hand with the use of OCaml.

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 is beneficial to develop more advanced software for the servers behind large network services. In addition, it is also attractive to programmers who like new things and challenges.

The right time: after growth

At the end of 2010, Facebook had a crisis. PHP is not a language that emphasizes code performance, but Facebook had this need at the time. Facebook was growing very fast, so if it didn't make some major changes, the company would fail.

Changing programming languages ​​completely was not an option. Facebook had millions of lines of code written in PHP, thousands of engineering experts were working on it, and the resulting product had hundreds of millions of users. So a group of senior Facebook engineers formed a small team. They tried to invent a way to keep Facebook from giving up its native language.

Part of the solution was to build a compiler that translated Facebook's PHP code into faster C++. Another part was a feat of computer language engineering: continuing to give Facebook programmers a PHP-style culture while letting them write more reliable code.

The rescue team designed a variant of PHP called Hack. Hack is a PHP language with an optional input checking system. You can either quickly write a messy PHP program as usual, or follow the system requirements and add comments to let the system check the correctness of the code. This input checking tool is developed entirely in OCaml, which is no coincidence. Facebook wants programmers to write code quickly using a familiar language, but it doesn't want them to get things wrong. (Last year, Zuckerberg announced Facebook's new engineering slogan: "Act fast while ensuring stable infrastructure.")

At the same time, Twitter was undergoing a similar transformation. Twitter was originally developed on Ruby on Rails, a popular web programming framework written in Ruby and with many ideas from PHP. However, Twitter then saw a surge in users. If a user had hundreds of thousands of followers, hundreds of thousands of users' timelines needed to be refreshed when they posted a message. In the past, some popular Twitter messages would often overwhelm the system, forcing Twitter engineers to suspend service to fix the problem. Twitter also became "notorious" for the frequent downtime that followed.

Twitter subsequently solved this problem by rewriting a large portion of the service's code in Scala. Unsurprisingly, like OCaml, Scala is a language designed by academic institutions, with a strong typing system that emphasizes code accuracy and performance at the expense of programmers' personal freedom and enjoyment.

Startups mature after finding a revenue model. Similarly, they can use the power of programming languages ​​to manipulate corporate culture. Guido van Rossum, a programming language designer who worked at Google for seven years and is now at Dropbox, said that when software companies reach a certain scale, the only way to avoid chaos is to use programming languages ​​that require more from programmers. "You may slow down because you need to repeat 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 early talents, and it is not conducive to the rapid development of new features by small teams. However, such a language will help programmers across the company understand each other's code and bring more stable products. If you want your product to become a part of people's daily life, then such stability is essential.

The ability to adapt strategies to different situations is partly what drives software startups. Software development depends on the ubiquity of computers, and these companies have a unique way of reinventing themselves. As they change and grow, they can do more than just adjust their organizational structure. They can also make some deeper changes, that is, change their culture and way of thinking.

<<:  If you want to make smart hardware, listen to these four pieces of advice

>>:  Apple WWDC bans selfie sticks: users will be asked to leave the venue

Recommend

After a bad start, where will Huawei and Xiaomi’s PC journey go?

A year later, Huawei launched the second generati...

A feasible solution for adding fans in private domain!

More and more people realize that private domain ...

Wolf Warriors | How to Tame a Wolf

Author: Li Lu and Wu Cunshuang, Chief Pharmacists...

The big screen is not the goal but a means. Where is the smart car heading?

The automotive industry, which has a history of m...

OpenAI: OpenAI's annual revenue is expected to triple to $12.7 billion by 2025

Driven by the strength of its paid AI software, O...

Analysis of competing products of Jelly Social APP!

Some time ago, a social APP called Jelly suddenly...

Wedding industry marketing promotion-Tencent social advertising skills!

Dreamy wedding dress, exquisite setting. Every gi...

Good news for people with allergies. Will the new coronavirus avoid you?

[This issue's rumor]: Recently, there are rum...