Me and the DVDs

I wanted to copy my old VHSC and 8mm video tapes to DVDs; some of these are themselves renderings of old Super8 films, so we are really going back a ways. ... But that turned-out to be the easy part! I bought a $200 gadget from Walmart with VHS deck / DVD writer, + places to plug stuff in, i.e. the 8mm video camera output. ... Actually there were several models to choose from there; I wondered why it was that I hadn’t noticed anything like that at Best Buy.

Copy-protection

The answer, as I discovered (or maybe not), is that most people want to copy their old VHS commercial tapes, so they won’t have to spend a fortune on new DVDs, which may not even exist. ... I managed to copy a relatively recent such offering — the sensitive and thoughtful Hell Boy — without problems, but then I tried to copy an old tape we’d been meaning to watch for a decade or so, and it played a little, and then destroyed the DVDR with a message about copy-protection. ... So that’s why they don’t have ’em in Best Buy; they all get returned after that happens once or twice. I have no idea why Walmart carries them. ... But then again....

Other Voices

Recently, I’ve been seeing these devices everywhere including Best Buy, so the above is probably totally bogus! ... Maybe it’s just they couldn’t make ’em cheap-enough until now? The stuff about the copy-protection still applies, but at least judging by the Hell Boy example, maybe recent VHS tapes aren’t copy-protected, and who has 10-year old stuff anyway? ... I mean, except me? ... Probably it’s just, as usual, Walmart had the things first....

Copying Unprotected DVDs

The next mystery I will unveil is that of copying the DVDs I made; because, of course, it is not enough to have my precious archives recorded on single DVDRs: I must have backups! I went over to CompUSA and got a nice USB 2 DVDR Hi-Val drive, and naive child that I am, imagined that the CDR/DVDR software I already has would surely copy a video DVD. ... But no, of course not; you need special DVD copier software. Here’s what I found:

  • DON’T BUY 1Click DVD Copy. It seemed to work good sometimes — and sometimes it didn’t — but most importantly, it’s copy-protected — a minor detail not disclosed before the sale, and which I didn’t learn until I fortuitously wiped the computer I had installed it on and found I couldn’t reinstall. ... Fortunately this happened before I paid the credit-card bill!

.... For the innocent in the audience, “Copy-protection” means I can’t reinstall the software on another computer or the same computer without getting new magic numbers from the 1Click people — which can be inconvenient; or impossible, if they’ve gone out of business. And 1Click wasn’t cheap; $60, although I idiotically bought the “pro” version for $80. I suppose it’s copy-protected because people usually buy it so they can steal commercial DVDs (although note that it claims it can’t even do that without another program), and so naturally they wouldn’t balk at stealing the copying software. ... But all I really want to do is copy my own DVDs, and 1Click was the first program I encountered that would copy them straight without compression. But don’t get it; use BurnOn instead.

  • ABC DVD Copy Lite for instance, was free and worked OK, but insisted on copying a compressed version.

  • The winner was the free BurnOn CD&DVD, which could copy directly — but not with the EZ-does-it wizard, which apparently expected you to have two DVD drives! ... But I could use the geeky advanced mode to copy my DVD to a file, and from the file to another DVDR! I usually want to make more than a single backup copy, so that’s really great as far as I’m concerned. ... When you exit the program, it displays a local advertising page in your web browser, which wasn’t all that annoying. ... And when all is said and done, it was no more puzzling than the evil 1click — which certainly had its crochets, aside from copy-protection....

  • Another unrelated co-conspirator is DVD43, which doesn’t copy CDs, but claims to be able to decrypt DVDs so that other software might copy them. I haven’t tried stealing a commercial DVD yet, and I probably never will, but it’s free and who knows, it might work.... (XP only)

You can find these guys — or not, depending on which international authorities have closed in on them recently — with Google. ... The free programs want you to buy their enhanced pay versions, naturally — except for DVD43, who apparently does it for love.

— Tuesday, September 5, 2006 3:02 pm

And be sure to see my historical and recent adventures in computer video capture....

How to make your browser use your email program

As I was tinkering with my wretched bloggery, I added an email button so my nonexistent audience could comment and complain. But when I clicked it, the stupid thing would always bring up the appalling Microsoft Outlook Express. Does this complaint afflict you?

