Chris’ Corner: Variations on What Not to Do
I think the nail is in coffin now: you should never design something for the web with only one (or even a narrow set) of particular viewport sizes in mind. It’s just so darn tempting to think that way. You have a couple of pretty specific screen sizes in front
Read moreHow you define center matters a lot
Earlier I wrote a post showing what happens when you start with an equilateral triangle, then repeatedly subdivide it into smaller and smaller triangles by drawing lines from the centroid (barycenter) to each of the vertices. I mentioned in that post that I moved the code for finding the center
Read moreBelt around an elliptical waist
I just saw a tweet from Dave Richeson saying I remember as a kid calculating the size difference (diameter) of a belt between each hole. Now I think about it every time I wear a belt. Holes 1 inch apart change the diameter by about one-third of an inch (1/π).
Read moreRecursive triangle subdivision
The other day I saw where Cliff Pickover tweeted some images of triangles recursively subdivided by adding a point to the barycenter of each triangle. The images were not what I expected, so I wanted to reproduce the images to look into this further. Here are the first three steps:
Read moreSwiftUI Layout — Cracking the Size Code
SwiftUI Layout — Cracking the Size CodePhoto by Deon Black on UnsplashIn the “SwiftUI Layout — The Mystery of Size,” we explained numerous sizing concepts involved in the SwiftUI layout process. In this article, we will further deepen our understanding of the SwiftUI layout mechanism by imitating the view modifiers frame and fixedSize, and demonstrate some
Read moreI am the new editor of Better Programming
As Anupam already announced, I will be taking over as editor of Better Programming as of Monday, September 11.I wanted to share a few words on who I am, and how this came about.Who am I?I have been a software engineer for the past 8–9 years, but I have always had a
Read moreGoal-driven code
Goal-Driven CodePhoto by Emile Perron on UnsplashSummary: Not all coding is sequential. For non-specialists, the programming language is often a barrier. Whand is a simplified declarative language intended to control external devices as a function of events and the passage of time.A Whand script essentially describes the desired result, unlike sequential languages
Read moreJustifiable sample size
One of the most common things a statistician is asked to do is compute a sample. There are well known formulas for this, so why isn’t calculating a sample size trivial? As with most things in statistics, plugging numbers into a formula is not the hard part. The hard part
Read moreGenerative AI Mindset
Figure 1. Large language models seem to have infinite knowledge. How should we work with them? Photo by Susan Q Yin on Unsplash.I learned three critical lessons using large language models (LLMs) during the summer of the generative AI hype. These lessons should be valuable for years to come.1. “Prompting” means
Read moreComputers are learning to decode the language of our minds
A series of amazing breakthroughs are allowing paralyzed people to speak and emote. With each passing month, we get closer to a brain-computer interface that might unlock some of the deepest mysteries of our grey matter.
Read more