Code Guessing Game
Code Guessing Game
All GamesWhich programming language is this? Study the syntax and pick your best guess.
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
- Read the snippet shown on screen.
- Pick the language you think it is written in.
- See whether you were right, then press Next Snippet — or Skip one you do not want to guess.
Tips for a better score
fnandlet mutpoint to Rust;funcwith:=points to Go;defwith anendkeyword suggests Ruby, whiledefwith 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;varplusConsole.WriteLineis C#. - Look at how a language prints output —
println!,fmt.Println,System.out.printlnandputsare 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.