Making Impossible States Impossible with TypeScript Conditional Types
TypeScript is often introduced as a way to add static types to JavaScript. But its real power becomes visible when we stop describing only the shape of data and start modeling relationships between data.
A common challenge in software development is that some values are not independent. One value determines which other values are valid.
TypeScript can help us express these relationships directly in the type system — and prevent invalid states before our code ever runs.
Migrating from RestTemplate to RestClient in Spring Boot
Introduction
Since Spring Boot 3.2, RestTemplate has been deprecated in favor of the modern RestClient API. This migration guide explores why RestClient is the superior choice and demonstrates how to effectively replace RestTemplate in your existing codebase.
Why RestClient?
1. Modern Fluent API
RestClient provides a fluent, chainable API that significantly improves code readability:
Before (RestTemplate):
HttpEntity<RequestBody> entity = new HttpEntity<>(requestBody, headers);
ResponseEntity<ResponseObject[]> response = restTemplate.exchange(
url,
HttpMethod.POST,
entity,
ResponseObject[].class
);
ResponseObject[] data = response.getBody();
After (RestClient):
Kubernetes Tutorial Chapter 1: Local Cluster Setup with Docker Desktop on Windows WIP
Kubernetes Tutorial Chapter 1: Local Cluster Setup with Docker Desktop on Windows
Introduction
This is the first chapter in a series of tutorials on Kubernetes (K8s). This series will provide practical guidance on Kubernetes deployment and management, beginning with local development environments and progressing to more advanced configurations.
Prerequisites
- Windows 10 64-bit: Pro, Enterprise, or Education (Build 16299 or later)
- 4 GB RAM minimum (8 GB recommended)
- BIOS-level hardware virtualization support enabled
- 40 GB minimum free disk space
Docker Desktop Installation
-
Download and Install Docker Desktop