DEV Community

Unicorn Developer
Unicorn Developer

Posted on

We're building custom programming language—would you join us?

What is expertise, and what lies at its core? Expertise varies in depth, field, and purpose. But some things never change: it can't exist without theory and experience; it can't emerge in an environment free from challenges and mistakes. Every person develops their own unique expertise. Today, we'll share our experience, which may inspire you to enhance your expertise. Also, we invite you to challenge your brain and guess some unexpected inventions.

1387_letsmakelanguage/image1.png

What gives rise to expertise in programming? In the past, it was curiosity—the urge to simplify and overcome challenges. Today, it shaped by projects that deliver business value. But even now, we can arm ourselves with those qualities and reach the outcomes we aim for. After all, code lets us stay flexible and venture down untrodden paths. Quite often, they can lead to the beginning of something much greater—and history has plenty of proof.

Below, you'll find stories of such unexpected success. Can you guess what invention each one describes? Share your guesses in the comments or read the article to the end, where we'll reveal all the secrets.

Story #1

A Danish-Canadian developer wanted to create a convenient tool for tracking visits to his online CV. The solution proved so useful and effective and quickly went beyond personal use. It still remains popular among web developers. What is the solution?

Story #2

Two developers set out to solve the problem of migrating software from 32-bit to 64-bit systems. They created a tool to help detect errors the transition caused. Later, they realized it could also find other issues and transformed it into a full-featured tool that could handle a wider range of tasks. What the solution does?

Story #3

An engineer came up with this solution to fix an issue in his online store where items would simply disappear from the cart when users navigated to another store section. Today, this discovery powers the entire world of online advertising and user tracking.

What does expertise mean for PVS-Studio?

We hope you guessed what the solutions were. Now, let's go back to the main topic: expertise. Why does our company value it? How does it reveal itself in our work? Now we'll show how our new practice helps transform our expertise into benefits for the developer community.

We work closely with programming languages because our mission is to help developers write clean code. Our devs should understand languages down to their core to create algorithms that detect common and critical errors, as well as potential vulnerabilities in code. This expertise enables us to teach computers how to automatically identify issues.

The number of diagnostic rules that catch issues in your projects continues to grow every year.

1387_letsmakelanguage/image2.png

What stands behind these rules, though? What does the analyzer rely on when searching for errors? It's the core! It powers our data flow analysis, signature analysis, method annotations, and all our other analysis technologies. Yuri, our core architect, handles this and other numerous areas. He's a great engineer, a proud cat dad, and simply a cool guy. While going through yet another epic battle with core-level challenges—it's hard to imagine what he deals with every day while diving so deep into the tool's innards—Yuri was pulled away from his usual work by an offer from his colleagues...

PVS-Studio has a department called Te&De (Teaching & Development). Two wonderful employees, Inna and Yulia, handle internal trainings for our employees. They also organize live talks for managers and developers.

You can find information about the upcoming and past talks here.

They suggested Yuri share his knowledge in the internal training course for new employees. As the course took shape, we realized that its content would benefit not only new colleagues, but also the broader dev community. This led to the decision to make the materials publicly available for free.

A few words about the series of live talks

Since Yuri isn't a fan of text storytelling, we took it upon ourselves to introduce his original series of live talks about creating a toy programming language where he explains what lies behind almost every programming language. Understanding how it works is one thing—teaching a machine to understand it is a much harder challenge.

1387_letsmakelanguage/image3.png

It all starts with grammar, which describes the language structure.

When it comes to parsing code, the lexer takes the stage. It extracts individual words from the text and classifies them.

The next step is to put words into sentences. This is where the parser comes into play. It takes the words and turns them into language constructs. Then, we organize these constructs into a syntax tree, a hierarchical structure that represents relationships between individual language parts. We traverse the tree and execute or evaluate what it describes.

A language also consists of different entities that we can name—and it must recognize and understand these names. This is where semantic analysis comes in. Languages also have data types that interact with each other, and determining how they work together is part of semantics.

The final piece is the evaluator that traverses the syntax tree and calculates the values of variables and expressions.

This is roughly what a programming language looks like in a simplified and idealized form. In the live coding sessions, Yuri walks through the entire process while viewers can ask questions and discuss the details.

Our main goal isn't to teach but to satisfy the curiosity that drives many programmers to dive deeper into the topic. We also want to transform the experience gained from building a static analysis tool into exciting content and share this expertise with others. The steps Yuri goes through when creating his own language form the foundation, but it isn't as simple as it may seem. This series of sessions, designed to help developers build their own language, is one of the easiest ways to understand how programming languages actually work.

1387_letsmakelanguage/image4.png

By the way, if you'd like to join Yuri on this journey, there's still time! The next session dedicated to building an Abstract Syntax Tree is scheduled for June 26, 1:00 PM UTC+1. Sign up here and don't forget to check your inbox to confirm the registration!

Revealing secrets

While doing our work, we often run into challenges. If we stop, we might miss something important and truly remarkable. But when overcoming a problem, we feel proud of ourselves and gain experience and new skills. By encouraging curiosity, we explore new horizons, sometimes simplify complex things, and open doors we never even knew existed at the beginning of our journey. Now, it's time to lay our cards on the table and tell you what solutions we had in mind.

Story #1

1387_letsmakelanguage/image5.png

The Danish-Canadian developer's name is Rasmus Lerdorf, and his invention is Personal Home Page (a set of tools for a personal homepage). It became popular and eventually evolved into PHP, a widely used programming language for websites. Lerdorf combined his scripts with a form-handling library, introducing the basic syntax, and the option to process data from HTML forms. The release of PHP 2.0 turned it into a full-fledged tool for building dynamic websites, revolutionizing web development.

P.S. One of our designers created this image for another article. It's amazing how large our collection of illustrations has grown over the years, especially considering the exceptional talent of each artist. Recently, our colleague wrote an article on how our mascot, Cody the Unicorn, has changed throughout the entire company's history. Check out this article and enjoy the delightful collection of unicorn illustrations and some of the most unconventional designs.

Story #2

Of course, it's PVS-Studio. We decided to praise ourselves a little :)

1387_letsmakelanguage/image6.png

It was 2006, the dawn of 64-bit systems. Back then, many devs were thinking about moving away from 32-bit systems, but the transition brought its own share of 64-bit bugs. As a result, two developers created a mechanism to catch such errors and later turned it into a tool that tackled a much wider range of issues. Today, PVS-Studio is a full-fledged company. Back then, it started with two recent grads who had a problem, and their solution grew into something much bigger. By the way, the company recently turned 18—they grow up so fast!

Story #3

1387_letsmakelanguage/image7.png

In 1994, Netscape Communications engineer Lou Montulli encountered an issue: the original HTTP protocol was stateless, meaning a server couldn't track when the same user moved from page to page or made purchases. He suggested storing a small piece of text data on the user's side. These became known as cookies. This invention forever changed the web industry by making it possible to create user-friendly shopping carts for online stores and enabling users to stay logged in to websites.

Some parting words

The PVS-Studio team wishes you success in enhancing your expertise. It's a valuable skill that'll help you grow and reach new heights. We also invite you to join our live talks, where you can gain new insights into programming languages and find inspiration for your projects, whether personal or professional. Your curiosity may also lead to something bigger. All you need is right here...

Top comments (0)