My father worked as a surgeon for over 40 years. He studied every day to stay up to date on the latest techniques and discoveries, always striving to do the best job possible.
Developing sideprojects is my way of staying up to date, and practicing new techniques and concepts.
A JSON Schema to Bytecode compiler
API-First development (also known as Contract-driven development) starts by designing and documenting the contracts between the components that build your system (services, user interfaces, third party providers, etc.) before writing the source code.
There are many benefits to this approach. Some of the main ones include:
- Central Source of Truth: The API specification serves as the definitive guide for component behavior, simplifying testing and validation.
- Parallel Development: Provider and consumer components can be developed simultaneously.
- Automation: Shared artifacts of the system can be generated directly from the specification documents.
An API specification document describes two things: component behavior and shared data schema. For component behavior we use specifications like OpenAPI for REST APIs, or AsyncAPI for Event-driven Architectures. These specifications allow us to define how our components interact, which endpoints they expose, which messages they publish and consume.
A Twitter bot to create threads from web pages
@ThreaderBot listens for Twitter mentions. When someone sends it a link, the bot will:
- Download the content of that link
- Extract and clean the text
- Summarize the text into up to five sentences using the TextRank algorithm
- Answers the Twitter mention with a thread including the generated summary.
The bot is developed in PHP with Symfony, and runs as a cron job in a Raspberry PI.
Deep Learning with TypeScript
My implementation of an Artificial Neural Network with BackPropagation learning support. You can find my Spanish article on Deep Learning and BackPropagation here.
Implement TextRank algorithm in TypeScript
TextRank algorithm was introduced by Rada Mihalcea and Paul Tarau in their paper “TextRank: Bringing Order into Texts” in 2004. It applies the same principle that Google’s PageRank used to discover relevant web pages.
The idea is to split a text into sentences, and then calculate a score for each sentence in terms of its similarity to the other sentences. TextRank treats sentences having common words as a link between them (like hyperlinks between web pages). Then, it applies a weight to that link based on how many words the sentences have in common. ts-textrank uses Sorensen-Dice Similarity for this.