Twelve Days of .NET: Day 10: Pluralsight

This post is part of my 12 Days of .NET series. This is a (not terribly ambitious) series of posts on .NET topics that came up while I was working on a recent C# Web API project.

I’ve used Pluralsight a lot over the last few months, to try and learn some of the new stuff I needed to know to get my current project done. I went ahead and renewed my membership recently, so I’m set through 2018. We’ll see how much use I get out of it in 2018.

Here are a few courses I finished recently:

That last one didn’t really have anything to do with my current project, since I used VS 2017 and not VS Code, but I was thinking about using VS Code for it, initially. I like VS Code as a tool, but, given a choice, I’ll stick with the full VS 2017.

And I’ve started this course: Web API v2 Security by Dominick Baier

I actually have a lot to learn about security and authentication/authorization for Web API, but it’s not that important for my current project, since it will only be used internally.

I have a lot of other videos bookmarked in Pluralsight. I’ll probably get around to watching a few of them, but I haven’t really been spending much time on that lately. At work, I’ve been busy programming, and at home, I’ve been busy watching Netflix and reading comic books.

2018 reading goals

I’ve been thinking about my habits around book-reading, and reading in general, lately, since it’s the start of a new year. As I mentioned in my New Year’s post, I completed my Goodreads challenge last year, reading over 100 books, though most of them were comic book collections. So far this year, I’ve completed 5 books: one audio drama, and four manga volumes. So I’m not patting myself on the back yet. I’m definitely on a manga kick right now, so this year’s reading may be pretty manga-heavy.

I just finished reading an old New Yorker article about a guy who was in prison for ten years, and used the time to read 1046 books. Not to be overly dramatic, but I feel a little like I’m in prison today; it’s so cold out that it’s really not a good idea to go outside for anything that’s not completely necessary. (So far, I’ve only left the apartment to take out my garbage, and that was pretty painful.) It’s a really fun article, one that I bookmarked a couple of years ago and just rediscovered via my attempt to clean up my bookmarks (see previous post), so that effort hasn’t been entirely pointless.

I also recently learned of the 52book subreddit, which is all about the idea of challenging yourself to read a book a week for the year. I can definitely do that, if comic books count. Otherwise, I think I’d have to be in prison or at least unemployed to manage a reasonably-long novel or non-fiction book a week.

I spent a little time organizing my audiobook “library” a bit more this weekend. I have several that I bought from Audible, several from Apple, a bunch from Humble Bundles, and some random ones I bought on CDs and ripped; I haven’t really been doing a great job of keeping track of them all. (In fact, I seem to have two copies of Neil Gaiman’s Neverwhere: one on CD and one from Audible.) I’d like to get a bit more into audiobooks and audio dramas this year, mostly due to issues with my tired old eyes making it hard for me to read at night.

I’m also trying to start up a meditation habit this year, so let’s see where any of this goes. It may all go out the window if it warms up and I can actually get out and do stuff outside again.

Spillo for Pinboard

I’ve been using Pinboard to manage my bookmarks since 2010. It replaced del.icio.us, which, humorously, is now owned by the guy who runs Pinboard, and is read-only.

I like Pinboard a lot, but there are a few little annoyances with it. For one, the Firefox bookmarklet for Pinboard still doesn’t work for any page on github.com. (This is due to something called CSP, and also affects other bookmarklets.) I’d also like to have better searching and filtering capabilities. And the Pinboard site isn’t as reliable as I’d like it be; it’s often slow for me, and sometimes inaccessible. (I’m not sure if that’s Pinboard’s fault, or if it has something to with my ISP or VPN or whatever.)

So I’ve been looking at third-party Pinboard clients for macOS. I already use a third-party client for iOS, called Pushpin, and that’s pretty good (though I have a few issues with that too). The best third-party client for macOS seems to be Spillo. It costs $15, and has a 14-day trial. There are a few negative reviews on the Mac App Store, and it hasn’t been updated recently (last update was April 2017), but I decided to give it a try this weekend.

So far, I’m pretty happy with it, though it’s not everything I’d like it to be. I was hoping that the Firefox bookmarklet that comes with it would solve some of my problems with the official Pinboard bookmarklet. But the Spillo bookmarklet hasn’t been updated for Firefox Quantum, so it no longer works at all. (I’m not sure if the author is going to update it or not.)

