Jeff Duntemann's Contrapositive Diary Rotating Header Image

programming

Using Ancient Software Under Win7

I had a need to print out a few calendar pages today, and after thinking about it for a second, I realized that there was a calendar program of some sort on a pile of ancient CDs in the closet that I had not yet dumped. I had actually thrown out a lot of CDs already because they failed to run under Win7, including a few things that I had sorely missed at upgrade time, like the software that came with two of my three scanners. (Thanks to God and all the fates that there is a VueScan X64 that understands both scanners.)

I dug in a box and there it was: Broderbund’s Calendar Creator 7, copyright 1999. It indicated that the software was for Win9x and NT4. I never remember installing it, and honestly don’t recall how it came to me. I have accepted dead or dying computers from other people who had no idea where to take them and didn’t want to just put them out on the curb. Some of these machines came with cardboard boxes full of odd and often broken stuff, with an alluvial layer of software CDs on the bottom. I’m guessing that this was one of them.

So hey, wotthehell: I popped it into my Core 2 Duo/Win7 lab machine, fully expecting it to fail to either install, run, or both. It installed. And it ran.

Once.

However, during its first run it actually created a calendar for me, and printed several pages as a test. I edited the page layout a litle bit and printed the three months that I needed. Then I closed the program and went on to other things. A couple of hours later I realized I needed one more month, but when I tried to run it again, it croaked.

I would have shrugged and tossed it, except that it did run once, launched by the installer as soon as the installer had finished with it. Hmmm. Since installers have to have admin permissions to do their jobs, this made a certain amount of sense, and suggested that if I could run the app as admin, it should work. I gave it admin permissions. It worked.

The 16-bit colors look a little weird, but it runs full-screen at 1600 X 1200 with only one glitch: Print preview doesn’t quite reflect reality. Screens that big didn’t exist in 1999, so I can forgive it that much. It did the job I needed, didn’t cost anything, and as best I can tell didn’t mess anything else up. (That’s not universal, and it’s why I always install things first on a lab machine or a VM. At least do a restore point before you install weird stuff like this.)

If you ever find yourself in this situation, here’s how you run old software as admin:

  1. Right-click the shortcut to get the context menu.
  2. Select Properties.
  3. On the Shortcut Properties dialog, select the Shortcut tab.
  4. Click the Advanced button.
  5. Check the “Run as administrator” checkbox.
  6. Click OK.

Keep in mind that not all ancient software will be this cooperative. A lot of old stuff won’t run at all, or even install. However, it’s useful to try running it as admin before you flip the CD into the trash.

I may still go looking for a modern calendar program. However, it was a good memory jogger, and made me acknowledge that whoever wrote that thing did a very good job of anticipating the future. This is not universal programmer behavior, trust me, and I am not exempt: A DOS program listing utility I wrote in Turbo Pascal in 1985 or so would run in a DOS box in NT4 and Win2K…but after 1999 passed into history, it labeled the printouts as occurring in the year 19100. So it goes.

Review: Junk Box Arduino

Junkbox Arduino Cover - 500 Wide.jpg

Junk Box Arduino appeared earlier this summer from Jim Strickland, and I’ve been dipping into it gradually as time allows. In case you’re TL’DRing on me, I’ll give you the money quote: This is in fact the Assembly Language Step-By-Step of Arduino-based electronic tinkering. I’m a good test case: I’m passionate about electronics (some of you have seen my junkbox, which now fills one smallish garage and our repurposed tack house) and I have an Arduino board on my Heathkit ET-3200 logic breadboard box. Decades ago I did some modest embedded work with the RCA COSMAC CPU line, the most important of which was my robot, Cosmo Klein. Before that I did a lot of things with CMOS and TTL, using Don Lancaster’s books as guides.

Jim’s book is how you begin with Arduino if you have some grasp of computing (as most people do these days) but not electronics. And the book is the polar opposite of academic electronics texts with lots of equations but few photos and nothing at all in terms of bench smarts. The grit and grime of practical electronics is everywhere here: This is the first electonics book I’ve ever seen with warnings like jumper cables wear out. They do, and trying to troubleshoot a visually intact but electrically open jumper is a circle of Hell that I’ve visited more than once, in both digital and RF electronics.

Junk Box Arduino goes all the way down to the (literal) metal, and explains how to build an Arduino-compatible circuit right on a broadboard block. You don’t buy a Cestino board; Cestino (which is Italian for “recycle bin”) isn’t a board, but rather an original design from Jim that you wire up yourself out of loose parts, including an ATmega 1284P CPU chip and a 20 MHz can oscillator. Building the Cestino is in fact the first electronics lesson in the book, with Ohm’s Law looming large. The second lesson is building your own in-system programmer (ISP) so you can program the ATmega chip’s bootloader yourself. No, this isn’t a waste of time. Once you build your own ISP you will know how an ISP works, and teaching you how things work is Jim’s mission throughout the book.

