• Hungry Minds
  • Posts
  • ๐Ÿ”๐Ÿง  How WorkMade Migrated 160K Lines of Javascript to Typescript in 6 Weeks

๐Ÿ”๐Ÿง  How WorkMade Migrated 160K Lines of Javascript to Typescript in 6 Weeks

PLUS: How to Design Uber ๐Ÿš—, WebSockets 101 ๐ŸŒฒ, Server Side Rendering Techniques โšก

Todayโ€™s issue of Hungry Minds is brought to you by:

Happy Monday! โ˜€๏ธ

Welcome to the 488 new hungry minds who have joined us since last Monday!

If you aren't subscribed yet, join smart, curious, and hungry folks by subscribing here.

The food for thought section will now have a summary of the main highlighted item of the week:

  • System design deep dive from a big tech company

  • Pure technical content on 1 software engineering pattern

  • Simply resources that I canโ€™t ignore from the past week and want to highlight!

Tell me what you think of it by replying to this email! ๐Ÿ’š

๐Ÿ“š Software Engineering Articles

๐Ÿ—ž๏ธ Tech and AI Trends

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Coding Tip

  • useImperativeHandle hook in React exposes specific child methods to parents

Time-to-digest: 5 minutes

Big thanks to our partners for keeping this newsletter free.

If you have a second, clicking the ad below helps us a tonโ€”and who knows, you might find something you love. ๐Ÿ’š

  • Product for Engineers is a newsletter from PostHog dedicated to helping engineers improve their product skills.

  • Learn how to talk to users, build new features users love, and find product market fit.

  • Subscribe for free to get curated advice on building great products, lessons (and mistakes) from PostHog, and deep dives into the strategies of top startups.

TypeScript is the gold standard for building scalable, maintainable JavaScript apps. But migrating 160,000 lines of mission-critical banking code to TypeScript? Thatโ€™s like changing the engine of a plane mid-flight. At WorkMade, they pulled it off in six weeks with zero downtime. Hereโ€™s how they did it.

Implementation highlights:

  • Dedicated migration branch: Renamed .js to .ts in a separate branch, rebased regularly to keep up with feature development.

  • Incremental typing: Started with critical modules, updated require() to import/export, and fought through 1,000+ TypeScript errors.

  • CI validation: Every rebase triggered CI pipelines to ensure stability.

  • Staging tests: Rigorous testing with Checkly for uptime and money-movement checks.

  • Zero downtime deployment: Used conditional Docker commands to handle multi-step deployments without the pain.

Results & Learnings:

  • TypeScriptโ€™s editor support and refactoring capabilities made devs 10x happier.

  • The TypeScript compiler caught sneaky bugs that JavaScript missed.

  • ESLint, ts-migrate, and Checkly were lifesavers.

Typescript is a solid choice to make your codebase more robust, maintainable, and bug-resistant. If 160k lines in 6 weeks with money transactions don't set the example, then I donโ€™t know what will ๐Ÿค“

ESSENTIAL (managerial no-nos)
Manager Antipatterns

ESSENTIAL (speedy vs. accurate showdown)
The Software Engineer Spectrum: Speed vs. Accuracy

GITHUB REPO (dify it up)
dify - LLM app development platform

ARTICLE (extreme rendering fun)
Extreme Server Side Rendering

ARTICLE (big tech truth bomb)
The Truth About Working in Big Tech

ARTICLE (git config wizardry)
How Core Git Developers Configure Git

ARTICLE (copilot to the rescue)
How to refactor code with GitHub Copilot

ARTICLE (open-source woes)
Open-source is where dreams go to die

Want to reach 150,000+ engineers?

Letโ€™s work together! Whether itโ€™s your product, service, or event, weโ€™d love to help you connect with this awesome community.

Brief: Apple announces a historic $500 billion investment in the U.S. over four years, focusing on manufacturing, AI, and skills development to boost American innovation and job creation.

Brief: Anthropic launches Claude 3.7 Sonnet, a hybrid reasoning model that enhances coding capabilities and introduces Claude Code, a tool for efficient coding tasks directly from the terminal.

Brief: Amazon unveils Alexa+, a next-gen AI assistant that enhances user interaction with conversational capabilities, smart home management, and personalized assistance, available for free to Prime members.

๐Ÿ“ˆ Meta Plans Standalone AI Chatbot App Amidst Competitive Landscape (2 min)

Brief: Meta is reportedly developing a new AI chatbot app to enhance user engagement and compete with existing platforms in the AI-driven communication space.

Brief: OpenAI launches GPT-4.5 as a research preview, highlighting its improved capabilities while cautioning that it is not a frontier model and may underperform compared to earlier versions.

This weekโ€™s coding challenge:

This weekโ€™s tip:

In React, the useImperativeHandle hook allows child components to selectively expose specific methods or properties to parent components through refs, providing controlled access to the child's internal functionality while maintaining encapsulation.

Wen?

  • Component Method Exposure: When you need to expose specific internal methods of a child component to its parent while hiding other implementation details.

  • Form Control Management: Useful in complex form scenarios where parent components need controlled access to child form elements' methods like focus, reset, or validation.

  • Custom Component Libraries: Essential when building reusable component libraries where you want to provide a clean, controlled API for component interaction while maintaining internal implementation flexibility.

"I can't change the direction of the wind, but I can adjust my sails to always reach my destination."
Jimmy Dean

Thatโ€™s it for today! โ˜€๏ธ

Enjoyed this issue? Send it to your friends here to sign up, or share it on Twitter!

If you want to submit a section to the newsletter or tell us what you think about todayโ€™s issue, reply to this email or DM me on Twitter! ๐Ÿฆ

Thanks for spending part of your Monday morning with Hungry Minds.
See you in a week โ€” Alex.

Icons by Icons8.

*I may earn a commission if you get a subscription through the links marked with โ€œaff.โ€ (at no extra cost to you).