The web included effusive commentary, intricate cunning schemes, all useless. ... This is apparently one of these things where you have to be stupid-enough; to change to Eudora, for instance,

In W98 or XP, goto the control panel, “Internet Options”, “Programs” tab, and change “E-mail” to Eudora. That’ll do it....

I mean, presumably you have to have installed Eudora so it appears in the “e-mail”list — although I don’t think I even installed it on this w98 machine — and it was still there.

Delphi and Large Fonts

Speaking of programs that only work on the computer you wrote it on, if your Delphi program is like the picture — the right side of the form can’t be seen — the program is probably running on a Windows system where the fonts are set to “large” (right-click the desktop / properties / settings / advanced — at least W98 2ED) — and of course it was written on a normal decent “small fonts” system. After confusing myself with endless agonizing I found on the web, it fixed itself when I set the form’s autoscroll property to false. That’s it. ... If you actually want autoscroll, all that seemed to require was setting it back to true in the form’s OnCreate event. This is really too stupid to think about — but I did, for hours and hours....

... And then recently, as I toiled on my endless OwenShow — the exact same bug occurred in Linux! ... How’s that for cross-platform stupidity!

— Monday, August 1, 2005 8:15 pm

XP Control-CapsLock Switch

But now let’s get to the really important stuff: How do you switch the left control key with the caps-lock key in XP? All us old-time programmers love to do this, so our ancient “WordStar”-style editors will continue to work (I just went over and successfully ran my hacked-up ancient WordStar on a file in XP!)....

For W9x, there’s a “keyremap” utility — which happily installs in XP, has absolutely no effect, and won’t uninstall (but of course I persuaded it, by deleting the files). ... No, children, XP is so advanced you can’t do that. ... However there is some registry mumbo jumbo which worked here once on my machine and will surely destroy your crate, your house, perhaps your entire neighborhood. But here it is, in a nice XPctlcap.zip file; there’s the techy mumbo jumbo tip I found on the internet (in the README), and an XPCTLCAP.REG file I concocted that, if you are so astonishingly foolish, you can double-click in Explorer and surely destroy your health if not your wealth. ... Enjoy!...

Friday, May 2, 2003 11:07 am But then again, the free PC Magazine utility TradeKeys (google for it, or www.pcmag.com?) might do the trick, and much easier too. Seemed to work on w98 and XP — but not w95!

Blue Screen Reboot Considered Helpful?

An XP innovation — i.e., as compared to NT or Windows 2000 — is that when it crashes, instead of offering the user an incomprehensible blue text screen full of arcane mumbo-jumbo, it instead shows that screen momentarily and then reboots. And, indeed, it mostly crashes when it’s booting, at least that’s been my experience so far; the only other way I’ve gotten it to crash is by plugging in a USB gadget at a particularly inopportune moment. (And it’s my vague suspicion it’s stopped doing that so much, invisible upgrades or something.)

You can turn off this behavior — my computer / properties / advanced / startup and recovery / settings / system failure, untick “automatically restart” — but when I did that during some recent startup problems, things got worse; and when I reticked “automatically restart” they got better — “better” meaning less occasions when I walk into the room where the XP unit is supposed to have booted and instead behold a blue screen or some other of the boot-in-trouble screens XP offers.

Now this is completely without science, but it occurs to me that the blue-screen-reboot strategy could possibly cover-up at least some bad programming. ... It is well known among those of us who labor in these dim vales that hardware init often works the second time, simply because whatever you did the first time wasn’t right, but when it’s done twice, it’s better. The hardware init software might, near the end of its sequence, initialize some register that should’ve been set at the beginning; then when the second time comes around, the register is already properly inited, and the stupid thing works. There are variations on this; the init might essentially behave randomly due to a bug, but if it gets a few “swats” at the thing, it’ll work; I’m sure there are more....

Couple that with the absence of a reset button on any modern PC, so that often the only way you can restart is by turning it off and on again, which might obliterate the accidental fix nature of the repeated inits — because these days, a power cycle almost always leaves modern giant chips in a known state, i.e. the same state it just failed with — and there you are! Clever of these guys at Microsoft eh? ...

