Build a Safe Expression Evaluator for a Math-Learning App
Overview
What this challenge is about.
Build a Safe Expression Evaluator for a Math-Learning App. Intermediate challenge in code. Writing production code that solves real engineering problems, ear...
The Brief
What you'll do, and what you'll demonstrate.
Replace an unsafe expression evaluator that ran student-typed text as live code with a recursive-descent parser and tree-walking evaluator that computes valid math correctly and rejects malicious input, without any dynamic code execution.
This is not a coding exercise. It is the work a software engineer does between a Jira ticket and a merged PR. That distinction matters to every hiring manager who has seen candidates solve LeetCode problems and none who have shipped production code under real constraints.
When you finish, you will have something most graduates do not: a real-world deliverable, verified by Ewance, that you can show to a hiring manager and say "I did this. Here is the proof."
Earning criteria — what you'll demonstrate
- Translate a written grammar specification into a working recursive-descent parser that respects operator precedence and associativity.
- Apply higher-order functions to build an extensible operator and function registry that decouples evaluation logic from parsing.
- Design a tree-walking evaluator over an abstract syntax tree using recursion.
- Use test-driven development to prove correctness on valid inputs and safe rejection of malicious inputs.
- Articulate a security argument that justifies avoiding dynamic code execution in user-facing software.
Program Fit
Where this fits in your program.
Sharpens the same skills your degree expects you to demonstrate.
Aligned coursework coming soon.
Skills
Skills you'll demonstrate.
Each one shows up on your verified credential.
- Recursion
Apply recursion to solve real industry problems and demonstrate production-level capability.
- Higher Order Functions
Apply higher order functions to solve real industry problems and demonstrate production-level capability.
- Parsing
Apply parsing to solve real industry problems and demonstrate production-level capability.
- Abstraction
Apply abstraction to solve real industry problems and demonstrate production-level capability.
- Python Programming
Apply python programming to solve real industry problems and demonstrate production-level capability.
- Test Driven Development
Apply test driven development to solve real industry problems and demonstrate production-level capability.
Careers
Career paths this challenge builds toward
Completing this challenge demonstrates skills that transfer directly to these roles:
Backend Software Engineer
Building a safe parser and evaluator mirrors real backend work: turning untrusted user input into a structured representation and processing it without exposing the system to injection. This challenge proves you can design clean abstractions and defend them with tests.
This challenge sharpens
- parsing
- abstraction
- test-driven-development
Language Tooling Engineer
Interpreters, linters, and formatters all rest on tokenizing, parsing, and walking syntax trees. Implementing a recursive-descent parser and a tree-walking evaluator from a grammar spec is the foundational skill set for building developer language tools.
This challenge sharpens
- recursion
- parsing
- higher-order-functions
Application Security Engineer
Replacing dynamic code execution with a bounded evaluator and proving rejection of malicious input is core application-security practice. The challenge develops the instinct to treat user input as hostile and to design safe-by-construction interfaces.
This challenge sharpens
- abstraction
- test-driven-development
- python-programming