This is an article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. Last time we explored the Data Encryption Standard (DES), and how its Feistel network structure worked. We also saw why DES eventually became obsolete: its 56-bit key size was simply too small in the face of modern computing power. To replace DES, the U.S. National Institute of Standards and Technology (NIST) held a public competition in the late 1...| Kevin Sookocheff
This is an article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. The Data Encryption Standard (DES) is based upon the principles of a substitution-permutation network that we learned about in the last post in this series. The design of DES is based on the principles of Feistel ciphers, which are a particular configuration of a substitution-permutation network developed by Horst Feistel at IBM.| Kevin Sookocheff
This is an article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. A block cipher is a type if cipher that combines an encryption/decryption algorithm that works on blocks of data with a mode of operation that details the techniques to process sequences of data blocks. While many different block cipher algorithms exist, they all share a common structural design: they apply a series of transformations — known as ...| Kevin Sookocheff
CloudFront supports two logging modes: v2 logging and legacy logging. Naturally, you’d expect to use the newer v2 logging—but if you’re provisioning CloudFront with CloudFormation, it’s easy to end up with the legacy setup by accident. If you use the Logging property in your AWS::CloudFront::Distribution, CloudFormation will default to legacy logging, writing directly to S3. There’s currently no way to switch this to v2 via the Logging property in CloudFormation. To enable v2 loggin...| Kevin Sookocheff
If you have a Dell monitor and an M-series chip from Apple, you may have encountered flickering issues with your monitor which — at times — can render it completely unusable. The issue appears to be fairlywidespread and can affect a number of Dell model and Apple silicon chip combinations, and has been acknowledged by Dell. The flicker is caused by the monitors LCD panel’s Image Compensation Algorithm (ICA) function repeatedly turning On and Off. The YCbCr Video generated from the Macs ...| Posts on Kevin Sookocheff
This is the fifth article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. When discussing encryption, you’ll often hear talk about the strength of a security system as measured in “bits.” For example, systems might advertise their strength as having 128-bits or 256-bits. But what exactly does security measured in bits mean? Let’s demystify this common yet sometimes misunderstood concept.| Kevin Sookocheff
This is the fourth article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. Modular arithmetic is the foundation for asymmetric cryptography like RSA, elliptic curves, or Diffie-Hellman — all of them rely on the properties of modular arithmetic to guarantee security and secrecy. Since modular arithmetic is so important to cryptography, it pays to understand how it works. This post will help us along the journey b...| Kevin Sookocheff
This is the third article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. Without randomness, cryptography would be impossible because all operations would become predictable and therefore insecure. — Jean-Philippe Aumasson, Serious Cryptography The cryptographic strength of most systems lies in their ability to generate random numbers that cannot be easily guessed or reproduced, making it difficult for adversar...| Kevin Sookocheff
This is the second article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. --- A cipher is only useful if it is secure. What makes a cipher secure? Let’s remember the use case for classical ciphers — keeping messages confidential. Caesar’s cipher and Vigenère’s cipher both suffer from a similar flaw, which makes them insecure and unusable for secure communication. For both ciphers, the flaw is obvious —...| Posts on Kevin Sookocheff
This is the first article in a series on Cryptography for the Everyday Developer. Follow along to learn the basics of modern cryptography and encryption. The best way to begin learning about encryption is by example. And thankfully, there exist many examples of encryption throughout history that we can draw from. One of the earliest well-known examples of encryption is the Caesar Cipher, and we will begin there. The Caesar cipher is one of the oldest and simplest forms of encryption. It works...| Kevin Sookocheff
In this blog post, we will explore how to use simulated annealing to cluster a Design Structure Matrix (DSM). We will also discuss how this approach differs from the implementation developed by Ronnie Thebeau as part of his master’s thesis. What is a Design Structure Matrix (DSM)? A Design Structure Matrix (DSM) is a compact, matrix representation of a system or project. It is used to model the relationships between elements in a system, such as tasks in a project or components in a product...| Kevin Sookocheff
At AWS re:Invent 2023, Amazon CTO Werner Vogels delivered a talk on the laws of frugal architecture. While I initially filed away those insights to review later, a year of cloud architecture experience crystallized a fundamental truth: in cloud computing, cost isn’t just a financial consideration — it is a first-class architectural concern through which we should design and optimize our systems. Cloud providers charge for every conceivable resource: servers, API calls, data transfer, and ...| Kevin Sookocheff
If you work with US government entities or corporations in regulated markets the subject of FIPS compliance may come up, especially in the context of FedRAMP authorization. FIPS 140-2 and FIPS 140-3 are a set of cryptographic standards that your application may need to adhere to dictating the appropriate ciphers or cryptographic functions that are in use. It can take a lot of effort to run a completely FIPS compliant architecture, but for application developers, the bottom line is that any co...| Posts on Kevin Sookocheff
Most new applications are built as a single codebase and deployed as a monolith until product-market fit or the need for additional scale is required. Such monolithic applications are easy to write and maintain, and allow you to iterate quickly when there are a smaller number of users and the traffic is low. However, as traffic increases you will need to scale the application to handle the increase in load. One framework for scaling is the “Scale Cube” describe by AKF partners.| sookocheff.com
eBPF is a technology allowing you to dynamically program the kernel using a virtual machine approach. Several development frameworks exist, with the top choice for Rust developers being Aya. Because of the deep integration between eBPF and the Linux kernel, it can be challenging to create a local development environment that works across different development machines. To date, I’ve taken to developing eBPF programs on EC2 instances using the AWS Cloud9 development environment.| sookocheff.com
One of the larger hurdles to climb when becoming FedRamp moderate is encrypting all data in transit using FIPS validated encryption modules. This article describes one approach to satisfying this requirement for anyone running a Kubernetes cluster on AWS. For those lucky souls who are unfamiliar with FIPS, it stands for Federal Information Processing Standard (FIPS), which is a joint US and Canadian government standard that specifies the security requirements for cryptographic modules that pr...| sookocheff.com
This article provides guide to the different developer tools available for writing eBPF programs, covering the core tools BCC, bpftrace, ebpf-go, and libbpf. These tools satisfy a different use case depending on whether you are trying to use eBPF for running analysis scripts, or full-fledged programs, in what programming language you wish to use, and the maturity and feature parity with the most recent eBPF features in the Linux kernel.| sookocheff.com
A common pattern when scaling a SaaS application is to deploy your stack to multiple regions across the globe. Deploying to multiple regions helps distribute the application and data closer to the user, and isolates infrastructure in case of an outage in a single region. If your application is deployed in this configuration, you have the new problem of routing users to the correct region based on their tenancy or geography.| sookocheff.com
A short tagline from the book Learning eBPF describes eBPF as a revolutionary kernel technology that allows developers to write custom code that can be loaded into the kernel dynamically, changing the way the kernel behaves. The key word in this phrase is dynamically. eBPF allows you to write custom code that changes the way the kernel behaves without having to implement a kernel module or integrate your code directly into the kernel.| sookocheff.com
DynamoDB provides built-in support for cross regional data replication using a solution AWS calls global tables. This article shows how to build and run an application in Kubernetes that uses global tables to replicate data between regions. In the event of a regional disaster, a secondary Kubernetes cluster in a secondary region has all the data from DynamoDB replicated locally to continue operation. How global tables work A DynamoDB global table is a set of multiple replica tables.| sookocheff.com
Disaster events are one of the biggest challenges that a software organization can face. Natural disasters like earthquakes or floods, technical failures such as power or network loss, and human actions such as unauthorized attacks can disable an entire fleet of systems, leading to complete failure for a business. To deal with disaster scenarios requires a proactive approach to prepare and recover from failure. One of the key benefits of running in the cloud is how easy it is to run workloads...| sookocheff.com
Dealing with storage is a core challenge when running complex applications on Kubernetes. While many applications operate just fine using a cloud database or blob storage, some applications have performance or design requirements requiring local storage. Note: For performance benchmarks see [Benchmarking AWS CSI Drivers](<{{ relref “/post/kubernetes/benchmarking-aws-csi-drivers” }}). When this is the case, developers and cluster operators rely on Container Storage Interface (CSI) implemen...| sookocheff.com
A central tenet of databases is that any committed data survives a crash or a failure. Write-ahead logging is a fundamental primitive that ensures all changes to data are first written safely to stable storage before being applied. Coupling that with some careful use of sequence numbers and we can guarantee that changes made to a database can survive system crashes. Motivation Let’s start with a simple transaction T1 that reads object A, and updates the value for A with a write.| sookocheff.com
Check out the project on Github. I recently published a new project for repeatable filesystem benchmarking. This code is based on the benchmarks available in the AWS Mountpoint-s3 project and the Flexible I/O Tester, made into a more general purpose utility for benchmarking arbitrary filesystems. The benchmark consists of a mix of read and write workloads, each run for ten iterations. The average result of the ten iterations is reported as the final result of the benchmark.| sookocheff.com
AWS provides four different storage options for your Kubernetes cluster: EBS, EFS, FSx for Lustre, and Amazon File Cache. Each of these CSI drivers has different performance characteristics, depending on your workload. This post quantifies those performance differences using the flexible I/O tester FIO. Note: For an overview of the different CSI options available on AWS, see Picking the right AWS CSI driver for your Kubernetes application. Before we start, please note that these results come ...| sookocheff.com
eBPF is a relatively new extension of the Linux kernel that can run sandboxed programs in a privileged context. It is used to safely and efficiently extend the capabilities of the kernel at runtime without requiring changes to kernel source code or the loading of kernel modules. Because of eBPFs tight integration with the networking stack at the kernel level, it is seeing adoption in networking applications. This includes Kubernetes networking through eBPF implementations of the Kubnernetes n...| sookocheff.com
I was recently introduced to a simple article on system design: Users are almost always right. In it, a simple rule is stated: When the users keep doing it wrong, the users are right and your system is wrong. This rule reminded me of the concept of desire paths: unplanned trails created by human or animal traffic that usually represent the shortest or easiest route between two places. Desire paths in an urban setting often run counter to what a planner might suggest, leading to a natural conf...| sookocheff.com
I was recently testing file upload performance, and needed several large files of different sizes to test with. To make the math easier, it was helpful if I had files with round numbered sizes like 10MB, 20MB, or 100MB. After searching around for files of the right size, it turns out the easiest solution is to generate one yourself using the Linux command line. Depending on your needs, you can use two different methods of generating files using some simple commands.| sookocheff.com
A JWT (JSON Web Token) is a type of security token that is used to securely transmit information between parties. It is a compact and self-contained way of representing claims to be transferred between two parties. Many API providers require you to generate a cryptographically signed JWT assertion that includes the authorization you are requesting from the server. If the server accepts the assertions you are claiming in the JWT, it will respond with an access token granting access to the API.| sookocheff.com
Application Portfolio Management (APM) draws inspiration from financial portfolio management, which has been around since at least the 1970s. By looking at all applications and services in the organization and analyzing their costs and benefits, you can determine the most effective way to manage them as part of a larger overall strategy. This allows the architect or engineering leader to take a more strategic approach to managing their application portfolio backed by data.| sookocheff.com
Every so often I get stuck with a running process that’s using a specific port, preventing me from running some new application that uses the same port. Then I’m left Googling for solutions or rebooting the machine to make progress. But not any more! I’m recording the solution for my future self (and of course for you, dear reader). > sudo lsof -i : # returns list of processes using the port, with PID > kill -9 # kill the specific pid For example, you can find out what’s running on p...| sookocheff.com
One of the recurring themes of any technology discussion is programming language. It doesn’t take much effort to find blog posts with dramatic headlines (and even more dramatic comments) about how shipping a new project with Haskell or Clojure or Elm improved someones job, marriage, and life. These success stories are posted by raving fans that have nothing but the best to say about their language of choice. A common thread running through these posts is that they are typically tied to buil...| sookocheff.com
In a shopping cart, the swivel wheels of the cart are set in the front, and the fixed wheels are set in the back. Now picture yourself pushing a shopping cart backwards. Almost naturally, you swivel the cart to move the front end to one side or the other before beginning to push the cart. Now picture yourself pushing a shopping cart backwards, on an ice rink. Here, the cart keeps sliding around even after you’ve stopped pushing it.| sookocheff.com
Many OCaml guides and tutorials refer to the OCaml toplevel, but what exactly is this thing? In short, the toplevel is OCaml’s Read-Eval-Print-Loop (repl) allowing interative use of the OCaml system. You can consider the toplevel an alternative to compiling OCaml into an executable. In this mode, the OCaml system is configured to repeatedly read phrases from input, typecheck, compile, and evaluate them, then print the inferred type and result value.| sookocheff.com
Inspiration for software architecture often comes from the world of building architecture. In building architecture, the architect takes in local building codes to understand construction requirements. They analyze various building components like ductwork and furnaces, windows and doors, and figure out where and when to use standard components and when to build custom. They provide cost estimates for each of the components and for the whole, and then build out a blueprint providing upfront d...| sookocheff.com
I recently had the pleasure of being part of the Tied to Machines podcast. We talked about the role of architecture, architectural leadership, and the intersection between architecture and business. You can listen to the full episode here.| sookocheff.com
Software is core to the operation of our business, and as architects, we are the key conduit between business and technology. Being technical leaders within this intertwined relationship means that we have a responsiblity to make sure that our business decisions and our technology decisions stay aligned. Being in this position demands leadership skills that are equal or better than our technical skills, so that we can effectively align business strategy with technical strategy, communicate th...| sookocheff.com
Alpha conversion (also written \(\alpha\)-conversion) is a way of removing name clashes in expressions. A name clash arises when a \(\beta\)-reduction places an expression with a free variable in the scope of a bound variable with the same name as the free variable. — Greg Michaelson, An Introduction to Functional Programming Through Lambda Calculus When we are performing a \(beta\)-reduction it is possible that the variable name in an inner expression is the same as a variable name in an o...| sookocheff.com
Shortly after deploying a new Kubernetes cluster, one of the first things you will likely want to do is collect some metrics and data about how it operates. There are two projects that are typically used for this, and since they are named similarly it can be confusing to know which one you should use and why. This post hopes to clear up any confusion between the Kubernetes Metrics Server and kube-state-metrics.| sookocheff.com
Amazon’s Elastic Compute Cloud (EC2). EC2 is a web service that provides resizable, on-demand computing capacity — literally, servers in Amazon’s data centers — that you use to build and host your software. It’s important to understand that EC2 is a virtual computing environment. In a virtual environment, there is one physical server with all of the necessary hardware — CPU, memory, hard disk, network controller and more. This single physical server can host multiple operating sys...| sookocheff.com
I first learned Vim in university and, since then, it has been a welcome companion for the majority of my software engineering career. Working with Python and Go programs felt natural with Vim and I was always felt productive. Yet Java was always a different beast. Whenever an opportunity to work with Java came up, I would inevitably try Vim for a while, but fall back to IntelliJ and the IdeaVim plugin to take advantage of the rich language features a full-featured IDE can give you.| sookocheff.com
Practical distributed applications are deployed into varied environments and execute on a variety of different machines linked together over a variety of communication infrastructure. The physical machines themselves can differ in the number and speed of processors, the availability of random access and stable storage, and more. The communication infrastructure can differ in the available levels of latency, throughput, and reliability. Because of these differences, it is more practical to loo...| sookocheff.com
The theory of distributed systems promoted the use of logical clocks by introducing the idea of causality tracking as an abstraction for reasoning about concurrency between events in the system. In practice, a lot of systems continue to operate using physical time, which presents difficulties due to clock synchronization drift. In an effort to bridge the gap between physical and logical time, HybridTime combines both logical and physical times in one system.| sookocheff.com
HybridTime introduces a hybrid between physical and logical clocks that can be used to implement globally consistent database snapshots. HybridTime is one implementation of the general concept of Hybrid Logical Clocks that combine the logical clock semantics of Lamport and Vector clocks with a physical representation of time such as Spanner’s TrueTime. HybridTime follows similar update semantics as Lamport and Vector Clocks, where each node in the system updates their internal clock in resp...| sookocheff.com
TrueTime is Google’s solution to providing to globally consistent timestamps to determine ordering of events. Originally developed to support the Spanner distributed database, TrueTime is a clock implementation that depends on two key factors: well engineered and accurate GPS and atomic clocks and the representation of time as an interval of uncertainty. Representing TrueTime TrueTime explicitly represents each timestamp an interval that includes bounded time uncertainty. TrueTime represent...| sookocheff.com
Vector clocks are an extension of Lamport Clocks designed to determine all correct orderings of events in a distributed system. Whereas Lamport Clocks yield one of the many possible event orderings, this does not for certain classes of problems that require knowledge of global program state such as reversing the order of execution to recover from errors or rollback. In such cases, it is more useful to have access to the entire set of orderings that are causally consistent at any moment in time.| sookocheff.com
Computers generally track the current time using a quartz crystal that oscillates at a known frequency. This frequency is used to advance the local clock at pre-defined intervals. Quartz oscillates with enough stability that it can be used to maintain time within a few milliseconds of accuracy per day. Over time however, these imperfections can accumulate, making the clock inaccurate. To fix these inaccuracies, computers typically run a background process like NTP to synchronize the local clo...| sookocheff.com
The Network Time Protocol (NTP) is a system for synchronizing the clocks of hosts and clients across the Internet. NTP is a protocol intended to synchronize all computers participating in the network to within a few milliseconds of Coordinated Universal Time (UTC). The core of the protocol is NTP’s clock discipline algorithm that adjusts the local computer’s clock time and tick frequency in response to an external source — such as another trusted NTP server, a radio or satellite receive...| sookocheff.com
Still in search of a Kubernetes development environment I can run on my development machine that somewhat replicates, I was recently introduced to both the multipass and microk8s projects from Canonical. multipass is a prerequisite for microk8s, so let’s start there. With multipass, you can easily launch and run Ubuntu virtual machines with a single command. ❯ multipass launch --name foo Launched: foo With a virtual machine in hand, you can run execute arbitrary commands on the machine us...| sookocheff.com
The ancient Greek poet Archilochus wrote that “the fox knows many things, but the hedgehog knows one big thing.” In social psychology, these terms have been used as a shorthand for describing two cognitive styles: foxes, who are comfortable with nuance, can live with contradictions, and have different strategies for solving different problems, and hedgehogs, who focus on the big picture, reduce every problem to one organizing principle, and solve problems through that singular lens.| sookocheff.com
All healthy technology discussions should begin with business goals and use those goals as a reasonable set of guidelines to focus technology investment decisions. These business goals are best articulated from a deep understanding of what the company, the product team, or the marketing team want to accomplish. In a business-first model, technology is forced to balance the desires for technical effectiveness and efficiency with the operational needs of the business.| sookocheff.com
In creating a development workflow for releasing HTTP+JSON APIs, many teams settle on the API description and documentation standard OpenAPI. A natural conversation that takes place after settling on OpenAPI is whether or not you should develop your API using a “design-first” method or a “code-first” method. I believe that narrowing the discussion to these two extremes overly simplifies the discussion. Instead, I prefer to talk about API development as a continuum of development proce...| sookocheff.com
Spring Data REST combines the features of Spring Data with Spring HATEOAS to make it easy to build hypermedia-driven REST APIs on top of Spring Data repositories. The basic functionality provided out of the box creates and exposes simple REST endpoints for performing CRUD operations on Spring Data repositories. For a lot of use cases, this is entirely enough functionality to meet your needs. In other cases, you need to extend the REST API to include additional functionality that isn’t provi...| sookocheff.com
Microservices have become part of the software engineering cultural zeitgeist to the extent that alternative approaches to architecture and development are treated as somehow inferior. Given the challenges that running microservices present, I usually recommend beginning development of new projects and systems as a single deployable unit — the monolith. Sam Newman, in the book “Building Microservices”, agrees with this approach. He recommends leveraging microservices only if you can bec...| sookocheff.com
When building and running a system deployed as a monolith, we are able to make a certain set of assumptions about the behaviour of the overall application. One of the biggest assumptions we make is that the memory space for the application all resides on the same machine. With this model, function and library calls can assume that their view of the data structures for the application are accurate, and that you can retrieve or mutate that data immediately and deterministically (leaving the tho...| sookocheff.com
In The Cathedral and the Bazaar, Eric Raymond recounts the early years of Linux. Specifically questioning how the “part-time hacking of several thousands of developers scattered all over the planet” could create perhaps the most complex, functioning application in history. How could a “babbling bazaar of differing agendas and approaches” coalesce into a coherent and stable system without some form of centralized planning? The fact that this bazaar style seemed to work, and work well, ...| sookocheff.com
Many organizations have multiple applications that are being built independently as a microservices-based platform. By its nature, a microservice platform is a distributed system running on multiple processes or services, across multiple servers or hosts. Building a successful platform on top of microservices requires integrating these disparate services and systems to produce a unified set of functionality. It is naïve to think that we can only choose one communication style to solve all pr...| sookocheff.com
With so many people running microservice workloads, it is inevitable that organizations keep bumping into the same set of problems: state management, resiliency, event-handling, and more. Dapr exists to help codify the best practices for building microservice applications into building blocks that enable you to build portable applications with the language and framework of your choice. Each building block is completely independent and you can use one, some, or all of them in your application ...| sookocheff.com
In my last post I detailed how to setup a local Kubernetes development cluster using kind. This post shows how to leverage this new cluster when developing a system or application that relies on multiple microservices using tilt. If you haven’t setup your local environment with kind yet, refer back to my last post before continuing on. Installing Tilt You can install the tilt binary using Homebrew or through curl and an installation script:| sookocheff.com
kind is a tool built for running local Kubernetes clusters using Docker containers as nodes. kind was primarily designed for testing Kubernetes itself, but it is actually quite useful for creating a Kubernetes environment for local development, QA, or CI/CD. This blog post shows you how to setup a kind-based environment for local development that can mimic a production Kubernetes environment. A fully functioning environment using kind includes a few different components.| sookocheff.com
It’s a dangerous business, Frodo, going out your door. Kubernetes and public cloud infrastructure introduce a few layers of abstraction between users and our services. This article unravels some of those layers to help understand what, exactly, happens between the time a user makes a request to a Kubernetes service running in AWS and when the user receives a response. It’s helpful to start by framing a request in terms of the network boundaries involved, so let’s start there.| sookocheff.com
VoltDB is an in-memory database borne out of the H-Store research project spearheaded by Michael Stonebraker. Within that project, Michael started with the premise of building a fully transactional database with the best possible performance by using insights gathered from an in-depth study on database performance that completely removed disk access — the primary limiting factor on database performance. By removing disk access completely, we end up with a completely in-memory database where...| sookocheff.com
When working with Spring Boot, some auto-configuration can happen seemingly by magic. For example, in a traditional Spring application with Java-based configuration, you might configure an H2 database using the following block of code to set the type of the database and run some scripts to initialize it: @Bean public DataSource dataSource() { return new EmbeddedDataSourceBuilder() .setType(H2) .addScript("taco_schema.sql") .addScripts("user_data.sql", "ingredient_data.sql") .build(); } With S...| sookocheff.com
I’m a fan of Java. If you haven’t given it a chance in a while, you may not have noticed that, Java has quietly been adopting some of the best practices that make dynamic and functional languages so appealing, without sacrificing the many hundred person-years of effort that have made Java and the JVM a world-class development environment. Java is still one the world’s most popular programming languages with roughly 9 million programmers using Java.| sookocheff.com
Inversion of Control (IoC), also known as Dependency Injection (DI), allows an object to define their dependencies as constructor arguments (strictly speaking, you can set these dependencies as properties, but the examples I will use today are constructor-based). This is the inverse of the object itself controlling the instantiation or location of its dependencies, hence the name Inversion of Control. Let’s look at an example from Stackoverflow using a text editor with a spell checking comp...| sookocheff.com
After recently setting up a new machine and going through the exercise of setting up a development environment for the nth time, I was frustrated by having to install and configure all of my plugins and dependencies to support auto-completion, syntax highlighting, and the other niceties I’ve come to enjoy with Vim. Looking for an alternative, I was drawn to Visual Studio Code (VS Code) with the VSCodeVim extension. Combining Vim key-bindings with Code’s excellent extension marketplace, I ...| sookocheff.com
This post covers some of the major features of OCaml while solving Problem 1 from Project Euler. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. Let’s get started on this problem by looking at the math facilities provided by OCaml.| sookocheff.com
opam — the OCaml Package Manager — is the tool for installing OCaml and any OCaml tools and libraries. This blog post shows us how to set-up opam to install the OCaml compiler and development tools to support your workflow. Working with Windows The OCaml tools are typically well supported on Linux, with macOS ports available of most binaries. If you are on a Windows, the best supported environment is the Windows Subsystem for Linux.| sookocheff.com
I was first introduced to ML through the Coursera Programming Languages course. After the initial learning curve, I was impressed by the power of the type system and the flexibility of pattern matching. I’ve been wanting to resume my education in functional programming, and am picking up OCaml for a personal project I’m working on. Diving into the OCaml ecoystem, I was drawn to Reason, a new syntax for OCaml, and BuckleScript a compiler that integrates OCaml with the JavaScript ecosystem.| sookocheff.com
Engineering, for much of the twentieth century, was mainly about artifacts and inventions. Now, it’s increasingly about complex systems. As the airplane taxis to the gate, you access the Internet and check email with your PDA, linking the communication and transportation systems. At home, you recharge your plug-in hybrid vehicle, linking transportation to the electricity grid. At work, you develop code, commit it to a repository, run test cases, deploy to production, and monitor the result.| sookocheff.com
Before the Internet became a global network connecting millions of devices, it was a simple research experiment connecting a handful of institutions. In the beginning, the number of unique internet addresses could be measured in the tens. As the network expanded that number quickly grew into the hundreds and thousands and it became difficult to remember and type in IP addresses for each of these hosts. To manage the growing number of network hosts, a simple text file, called HOSTS.| sookocheff.com
Leading software companies have discovered that developing capable technology is not enough to guarantee long-term success. To stay relevant, software leaders need to develop and support the repeatable systems necessary to develop and sustain knowledge and expertise. Many organizations have taken inspiration from Spotify’s culture and adopted the concept of a guild or community of practice to connect engineers throughout the organization and steer them towards common goals. As organizations...| sookocheff.com
Complex processes may require collaboration and coordination of many components. We can model such processes using a Design Structure Matrix to represent information flow among the components, and then optimize the process to avoid rework and downtime. As a simplified example, consider a project with only two tasks: “A” and “B”, and a directed graph representing this system where a vertex represents a task and an edge represents the flow of information between tasks.| sookocheff.com
After graduating from university my (future) wife and I travelled and worked in Kenya as part of the Commonwealth of Learning — an intergovernmental agency dedicated to open learning and distance education. As fortune would have it, my brother had an internship in the neighbouring country of Tanzania during the same time period, and we were able to meet for a few days to enjoy the East African coast in the city of Mombasa.| sookocheff.com
To meet the challenges of scaling systems in size, scope, and complexity, it is useful to look at new approaches and theories to analyze, design, deploy, and manage these systems. A Design Structure Matrix (DSM) is an approach that supports the management of complexity by focusing attention on the elements of complex systems and how they relate to each other. DSM‐based techniques have proven to be very valuable in understanding, designing, and optimizing product, organization, and process a...| sookocheff.com
A queueing system can be described as the flow of items through a queue. In a queueing system, items arrive at some rate to the system and join one or more queues inside the system. These items receive some kind of service, and when the work is done, they depart the system. A simple queueing system Little’s Law is a pretty simple model of queueing systems. $$ L=\lambda W $$| sookocheff.com
Python 2 will retire in about one month. Given many organizations continued reliance on it, you may be asking “Now What?” What does this change mean for a company that heavily relies on a deprecated language? Many times, the Python 2 deployed in an organization still generates a lot of value. Yet as this code continues to age, you expose ourselves to potential security vulnerabilities with fewer avenues to address them.| sookocheff.com
Large organizations have a lot of layers. From the C-Suite that is concerned about strategy and vision, to middle management who are executing on projects and programs, down to individual contributors working on project features. These layers provide a number of advantages, all derived from being able to better manage complexity. For example, layers provide a nice separation of concerns: as a software engineer, I don’t have to worry about tax codes and payroll because the finance department...| sookocheff.com
To deliver real-time communication (RTC) from browser to browser requires a lot of technologies that work well together: audio and video processing, application and networking APIs, and additional network protocols that for real-time streaming. The end result is WebRTC — over a dozen different standards for the application protocols and browser APIs that enable real-time communication for the web.| sookocheff.com
There is no one-size-fits-all cellular network used across the world, and trying to understand how cellular technology works across all the different uses cases is difficult, if not impossible, in a short blog post. So, rather than trying to understand every possible standard, this article will focus solely on LTE networks. Fortunately, competing standards and implementations are roughly similar and we can extrapolate any lessons learned about LTE to other cellular networks without much diffi...| sookocheff.com
WiFi, technically specified in the IEEE 802.11 set of standards, is one of the most widely deployed wireless standards in the world. Chance are the device you are using to read this article has is WiFi enabled. WiFi is a straightforward extension of Ethernet, with some slight adaptations for using radio instead of copper wire as the communication channel. Like Ethernet, WiFi has no central process that controls which device is allowed to transmit data at any point in time.| sookocheff.com
Ethernet is a technology developed a Xerox PARC in 1973 and 1974 to support local area networking. It has since been expanded to include a whole family of technologies that support various network architectures and topologies as part of the IEEE 802.3 working group dedicated to supporting networking using physical connections and devices (i.e. not wireless). Ethernet was built with the assumption that all computers on a network use a shared communication channel.| sookocheff.com
All wireless networks (Wi-Fi, Bluetooth, 3G, LTE, etc.) operate using radio signals. Because they operate over the radio, all communication methods have a maximum channel capacity, regardless of technology. This maximum capacity was which is determined by the same underlying principles of information theory developed by Claude Shannon during World War II, known as Shannon-Hartley theorem or Shannon’s Law. Shannon’s Law states that This capacity relationship can be stated as:| sookocheff.com
The User Datagram Protocol (UDP), first described in 1980 by RFC 768, offers a minimal set of functionality: there is no guarantee of message delivery, no guarantee of message order, no congestion avoidance, and no tracking of connection state. In fact, UDP is often referred to as the null protocol, because it offers little functionality not already included in the IP layer.| sookocheff.com
One of the many paradoxes of human creativity is that it seems to benefit from constraints. Although we [perceive] the imagination as requiring total freedom, the reality of the creative process is that it’s often entangled with strict conventions and formal requirements. Pop songs have choruses and refrains; symphonies have four movements; plays have five acts; painters still rely on the tropes of portraiture. Jonah Lehrer Constraints can seem like the last thing you’d want for a creativ...| sookocheff.com
The transmission control protocol (TCP) does one job very well — it creates an abstraction that makes an unreliable channel look like a reliable network. For applications built over an unreliable network like the Internet, TCP is a godsend that hides a lot of the inherent complexity in building networked applications. A laundry list of TCP features that application developers rely on every day includes: retransmission of lost data, in-order data delivery, data integrity, and congestion cont...| sookocheff.com
A WebSocket is a persistent connection between a client and server. WebSockets provide a bidirectional, full-duplex communications channel that operates over HTTP through a single TCP/IP socket connection. At its core, the WebSocket protocol facilitates message passing between a client and server. This article provides an introduction to the WebSocket protocol, including what problem WebSockets solve, and an overview of how WebSockets are described at the protocol level.| sookocheff.com
A few years ago, a company I worked for was suffering from quality problems. We were expanding into new areas, pushing the product in new directions, and releasing new features quickly. As we pushed out new and evolved products, quality declined. Everything came to a head when customers began openly complaining about software quality. Our CTO stepped in with a mandate to solve the quality problem. His approach? The Zero Bug Policy — no-one was allowed to work on new features until the numbe...| sookocheff.com
Note: To make this easier to read (and write), h1 may be used in place of HTTP/1, and h2 may used in place of HTTP/2. HTTP/1 has a long and storied history. Originally developed as a sixty page specification documented in RFC 1945, it was designed to handle text-based pages that leverage hypermedia to connect documents to each other. Typical web pages would kilobytes of data. For example, the first web page was a simple text file with web links to other text documents. Now, the web is made up...| sookocheff.com
Building and running a successful company requires an immense amount of work and talent. It also requires focus. Companies cannot try and solve problems with new and innovative techniques everywhere they operate. It is important to understand the areas your company should innovate in, and outside of that scope, use existing standards and off-the-shelf software as much as possible. There is only so much innovation that a company (or the market) is willing to bear and walking that line is a key...| sookocheff.com
In a microservices architecture, an API gateway can help address a number of challenges: providing a stable endpoint for clients to call, allowing an easy process for releasing new endpoints, or handling SSL termination on behalf of services, to name a few. So how do we decide what features of an API gateway to adopt, and which to leave behind? This article highlights the key functions that an API gateway can provide, suggests the scope of problem that API gateways are well-suited to solve, a...| sookocheff.com
The Research and Development department would appear to give equal weight to both research and development by virtue of naming, yet there are few engineers who would claim that research is a primary responsibility of their job. Between working on product features, planning sprints, fixing bugs, and attending meetings there is little time left for research. But what is the cost of foregoing research in favour of development? In this article, I consider the economic cost of ignoring research an...| sookocheff.com
While microservices have become the defacto architectural pattern for building modern systems, they come with their own set of challenges. Key among them is ensuring application data consistency when data is spread over multiple databases. This article discusses one solution to this problem, distributed sagas. Distributed sagas provide consistency guarantees for systems spanning multiple databases in the face of failure using a clear and manageable implementation pattern. A saga is highly rel...| sookocheff.com
Infrastructure is undergoing a significant paradigm shift. At my first job as a software developer, scaling our infrastructure meant buying a physical machine and installing it in a rack, setting up the system images and base software by hand, configuring the network using some shell scripts, and finally, making it available for developers to install software. Now, with the advent of cloud computing, the same capabilities — installing and running software — are available on-demand.| sookocheff.com
Kubernetes was built to run distributed systems over a cluster of machines. The very nature of distributed systems makes networking a central and necessary component of Kubernetes deployment, and understanding the Kubernetes networking model will allow you to correctly run, monitor and troubleshoot your applications running on Kubernetes. Networking is a vast space with a lot of mature technologies. For people unfamiliar with the landscape, this can be uncomfortable because most people have e...| Kevin Sookocheff
Lambda calculus provides some of the foundational structures that functional programming is built from. It therefore seems fitting to start my journey through functional programming with a thorough examination of lambda calculus. This first post will introduce Lambda calculus with references to the book An Introduction to Functional Programming Through Lambda Calculus. Syntax The complete syntax for Lambda calculus is surprisingly small and comprehensible. This section lists the syntax in its...| Kevin Sookocheff
I’m documenting my journey from functional neophyte to (hopefully) functional programmer by writing a series of blog posts on the topic. So far I’ve covered what functional programming is and why you would want to learn about it. In this post, I’m going to describe the resources I will be using to become functionally fluent. Although I have previously said I’m learning about functional programming, I should be more specific. I do already have some middling experience with Clojure and ...| Kevin Sookocheff
I’m documenting my journey from functional neophyte to (hopefully) functional programmer by writing a series of blog posts on the topic. This is the first post describing what, exactly, the word functional programming means. Functional programming is a programming paradigm that lives alongside other programming paradigms. None of these paradigms have a precise, unanimous definition or standard, and there is not real agreement on which paradigm is better or worse for building particular type...| Kevin Sookocheff
At some point in your career you will be asked to manage a project. This can be intimidating, it can be scary, but it doesn’t have to be. We can leverage some time-honoured techniques, and adapt them to the unique approach required for software projects to deliver on time, on budget, and with success. This article is a collection of techniques I’ve learned for managing projects over time, that attempts to combine agile best practices with project management best practices.| sookocheff.com
When people describe progress, they often describe it in terms of a linear progression taking us from primitive to advanced — an idea or invention occurs as a singular event, and somewhere further down the line of time a new idea or invention completely replaces it, relegating the old to the annals of history. This viewpoint is exemplified by traditional worldviews that organize all beings according to a chain of evolution, sometimes called the “great chain of being” (or scala naturae).| sookocheff.com