More geeking. John has between 2 and 5 apples. Mary gives him between 3 and 7 apples. How many apples does he have now? If you can understand this simple question, you have the gist interval arithmetic.
I first heard of interval arithmetic while working at Kennedy Space Center; we used it to model pressures and temperatures of liquid oxygen flowing through pipes. There are other applications beyond physical modeling. It is sometimes used in finance to track the rounding error during financial calculation, so people can't steal fractions of cent from each transaction (like they did in Office Space).
I've started a project that provides a Java library for developers wishing to use interval arithmetic for whatever purpose they want: check it out. It's open-source, so anyone is free to download, use, and even modify it. It's still in a very raw state, but I'm hoping to improve it, especially if there is outside interest.
(I'm torn about hosting it on SourceForge; they're the biggest and most widely known repository for projects such as these, but I hate hate hate Unix-y interfaces, huge lists of features that nobody uses, and sparse and inconsistent documentation, and that's what SourceForge seems to be all about. Maybe I'll switch to Google's?)
Monday, September 11, 2006
Tuesday, September 05, 2006
Geek alert. Flying back from the states, I came across a contest called "Crossing Capitals" in the back of Games Magazine. The object is to take the 50 US state capitals, plus all of the Canadian capitals, and fit as many as possible into a 19 by 19 grid, crossword puzzle style. This is a regular sort of contest they do, called a "stuffer" contest.
This sounded like a fun thing to write a program to solve, so I set to the task, and was soon generating some pretty good results. I started running it overnight at home, and pretty much constantly at work -- I'd estimate a good eight weeks of total computing time. I'm not sure how many million combinations were tried, but it was a lot. I also did a lot of fine tuning of the algorithm.
The deadline is now passed -- here are the results of the effort:
That's thirty-four capitals. The tie breaker is the total count of letters used; my total is 243.
Unfortunately, I found a forum for people who do this sort of thing all the time, and it looks like at least three people managed to fit in 35 capitals. At least one did it by hand, too, without computer help! I would have thought that everyone in contention to win would have done it by program -- interesting that brains and computers are so evenly matched.
This sounded like a fun thing to write a program to solve, so I set to the task, and was soon generating some pretty good results. I started running it overnight at home, and pretty much constantly at work -- I'd estimate a good eight weeks of total computing time. I'm not sure how many million combinations were tried, but it was a lot. I also did a lot of fine tuning of the algorithm.
The deadline is now passed -- here are the results of the effort:
M | O | N | T | P | E | L | I | E | R | C | O | N | C | O | R | D | ||
C | A | E | ||||||||||||||||
O | L | Y | M | P | I | A | H | A | L | I | F | A | X | S | ||||
L | T | E | B | M | ||||||||||||||
U | T | R | E | N | T | O | N | I | T | O | R | O | N | T | O | |||
M | P | G | I | I | ||||||||||||||
B | P | I | E | R | R | E | C | H | A | R | L | E | S | T | O | N | ||
I | Q | K | H | T | A | E | E | |||||||||||
A | L | B | A | N | Y | A | A | L | N | S | ||||||||
L | A | R | A | U | S | T | I | N | ||||||||||
C | O | L | U | M | B | U | S | L | N | I | B | |||||||
H | I | G | B | O | S | T | O | N | I | |||||||||
E | S | T | P | A | U | L | T | A | G | S | S | |||||||
Y | A | S | T | R | T | M | ||||||||||||
E | N | S | T | D | E | N | V | E | R | J | A | |||||||
N | T | A | A | T | G | D | O | V | E | R | ||||||||
N | A | L | P | H | O | E | N | I | X | H | C | |||||||
E | F | E | W | N | N | K | ||||||||||||
E | D | M | O | N | T | O | N | M | A | D | I | S | O | N |
That's thirty-four capitals. The tie breaker is the total count of letters used; my total is 243.
Unfortunately, I found a forum for people who do this sort of thing all the time, and it looks like at least three people managed to fit in 35 capitals. At least one did it by hand, too, without computer help! I would have thought that everyone in contention to win would have done it by program -- interesting that brains and computers are so evenly matched.
Monday, September 04, 2006
Steve Irwin died today. The news raced around Australia like wildfire -- I heard it almost simultaneously from about four different directions. Quite sad, I think. He may not have been the best role model for kids, but he was the real deal. Did you know that all the profits from his movie went to environmental causes?
No one's too surprised that he went out like this, except maybe those who were expecting it to be a croc. And yet, somehow, it's hard to imagine him dead.
No one's too surprised that he went out like this, except maybe those who were expecting it to be a croc. And yet, somehow, it's hard to imagine him dead.
Sunday, September 03, 2006
Fun yesterday as I played golf for the first time in four years, at Yarra Bend. I was predictably terrible (shot 108, I think) but it was the soccer team's annual golf outing, and the weather was great, so it was good fun. Tons of wildlife on the course, most notably the colony of giant fruit bats, but also a lot of eastern rosellas, noisy miners, rainbow lorikeets, and a flock of some sort of black cockatoos.
Then last night we caught the Melbourne Victory beating Sydney in front of the biggest crowd in Australian club soccer history -- nearly 40,000. I'm sure it was the biggest crowd that a lot of the players have ever played in front of as well. Great game and a fun atmosphere.
Then last night we caught the Melbourne Victory beating Sydney in front of the biggest crowd in Australian club soccer history -- nearly 40,000. I'm sure it was the biggest crowd that a lot of the players have ever played in front of as well. Great game and a fun atmosphere.
Monday, August 28, 2006
Not much new to report. Spring is slowly arriving, though, which has made us delay our search for a new neighborhood -- Albert Park is too too nice when it's warm.
Two restaurants plugs:
Santiago -- great tapas, great wine, great atmosphere. Reminded us very much of Spain.
Tandoori Times -- maybe the best chicken vindaloo I've had.
A few weeks back we saw the Picasso exhibit at the NGV. We're both fans, but Picasso's ability to excel at every medium can really piss you off. Like, ooh, I'm so freaking talented. Bastard.
Next week I'm claiming my birthday present -- we're going to the Melbourne Victory match against Sydney.
Two restaurants plugs:
A few weeks back we saw the Picasso exhibit at the NGV. We're both fans, but Picasso's ability to excel at every medium can really piss you off. Like, ooh, I'm so freaking talented. Bastard.
Next week I'm claiming my birthday present -- we're going to the Melbourne Victory match against Sydney.
Brushes with celebrity. For no good reason, here are the famous peeps I've peeped, not counting actual shows, lectures, readings, etc.:
Elvis Costello: Met him after shows a few times. Also sat behind him at a Ron Sexsmith show where he didn't perform, so it counts.
Michael McKean (Lenny of Lenny and Squiggy fame): Sat two rows behind him at an Elvis Costello concert.
Henry Rollins: Saw him in a Starbucks in London. Henry Rollins in a Starbucks.
Gurmit Singh at our grocery store in S'pore.
Molly Meldrum at a footy game. Well, they tell me he's famous.
Shaq, at a nightclub in Orlando. A head taller than everyone else, he was hard to miss.
Horace Grant, at the same club. Shook his hand.
Ted Kennedy: Spooked him in an airport when I suddenly reached into my bag for my ticket just as I recognized him. His bodyguards got him out of there fast!
Michael Stipe, on a street corner in Athens, listening to (what I'm guessing was) a backing track through headphones, and mouthing words over it.
Mike Mills, in a bar in Atlanta. Also saw him driving down the road once.
I'm sure I'll think of some others...
I'm sure I'll think of some others...
Friday, August 18, 2006
Comeuppance. Right after my IQ test, I walked out into the street feeling pretty smart, and immediately almost got run over by a guy on bicycle. I was looking for the tram coming the other direction. "Watch where you're going, dickhead!" he said. I needed that.
"Dickhead", btw, seems to be used down here where we'd say "dumbass" in the States.
Off to see Augie March tonight.
"Dickhead", btw, seems to be used down here where we'd say "dumbass" in the States.
Off to see Augie March tonight.
Tuesday, August 08, 2006
Guinea piggery. One of Marjorie's cow orkers who's working on a psych degree gave me an IQ test this evening, and boy is my brain tired. This was the face-to-face interactive test (not an online mouse-clicky thing) and is a lot more full-on than you might expect. There were 14 tests, and most seemed to start out easy, and ended with you feeling stupid. Here's a run-down of the sections, and a representative question from each:
Information - "Who was Mahatma Ghandi?"
Comprehension - "Why is it necessary for the government to collect taxes?"
Arithmetic - "An item is on sale for one third off the original price. Its sale price is $400. What is the original price?"
Similarities/Differences - "In what way are a friend and an enemy alike?"
Vocabulary - "Define 'tangible'."
Digit span - "Repeat these digits backwards: 4,3,6,2,8."
Letter-Number Sequencing - "Given this sequence, tell me the digits in order, followed by the letters in order: 5,K,2,P,1,J,9,Q."
Performance - "What's missing from this picture?" (A typical picture: two people running along the beach, one leaving no footprints.)
Digit Symbol - Coding - Each digit had a code, and I had to draw the code for a sequence of numbers.
Block Design - "Which picture completes the block?"
Matrix Reasoning - "Which picture completes the sequence?"
Picture Arrangement - "These cards each have a picture on them. Arrange them so the scene makes a logical story."
Symbol Search - "Circle 'Yes' if one of the two symbols on the left appears in the list of five symbols on the right, 'No' otherwise."
Object Assembly - "Arrange these puzzle pieces into a coherent picture."
This after a long day of programming. But it was interesting. I get the results in a week or two.
Matrix Reasoning - "Which picture completes the sequence?"
Picture Arrangement - "These cards each have a picture on them. Arrange them so the scene makes a logical story."
Symbol Search - "Circle 'Yes' if one of the two symbols on the left appears in the list of five symbols on the right, 'No' otherwise."
Object Assembly - "Arrange these puzzle pieces into a coherent picture."
This after a long day of programming. But it was interesting. I get the results in a week or two.
Sunday, August 06, 2006
For the record, I just had my second visual migraine. Woo hoo.
There's a ping pong tournament going on at work, and I'm all bitter because I had planned on at least making it to the quarter finals (where I would have had to play a guy that used to be ranked sixth in Australia) and instead I went out in the second round. I was winning the first game 16-7, then just kind of froze up and started trying not to hit the ball into the net, which of course always results in hitting the ball into the net. To the other guy's credit, he took me off my game. Nuts. I blew $10 on a quality new paddle too.
But soccer's going good; my fitness is back and my hip has seemingly made a full recovery. There are hints here and there that the weather is warming up. Fish are jumping. The cotton is high.
There's a ping pong tournament going on at work, and I'm all bitter because I had planned on at least making it to the quarter finals (where I would have had to play a guy that used to be ranked sixth in Australia) and instead I went out in the second round. I was winning the first game 16-7, then just kind of froze up and started trying not to hit the ball into the net, which of course always results in hitting the ball into the net. To the other guy's credit, he took me off my game. Nuts. I blew $10 on a quality new paddle too.
But soccer's going good; my fitness is back and my hip has seemingly made a full recovery. There are hints here and there that the weather is warming up. Fish are jumping. The cotton is high.
Thursday, July 27, 2006
Hmmm, that's odd... Eight minutes ago, I started experiencing my first visual migraine. Luckily, my brother had one a little while back, so I know what's going on. It started as a little blind spot, that was making it hard to see the letter on the screen that I was looking at. It has since grown and moved off to the left. It's now like if I were looking out a window where someone had frozen the letter "C" onto the glass, causing a rainbow diffraction effect, except that the ice is also shimmering. It should end within the half hour, by all reports, and I might get a slight headache after. Very strange, and it would be scaring the tar out of me right now (think: stroke) if I didn't know what it was.
Update: It passed as predicted, in about a half an hour. I got the slightest of headaches afterwards, which is also typical. I found this Flash animation that gives a very good depiction of what it was like (except that the distortion was more of a "C" shape for me).
Update: It passed as predicted, in about a half an hour. I got the slightest of headaches afterwards, which is also typical. I found this Flash animation that gives a very good depiction of what it was like (except that the distortion was more of a "C" shape for me).
Wednesday, July 26, 2006
I knew I could do it. A year or so ago I quit biting my nails, thanks to a product marketed under the great name of Stop That (in America, I think it's called Bittrex). Stop That is a highly bitter substance you put on your nails for a little instant negative feedback whenever you put them in your mouth.
The problem was, I still had the tendency to pick at my nails with my other nails (or even a nail clipper), quite incessantly. I wasn't biting, but my fingers still didn't look too good. I tried all sorts of tricks to stop that, without much luck.
In the last three days, though, I've quit the picking. How? With a little product called Stop That. I just applied it to one nail, and whenever I caught myself picking at my nails, I made myself take a lick. Gross, but effective. I had to reapply several times at the start. But now, after three days, I pick no more.
The problem was, I still had the tendency to pick at my nails with my other nails (or even a nail clipper), quite incessantly. I wasn't biting, but my fingers still didn't look too good. I tried all sorts of tricks to stop that, without much luck.
In the last three days, though, I've quit the picking. How? With a little product called Stop That. I just applied it to one nail, and whenever I caught myself picking at my nails, I made myself take a lick. Gross, but effective. I had to reapply several times at the start. But now, after three days, I pick no more.
Friday, July 21, 2006
The Chagall print we got is Lovers in the Red Sky. Marjorie loves Chagall and goats, so it was a good choice for her, and me -- well, boobies.
It actually came mounted wrong -- with the goat at the bottom and the houses on the left. We're trying to decide whether to leave it as it is or fix it.
It actually came mounted wrong -- with the goat at the bottom and the houses on the left. We're trying to decide whether to leave it as it is or fix it.
Wednesday, July 19, 2006
Mostly as an exercise in Google Maps, Javascript, CSS, and web hosting, I've started a page of weekly pub trivia nights here in Melbourne. Check it out, but please remember, this is not an exercise in graphic design (which I have no real flair for).
Birthday was nice, actually, and not at all angsty like you might expect. On Saturday we went shopping for art (my birthday present request; we have a lot of bare walls in our house). I didn't find any winners but Marjorie picked out a nice Franz Marc Chagall print that goes great in our living room. At night we went out for Cambodian food, which was only just okay, but the neighborhood itself was a great find that made it worth the visit. We've added Yarraville to our list of neighborhoods to consider moving to. Sunday, my actual birthday, featured soccer followed by a massage, followed by pizza.
And instead of a mid-life crisis little red convertible, we rented a Hyundai Getz.
And instead of a mid-life crisis little red convertible, we rented a Hyundai Getz.
Saturday, July 15, 2006
You are cast into the world naked, screaming. You learn, you grow. Trends come and go and come again. People move into and out of and into your lives. You get wiser, but at the price of a body that heals. The world gets more accessible, more polluted, more chaotic -- more fascinating. But did the world change, or you?. Then one day you wake up and you're... 40?
Saturday, July 08, 2006
The web's biggest trend of the last year or two is surely video clips, AKA viral videos. They seem to come in just a few varieties:
- Short funny clips from comedy shows, especially The Daily Show.
- Stupid stunts.
- Crazy nature vids.
- The video editor with too much time on his hands.
- People acting goofy in their dorm rooms.
And my favorite, - Musical virtuosity. Check out these examples. As a frustrated musician, these pain me a little bit.
Sunday, July 02, 2006
Il gioco ugly. People aren't very happy with the Italian team down here, myself included, thanks to last week's now infamous incident (if you missed it, see the video here). Italy's the butt of jokes continent-wide, and will be for a long time to come. The emails are flying -- there's this and this and (warning: may offend) this.
Today at soccer, a guy I was covering took a dive in the box, and later admitted it to me sheepishly. "So, are you Italian?" I asked. He laughed.
Today at soccer, a guy I was covering took a dive in the box, and later admitted it to me sheepishly. "So, are you Italian?" I asked. He laughed.
Monday, June 26, 2006
Friday, June 23, 2006
Long night's journey into day.
Thursday
7:00 pm: Soccer practice.
7:30 pm: I quit because my hip is sore. Full recovery will take longer than I had hoped.
9:00 pm: Begin getting ready for bed. Set the alarm for 1:50 am, since USA/Ghana game will be on at 2:00 am.
9:23 pm: Circuit breaker trips, as it is wont to do. We can't run the dryer at the same time as the bedroom heater. I reset the alarm for 1:50, and the time to 9:23.
5:00 am: I wake with a start, and quickly realize that I should have set the clock to 21:23, not 9:23. Nuts. I've been waiting four years to watch Team USA in the cup, and now I've slept through the critical game.
5:02 am: Learn from the internet that the USA lost. Groooaaaannn... Sleeping through it was a mercy.
5:04 am: Switch on the TV, and Australia is already losing 1-0, after the second minute. Groan again...
5:38 am: Australia equalizes! Justified penalty. Australia seems to be dominating.
5:45 am: Halftime. I jump in the shower and quickly ready myself for work.
6:11 am: Croatia goes ahead 2-1, on the softest goal I've seen in the WC so far. This was our replacement keeper, who coach Guus decided to start that day, for some reason. I hate and feel for him.
6:12 am: We only need a tie to advance. For some reason, I just know we're going to do it. So I run down to the tram stop to head down to Federation Square for the action.
6:15 am: Come on, you stupid tram...
6:30 am: Arrive at Federation Square. The cops are preventing any more people from getting in, but you can see the screen from the street. On top of a small set of stairs there are two policemen on horses; squeezing behind them are two guys angling for a better view, essentially standing in a pile of horse dung.
6:34 am: Kewell equalizes! Much jumping and screaming. I timed my run perfectly, as they say.
6:45 am: The barriers come down. We all run up as far as we can go. You'd think it's Texas Hold'em night the way cards are flying on the field.
6:47 am: Game over. Jubilation! People are chanting, singing, lighting flares.
6:50 am-7:30 am: Victory celebration. Fans take over Melbourne's busiest intersection at the corner of Flinders and Swanston. Cops on horses try to move them off, but they keep filling in behind. The trams start to pile up. Fans are singing: AuzZAY! Auzzay Auzzay Auzzaaaay! Auzzaaaaay, Auzzaaaay! Somebody climbs up on a tram, dancing. After fifteen minutes, Guy with a drum starts leading people up the street, in what is now apparently a new tradition (which happened spontaneously after the last match): the victory march to the Parliament building. Sights along the way: People slamming their hands on the windows and doors of the backed-up trams. Somebody climbed atop a phone booth to dance. At the Nike store, there is a window display of Socceroos jerseys; a line of guys got down on their knees and did we-are-not-worthy bows. Fans surround a Chinese guy sweeping the walk in front of his store -- and he starts dancing with them. Somebody climbed on top of a truck and danced as it rolled down the street.
On arriving at the Parliament house, the crowd is already singing "Waltzing Matilda". I hang around for a half hour or so just to soak it all in, and burn off some more of the disappointment at the USA loss. I decide it's time for work.
On the walk to work I decide my traditional American breakfast won't cut it, so I stop for a meat pie.
Thursday
7:00 pm: Soccer practice.
7:30 pm: I quit because my hip is sore. Full recovery will take longer than I had hoped.
9:00 pm: Begin getting ready for bed. Set the alarm for 1:50 am, since USA/Ghana game will be on at 2:00 am.
9:23 pm: Circuit breaker trips, as it is wont to do. We can't run the dryer at the same time as the bedroom heater. I reset the alarm for 1:50, and the time to 9:23.
5:00 am: I wake with a start, and quickly realize that I should have set the clock to 21:23, not 9:23. Nuts. I've been waiting four years to watch Team USA in the cup, and now I've slept through the critical game.
5:02 am: Learn from the internet that the USA lost. Groooaaaannn... Sleeping through it was a mercy.
5:04 am: Switch on the TV, and Australia is already losing 1-0, after the second minute. Groan again...
5:38 am: Australia equalizes! Justified penalty. Australia seems to be dominating.
5:45 am: Halftime. I jump in the shower and quickly ready myself for work.
6:11 am: Croatia goes ahead 2-1, on the softest goal I've seen in the WC so far. This was our replacement keeper, who coach Guus decided to start that day, for some reason. I hate and feel for him.
6:12 am: We only need a tie to advance. For some reason, I just know we're going to do it. So I run down to the tram stop to head down to Federation Square for the action.
6:15 am: Come on, you stupid tram...
6:30 am: Arrive at Federation Square. The cops are preventing any more people from getting in, but you can see the screen from the street. On top of a small set of stairs there are two policemen on horses; squeezing behind them are two guys angling for a better view, essentially standing in a pile of horse dung.
6:34 am: Kewell equalizes! Much jumping and screaming. I timed my run perfectly, as they say.
6:45 am: The barriers come down. We all run up as far as we can go. You'd think it's Texas Hold'em night the way cards are flying on the field.
6:47 am: Game over. Jubilation! People are chanting, singing, lighting flares.
6:50 am-7:30 am: Victory celebration. Fans take over Melbourne's busiest intersection at the corner of Flinders and Swanston. Cops on horses try to move them off, but they keep filling in behind. The trams start to pile up. Fans are singing: AuzZAY! Auzzay Auzzay Auzzaaaay! Auzzaaaaay, Auzzaaaay! Somebody climbs up on a tram, dancing. After fifteen minutes, Guy with a drum starts leading people up the street, in what is now apparently a new tradition (which happened spontaneously after the last match): the victory march to the Parliament building. Sights along the way: People slamming their hands on the windows and doors of the backed-up trams. Somebody climbed atop a phone booth to dance. At the Nike store, there is a window display of Socceroos jerseys; a line of guys got down on their knees and did we-are-not-worthy bows. Fans surround a Chinese guy sweeping the walk in front of his store -- and he starts dancing with them. Somebody climbed on top of a truck and danced as it rolled down the street.
On arriving at the Parliament house, the crowd is already singing "Waltzing Matilda". I hang around for a half hour or so just to soak it all in, and burn off some more of the disappointment at the USA loss. I decide it's time for work.
On the walk to work I decide my traditional American breakfast won't cut it, so I stop for a meat pie.
Monday, June 19, 2006
Speaking of.
As I mentioned before, I'm back! Following yesterday's return to action, boring match reports are back over on The Dull Blog.
Speaking of soccer, after a little too much jocularity at the wine tasting, it was all I could do to make it to the living room for the Australia game last night, let alone downtown. It was a good match, a respectable match, but a disappointing result for the Aussies.
Speaking of international flavors, over the weekend we went rented a car and went up to Footscray to have Ethiopian food. Very yum.
Speaking of tasty news, The Comedy Channel is going to start showing The Daily Show at 9:30 nightly, instead of the once-a-week Daily Show Global Edition on CNN at god-forsaken o'clock in the morning. Now there's no reason to leave Australia. Well, at least once we convince our families to move down here en masse.
And speaking of family, Happy Father's Day, Dad!
Subscribe to:
Posts (Atom)