Haakan's posts
I was all excited about the built-in support for sampling from various distributions in C++11, but it looks like they messed up the implementation for several of the distributions. :-(
For example, sampling for the exponential distribution is done using:
-log(U)/lambda
instead of:
-log(1 - U)/lambda
Those are not the same when U has range [0,1).
For example, sampling for the exponential distribution is done using:
-log(U)/lambda
instead of:
-log(1 - U)/lambda
Those are not the same when U has range [0,1).
Post has attachment
Post has attachment
Argh, the many pitfalls of C++...
Post has attachment
Just "logging" my support for this nice logging library for C++, to which I have made some minor contributions.
Post has attachment
Public
I don't always write test code in C++, but when I do, I prefer the Google C++ Testing Framework. Stay covered, my friends.
Post has attachment
This is not a picture of a street in New York. It is Stockholm Public Library (Stadsbiblioteket):
See here for a Google Maps view of the place: http://goo.gl/maps/rOjH5
See here for a Google Maps view of the place: http://goo.gl/maps/rOjH5
I'm cleaning up some code I wrote as a grad student 8 or 9 years ago, and I ran into a bug in my code that manifested itself in an interesting way. I removed a field from a class and all of a sudden my program started acting differently in a seemingly unrelated place. It turns out that I was keeping pointers to deleted instances of the class I had just modified. When I made the memory footprint of the instances smaller, I apparently increased the likelihood that the memory locations would be reused after the instances were incorrectly deleted. The pointers were never dereferenced, but they were used as keys in maps, which caused problems when the same pointer value was reused for multiple objects. Fun, fun, fun.
Post has attachment
I did "Yasso 800s" yesterday, coming in at or under 3:20 for all ten of the 800s. We will see how good of a predictor it is when I run Pittsburgh Marathon in three weeks. I am planning to do my last long run tomorrow morning (22 miles). I have been extremely lucky with the weather so far, but it looks like it might rain for my run tomorrow. Bummer.
When I ran Pittsburgh Marathon in 2009, I ran with the 3:30 pace group for the entire race, finishing in 3:28:25. I am hoping to run closer to 3:20 this time, but I will probably not run with a pace group for a large part of the race. I am thinking of running the first three miles at an 8 min/mi pace, the next three miles at a 7:40 min/mi pace, and then a 7:28 min/mi pace until the half-way point where I would catch up with the 3:20 pace group. This is of course assuming ideal conditions for the race, and that I don't injure myself or get sick in the coming weeks. All bets are off if it is 90 F on race day!
When I ran Pittsburgh Marathon in 2009, I ran with the 3:30 pace group for the entire race, finishing in 3:28:25. I am hoping to run closer to 3:20 this time, but I will probably not run with a pace group for a large part of the race. I am thinking of running the first three miles at an 8 min/mi pace, the next three miles at a 7:40 min/mi pace, and then a 7:28 min/mi pace until the half-way point where I would catch up with the 3:20 pace group. This is of course assuming ideal conditions for the race, and that I don't injure myself or get sick in the coming weeks. All bets are off if it is 90 F on race day!
Post has attachment
Rewrite or refactor? Refactor!
Post has attachment
Public
+1 for good work-life balance. Nice to hear it from someone in such a prominent position in the Tech industry.
Wait while more posts are being loaded
