# How can reviewing be made more efficient?

As suggested by 200_success in a comment to this answer of mine, I'm asking this question. For me, missing tools are the biggest problem of this site. I'd bet that it repels potential reviewers and makes the remaining ones inefficient.

Obviously, we can't have everything a company using a limited set of languages and strict code conventions can offer, but the SO format is pretty lacking. But there are quite a few programmers here (all of us?) and something should be doable.

### Colors

As a fundamental part of CR are code changes, there should be a way to distinguish

• old code to be removed
• code to be preserved
• additionally: comments belonging to the CR (rather then to the code)

Maybe a diff-style input like

/ Always use braces to avoid bugs.
- for(int i=1;i<5;++i) sum = sum + i;
+ for (int i = 1; i < 5; ++i) {
+     sum += i;
+ }
/ This gives us no information, just drop it.
- // Now we're done.
= return sum;


could be used for this and display an usual code block, but with let's say blue/red/green/black text. This would make the CR code even a bit harder to write but much easier to read.

### Preview

As CRs tend to be much longer than typical SO answers, you can't see the formatted output without scrolling a lot. There should be a preview in another window.

### Other features

There's a lot what could be done, but at least something should be done so that we can do more review and less wasting time.

• Does sound like a good StackApps project to create a SE extension for CR to facilitate code-reviewing... hmms, should I dust off my web skillz? Jun 22 '15 at 10:08
• @h.j.k. Alternatively, a user script can help with things as well Jun 22 '15 at 11:44
• I’ve been using this user script for three columns by CertainPerformance for a while- it works well. I’ve considered modifying Simons code Q2A script to mimic GH code selection UI Jul 31 at 10:31

Scrolling up and down between the OP and the answer-in-progress is utterly wasteful and annoying.

A work-around I've come to use whenever possible, is to duplicate the browser tab, drag it to a 2nd monitor and work with the OP on one side and my answer-in-progress on the other.

It would be nice to be able to toggle a display mode that splits the page in the middle and puts the OP on the left and the answer on the right, or vice-versa.

• Can we hide other answers while we are answering? Jun 22 '15 at 3:49
• Haha, I usually just overlay my text editor with a half size window over the browser tab. Then copy-paste the markdown when done. Jun 22 '15 at 3:58
• @200_success it's not about the other answers, it's about a lengthy OP that we want on-screen as we type up our review :-) Jun 22 '15 at 4:16
• Drag the question browser tab to a 2nd monitor, but that's assuming you don't already have The 2nd Monitor chatroom on the 2nd monitor of course. ;) Jun 22 '15 at 9:30
• @h.j.k. That's where using multiple desktops comes in.
– Mast Mod
Jun 22 '15 at 11:00
• I did create this tool to help with this a bit: Code-Q2A - copy code blocks from questions to answers. It is not a perfect solution, but I think it is a step in the right direction. Jun 22 '15 at 11:41
• @glampert If you're using Firefox, you can get rid of the copy-paste part by using the It's All Text extension. There are probably similar extensions for other browsers. Jun 22 '15 at 12:42
• I actually use this method for all of my StackExchange answering (not that I do it that often). It's more of a problem with CodeReview (I can imagine), but StackOverflow suffers from this problem as well. Perhaps a network-wide 'fullscreen toggle'-like functionality, to have the OP's question/comments on the left, and the answer field on the right, might be a good idea. I'm not a UX guy, but that would be incredibly helpful, mostly for SE sites like SO and CR. Jul 24 '15 at 19:04

I spend a needless amount of time indenting code by hand because just selecting code and pressing does not work. I know that there is + but it only solves half of the problem since it only indents when the code is not indented enough (where "enough" is subjective since it will never indent the code enough in a bullet list) and desindents the code otherwise.

I seriously never used the button from the main answer field to go to another field, so not having it available to indent and desindent the code it only a bother and a waste of time.

While it's just an issue among others, I feel that it is important considering the amounts of code we have to deal with.

• What I do is add a new line containing a single nonindented character before or after the part I want to indent. Then I select the block along with the extra line and press ctrl+k. That indents everything by one level. Repeat as necessary and then remove all the temporary lines.
– JS1
Jun 26 '15 at 5:31
• @JS1 That's also what I do from time to time, but I wouldn't call it an optimal solution. It's more of a workaround to try to bypass the real problem. Jun 26 '15 at 7:18
• Use TamperMonkey to install this extremely handy userscript to enable tab and shift-tab when writing questions and answers. It is essential for your sanity. Jul 11 '15 at 21:49