Beautiful branchless binary search
I read a blog post by Alex Muscar, “Beautiful Binary Search in D”. It describes a binary search called “Shar’s algorithm”. I’d never heard of it and it’s i…
Posts that commenters keep linking to, ranked by how many different people have cited them in Hacker News comments. 494 posts.
I read a blog post by Alex Muscar, “Beautiful Binary Search in D”. It describes a binary search called “Shar’s algorithm”. I’d never heard of it and it’s i…
A riveting tale of how good data can lead to bad decisions.
Note: These pages make extensive use of the latest XHTML and CSS Standards . They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in…
An image kernel is a small matrix used to apply effects like the ones you might find in Photoshop or Gimp, such as blurring, sharpening, outlining or embossing. They're also used in machine learning for 'feature extraction', a technique for determining the most important portions of an image. In this context the…
What’s the biggest pixel size of a PNG image in the smallest number of bytes? I wanted to try to create an image that could be downloaded but whose pixel buffer would be too big to store in the RAM of a PC. Here is a PNG image of 6,132,534 bytes (5.8 MB) and 225,000 × 225,000 pixels (50.625 gigapixels), which, if…
On my Introduction to A* page I cover the basics of the A* graph search algorithm for finding shortest paths. Here’s an example from the town of Denerim in Dragon Age Origins. Try moving the start and goal to see A* in action:
Inside every AI is a bigger AI, trying to get out
" I think a lot of mathematics is really about how you understand things in your head. […]
Introduction / Warning Link to heading Any traditional introductory statistics course will teach students the definitions of modes, medians and means. But, because introductory courses can’t assume that students have much mathematical maturity, the close relationship between these three summary statistics can’t be…
Developers take garbage collection for granted, but it's hard to see how it works. Watch 5 different GC algorithm visualizations.
Take a look at these two QR codes. Scan them if you like, I promise there's nothing dodgy in them. Left is upper-case HTTPS://EDENT.TEL/ and right is lower-case https://edent.tel/ You can clearly see that the one on the left is a "smaller" QR as it has fewer bits of data in it. Both go to the same URl, the only…
Thoughts on software engineering from Rob Bell
Since spring, and even before that, I have participated in a great collaborative effort on writing a book on Homotopy Type Theory. It is finally finished and ready for public consumption. You can get the book freely at http://homotopytypetheory.org/book/ . Mike Shulman has written about the contents of the book , so I…
You might have heard people say that functional programming is more academic, and real engineering is done in imperative style. I’m going to show you that real engineering is functional, and …
A guest post by Armand Domalewski.
The programming profession is blessed with a number of gifted essayists. Today I will pick on three of my favorites — Eric Raymond, Paul Graham, and Steve Yegge — because they all seem to disagree about why (and whether) mathematics is relevant to the practicing programmer. Their attitudes might be summarized as:
[This post has been cross-posted to Terence Tao’s blog.] When I was around 11 I heard for the first time about Fermat’s Last Theorem. I was immediately captivated by the problem stateme…
Reddit has a bug in their code. This bug is currently present in their production platform, and has been for years. It affects one of the most important algorithms in the entire site, the “Hot” ranking algorithm for link popularity. It has real, demonstrable negative effects. It has been reported to Reddit’s technical…
For overdetermined reasons, I’ve lately found the world an increasingly terrifying and depressing place. It’s gotten harder and harder to concentrate on research, or even popular scienc…
You can just prove things, apparently.
(A play in 4 acts. Please feel free to exit along with the stage character that best represents you. Take intermissions as you see fit. Click on the stage if...
Occasional writings about Haskell.
Anthology of sociology, statistical, or psychological papers discussing the observation that all real-world variables have non-zero correlations and the implications for statistical theory such as ‘null hypothesis testing’.
What is the most rectangular country?
As a guest today in my daughter’s second-grade classroom, full of math-enthusiastic seven-and-eight-year-old girls, I led a mathematical investigation of graph coloring, chromatic numbers, ma…