How Was Your Weekend (part 3) – New Books

(Last one, I promise.)

Part of the Memorial Day festival in our town includes a library book sale. A buck a hardcover, or a buck for two paperbacks. This year I spent eight dollars and came away with some great reading:

20140528-203514-74114290.jpg

Some are books I’ve read before and loved but don’t own (South of Broad). Some are books I’ve always wanted to read (the Bachman Books). Some I think I was supposed to read but didn’t (All Quiet On The Western Front). Some I read but I think a reread now that I’m older will allow me to appreciate the book more (A Separate Peace). Some I’ve seen in a past life while shelving books and thought “Now that looks like a cool book” (The Company). And some are just for fun (Elmore Leonard).

All in all, for eight dollars, I think my summer reading (and then some) is all set.

Advertisements

How Was Your Weekend (part 2) – Updating the Addams Family Patch

The front part of my house gets no sunlight in the summer. I have a pretty large tree in the front yard, such as it is, and another tree right next to it. And because I don’t really have a house but rather a condo, I therefore don’t really have a yard so much as I look out on the common areas of the property.

Don’t get me wrong, the condo property is beautiful, the trees tall and gorgeous, especially during the Fall, and I don’t miss mowing the lawn or shoveling the walk. But I can’t do much about the trees.

Because of said trees, I have a helluva a time getting anything to grow in the small patch of land I do own, which is the garden in front of the house. I plant flowers and bushes that are partial or all shade, but sometimes they last and sometimes they don’t, and then the winter comes and the snow and ice tumble off the roof and crush anything that had only the slimmest hope of survival. It gets so bad that my wife jokingly refers to it as the “Addams Family patch.”

All this said, about every five years or so I have to yank everything out and start all over again. So part of what I did over Memorial Day weekend was tear up the front garden, till all the soil, and replant just about everything. The only things I left were two hastas (cause nothing seems to kill them and my daughter begged me to keep them) and a few day lilies (which I love to see bloom for literally the one day per year they do so). Which means the garden went from this:

20140527-211452-76492612.jpg

to this:

20140527-211610-76570896.jpg

PS – Every single rock you see lining the garden came out of the garden throughout all the times I’ve tilled the soil. It wasn’t until I started tearing up the garden the first time ten or so years ago that I understood all of the farmer walls in New England. Honestly, how did anybody grow anything here when they first settled?

How Was Your Weekend?

It was a long weekend here in the States, a holiday weekend. Memorial Day was today, which is the day we celebrate the men and women who served our country and gave their life in that service. To honor that sacrifice, our town holds a Memorial Day festival every year. And for a tiny town of about four thousand people, it’s a helluva festival.

The day goes something like this:
9:00 AM – Katie’s Memorial 5k Race
11:00 AM – Memorial Day parade
11:30-ish – General merriment and festivities on the Common

It’s always fun, always impressive, always crowded. It starts with the race, and this year the whole family ran the race, with my younger daughter finishing second in her age group (a total surprise to all–including her). We all got the memorial shirts, and my daughter even got a glass and a custom-made cookie as the second place prize.  Then the parade got under way, which starts down by the town cemetery, and eventually makes its way up the hill to the main street, and then down the main street which is always lined with spectators. And you always know when the parade is getting close to the main street because you can hear the pipe and drum core as they lead the way with the colors. It really is a fantastic parade for a tiny little town.

Here’s some photos from the day (and, yes, the sign on the back of the tractor in the last picture does indeed say “Tractors and Tiaras”):

20140526-210706-76026312.jpg

20140526-193424-70464355.jpg

20140526-193530-70530671.jpg

20140526-193559-70559895.jpg

20140526-193623-70583766.jpg

20140526-193626-70586306.jpg

20140526-193729-70649648.jpg

20140526-193728-70648000.jpg

20140526-193803-70683659.jpg

20140526-193802-70682020.jpg

 

 

Brand New Batman Comic (As Drawn By My Daughter)

My daughter decided to draw a few comic strip panels on Sunday. Since they’re featuring a brand new Batman advenure (and a little bit of a Superman cameo), I figured I had to share.

I’ll include some explanatory notes as well, in case the action is not immediately evident.

  • Panel 1: Someone is trying to steal a mermaid.
  • Panel 2: Here comes Batman!
  • Panel 3: Batman has knocked the villain out cold and saved the mermaid.

new doc 1_1

  • Panel 4: After saving the mermaid, Batman’s outa there.
  • Panel 5: Superman, droppin like bomb, on an unsuspecting villain.
  • Panel 6: That villain is history.

