Wednesday, March 27, 2013

The Value of Code Reviews


I've been having a lot of discussion lately about the real value of doing code reviews. The discussions really haven't been any argument about if they are valuable. It has been around exactly how they are valuable. I want to share some of the themes.

Correctness

Something that everyone seems to strive for when doing code reviews is asserting correctness of the code they are reviewing. I think striving for getting things right and assuring that by having a third party (outside of who did primary development, maybe not a party outside your development group) look over it is great. However, I have rarely found a code review to locate something that is incorrect. It does happen, so I won't completely discount it. It seems that having all the needed domain knowledge about the feature you are reviewing to ensure the feature has been coded correctly is hard. Can you be sure that branch logic is exactly what it needs to be per spec? Do you want to even spend the time going over each line making sure that's the case? I feel like there's better use of code reviews than holding onto "correctness" being the primary objective. 

Sharing Understanding

There's some sense of sharing. Especially if you see something you didn't know would work and learn something new. I think like correctness you might not learn everything about a set of code just by looking it over rather quickly. 

Standards

Assuring that team members are following coding standards are an excellent use of code reviews. Teams really shouldn't have a lot of feedback around this if people are on board with the standards. "Hey you forgot x," and call it a day. 

Clarity

When it comes down to it, I feel that clarity is the most important part of a code review. You are looking over someone's changes to make sure if you had to make changes to the code you could understand it tomorrow or next year to effectively make changes in the code. Most clean and maintainable code standards/suggestions converge around making code as readable and understandable as possible. One of the most important thing in a long term development effort. 

In Summary

In the end, clarity is the most important thing you are checking for when reviewing code. I think standards review and knowledge sharing are also important. While you can do other things while code reviewing, I don't think it's worth the effort to really focus on those things. 

Monday, January 21, 2013

Surface and Me

Just after Thanksgiving last year, my Surface RT arrived. I've now had the opportunity to use it for over a month and have some thoughts on it. I picked up the Microsoft Surface (32GB) from Microsoft along with a Type Cover.

General Usage

So in my household we have a number of tablet and computer devices. Too many is likely the right answer. So it was questionable how much general use it would get compared to other devices in the house. The primary winner in the house is still the laptop, especially for my wife. She like to watch something on Hulu or Netflix as well as surf the web and chat. While she will use her iPad to do so sometimes, often she doesn't because she wants to multitask. So the first time I showed my wife she can chat in a side bar and watch Hulu at the same time, she thought it was awesome. For web browsing it works pretty well. Some sites are white listed for flash use which opens up the door to using them since they won't work on an iPad. I found that I miss tapping links a lot though. The iPad that just doesn't really happen, maybe it guesses what you really mean if you're nearby? On my Nexus 7 it will show a zoomed in area and allow you to click the right thing if it doesn't know. I hope this is something Microsoft can get cleaned up in the future. One my biggest general usage annoyances. Also, for general usage, I rarely went to desktop mode. The Modern mode, with a touch screen, works really well. On my work machine, without a touch screen, Modern mode gets kinda annoying, I just stay in Desktop mode.

Software & Apps

Let's start off with the "killer" tablet app: Office. So without a touch or type keyboard for the device, office is very hard to use - since you are in Desktop mode instead of the Modern mode. Outside of that, Office works as one might be used to.

Other software can often be a bit laggy. I think most of it was written with a full blown desktop to power it and no one fully tested it on a device like the Surface. MetroTwit is a great example of this, clicking between views can 15-20 seconds at times. I only use MetroTwit on my Surface, but I expect performance is a lot better on a desktop or full blown lappy.

Software like Dropbox is greatly gimped. Without full file system access, using Dropbox is a bit awkward to download, then edit, and then reupload the file is a lot of steps to make it useful to me. That's kinda disappointing.

Web apps generally work well, but I still see some lag on using Google Docs for a spreadsheet. Not as much as MetroTwit but still noticeable. Web development work is currently almost impossible on the device. As just a dump terminal to something like Cloud9 seems like a great win. Currently, I can't even seem to log into Cloud9 via IE10 on my Surface. I sent in a note, but the general response was just that IE10 is unsupported. Working on my blog (via blogger) works well enough though. I've typed some of this post on it.

The Future

So I am excited by what this device can be in the future. No first round is ever perfect, and this round isn't for Microsoft. I think it's a usable machine, a fun platform to develop on, and this can lead towards more people making great apps. I think the Surface Pro will be a cool travel machine, if it works similarly. Hopefully it won't feel as under powered. Also, some changes to how responsive applications feel (I assume it's just how they are written, but it could be Window's issue) can go a long way to making the experience better. This should start to change with time though.

Wrap Up

So generally I'm pretty happy with the device and expect I'll keep on using it. It's not perfect; however, it can do a lot in an easy to carry around form fact. It's a much better device to take notes on in meetings than an iPad with a Bluetooth keyboard. I am starting to miss touching the screen as another input source. Touch often feels faster than finding the cursor when you just want to tap a button. 

Saturday, January 12, 2013

Codemash v2.0.1.3 Recap

This year was another successful Codemash! As normal, I had a blast and meet a lot of new people. Codemash is still one of the best conferences to attend. The energy there is far above the levels I see at many other conferences. The water park evening for attendees is a blast. The Artemis simulator that was setup was a blast as well. If you get the chance to play in the future, I'd suggest it.

The major disappointment seemed to be the bacon. Bacon wrapped potatoes for breakfast just isn't nearly as good as normal bacon strips. Though I understand it's hard to feed almost 1500 people. This year I felt like I had more trouble tracking down the right place to be at a given time.

My talk this year also had a pretty small crowd. I think that means it's time to retire that talk and move on to other ones. Also, Codemash doesn't really record any feedback from the sessions at all. It's one thing I think, if it can be easy, it would be great for everyone.

So it was great to meet everyone new, talk to old friends again, and just generally get to chat about cool things. I look forward to next year's event!

Tuesday, January 8, 2013

Blog Bankruptcy in 2013

My blog, in the past, has not really been something I've worked hard on. In 2013, I hope to fix this. To help facilitate that, I'm declaring bankruptcy on my existing blog, including the half a dozen mostly-written-but-unpublished works.

There's some of this driven by tools. I moved from self hosted Wordpress to Octopress on Github pages. However, it turns out I can't edit blog posts from any device, like I often want to do. So I've moved to simpler tooling, so I can do everything on any device I want.

I'm going to try for a twice a month (at least) schedule for getting things out the door. We'll see where that ends up!