Page 23 of 28
Senator Leghorn
I was just watching a Daily Show clip featuring Senator Robert Byrd, who just recently surpassed Strom Thurmond as the longest serving senator in history. Aside from his avowed obsession with pork, he is quite the screwball and reminds me a lot of Foghorn Leghorn. Foghorn is, incidentally, named after the character Senator Claghorn.
Mumbai, formerly known as Bombay
Bombay changed it’s name to Mumbai more than 10 years ago yet news stories concerning the city on the Western coast of India usually still reference the name under British rule. Surely this most populous city in the country and one of the largest in the world has enough cachet that we can all recognize it’s name without being prompted by the past. The Indians are already well on their way to being an econmic powerhouse after all and Mumbai is the center of this emerging market.
Installing Sun Java on Ubuntu
I installed Azureus on my Ubuntu machine recently and found it to absolutely peg the CPU when downloading more than a few torrents at once. I know that Bittorrent is a pretty CPU intensive protocol, but I had been running similar numbers of torrents on the same machine using bittornado with much less ado. By default, Ubuntu installs the GCJ Java virtual machine, which is a perfectly serviceable JVM, but I suspected it wasn’t as good as Sun’s own. I’ll shall not decree that Sun’s JVM is better than GCJ, as I didn’t actually run any tests, but Azureus runs faster now that I’m using the Sun machine. Onward.
Overall this is a pretty simple install. First, because of how Sun’s JVM is licensed, you need to manually download it from the Sun site. If you plan on compiling Java code, get the Java Development Kit (JDK); if you don’t write software, you can just get the Java Runtime Environment (JRE). Either way, make sure you get the vanilla package, not the RPM (RedHat package).
Once you have that, you need to install java-package
using apt-get. You will first need to change two lines in your /etc/apt/sources.list
file, adding universe
and multiverse
as is shown below:
deb http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
Open a terminal and type this in, answering “yes” to any questions the program asks:
sudo apt-get install java-package
Now, you just need to make a .deb out of Sun’s Java package that you grabbed. In the same terminal, change to the directory where said package resides and run the following, once again choosing happy answers like ‘y’ and 'yes’ when you are presented with quesions:
chmod +x *.bin; fakeroot make-jpkg *.bin; sudo dpkg -i sun-j2sdk*.deb
Easy as that. To make this the default JVM simply run the following command:
sudo update-java-alternatives --config java
Obfuscated code
I’m doing a project on MD5 collisions for my parallel computing class and, like all cryptography, the code involves a lot of hex numbers (in standard notation, 0xf00d, 0xbeef, etc.) which naturaly makes parts of the code difficult to read. That’s simply the nature of the algorithm. Some programmers (often just mathematicians) insist on making the code even more illedgible with things like this:
while (counter < (1 << 9))
The bigger problem is that when I see something like that I’m confused; I am both impressed by their cleverness (that loops while counter is less than 512) but also annoyed by their needless obfuscation. I guess one could argue that a left shift is more ledgible, because if it were a number larger than 10 or so, people wouldn’t know the significance. Who really knows of the top of their head that 262144 is 2^18? So, in the end, it’s not necessarily just obfuscation but really, most programmers will recognize at least up to 2^10 and those who know the internets should know 2^16 as well.
Random number generators
As I read more about cryptography (I’m currently making my way through the great tome, Applied Cryptography) I’ve been thinking more about random number generators. Whenever you read about cryptography or how they build slot machines (Kevin Mitnick covers this in The Art of Intrusion) there is talk of how bad computer random number generators are, particularly the standard functions that are part of Java, libc or .NET. Even if you take the time to seed them, the pseudo-randomness is of quite low quality. I just found an article on some random number generators you can implement yourself. Cool.
Internet routing from airplanes
News to me: you can use The Internet from planes now; I knew that this was in the works, but I didn’t think it had actually been implemented yet. Apparently Lufthansa (others?) has WiFi planes that communicate with the outside world via satellite links. As is thoroughly explained in this post, the plane connects to a geostationary satellite and has it’s own /24 network. The planes intelligently decide which satellite to use based upon which will produce shorter routing at the ground station and are able to dynamically change this throughout the flight. As the Renesys blogger shows, the planes announce their route changes thus allowing graceful switches amongst the satellites. Cool.
This presentation explains the system that Boeing developed.
Ambulance chains
Ever drive behind an ambulance and notice the chains hanging from the rear axel? I’ve always wondered what those were for and today listening to CarTalk they suggested to a guy who was complaining about being shocked by his car to use a ground strap or chains that would drag on the ground to…ground the car. For ambulances, I would bet that being at ground potential is importand for their instruments (EKG?) or perhaps they just don’t want to shock people. Interesting.
On the BMW M3
I drove a friends auto once and a cop pulled me over and gave me a ticket for improper equipment when he saw it was an auto. -Aldo
If I was going to start wearing skirts, I’d definitely get an auto. -Ron17
del.icio.us spying
I’ve been using del.icio.us for some time now and I absolutely love it. Not only can I access my bookmarks from any machine, it’s easy for me to point people to collections of information that I’ve made and the organization is far superior to any other mothodology. The public-ness of it brings up an interesting vulnerability, that of spying using del.icio.us. Say that you know I write code for some software company and you have been hired to do industrial espionage for a competing firm; you can probably get a good idea of what I’m working on by the links that I grab. Just a thought.
Logical Fallacy of the Day: cum hoc ergo propter hoc
One of the most oft encountered logical fallacies, particularly when quoting the outcome of studies or statistics, is that of confusing correlation of variables with causation; cum hoc ergo propter hoc (latin, with this, therefore, because of this). This fallacy is the root of irrational beliefs, fears and biases in otherwise intelligent and informed people.
This came to light earlier this week in a forum where some people who would generally not be considered bigoted where having a “truthful” discussion about whay they thought of black people. Statistics, such as the rate of black men being incarcerated vs. that for white men, were quoted and the crowd all pointed saying, “See, they’re more likely to go to jail; the stastics don’t lie, they’re just bad people.” This was from a bunch of people who don’t want to be racist, but they found it troubling to agree with the statistics, which are true, agree with their own experiences (bad neighborhoods == black neighborhoods) and yet not see blacks as being inherently predisposed to crime.
The root of their misunderstanding lies in the logical fallacy of assuming that correlation proves causation. The most important thing to realize when reading studies or statistics is that the correlation of two variables does not mean that they are anything but related. I recently read of a study done by the US Army which found that the best predictor of whether or not someone would ever be involved in a motorcycle accident was the number of tattoos they had. Does that mean that tatoos cause motorcycle accidents or cause poeple to be stupid? No. All it means is that people with lots of tattoos tend to have motorcycles and ride them more than those without. Perhaps the root cause is that they’re more inclined to take risk, but quite obviously, tattoos don’t cause motorcycle riders to crash.
To get a better understanding of how to interpret studies, I highly recommend reading Freakonomics by Steven Levitt. His book examines a number of different situations and a huge amount of data using techniques like regression analysis to find the root causes in otherwise random data. For the race problem, it basically boils down to the fact that criminal tendencies are not well correlated with race but rather with low education and low income. Drawing on that, it’s quite easy to understand how blacks are still associated with being criminals and easy to see just how long it is going to take for the remanants of a racist society to be removed from our civilization.