Skip to contentSkip to content
Verified credentials. On-chain. Forever.Learn more
Cover image for Refactor a Legacy Reporting Script for a Renewable-Energy Startup
Code

Refactor a Legacy Reporting Script for a Renewable-Energy Startup

FreeVerified credential2 weeksIntermediate

Overview

What this challenge is about.

Read the existing script and identify 5-7 distinct responsibilities tangled together. Refactor into 3 layers: data loaders (CSV, REST API), transformers (pure functions over rows), and renderers (PDF, HTML). Use higher-order functions (map, filter, pipeline composition) instead of nested for-loops. Define a clear Row data abstraction (dataclass) so transformers don't reach into dict internals. Add unit tests covering 80 percent of the transformer layer. Run the refactored script against the existing baseline and prove output equality on the last 30 days of reports. Deliver the refactored source, the tests, a baseline-equivalence proof, and a 4-page write-up the team can use as a future refactoring template.

CredentialBlockchain-anchored
ShareableLinkedIn-ready
LanguageEnglish
PaceSelf-paced

The Brief

What you'll do, and what you'll demonstrate.

Refactor a 1,200-line single-file reporting script into modular abstractions while proving output equality with the existing baseline.

Earning criteria — what you'll demonstrate

  • Identify responsibilities tangled in a real legacy script
  • Apply higher-order functions to replace nested-loop logic
  • Design a data abstraction that isolates layers from each other
  • Prove behavioral equivalence with the previous implementation

Program Fit

Where this fits in your program.

Sharpens the same skills your degree expects you to demonstrate.

Skills

Skills you'll demonstrate.

Each one shows up on your verified credential.

Careers

Roles this prepares you for.

Real titles. Real skill bridges. Pick the one closest to your trajectory.

Career mappings coming soon.

One more thing

You can put a credential on your CV by Friday.