The Care Package – by Jack Ohman

The Care Package is a short comic series that was posted to the PBS NewsHour web site last year. It was a really well-done series about the author’s father’s final years and death. I had read one part of it, and bookmarked it, but never got around to sitting down and reading the whole thing until yesterday. It’s quite touching, and reminds me of some of the stuff that happened in my own parents’ final years. (Stuff like spending so much time in the hospital that you know where all the good vending machines are. And dealing with c. diff.)

Here’s are links to all five parts:

Long-term care is a tough problem. My Dad spent a lot of time thinking about it, and weighing options, and in the end, for him, he didn’t need it; he went from home to the hospital, and died there. My Mom was another matter, though also, in the end, she didn’t really need long-term care. She went from home to assisted living, but died after only a few months there, and was in and out of the hospital that whole time. But I learned a lot about long-term care in that time, since I did a lot of legwork and research in trying to find a place that was a good fit for my Mom.

Populating fields in SharePoint / InfoPath from query string parameters

As a follow-up to my previous blog post about hosting a web browser control in Dynamics AX, here’s a write-up on how I fudged a SharePoint page / InfoPath form to accept multiple field values from a query string parameter. To reiterate some of the background, the idea here was to be able to open up a new request in SharePoint, from Dynamics AX, with a few fields on the form pre-filled, so that the user wouldn’t have to copy & paste a bunch of stuff from AX into SharePoint.

My idea was to pass those values on the query string, which seemed pretty reasonable. I found some information on doing that with a bit of JavaScript, but that didn’t look like it would work well, for a form that had been created in InfoPath. So then I looked to the “query string URL filter web part”. This web part can be added to a SharePoint page, and allows you to pass a single query string parameter to a field on a SharePoint/InfoPath form. The big issue here is that it only supports a single parameter, so my plan to do something normal, like “?SO=S1234&PO=P1234&item=123456…” wasn’t going to work. After reading this blog post, and some other related posts, I came up with a plan to encode all of the values I needed to pass into a single parameter, of a form like this: “?param=SO:S1234|PO:P1234|IT:123456|…”. Not very pretty, but it would get the job done.

I mapped that one parameter to a hidden field on my InfoPath form, then added a bunch of rules to that field to break down the value and save the parts out to the desired form fields. There aren’t a lot of string-handling functions in InfoPath, but I found that substring-before and substring-after were enough for what I needed to do. A formula like this:

substring-before(substring-after(URL parameters, "PO:"), "|")

can be used to extract the PO # “P1234” given an example like the one in the previous paragraph. This works, but it’s a little tenuous. If I had too much data to cram into the parameter, that would be a problem. Or if I had to worry about having special characters (like the colon or vertical bar characters) in the data fields, then that could confuse things quite a bit. But for my use, it works out pretty well.

I don’t actually do much SharePoint / InfoPath work. Every time I do, I feel like I’ve travelled back in time, to an era when InfoPath seemed like a good idea. (Though I’m not sure it was ever a good idea…) It doesn’t seem to have much of a future, though Microsoft will support InfoPath 2013 until 2023.

Flickr changes

I’ve had a Flickr account for over ten years now, and I’ve paid for Flickr Pro for the last five years or so. There have been some ups and downs, but I still think it’s a good service. They’re making some changes to Flickr Pro, the main one being that the desktop Auto-Uploadr will be a pro-only feature. I’ve never used the new uploader, and I don’t ever want anything automatically uploaded, so it’s no big deal for me either way. But they’ve been getting some negative press on this, including this article at Wired that I think is a bit of an overreaction.

I still think that Flickr is a good service, both for casual and more serious users. I have a little over 2600 photos in my account, so switching to anything else would be a big hassle. So I’m hoping it continues to be a reasonably good service and I don’t have to worry about it.

Metropolitan Museum admission

From Metropolitan Museum of Art Reaches Settlement on Admissions Policy:

The Metropolitan Museum of Art reached a settlement Friday in part of a long-running legal challenge to its admissions policy, conceding a semantic point and agreeing to change the wording on its signs to say that its $25 dollar full-admission charge is “suggested” instead of “recommended.”

This is such a weird little semantic issue, but I find myself somewhat amused by it. Is “recommended” misleading? I don’t know. “Suggested” does sound less judgemental to me, at least, but not by much. And why would The Met waste time and money battling this in court?

Some history on this here and here.

I’m a member, so I don’t pay for admission, but I’ve always been curious about how many visitors actually pay the suggested admission, how many pay nothing, and how many pay something in between zero and the suggested price. I like the idea of “pay what you want” transactions, whether it be Humble Bundle sales, They Might Be Giants albums, or museum admission. And I like the idea of places like The Met (or AMNH) being open to everyone, regardless of their ability to pay a $25 admission fee.