new doc 1_2

  • Panel 7: The Joker has pulled a Jurassic Park and has unleashed a dinosaur. The public is running scared.
  • Panel 8: The Joker at the dinosuar’s control panel. “Maniacal laugh!”
  • Panel 9: From out of nowhere, Batman zaps the dinosaur, saving the day.

new doc 1_3

  • Panel 10: The Joker is about to steal a bag of gold from the bank.
  • Panel 11: Here comes the Caped Crusader. “Not so fast!”
  • Panel 12: With a might BOOM!, the Joker is defeated, as is the bank.

new doc 1_4

I hope she keeps drawing these. I love them.

Book Review: “Robert B Parker’s Lullaby”, by Ace Atkins

20140517-170950.jpg

I picked this one up on remainder at Barnes & Noble last week. I discovered the character of Spenser about two years ago, around this time. Took a Spenser book on a road trip to Indiana in May. Since then, I’ve read about two-thirds of them.

The Spenser series is an interesting and often times terrific read. They’re almost like a candy you can mainline right into your bloodstream. I’ve jumped back and forth between the older ones and the newer ones. I haven’t been reading them in chronological order. That’s made the world of crime fiction’s most famous Boston-based private detective a little disjointed, but not cumbersomely so. Probably the most interesting thing about flipping back and forth between the older books and the newer ones is witnessing the evolution of a writer, something that might not have been as evident when the books are read in slow succession as each one was released.

As the series progressed, Parker’s style became leaner and leaner. Some books clock in at barely more than two hundred pages. Some inch up to the two-seventy mark. It’s a rare book that hits three hundred pages. The brevity of language and the brisk storytelling pace led some to claim Parker was “slipping” as he aged, but I disagree. Some books might read better than others, but none failed to entertain or, worse, compromised the character for the purpose of the story.

This might be the longest introduction to a review ever. But I feel it’s important to understand how Parker told the stories of Spenser before we jump into whether his successor, Ace Atkins, hand picked by the Parker estate to carry on the character, succeeded or failed.

So which is it? Did it succeed or fail?

Maybe a bit of both.

As characterizations go, Atkins came pretty close to capturing the voice of the world’s smart-aleck-i-est detective. There are a few misses with the side comments and wisecracks, but they’re few and far between. What is perhaps more noticeable is how heavy-handed the smartass is laid on. There comes a point where you begin to wonder whether Atkins’s Spenser is capable of a serious remark or any serious introspection, something Parker would lapse in and out of. It rounded out his character very well, but for the purposes of “Lullaby”, Atkins shies away from introspection.

The dialogue certainly snaps. But it’s far more profane than a typical Parker outing. Parker used obscenities in his books the way Spielberg used the color red in “Jaws”: when you saw it, it was blood and it was designed to elicit a visceral reaction. So too did Parker use curse words in his books. They were there, no doubt, he certainly wasn’t a prude. But they were only there when needed. Atkins meanwhile laces the four letter words in and out of the dialogue with a kind of reckless abandon.

But if the obscenities are a little more hard R than soft R, it’s less noticeable than Atkins treatment of the world of Spenser, or rather, the world of Robert B Parker. In many ways, it feels like Atkins is trying to establish his bona fides for writing a Spenser novel by pulling out references to as many previous Spenser books as he can. He mentions everything from Hawk being shot by Ukrainians (a reference to “Cold Service”) to Spenser having a wood carving hobby (reference to “The Godwulf Manuscript”). Between the character traits and the previous history, Atkins is overly zealous in demonstrating his Spenserian knowledge. This shows in his use of characters themselves as well. We get appearances from the usually cast (Susan, Hawk, Quirk, Belsen), but we get an onslaught of minor characters or references to minor characters (the Brozs, Gino Fish, Vinnie Morris, Tony Marcus, Ty-Bop, Junior, Paul, Z Sixkill). It’s nearly overwhelming to have so much of Parker’s cast one one stage such that it feels like a reunion show.

But so that you don’t come away thinking that the novel is a failure, I have to say that I’ve never felt more more danger for Spenser & Co. Without Parker to guide the disposition of his creations, Atkins may (or may not) be at liberty to axe one or two. As the books draws to a close, a slow investigation, in which much time is spent in cars staking out people, accelerates toward a violent conclusion. It was in these final moments that I feared for Spenser and Hawk in a way I had not in previous Spenser books.

All in all, it was an interesting read, at times fun, at times distracting. As hard boiled crime goes it was good, if not standard fair. In the end, though, it was certainly not Parker.

Excel Geeking: Using VBA And ADO To Pull Data From SharePoint Lists

