15 Languages, One Screen

When you compare programming syntax languages side by side, patterns click faster than they ever do from separate searches. The Learning Hub is a React and TypeScript single-page app that puts fifteen languages on one screen — no tab-switching, no context-switching, just a comparison grid that updates the moment you make a selection.

Feature Learning Hub Rosetta Code Learn X in Y Minutes
Side-by-side grid
Syntax highlighting ✅ Prism.js
Language multi-select
Strategic language profiles
Frameworks + Libraries + Stacks
Runs fully client-side

🧠 The Problem It Solves

Every developer learning a second language hits the same wall: they know what they want to write but can’t remember the exact syntax. Searching language by language breaks focus and forces mental context-switching. Having fifteen answers on one screen turns a lookup into a comparison, which is how pattern recognition actually forms when you compare programming syntax languages in parallel rather than in sequence.

🔍 What the Comparison Grid Does

The centerpiece of the app is the Syntax Comparison view. Choose a concept from the topic selector — Hello World, Variables, For Loops, Functions, or Arrays — then pick any combination of languages using the checkbox grid. Five languages are selected by default. Select All loads all fifteen at once: Python, JavaScript, TypeScript, Go, Rust, Java, C#, C++, Swift, Kotlin, PHP, Dart, C, Ruby, and R. The comparison grid renders every selected language as a card with Prism.js syntax highlighting and a one-click Copy button.

The grid is powered by a single string array in React state. Toggle adds or removes one language ID. Select All replaces the array with every ID. Deselect All empties it. One array drives both the checkboxes and the grid simultaneously — they can never get out of sync because the grid renders from selectedLanguageIds.map(...) directly, with no intermediate state of its own.

⚡ Performance: useMemo and Prism

To keep re-renders flat even when all fifteen languages are selected, the filtered snippet list is wrapped in useMemo — it recomputes only when selectedTopicId or selectedLanguageIds changes. Each code card fires Prism.highlightElement via useEffect on every language or code change, so syntax highlighting is always in sync without a full re-render of the parent.

🗂️ Beyond Syntax — Seven Sections

The hub covers more than code snippets. Language Insights gives each language a full strategic profile: typing discipline, compilation model, release year, designer, and AI-era positioning. The Frameworks section groups major frameworks by language. Libraries lists the most popular packages with install commands and star ratings. Ecosystem Stacks shows curated end-to-end technology paths filterable by category — Web Development, Mobile Development, Data Science, and Backend Development. The Technology Map organizes tools by project role — frontend, backend, database, DevOps — so when you hear an unfamiliar name you can find where it fits and follow a link directly to its documentation.

🛠️ The Stack

Built with React and TypeScript for strict prop typing on every component. Vite handles the build — fast cold starts and instant HMR during development. Prism.js grammars are imported explicitly per language so only the grammars you need are bundled. All data lives in a local JSON file — no API calls, no backend, no network requests at runtime.

📦 Extending the App

The app is entirely data-driven. Adding a new language or concept means extending the JSON file — no logic changes needed. From there, natural next steps include embedding a live code runner per card, exporting a comparison as a shareable image, or adding URL-based deep links so a specific topic and language selection is bookmarkable.

FAQ

How do I compare programming syntax languages side by side?

The Comparison view in the Learning Hub lets you select a concept and any combination of languages. The grid renders all selected languages simultaneously with syntax highlighting — no searching required.

What programming languages does the Learning Hub support?

The current build covers fifteen languages: Python, JavaScript, TypeScript, Go, Rust, Java, C#, C++, Swift, Kotlin, PHP, Dart, C, Ruby, and R.

Is the app free to use?

Yes. The Learning Hub is a static client-side app. The source code is available at coding-fab.com and runs entirely in the browser with no backend.

How is this different from searching each language separately?

Side-by-side layout makes differences visible at a glance rather than requiring you to hold a previous result in working memory while searching the next one. Pattern recognition forms from contrast, not sequential recall.

Can I add my own languages or concepts?

Yes — the app is data-driven. Adding a language or concept is a JSON edit; no component changes are needed.

What is the Ecosystem Stacks section?

Ecosystem Stacks shows curated end-to-end technology paths filterable by category: Web Development, Mobile Development, Data Science, and Backend Development. It shows which tools belong together rather than listing languages in isolation.

✨ Key takeaways

  • ✅ The Syntax Comparison grid lets you compare programming syntax languages across all fifteen on one screen
  • ⚡ A single string array drives both the checkbox UI and the comparison grid — no sync bugs possible
  • 💡 useMemo keeps the filtered snippet list flat even at full fifteen-language selection
  • 🛠️ Prism.js grammars are loaded explicitly per language, so only what you need is bundled
  • 📦 All data lives in a JSON file — extend it to add languages or concepts with zero logic changes
  • 🗂️ Seven sections cover Language Insights, Syntax, Comparison, Frameworks, Libraries, Stacks, and a Technology Map

Fork the starter kit at coding-fab.com and use it the next time syntax trips you up.

Discover more from Coding Fab

Subscribe now to keep reading and get access to the full archive.

Continue reading