Learn about the four languages included in this course and their relative strengths.
- By the time you're done with the course, you won't be an expert in each of the four languages we cover, but you should feel comfortable making changes and understanding the structure of the interaction. The four languages, Node.js, Python, Perl, and Ruby, were selected because they're some of the most used web languages, and their structure is similar to each other. While it's not necessary to do all of the languages in the course, or do them in any specific order. The next chapter, on Node, will have more discussion of the code and the overall programming challenges, so I encourage you to start there.
Node dot js is a relatively new language, a server side language built on java script. It's hot and exciting, and introduces new approaches to internet programming. Although the official name is Node.js, throughout the course you will usually hear me refer to it as Node. Either is acceptable. It's the second most watched project on GitHub, and has tens of thousands of community modules published in NPM, the node package manager. It is mainly used to create fast, scalable web applications.
Node has introduced many among us to the idea of event driven programming, and as more and more APIs have sprouted up, it has become one of the central technologies for many application specs. When I worked at LinkedIn, we had a Ruby API for the mobile devices, but it wasn't able to scale to the millions of requests required for the mobile devices. Switching to node allowed the system to scale and improve performance. The Node community, in my experience, is open, helpful, and encouraging of new contributors.
The management of NPM modules happens on GitHub, which encourages open source contributions by the community and shared ownership of particular libraries and functions. Python is the second language I'll cover. It is a fairly established language being used by many companies. Python is known for being extremely proficient at mathematical functions, having been written by a mathematician. The roboticists and scientists I know use Python for their work.
Python is also known for being very picky about whitespace and formatting. However, because of these constraints, it's also much easier to read and understand. I use Python for the sample code I provide because I believe that Python is the easiest language to read if you don't already know Python. Python is not as community focused as Node. Python also has a package manager, called Pip, but it's not as well populated as some of the other languages.
However, there's a great deal of Python code out there, particularly in applications needing complex calculations. And some people find the structure of the language quite appealing, and enjoy the fact that most functionality is included in the core installation. Perl, ah Perl. It's been around for a very long time. I wrote my first Perl web application in 1994. Perl is known to be difficult to decipher, which I find amusing. Python was written by a mathematician and has beautiful, clean code.
Perl was written by a linguist, and it can be hard to read. I'll make the Perl code pretty for the course, though. Just as Perl allows for ugly and poorly designed programs, it is equally proficient in supporting well architected and beautiful code. Perl is phenomenal at processing data. It was originally called the practical extraction and reporting language, or, as the creator called it, the pathologically eclectic rubbish lister. Either way, it's fantastic at regular expressions and reporting functions, and has additionally found its way into many back end IT systems.
Some people say Perl is dead, but I know a great number of Perl programmers who would disagree. Perl is one of the best languages to focus on to support legacy code in enterprise companies. The Perl community used to have a reputation for being hard on new folks, and it's true that there was a kind of elitist mentality, but I've recently seen a much better experience, with helpful folks making sure that new programmers have the help that they need. And finally, Ruby.
Ruby was designed as an object oriented scripting language, aimed at being easy to use. While it was originally designed in 1993, it really came into its own in the last 10 years as people started using Ruby on rails, a framework that made the creation of web applications easy. In fact, many people don't think of Ruby as separate from rails, but it's a legitimate language on its own. Many CLI implementations, such as Heroku's tool kit, are based on Ruby, and there's a large collection of Ruby code out there to be managed, maintained, and enhanced.
As we work through the languages, you'll get a better sense of their syntax and functionality.
- Why become a polyglot programmer?
- Exploring Node.js, Python, Perl, and Ruby code
- Building on prior knowledge to learn new programming languages
- Learning API read and write functionality in Node.js, Python, Perl, and Ruby
- Implementing API functionality in Node.js, Python, Perl, and Ruby