Code Guessing Game

Code Guessing Game

All Games

Which programming language is this? Study the syntax and pick your best guess.

0
Score
0
Streak
0
Played

About the Code Guessing Game

Developers regularly read code in languages they do not write every day — in pull requests, open-source projects, Stack Overflow answers and legacy systems. Recognising a language from a few lines is a useful skill, and it trains you to notice the syntax features that make each language distinctive.

Each round shows a short snippet and asks which language it is written in. Snippets cover eleven languages: JavaScript, TypeScript, Python, Ruby, Rust, Go, Java, C#, C++, PHP and Swift. Your score, current streak and number of snippets played are tracked as you go.

How to play

  1. Read the snippet shown on screen.
  2. Pick the language you think it is written in.
  3. See whether you were right, then press Next Snippet — or Skip one you do not want to guess.

Tips for a better score

  • fn and let mut point to Rust; func with := points to Go; def with an end keyword suggests Ruby, while def with a colon and indentation suggests Python.
  • $ in front of variable names is a strong hint for PHP.
  • Type annotations after a colon (name: string) suggest TypeScript or Swift; var plus Console.WriteLine is C#.
  • Look at how a language prints output — println!, fmt.Println, System.out.println and puts are dead giveaways.

Frequently asked questions

How many snippets are there?

The game draws from a pool of more than forty snippets across eleven languages, so each session is different.

Why do TypeScript and JavaScript look so similar?

TypeScript is a superset of JavaScript. Look for type annotations, interfaces, generics and access modifiers — they only exist in TypeScript.

Is it suitable for beginners?

Yes. Even if you know only one language, you will start to recognise the others after a few rounds.

Does skipping affect my score?

No. Skipping loads a new snippet without changing your score or streak.

Related