C# source code analysis

Something came up at work today that got me thinking about source code analysis tools. Since I’m currently working on two C# projects, both of which are close to done and working reasonably well, I decided that maybe it would be cool to try running some source code analysis tools against them and see if there was anything I could clean up.

I started with something fairly simple: StyleCop. I installed the Visual Studio extension for it, ran it and went through the results. It found a ton of stuff, much of which I didn’t entirely agree with. But it did find quite a few things that made sense to me, so I cleaned them all up. With the VS extension, StyleCop only identifies issues; it doesn’t do any automated fixes. And it’s not doing any deep analysis; it’s just finding stuff like issues with naming conventions, missing comment headers, too much or too little whitespace, and similar style issues. But I’m a sucker for that stuff, and I like my code to be consistent with accepted conventions (for the most part).

I also looked at CodeMaid, which looks like it does a lot of stuff that’s similar to StyleCop, but it also automates fixing the issues. I didn’t get around to trying it, but I’d like to play with it when I get a chance. It’s open source, so I can try it without having to worry about spending any money.

I’ve been aware of some of the fancier commercial tools for a long time. Specifically, ReSharper and CodeRush. I’m curious about them, but they’re both too expensive for me to really justify. If I ever find myself in a job where I’m doing a lot more C# work than I’m doing now, and I have a budget to work with, I’ll try one of those.

Evernote 8.0 for iOS

Evernote just released a new version of their iOS client, version 8.0. It’s a pretty big redesign. Over the last few years, I’ve generally found that any time a company does a big redesign on their iOS app, I’m disappointed with it. So I was prepared for this update to really annoy me. But it’s not that bad. It is actually a little easier to use than the old one, for some common use cases. And they haven’t taken away any key functionality.

The one thing that does bug me about it is that you can’t change the color scheme any more. The redesign uses a pretty simple black-on-white scheme (with a little green). I’d like it if they at least added a dark theme. But that’s a minor issue.

Reaction to the update has been mixed. The Verge says “Evernote’s redesign is too little, too late.” (The review is positive, regarding the update, but negative, regarding everything else Evernote has done lately.) TNW says “Evernote is still dead to me, but the iOS app looks better than ever.” (So, again, positive about the update and negative about Evernote in general.) Both of those reviewers like Bear as an alternative. If I was at all unhappy with Evernote (and also didn’t need a Windows client) I’d consider Bear.

thinking about comics again

I’ve gotten back into the habit of buying comics regularly again, as I mentioned a couple of weeks ago. A couple of articles I’ve read recently have gotten me thinking a bit more deeply about whether or not I want to continue picking up books weekly from my local comic shop. I thought it might be useful to list out all of my options here. (I don’t know if this will be an interesting blog post or not, but it might help me make up my mind.)

First, there’s the option of continuing to pick up books off the rack, weekly, from my local comic shop. Advantages to this approach:

  1. Convenience. (The shop is practically right across the street from my apartment.)
  2. Flexibility. (I can choose whether or not to buy a particular book right in the store.)
  3. I’m supporting my local comic shop, and that’s a nice thing to do.

Disadvantages include:

  1. I have to go the shop every week, or I risk missing a book if it sells out.
  2. My local shop doesn’t have a good selection of independent comics. They mostly just stock Marvel, DC, and Image.

So my next option would be to keep using my local shop, but switch over to a pull list. The main advantage here is that I don’t necessarily have to come in every Wednesday, and there’s less risk that I’ll miss a book if I do. But managing a pull list can be a hassle, and there’s no guarantee that the store will actually pull the books I ask them to. And I lose some flexibility; if I decide to drop a book, I really need to tell them in advance.

Another option is to switch back to Westfield, or a similar mail-order subscription service. Advantages:

  1. Convenience. (Place one monthly order. Books show up at my apartment.)
  2. Selection. (Westfield has a pretty good selection of independent comics in addition to the stuff from the bigger publishers.)

The main disadvantage is that I’d be ordering stuff a few months in advance of release. So if I realize that I don’t like a book, I’ll already have the next two or three issues on order, and I’ll be stuck with them. The other disadvantage is that I’m no longer supporting my local shop. (Oh, and another problem is that Westfield is realy only cost-effective if you’re buying a fair number of books. Right now, I am. But if I wanted to cut back, I’d probably have to quit Westfield again.)

Yet another option would be to switch to digital, and buy all my books from Comixology. That’s quite convenient, since I don’t have to order in advance, I don’t have to worry about books selling out, and I don’t have a bunch of physical comic books piling up in my apartment. The downside is, again, that I’m not supporting my local store. (Instead, I’m supporting Amazon, and honestly they’re already getting plenty of my money.) And also I’d be paying full-price for DRM-locked copies of my books.

