Program your DSP in… VB?

In an EDN article, Warren Webb reports on a new board from Sheldon Instruments with a TI C6713 in a PC-104 form factor. Ho-hum.

Then I read this:

The board comes with DSP-software libraries that enable system engineers to directly program their DSP systems in Visual Basic or National Instruments (www.ni.com) LabView.

Did I read that right? It is possible to directly program a TI DSP in Visual Basic?

That can’t possibly be right. And if it is, there is something terribly wrong with the world we live in. Who would want to program a DSP in VB? What’s next? A COBOL compiler?

Gatto on Education

I’ve been reading John Gatto’s Underground History of America Education. I thought I’d share a couple exerpts that I found interesting.

No public school in the United States is set up to allow a George Washington to happen. Washingtons in the bud stage are screened, browbeaten, or bribed to conform to a narrow outlook on social truth. Boys like Andrew Carnegie who begged his mother not to send him to school and was well on his way to immortality and fortune at the age of thirteen, would be referred today for psychological counseling; Thomas Edison would find himself in Special Ed until his peculiar genius had been sufficiently tamed. [Link]

Forced schooling was the medicine to bring the whole continental population into conformity with these plans so that it might be regarded as a “human resource” and managed as a “workforce.” No more Ben Franklins or Tom Edisons could be allowed; they set a bad example. One way to manage this was to see to it that individuals were prevented from taking up their working lives until an advanced age when the ardor of youth and its insufferable self-confidence had cooled. [Link]

Faster Floating-Point Arithmetic on TI DSPs

EDN is reporting that TI has improved floating-point arithmetic performance in the the C6722, C6726, and C6727:

The processor-core enhancements include adding floating-point addition to the S unit on each side of the C67x core, so that the processor can execute four floating-point additions per cycle. This doubling of the number of parallel floating-point additions per cycle can boost FFT processing by 20%. In addition to supporting single- and double-precision floating-point operations, the processor core now supports mixed-mode floating-point functions that allow developers to operate on both a single- and double-precision value in the same operation. The C672x DSPs also have twice as many internal registers as C67x DSPs to improve compiler optimizations and reduce the overall number of memory accesses.

Software Project Failure: Ontario’s Integrated Justice Project

In a Globe and Mail story, Kirk Makin reports that the Ontario government settled a lawsuit for $63 million over a software project gone horribly wrong. The lawsuit was brought by EDS Canada Ltd and a number of other companies after the government decided to cancel the Integrated Justice Project (IJP), a project meant to move the province’s entire judicial system onto computers, because it had run over budget:

The death knell came in late 2002, when then-provincial-auditor Erik Peters said the original cost estimate of the project had ballooned to more than $350-million from $180-million. He said that even if the IJP were completed, the prospective savings would be no higher than $250-million.

When the project was cancelled it had burned through $200 million. So why didn’t the government continue the project in the hope of recouping the $250 million it expected to save for the project? Derek Freeman, a Toronto lawyer with “inside knowledge of the IJP” provides a clue:

Mr. Freeman recalled that when the project began, the original private-sector partners got carried away and failed to convey how difficult it would be to translate their plans into a system-wide network.

It sounds to me like the private-sector partners failed to convey the difficulty because they were unaware of it themselves.

This is a classic problem in software. Estimates are often off by a factor of two or more because developers, when they first encounter a problem, haven’t acquainted themselves with its many intricacies.

The $350 million estimate to which the project ballooned was probably optimistic.

Bug Report Fallout

It seems my bug report is causing a bit of a stir within Microsoft. As Georgeo Pulikkathara writes,

This has certainly gotten the attention of folks internally wondering how come Ken didn’t use the official bug reporting system.

It’s mostly because Ken is a lazy sot. Like I wrote before, I looked around the support website for a few minutes but I couldn’t find anything resembling an “official bug reporting system”.

When I typed “report bug” into the search box it returned a link to some tips for reporting bugs in FoxPro and a plethora of, what else, bug reports.

Amongst all the other links on the support page, I honestly didn’t notice the Contact Us link, but even if I had found the bug report page I very much doubt that I would have called the 800 number, which I can only guess (based on my experience with the call centres of other companies) would involve a 10 minute wait to get through to the operator, followed by 15 minutes of transfers to various people until I finally ended up at the person who can actually do anything about it. And besides, how am I going to send a screenshot over the phone?

I do realize there is a remote possibility that Microsoft has an exceptional customer support service and would get my report logged in less than a minute, but why take the risk? The bug is a mere nuisance. It has no effect on anybody but anal spelling-nazis like me. I could afford to have the report go ignored, though it would bother me in irrationally profound ways every time I saw the typo (but that’s my problem, not Microsoft’s)

So I guess it was the combination of the low importance of the bug, and the expectedly high cost of reporting it through the official channels that led me to post it here.

I’m genuinely surprised that nobody has reported a bug like this before. It seemed like a very natural choice to report it this way. I’m really not used to being the first to do something.

And my web server isn’t used to seeing the kind of traffic this has generated (Report Magic graphs increasing dates from right to left for some unfathomable reason):

Daily statistic

I hope Go Daddy will hold up after everybody returns from their long weekend getaways.

To Engineer Is Human

I just finished reading Henry Petroski’s To Engineer Is Human: the Role of Failure in Successful Design. I liked it.

One of the central themes of the book is that there is much more to learn from the failure of a design than from the success of one. When a structure collapses, the wreckage can be studied, and the cause identified, providing future designers with a definite mode of failure that they can plan to avoid and check for in their own designs.

