Lessons-learned from a 6-month Typescript/AWS Lambda project

submited by
Style Pass
2021-07-29 11:00:09

I finished a 6-month project where we delivered a greenfield IT system. Here are my lessons learned, focusing on the technical side.

For the context, the system was written in Typescript, on top of AWS Lambda. Functionally, the system integrated two other systems via their REST APIs. The team consisted of two engineers, one project manager, and one person from the business. I was the engineer.

So how to solve this? In this project, we used two batteries of tests. First, we added component tests. The tests were implementation-agnostic and used HTTP server mocking. Such tests were a great decision:

The second battery of tests contained unit tests. We unit tested functions with nontrivial calculations, such as complex text parsing. With such tests, we gained confidence that the calculations were correct and all edge cases were covered.

Speaking of refactoring: the closer we were to completion, the clearer it was how code should be organized. So towards the end of the project and thanks to the component tests, I heavily refactored the overall code structure. Complex things got decomplected. Afterward, when unexpected business requests arrived, we added them as a simple unit; instead of adding to a hairball of complexity.

Leave a Comment