And of course, I can just stop buying the regular monthly books altogether, and go back to what I’ve been doing for the last few years: buying stuff from Comixology when it’s on sale, and buying trade paperbacks (also when they’re on sale, usually). There are a lot of advantages to going this way:

  1. Cost. I can save a lot of money buying books only when I can get them for 99 cents on Comixology, and only buying trades when I can get a discount on them.
  2. Easier to keep things organized.
  3. A better reading experience. (I’m buying stuff in large chunks, getting a whole story at once, and generally only buying stuff that got good reviews, and that I know I’ll like.)

So I guess that writing all this down helped a bit, but I still haven’t made up my mind. I want to support my local shop, but I don’t think it’s a moral imperative that I do so. And I like the ritual of going in once a week, saying hi ot the owner, scanning the racks, and all that stuff.

It’s possible that I’ll lose interest in the DC universe, once this whole Batman/Flash/Watchmen thing kicks in. If that happens, then this whole problem sorts itself out naturally, since I’m really only buying DC books right now. So maybe I should keep to my current habits for a few more months and see what happens.

command line follow-up

As a little follow-up to my recent post about command-line stuff in Windows, here’s an InfoWorld article about the popularity of Microsoft’s Linux Subsystem. I still haven’t really used it much, but I like it a lot. As the article mentions, there are a lot of fixes coming in the next Windows Insider build, so that’s a good sign. I hope it’s something that they’re going to continue to support and eventually move out of beta.

I really wish I could use it at work, but my work PC and laptop are Windows 7, and all my VMs are various slightly-outdated versions of Windows Server.

And as if running bash on Windows wasn’t confusing enough, I could also run PowerShell on my Mac. But, yeah, I think that would be too weird.

 

Snow Day

It snowed yesterday, and it’s been very cold yesterday and today, so I’ve spent most of the weekend at home, where it’s nice and warm. And I got a little bit of computer maintenance done.

On my MacBook, I finally got around to turning on FileVault. I’d never done that before, out of fear that it would slow things down too much and/or cause data corruption issues. But it’s been around for long enough now that it’s likely pretty solid, and I don’t think it’ll slow things down too much. I turned it on this morning, and it’s still encrypting the drive. I’m not sure how long it’ll take, since the time estimate has been jumping around a lot, but I think it’ll be done by tomorrow if I leave it going overnight.

My desktop PC, a Dell XPS 8900, just hit its first anniversary. I bought it a year ago, so the one-year McAfee LiveSafe subscription just expired. I checked the renewal price on it, and it would have been $65, so I said no to that, and uninstalled it. I then turned on the default Windows Defender software. I’m curious as to whether this will speed things up or not. The PC is usually reasonably fast, but it does seem to bog down at times for no discernible reason.

I also finally got around to installing bash on my desktop PC. I’d installed it on my ThinkPad some time ago. I still haven’t done much with it though. One of these days I should sit down with my laptop and my PDF of Learning the bash Shell and see if I can brush up on my bash skills, and maybe learn a few new tricks.

CMD.EXE will never die

Microsoft recently decided to make a fairly minor change in Windows 10 that led to some misleading headlines about the impending death of CMD.EXE. Microsoft has now posted a nice blog post explaining clearly that the old command prompt isn’t going anywhere. I still use cmd.exe for some stuff, and PowerShell for other stuff. I’ve never gotten entirely comfortable with PowerShell, and I still find myself needing to search the web to figure out how to get stuff done with it, but it’s definitely quite useful, once you’ve gotten the hang of it.

I’m probably just as proficient with PowerShell as I am with bash. (Which is to say, not nearly as proficient as I’d like to be, but good enough to get by.) It’s kind of funny that bash has been around since 1989 and is still so popular. It’s pretty easy to switch to a different command shell in Linux (or other Unix variants), and it used to be common to see people trying out different shells, but it seems like bash has won out over all the others. And, of course, you can now get a good bash shell in Windows, which is pretty cool.

Long ago, back in the MS-DOS days, I was a big fan of JP Software’s 4DOS, which was a replacement for COMMAND.COM. They’re still around, and their current product is called Take Command. I paid for an upgrade to it about a year ago, and gave it a spin, but I had some issues with it, and gave up on it. I may upgrade to the new version and give it another try; it’s got quite a lot of functionality, though it’s gotten pretty hairy over the years. The best example is probably the TPIPE command, which is very powerful, but not at all elegant.

Goodreads reading challenge

I set a goal of 50 books in my Goodreads reading challenge last year, and read 79 total. A lot of them were comics, and some of the non-comics stuff wasn’t exactly novel-length though. But it’s still a good amount of reading.

I set this year’s goal at 50 books again. My main purpose in reading this year will, I think, be “brief distraction from feelings of impending doom.”

