Archive for January, 2007

Fixing a broken Linksys WRT54G

Monday, January 29th, 2007

A friend of mine recently fried one of his linksys router, a WRT54G (hardware version 2.0), after trying to upgrade the firmware. The box is old, no more warranty and all that. Since I played a bit with eWRT linux on the Linksys a while ago, he thought I might have use for a broken router (maybe as a paper-weight). Turns out the power light was blinking forever, but the routers firmware didn’t come up. I recall having seen some documents on the web on fixing a broken Linksys WRT54G firmware (search for “unbrick wrt54g”; that took me a while to find). Here’s what worked for me using linux. First, download the matching firmware for your router from the linksys website. Then I pressed the reset-button, plugged in the power (holding the reset-button down) and kept holding the reset-button down for about 5-6 seconds, and then started the process below (i.e. I typed all that beforehand, just hitting enter for the put command). The router will be on IP and will accept firmware updates with TFTP. It seems that even is the case without boot_wait being set to on.

ifconfig eth0 down
ifconfig eth0 up
# clear your local firewall rules if you have to!

tftp> mode binary
tftp> rexmt 1
tftp> trace
tftp> timeout 300
tftp> put code.bin

You might have to try several times to get the timing right. You can also check with tcpdump if you get arp-replys/pings back from the router.

Nasty McAfee bug

Saturday, January 20th, 2007

Both Tim and Michelle (XP SP2) have the McAfee firewall and virus-scanner installed on their machines. Both their machines came up with a little dialog-box upon boot up today requesting to please connect the machine to the Internet right now to verify the subscription. Clicking cancel will result in an “are you sure” question and upon confirmation (i.e.: “yes, verify the subscription some other time”) it disabled the firewall and the virus-scanner (the little M-icon in the tray turns black). I didn’t notice it at first. You have got to be kidding me! Just because the software can’t check for newer virus-signatures it shouldn’t be disabling the virus-scanner or the firewall. Especially not the firewall as that probably won’t be have to be kept up-to-date. You can re-enable both by clicking your way through the security center, but I wonder how many machines on the Internet right now are left without protection….

Sequential Sampling and Machine Learning

Monday, January 8th, 2007

In order to estimate an unknown quantity mu a common approach is to design an experiment that results in a random variable Z distributed within the interval [0,1]. The expectation E[Z]=μ can then be estimated by running this experiment independently, averaging the outcomes, and using Monte-Carlo techniques for the estimate. In (Dagum, Karp, Luby and Ross, SIAM Computing,1995) the AA algorithm (“Approximation Algorithm”) is introduced which, given epsilon and delta and independent experiments for the random variable Z, produces an estimate of the mean (or the true expectation) that is within the factor of 1+ε of μ with probability of success of at least 1-δ. Note that there are no distributional assumptions by the algorithm. This has a couple of applications in machine learning, for example in Bayesian Inference, Bayesian Networks and Boosting (Domingo and Watanabe, PAC-KDD, 2000).

The AA algorithm works in three steps. First, the stopping rule computes an initial estimate of the mean. Then, the variance is determined and, in the third step, additional samples are taken to approximate the expectation even further. A small improvement for the stopping rule in step one can be made as follows. The algorithm assumes a non-zero expectation and keeps sampling until the sum of the elements is larger than a constant determined by epsilon and delta (read the paper to see why that works). The problem is that the closer the elements are to zero, the more elements are needed.

Observe that the following holds for the mean:

With that one can improve the stopping rule as follows:

P.S.: To type Greek letters into WordPress use the html named entities such as ε for ε. That took me forever …

Online Dating

Wednesday, January 3rd, 2007

As I’m currently visiting Germany over the winter break, I couldn’t help but notice the advertising for an online dating website here. They spend a lot of money to get this stuff into peoples heads here. I’ve seen some of that stuff advertised in the US (such as and TRUE) so for the hell of it I went and checked out the website. First thing I noticed is that they require you to create an account to see peoples pictures or browse more than a couple of pages in the search results. That, of course, leads to many many stale profiles from people that just want to window-shop and are not really interested in giving it a serious try. To interested parties (i.e. people that pay) this of course might look like there are so many members on the website that it might be worth paying for.

It just helps add to my impression after reading about Bad Experiences with canceling accounts, which gives a not-so-honorable mention to certain US based dating websites. Apparently you can’t just cancel your membership using the website, but have to take a phone-exit interview. Otherwise, your profile will be kept and your credit card will be continue to be charged. It seems that dating websites are forced to keep people active as long as possible (or at least keep up the illusion). The reason for this might be less mean-spirited than one would at first assume. For example, just to have a couple of thousand people in each major city of the US a dating website would have to have roughly 100.000 active members. That is tough to accomplish, esp. given that without the illusion of activity nobody else would join.

With all that said, a friend of mine found his girlfriend through the Denver Personals on Craigslist. It can work.