Essential articles for midterm intellectual relief

Blood, Sweat and Tears: Asia’s Poor Build US Bases in Iraq

Still Separate, Still Unequal: America’s Educational Apartheid

Also, got the flyers made up for the screening of American Jobs I’ll be showing at NYU next Tuesday. Hopefully we’ll have a nice debate about outsourcing afterwards. (God knows we need one.)

Can’t wait to finish work so I can go home and watch the latest Bill Maher, which SageTV has graciously recorded for me.

Got bored with Descartes and Spinoza, wrote a patch to powernowd

While I was studying, I noticed that I wasn’t exactly happy with the cooling/cpu frequency scaling on my laptop. I use a nice program called powernowd which scales my CPU speed up and down depending on various factors related to system load. But I didn’t like how my setup was kind of “all or nothing.” When I am plugged into AC, I switch to “performance” mode which just runs me at 100% CPU frequency all the time (making my laptop hot, my fan noisy, but my machine fast), whereas when I’m unplugged I switch to “userspace” mode, which lets powernowd kick in, and he jumps about from 400mhz to the full 1.6Ghz based on load, keeping the machine cool but also making it feel a bit sluggish since if I’m overloading my CPU at 400mhz it’s already “too late” to pump it up, it will have already felt slow for at least an instant.

So I have this conflict: hot and responsive, or cool and sluggish. I thought, well, I must be able to come to a compromise.

I decided to take a look at powernowd’s code, and it turns out it’s written quite straightforwardly. Within 30 minutes of tinkering, I had a patch that did what I wanted. With another 30 minutes, I polished it and made it quite commitable.

Basically, I added a new mode called “COOLING” to powernowd, which runs your CPU a few notches below your full frequency (which I call your “cool_spot”), based on the following approach:

  • if you have two frequencies available, you normally run with the lowest.
  • if you have three frequencies available, you normally run with the second from highest.
  • if you have four frequencies available, you normally run with the third from highest.
  • if you have five or more frequencies available, you normally run with the fourth from highest.
  • if your load goes above your specified trigger (“highwater” in the code), you jump to highest frequency. When it lowers (“lowwater”), you go down to your cool_spot, but not below it.

On my machine, I have 5 frequencies (1.6Ghz, 1.5Ghz, 1.4Ghz, 1.2Ghz, and 400Mhz), and so I normally am running at 1.2Ghz. This new COOLING mode runs while I’m plugged in, and keeps my machine nice and cool but still lets it immediately respond when I want to do something, like a workspace switch.

I then hacked the init.d script to have a BATTERY and AC mode, and switch between AGGRESSIVE and COOLING modes accordingly. Now, when I’m unplugged, I get the best battery life and pretty good performance, and when I’m plugged in I get a cool notebook with good performance.

I’ll probably post the patch after my midterms…

Police officers are disgusting

still cap from beating videoFor some of the most disturbing footage you’ve seen in awhile, you can download this clip of New Orleans police officers brutally attacking a 64-year-old black man (the race is important) in New Orleans.

Here is a little piece of a Miami Herald article that describes the clip.

For those who missed it, here’s the scene: It is Saturday night in the fabled French Quarter. Police are arresting one Robert Davis, a 64-year-old former schoolteacher.

As an Associated Press camera records the episode, an officer on horseback moves into the frame, apparently to block the camera’s view. But the camera operator, shooting over the horse’s flank, captures officers pinning the old man to a brick wall and one apparently delivering vicious blows to the head. Davis is then wrestled to the ground, several officers on top of him. Another tape, this one shot by CNN, shows him writhing handcuffed in a pool of blood. When he tries to roll over, an officer’s foot shoves him back.

Police say he was arrested for public drunkenness, battery and public intimidation. Davis later told reporters he had simply asked an officer on horseback about the curfew time when another officer barged into the conversation. Davis called that officer unprofessional and walked away, at which point, he says, the cop hit him from behind.

I, for one, believe Davis. Watch that clip one more time. See how brutally they attack him in the face, even though he is already subdued? See how they kick him while he is down? This was not self-defense.

Development under Windows: why so painful?

It’s really weird. Lately, I’ve been doing so much development in a *nix environment, that doing the development in Windows is really painful for me. I don’t have any of my good old UNIX tools, I don’t have hotkey-optimized user interfaces, I don’t have speed and control. But more than anything else, I don’t feel like I know what’s going on under the hood.

Today, to take a break from reading Philosophy, I decided to work a bit on this little Java Servlet project I’ve been hacking on. (Will be “released” later.) At some point this past summer, I decided to remove Linux from my main desktop machine and just consolidate all my Linux data onto one machine–this made my life easier so I didn’t have three total (one Windows, two Linuxes) places where my shit could be. But the sacrifice is that my laptop screen is small, so sometimes I want to develop with a big screen and thus want to use my desktop.

Web development, especially, makes sense for me under Windows, since I’m comfortable with the major graphic and web design tools (Photoshop, Dreamweaver, Illustrator) and don’t think the Linux “equivalents” (GIMP, Bluefish, Inkscape) are good enough.

But I decided–may as well have the code open on Windows too, since it’s not C hacking I’m doing, but Java. So I installed Eclipse, and the J2EE, and got cracking.

