More than a Ripple...

Various praise/comments/rants about Troy, RPI, PhDs, Macs, and life in general.

Tuesday, November 18, 2008

Algorithm question...

You are in a mailbox. Space is limited. You decide to reward one of the recipients (with completely fair probability) by attaching a $100 bill to their letter and delivering it personally. There is only enough space in the mailbox to accumulate x letters, where x < n, the number of letters you will receive. How do you choose which letter to which you should attach the money?

Some assumptions:

  • You do not have enough space in the mailbox to retain all n letters and then choose, which would have the desired 1/n probability.
  • You have a pen and some scratch paper and you are able to keep track of the current number of letters up to and including n.


I heard this problem from Sean and Rick. I'll post the answer in a day or so.

Sunday, August 17, 2008

GNUstep on 64-bit Linux - what a pain in the ass!

Oh good lord how much of a pain in the ass this has been. Just trying to get GNUstep on the Linux cluster so I can run my stuff. I decided to do my RPE in Objective-C, which is an (old) language Apple has been pushing for a while. I knew gcc would compile Objective-C code, so I figured why not? MISTAKE! Objective-C is not the problem, having the free Cocoa user-space environment (GNUstep) around it is! It's compiling now for maybe the billionth time. Hopefully it'll finish this time. Then I can post how do it (it's easy - if you find the right web page).

Friday, August 08, 2008

Wow

Well the AFC East just got more exciting now the Favre has joined the Jets. I've been a Pats fan (I'm from RI). But if they're not playing the Pats, I'm going to be rooting for the Jets from now on. Good luck Brett and I hope you tear it up in NY!

Thursday, August 07, 2008

Garbage Collection bites me in the ass (take 2)

OK, so I thought maybe Garbage Collection was going to work out well for me. It did - for a while. When my network size was relatively small (~20 nodes) everything worked great. Crank that up to 50, not so great. 100, and depending on the random network layout, one simulation would take 90 minutes and 2GB of RAM. Not good. I decided to re-write it w/o GC using good old-fashioned retain counts. The good part about this is it gave me an opportunity to play with Instruments, Apple's all-purpose optimizer/bug finder/etc. Leaks is awesome and today I've slowly been taking my memory footprint down from 2GB to 10-20 MB instead - much better - and faster, too! So take the time to learn a little bit about Instruments. You'll be glad you did.

Saturday, August 02, 2008

Body for Life

So, I'm hoping to start the whole Body for Life diet again. Actually, it's not so much a diet as a lifestyle change. Either way, tired of being overweight. It's especially dangerous for type 1 diabetics. So we'll see if this time around maybe it'll last a little better. Maybe this time it will go the distance. I would really like that. Last time what happened? Not sure, but grocery shopping is certainly a pain in the ass... Maybe I'll hit GNC on Sunday, kick this whole thing off on Monday... I don't want to turn this blog into a "omg look how much weight I lost!" blog so I'll have to be careful about that, but otherwise, it probably wouldn't hurt to give an update every once in a while.

Tuesday, July 29, 2008

FCX Clarity

OK, Honda totally blew me away. I didn't even know about this, but apparently Honda has released a fuel cell-based car, the FCX Clarity, in CA. Now it's not a full blown release, and it's only SoCal that gets them, but still, this thing can help with a lot of problems, like dependence on foreign oil, pollution (by products are essentially just H2O), high gas prices, etc. Once I'm out of school and have a job somewhere, totally going to trade my hybrid in for one of these guys. Here's a link for more info:

FCX Clarity

Honda rocks. This should more than make up for the EV1 which GM manufactured and subsequently pulled. If GM keeps fucking up they should go down the shitter just like Ford and Chrysler. Fuck 'em.

Fucking Paterson

OK, so on Tuesday (7/22/08) Gov. Paterson signed a bill passing more video game legislation. Why? We all know it's just going to get shot down as being unconstitutional by the ESA. Every bill like this does. So it's a waste of money and time. And Paterson is really working hard at making me not vote for him, what with his treatment of SUNY and now this. All he had to do was basically implement policies that Spitzer would have. But no, he has to be a pain in my ass...

Monday, July 28, 2008

MacResearch!

OK, I was just scouring the web for any indication of sample code for GRG when I somehow stumbled upon MacResearch.org - a site dedicated to using your Mac for scientific research! How friggin' cool is that?

GRG sample code please!

I don't suppose anyone has any code for the GRG algorithm lying around, huh? That's Generalized Reduced Gradient for the google-impaired. Let me know - I could sure use it. In the meantime, I'll be hunting around netlib.