Another major theme is an analogy of the design process as a scientific method. In science, a hypothesis can be disproved by experimentation, but it cannot be proven. If an experiment fails to disprove an hypothesis, it merely adds supporting evidence to it. The hypothesis may be incorrect, but no experiment has yet exposed its failure. Similarly, a design can be found lacking by analysis, but there is no guarantee that one which passes all the known analyses will, in fact, stand.

There is an oft-quoted saying among computer scientists from Dijkstra that makes a similar point: “Program testing can best show the presence of errors but never their absence.”

Ken’s Bug Reporting System

When I arrived at the office yesterday morning, I was greeted by the following message box.

Windows Update dialog with typo

Apparently our IT staff had applied some patches to my machine overnight and I needed to reboot. Fine. Whatever. I’m used to that with Windows. I’ve learned to accept that I occasionally have to waste 15 minutes of my day reconstructing my desktop after a reboot the I didn’t initiate.

What bothered me was the typo in the message box. Successfully is spelled with three Ss, not two. I noticed the typo ages ago and every time I see it I get more annoyed by it. When I saw it yesterday, I’d had enough. I decided I was going to do something about it.

So I went to the Microsoft Support site looking for somewhere that I could report a bug. I poked around on the website for a few minutes, but quickly gave up. This is a bug that is going to take a developer two minutes to fix. Why should I put more effort than that into reporting a bug?

I finally decided to report the bug here instead of Microsoft’s award-winning support site, in the hopes that some clueful Windows Update developer with a PubSub feed might happen by it and spend two minutes fixing it. Are you that developer? Please fix it.

Update: After PubSub founder, Bob Wyman, wondered whether anybody from Microsoft had seen this posting, Robert Scoble confirms that they have. Cool! It’s working!

Solution to SICP Exercise 1.23

Structure and Interpretation of Computer Programs

Solution to Exercise 1.23:

Here is the definition of a next procedure.

(define (next x)
(if (= x 2)
3
(+ x 2)))

To use it, we need to modify find-divisor like so:

(define (find-divisor n test-divisor)
(cond ((> (square test-divisor) n) n)
((divides? test-divisor n) test-divisor)
(else (find-divisor n (next test-divisor)))))

When I rerun the code from exercise 1.22, I get the following output:


1009 *** 0s 310000ns
1013 *** 0s 320000ns
1019 *** 0s 150000ns
(# # #)

10007 *** 0s 780000ns
10009 *** 0s 780000ns
10037 *** 0s 940000ns
(# # #)

100003 *** 0s 2500000ns
100019 *** 0s 7500000ns
100043 *** 0s 2500000ns
(# # #)

1000003 *** 0s 2190000ns
1000033 *** 0s 7810000ns
1000037 *** 0s 2190000ns
(# # #)

Compared to the results of exercise 1.22:

Number Ex 1.22 Time Ex 1.23 Time Ratio
1009 460000 310000 1.48
1013 470000 320000 1.47
1019 320000 150000 2.13
10007 1250000 780000 1.6
10009 1410000 780000 1.81
10037 1090000 940000 1.16
100003 5940000 2500000 2.38
100019 3910000 7500000 0.52
100043 4060000 2500000 1.62
1000003 7500000 2190000 3.42
1000033 1870000 7810000 0.24
1000037 2340000 2190000 1.07

If I throw away the top two and bottom two ratios, the average ratio is 1.54. This is close to but less than the expected speed up of 2. If the numbers are at all reliable — and I have my doubts — the extra 0.46 can be attributed to a combination of the procedure call to next (which could take longer than the call to + because it is user-defined versus built-in) and the additional if, with its test for equality to 2.

Bullies on Parade

Scientific American Mind has an story on schoolyard bullying and mobbing. Mechthild Schäfer, the author, was part of a study that aimed to discover why bullies bully. The results are discouraging, if not altogether surprising:

Likewise, we encountered eight-year-olds who, by their own statements and those of their contemporaries, had been the butt of mobbing for quite a while. They endured harassment and exclusion yet never put up resistance or informed adults about their situation. The consequences can be long-lasting. In earlier studies we had shown that children who are harassed by schoolmates over a lengthy period are often unable to defend themselves against hostility and react to attack with anxiety and helplessness. Such terrible experiences make it all the more likely that they will fall into the traps set by bullies.

When we asked the same questions six years later, the students’ answers bore this out. After asking the 13- and 14-year-olds which kids they liked and which they did not, we developed a preference profile that gave us a good sense of an individual’s social ranking in a class. The result was surprising. In contrast to the bullies’ relative lower standing during elementary school, they had actually become very popular with their classmates. Their victims, on the other hand, got few sympathy points.

The good news?

The one positive note was that [the] previous experience [of former mobbing victims] was not usually repeated in their work lives, although mobbing in the workplace–the ganging up of subordinates or superiors through rumor, innuendo, intimidation, humiliation, discrediting and isolation–does happen.

I’ve always been a bit of a nerd so, as a kid, I took my fair share of name-calling and teasing, though I avoided the worst of it by having some athletic talent.

If you are still in school and having a tough go of things, keep in mind that it won’t last forever. As Paul Graham writes:

It’s important for nerds to realize, too, that school is not life. School is a strange, artificial thing, half sterile and half feral. It’s all-encompassing, like life, but it isn’t the real thing. It’s only temporary, and if you look, you can see beyond it even while you’re still in it.