I’ve been developing a SharePoint team site for my area which will house all kinds of information about the process and tools that I and my team support. I’ve been tinkering with the team site now for about two weeks. I’ll say this about SharePoint: moving around it is definitely not intuitive, and you can build some unbelievably ugly sites if you don’t know what you’re doing. But once you get the hang of it, and if you have an eye for design and layout, it can be an incredibly useful place to house, well, just about everything related to your area.

That said, I began to wonder whether I could pull data directly from a SharePoint list using ADO. It turns out, you can.

Before I jump into the “how”, I’ll offer a little background on the “why”.

I’ve got a lot of lists of data stored in an Excel file. These lists are nothing more than support data. They are used by other applications (also spreadsheets). Because Microsoft Access is not a supported architecture where I work, we’ve relied on storing data in centralized lists in Excel and using SQL in distributed templates to pull in and refresh the data.

Since I can’t use Access, and since using an Excel workbook housed in a public directory (where anything and everything can happen to it) keeps me up at night, I’ve been thinking about better ways to control these lists. Enter SharePoint.

Okay, so now comes the big caveat: SharePoint is not a database. Yes, you can house lists of data in it. Yes, you centralize the control of it. Yes, you can control permissions to it. No, it is not a proper database. So using for anything other then simple lists of data is probably a really horrible idea. (And if you want even more info on the difference between using SharePoint versus a database, read this article on msdn.)

I specialize in really horrible ideas. Which is why I dug into whether I could pull data out of SharePoint and into Excel using VBA and ADO.

That’s the background. Here’s the code:


' Some public constants, but they can be procedure level
' if you don't think you're going to need them elsewhere.
Public Const sDEMAND_ROLE_GUID As String = "{8D4E11A0-5AAD-4214-B10F-CEA5194787D2}"
Public Const sSHAREPOINT_SITE As String = "https://yoursharepointsite.sharepoint.com/agsinwhateveryoursiteis/"

Sub TestPullFromSharepoint()
' This pulls the data from a SharePoint list. Don't forget a reference
' to the MS ActiveX Objects in "References".

' Variable declarations.
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sConn As String
Dim sSQL As String

' Build the connection string: use the ACE engine, the database is the URL if your site
' and the GUID of your SharePoint list is the LIST.
sConn = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=1;RetrieveIds=Yes;" & _
"DATABASE=" & sSHAREPOINT_SITE & ";" & _
"LIST=" & sDEMAND_ROLE_GUID & ";"

' Create some new objects.
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset

' Open the connection.
With cn
.ConnectionString = sConn
.Open
End With

' Build your SQL the way you would any other. You can add a WHERE clause
' if you need to filter on some criteria.
sSQL = "SELECT tbl.[Last Name] FROM [Employees] as tbl;"

' Open up the recordset.
rs.Open sSQL, cn, adOpenStatic, adLockOptimistic

' Copy the recordset data to a worksheet.
ThisWorkbook.Worksheets("Sheet1").Range("A2").CopyFromRecordset rs

End Sub

I have to give two shout out links, without which this code would never have materialized. The first is how to find a SharePoint list’s GUID from Nick Grattan’s SharePoint blog. The second is the Connection Strings website, where I figured out how to cobble together the connection string for this post. Everything else is ADO 101.

 

Movie Review: Muppets Most Wanted

muppets most wanted

My wife and I took the kids to see “Muppets Most Wanted” this weekend. As a matter of full disclosure, I should state up front that I didn’t really want to see it in the first place. From all the commercials and trailers, it didn’t look like it was up to the caliber of the last movie, “The Muppets”. In the context of my disinterest, I was not disappointed. It was as poor an outing as I expected.

I won’t try to give away too much of the movie, though it’s not so full of plot twists or turns that you don’t see any of them coming. This is a movie geared to children after all, and you don’t want to lose your core audience. As the movie opens, we find ourselves right where we left off with the previous movie. Literally. The streets are thronged with fans and supporters all cheering on the Muppets. Then the “cameras” stop rolling and the crowd disperses, with the Muppets learning that the crowd were mostly extras and a few paid performers. But just as quickly they learn that there is at least one camera still rolling, still framing them. With a sudden realization they deduce that the studio must have greenlit a sequel. At which point we get the Exposition Song, which cleverly states that everyone knows the sequel isn’t quite as good. This might be the highlight of the movie. It is certainly the most clever part.

As plot goes, it’s not much more than an update on The Great Muppet Caper. A con man, played with a fair amount of sleaze and slime by Ricky Gervais, tricks the Muppets into riding their newly rediscovered fandom to a world tour. Little do they realize that the world tour is a simply a way of taking advantage of particular settings, venues that are all situated next to a museum of some sort. Each museum holds a key to the ultimate heist, which concludes in London. But while Gervais gives a nice turn as Dominic Badguy (“It’s pronounced ‘Bah-jee’. It’s French.”), the mastermind behind this dastardly heist plot is the nefarious Constantine. He is billed as “the world’s most dangerous frog”, and the fact that he bears a striking resemblance to one Kermit the Frog is, shall we say, convenient.

