Code Snippets

Control Flow

How do programming languages control the flow or processing of instructions? Here's how control flows work in several languages.

Regular Expressions

All programming languages have a way to find Elvis, but it can be difficult to learn how.

Data Types

Programming languages use data types to allocate memory and enforce data integrity. They also reveal the nature of a language.

Objects

Many programming languages organize their code into objects, to model their applications and make their code more reusable.

Brackets, Semicolons, or Nothing, Oh My

How do programming languages know what to process? And in the correct order?

docstrings

Docstrings are special comments embedded in software code that survive compiling the code, for example, help text.

Comments

Almost all programming languages include the ability to add comments and other notes in your code. Here's how several languages work with comments.

Functions

Managing inputs and outputs is a key problem programming languages face. Here's how a few languages use functions to manage and transform data.

Arrays

Here is how three programming languages handle a common problem: how do you organize and keep track of useful data?

Variables

In most or all software programming languages, variables work like containers to hold numbers, phrases, or other important stuff used in several places in your code. Here's how they work in several common languages.

Hello World! in 100 Programming Languages

When you learn a new programming language, one of the first programs you learn is how to code, "Hello World!" Here's the phrase in four programming languages, as well as links to 100 plus examples.