My Own Private Dr Dobbs Letters Page!

Print publications have come upon hard times, particularly computer mags, and Dr. Dobbs is no exception — they’ve come on such hard times, they can’t afford a letters page!

... I, on the other hand, have derived immense enjoyment over the years shooting-off cranky letters to the editor, particularly to technical magazines. So to satisfy these mutual unmet needs, I inaugurate my own private Dr Dobbs letter to the editor section....

A Single Letter on the Letters Page

Well as it turned-out, this was the only Dobbs’ letter-to-the-editor I felt moved to document, I can’t imagine why, but the subject turned-out to have a surprise ending....

And Then Again....

In the 11/07 issue, the editor explained how vicious fascist Republican capitalists were responsible for Wikipedia vandalism — “we know now why university professors don’t encourage its use as a valid bibliographic source” — and it occurred to me, perhaps they want to encourage us to go their pitiful web “presence”? ... I mean, it’s obviously inflammatory as well as stupid, and the normal reason for doing this — I mean aside from the pitiful progressive cri de coeur — is to stir-up debate, controversy, response. ... But no; it’s just the poor editor’s brain flying to pieces; there’s no prominent box or something with their web page or anything....


Application Responsiveness by Joe Duffy (Dobbs 10/06)

ARTICLE SUMMARY

Microsoft “program manager on the CLR team” contends that “generally speaking, any data- or compute-intensive tasks should be done on a separate thread, even if that incurs overhead for worker synchronization”. The article does not discuss the typical order-of-magnitude increase in debugging difficulties that attends multiple thread use.

CRANKY LETTER

1. If you are doing compute-intensive tasks, one obvious way to avoid slowdown is not to use an interpreted environment like .NET.

2. In Delphi, there’s “Application.ProcessMessages” which one can call now and then so the user can click a cancel button and/or see the progress bar update etc.; I assume .NET has something comparable. I fail to see how spawning another thread to do the compute-intensive task would improve this situation much.

That is, programming magazines and environment vendors may find it fun and profitable to cook-up reasons for more threads, but the practice is still unsavory and, in many typical suggested cases — i.e., .NET — silly.

Obviously there are occasions for multitasking — operating systems, say — but I have yet to be convinced that the execution of these kind of activities in complicated object-oriented environments is much of an improvement over simpler C-language constructs — or assembly language, for that matter.

— Monday, September 25, 2006 3:34 pm

P.S. (10/4/06) Apparently I have been parroting John Ousterhout’s 1996 (!) Usenix presentation Why Threads are a Bad Idea (for most purposes). ... Of course, that was before computer scientists discovered .NET....


There, I feel so much better. ... Although perhaps it’s fortunate I’m the only one who reads this site....

All Is Revealed!

But loyal readers of these pages will be gratified to know there probably is a reason for Microsoft’s strange desires, also revealing the puerility of my imaginary response. Which is that Moore’s Law is feeling poorly, and the only way the software industry — Microsoft, approximately — can get back on top is to multi-process the heck out of stuff! ... But it’s hard to multi-process with a single thread, hence the friendly monopoly’s advice as above.

See, one of the reasons we were going to learn to love .NET and its scripty ways was because every year in every way, or about every 18 months, computers would get twice as fast as per Moore’s law. I’d guess Microsoft was counting on this, or at least the small-country-sized section of Microsoft in charge of .NET was. ... But it didn’t happen! Moore’s law got sick! ... So if your .NET thing is ever going to be more sprightly than GWbasic, you gotta multi-task, and then everything will be new and glistening and much faster than GWbasic!

+ LINQ

But then again, Microsoft might be able to multi-task your single-threaded program if you happened to write it in SQL. ... And I very much suspect this is the plot behind the newly-introduced LINQ feature, where you can stuff SQL-like statements right into your C# scripts — which I must say, struck me as odder than the usual Microsoft standard when I first learned of its approach. ... But as explained in Parallel LINQ: Running Queries on Multi-Core Processors, p 70, MSDN Mag, 10/07, any day now those queries’ll easily run in parallel you lucky scripters, and perhaps ameliorate the Moore’s-lawless pokiness of your C# and VB code — and so all is revealed! ... It appears the approximate plan today is to enhance/convert the cavorting CLR languages into declarative-type SQL-like things, and the many processors in your box will race away with the logic and all will be for the best....