Hosting a web browser on a Dynamics AX form

I’m working on an interesting little project at work right now. We use SharePoint to facilitate some workflow around our sales orders and purchase orders. But there’s currently no link between AX and SharePoint, so the sales and purchasing reps have to copy & paste information from AX to SharePoint forms. Not a huge deal, but a bit of a waste of time for everyone. So the idea was to add buttons to various forms in AX that would open a new SharePoint form, with certain fields pre-populated. I might write up some stuff on the SharePoint side of this later, but this post is going to be about the AX side.

The first (obvious) idea was just to launch an URL in the default web browser. And that works fine. Except that everyone is accessing AX through terminal servers. And, while IE is installed on those servers, the internet connection on those servers isn’t filtered the same way it is on end-user machines. So clever users could launch IE from AX, then navigate to restricted sites and possibly infect the terminal servers with malware. Which would be very bad.

My first thought was that there ought to be a way to launch IE on the end-user’s actual PC from the terminal server, but if there’s a way to do that, I can’t figure it out. (And it makes sense that there isn’t, really.) So my next thought was to launch the SharePoint site in a web browser control hosted in an AX form, with no address bar and no way to navigate away from that SharePoint site. Simple enough, right?

After a bit of web searching, I found this article on hosting an instance of System.Windows.Forms.WebBrowser in an AX form. I got pretty far with that, including preventing new windows from opening (which would allow them to break out of the control and into IE), and also preventing them from following links to other sites. But there was one key issue I couldn’t get past: the tab key and control keys wouldn’t work in the control. So the user wouldn’t be able to tab from field to field, or copy & paste information with Ctrl-C and Ctrl-V. I found a few references to this issue on StackOverflow and elsewhere, but no solutions that would have worked easily in Dynamics AX. (They mostly relied on doing things that would work in a real Window Forms app, in C++ or C#, but that I wasn’t going to be able to do in AX.)

So I punted on that, and decided to try just adding the ActiveX web browser control to the form. I’d never actually added an ActiveX control to a form; there’s a good overview about how to do that here. The most important thing I picked up from that is the “ActiveX Explorer” function that can be accessed form the context menu after you add an ActiveX control to a form. That’s how you hook into control events.

I managed to do everything I needed with the control:

  1. Set it to suppress JavaScript errors, via the silent flag. (Our SharePoint site has some messy JavaScript on it, that doesn’t cause any issues, but throws up some errors, if you don’t suppress them.)
  2. Prevent navigation outside the SharePoint site, which I can do by setting a cancel flag in the BeforeNavigate2 event handler.
  3. Prevent opening new windows, which I can do by setting a cancel flag in the NewWindow2 event handler.

And it handles the tab key and control keys normally, without any workarounds.

So that’s about it. ActiveX is a twenty-year-old technology, but it still works. As much as I would have liked to do something fancier, I can’t complain!

Mac ransomware

I panicked a bit when I read about the ransomware that was attached to a recent version of Transmission, a Mac BitTorrent client. Thankfully, I hadn’t updated (or even launched) Transmission on my Mac in a while, so I’m not affected. I only use BitTorrent occasionally, usually to download a Linux ISO or books/comics from a Humble Bundle.

After realizing that I wasn’t affected, and calming down a bit, I started thinking about what I can do to prevent being affected by one of these things, both on my Mac and my PCs. Ransomware is a big problem, and has affected many individuals, companies, and even hospitals. As long as even a handful of people pay up, the bad guys will keep putting this horrible stuff out there.

For this specific Mac issue, there’s really not much I would have been able to do to prevent it. It wouldn’t have been detected by any Mac malware scanner initially, and it was signed by a valid Apple developer key. Transmission is an above-board, well-respected open source program that’s used by many people, so it’s not like I was using some sketchy adware-infested BitTorrent client.

Probably the worst-case scenario here would have been if the ransomware had scrambled all the stuff I had on OneDrive, and then the contents had replicated from my Mac to my two PCs. (And let’s also assume that the ransomware had scrambled my Time Machine backups too.) That could have left me with a lot of lost files. I should probably figure out a good way to make offline backups of my OneDrive files on a regular basis. (I miss the days when I could back up all my key files to a single 100 MB Zip disk.) And this also reminds me that I haven’t done a full backup of my new desktop PC yet.

Antibiotic Resistance – NY Times

I don’t know why I read articles like this. There’s not much that I can do, personally, about antibiotic resistance. I’m not a doctor, researcher, farmer, or politician. And I really don’t need the extra stress of worrying about this stuff.

Well, I guess I can vote for folks who recognize that this is a problem and that vaccination is a good thing and doesn’t cause autism. And I can try to buy meat and dairy products that come from animals that haven’t been fed loads of antibiotics.

The best outcome is preventing infections through vaccination or public health measures so that we improve human health without increasing resistance to antibiotics.

Source: We’re Losing the Race Against Antibiotic Resistance, but There’s Also Reason for Hope – The New York Times

closer to paperless

I blogged back in December about how I’m taking a few more baby steps towards going paperless. I had switched my Merrill statements over to email, and that’s gone reasonably well. I’m downloading those statements pretty regularly, and I’m also keeping up with the other random statements that were already coming in via email.

One side note: the standard for paperless bills and statements is almost always PDF (which is fine). On my new desktop PC, I’d decided to skip installing Acrobat Reader in favor of Foxit. I thought that was working out OK, but I started having trouble with Foxit crashing randomly, so I had to give up on it and switch back to Acrobat. I’m not that fond of all the bells and whistles that Adobe keeps adding to Acrobat Reader, to try to suck you into their “document cloud” or whatever else they’re pushing at any given time. But at least it doesn’t crash. Maybe I’ll try Sumatra or one of the other third-party PDF readers at some point, but for now I’ll stick with Adobe’s bloatware.

So, where was I? Oh yeah, getting rid of paper. For a number of years, I’ve been paying most of my bills electronically through my bank’s web site. It’s got a reasonably good interface, and has always worked well. Except when I screw up, which I’ve done twice recently. The interface shows an alphabetical list of all the payees you’ve set up, and you just type in the amount you want to pay in a text box next to the payee name. Well, twice recently I’ve accidentally typed into the wrong box, paying a bill for company “A” to company “B” instead. The first time, I caught it in time to cancel the incorrect payment and entered the correct one. But, this month, I paid my cable company instead of my credit card company, and didn’t catch it until the cable bill showed up in the mail with a really big credit on it. So I figured out what I’d done, but maybe a little too late. I paid the credit card bill as soon as I realized what I’d done, but I’m not sure it made it in before the due date, so I might get dinged with a late fee.

So that’s convinced me to try a feature on the bank’s bill payment site that I’ve been ignoring up to now. For several companies, you can request e-bills to be delivered directly via the bank’s web site. So you can just review and pay them right there. I’ve always been a bit leery of this, but it seems like it would be a good way to prevent the problem of accidentally paying the wrong company. And I’ll be able to download the PDF e-bills for multiple companies all through a single web site, instead of a different one for each company.

I signed up for e-bills for my two major credit card accounts. I’ll probably add my other credit card account and my phone bill later, if the first two e-bill setups work out. So pretty soon, I may be down to just one or two paper bills / statements per month, and I can probably get rid of those too.

This is all good, and it will cut down on the amount of useless paper that I have to file away in my file cabinet, then occasionally purge and shred. It’s starting to bother me, though, that I don’t get much mail anymore. So I’m thinking about subscribing to a printed weekly magazine again, like the New Yorker or the Economist, just so I’ll have something showing up in my mailbox regularly. But I know I won’t have time to read either of those. So, maybe TV Guide?

MoMA PLASTIC

I’ve visited MoMA twice recently; both were pretty short visits. There’s not much major going on right now. But the PLASTIC thing is kind of weird and funny. I wasn’t aware of it, initially, and I had thought that someone had maybe passed out on the stairs, and I was wondering why no one was doing anything about it. But I figured out that it was probably art by the time I reached the top of the stairs.

Someone posted a photo from that on reddit recently, and the comments turned into an interesting back and forth on modern art. Well, ok, lots of it is the usual reddit silliness, but there are a few actually insightful comments in there.

a new owner for Quicken

I’ve been using Quicken since the early nineties, I think, originally using the DOS version. I’ve been tempted to switch to something else quite often, but I keep sticking with Quicken. Intuit announced a while ago that they wanted to sell off Quicken, and they just announced that they’ve found a buyer.

I was expecting the buyer to be an existing software company or financial company, but instead it’s a private equity company I’ve never heard of. I guess that could be a good thing. If it had been bought out by a financial company, they would likely have used it to push their own services and cut back on compatibility with competing financial institutions. And, now that I think of it, there really aren’t any existing software companies where it would have made sense for them to buy Quicken. Maybe Microsoft, but there’s a lot of history there, which eventually resulted in Microsoft giving up on their own MS Money software and exiting that niche, so I could see where they wouldn’t want to dive back into personal finance software.

So I guess I’ll keep using Quicken for the time being, and see what the new owner does with them. I’m not too optimistic, but I’ll give it a chance. (Especially since I only recently upgraded to Quicken 2016.)