Jeff Duntemann's Contrapositive Diary Rotating Header Image

pascal

Dipping Back Into Delphi with List & Label 22

I haven’t done a lot of programming for the last couple of years, and I miss it. Interstate moves and oxygen starvation will do that to you. I’ve converted some of my old Delphi apps to Lazarus, which in truth wasn’t hard and probably can’t be called programming with a straight face. And I have a project that I need to get back to, even if it has to be written in Delphi 7, which is the most recent version that I have. (Turbo Delphi doesn’t count.) I no longer had a publishing company after Delphi 7 appeared, so post-2002 I dropped off their reviewers list. And $1,400 is a little steep for hobby programming–much less $4700 on the high end.

For some years I’ve been poking at the concept of a personal medical database. I’m old now (how did that happen??!?) and I take pills and get bloodwork and monitor various things to make sure none of my component parts are rusting out. I have Word documents full of notes, and scribbles on paper calendars, all of which really need to be pulled together into one searchable and reportable database. Some doctors won’t believe that my blood pressure does not respond to sodium. I have proof. I’ll bet, furthermore, that it will be a lot more convincing if it’s placed in their hands as a professional-looking report.

All of what I’ve done so far has been in Lazarus, and most of that has been small proof-of-concept lashups, none of them newer than 2012. However, a marvelous report generator product has crossed my desk, and I want to give it a shot with my medbase app. The product is List & Label 22, from Combit, a small firm in southern Germany. It has God’s own kitchen sink of features, many of them related to Web programming, which I simply don’t do. However, it has all conventional reporting options I’ve ever heard of well-covered, and it supports all versions of Delphi back to D6. (It supports Visual Studio and many other dev platforms as well.)

It doesn’t support Lazarus, alas. So I’ll be trying it out in D7.

The big win (for me at least) is that L&L 22 provides a report designer in VCL component format that drops on a form and becomes part of your application. This allows end users to design their own reports. Given that my end user is me, I don’t have to worry about end users doing gonzo things. I’ve always liked my software to exist as One Big Chunk (DLL hell, and all that) so this is right up my alley.

I don’t yet know precisely what reports I’ll want, and it may be the case that I won’t know until I actually need one for a specific purpose, like laying out my data indicating that salt is irrelevant to my blood pressure. Having a report designer right there in the app means that I can design the report that I need when I need it, and not try to anticipate every damn thing I’ll ever want while I’m building the program itself.

I should make it very clear here that I don’t dislike modern Delphi. I still love it, but it’s gotten enormously expensive, and the Starter Edition does not include database programming features. My other reason for using Lazarus is that I still intend to write intro-to-programming books using Pascal as the teaching language. Expecting students to pay even $250 for the Delphi Starter Edition is asking a lot, and worse, I intend to teach database work as well as conventional programming.

I’ll have more to say about List & Label as I learn it. Ditto the medical database itself, which is now a set of tables full of test data and a couple of conceptual UIs. Stay tuned.

Odd Lots

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

Odd Lots

  • Intel’s announced the Compute Stick, a complete $150 Win8.1 machine in the format of a fat thumb drive. Looks like the plug is HDMI, though, and the device gets power from an uncommitted USB port. I could see this melting seamlessly into a big-screen TV (or any monitor with an HDMI input) and giving you something that indeed approaches (as Michael Abrash said probably 20 years ago about 21″ CRT monitors) Windows on your bedroom wall. (Thanks to Eric Bowersox for the link.)
  • It’ll be awhile before this becomes available, but a brand-new antibiotic has been isolated from bacteria that live in dirt. I’m doubly enthuisastic because this may encourage researchers to look harder at bacteriophages, which live in dirt and worse.
  • If you haven’t heard of Smart Pascal, it’s an interesting concept and worth a look: A commercial Object Pascal compiler that generates HTML5 apps. It’s basically a way of writing sophisticated Javascript apps without having to wash your mental hands and rinse your brain out every twenty minutes. To me that would be worth $42/year.
  • From the Words I Didn’t Know Until Yesterday Department: A selfie stick (also known as a narcissistick) is a camera holder that allows you to take pictures of yourself or groups by parking your camera on it and holding it up in the air so that the camera is facing you. It’s usually just a rod with a handle, sometimes telescoping. Many support bluetooth to trigger the camera, though the details remain obscure to me.
  • Beware the Facebook Logic Fallacy: One member of Group X is evil, therefore all members of Group X are evil. Much of my objection to Facebook memes is that this is a very common template. Attack memes must die. Not sure how to get there from here.
  • The percentage of ice cover on the Great Lakes is now 18.7%. Keep an eye on this graphic, as I think our current winter stands to be an…interesting…season from a Great Lakes ice perspective.
  • In general I’m no fan of government regulation, but here’s an excellent argument that both broadband providers and airlines could use a little consumer-oriented regulation.
  • Related to the above: Air travel is a lousy business (rather like health insurance, in fact) and merciless price competition has led to creative fee-hiding and generally charging extra for a travel experience that hasn’t been made deliberately miserable.
  • From the Department of the Painfully Obvious: There are many benefits in finding a spouse who is also your best friend. I guess it’s nice to have some research behind it, but damn, is this really news to anyone? (Maybe New Yorkers.)