The projects run from the simple and obvious (but still necessary) things like flashing an LED all the way up to highly sophisticated circuits like an ATA disk device reader, a Flash programmer, and even a Z80 CPU lashup that teaches how CPUs and memory work by letting the Cestino control the Z80 and allowing us to look at registers and memory while the Z80 executes slowly or pauses in its tracks. Along the way Jim explains assembly and machine language, object-oriented programming, transistor operation, serial communication, and much else.

Which leads to my only real complaint about the book, which has nothing to do with the writing and may be an old-guy thing: The type is fairly small and there is a great deal of material on the pages. This is really a 600-page book laid out in 400 pages, and I understand why with the sanguine clarity that comes of bloodying your own fingers (which I have) trying to get unit costs on books down.

Don’t let that stop you. The book is a helluva deal for $35 ($22 on Amazon.) It’s one of a bare handful of technical books that I wish I had published back when I was still a publisher. If you have any hopes of making an Arduino control anything electronic, this is a must-have. Highly recommended.

It’s Here: Learning Computer Architecture with Raspberry Pi

RPiBookCover-500Wide.jpg

I had just tossed a salmon filet on the barbie yesterday evening when the UPS man rang the doorbell. There it was: an author case of a book I signed in 2013, finished in early 2014, and have been waiting for ever since. I confess there were times I approached despair and thought the publisher might cancel it, but the concept had legs, and (more important than legs) Eben Upton was behind it.

It’s not all my own work. My co-authors include Ralph Roberts, Tim Mamtora, Ben Everard, and Eben himself. I wrote Chapters 2-7, which entailed about 100,000 words and 90 hand-drawn technical figures. (My chapters come to about 300 pages out of the book’s 507.) Eben wrote a few thousand additional words in my chapters on things that I don’t know well, like compiler internals. (I’m sure he contributed to other chapters too.)

The publisher hasn’t done an especially good job positioning the book, and it’s already being reviewed badly by people who thought it was something other than what it is. So let me position it for you.

Learning Computer Architecture with Raspberry Pi is an introduction to computer architecture for senior high students, and bright junior high students. It’s not a university-level treatment, though it might have application in community colleges. Like the Raspberry Pi itself, it was designed to be affordable to young people, and so it’s not 1,000 pages long. The cover price is $30 (exactly, no .95s or .99s!) and you can get it on Amazon for the inexpensive if peculiar sum of $18.07. It’s not a standalone manual for the board, nor programming the board, nor learning any given language or operating system. It’s about what all the pieces are, and how they work together.

This is important. Today’s young people are digital natives, in that there were cheap desktop computers, lots of them, since before they were born. Kids who are interested in computers have studied and experimented with those parts of the computer that interest them. This is the sort of learning that trips up autodidacts, since it runs very deep in places, but is shot full of holes, some of them huge. The way to fill those holes is to take a survey course, and that’s precisely what this book is for. The course syllabus itself may not exist yet, but I have a hunch that a lot of educators in a lot of places are already hard at work on curricula using the book as the primary text.

People who have read my other books will recognize the approach I took in these chapters: Start at Square One, at the absolute beginning, and tell readers up front that they can skip a chapter if they discover early on that they’re already familiar with the material. Chapter 2 is titled “Recapping Computing,” which goes back to the idea of “a box that follows a plan,” and continues from there. Some people will skip that chapter. Many won’t. A few may be annoyed that it exists at all. (There’s no pleasing some people.) Once you get past Chapter 2, each chapter is much more focused, and covers a specific continent on the larger world of computing:

2: Recapping Computing

3: Electronic Memory

4: ARM Processors and Systems-on-a-Chip

5: Programming

6: Non-Volatile Storage

7: Networking

Chapters 8-12 were written by others, and provide a Raspberry-Pi specific slant on things, especially graphics and I/O. I had not seen those chapters until yesterday, so I can’t say a whole lot more about them just yet. A cursory glance suggests that you won’t be disappointed.

That’s pretty much the story. I had something additional in mind that I didn’t talk about while I was writing my chunk of the book back in 2013: homeschooling. I wanted the treatment to be so clear and comprehensible that parents could use the book in a homeschool environment. I think I succeeded, but I won’t know until I hear from a few homeschoolers. Sooner or later, that’ll happen.

I needed a book like this back in 1970, but of course, it didn’t exist. Computers themselves were mysterious, and the computer gatekeepers seemed to like it that way. Not me. Nothing should stand between people who want to learn and what they want to learn. Nothing. If my lifetime mission as a nonfiction writer could be stated in just a few words, that would be it. I loathe elitism, credentialism, and exclusive-club-ism. I learned stuff, I wrote books about it, and now you can learn it too. If you haven’t started learning about computers yet, well, this is a pretty good time to start. And forgive me for saying so, but this is a pretty good book to start with.

