Freeware Utilities Aren’t Worth the Cost

I feel like dropping my bike on rollers and doing some intervals. All I need is a timer. Google turns up a bunch of programs! One minute later: none of the programs with descriptions are what I want, and most don’t even have descriptions. Why am I even bothering to Google for this? I could write a script that does what I want in one second; back in a sec.

while true; do sleep 60; print \\a; done

Shoot, the cygwin alarm isn’t loud enough. How do I make it louder? Back to Google. Thirty seconds later: Great! A hundred different message board and mailing list posts, most of which have no replies. I could have written a program that would do what I want in the time I spent searching. Back in thirty seconds. Maybe forty, since I’m not really familiar with F# or .NET

let timer =

  let t = new System.Timers.Timer()

  t.Interval <- 60000.0

  t.Enabled <- true

  t.Elapsed.Add(fun _ -> System.Media.SystemSounds.Hand.Play())



  print_endline “Enter to kill”

  read_line() |> ignore

  t.Enabled <- false

O! It’s loud enough even if I don’t adjust the volume. I’m done! And it only took ten seconds, since I didn’t need any volume controls.

Now I want to be able to copy and paste this to Trillian, which is running on one of my other machines. At least Google only gives returns one result this time, and the linked program will even do what I want. But it costs $25. Are they kidding? Back in five minutes.

This has been happening more and more lately. Whenever I search for some trivial Windows utility, Google returns hundreds of irrelevant results and a few commercial programs which are relevant but cost $5/minute. I wonder why I don’t have this problem when I’m looking for Linux utilities, despite being a better Linux programmer. Ahh, well, time to hop on the bike. Back in a an hour . . .

Freeware Utilities Aren’t Worth the Cost

Mysterious Opcodes and Instruction Prefixes in Windows 98 and Windows Vista

I’ve been playing around with running Windows on top of a VM and it’s got some strange looking opcodes I can’t figure out.

Windows 98 has opcodes that have redundant prefixes. For those of you that don’t muck around in assembly, x86 has prefixes to do things like access the 16-bit version of an instruction instead of the 32-bit version of the instruction. It’s legal to tack on the same prefix multiple times (and every processor I’ve tried even does the same thing if you add contradictory prefixes). I doubt any Win98 era compiler generated redundant prefixes, so those prefixes must have been added on purpose. But why? It’s clearly not for alignment reasons in Windows, and it even mucks up the alignment in a few places. Even if alignment were an issue, adding redundant prefixes would have been bad way to go about it at the time – decoding extra prefixes was expensive prior to Athlon and Banias on Intel and AMD processors, respectively.

It’s at least possible that an assembly coder would add a new unsupported prefix manually, and then forget to remove the extra prefix when the assembler is updated, but Vista has me completely baffled: it issues 0x0F0D opcodes. That’s a NOP on my Conroe, but it’s a 3dNow! prefetch opcode on older AMD processors, and it causes an undefined opcode exception on Intel processors up to and including Prescott. As in the previous case, this doesn’t seem to be for alignment purposes. AMD supports Intel’s prefetch opcodes, so it’s not because you need to issue both AMD specific and Intel specific preftech opcodes. I can see why you’d want to NOPs in a debug build (since they let you place breakpoints in places you might not otherwise be able to) but surely the Vista release build isn’t a debug build.

Even if you want a NOP, why use 0x0F0D? 0x90 works fine, and won’t cause problems on older processors. If you want a longer NOP, you can always add prefixes (which are fast now). Is it only used in the Core2 codepath? I tried spoofing the CPUID to match Prescott, and I still saw this mysterious new NOP, but I was only spoofing family, model, and stepping. Maybe Windows looks at the feature flags to really determine which CPU is really being used, in which case it would have still gone down the Core2 codepath. Even if I spoofed those, who knows what else MS uses to identify a CPU? I’m tempted to buy an old Prescott system off ebay just to see if Vista takes the same codepath, causing the CPU to throw undefined opcode exceptions all the time.

Considering all of the effort that MS goes through to improve Windows performance, they must know they’re doing this. It’s unlikely that it’s an accidental last minute change

UPDATE: After experimenting with some cache tests, we can see that 0x0F0D is actually causes prefetches on Conroe (and newer) processors, even though the current version of the Intel Architecture Manual claims that the opcode doesn’t do anything. What other 3dNow! opcodes has Intel adopted?

UPDATE 2: Raymond Chen gives one reason you might want odd prefixes on things: to work around Intel CPU bugs. It turns out that work-around was pulled before the OS was released, but perhaps there’s a similar explanation for the odd opcodes I was seeing.

