Writing
The blog
Practical writing on architecture, clean code, mobile, and the craft of building software.
The No-Nonsense Guide to Variables and Memory in Rust
Stop drowning in compiler details. This practical guide breaks down exactly when to use let, String, const, and static in Rust based on where you are in your code and what you need to build.
The Zero-Rent Architecture: Designing for the Swartland Farmer
Silicon Valley stacks don't work in the Swartland. Here is how I designed a 'Zero-Rent' architecture using SQLite and Google Drive to build resilient, cloud-free software for a wheat farmer.
How to create a Side-Nav using HTML, CSS and JS
Build a responsive sidebar navigation menu using only HTML, CSS, and a little JavaScript
Building Web Applications from Scratch - Part 1: Introduction to Web Servers with Express
For a new developer, understanding the need for a web server is essential. Initially, you might have created simple static web pages using just HTML, CSS, and JavaScript. Web servers play a crucial role in delivering these static files to users. However, modern web applications often require dynamic content, user interaction, and data processing, which cannot be handled by static pages alone. This is where web servers with dynamic capabilities come into play.
Building Web Applications from Scratch - Part 2: Introduction to Template Engines
A template engine allows you to embed dynamic data inside HTML templates, making it easier to generate web pages dynamically. In this part, we’ll explore how to use a popular template engine called **EJS (Embedded JavaScript Templates)** with Express
AWS API Gateway with a Custom Domain Using AWS CDK
In this blog post, we'll illustrate how CDK can be utilized to provision code for execution within a Lambda function, integrated with API Gateway. We'll then deploy this setup with a custom domain, leveraging Certificate Manager and your chosen DNS registrar, thereby circumventing Route 53 configuration and associated charges.
Deploy a Static Website on S3 with a Custom Domain Using AWS CDK
In this blog post, we'll illustrate how CDK can be utilized to provision a static s3 web site. We'll then deploy this setup with a custom domain, leveraging Certificate Manager and your chosen DNS registrar, thereby circumventing Route 53 configuration and associated charges.
Effortless Page Routing Using HTMX
React can often be excessive for your web application, and there are instances when utilizing only a web server alongside HTMX can produce equivalent results for creating an interactive application.
The Importance of ISO 8601 Date Format
In the world of software development, precision and consistency are paramount. One area where this rings especially true is in handling date and time data. Ambiguity and misinterpretation can lead to software bugs, missed deadlines, and even financial losses. To mitigate these risks, software developers should embrace ISO 8601 as the standard for representing dates and times.
Clean Architecture: Express API
Creating a clearly defined, well-documented, and easily readable API is important for making the API easy to use, reducing errors, improving efficiency, and ensuring scalability over time
Clean Architecture: Unit Testing
Testing is an essential part of Clean Architecture because it helps ensure that the application works as intended and that changes to the codebase do not break existing functionality.
Clean Architecture: Entities and Models
In Clean Architecture, entities are domain objects that encapsulate business logic and represent the core concepts of the problem domain. Entities are not dependent on any specific implementation detail or framework and are typically defined as pure data structures. Entities are independent of the application's use cases and the infrastructure.
Clean Architecture: Data Sources
In Clean Architecture, a data source is a component that provides access to data from external systems such as databases, web services, or file systems. It is responsible for implementing the low-level details of data access, such as opening and closing database connections, executing queries, and handling data serialization and deserialization.
Clean Architecture: Repositories
In Clean Architecture, a repository is an interface that defines a set of methods for accessing and managing data. The repository is responsible for abstracting the data layer from the rest of the application and providing a way to perform data operations without knowing how the data is stored or retrieved
Clean Architecture: Use Cases
In Clean Architecture, a use case is like a mini-program that describes a single task the system has to do. It has all the rules and logic needed to get the task done, and it also says what kind of things it needs to start and finish the task
Clean Architecture: Flutter App
By employing clean architecture, you can design applications with very low coupling and independent of technical implementation details. That way, the application becomes easy to maintain and flexible to change. Clean architecture allows us to create architectural boundaries between dependencies which allows components to be intrinsically testable
React Redux vs Context API
In large applications one of the main decisions that has to be made is what tools to use for application state management. Here compare Redux and Context.
SOLID: Interface Segregation Principle
As your application grows you are tempted to add methods linked to different responsibility to an existing interface. It is better to separate that new method out into its own interface.
SOLID: Liskov Substitution Principle
Most of the time when building systems using OOP, we're looking to use composition over inheritance, however, when the need is there to use inheritance it's advisable that it's done using the LSP. The Goal of this principle is to prevent our old codebase from breaking due when doing inheritance.
SOLID: Open Closed Principle
The Open-Closed Principle (OCP) states that software entities (classes, modules, methods, etc.) should be open for extension, but closed for modification.
SOLID: Dependency Inversion Principle
All programs are composed of functions and data structures and the SOLID principles introduced by Robert C. Martin, help us group our code into modules and advise how to interconnect them.The goal of the SOLID principles is to build software structures like Lego blocks that can be easy to change, understand and swap out.
SOLID: Single Responsibility Principle… simply explained
All programs are composed of functions and data structures and the SOLID principles introduced by Robert C. Martin, help us group our code into modules and advise how to interconnect them.The goal of the SOLID principles is to build software structures like Lego blocks that can be easy to change, understand and swap out.
Code Splitting in React
As an application grows in complexity, files or bundles grow in byte size. Code splitting is the splitting of code into various bundles or components which can then be loaded on demand or in parallel.
Clean Architecture: iOS App
By employing clean architecture, you can design applications with very low coupling and independent of technical implementation details. That way, the application becomes easy to maintain and flexible to change. Clean architecture allows us to create architectural boundaries between dependencies which allows components to be intrinsically testable
How To Install PostgreSQL on Ubuntu 20.04
This illustrates how to quickly install Postgres on Ubuntu 20.04 by installing PostgreSQL and setting up a new user and database
Clean Architecture: Key Concepts
There are key components to any application structure. Here we cover what these components are. The components allow us to organize our code. The application then becomes easy to maintain and flexible to change.
Clean Architecture: Android App
By employing clean architecture, you can design applications with very low coupling and independent of technical implementation details. That way, the application becomes easy to maintain and flexible to change. Clean architecture allows us to create architectural boundaries between dependencies which allows components to be intrinsically testable
Clean Architecture: TypeScript Express API
By employing clean architecture, you can design applications with very low coupling and independent of technical implementation details. That way, the application becomes easy to maintain and flexible to change. Clean architecture allows us to create architectural boundaries between dependencies which allows components to be intrinsically testable
Clean Code Names in TypeScript
Names are everywhere in software. We name our variables, functions, arguments, classes, modules, source files and directories. Because we do so much of it, we’d better do it well
How to Build a React Autocomplete component
Autocomplete or word completion works so that when the writer writes the first letter or letters of a word, the program predicts one or more possible words as choices. If the word he intends to write is included in the list he can select it. What will follow is an attempt to build an autocomplete component only using React and custom React hooks
Maintainable and Scalable CSS
CSS plays a very important role in styling web applications. Best practice instructs us to implement Separation of Concerns (SoC) but is this a practical and scalable way of styling your application
JavaScript Refactoring
After reading and enjoying Martin Fowlers free chapter in his second edition on refactoring. I will attempt to suggest a more functional way of doing the same refactor.
Cleaner Exception Handling in JavaScript
Exceptions are when something exceptional or out of the ordinary happens. Here we suggest a cleaner way of handling exceptions. We do this by implementing a functional programming monad called Either.
TypeScript Interfaces and JavaScript Higher-Order Functions
An interface is a structure that defines the contract in your application. Classes that are derived from an interface must follow the structure provided by their interface. An interface is defined with the keyword interface and it can include properties and method declarations:
Crafting JS Applications with JSDoc and TypeScript
There are mixed feelings about using a dynamically typed language like JavaScript when building larger applications. Im not here to fight for JavaScript over Typescript. I will though illustrate how we can write JavaScript in combination with Typescript to assist us in doing this
BDD, TDD with Jest, React and React Hooks
Both BDD and TDD refer to the methods of software development. Behavior-driven development (BDD) builds on a common understanding of the application using natural language statements.
Clean MVVM with React and React Hooks
When we want to cleanly develop and test out application, we would like to include as much of the graphical user interface. It is essential for us to extract all logic that we intend testing from the view layer. This logic will preferably would need to be refactored to a view model which can be tested and developed in isolation
Login / Logout Flow: SwiftUI and EnvironmentObject
EnvironmentObject is useful when you want to create a dependency in a higher component of the layout tree and use it on a lower component without having to pass it down the tree through every child component.
Login - Logout Flow: Android Jetpack Compose and CompositionLocal
CompositionLocal is useful when you want to create a dependency in a higher node of the layout tree and use it on a lower node without having to pass it down the tree through every child Composable.
Getting Started with TDD: SwiftUI
The TDD (Test Driven Development) approach is important when it comes to testing small portions of business logic code in isolation. In this blog, I’ll cover how I would use TDD to build a clean architecture To-do SwiftUI application.
Getting Started with TDD: Kotlin and Jetpack Compose
The TDD (Test Driven Development) approach is important when it comes to testing small portions of business logic code in isolation.
Clean Architecture: Typescript and React
By employing clean architecture, you can design applications with very low coupling and independent of technical implementation details, such as databases and frameworks. That way, the application becomes easy to maintain and flexible to change. It also becomes intrinsically testable. Here I’ll show how I structure my clean architecture projects. This time we are going to build a React todo application using Typescript.
Clean Architecture in SwiftUI 5.5
By employing clean architecture, you can design applications with very low coupling and independent of technical implementation details, such as databases and frameworks. That way, the application becomes easy to maintain and flexible to change. It also becomes intrinsically testable. Here I’ll show how I structure my clean architecture projects. This time we are going to build an iOS todo application using SwiftUI. We’ll only illustrate one use case of listing todos retrieved from an API.
No posts in this category yet.