Superheroes for Hospice

I went to the Superheroes for Hospice event at St Barnabas today. I had recently donated most of my comic book collection to them, for this sale, so this was my last chance to spend a little time with my comics. They had quite a lot of stuff for sale — much more than I expected. I think they must have had at least 50,000 comics, plus a sizable assortment of toys and other ephemera. Prices were quite reasonable. Some people were leaving with whole boxes of comics.

I resisted the urge to buy back any of my own stuff. I did pick up a few hardcover collections though. One American Splendor volume, two DC books, and two Marvel. So I managed to show some support without dragging too much stuff back home with me.

 

The Rise of Superheroes

I’ve been enjoying Michael Uslan’s EdX course “The Rise of Superheroes and Their Impact On Pop Culture.” The course is currently in week 3, though I’m still working on week 2. The course material is presented as a mix of short videos and text essays. Most of the videos are shot at the Smithsonian, often using items from their collection. Other videos feature discussions between Uslan and Stan Lee.

Most of the history that’s been covered so far is stuff I already know. I’ve been reading comics, and reading about comics, since I was a kid, so I already know a lot about comics history. But for a younger fan (or for anyone who doesn’t already know this stuff), I think this course would be really interesting. For someone who only has experience with modern comic books and modern TV and movie versions of comic book characters, this course could really open their eyes to the origins of these characters, and to the many great creators who have worked on them over the years. (How many people who’ve watched the Avengers movies know who Jack Kirby is? Not enough, I’d bet.)

There aren’t any tests or quizzes as part of this course. If there were, I’d take them, just for fun, but I don’t think there would be much value in that. Instead, they have something called the “Superhero Sketchpad,” which is just a PowerPoint template that you’re supposed to use to create your own superhero character. It’s a little hokey, but I think it would be fun for a younger person taking the course. The course is pass/fail, and I think anyone submitting a filled-in sketchpad at the end passes. (I’m not going to bother with that.)

There’s also an interesting recommended reading list for the course, containing a bunch of Marvel and DC collections, most of which I’ve already read. But there are a few I haven’t, and might pick up at some point.

Overall, it’s been a fun course. Uslan’s enthusiasm for the material really comes through. And it’s always a joy to hear from Stan Lee, even if he’s mostly telling stories I’ve already heard.

Fun and games with SharePoint and Open XML

I’m starting to work on a SharePoint project right now that sounds like it should be simple, but is actually kind of complicated. Or at least if seems to me like it is, possibly because I’m still new to SharePoint and I’m not always stumbling across the “right” way to solve the various problems I’m encountering.

The basic problem is to take a purchase requisition, stored as a normal SharePoint list item, and allow the user to save it to a nicely-formatted Word document or PDF, so that it can be sent out to a vendor as a purchase order.

I went through quite a few ideas for this, most of which are likely very wrong. What I’ve settled on, for now, is creating a new ASP.NET application page which will take the ID of the purchase requisition on the query string. I can then link to this page through a custom action on the regular list item display/edit form. The new page will read the fields of the list item via the SharePoint object model, substitute them into a Word document template, then allow the end-user to download that document from their browser.

Previously, I’ve always used third-party libraries, such as EPPlus, to generate Word and Excel files. But, in this case, I wanted to avoid third-party DLLs and see if I could do what I needed with just the Open XML SDK.

I’m discovering a lot of interesting things about Open XML as I go. First, there’s a tool in the Open XML SDK, called the “Productivity Tool”, that can take a Word document and generate the C# code necessary to create that Word document from scratch. When I started working on this project, I was concerned about where I would store the document template; now, it turns out that I don’t have to store it at all! I can just generate it from scratch in code each time. And I can just modify the generated code a bit so that the values I need to substitute in can be variables instead of constants.

The generated code, unfortunately, is pretty messy. My first shot at running my purchase order template through the tool resulted in 10,000 lines of code. I made some changes in the document to simplify things, and I got down to about 7500 lines, which is still a lot.

I also discovered the “Power Tools for Open XML” library, which can be used to simplify the formatting on a Word document a bit. I ran it on my template, then generated new C# code, and now I’m down to 7200 lines. Still a lot, but it’s manageable.

