Every once in a while a programmer runs into a bug worth sharing.
Our team had one of those today. Students were unable to use Design Mode in App Lab, but the issue only happened on Chrome, and only if the user had installed a browser extension that injects an external stylesheet into the page.
The problem was caused by a bad interaction between an unadvertised security fix in Chrome 64 and some old feature-detection code in our site meant to work around an issue with Internet Explorer 9. We had at least six members of our team investigating at one point.
Live and learn. We released a fix today in v2018-03-07.2. I’ve posted a more technical writeup on StackOverflow where it may be helpful to others in the future.
Twenty golfers wish to play in foursomes for 5 days. Is it possible for each golfer to play no more than once with any other golfer?
Find out for yourself.
This is known in mathematics as the Social Golfer Problem. Over Thanksgiving 2017, my dad posed a very similar problem: 28 students in discussion groups of size 4, rotated five times so that no two students are grouped together twice – with additional constraints restricting certain students from ever being grouped together. Puzzling over the problem together led us into the world of combinatorics.
It turns out the Social Golfer Problem (and the closely related Kirkman’s Schoolgirl Problem) are solved, but full generalizations of them are hard – even for computers. I went looking for an existing solution and couldn’t find one I was happy with. Dad assured me that it didn’t need to be perfect, just good enough for a teacher trying to organize a group. So I built my own:
Good-Enough Golfers is a near-solver for this class of scheduling problems. It attempts to schedule g x p players into g groups of size p for w weeks such that players meet a minimum number of times. Real solutions to this problem can be extremely slow, but GEG’s approximations are fast and often good enough for real-world purposes.
It’s also free and open-source.
I just concluded another full year with all of my work public on GitHub. 2017 was my eleventh full year as a software professional, and my third year at Code.org.
Continue reading “My work in 2017”