If is definitely good for organizing and searching through your links, and can do a few things that Pinboard can’t do on its own. (Or at least I haven’t figured out how to do these things with Pinboard.) First, it can scan through all of your bookmarks and find dead links. When I ran it, it found about 1000 dead links (out of my 12,000 bookmarks). I spent some time deleting a bunch of those yesterday, and updating some of them to point to the correct current URL. To some extent, this is just busywork, and doesn’t really accomplish anything useful. Does it really matter if I have a bunch of dead links to old Lotus Notes and PowerBuilder content in my account? No, not really. But it feels good to clean that stuff up, and it does allow me to take a stroll down memory lane, and stumble across some cool defunct bands, for instance, like Omegalord or Hotrod Cadets, both of whom used to have their own web sites, but apparently don’t anymore.

Spillo also allows you create “collections” — basically a saved search that can have a combination of useful conditions. I’ve created one that will show me unread links from the NY Times, so I can catch up on Times articles that I’ve been meaning to read. I’m also going to want to create one for unread Bandcamp links, since I have a ton of those. (At some point, I’m going to go on a Bandcamp spending spree and buy a bunch of random CDs and/or MP3s.) I have a few other things like that in mind.

I’m also hoping Spillo might work as a way to add bookmarks to Pinboard when the Pinboard site itself is slow or down. I think it’s designed to cache stuff locally, then sync to Pinboard in the background, but I’m not sure if it works in practice, if Pinboard is actually unavailable.

So, overall, I’m finding it useful, though it doesn’t solve quite all of my problems. I’ll probably go ahead and buy it before my trial expires.

I last wrote about bookmarking in August, and got pretty philosophical about it, so there’s no point in doing that again here. It was zero degrees out this morning, so I may wind up spending a lot of time today sitting around in my apartment organizing bookmarks and drinking coffee. Maybe not the best use of my time, but not the worst one either. There’s a lot of stuff I want to do that involves going outside, but it’s really not a good day to do any of it.

Twelve Days of .NET: Day 9: Git and TFS

This post is part of my 12 Days of .NET series. This is a (not terribly ambitious) series of posts on .NET topics that came up while I was working on a recent C# Web API project.

At work, we have a TFS 2012 server for version control. We’re pretty much stuck with that, because the TFS integration in AX 2012 can be a little finicky, and we don’t have a really compelling reason to upgrade anyway. I know that recent versions of TFS (starting with 2013 maybe?) support hosting Git repos, but I think I’d be stuck with TFVC anyway, for a variety of reasons.

For my current .NET project, for which I’m using VS 2017, I started out with a local Git repo, intending to kill it and switch to TFVC when it was ready to go into test. I’m liking Git enough, though, that I’ve stuck with it, and have come up with a somewhat kludgey workflow, where I use Beyond Compare to periodically copy changed code files from my “work” project to a copy of the project that’s bound to TFS. So I code and test locally in the Git version of the project, committing often. Then, when I’m ready to deploy to my test server I follow a workflow where I copy to the TFS project, check my changes into TFS, then deploy to our test IIS server. As I said, it’s a bit of a kludge, but it works for me.

I thought about trying to use git-tfs, but I didn’t want to go down any rabbit holes so I stuck with the simple (but ugly) solution. And I’d love it if we could just switch to VSTS, but I don’t think that’s going to happen either.

Twelve Days of .NET: Day 8: Async

This post is part of my 12 Days of .NET series. This is a (not terribly ambitious) series of posts on .NET topics that came up while I was working on a recent C# Web API project.

Since I’d been away from .NET for a while, I hadn’t really had an opportunity to dig into the new (to me) async stuff. Here’s a good article from 2016 that delves into it.

Six Essential Tips for Async on Channel 9 is also really good.

Trying Meditation

I worked from home yesterday, because of the snowstorm, and I called in sick today, because it was so cold this morning that I started losing feeling in my fingers and toes while I was trying to clear out the snow around my car. (I am legitimately getting over a cold. I’d probably be fine by now if not for all this weather…)

This leaves me with a whole day to just mess around, which has led me to try to knock a couple of “rainy day” projects off my list. One of those is something I’ve been meaning to do for a long time: trying meditation. I’ve been bookmarking (and occasionally reading) articles about meditation for some time now. I even downloaded a meditation app to my phone a year or two ago, but never got around to using it.

