
Are you afraid to write code? Does the thought linger in your brain that somewhere out there somebody has already done this? Do you find yourself trapped in an analysis cycle where […]
Are you afraid to write code? Does the thought linger in your brain that somewhere out there somebody has already done this? Do you find yourself trapped in an analysis cycle where […]
“Lists are perhaps the fundamental data structure in code. There’s virtually no program that doesn’t use lists. Interviewers love asking questions that involve lists, either intentionally, or just because almost everything uses […]
37. You have no idea what that number is, do you? A number without context nor a label is a random value. It doesn’t tell us anything. Imagine walking by a billboard, […]
Concurrent programming requires synchronization. We can’t have more than one thread accessing data at the same time; otherwise, we end up with a data race. The most common solution is to wrap […]
A staple of compact code, the ternary operator ?: feels like it’s earned a place any programming language. I use it often; you should use it often. However, I don’t like the […]
You’ve baked a fresh batch of gingerbread cookies. A bunch of little men, snowmen, stars, and bells are cooling on some trays. You clean up the table and lay out the colours […]
This is hard to write, or rather, it’s a hard decision to make. After investing many years on Leaf — a programming language, a major life project — I need to take […]
Our favourite hobbies, like baking cookies or painting pictures, take time. Let’s ask a question though, does it take longer to bake one cookie or paint one picture? It’s hard to answer. […]
Variants are data types that can store different types of values in them, as opposed to one fixed type. In contrast to a generic object or an untyped variable, there is a […]
Let’s get into some technical details about how a layout engine works. We assume that we have a tree of elements that comprise the UI. Starting from the root node, we request […]
Images require various sizing modes to fit in a responsive layout. Here we’ll look at the relationship between the element and visual and the basic sizing options. I’ll also look at […]
A box model describes how to measure an element for layout. It defines what size is and how it relates to the content, margin and padding. It may seem trivial, but clear […]
A good UI design must accommodate the various device formats and resolutions that users have. Element placement cannot be absolute, but rather be constrained and expanded by the available space. Layouts […]
Layout determines how children are positioned and sized within their parent element. There are three approaches to placing child elements within a parent: Additive: The children combine to define the size […]