But under Windows, there are all sorts of gotchas. When my UNIX tool craving gets really bad, I need to drop into cygwin, which isn’t so bad. But without good workspace switching (I have VirtuaWin, but it kinda sucks), and without a customizable window manager, I am really much slower. But here’s the other weird thing I ran into. After awhile of coding, I realized that Eclipse wasn’t reading my JavaDoc information for the JDK (no cool descriptions in my autocomplete tooltips). So I go snooping around the preferences file and can’t find anything, I enable a billion options but no luck. But then, eventually, I realize that it’s very possible Eclipse is using a different JDK. In fact, I look in the dialog, and Eclipse is using some J2SE environment that some other application installed, not the J2EE I installed right before Eclipse. And that J2SE is missing the Java API source code and JavaDoc comments.

The reason this seemed so non-obvious to me is because I’m not used to systems which are completely fucking disorganized. Say what you will about Linux not being user friendly, but, by God, you won’t find it likely to find two different JDKs installed on my machine, and even if you do, only one will be getting used (thanks to Debian’s “alternatives” system). Every application on Windows statically compiles, includes its own libraries, and spews its shit all over the file system and registry. No database tracks it, so your system is a fucking nightmare.

I couldn’t even do a reasonable search to find the JDK I needed, either. It turns out it was in C:\Program Files\Sun\j2sdk1.4_02, which may not sound so bad, but considering on Linux I just think, “Where are libraries stored? /usr/lib” and then in there I think, “What is what I’m looking for called? j2sdk” I quickly find any Java environments in /usr/lib/j2sdk1.x-sun.

On my Linux system, which has not that much installed, I just ran a du -hs /usr/lib/ and got 1.7GB. That means on my relatively lightly-loaded Linux system, 1.7GB of raw 0s and 1s are sitting there waiting to be used as SHARED libraries. Meanwhile, on Windows, there could be any amount of duplication of the equivalent libraries, floating around in various Program Files directories.

I can’t believe there are acutally some Linux critics that believe we should be going in this direction, eliminating things like emerge, apt, and rpm and instead just have statically-compiled binaries that come with their own binary libraries and have users duplicating this stuff across their system. Not only is it insane from the point of view of giving control to the user, but it’s also just plain wasteful.

Quotations through Corporate History

I had this posted on my Facebook profile for awhile, but figured it deserved to show up here.

This is an interesting collection of quotations I collected from various websites by searching for specific terms related to corporations.

I think through these quotations, you get a sense that our problem today had planted its seeds about two centuries ago, and has only grown into a bigger problem over an evolutionary path. That doesn’t mean we should fight it with any less vigor, however.

“I hope we shall crush in its birth the aristocracy of our monied corporations which dare already to challenge our government to a trial by strength, and bid defiance to the laws of our country.”
Thomas Jefferson, 1814

“We may congratulate ourselves that this cruel war is nearing its end. It has cost a vast amount of treasure and blood. . . . but I see in the near future a crisis approaching that unnerves me and causes me to tremble for the safety of my country. As a result of the war corporations have been enthroned and an era of corruption in high places will follow, and the money power of the country will endeavor to prolong its reign by working upon the prejudices of the people until all wealth is aggregated in a few hands and the Republic is destroyed.”
Abraham Lincoln, 1864

“Great corporations exist only because they are created and safeguarded by our institutions; and it is our right and our duty to see that they work in harmony with these institutions. . . . The first requisite is knowledge, full and complete; knowledge which may be made public to the world.”
Theodore Roosevelt, 1901

“No business which depends for existence on paying less than living wages to its workers has any right to continue in this country.”
Franklin D. Roosevelt, 1933

“The institution that most changes our lives we least understand or, more correctly, seek most elaborately to misunderstand. That is the modern corporation. Week by week, month by month, year by year, it exercises a greater influence on our livelihood and the way we live than unions, universities, politicians, the government.”
John Kenneth Galbraith, 1977

“I’m not going to apologize for all this — that’s the free-market system.”
Al ‘Chainsaw’ Dunlap, after firing 11,200 Scott Paper workers, 1996

Indeed it is, Al. Quite a “free market.”

One of my Pet Peeves, as expressed by WWW creator, Sir Tim Berners-Lee

“Anyone who slaps a ‘this page is best viewed with Browser X’ label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network.” — in Technology Review, July 1996

John Ralston Saul on Lou Dobbs: Globalism is Dead?

I posted this DivX clip of John Ralston Saul being interviewed on Lou Dobbs. The segment is called, “Globalism is Dead.” You really must watch this, even though it’s a 33MB download (if you’re at NYU, it’ll be a LAN download):

Click here to download the clip.

Also, I realized that this post raises an issue: what is “fair use” in video clips off news programs? Am I violating copyright law posting this clip? I always think about how I wouldn’t hesitate to post a link to an interview written in the NYTimes, or even to post a few paragraphs of such an article on my blog reprinted with a citation. But since this is video, and news networks try to place arbitrary value on their video content, it seems like I’d be violating copyright law.

Anyway, if anyone from CNN & co. is reading this and really wants me to take it down, I will. But I expect a nice explanation of why, legally, I’m obliged to do so, and I will reprint any demand to take down the video on this website.