So it seems like I now have a viable solution that doesn’t need to read or write anything to/from the file system, doesn’t have any oddball DLL dependencies, and should be pretty straightforward to code, test, and deploy.

SharePoint development

I’ve written a few posts recently about my initial attempts to get started with SharePoint development. I got a few notifications on Monday from WordPress, letting me know that I had new blog comments waiting for approval, all on those SharePoint posts. They were all extolling the virtues of a certain company that provides cloud VMs for development and testing, including SharePoint VMs. (And I’m pretty sure these comments were written by an employee of that company.) I considered approving and posting them, since they did seem to have been written by an actual human, and they were somewhat relevant. But it bothered me that this person felt they had to add comments to every post I wrote that mentions SharePoint; if it was just one comment on one post, I would probably have gone ahead and approved it. But commenting on multiple posts, with nearly identical comments and links back to that company’s site and blog, is kind of questionable. Not quite spam, but close.

I had actually considered signing up for an account with these guys and using one of their SharePoint VMs to get started, until my dev VM at work could be set up. But I decided to just wait, and now that I’ve got the VM at work, I really don’t need a cloud VM. I would still consider them if I ever needed to do some SharePoint work outside of my day job, and if I could justify the cost.

Regardless, my dev VM at work is now all set up, and I’m actually doing some real SharePoint development. I’m finding it to be an enjoyable change of pace from my usual Dynamics AX work. I only have 8 GB of RAM allocated to my VM, and I have a fairly complete SharePoint install on it, but things are still working reasonably quickly.

The debugging experience is better than I expected it to be. It’s really no different than debugging a regular ASP.NET page. I’ve heard so many bad things about SharePoint development, I was expecting it to be a real bear, but it honestly hasn’t been bad.

a trip to New York, and new glasses

I took a trip into NYC today, to visit the new Whitney, take a walk on The High Line, and see about buying a new pair of glasses at Warby Parker.

My eyes haven’t changed much over the last decade, so I just haven’t bothered getting new glasses for quite a while. The last ones I bought, about ten years ago, are still in good shape. But I think my vision has changed enough that it was time for new glasses. I knew that going back to the same optician where I got the last glasses would be convenient, and I’d likely get another great pair of glasses, but I also knew it would be very expensive, so I kept putting it off.

I was a little leery of Warby Parker, but I’ve been hearing good things about them, and a friend just got glasses from them, and they have a store right by the High Line and the new Whitney, so I decided to stop by and see what they could do for me. I have a very strong prescription, so their $99 glasses are actually going to cost me $225, but that’s still a lot better than the $700 or more that I’d have paid to get a new pair from the local optician I used for my last pair. The frames I picked out are clearly not quite as sturdy as my current ones, but hopefully they’re good enough. And on the web site, they’re listed as women’s frames, though they were specifically recommended to me by a store employee who could clearly see that I wasn’t a woman. But I guess they’re gender-neutral enough, and they looked ok on my face, from what I could tell. It’s likely that I’ll need to switch to progressive lenses or bifocals within the next few years anyway, so I may not need to keep these glasses as long as I’ve kept my current ones. They should be ready in a couple of weeks. Warby Parker has a 30-day return policy, so I guess if I don’t like them I can just return them.

After Warby Parker, I walked over to the new Whitney. I’d only been in the old Whitney once or twice, but I liked it. (That old building has been acquired by the Met, and should reopen as the Met Breuer next year.) The new Whitney is really great. After buying my ticket, I took the elevator to the top floor (the eighth) and worked my way down, using the outdoor staircases when I could. It’s a nice space, with a lot of room for them to show off a lot of work. Their current main exhibition, America is Hard to See, fills most of the museum, and has some nice paintings, including one from Jackson Pollock that I don’t think I’ve ever seen before, and a few from Georgia O’Keeffe. There’s much more of course, and I’d really like to go back and take another look. (And I probably will, when I go back to Warby Parker in a couple of weeks to pick up my glasses.)

After the Whitney, I took a stroll on the High Line. It was quite crowded, which I guess should be expected on a beautiful spring day. But it was a nice walk regardless.