Decorators in Python offer a flexible way to modify function or class behavior, enabling code extension without permanent changes. This blog post delves into first-class functions, simple and advanced decorators, and their usage with arguments and return values. Examples illustrate how decorators enhance code modularity and maintainability. Learn how to apply decorators to functions and classes effectively.
If you've ever wondered why val.replace() returns a new string instead of updating the original — that's mutability at work. In this post, I walk through Python's mutable and immutable built-in types with hands-on examples, showing exactly what happens under the hood when you "modify" a value.
Managing multiple Java versions on MacOS gets tricky when different projects pull in different directions. In this post, I walk through how to install and switch between Java versions using Homebrew and a few simple shell aliases — no heavy tooling required. It's the setup I found most comfortable to work with. Read the full guide to get it running in minutes.
I couldn't find a cheap private PyPi server option, so I started my own. It runs on a t2.micro EC2 instance for around $10/month — or free for the first year on AWS Free Tier. In this tutorial, I walk through the full setup: EC2, Docker, Terraform, and password-protected access with pypiserver. Read on if you want the cheapest private PyPi server that exists right now.
AWS Lambda concurrency is one of those things you don't think about until you're in the middle of a production incident. Throttles start happening, requests pile up in the queue, and you're left wondering what went wrong. In this post, let's go through all the concurrency configurations Lambda has to offer — unreserved, reserved, provisioned, SQS max concurrency, and the Kinesis parallelization factor — so you can make informed decisions before things break.
In this post, we continue the AWS Lambda series and take a closer look at lambda instances and start types. To make things concrete, I'll use a simple Hello World function with a counter so you can see exactly what happens at each stage.
We'll walk through what a cold start is, what code runs during it, and how AWS reuses lambda instances for subsequent invocations. If you've ever seen "Init Duration" in your lambda logs and wondered what it means — this one's for you.
AWS Lambda has three invocation types — synchronous, asynchronous, and poll-based — and understanding the difference can save you from some tricky production surprises. With synchronous, your caller waits. With asynchronous, it fires and forgets. With poll-based, AWS does the polling for you.
This is the first post in my series on not-so-obvious AWS Lambda things. Read on for concrete examples of each invocation type, including boto3 code snippets and a poll-based gotcha worth knowing before you hit it in prod.