Well, long story short, I convinced myself to start using that meditation app today. The app is called Meditation Studio. When I first downloaded it, it was a paid app, but I got it for free via the old Starbucks app of the week thing (Which I guess is dead now. Oh well.) Anyway, I guess it used to be a paid app with (mostly) free content, but (as with many apps) they’re switching to a subscription model. But they’re allowing legacy customers to keep using it for free with all the currently available content, so that’s cool. The subscription price is a bit steep — $10/month (or $60/year). There’s a “holiday discount” going right now, which makes it a little more reasonable, but still not great. I did the first meditation in their starter series today, and my goal is going to keep going through that, one session per day for ten days, and see how that works out.

As I said, I’ve been thinking about meditation for a while now. It came back to the front of my mind recently, due to a few things. First, just thinking about New Year’s resolutions; I didn’t really make any this year, but it got me thinking about stuff I’ve been putting off. Second, I saw a few references to Dan Harris’ new book over the last couple of weeks. When he published the first 10% Happier book in 2014, I was kind of interested, but not enough to buy or read the book. The new one is called Meditation for Fidgety Skeptics, and is a follow-up to the first one. Third, the Note To Self podcast re-posted their episode with Chade-Meng Tan recently. After listening to that episode last year, I added his book Joy On Demand to my Amazon wishlist, but never got around to buying it.

I’m still somewhat skeptical about this whole meditation thing. My skepticism probably comes from looking at stuff like this astral projection video on YouTube that just makes me think of Doctor Strange. And it’s possible that it’s all just a plot to get us corporate drones to work harder, as this article (pretty much) asserts. On the other hand, here’s an article from HBR that makes a good case for meditation. And I should probably read this NY Times meditation guide that I bookmarked a long time ago; it seems pretty reasonable and practical.

I’ve also been giving the Breathe app on my Apple Watch another try. I disabled it pretty quickly after it first came out, because the reminders were a distraction, and I wasn’t convinced that it was at all useful. But now I’ve re-enabled the reminders and I’m giving it another chance. (Of course, the reminders seem to have stopped working now, so that’s something else to troubleshoot, which is only going to make me more stressed…)

 

Twelve Days of .NET: Day 7: Json.NET

This post is part of my 12 Days of .NET series. This is a (not terribly ambitious) series of posts on .NET topics that came up while I was working on a recent C# Web API project.

Json.NET has been around for a long time, since 2006; I remember using it at my previous job. Since then, it’s become the default Json serializer/deserializer for .NET. I think there’s a way to deal with Json in .NET without it, but I can’t imagine why you’d do that. I don’t have much to say about Json.NET, just that it works great and I’m glad it exists.

Twelve Days of .NET: Day 6: Fiddler

This post is part of my 12 Days of .NET series. This is a (not terribly ambitious) series of posts on .NET topics that came up while I was working on a recent C# Web API project.

I can’t emphasize enough how useful Fiddler is for testing a REST API. My project is essentially a REST API calling another REST API, so Fiddler is doubly-useful for me. I can test my own API, and I can see what the external API is returning to me. I even went as far as buying Eric Lawrence’s Fiddler book. I’ve read about half the book so far, and I’ve learned a lot from it, both about Fiddler, and about HTTP in general.

I used to use curl for testing REST APIs, but Fiddler’s composer tab is much nicer. (Having said that, I’m still glad to hear that curl is going to be available in the standard Windows 10 install soon.)

Twelve Days of .NET: Day 5: Unit Testing

This post is part of my 12 Days of .NET series. This is a (not terribly ambitious) series of posts on .NET topics that came up while I was working on a recent C# Web API project.

I don’t actually have much to say here. I set up the standard unit testing project that’s built into the VS 2017 Web API project template, and went through the motions of setting up some tests for one of my controllers. (There’s documentation on that here.) But I didn’t get very far, since I don’t really have an effective mocking strategy for the external API that my API is calling out to.

I started looking at Moq, but didn’t get too far. So maybe this is something for the next project, or version 2 of this project.

Twelve Days of .NET: Day 4: Web API documentation

This post is part of my 12 Days of .NET series. This is a (not terribly ambitious) series of posts on .NET topics that came up while I was working on a recent C# Web API project.

If you’re going to create a REST API, it’s important to document it. For a project at my last job, I created a whole Drupal site to document our REST API. I wrote all the documentation from scratch! With the standard Web API template in VS 2017, you get documentation for free. (Well, almost free.) Here’s an article explaining how to set that up.

I also decided to create Swagger docs with a library called Swashbuckle. Swagger is pretty cool, and seems to be very popular right now. (If you want to use Swagger with ASP.NET Core, here’s a good post on that.)