Mysterious Opcodes and Instruction Prefixes in Windows 98 and Windows Vista

New Laptop, Noisy Power Circuitry

After two years of wishing for a real delete key, I’ve finally sold my Powerbook G4 Aluminum and exchanged it for a brand new Lenovo Thinkpad X61s. I was seduced by the 17W TDP on the Core 2 Duo LV L7500 , excellent battery life and a very good promotional price. This laptop has turned out to be a very nice computer.

One troublesome feature (the only one thus far) of this laptop is high frequency noise, probably in the 19-21khz range whenever the processor is switching power modes. If I lock the CPU to one particular FSB/CPU speed the noise goes away. I’m certain that this is a combination of rapidly changing power requirements and cheep capacitors.

Many electronic devices I own emit high frequency noise associated with signaling or changes in power states. Am I exceptional in my ability to hear all this Chirping, Whining and Whisting? On some devices I can even distinguish HID device interrupts from bulk transfers to the video card. A saturated bus is also easy to pick out. While the ability to hear PCI bus traffic is instructive, it gets old really fast.

Read this paper to learn what cheap power circuitry can tell your enemies: Acoustic Cryptanalysis

New Laptop, Noisy Power Circuitry

Does Diet Affect Cholesterol?

The always interesting Overcoming Bias has a post about the Framingham study, a longitudinal survey which found no correlation between diet and cholesterol. Robin quotes an article from the Framingham newspaper; his take is that Kannel is trying to be clearer than truth here:

Although there is no discernible relationship between reported diet intake and serum cholesterol levels in the Framingham Diet Study group, “it is incorrect to interpret this finding to mean that diet has no connection with blood cholesterol,” Dr. William B. Kannel, director of the Framingham Heart Study has stated.

That made me wonder: isn’t it possible that there’s other evidence that diet can affect cholesterol? After all, the Framingham study merely confirms the null hypothesis, and the director of the study is clarifying the results.

A quick PubMed search confirms that there’s a large body of evidence, including both controlled and epidemiological studies, supporting Kannel’s statement. Moreover, the evidence is consistent with the result of the Framingham study. See, for example, Mattson, Erickson, and Kligman (Am J Clin Nutr 25:589-594, 1972): increasing dietary cholesterol intake from 0 mg/day to 245 mg/day and from 550 mg/day to 730 mg /day raised serum cholesterol from 160 mg/dl to 173 mg/dl and from 184 mg/dl to 201 mg/dl, respectively. But we only see an increase in very low fat and relatively low cholesterol diets; a 250 mg/day increase in cholesterol to an average American diet has no discernible effect on serum cholesterol, i.e, the effect is non-linear, and virtually all Americans are in the inelastic range, which is consistent with the Framingham study. We can see the effects of diet on cholesterol if we look at, for instance, rural China.

Does Diet Affect Cholesterol?

Y Combinator Application: Spamr

Last Thursday, reported that Alexey Tolstokozhev, the spammer responsible for a third of all viagra and penis enlargement spam was killed; he made about $2 million dollars a year.

My first thought was: what a great business opportunity! A third of the market is ripe for the picking. This is the second Russian spammer to be killed in two years. All we have to do is hire security and live in a country where people are rarely assassinated, and we’ll clean up. Unfortunately, it was a hoax; so much for our application.

What’s new about what you’re doing?

We plan to hire bodyguards. Also, we might try to generate natural language output that can avoid Bayesian filters. But mostly, we’ll concentrate on avoiding assassination.

What do you understand about your business that other companies in it just don’t get?

Being assassinated is bad.

How will you make money?

1. Spam

2. ???

3. Profit

Continue reading “Y Combinator Application: Spamr”

Y Combinator Application: Spamr

Are lot 734 FDOU Xbox 360s really Falcons?

Is Falcon, the Xbox 360 with 65 nm parts, available yet? The consensus seems to be yes, but every source I can find merely links back to this post on the xbox forums.

Most of the evidence is circumstantial: the heatsink, PCB layout, and labeling of the CPU are different. There is one piece of non-circumstantial evidence, but I don’t know what to make of it. One poster claims overall system power consumption went from 110W to 65W, a 40% reduction. Even if the processor were responsible for 100% of the system’s power consumption, that would be extraordinary. Typically, a shrink to 65nm might reduce dynamic power by 40%, but that won’t result in a 40% in total power, since static power dominates now. A 40% reduction in total power from a process shrink hasn’t been typical since the transition from 250 nm to 180 nm, six years ago.

Are lot 734 FDOU Xbox 360s really Falcons?