After escaping from the Siberian gulag where he was imprisoned for an undetermined length of time, he manages to switch places Kermit, taking on the role of Muppet emcee, while at the same time serving as the brains behind the upcoming heist. Kermit meanwhile ends up trapped in a Siberian gulag and, despite the fact that it’s immediately evident he is not Constantine, he is held captive nonetheless by a moon-eyed gulag warden played by Tina Fey. Yet even while imprisoned, Kermit cannot escape the call of the stage, directing the gulag prisoners in a ridiculous the music and dance review.

There’s plenty more, with all manner of gags and jokes, riffs on the past, and characters given some time to shine that were not seen in the last outing. Some of it’s funny, but not enough of it. Some of it could have been brilliant had it been given more chance to shine. Ty Burrell turns in a hilarious performance as the French interpol investigator, teamed to discover the root of the heist with Sam the American Eagle. Together they steal the screen, with Burrell turning in the best Non-Frenchman-As-Frenchman performance since Peter Sellers. It’s too bad we didn’t see more of him.

What really struck me, and why I came away from the theater with an underwhelmed feeling, is that this movie, unlike the last one, felt just like what it is: an attempt to capitalize on a franchise line that was reinvigorated by a previous outing. I felt a similar way toward “Star Trek Into Darkness”, which tried too hard to please the fanboys, but still didn’t leave me as wanting as this one. I found “Muppets Most Wanted” largely without heart and without comedy, a kiss of death for a movie like this. Contrast it with the previous movie, which was the most touching love-letter to a lost franchise that I think I’ve seen in years. “The Muppets” was lovingly crafted first and foremost by Jason Segel, a self-proclaimed number-one-fan of the Muppets, and it showed. “Muppets Most Wanted” felt crafted by Disney accounts trying to pad the bottom line.

 

Tonight’s Run

I tend not to write one-off post about running. It’s enough for me to wait until the end of the month and then give a summary of how that month went. But tonight was special. And not special in a terribly good way.

Below I’m going to post some of the images from the running app on my phone. I use Wahoo to track my running. I like the clean interface and the heart rate options that it gives me. I used to use MapMyRun, but it doesn’t let you track your heart rate without a premium subscription. Free versus a paid subscription: free wins almost every time.

So here they are:

20140508-184303.jpg

20140508-184336.jpg

20140508-184429.jpg

So what, you might ask. What do these images have to do with anything?

Well what is interesting is that my average pace was a lot less than what I have been building it up (down?) to over the last two months. 11:46 is nearly 30 seconds slower than where I had been. Granted it’s only the first week of the month, but still I found this interesting. Why? Hang on, I’ll get there.

In addition to my pace being up, my heart rate was way up. 145 average heart rate, and 156 for the max heart rate.

So, pace down, heart rate up. Why?

If you look at the third image, you will see you that I have only managed to run four times in four weeks. The last run before tonight was only 2 1/2 miles. Per the summary, I ran 8 miles one Sunday, then nothing for a week, then another 8 mile Sunday, then nothing for two weeks, then 2 1/2. (The 2 1/2 was an interrupted run. I would probably have pushed to go farther, but had to call it off. But to be fair, I just wasn’t feeling it.)

I think the bottom line is that I’m losing conditioning. So much time not running (along with eating like crap these days) has meant that the work I’ve been doing on the Maffetone Method is in danger of a big backwards slide. So I think it’s time to knuckle under. But maybe I’m wrong? What say you, out there in Internet-landia?

Excel Geeking: RowSource For A Control In A Modeless Userform

I know that the title of this post is going to sound like a Charlie Brown adult talking to most casual readers. But what I really want in a blog post title is something that is going to really tell me what is inside so that I don’t waste my time. Which is what I strove for above. Sorry if it’s too geeky.

This one is a short one, and one I needed last week. It’s one I already know, but always forget about. Forgot about it last week and then the userform didn’t open properly, and I spent five minutes stepping through the code trying to figure out what I did wrong, only to find it was the RowSource property.

So what’s the problem? Well, as any Excel VBA programmer can tell you, you can set certain userform controls to read their contents from a range. This is an alternative to adding every single item you want manually. It applies most often to the combo box control and the listbox control. It might apply to the listview control (which is a really nifty userform control, but can be a little hard to work with), but I didn’t stop writing this long enough to check.