Parallel Extensions to the .NET Framework by Matt Davey (Dobbs 5/08)

ARTICLE SUMMARY

Davey is deputized to announce the obvious:

The general message coming from Microsoft is:

  • “The free lunch is over,” no more Moore’s Law.

  • “Multicore is the future for performance and scalability” (at least, according to Intel).

Then he proceeds to pontificate on the endless elaboration of .NET LINQ etc. features and the consequent glorious rewards thereof; particularly if somehow we can get hold-of giant cluster-scale versions of these earth-shaking technologies.

CRANKY LETTER

I’m glad even at this late date you’ve finally come-around to admitting the obvious. I mean, it’s certainly taken you a while, since the ancient times I announced all these things above (and elsewhere). ... Although I notice you still hedge your bets by claiming this amazing breaking news comes from Microsoft, and the pure Dr. Dobbs doesn’t necessarily concur in these astonishing revelations. ... But the only really intriguing question is, why the assiduous cover-ups and lying all these years? I mean, aside from the obvious sheer fun of making stuff up in the pages of the remaining dying computer magazines?...

Owen’s insightful opinion: a dark fearsome nullity faced industry insiders (and outsiders, for that matter): we suspected Moore’s law was a-trembling on the cliff, but some of us couldn’t get past the denial stage. ... On the other hand, a deus ex machina like a supposed physical law has its attractions, certainly in comparison to the obvious reality — that the buggy-whip industry was finished. ... Because it’s apparent that even before Moore’s law got so cranky, the marvelous menagerie of microcomputers was headed south. ... I.e., the day of the dot-com crash still had a few years of increasing computer performance ahead, before the tragic ramifications of too much heat and too little physics caught up with us; but that still-increasing performance was not accompanied by any particular recovery of industry activity or, crucially, employment. ... And the computer magazines kept dying....

So while I appreciate your admitting the truth belatedly in an obscure column — well, sadly, everything in Dobbs is obscure in these latter days — it would have been more fun if you could have done it while your magazine was still printed on real paper, instead of this strange flimsy plastic stuff; or, better yet, when you still printed letters.

— sincerely,
the still disgruntled programmer
Friday, April 18, 2008 11:19 am

.NET + C++ & Visual Studio 2005: What’s Up?

Among other tantalizing treasures, Microsoft’s .NET environment/religion provides EZ Windows forms composition — i.e. a GUIRAD, q.v. ... Like Microsoft’s Visual Basic did years ago; the distinction between Microsoft’s products and Borland/Codegear’s (also GUIRAD) Delphi and C++Builder was that the latter are compiled (fast) languages, while Microsoft, from the old Visual Basic to all today’s .NET languages, is interpreted (generally accompanied by hypey and imaginative sentiments about how fast interpretation can be under proper planet alignment). ... Except for Microsoft’s unmanaged C++ flavor, which is available by specifying “#pragma unmanaged” in your VS2005 C++ source (or by setting the entire project to “no CLR”).

Nishant Sivakumar has written a lovely book “C++/CLI In Action” all about Visual Studio 2005 and C++, and how it can help you resurrect tired old C/C++ code, especially the tired old MFC variety. ... I must admit I thought the book was about interoperating managed and unmanaged C++. ... But as I got within shouting distance of the end, I noticed that he hadn’t shown me what I had innocently imagined to be the piece de resistance: a winforms application that worked with unmanaged C++. ... As I finally realized, that would be because

You cannot freely mix managed (.NET) and unmanaged (fast) C++ in Visual Studio 2005

