False witnesses
Fermat’s little theorem says that if p is a prime and a is not a multiple of p, then ap−1 = 1 (mod p). The contrapositive of Fermat’s little theorem says if ap−1 ≠ 1 (mod p) then either p is not prime or a is a multiple of p. The contrapositive is used to test whether a number is prime. Pick a
Read moreChris’ Corner: Type Stuff!
Let’s do typography stuff! Video: “A live demo by me of early font editors on a real Macintosh Plus” by Mark Simonson Font: “Is this font easy for you to read? Good—that’s the idea.” Hyperlegible is the name of the font, designed for people with low vision. Technique: “Fluid typography
Read moreIntegrating AI agents: Navigating challenges, ensuring security, and driving adoption
Positioned at the intersection of automation, decision intelligence, and data orchestration, AI agents are quickly emerging as essential tools for aligning business outcomes with technical workflows.
Read moreHouston’s long term planning
When I hear American cities criticized for lack of long-term planning, my initial thought is that this is a good thing because the future cannot be predicted or directed very far in advance, and cities should be allowed to grow organically. Houston, in particular, is subject to a lot of
Read moreGardener’s ellipse
There are several ways to define an ellipse. If you want to write software draw an ellipse, it’s most convenient to have a parametric form: This gives an ellipse centered at (h, k), with semi-major axis a, semi-minor axis b, and with the major axis rotated by an angle θ
Read moreFitting a parabola to an ellipse and vice versa
The previous post discussed fitting an ellipse and a parabola to the same data. Both fit well, but the ellipse fit a little better. This will often be the case because an ellipse has one more degree of freedom than a parabola. There is one way to fit a parabola
Read moreThe ellipse hidden inside Pascal’s triangle
The nth row of Pascal’s triangle contains the binomial coefficients C(n, r) for r ranging from 0 to n. If you print out the values of a row for moderately large n the numbers appear to make an arc. Here’s are the numbers in the row for n = 100. You may be read the numbers if
Read moreIntroducing: AI-Assisted Coding Assessments and Interviews
According to recent research from Stack Overflow, 76% of engineers now use AI copilots every day to help them write code, fix bugs, and solve problems faster. But there’s a problem: most technical hiring still evaluates candidates as if those tools don’t exist. Here at CodeSignal, we believe it’s time
Read moreStacking positive and negative cannonballs
Imagine you are a soldier in charge of stacking cannonballs. Your fort has a new commander, a man with OCD who wants the cannonballs stacked in a very particular way. The new commander wants the balls stacked in tetrahedra. The balls on the bottom of the stack are arranged into
Read more