How it works is that, in the properties for one of these controls is a property called “RowSource”. All you need to do is add the name of the range to this property and all of the items in the range are added for you. One of the benefits of this approach is that, as additional items are added to the range, the items are also added to the control (presuming you’re using a dynamic range of some type). It doesn’t require the range itself as a variable, just a string of the range name.

What does this look like? Like this:

Userform1.Combobox1.RowSource = [String of the range name]

Great! Beautiful! Flawless!

Except…

What if your userform happens to be modeless? (For the uninitiated, a modeless userform means that, when the form is running, you’re not locked into using the form the whole form and nothing but the form until you close it. You can click around on worksheets or even across workbooks. If you want a native Excel demo of this, open up the Find/Replace form and click back into the worksheet while the form is still open.)

If your userform is a modeless one, then the RowSource approach above won’t work as it is. What happens is that Excel doesn’t know where the range is, since being modeless means the scope of workbooks you can access while the form is running is bigger than just that workbook.

So what’s the answer? You need to tell the control which workbook contains that range that is acting as your RowSource. That looks something like this:

Userform1.Combobox1.RowSource = "'" & ThisWorkbook.Name & "'!" _
                                & [String of the range name]

By adding the name of the workbook to the total RowSource string, you’re pointing the control to a very specific place to get the data. And you’re making it so that your form will, you know, function.

As a final thought, I always add the apostrophe in the front and back of the workbook name. This allows the workbook to have a name that is not one long string of unbroken by spaces. If you don’t have spaces in your file name, then you technically don’t need them. But if you save the file under a new name and that name has spaces, BANG! you get an error. And who wants that? Not I.

 

Biting The Platform That Hosts Me

I don’t really need to find things to gripe about. There’s plenty out there. There are plenty of people already out there griping. There are more talented writers who are doubtlessly more famous than myself who are griping professionally. You could probably go and find one of them and have a more satisfying read. Plus, I try not to gripe on this blog, because, after all, who wants to read a blog that’s nothing more than a guy complaining about everything?

But I’m annoyed enough to complain this time. So this is a fair warning. I’m gonna gripe for a moment. If you don’t feel like reading a gripe, or want a better class of gripe, now’s the time to navigate away from this post.

Still there? Okay, let me add another log to this fire. I’m gonna gripe about WordPress. Again, here’s your chance to close down your browser.

Still there? Okay, then.

I hate the WordPress mobile app. I used to love it and now I hate it. And I can tell you why in a single reason, though there were initially more than one reason to hate it. For example, since they’ve updated the app for iOS 7, the controls have been glitchy and changeable. They changed the layout of the text controls so that you don’t get as full a spectrum of controls as you used to. In release 4.0, if you had a fairly long post, when you scrolled through it, the Options button that had been anchored at the bottom of the post would get lost into the middle of the post. If you could find it, you could still tap and enter the options, but you had to find it, blended in with and overlaid by the rest of the post. Also in 4.0, you couldn’t scroll to the end of the line in a post.

But these were minor annoyances next to my big gripe. And they also apear to be fixed in the last release. At least, so far.

Never mind, also, the fact that when you save a draft of a post you’re working on, the mobile app drops you back to the list of posts. Imagine is Microsoft Word did that. Imagine if, every time you saved a Word document, the document closed down and Word made you re-open that document to continue to work on it. How long do you think a product like that would last on the market? Three months? Maybe?

But even this is not my biggest gripe. This transcends minor annoyance to become a major annoyance, but still not my primary reason for hating the current version of the WordPress iOS app.

No, my big gripe, the primary reason I dislike the WordPress mobile app is all about syncing, or specifically, is the lag time between syncs. If I make a change on my laptop, when I go into the mobile app later, that change may or may not be synced. And, if I start making edits in the mobile app, the laptop version is lost and I have to restore it from a previous version. I has this happen two days ago and I bugged the crap out of me, and ultimately led me to write up this ridiculous grievance. But let’s be clear here: if you’re gonna offer a service on multiple platforms, you know, like everybody does these days, you better make damn sure your data syncs properly and timely across those platforms. WordPress appears not to have figured this one out yet..

So what am I going to do about this? Absolutely nothing! I’ve made my bed, I gotta lie in it. I chose WordPress a long time ago, and even though it took me sometime to get started blogging regularly, I was stuck with my choice. Maybe there are options for migrating to a different blogging platform, but that’s so much more work than I want to put in. Never mind that the majorit of this post was written in the mobile app, which is where I do a lot of the writing. This post is all about griping. I’m not really looking for solutions. I just want to bitch and moan a bit and feel a little sanctimonious. I think I’ve accomplished that.