You may wonder how I can make such an assertion after the thoughtful Sivakumar wrote an entire book about .NET and C++, and of course I may be wrong since no technical source including Sivakumar and Microsoft ever admits what can’t be done with a product. ... But I’m probably right because (1.) Sivakumar never gets around to it and (2.) I tried.

  • In the book, he mostly compiles the C++ MFC etc. code with /clr compilation enabled aka managed....

  • There is a “commonlib” project that shows how to produce a DLL with a C++ object that can be used in both managed and unmanaged applications via various trickery; that is, supposedly the include file for the tasty object in the library will compile and work in both /clr and non-clr projects. But of course the DLL still is /clr....

  • The only place where he uses “#pragma unmanaged” is for DllMain in five cpp files (including the commonlib DLL above), out of 160-or-so *.cpp *.h in his source code zip file — so he does mix managed/unmanaged, but not much. ... And he always uses it for DllMain, so it’s presumably some mumbo-jumbo requirement....

  • The book index lists a total of three page references for #pragma unmanaged/managed.

  • Sivakumar’s book is mostly about the undeniably useful talent of C++/CLI to work with native and CLI libraries and types, and all the wonderful things you can do with it — when, of course, it’s compiled to interpeted .NET “/clr” C++ code....

How to Compile Unmanaged Code with Windows Forms and Crash

I wrote a Macintosh program IPW that is mostly C++ code + Xcode Objective-C++ for the Mac GUI; the plot was to perform a similar underhanded trick with .NET winforms code and the same C++ guts. ... Sadly it was not to be; the following steps produced a winforms C++ project which crashes before it gets to main, with a “failed assertion”, “_CrtIsValidHeapPointer(pUserData)”:

  1. Change project from “/clr:pure” (aka “no unmanaged code”) to “/clr”. ... Actually, this is enough (i.e., without the pragma, next) to provoke the mystery assertion; but at least it got to the program’s main....

  2. Stick “#pragma unmanaged” at the front of all the files — except of course the winforms files, which were only going to call my unmanaged code, see?...

  3. Oh I should mention that with the average non-VS2005 source, turning off precompiled headers seemed to be a good plan.

... Casual googling suggests that the _CrtIsValidHeapPointer assertion failure is something that just happens when the code is rotting in the darkness but no one really knows why....

... And please understand, VS2005 can compile average C++ programs to 80x86 binary executables just as good as it ever did; indeed there’s a command-line version of IPW that is compiled that way. ... The magic and mystery department is the combination of .NET C++ and binary-compiled C++ aka “unmanaged”....

A Managed C++/.NET Program

Sure, I can compile a managed version of my test IPW code — with /clr:pure and without the #pragma unmanageds — which doesn’t crash.

Quo Vadis?

But what’s the point? Why would we do this? ... For the Macintosh, the Objective-C/C++ approach, like with IPW, makes sense for new software, as you get real compilation + the pool of skilled professionals like myself who know C++. ... A .NET/C++ scheme makes sense C++ expertise-wise, but doesn’t provide real compilation1; and both features are probably still available with Borland’s C++Builder....

So .NET/C++ probably doesn’t make sense for new products; even the straggling hordes of MFC code might still be supported by C++Builder2, although VS2005 MFC has a few special .NET features (see the book).

Must You Be So Negative, Owen?!

Well I would suggest that if for whatever reason you must contrive .NET software, the C++ flavor might be good.3 ... There’s even a “/clr:safe” setting which restricts you to CLR types but still with C++ syntax (+ a few odd magic words to be sure). For some organizations this could be an attractive alternative to C# or VB, the other two major flavors....

... OK OK the cries of the multitudes have persuaded me; here is upw.zip which will flawlessly compile in Visual Studio 2005 (double-click “upw.sln”) to a program which doesn’t do anything — I stopped after I managed to load the encrypted records’ titles into the list box as beautifully suggested above but you’ll only get the single default record — but it doesn’t crash! — at least until you set it to “/clr” and uncomment the #pragma in managed.h....

— the obviously confused programmer
Monday, August 20, 2007 1:35 pm


1. I believe many Windows projects wouldn’t be adversely affected by the interpreted slow-down of .NET C++; some might, however, and it’s one less thing to worry about. ... Also I assume that most prospective project-creators would still prefer to use native compilation rather than the .NET interpreter, no matter how wonderful Microsoft says it is.

2. C++Builder used to have MFC support, although I have no idea how well it works or how easy it would be to integrate into a C++Builder forms project.

3. Well I found at least one annoying bug without really trying that hard: in /clr, the VS2005 debugger doesn’t properly render values of any globals. ... Which does suggest that any serious investigation is likely to turn-up more parts on order....