Go for it!

Odd Lots

What Coding Starvation Does to You

I haven’t done any programming in so long I’m starting to hallucinate. Here is today’s hallucination. Lor’ help me, I would have written the whole thing if I hadn’t already read somewhere that counting syllables in arbitrary words is hard.

Open Dictionary text file; 
Create new output text file;

WHILE NOT EOF(Dictionary) DO
BEGIN
REPEAT
Readln(Dictionary,WordEntry)
UNTIL WordIsNoun(WordEntry);
ParseOutWord(WordEntry,WordItself);
If CountSyllables(WordItself) = 1 THEN
BEGIN
Capitalize(WordItself);
Writeln(OutputFile, WordItself+'y Mc'+
WordItself+'face')
END
END;

Close dictionary file;
Close output file;

By Request: A 30-Year-Old Manuscript Page

Whew. Took another 30-odd pounds of paper up 14 feet of stairs and out to the garage, and I’m catching my breath again. This is turning out to be weight training with a vengeance.

Anyway. Reader Vince asked (in the comments under my entry of April 14, 2016) if I could post a page from the manuscript of my 1986 book, Complete Turbo Pascal, Second Edition, which turned up while purging the collection in our furnace room. I chose a page at random just now, slapped it on the scanner, and there you go. It’s mostly readable, even at 500 pixels wide, because it was good-quality output from my first laser printer. The page number means nothing. Each chapter was its own file, with page numbers starting from 1.

Keep in mind that this was a book focused on the IBM PC and (egad) Z80 CP/M. In other words, this was a book about getting things done. I acknowledged the pure spirit of completely portable Pascal–and then dynamited it into the next county.

It’s interesting to me, as a writer, how the conventions for writing book-length nonfiction have changed in the last 30 years. When I wrote my chapters for Learning Computer Architecture with the Raspberry Pi two or three years ago, we agreed to work in a common word processor format (.docx) using comments, and applying paragraph and header styles to the text as we went. The chapters looked like printed book pages even while they were being written. Thirty years ago, we wrote in whatever word processor we wanted, and then sent a huge big pile of paper to the publisher. I don’t think I sent actual files to a publisher until the first edition of my assembly book in 1989–and I sent the files on 5″ floppy disks through the mail after sending that big pile of paper!

By the way, my Raspberry Pi book is still a live project, and I sent back my second chapter of six yesterday after author review of copyedits. Beyond that, I can’t tell you much, especially when I think it might actually hit print.

Ahh. Breathing normally again. Time to lug another boxful out to the garage.

Flickr : , ,

Odd Lots

  • Lazarus 1.6 has been released. It was built with FreePascal 3.0.0, a first for Lazarus. Mostly incremental changes, but there’s a new rev of the docked form editor that looks promising, even though it’s not quite stable yet. Wish I had more time to play with it!
  • Older versions of Lazarus have run well on the Raspberry Pi for me. However, installation on the newer Raspberry Pi 2 is much trickier. This installation tutorial is almost a year old, and I haven’t yet installed Lazarus 1.4 or 1.6 on my Pi 2, but it’s the best how-to I’ve yet seen.
  • From Glenn Reynolds: Indie author Chris Nuttall lays out his journey as an indie, emphasizing that all but the biggest names are being driven to indie by publishers who simply don’t understand which way the wind is blowing. Read The Whole Thing, as Glenn says.
  • Back when I reviewed the Baofeng handhelds, there was some discussion in the comments about the RDA-1846S SDR chip. Gary Frerking pointed me to the HamShield project on Kickstarter, which is an Arduino add-on board (a shield, in their jargon) that uses the RDA-1846S to transceive on 2M, 220 MHz, and 450 MHz. Like the Baofeng radios, HamShield will also operate on FRS, MURS, and GMRS, though the group doesn’t say that explicitly. (This is an SDR, after all.) It’s not shipping yet, but they’ve raised a fair amount of money (well over $100,000) and appear to be making progress. Definitely one to watch.
  • Cool radio stuff is in the wind these days. One of Esther Schindler’s Facebook posts led me to Beartooth, which is an SDR roughly similar to HamShield built into a smartphone battery case that snaps onto the back of your phone. Unlike HamShield, beartooth is going for FCC type acceptance and will operate on MURS. However, there’s been no activity on their Web site since mid-December and I wonder if they’re still in business. It’s not an easy hack; see this discussion from midlate 2014.
  • Oh, and I remembered GoTenna, which is similar to Beartooth except that it’s limited to texts and geolocation data. (That is, no voice.) It’s a Bluetooth-powered stick that hangs on your belt and uses your smartphone as a UI, basically, and allows you to text your hiking buddies while you’re out beyond the range of cell networks. I guess that makes it a sort of HT…a Hikey-Textie. Unlike HamShield and Beartooth, GoTenna is shipping and you can get two for $300.
  • Twitter continues to kill itself slowly by shadowbanning users for political reasons. What the hell is in it for them? When they collapse, something else will appear to take their place. They’re a tool. (Take it any or every way you want.) When a tool breaks, I get another tool, and generally a better one.
  • In case you’ve never heard of shadowbanning
  • I stumbled on something called Roblox, which is evidently a high(er) res take on the Minecraft concept. It’s looking more and more like what I was thinking about when I wrote my “RAD Mars” piece for the last issue of Visual Developer Magazine in late 1999. Anybody here use it? Any reactions?
  • Slowly but steadily, reviews are coming in on my Kindle ebooks. Here’s one that I particularly liked.
  • The Obamacare exchange in Colorado “smelled wrong,” so Carol and I avoided it. We were right. (Thanks to Sarah Hoyt for the link.)
  • I don’t care how many tablets and smartphones you have. Paper is not dead.

