Posts

Hacking the Sudoku solver from The Ruby Programming Language

Image
On only page 18 of Flanagan and Matsumoto's excellent "The Ruby Programming Language" a relatively complex example is presented: a Sudoku puzzle solver. I've had a decades-long interest in maze solvers, and this tied in nicely with that. I resolved to give the code a close look when I'd finished the book. And surprising myself, I soon did. I read it cover-to-cover, frequently even re-reading sections I'd already covered when a lack of mastery of specific material became evident later. The language is a nice alternative to Perl, which had been my scripting language of choice since 1998. Ruby has a lot of cool characteristics, even if it sometimes falls weakness to Perl's desire to appease too much diversity in coding styles. I personally think being able to do things effectively two different ways is inferior to being able to do things as effectively only one, as the latter makes multi-author code easier to follow and coherently maintain. But as usu...

Mount Diablo Time Trial: the numerator problem

Image
Last post I talked about the denominator issue I had with the Diablo hillclimb time trial. There I converted my present weight to my weight when I set my Old La Honda PR late last year and concluded that my time, which would have put me 3rd in my category, was pretty good, and that therefore my numerator was fine: my power was basically on target. But that level of analysis really doesn't stand muster. I have the data available to estimate my power: I just need to run the numbers. I could use Strava's estimated power but that's based on an undocumented model. It's easy enough to download data from Strava myself and run my own calculations. So here I go: Diablo starts at relatively low altitude and the time trial climbs a net of only 520 vertical meters so the air is fairly thick: I assumed 1.15 kg/m³. I know my mass at ride time (59 kg), my bike's mass (approx 5.1 kg), and the mass of stuff on my body (1.5 kg estimated). My tires are Vittoria Chronos pumped...

Mount Diablo Time Trial: the denominator problem

As I was standing at the finish of the Mount Diablo Time Trial , I suddenly remembered that I'd left a pack of Gu in my pocket. Gu was sponsoring the race and there had been a box of peanut butter Gu's at registration. I'd taken one and put it in my back pocket, intending to leave it with the backpack I had stashed at the start line. But I'd forgotten... would have been better to push it under the leg of my bib shorts where I'd be less likely to overlook it. All of this seems like a lot of fuss over a little Gu, but Gu packs are 30 grams each. That's around 0.5 seconds extra climbing time for the course , which consists of the first half of the climb to Diablo summit from the north ( formula for estimating this sort of thing ). Sure, usually 0.5 seconds doesn't matter, but sometimes it does. As it turns out, I ended up 5th in my age group, 1.9 seconds out of 4th, 5.0 seconds out of 3rd. So 0.5 seconds alone didn't make a difference. But people s...

proposed crash rule for Grand Tours

Image
My pick for the bottom step of the Tour podium was Ryder Hesjedal. Unfortunately, I never got a chance to see whether he was up to the task. He crashed on the sixth stage and abandoned before the next stage . For as long as I've followed cycling, crashes in the Tour, Vuelta, and Giro have taken their toll on the general classification. Serious contenders are either taken out of the race outright, or lose so much time they are no longer in a position to contend. Crashing is a part of racing. Bike racing isn't about finding he physiologically superior rider, although physical aptitude a part of success. It's also about strategy, about tactics, and about luck. Luck is a critical component to the interest of cycling. Crashing is just one component of cycling's luck. Bike racing is carried out on real roads, for example, and real roads provide the risk of changes in weather, shifts in the wind, and debris which can lead to punctures. And since real roads aren'...

Tour de France: sprinters

The obvious candidates from the sprinters this year are Cavendish, Sagan, and Greipel. Cav is the lock for the green jersey. Lean, mean, and focused, he's frustrated from falling one point short in the Giro, and is coming into the Tour looking for intermediate sprint points. The green is about consistency in the sprint finishes and reaching intermediate sprints over initial climbs that the gorilla sprinters can't. Cav lost 4 kg before the Tour for this purpose. For raw sprint wins, Cav's at a disadvantage this year. Sky's focused on the yellow, and with Cav's focus on staying light, he's not going to have the brute power a monster like Greipel has, or be conserving strength for the final like Sagan. So I don't expect the usual Cavendish domination this time. Greipel has been a true monster in sprints this year, and I think he's the guy for the big sprints. Sagan was unbeatable in the Tour of California and races following, but he hasn't gone...

Tour de France: final (extended) picks

A few weeks ago I posted Tour de France picks. This is my last chance to update them before the big show rolls in Liege. Here's a good start list if you need to know who the contenders are. First and second I see no reason to change: Wiggins and Evans are the class of the crowd. Last year, Evans was at 34 one of the oldest winners in history. If he were to win this year, he'd be exceeded only by irmin Lambot, who won when he was 36 in 1922 ( Wikipedia ). I think Evans loses a bit this year, while Wiggins finally figured out his preparation, spending solid blocks on Tenerif with focused climbing and time trial work. Wiggins also has superb teammates backing his up in Froome and Rodgers. I had De Gendt third but he's not racing, so Hesjedal gets the promotion. He's not raced since winning the Giro, so he has a good chance of having sufficiently recovered to put in a good effort in France. I had Andy Schleck next, but of course Andy won't be there, so he...

Chris Bucchere manslaughter charges

As virtually everyone knows, in March Chris Bucchere, riding a bike over a Strava segment on which it has been reported he was trying to KOM, rode his bike through an intersection in the Castro district, hitting 71-year-old Sacha Hui. Sacha's head hit the pavement, causing an apparently fatal injury (I'm assuming he didn't happen to die of natural causes on the spot). The reaction has been almost of lynch mob proportions. The local news web sites are full of comments raging against cyclist irresponsibility in general, and specifically for Chris to be held to the highest standard of accountability. The San Francisco Bicycle Coalition, when asked about the case, has emphasized that "pedestrians always have the right of way" (which is flatly incorrect), and stresses the importance of riding safely and responsibly. Indeed, recently Chris was charged with felony manslaughter over the incident. Claimed reasons were reports he had run red lights in intersections...