I actually haven’t read a regular old novel in a while, possibly since October. I’ve been reading a lot of comics over the past few months. I’m not quite sure what I want to read next. One of my friends has recommended Ready Player One, by Ernest Cline, which I’d heard about before and have been meaning to pick up. So that’s a possibility. I also have three unread Star Trek novels on my Kindle, though, so maybe that would make a good start for 2017.

New Year’s Day 2017

I’ve gotten into the habit of writing a post on New Year’s Day, reviewing some goals and events from the previous year and thinking about goals for the new year. Last year’s post was pretty long, and took quite a while to write. I’m not sure if this year’s post will be quite as long, but, for reference, it’s now 8:05 am. I’ve got the radio on WQXR, a cup of coffee at my side, and nothing else to do this morning. Let’s see what time it is when I finish!

For reference, here are links to my last three New Years Day posts:

Weight and General Heath
I think I’ve successfully transitioned from losing weight to maintaining my weight. I started 2016 at 150 pounds. I’ve stayed between 145 and 150 all year. I’m currently at 146. I’m still using Lose It to track everything I eat, and I’m staying within my budget most of the time. So I’m feeling pretty good about that.

On the fitness front, I’m not really doing much. Since I got my Apple Watch in April, I’ve been wearing it every day, and doing my best to meet the activity goals. So I’m making some effort, and I have the watch to help me keep track of what I’m doing. I was doing a lot of walking when the weather was nicer, but I haven’t been terribly active this winter.

Medically, I haven’t had any huge problems this past year, except for the migraines I started getting back in May. I got an MRI done on my brain, but it didn’t find anything interesting. I’ve also been getting more general headaches than I used to. I’ve been dealing with a generally higher level of pain and fatigue this past year, overall, but I’m not sure I can point to anything specific enough to be actionable. Maybe I’m just getting old.

And I’ve still got the neck and back pain that I’ve been living with for a few years now. I did buy a new mattress in June, as I’d planned, but it hasn’t helped me at all. In fact, I think I might need to toss it and try again this year, maybe with something different, like a Casper mattress or something similar.

Speaking of which, my sleep quality recently hasn’t been too bad, but also hasn’t been too good. I’ve been quite good about getting to bed (and getting out of bed) at a consistent time. I’m generally in bed around 10pm and awake at 6am, on both weekdays and weekends. I think I’m doing a lot of things right, in terms of the usual advice you see about limiting screen time before bed, keeping regular hours, and so on. I’ve occasionally had bouts of insomnia in the past year, but I’ve been OK lately. Being in an apartment building on a busy street, there’s a lot of stuff that’s out of my control. But I’m trying to do my best given the environmental constraints.

Blogging and Journaling
I’ve done a fair bit of blogging here this past year. Looking at my stats, I apparently wrote 193 posts in 2016, so that’s a lot. I’ve tried to work in some useful posts, in between the self-absorbed ones. As to journaling, 2016 was the last year in a five-year diary I started back in 2012. I didn’t actually write much in it in 2016, so I think I’m going to quit that and just stick with Day One. I did a fair bit of writing in Day One over the last year, so I think that’s working out well.

Professional / Education
I’m still at SHI, and will hit the four-year mark this month. Things are pretty stable there. I’m still mostly doing Dynamics AX work, but I had an opportunity to work on some SharePoint stuff too, which allowed me to write some C# code, which was nice. And I did learn a lot about SharePoint this past year, which might not be exactly what I’d have chosen to learn, if I had a choice, but it was fun and interesting nevertheless.

I signed up for a Pluralsight subscription last month. We’ll see whether or not I get my money’s worth out of it this year. So far, I’ve just been using it to work through some SharePoint stuff. I hope to find time to use it to learn some of the newer .NET stuff this year. I haven’t done anything at all on EdX or Coursera lately, and I probably won’t in 2017, since I’ve got the Pluralsight subscription.

Organization / GTD
I feel like I’m really in the groove on this stuff lately. One of my projects for 2016 was switching all of my bills over to paperless (finally). I’ve done that, and I’ve kept up with downloading the PDFs, paying the bills, filing them away in subfolders, and all that exciting stuff. I blogged about going paperless in December 2015, and it feels like I’ve done what I wanted to do there, and kept up with everything.

I’m using Evernote pretty effectively too, I think. Though, looking at it now, there’s a bunch of stuff in my “inbox” notebook that I should really do something with. None of it is really important, but I should make up my mind about what I should consider a project and what I should just file away in the “someday/maybe” category.

Summary
It’s now 9:30, so I’ve been working on this for about ninety minutes, which seems like long enough. There’s more I could write, but I’m going to hold off. Looking back through this post, I don’t think I’ve set any really ambitious goals for 2017, but I’m fine with that. I think I mostly want to keep doing a good job at work, keep doing whatever I can on my health, and try to be a good friend and a good citizen. I think 2017 is going to be a challenging year, for everybody, and honestly I’m a little afraid of it. But I’m going to do my best.