Odd Lots

Odd Lots

Odd Lots

  • I posted The Cunning Blood on the Kindle Store 61 days ago, and in those two months it’s earned just a hair over $3,600. 46% of that came from KU page turns. Fellow indie authors, I think we have us a business model.
  • Tom Roderick sent me a link to a very nice graphical COSMAC ELF emulator, designed to look as much like Joe Weisbecker’s unit from Popular Electronics (August, 1976) as possible. You can toggle in opcodes like we did almost forty years ago, and run them. (The Q line drives an LED.)
  • In cleaning out the garage, I took a look at the motor/battery module of my robot Cosmo Klein (which I built in 1977-1978) and realized it wouldn’t take much to get it running again. The original Cosmo had two COSMAC systems and a glass-screen TV for a head (which made him very top-heavy) along with a cranky robotic arm. (Here are some photos of my COSMAC projects and Cosmo himself.) I could hide an RPi2 in that thing and you’d never find it. Funny how stuff changes in 38 years…or maybe not funny at all.
  • From Astounding Stories: Spacemen beating the crap out of one another in zero-G with…yardsticks. By Edmond Hamilton. Not sure of the year, but you can download the whole thing.
  • From the Weirdness-I-Just-Learned-About Department: The tontine, a financial arrangement in which a pool of people contributes equally to buy a pool of assets, and as they die, each deceased’s share is distributed to survivors. Apart from an inceptive to murder your tontine siblings, what could go wrong?
  • In the fever of a house hunt, I missed this item: Amazon is going to create its own line of house brands for food. I have a peculiar curiosity about house brands, which is a sort of shadow business that doesn’t get much press. Why would an industry-leader cereal manufacturer sell its cereal in bulk to other companies to sell as competing house brands? It happens, but nobody wants to talk about it. Big store chains have house brand versions of many products, including most mainstream cereals. There’s a book in this somewhere, though I don’t intend to write it.
  • If you’re not a balls-out supporter of nuclear power generation, I don’t want to hear a word out of you about global warming. We need base load, and neither Sun nor wind can provide base load. In truth, all that stands between us and a completely nuclear future is fear (i.e., political tribalism) and money. The money issue can be fixed. Alas, the gods themselves, etc.
  • It’s been 119 months since a major hurricane (Class 3 or higher) has hit the American mainland. Unless Joaquin goes ashore along the east coast somewhere in the next several days (and current winds argue against that) it’ll be 120 months–ten years–come October 24. That’s an all-time record since records have been kept. Global warming causes everything else; why not better weather?
  • And you wonder why I’m a global warming skeptic. Hey, fellow (potential) morlocks: I hear that our Educated Elite is delicious with melted butter.
  • Americans are embracing full-fat foods, thus spitting in the face of government advice. As well they should: The War on Fat is based on fraudulent science put forth by ace scientific con-man Ancel Keys, whose only real talent was getting government to take his side. Go butter, eggs, and meat. You’ll lose weight, and feel better.
  • Yes, I bring that up regularly, because I’m trying my best to ruin Keys’ reputation. His deadly advice has killed tens of millions, and is still killing them. “I’m supported by the government. I’m here to kill you.”
  • Some good news: A judge kneecapped champion patent troll eDekka by invalidating its only significant patent.
  • And more…for some people, least: Charlie Martin pointed me to an article from Harvard summarizing a study on the beneficial effects of coffee. Coffee appears to delay, improve, or prevent just about everything but insomnia. And what’s my main problem?
  • There! A month’s worth of grouchiness in one Odd Lots! (With a few other items thrown in for spice.) I don’t do that often, but it feels good when I do.