Skip to main content

Live, Learn, and Lung

Powertools for AWS Lambda (4) - Idempotency

In real-world applications, functions can be computationally expensive or time-consuming. To improve efficiency, we can cache and reuse results for identical inputs, a pattern known as idempotency. AWS Lambda Powertools provides an idempotency utility that returns the previously successful result when a function is called repeatedly with the same input. In this post, we will explore how to use it.

Powertools for AWS Lambda (3) - Tracing

AWS X-Ray helps developers analyze and debug distributed applications by providing a holistic view of requests as they travel through the system.1 Tracer is a wrapper around the AWS X-Ray SDK for Python that offers a simplified interface for instrumenting Lambda functions.2 In this post, I will show you how to use Tracer to gain insights into your function’s execution.

Characteristics of Functional Programming – Examples in R

Between 2016 and 2018, most of my projects were heavily written in R. At its core, R has a strong emphasis on functional programming. For example, I enjoyed using packages like dplyr to seamlessly chain data cleaning and modeling steps. In R, everything operates as a function call—even for loops function under the hood as calls.

for (i in 1:10) {
  print(i)
}
# is same as 

`for`(i, 1:10, print(i))

In this post, I introduce the fundamental concepts of functional programming, using R code as illustrative examples.